/* Pets & Go — estilos propios (componentes y arte de las habitaciones).
   La maquetación general usa Tailwind (css/tailwind.css); aquí va lo que se repite o no cabe en utilidades. */
:root {
  --sand: #fbeedd; --cream: #fff7ec; --cocoa: #4a3426; --soft: #8a6f5c;
  --sh-d: #e3cfb7; --sh-l: #fffdf8;
}
html { -webkit-text-size-adjust: 100%; }
body { background: radial-gradient(1200px 600px at 50% -10%, #fff9f0, var(--sand)); color: var(--cocoa); overscroll-behavior-y: none; }
button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #b69cff; outline-offset: 2px; }
.abs { position: absolute; }

/* ---------- componentes neumórficos ---------- */
.neu { background: var(--cream); box-shadow: 6px 6px 14px var(--sh-d), -6px -6px 14px var(--sh-l); }
.neu-sm { background: var(--cream); box-shadow: 3px 3px 8px var(--sh-d), -3px -3px 8px var(--sh-l); }
.neu-in { background: var(--sand); box-shadow: inset 3px 3px 7px var(--sh-d), inset -3px -3px 7px var(--sh-l); }
.btn-redondo { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; font-size: 1.2rem; border: 0; color: var(--cocoa); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn-redondo:active, .btn-pop:active, .sala-btn:active, .item:active { transform: scale(.94); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.pulse { animation: pulso .5s ease; }
@keyframes pulso { 40% { transform: scale(1.12); } }
.btn-pop { display: block; width: 100%; padding: .7rem 1rem; border: 0; border-radius: 1.1rem; font-weight: 700; font-size: .95rem; color: var(--cocoa);
  background: linear-gradient(180deg, #fffaf2, #ffeccf); box-shadow: 0 4px 0 #f0d3a6, 0 8px 14px -4px rgb(74 52 38 / .25); transition: transform .12s, box-shadow .12s; }
.btn-pop:active { box-shadow: 0 1px 0 #f0d3a6; transform: translateY(3px); }
.btn-hold { padding: 1rem; font-size: 1.05rem; user-select: none; touch-action: none; }
.btn-hold.on { background: linear-gradient(180deg, #ff9a8c, #ff7a6b); color: #fff; box-shadow: 0 4px 0 #d85a4c; animation: latido .8s infinite; }
@keyframes latido { 50% { transform: scale(1.03); } }
.campo { width: 100%; padding: .6rem .8rem; border: 0; border-radius: .9rem; background: var(--sand); color: var(--cocoa); font: inherit; font-size: .95rem; box-shadow: inset 2px 2px 6px var(--sh-d), inset -2px -2px 6px var(--sh-l); }
.ayuda { font-size: .82rem; color: var(--soft); margin: .4rem .2rem; line-height: 1.35; }

/* ---------- barras de estado en cápsula ---------- */
#hud { position: absolute; top: .6rem; left: .6rem; right: .6rem; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; pointer-events: none; }
.cap { display: flex; align-items: center; gap: .3rem; padding: .22rem .5rem .22rem .22rem; border-radius: 999px;
  background: rgb(255 247 236 / .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 3px 3px 8px rgb(74 52 38 / .18), -2px -2px 6px rgb(255 255 255 / .7); }
.cap-ico { flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; font-size: .95rem; background: color-mix(in srgb, var(--c) 35%, white); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--c) 60%, transparent); }
.cap-track { flex: 1; height: .6rem; border-radius: 999px; background: #efe1cc; box-shadow: inset 1px 1px 3px #d9c6a8; overflow: hidden; }
.cap-fill { display: block; height: 100%; border-radius: 999px; width: 50%; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, white), var(--c)); transition: width .6s cubic-bezier(.3, 1.4, .5, 1); }
.cap.low { background: rgb(255 232 226 / .95); }
.cap.low .cap-ico { animation: tiembla .7s infinite; }
.cap.low .cap-fill { background: linear-gradient(90deg, #ff9a8c, #ff7a6b); }
@keyframes tiembla { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.fx-texto { position: fixed; z-index: 80; transform: translate(-50%, -50%); font-weight: 800; font-size: 1.15rem; pointer-events: none; text-shadow: 0 2px 0 #fff, 0 0 8px #fff; animation: flota 1s ease-out forwards; }
@keyframes flota { to { transform: translate(-50%, -60px); opacity: 0; } }

/* ---------- escena ---------- */
.escena { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: #f5deaa; }
#pared { position: absolute; left: 0; right: 0; top: 0; height: 66%; }
#piso { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; }
#deco, #objs { position: absolute; inset: 0; pointer-events: none; }
#deco > * { pointer-events: none; }
.obj { position: absolute; transform: translate(-50%, -50%); font-size: 3.2rem; cursor: grab; z-index: 2; touch-action: none; pointer-events: auto; filter: drop-shadow(0 6px 4px rgb(0 0 0 / .22)); transition: filter .15s; }
.obj.drag { cursor: grabbing; transform: translate(-50%, -56%) scale(1.08); filter: drop-shadow(0 14px 8px rgb(0 0 0 / .25)); }
.rug { width: 150px; height: 44px; border-radius: 50%; opacity: .92; z-index: 1; box-shadow: inset 0 0 0 4px rgb(255 255 255 / .35), 0 3px 6px rgb(0 0 0 / .2); }
#pj { position: absolute; left: 50%; bottom: 6%; width: min(230px, 58%); transform: translateX(-50%); z-index: 3; touch-action: none; }
#pjin { transform-origin: 50% 60%; transition: transform .4s; }
.pet-svg { width: 100%; display: block; overflow: visible; filter: drop-shadow(0 2px 0 rgb(0 0 0 / .04)); }
#pj.lay { bottom: 25%; }
#pj.lay #pjin { transform: rotate(-90deg); }
#bola { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; font-size: 2.4rem; line-height: 44px; text-align: center; z-index: 4; cursor: grab; touch-action: none; filter: drop-shadow(0 6px 3px rgb(0 0 0 / .25)); }
#burbuja { position: absolute; top: 3.4rem; left: 50%; transform: translate(-50%, 6px) scale(.9); background: #fff; color: var(--cocoa); z-index: 9; padding: .4rem 1rem; border-radius: 1.2rem;
  opacity: 0; transition: opacity .25s, transform .25s; white-space: nowrap; font-weight: 700; font-size: .92rem; max-width: 92%; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 14px -4px rgb(74 52 38 / .35); pointer-events: none; }
#burbuja.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
#oscuro { position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0; transition: opacity .8s; background: rgb(8 8 40 / .72); color: #fff4d6; font-size: 2rem; text-align: center; padding-top: 110px; }
#oscuro.on { opacity: 1; }
#int { display: none; position: absolute; inset: 0; z-index: 7; align-items: center; justify-content: center; flex-direction: column; background: conic-gradient(#e8f1f4 25%, #d3e3ea 0 50%, #e8f1f4 0 75%, #d3e3ea 0) 0 0/60px 60px; }
#int.on { display: flex; }
#int .ino { font-size: 8rem; line-height: 1; }
#ptiny { width: 130px; margin-bottom: -90px; position: relative; z-index: 1; }
#agua { font-size: 3rem; opacity: 0; } #agua.flush { animation: giro 1.1s; }
@keyframes giro { 0% { opacity: 1; transform: rotate(0); } 100% { opacity: 0; transform: rotate(720deg) scale(.2); } }

/* botones laterales flotantes */
.lado { position: absolute; right: .6rem; top: 4.4rem; z-index: 15; display: flex; flex-direction: column; gap: .5rem; }
.lado-btn { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 1rem; border: 0; font-size: 1.35rem; text-decoration: none; color: var(--cocoa);
  background: rgb(255 247 236 / .92); box-shadow: 3px 3px 8px rgb(74 52 38 / .22), -2px -2px 6px rgb(255 255 255 / .7); transition: transform .15s; }
.lado-btn:hover { transform: translateY(-2px); } .lado-btn.act { background: #ffe1a8; box-shadow: inset 2px 2px 6px #e8c680; }

/* ---------- arte de las habitaciones ---------- */
.friso { position: absolute; left: 0; right: 0; top: 46%; height: 20%; background: rgb(0 0 0 / .06); border-top: 3px solid rgb(255 255 255 / .55); }
.zocalo { position: absolute; left: 0; right: 0; top: 64%; height: 2.4%; background: rgb(255 255 255 / .7); box-shadow: 0 2px 4px rgb(0 0 0 / .15); }
.sombra-piso { position: absolute; left: 0; right: 0; top: 66.5%; bottom: 0; background: linear-gradient(rgb(0 0 0 / .22), rgb(0 0 0 / 0) 45%, rgb(255 255 255 / .12)); }
.ventana-w { position: absolute; aspect-ratio: 1 / 1.1; border: 6px solid #fff8ea; border-radius: 10px; box-shadow: 0 6px 12px rgb(0 0 0 / .18), inset 0 0 0 2px #e9dcc0; overflow: visible; }
.cielo { position: absolute; inset: 0; overflow: hidden; border-radius: 4px; }
.nube { position: absolute; left: -20%; font-size: 1.6rem; animation: nube 26s linear infinite; opacity: .95; }
@keyframes nube { to { left: 110%; } }
.sol { position: absolute; right: 8%; top: 8%; font-size: 1.5rem; }
.luna { position: absolute; right: 14%; top: 12%; font-size: 1.6rem; }
.estrella { position: absolute; color: #fff3b0; font-size: .8rem; animation: brilla 2.4s infinite; }
@keyframes brilla { 50% { opacity: .25; transform: scale(.7); } }
.cruz { position: absolute; inset: 0; background: linear-gradient(#fff8ea, #fff8ea) center/6px 100% no-repeat, linear-gradient(#fff8ea, #fff8ea) center/100% 6px no-repeat; }
.cortina { position: absolute; top: -8px; bottom: 6px; width: 24%; background: repeating-linear-gradient(90deg, #ff9fc0 0 6px, #ff86ae 6px 12px); box-shadow: 0 4px 8px rgb(0 0 0 / .15); }
.cortina.i { left: -8px; border-radius: 0 0 40% 4px; } .cortina.d { right: -8px; border-radius: 0 0 4px 40%; }
.alfeizar { position: absolute; left: -12px; right: -12px; bottom: -12px; height: 8px; border-radius: 4px; background: #fff8ea; box-shadow: 0 4px 6px rgb(0 0 0 / .18); }
.resplandor { position: absolute; left: 50%; top: 4%; width: 180%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgb(255 226 140 / .5), rgb(255 226 140 / 0) 65%); pointer-events: none; animation: luz 4s ease-in-out infinite; }
@keyframes luz { 50% { opacity: .7; } }
.lampara svg { width: 100%; display: block; position: relative; filter: drop-shadow(0 6px 4px rgb(0 0 0 / .2)); }
.alfombra { border-radius: 50%; background: radial-gradient(ellipse, #ff9fc0 0 20%, #ffd6e4 20% 32%, #ff9fc0 32% 46%, #ffd6e4 46% 58%, #ff9fc0 58%); opacity: .85; box-shadow: 0 4px 8px rgb(0 0 0 / .18); transform: translateX(-50%); }
.reloj-p { font-size: 2.2rem; transform: translateX(-50%); filter: drop-shadow(0 3px 2px rgb(0 0 0 / .2)); }
.colgante { position: absolute; top: 0; width: 0; } .colgante i { position: absolute; left: -1px; top: 0; width: 2px; height: 3.6rem; background: #8a6f5c; }
.colgante::after { content: ""; position: absolute; left: -26px; top: 3.4rem; width: 52px; height: 24px; border-radius: 26px 26px 6px 6px; background: #ffb48a; box-shadow: 0 4px 6px rgb(0 0 0 / .2); }
.colgante .resplandor { top: 3.4rem; width: 380px; left: 0; }
.mesa { position: absolute; bottom: 3%; left: 8%; width: 84%; height: 74px; background: linear-gradient(#a9743a 0 12px, #8b5a2b 12px); border-radius: 12px; z-index: 4; box-shadow: 0 8px 14px rgb(0 0 0 / .25); }
.mesa .mantel { position: absolute; left: 6%; right: 6%; top: 0; height: 12px; background: repeating-linear-gradient(90deg, #ff9fc0 0 14px, #fff 14px 28px); border-radius: 6px; opacity: .9; }
.mesa .frutero { position: absolute; right: 6%; top: -26px; font-size: 1.7rem; }
.plato { position: absolute; transform: translate(-50%, -50%); font-size: 2.6rem; z-index: 6; cursor: grab; touch-action: none; filter: drop-shadow(0 5px 3px rgb(0 0 0 / .3)); transition: transform .15s; }
.plato:active { transform: translate(-50%, -56%) scale(1.1); }
.plato b { position: absolute; right: -6px; bottom: -4px; font-size: .7rem; background: var(--cocoa); color: #fff4d6; border-radius: 8px; padding: 0 5px; }
.cama { position: absolute; bottom: 6%; left: 50%; width: 310px; max-width: 92%; height: 84px; transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 8px 6px rgb(0 0 0 / .25)); }
.cama svg { width: 100%; height: 100%; display: block; }
.deco-luna { right: 10%; top: 26%; font-size: 1.6rem; opacity: .0; }
.estrellas-p { left: 6%; top: 8%; width: 40%; height: 30%; color: #fff3b0; }
.estrellas-p span { position: absolute; animation: brilla 3s infinite; }
.velador { width: 18%; font-size: 2.2rem; }
.velador span { position: relative; filter: drop-shadow(0 4px 3px rgb(0 0 0 / .25)); }
.velador .resplandor { top: -60%; width: 260%; }
.parlante { bottom: 22%; width: 17%; filter: drop-shadow(0 6px 4px rgb(0 0 0 / .3)); }
.parlante.i { left: 5%; } .parlante.d { right: 5%; }
.cono { transform-box: fill-box; transform-origin: center; }
.hablando .cono { animation: bombo .22s infinite; }
@keyframes bombo { 50% { transform: scale(1.14); } }
.cartel-neon { left: 50%; top: 22%; transform: translateX(-50%); white-space: nowrap; font-weight: 800; font-size: 1.05rem; color: #fff; letter-spacing: .08em; padding: .3rem 1rem; border-radius: 999px; border: 2px solid #ff9fc0; text-shadow: 0 0 6px #ff9fc0, 0 0 14px #ff6fa8; box-shadow: 0 0 10px #ff9fc0, inset 0 0 10px #ff9fc0; }
.disco { left: 0; right: 0; top: 0; height: 66%; overflow: hidden; mix-blend-mode: screen; }
.disco i { position: absolute; top: -10%; width: 40%; height: 120%; transform-origin: 50% 0; background: linear-gradient(rgb(255 255 255 / .3), transparent 70%); animation: barrer 5s ease-in-out infinite; clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); }
.disco i:nth-child(1) { left: 5%; background: linear-gradient(rgb(255 120 200 / .55), transparent 70%); }
.disco i:nth-child(2) { left: 30%; background: linear-gradient(rgb(120 200 255 / .55), transparent 70%); animation-delay: -1.7s; }
.disco i:nth-child(3) { left: 55%; background: linear-gradient(rgb(255 230 120 / .55), transparent 70%); animation-delay: -3.2s; }
@keyframes barrer { 0%, 100% { transform: rotate(-22deg); } 50% { transform: rotate(22deg); } }
#ondas { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-size: 2rem; opacity: 0; letter-spacing: 6px; color: #fff; text-shadow: 0 0 10px #ff9fc0; }
.hablando #ondas { opacity: 1; animation: latido .4s infinite; }
.puerta { position: absolute; left: 6%; bottom: 20%; width: 24%; max-width: 96px; aspect-ratio: 96 / 180; background: #1a0f08; border: 7px solid #8a5f36; border-radius: 6px 6px 0 0; perspective: 500px; z-index: 2; }
#hoja { position: absolute; inset: 0; background: linear-gradient(90deg, #b57a45, #a06a3a); transform-origin: left center; transform: rotateY(-78deg); transition: transform .7s; }
#hoja::after { content: ""; position: absolute; right: 10%; top: 52%; width: 9px; height: 9px; border-radius: 50%; background: #ffd86b; }
#hoja.cerrada { transform: rotateY(0); }
.espejo i { display: block; aspect-ratio: 1 / 1.25; border-radius: 50%; border: 6px solid #fff8ea; background: linear-gradient(135deg, #e6f6ff, #b9e2f6); box-shadow: 0 6px 10px rgb(0 0 0 / .2); }
.toalla { font-size: 1.8rem; }
.lavabo-svg { filter: drop-shadow(0 6px 4px rgb(0 0 0 / .2)); }

/* ---------- navegación inferior ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0 auto; max-width: 28rem; padding: .6rem .8rem calc(.7rem + env(safe-area-inset-bottom)); border-radius: 1.8rem 1.8rem 0 0;
  background: rgb(255 247 236 / .96); backdrop-filter: blur(10px); box-shadow: 0 -8px 24px -8px rgb(74 52 38 / .3); }
#salas { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.sala-btn { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem .1rem; border: 0; background: transparent; font-size: .68rem; font-weight: 700; color: var(--soft); border-radius: 1rem; transition: transform .15s, color .15s; }
.sala-ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; font-size: 1.3rem; background: var(--cream); box-shadow: 3px 3px 7px var(--sh-d), -3px -3px 7px var(--sh-l); transition: all .2s; }
.sala-btn.act { color: var(--cocoa); }
.sala-btn.act .sala-ico { background: linear-gradient(145deg, #ffe39a, #ffc860); box-shadow: inset 2px 2px 5px #e6a93a, 0 4px 10px -2px #f0b44a; transform: translateY(-4px) scale(1.06); }
#acciones:not(:empty) { margin-bottom: .6rem; }

/* ---------- hoja inferior (tienda / moda / casa) ---------- */
#panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0 auto; max-width: 28rem; height: 62dvh; display: flex; flex-direction: column; border-radius: 1.8rem 1.8rem 0 0;
  background: var(--cream); box-shadow: 0 -12px 30px -8px rgb(74 52 38 / .45); transform: translateY(105%); transition: transform .38s cubic-bezier(.2, 1, .3, 1); }
#panel.abierto { transform: translateY(0); }
.sheet-grip { width: 3rem; height: .3rem; border-radius: 9px; background: #e0cfb6; margin: .55rem auto .2rem; }
.sheet-body { flex: 1; overflow-y: auto; padding: .3rem 1rem 1.2rem; overscroll-behavior: contain; }
.sheet-t { padding-right: 2.6rem; display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; font-weight: 800; margin: .3rem 0 .4rem; }
.sheet-h { font-size: .95rem; font-weight: 700; margin: .9rem 0 .4rem; color: var(--soft); }
.chip-mon { font-size: .9rem; padding: .2rem .7rem; border-radius: 999px; background: #fff0c4; box-shadow: inset 1px 1px 3px #e8cf8a; }
.sheet-x { position: absolute; right: .8rem; top: .6rem; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: var(--cream); box-shadow: var(--shadow-neu-sm, 3px 3px 8px #e3cfb7, -3px -3px 8px #fffdf8); color: var(--soft); font-size: 1rem; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); gap: .6rem; }
.item { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .6rem .3rem; border: 0; border-radius: 1.1rem; color: var(--cocoa); background: var(--cream); box-shadow: 3px 3px 8px var(--sh-d), -3px -3px 8px var(--sh-l); transition: transform .15s, box-shadow .15s; }
.item:hover { transform: translateY(-2px); }
.item-ico { font-size: 1.9rem; line-height: 1.2; display: grid; place-items: center; }
.item-n { font-size: .72rem; font-weight: 700; line-height: 1.1; text-align: center; }
.item-p { font-size: .68rem; font-weight: 600; color: var(--soft); }
.item.caro { opacity: .55; }
.item.puesto { background: #e8f7ef; box-shadow: inset 2px 2px 6px #bfe3cf, inset -2px -2px 6px #fff; }
.sacudir { animation: sacude .4s; } @keyframes sacude { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.mini-rug { display: inline-block; width: 2.3rem; height: .9rem; border-radius: 50%; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .4); }

@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
