/* Housing — reutiliza crafteo.css; solo lo específico de Casas */
body.aw-page-housing main.aw-craft-screen {
  width: 100% !important;
  max-width: none !important;
  min-height: calc(100dvh - var(--aw-topbar-h, 84px)) !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  background-color: #1a1917 !important;
  background-image: none !important;
  color: #e9e6dc !important;
  font: 400 18px/1.25 'EB Garamond', 'Cormorant Garamond', Georgia, serif !important;
}
#housing-app {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: calc(72px + var(--aw-mnav-h, 0px) + env(safe-area-inset-bottom, 0px));
}
body.aw-page-housing .aw-craft-recipes-grid {
  padding: 14px 56px 20px !important;
  box-sizing: border-box !important;
}
body.aw-page-housing .aw-craft-rlist {
  max-height: calc(100dvh - 435px) !important;
  overflow-y: auto !important;
}
body.aw-page-housing .aw-craft-foot {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 50 !important;
  margin: 0 !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 8px 44px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(12, 11, 10, 0.94) !important;
  border-top: 1px solid rgba(201, 178, 127, 0.28) !important;
}
body.aw-page-housing .aw-craft-foot a,
body.aw-page-housing .aw-craft-foot button {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 17px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit !important;
}

.aw-hous-q {
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(200, 182, 138, 0.28);
  color: #efe6d2;
  font: 15px/1.3 'EB Garamond', Georgia, serif;
  box-sizing: border-box;
}
.aw-hous-muted { color: #9a9588; font-size: 0.95rem; margin: 8px 0; }
.aw-hous-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.aw-hous-act {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(200, 182, 138, 0.4);
  background: rgba(0, 0, 0, 0.25);
  color: #e8c97a;
  text-decoration: none;
  font: 600 0.85rem/1.2 Inter, sans-serif;
  cursor: pointer;
}
.aw-hous-act:hover { background: rgba(232, 201, 122, 0.18); }
.aw-hous-upgrade, .aw-hous-upwrap { margin: 12px 0 4px; }
.aw-hous-upgrade {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #3a3428 0%, #2a241c 100%);
  border: 1px solid rgba(223, 210, 167, 0.7);
  color: #f5ebd0;
  font: 600 1rem/1 'EB Garamond', Georgia, serif;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.aw-hous-upgrade:hover { background: linear-gradient(180deg, #4a4334 0%, #322b22 100%); }

.aw-hous-mapwrap { margin-top: 14px; }
.aw-hous-mapwrap h4 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c9b27f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.aw-hous-map {
  position: relative;
  height: 210px;
  min-height: 180px;
  background: #0c0b0a;
  border: 1px solid rgba(232, 201, 122, 0.4);
}
.aw-hous-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.aw-hous-fullmap {
  display: inline-block;
  margin-top: 8px;
  font: 600 0.85rem Inter, sans-serif;
  color: #e8c97a;
  border: 1px solid #e8c97a;
  padding: 5px 12px;
  text-decoration: none;
}
.aw-hous-fullmap:hover { background: rgba(232, 201, 122, 0.2); }

/* Upgrade modal — estética de la ventana Housing Upgrade del juego */
.aw-hup {
  position: fixed; inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px calc(24px + var(--aw-mnav-h, 0px));
}
.aw-hup__box {
  width: min(720px, 96vw);
  max-height: min(90dvh, 860px);
  overflow: auto;
  background: linear-gradient(180deg, #1d1b16 0%, #141311 100%);
  border: 1px solid rgba(201, 178, 127, 0.55);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65);
  color: #e9e6dc;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
}
.aw-hup__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid rgba(201, 178, 127, 0.28);
  background: linear-gradient(180deg, rgba(50, 44, 32, 0.9) 0%, rgba(28, 25, 20, 0.9) 100%);
}
.aw-hup__head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #f5ebd0;
  letter-spacing: 0.04em;
}
.aw-hup__warn {
  margin: 14px 20px 8px;
  padding: 10px 12px;
  background: rgba(120, 40, 28, 0.28);
  border: 1px solid rgba(200, 90, 70, 0.35);
  color: #f0d2c8;
  font-size: 0.98rem;
  line-height: 1.45;
}
.aw-hup__row {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  padding: 12px 20px 8px;
  flex-wrap: wrap;
}
.aw-hup__arrow { font-size: 1.8rem; color: #dfd2a7; }
.aw-hup__house {
  display: flex; align-items: center; gap: 12px;
  min-width: 240px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(200, 182, 138, 0.3);
}
.aw-hup__house img { width: 72px; height: 72px; object-fit: contain; }
.aw-hup__house b { display: block; color: #f5ebd0; margin-bottom: 4px; }
.aw-hup__house small { color: #c4bfb0; font-size: 0.88rem; line-height: 1.4; }
.aw-hup__mats {
  margin: 8px 20px 6px;
  font-size: 1.05rem;
  color: #c9b27f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.aw-hup__tree { padding: 0 16px 18px; }
.aw-hup__tree .aw-ctree__root { margin: 0; }

/* subtabs with text labels (no only-icon) */
body.aw-page-housing .cr-subtab {
  min-width: auto;
  padding: 6px 10px;
  color: #cfc8b6;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: 600 0.95rem 'EB Garamond', Georgia, serif;
}
body.aw-page-housing .cr-subtab.is-on { color: #f5ebd0; border-bottom: 2px solid #dfd2a7; }

@media (max-width: 980px) {
  body.aw-page-housing .aw-craft-recipes-grid,
  body.aw-page-housing .aw-craft-foot {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  body.aw-page-housing .aw-craft-foot {
    bottom: var(--aw-mnav-h, 56px) !important;
  }
  #housing-app {
    padding-bottom: calc(72px + var(--aw-mnav-h, 56px) + env(safe-area-inset-bottom, 0px));
  }
  body.aw-page-housing .aw-zc-topbar { padding: 10px 14px !important; }
  body.aw-page-housing .aw-zc-topbar__lbl { font-size: 15px !important; }
  body.aw-page-housing .aw-hup__house { min-width: 0; flex: 1 1 100%; }
}


/* Z-C de Casas: 5 categorías con icono + texto debajo, visibles también en móvil.
   crafteo.css fuerza min-width:82px y nowrap; en iPhone eso recorta el menú
   porque body.aw-page-screen tiene overflow:hidden. */
body.aw-page-housing .aw-zc-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
body.aw-page-housing .aw-zc-topbar__items {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  gap: 4px !important;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
body.aw-page-housing .aw-zc-topbar__item {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: 120px;
  padding: 2px 4px !important;
  gap: 3px !important;
}
body.aw-page-housing .aw-zc-topbar__lbl {
  white-space: normal !important;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.15 !important;
  max-width: 100%;
  font-size: 15px !important;
  text-align: center !important;
}
@media (max-width: 980px), (hover: none) and (pointer: coarse) {
  body.aw-page-housing .aw-zc-topbar {
    padding: 8px 8px 6px !important;
    min-height: 0 !important;
    gap: 6px !important;
  }
  body.aw-page-housing .aw-zc-topbar__items { gap: 2px !important; }
  body.aw-page-housing .aw-zc-topbar__item {
    min-width: 0 !important;
    padding: 2px 2px !important;
  }
  body.aw-page-housing .aw-zc-topbar__icon {
    width: 36px !important;
    height: 36px !important;
  }
  body.aw-page-housing .aw-zc-topbar__icon img {
    width: 24px !important;
    height: 24px !important;
  }
  body.aw-page-housing .aw-zc-topbar__lbl { font-size: 12px !important; }
}

/* ===== HOUSING-FIX r20261111c ===== */
/* Z-C compacto a la izquierda, igual que Artesanía (antes se repartía por todo el ancho) */
body.aw-page-housing .aw-zc-topbar { overflow: visible !important; justify-content: flex-start !important; }
body.aw-page-housing .aw-zc-topbar__items { flex: 0 1 auto !important; justify-content: flex-start !important; gap: 16px !important; overflow: visible !important; }
body.aw-page-housing .aw-zc-topbar__item { flex: 0 0 auto !important; min-width: 56px !important; max-width: none !important; padding: 2px 6px !important; }
body.aw-page-housing .aw-zc-topbar__lbl { display: block !important; -webkit-line-clamp: unset !important; white-space: nowrap !important; font-size: 15px !important; }
/* subpestañas (Todo / Pequeña / Mediana / Grande…): pastillas con el diseño de la web, sin solaparse */
body.aw-page-housing .cr-subbar { display: flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important; padding: 10px 0 4px !important; flex-wrap: nowrap !important; }
body.aw-page-housing .cr-subtabs { display: flex !important; flex: 0 1 auto !important; flex-wrap: wrap !important; justify-content: center !important; gap: 6px !important; min-width: 0 !important; overflow: visible !important; }
body.aw-page-housing .cr-subtab {
  width: auto !important; height: auto !important; min-width: 0 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
  padding: 5px 13px !important; border: 1px solid rgba(201,178,127,.35) !important; border-radius: 999px !important; opacity: 1 !important;
  background: rgba(0,0,0,.25) !important; color: #cfc8b6 !important; white-space: nowrap !important;
  font: 600 .8125rem/1.2 Inter, system-ui, sans-serif !important; letter-spacing: .01em;
}
body.aw-page-housing .cr-subtab::before { display: none !important; }
body.aw-page-housing .cr-subtab:hover { color: #f5ebd0 !important; border-color: rgba(232,201,122,.7) !important; }
body.aw-page-housing .cr-subtab.is-on { background: rgba(232,201,122,.2) !important; border-color: #e8c97a !important; color: #f5ebd0 !important; border-bottom-width: 1px !important; }
body.aw-page-housing .cr-subtab span { display: block; }
/* descripciones con saltos de línea */
body.aw-page-housing .aw-craft-res-card__desc { white-space: pre-line; }
@media (max-width: 980px), (hover: none) and (pointer: coarse) {
  body.aw-page-housing .aw-zc-topbar__items { overflow-x: auto !important; justify-content: flex-start !important; max-width: 100%; }
  body.aw-page-housing .aw-zc-topbar__lbl { font-size: 12px !important; }
}

/* ===== FARMING (r20261111f) ===== */
body.aw-page-housing .aw-farm-steps { margin: 4px 0 0; padding-left: 1.3em; color: #e0d9c6; font: 400 .95rem/1.45 'EB Garamond', Georgia, serif; }
body.aw-page-housing .aw-farm-steps li { margin: 5px 0; }
body.aw-page-housing .aw-farm-care { list-style: none; margin-left: -.3em !important; padding: 4px 8px; border-left: 2px solid rgba(232,201,122,.55); background: rgba(0,0,0,.22); font: 500 .85rem/1.35 Inter, system-ui, sans-serif; }
body.aw-page-housing .aw-farm-note { margin: 8px 0 0; color: #cfc8b6; font: 400 .9rem/1.45 'EB Garamond', Georgia, serif; }
body.aw-page-housing .aw-farm-ben { margin: 6px 0 0; padding-left: 1.2em; color: #e0d9c6; font: 400 .95rem/1.5 'EB Garamond', Georgia, serif; }
body.aw-page-housing .aw-farm-ben a { color: #e8c97a; }
body.aw-page-housing .aw-farm-tbl { width: 100%; margin-top: 8px; border-collapse: collapse; font: 500 .8rem/1.3 Inter, system-ui, sans-serif; color: #e0d9c6; }
body.aw-page-housing .aw-farm-tbl th, body.aw-page-housing .aw-farm-tbl td { padding: 4px 6px; border-bottom: 1px solid rgba(200,190,170,.18); text-align: left; }
body.aw-page-housing .aw-farm-tbl th { color: #e8c97a; font-weight: 600; }
body.aw-page-housing .aw-farm-panel { max-height: calc(100dvh - 300px); overflow-y: auto; }
