/* HUD, dock y la sala de cultivo */
.juego { position: fixed; inset: 0; overflow: hidden; background: var(--ber-950); }
.vista { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }

/* ---------- HUD ---------- */
.hud { position: absolute; top: 0; left: 0; right: 0; z-index: 50; height: calc(var(--hud-h) + var(--safe-t)); padding: calc(8px + var(--safe-t)) 10px 8px; display: flex; align-items: center; gap: 8px; background: linear-gradient(180deg, rgba(23,13,33,.96), rgba(23,13,33,.8) 70%, transparent); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud__yo { position: relative; width: 50px; height: 50px; flex: none; }
.hud__anillo { position: absolute; inset: 0; transform: rotate(-90deg); }
.hud__cara { position: absolute; inset: 5px; border-radius: 50%; overflow: hidden; border: 2.5px solid var(--out); }
.hud__cara svg { width: 100%; height: 100%; }
.hud__nivel { position: absolute; right: -4px; bottom: -3px; min-width: 23px; height: 23px; padding: 0 4px; background: var(--hoja); color: var(--hoja-t); font: 400 14px/18px var(--f-d); text-align: center; border: 2.5px solid var(--out); border-radius: 8px; }
.hud__corona { position: absolute; left: 50%; top: -9px; width: 24px; height: 24px; margin-left: -12px; z-index: 2; transform: rotate(-6deg); }
.hud__yo.is-vip .hud__cara { border-color: var(--wc); box-shadow: 0 0 10px rgba(255,201,60,.6); }
.hud__nombre { display: none; font-family: var(--f-d); font-size: 17px; }
.hud__plata { margin-left: auto; display: flex; gap: 6px; }
.hud__moneda { display: flex; align-items: center; gap: 5px; height: 38px; padding: 0 9px 0 5px; background: var(--ber-850); border: 3px solid var(--out); border-radius: 13px; font-weight: 700; font-size: 15.5px; box-shadow: 0 3px 0 var(--out); font-variant-numeric: tabular-nums; }
.hud__moneda .moneda-svg { width: 26px; height: 26px; flex: none; }
.hud__moneda.late { animation: late .45s var(--rebote); }
@keyframes late { 40% { transform: scale(1.14); } }
.hud__btn { width: 38px; height: 38px; flex: none; padding: 5px; background: var(--ber-850); border: 3px solid var(--out); border-radius: 13px; box-shadow: 0 3px 0 var(--out); position: relative; }
.hud__btn .punto { position: absolute; top: -8px; right: -7px; }

/* ---------- Avisos ---------- */
.hud__btn[aria-expanded="true"] { border-color: var(--hoja); }
.avisos { position: absolute; z-index: 70; top: calc(100% - 2px); right: 8px; width: min(380px, calc(100vw - 16px)); background: var(--ber-800); border: 3px solid var(--out); border-radius: 16px; box-shadow: 0 6px 0 var(--out), 0 18px 40px rgba(0,0,0,.45); animation: avisosEntra .16s var(--ease); transform-origin: calc(100% - 24px) 0; }
.avisos::before { content: ''; position: absolute; top: -9px; right: 16px; width: 14px; height: 14px; background: var(--ber-700); border-left: 3px solid var(--out); border-top: 3px solid var(--out); transform: rotate(45deg); }
@keyframes avisosEntra { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.avisos__cab { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 13px; background: var(--ber-700); border-bottom: 3px solid var(--out); border-radius: 13px 13px 0 0; }
.avisos__cab b { font: 400 17px var(--f-d); }
.avisos__n { font-size: 13px; font-weight: 600; color: var(--hoja-l); }
.avisos__lista { max-height: min(62vh, calc(100vh - var(--hud-h) - var(--dock-h) - 80px)); overflow-y: auto; border-radius: 0 0 13px 13px; }
.aviso-item { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 9px 13px; border-bottom: 2px solid rgba(255,255,255,.06); font-size: 14.5px; line-height: 1.25; color: var(--txt); }
.aviso-item:last-child { border-bottom: 0; }
.aviso-item:hover { background: rgba(255,255,255,.06); }
.aviso-item i { display: block; width: 30px; height: 30px; flex: none; }
.aviso-item small { display: block; margin-top: 1px; color: var(--txt3); font-size: 12.5px; }
.aviso-item.is-nuevo { background: rgba(139,227,43,.1); }
.aviso-item.is-nuevo::after { content: ''; position: absolute; right: 12px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--hoja); }
.aviso-item.is-nuevo span { padding-right: 16px; }
.avisos__vacio { padding: 18px 16px; text-align: center; color: var(--txt2); font-size: 14.5px; }

/* ---------- Dock ---------- */
.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; height: calc(var(--dock-h) + var(--safe-b)); padding: 6px 4px calc(4px + var(--safe-b)); background: var(--ber-900); border-top: 3px solid var(--out); box-shadow: 0 -4px 0 rgba(0,0,0,.25); }
.dock__item { flex: 1; min-width: 0; margin: 0 2px; letter-spacing: -.01em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--txt3); position: relative; font-size: 12.5px; font-weight: 600; border: 3px solid transparent; border-radius: 15px; transition: background .15s, border-color .15s, box-shadow .15s; }
.dock__item:hover { color: var(--txt); background: rgba(255,255,255,.05); }
.dock__ico { width: 34px; height: 34px; transition: transform .2s var(--rebote); position: relative; }
.dock__item.is-on { color: #fff; border-color: var(--hoja); background: rgba(139,227,43,.16); box-shadow: 0 0 16px rgba(139,227,43,.38), inset 0 0 10px rgba(139,227,43,.14); }
.dock__item.is-on .dock__ico { transform: scale(1.06); }
.dock__item.is-lock .dock__ico .ico { filter: grayscale(1) brightness(.55); }
.dock__candado { position: absolute; right: -6px; bottom: -3px; width: 19px; height: 19px; }
.dock__item .punto { position: absolute; top: -3px; left: calc(50% + 8px); }
@media (max-width: 430px) {
  .hud { gap: 5px; padding-left: 8px; padding-right: 8px; }
  .hud__plata { gap: 4px; }
  .hud__moneda { padding: 0 7px 0 3px; gap: 3px; font-size: 14px; }
  .hud__moneda .moneda-svg { width: 22px; height: 22px; }
  .hud__btn { width: 36px; height: 36px; padding: 4px; }
  .dock { padding-left: 2px; padding-right: 2px; }
  .dock__item { margin: 0 1px; font-size: 11px; border-radius: 12px; letter-spacing: -.02em; }
  .dock__ico { width: 30px; height: 30px; }
}
@media (max-width: 340px) { .hud__yo { width: 42px; height: 42px; } .hud__cara { inset: 4px; } .hud__moneda { font-size: 12.5px; } .hud__moneda .moneda-svg { width: 18px; height: 18px; } .hud__btn { width: 32px; height: 32px; } .dock__item { font-size: 9.5px; } }
@media (min-width: 760px) {
  .hud { padding-left: 18px; padding-right: 18px; }
  .hud__nombre { display: block; }
  .dock { left: 50%; right: auto; transform: translateX(-50%); bottom: 12px; width: 680px; border: 3px solid var(--out); border-radius: 22px; box-shadow: 0 5px 0 var(--out); height: var(--dock-h); padding: 6px; }
  .dock__item { font-size: 13.5px; }
}

/* ---------- Sala ---------- */
.sala { position: absolute; inset: 0; background: #2A1C3F; --cols-e: 7; --filas: 1; --deco-mt: 100px; --abajo: 236px; --lateral: 0px;
  --slot-max: clamp(128px, 7.4vw, 180px);
  --cartel-w: min(clamp(210px, 24vw, 460px), 36vh);
  --cartel-h: calc(var(--cartel-w) * 132 / 460);
  --cabecera-h: var(--cartel-h);
  --cano-y: calc(var(--hud-h) + var(--safe-t) + var(--deco-mt) + 2px);
  --horizonte: calc(var(--cano-y) + var(--cartel-h) + 14px);
  --est-w: min(calc(100vw - 2 * var(--lateral) - 12px), calc(var(--slot-max) * var(--cols-e)), calc((100vh - var(--hud-h) - var(--deco-mt) - var(--cabecera-h) - var(--abajo) - 24px - 88px * var(--filas)) / var(--filas) / 1.5 * var(--cols-e)));
  --lado: calc((100vw - var(--est-w)) / 2);
  --adorno-w: min(13vw, calc(var(--lado) - 36px), 330px); }
@media (min-width: 1000px) { .sala { --lateral: 148px; } }
@media (min-width: 1280px) { .sala { --deco-mt: 0px; --abajo: 150px; } }
@media (min-width: 1280px) and (max-height: 800px) { .sala { --abajo: 110px; } }
.sala__pared { position: absolute; inset: 0; overflow: hidden;
  background-color: #33224B;
  background-image:
    linear-gradient(180deg, rgba(255,92,200,.13), rgba(120,60,220,.05) 40%, rgba(18,8,30,.55)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cg fill='%233E2A5A' stroke='%23291A3C' stroke-width='3'%3E%3Crect x='1.5' y='1.5' width='57' height='27' rx='3'/%3E%3Crect x='61.5' y='1.5' width='57' height='27' rx='3'/%3E%3Crect x='-28.5' y='31.5' width='57' height='27' rx='3'/%3E%3Crect x='31.5' y='31.5' width='57' height='27' rx='3'/%3E%3Crect x='91.5' y='31.5' width='57' height='27' rx='3'/%3E%3C/g%3E%3C/svg%3E");
}
.sala__scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; display: flex; flex-direction: column; padding-top: calc(var(--hud-h) + var(--safe-t) + 2px); }
.sala__scroll::-webkit-scrollbar { display: none; }
.sala__deco { position: relative; flex: none; pointer-events: none; height: calc(var(--deco-mt) + var(--cabecera-h) + 16px); }
.deco-sala { display: block; width: 100%; height: 100%; }

/* ---------- Pared: cada adorno en su lugar ---------- */
.muro { position: absolute; top: 0; left: 0; right: 0; height: 100%; z-index: 1; pointer-events: none; overflow: hidden; }
.d { position: absolute; pointer-events: none; }
.d .adorno { display: block; width: 100%; height: auto; overflow: visible; }
.d-cano { left: -10px; right: calc(2vw + 24px); top: var(--cano-y); height: 22px; border-block: 3px solid var(--out); background: repeating-linear-gradient(90deg, transparent 0 216px, #5A5478 216px 230px), linear-gradient(180deg, #A9A2C4 0 24%, #7A7396 24%); }
.d-cano--galpon { background: repeating-linear-gradient(90deg, transparent 0 216px, #2F3E50 216px 230px), linear-gradient(180deg, #7C90A6 0 24%, #4C5D70 24%); }
.d-cano--viga { right: -10px; background: #F4F7F2; }
.d-extractor { right: 2vw; top: calc(var(--cano-y) - 16px); width: clamp(52px, 5vw, 118px); }
.d-cartel { left: 50%; top: calc(var(--cano-y) + 8px); width: var(--cartel-w); transform: translateX(-50%); }
.d-ventana, .d-poster, .d-foto, .d-repisa, .d-gancho, .d-col1, .d-col2, .d-col3, .d-col4 { display: none; }
.d-sol { right: 5vw; top: calc(var(--cano-y) + 10px); width: clamp(46px, 4.8vw, 116px); }

/* Sala Maestra: ventana a la izquierda, repisa a la derecha. Solo donde sobra lugar a los costados. */
@media (min-width: 1280px) {
  .d-ventana { display: block; width: var(--adorno-w); left: calc(var(--lado) / 2); top: max(23%, calc(var(--hud-h) + 108px)); transform: translateX(-50%); }
  .d-repisa { display: block; width: min(12vw, calc(var(--lado) - 36px), 300px); right: calc(var(--lado) / 2); top: max(21%, calc(var(--hud-h) + 74px)); transform: translateX(50%); }
  .d-gancho { display: block; width: clamp(34px, 3vw, 66px); right: calc(var(--lado) * .62); top: calc(var(--cano-y) + 16px); }
  .d-col1, .d-col2, .d-col3, .d-col4 { display: block; width: clamp(50px, 4.6vw, 96px); top: calc(var(--cano-y) + 14px); }
  .d-col1 { left: max(21%, 372px); } .d-col2 { left: 33%; } .d-col3 { right: 33%; } .d-col4 { right: 21%; }
}
@media (min-width: 1280px) and (min-height: 800px) {
  .d-poster { display: block; width: calc(var(--adorno-w) * .4); left: calc(var(--lado) * .3); top: 60%; transform: translateX(-50%); }
  .d-foto { display: block; width: calc(var(--adorno-w) * .4); left: calc(var(--lado) * .7); top: 58%; transform: translateX(-50%); }
}
/* Pantallas sin costados: póster y extractor chiquitos a los lados del cartel */
@media (max-width: 1279px) {
  .d-cano { right: -10px; }
  .d-extractor { right: 8px; top: calc(var(--cano-y) + 16px); width: 46px; }
  .d-col2 { display: none; }
}
@media (max-width: 1279px) and (min-width: 370px) {
  /* El póster usa todo el ancho libre al lado del cartel y la cabecera le deja lugar en altura. */
  .sala--sala, .visita { --poster-w: clamp(50px, calc((100vw - var(--cartel-w)) / 2 - 14px), 100px); --cabecera-h: max(var(--cartel-h), calc(var(--poster-w) * 146 / 112 + 12px)); }
  .d-poster { display: block; left: 6px; top: calc(var(--cano-y) + 14px); width: var(--poster-w); }
}
@media (min-width: 1280px) and (max-width: 1499px) { .d-col2 { display: none !important; } }

/* Lo que apoya en el piso */
.d-bolsa, .d-cajon, .d-porton, .d-cajones, .d-banco { display: none; }
@media (min-width: 1280px) {
  .d-bolsa { display: block; width: clamp(92px, 8.4vw, 210px); left: calc(max(var(--lado), 150px) * .34); bottom: calc(100% - 26px); transform: translateX(-50%); }
  .d-cajon { display: block; width: clamp(82px, 7.4vw, 180px); right: calc(max(var(--lado), 150px) * .56); bottom: calc(100% - 26px); transform: translateX(50%); }
  .d-porton { display: block; width: min(16vw, calc(var(--lado) - 28px), 380px); left: calc(var(--lado) / 2); bottom: calc(100% - 6px); transform: translateX(-50%); }
  .d-cajones { display: block; width: clamp(90px, 8.6vw, 214px); right: calc(max(var(--lado), 150px) * .56); bottom: calc(100% - 26px); transform: translateX(50%); }
  .d-banco { display: block; width: min(15vw, calc(max(var(--lado), 190px) - 28px), 340px); left: calc(max(var(--lado), 190px) / 2); bottom: calc(100% - 26px); transform: translateX(-50%); }
}

/* Campo: cielo, colinas y cerco llegan hasta el horizonte */
.d-cielo { left: 0; right: 0; top: 0; height: var(--horizonte); background: linear-gradient(180deg, #5B7BE0, #F39BB0 62%, #FFD08A); }
.d-colinas { left: 0; right: 0; top: calc(var(--horizonte) - 62px); height: 70px; }
.d-colinas .adorno { height: 100%; }
.d-cerco { left: 0; right: 0; top: calc(var(--horizonte) - 24px); height: 32px; background: linear-gradient(180deg, transparent 0 18%, #B98852 18% 32%, transparent 32% 62%, #B98852 62% 76%, transparent 76%), repeating-linear-gradient(90deg, #8F6638 0 8px, transparent 8px 76px); }
.d-nube1, .d-nube2 { display: none; }
@media (min-width: 1280px) { .d-nube1, .d-nube2 { display: block; } }
.d-nube1 { left: max(24%, 372px); top: calc(var(--cano-y) + 8px); width: clamp(52px, 5.4vw, 120px); }
.d-nube2 { right: 26%; top: calc(var(--cano-y) + 28px); width: clamp(44px, 4.4vw, 96px); }
.d-nube3 { display: none; }
.d-granero { left: 8px; bottom: calc(100% - var(--horizonte) + 2px); width: clamp(58px, 10vw, 230px); }
.d-tractor { right: 8px; bottom: calc(100% - var(--horizonte) + 2px); width: clamp(50px, 7.6vw, 180px); }
@media (min-width: 1280px) { .d-tractor { right: 14vw; } }
.sala--campo .d-sol { display: none; }
@media (min-width: 1280px) { .sala--campo .d-sol { display: block; } }
.sala--campo .d-cartel { top: calc(var(--horizonte) - var(--cartel-w) * 150 / 460 + 2px); }
@media (min-width: 1280px) { .d-granero { left: max(6vw, 372px); } }
.aspas { animation: girar 3.2s linear infinite; transform-origin: 0 0; }
.neon-g { animation: neon 5s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes neon { 0%, 91%, 94%, 100% { opacity: 1; } 92%, 93% { opacity: .35; } }

.estantes { position: relative; z-index: 2; flex: none; width: 100%; margin: auto; padding: 0 6px 8px; display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 760px) {
  /* Las macetas tienen tope de tamaño y la primera fila siempre entra completa en la pantalla. */
  .estantes { width: var(--est-w); min-width: min(calc(100vw - 2 * var(--lateral) - 12px), calc(var(--cols-e) * 104px)); }
}
.estante { position: relative; padding-top: 22px; padding-bottom: 42px; }
.led { position: absolute; top: 0; left: 4%; right: 4%; height: 15px; background: linear-gradient(180deg, #4A4266, #2E2845); border: 3px solid var(--out); border-radius: 8px; z-index: 6; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.led::before, .led::after { content: ''; position: absolute; top: -12px; width: 3px; height: 12px; background: var(--out); }
.led::before { left: 18%; } .led::after { right: 18%; }
.led__puntos { position: absolute; left: 3px; right: 3px; bottom: 1px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, #FFD6F4 0 7px, #FF5CC8 7px 14px, #B98BFF 14px 21px); box-shadow: 0 2px 8px #FF5CC8; }
.luz { position: absolute; top: 15px; left: 3%; right: 3%; bottom: 46px; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255,110,210,.32), rgba(170,90,255,.1) 55%, rgba(170,90,255,0)); clip-path: polygon(3% 0, 97% 0, 100% 100%, 0 100%); }
.goteo { position: absolute; top: 15px; left: 4%; right: 4%; height: 9px; background: #3B8FD4; border: 2.5px solid var(--out); border-top: 0; border-radius: 0 0 6px 6px; z-index: 5; }

.estante__fila { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.estante__tabla { position: relative; z-index: 3; height: 15px; margin: -4px 0 0; background: linear-gradient(180deg, #A47A52, #7B5636); border: 3px solid var(--out); border-radius: 6px; box-shadow: 0 5px 0 rgba(0,0,0,.28); }
.estante__tabla::before { content: ''; position: absolute; left: 6px; right: 6px; top: 2px; height: 2px; background: rgba(255,255,255,.2); border-radius: 2px; }

/* ---------- Maceta en sala ---------- */
.slot { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.5; container-type: inline-size; text-align: center; }
.slot__maceta { position: absolute; left: 50%; bottom: 0; width: 66%; transform: translateX(-50%); z-index: 2; }
.slot__maceta .maceta-svg { width: 100%; height: auto; }
.slot__planta { position: absolute; left: 50%; bottom: 36.5cqw; width: 94%; margin-left: -47%; z-index: 1; transform-origin: 50% 98%; will-change: transform; pointer-events: none; }
.slot__planta .planta-svg { width: 100%; height: auto; overflow: visible; }
.slot__planta .planta-img { display: block; width: 120%; max-width: none; margin-left: -10%; height: auto; }
.slot.is-crece .slot__planta, .slot.is-lista .slot__planta { animation: mecer 4.6s ease-in-out infinite; animation-delay: var(--retardo, 0s); }
@keyframes mecer { 0%, 100% { transform: skewX(-1.5deg); } 50% { transform: skewX(1.5deg); } }
.slot.is-sed .slot__planta { transform: skewX(4deg) scaleY(.95); filter: saturate(.5) brightness(.82); transition: transform .5s ease, filter .5s ease; }
.slot.is-lista .slot__brillo { position: absolute; left: 50%; bottom: 30%; width: 100%; aspect-ratio: 1; transform: translateX(-50%); background: radial-gradient(circle, var(--glow), transparent 66%); opacity: .5; z-index: 0; animation: brillo 2.2s ease-in-out infinite; pointer-events: none; }
@keyframes brillo { 50% { opacity: .85; transform: translateX(-50%) scale(1.1); } }
.slot:active .slot__maceta { transform: translateX(-50%) scale(.97); }

/* Burbuja de estado */
.slot__burbuja { --b: clamp(42px, 30cqw, 66px); position: absolute; z-index: 4; left: 50%; top: var(--b-top, 2%); margin-left: calc(var(--b) / -2); width: var(--b); height: var(--b); padding: calc(var(--b) * .09); background: var(--papel); border: 3px solid var(--out); border-radius: 50%; box-shadow: 0 3px 0 var(--out); display: none; }
.slot__burbuja::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -5px; width: 10px; height: 10px; background: var(--papel); border-right: 3px solid var(--out); border-bottom: 3px solid var(--out); transform: rotate(45deg); }
.slot.is-sed .slot__burbuja, .slot.is-lista .slot__burbuja { display: block; animation: burbuja 1.1s ease-in-out infinite; }
.slot.is-lista .slot__burbuja { background: var(--wc); } .slot.is-lista .slot__burbuja::after { background: var(--wc); }
@keyframes burbuja { 50% { transform: translateY(-5px); } }

/* Maceta vacía */
.slot__plantar { position: absolute; z-index: 3; left: 50%; bottom: 40cqw; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: 2px; color: var(--txt); font: 400 clamp(12px, 10cqw, 19px) var(--f-d); text-shadow: 0 2px 0 var(--out), 2px 0 0 var(--out), -2px 0 0 var(--out), 0 -2px 0 var(--out); }
.slot__plantar i { display: block; width: clamp(32px, 26cqw, 64px); height: clamp(32px, 26cqw, 64px); padding: 5px; font-size: clamp(16px, 13cqw, 30px); font-style: normal; color: #fff; border: 3px dashed rgba(255,255,255,.7); border-radius: 50%; background: rgba(26,16,36,.72); }
.slot.is-vacia .slot__plantar { display: flex; }
.slot.is-vacia:hover .slot__plantar i { border-color: var(--hoja-l); }

/* Etiqueta de tiempo */
.slot__etiqueta { position: absolute; z-index: 4; left: 50%; top: 100%; margin-top: -2px; transform: translateX(-50%); width: 92%; padding: 2px 4px 4px; background: #FFF3CC; color: #33241A; border: 2.5px solid var(--out); border-radius: 0 0 8px 8px; font-size: clamp(10px, 9.4cqw, 15px); font-weight: 600; line-height: 1.15; white-space: nowrap; overflow: hidden; }
.slot__etiqueta .t { display: block; font-variant-numeric: tabular-nums; }
.slot.is-sed .slot__etiqueta { background: #BFE6FF; }
.slot.is-lista .slot__etiqueta { background: var(--wc); }
.slot.is-vacia .slot__etiqueta { display: none; }
.mini { display: block; height: 4px; margin-top: 2px; border-radius: 2px; background: rgba(51,36,26,.2); overflow: hidden; }
.mini b { display: block; height: 100%; background: var(--hoja-d); border-radius: 2px; transition: width .4s linear; }
.mini--agua b { background: var(--agua-d); }
.slot.is-lista .mini { display: none; }

/* Maceta para comprar */
.slot--comprar .slot__plantar { display: flex; bottom: 42cqw; }
.slot--comprar .slot__maceta { opacity: .34; filter: grayscale(.5); }
.slot--comprar .precio { position: absolute; left: 50%; bottom: 14cqw; transform: translateX(-50%); z-index: 4; display: inline-flex; gap: 4px; align-items: center; padding: 3px 8px; background: var(--cash); color: #06281E; border: 2.5px solid var(--out); border-radius: 9px; font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 0 2px 0 var(--out); }
.slot--comprar .precio .moneda-svg { width: 18px; height: 18px; }

/* ---------- Piso y gato ---------- */
.sala__piso { position: relative; z-index: 0; flex: none; height: var(--abajo); background: linear-gradient(180deg, #5F3F2C, #48301F); border-top: 4px solid var(--out); background-image: linear-gradient(180deg, rgba(0,0,0,.15), transparent), repeating-linear-gradient(90deg, #5F3F2C 0 150px, #553725 150px 153px, #65452F 153px 303px, #553725 303px 306px); }
.gato { position: absolute; left: 50%; top: -22px; margin-left: -60px; width: 120px; z-index: 3; }
.gato-svg { width: 100%; height: auto; overflow: visible; }
.gato-cola { animation: cola 3.4s ease-in-out infinite; transform-origin: 112px 58px; }
@keyframes cola { 50% { transform: rotate(8deg); } }
.gato__z { position: absolute; left: 10px; top: -12px; font: 400 15px var(--f-d); color: #E8DFFF; animation: zeta 2.6s ease-in-out infinite; pointer-events: none; }
.gato__z + .gato__z { animation-delay: 1.3s; left: 22px; font-size: 12px; }
@keyframes zeta { 0% { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-12px, -22px); } }
.gato.mimo .gato-cabeza { animation: mimo .5s ease; transform-origin: 32px 60px; }
@keyframes mimo { 30% { transform: rotate(-9deg); } 60% { transform: rotate(6deg); } }

/* ---------- Misión flotante ---------- */
.sala__mision { position: absolute; z-index: 40; top: calc(var(--hud-h) + var(--safe-t) + 2px); left: 10px; right: 10px; max-width: 420px; display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; background: var(--papel); color: var(--tinta); border: 3px solid var(--out); border-radius: 15px; box-shadow: 0 4px 0 var(--out); text-align: left; }
.sala__mision .cara { width: 42px; height: 42px; border-width: 2.5px; }
.sala__mision b { display: block; font: 400 15px/1.1 var(--f-d); }
.sala__mision small { display: block; font-size: 12.5px; color: var(--tinta2); font-weight: 600; line-height: 1.15; }
.sala__mision .barra { height: 8px; border-width: 2px; margin-top: 3px; background: #D9C48E; }
.sala__mision .det { flex: 1; min-width: 0; }
.sala__mision b, .sala__mision small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sala__mision.is-lista { background: var(--hoja-l); animation: latidoMision 1.3s ease-in-out infinite; }
@keyframes latidoMision { 50% { box-shadow: 0 4px 0 var(--out), 0 0 22px var(--hoja); } }
.sala__mision.is-lista small { color: #2B4A0C; }
.sala__mision .cobrar { flex: none; font: 400 14px var(--f-d); background: var(--hoja-d); color: #fff; border: 2.5px solid var(--out); border-radius: 9px; padding: 4px 8px; }

/* ---------- Herramientas ---------- */
.herramientas { position: absolute; z-index: 45; left: 8px; right: 8px; bottom: calc(var(--dock-h) + var(--safe-b) + 8px); display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.herr { pointer-events: auto; position: relative; flex: 1 1 0; max-width: 92px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 5px 2px 5px; background: var(--ber-800); border: 3px solid var(--out); border-radius: 15px; box-shadow: 0 4px 0 var(--out); font-size: 12.5px; font-weight: 600; color: var(--txt2); transition: transform .1s, filter .2s; }
.herr:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--out); }
.herr i { display: block; width: 38px; height: 38px; }
.herr.is-activa { color: var(--hoja-t); background: var(--hoja); }
.herr.is-activa--agua { color: #06233A; background: var(--agua); }
.herr.is-activa--oro { color: #2E1E02; background: var(--wc); }
.herr .punto { position: absolute; top: -8px; right: -5px; background: var(--ber-900); }
.herr.is-activa .punto, .herr.is-activa--agua .punto, .herr.is-activa--oro .punto { background: var(--peligro); }
.herr-grupo { display: contents; }

.regador-chip { display: flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; background: rgba(23,13,33,.85); border: 2.5px solid var(--out); border-radius: 11px; font-size: 13px; font-weight: 600; }
.regador-chip i { width: 24px; height: 24px; display: block; }

/* Datos del lugar, debajo de la misión */
.sala__info { position: absolute; z-index: 40; left: 10px; top: calc(var(--hud-h) + var(--safe-t) + 62px); display: flex; align-items: center; gap: 6px; }
.sala__cap { padding: 4px 10px; background: rgba(23,13,33,.88); border: 2.5px solid var(--out); border-radius: 11px; font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; }
.sala__cap.is-llena { background: var(--wc); color: #2E1E02; }

/* Expandirme a otras salas */
.sala__expandir { position: absolute; z-index: 41; right: 10px; top: calc(var(--hud-h) + var(--safe-t) + 62px); max-width: 158px; display: flex; align-items: center; gap: 6px; padding: 4px 9px 5px 5px; background: var(--wc); color: #2E1E02; border: 3px solid var(--out); border-radius: 13px; box-shadow: 0 3px 0 var(--out); font: 400 13.5px/1.05 var(--f-d); transition: transform .12s var(--ease); }
.sala__expandir:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--out); }
.sala__expandir i { display: block; width: 30px; height: 30px; flex: none; }
.sala__expandir .punto { position: absolute; top: -9px; right: -6px; }
.sala__expandir.is-llamativa { animation: latidoExpandir 1.3s ease-in-out infinite; }
@keyframes latidoExpandir { 50% { box-shadow: 0 3px 0 var(--out), 0 0 24px var(--wc); } }
@media (min-width: 1000px) {
  .sala__expandir { right: 14px; top: 50%; transform: translateY(-50%); width: 124px; max-width: none; flex-direction: column; gap: 4px; padding: 10px 8px 12px; text-align: center; font-size: 16.5px; line-height: 1.08; border-radius: 18px; box-shadow: 0 5px 0 var(--out); }
  .sala__expandir:active { transform: translateY(calc(-50% + 3px)); box-shadow: 0 2px 0 var(--out); }
  .sala__expandir i { width: 62px; height: 62px; }
}

@media (min-width: 760px) {
  .sala__mision { left: 18px; max-width: 340px; }
  .sala__info { left: 18px; }
  .herramientas { bottom: calc(var(--dock-h) + 26px); }
  .herr { max-width: 100px; font-size: 13.5px; }
  .herr i { width: 44px; height: 44px; }
}
/* En pantallas anchas las herramientas van a los costados del dock y dejan más lugar a las plantas. */
@media (min-width: 1280px) {
  .herramientas { left: 18px; right: 18px; bottom: 12px; justify-content: space-between; }
  .herr-grupo { display: flex; gap: 6px; pointer-events: none; }
  .herr { flex: none; width: 88px; }
}
@media (max-width: 759px) { .gato { width: 96px; left: 6%; margin-left: 0; } }

/* ---------- Galpón ---------- */
.sala--galpon .sala__pared { background-color: #2C3A4A; background-image: linear-gradient(180deg, rgba(120,200,255,.12), rgba(10,16,26,.6)), repeating-linear-gradient(90deg, #3C4E62 0 16px, #2F3E50 16px 32px); }
.sala--galpon .led__puntos { background: repeating-linear-gradient(90deg, #E0FBFF 0 10px, #3FE0FF 10px 20px); box-shadow: 0 2px 8px #3FE0FF; }
.sala--galpon .luz { background: linear-gradient(180deg, rgba(120,225,255,.3), rgba(120,225,255,.06) 55%, rgba(120,225,255,0)); }
.sala--galpon .estante__tabla { background: linear-gradient(180deg, #9CA9B8, #5F6B79); }
.sala--galpon .sala__piso { background: #454B56; background-image: linear-gradient(180deg, rgba(0,0,0,.2), transparent), repeating-linear-gradient(90deg, transparent 0 200px, rgba(0,0,0,.28) 200px 203px); }

/* ---------- Invernadero ---------- */
.sala--invernadero .sala__pared { background-color: #BFE8DA; background-image: linear-gradient(90deg, rgba(255,255,255,.8) 0 7px, transparent 7px), linear-gradient(0deg, rgba(255,255,255,.8) 0 7px, transparent 7px), linear-gradient(180deg, #8FD3EE, #D3F4DC 62%, #8CCB8A); background-size: 190px 190px, 190px 190px, 100% 100%; }
.sala--invernadero .led, .sala--invernadero .goteo, .sala--invernadero .luz { display: none; }
.sala--invernadero .estante { padding-top: 8px; }
.sala--invernadero .estante__tabla { background: linear-gradient(180deg, #C69A63, #96703F); }
.sala--invernadero .sala__piso { background: #A9A08E; background-image: linear-gradient(90deg, rgba(0,0,0,.14) 2px, transparent 2px), linear-gradient(0deg, rgba(0,0,0,.14) 2px, transparent 2px); background-size: 74px 74px; }

/* ---------- Campo ---------- */
.sala--campo .sala__pared { background: #5DA34A; }
.sala--campo .led, .sala--campo .luz, .sala--campo .goteo, .sala--campo .estante__tabla { display: none; }
.sala--campo .estantes { gap: 2px; }
.sala--campo .estante { padding-top: 4px; padding-bottom: 40px; }
.sala--campo .slot__maceta { width: 100%; }
.sala--campo .sala__piso { background: #A97B4C; background-image: repeating-linear-gradient(0deg, transparent 0 20px, rgba(60,30,10,.18) 20px 23px); }

@media (max-width: 340px) { .dock__item { font-size: 11px; } .herr { font-size: 11.5px; } }

/* Pantallas bajas: el piso queda detrás de los botones, así que no se le apoya nada. */
@media (min-width: 1280px) and (max-height: 800px) {
  .d-bolsa, .d-cajon, .d-cajones, .d-banco, .d-porton { display: none; }
  .gato { left: calc(50% - 448px); margin-left: 0; top: -6px; width: 112px; }
}
@media (min-width: 1280px) and (max-width: 1500px) and (max-height: 800px) { .gato { display: none; } }

@media (max-width: 360px) { .sala__cap-u { display: none; } }
