/* Capas de recuerdo (memorial-ui.js: galería y placa) y la llegada (arrival.js). Se carga después de space.css. */
.memo { position: fixed; inset: 0; z-index: 60; color: var(--ink); opacity: 0; transition: opacity .38s ease; overflow: hidden; }
.memo.open { opacity: 1; }
.memo[hidden], #cine[hidden] { display: none !important; } /* cerrada: fuera del todo (si no, invisible tapaba la barra y la escena) */
.memo .x { position: absolute; top: calc(12px + var(--safe-t)); right: 14px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff30; background: #0006; color: #fff; font-size: 18px; cursor: pointer; backdrop-filter: blur(8px); }
.memo .motes { position: absolute; inset: 0; pointer-events: none; }
.memo .motes i { position: absolute; bottom: -10px; width: calc(6px * var(--s)); height: calc(6px * var(--s)); border-radius: 50%; background: radial-gradient(#ffe9b8, #ffd27a00 70%); animation: memoMote linear infinite; opacity: .8; }
@keyframes memoMote { from { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } to { transform: translateY(-105vh) translateX(30px); opacity: 0; } }

/* ---------- HUD generado (scripts/make-ui.mjs): íconos, títulos, paneles y botones son imágenes de la API ---------- */
.ico { display: block; width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 3px #0006); pointer-events: none; }
#dock button .ico { width: 36px; height: 36px; }
#ring button .ico { width: 38px; height: 38px; }
#editbar button .ico { width: 28px; height: 28px; }
.sheet .row .ico, .memLinks .ico, #install .ico, #memAdd .ico, #plaqueSave .ico, #callAll .ico { display: inline-block; width: 22px; height: 22px; vertical-align: -5px; margin-right: 4px; }
.x .ico, .x img { width: 30px; height: 30px; object-fit: contain; display: block; }
h2.ttl { margin: 2px 0 4px; line-height: 0; }
h2.ttl.ttlText { line-height: 1.2; font: 600 24px Georgia, serif; color: #ffe2a6; text-shadow: 0 2px 8px #000a; margin: 6px 0; }
h2.ttl img { height: 50px; width: auto; filter: drop-shadow(0 3px 6px #0007); }
.coin { width: 20px; height: 20px; vertical-align: -4px; margin-right: 3px; }
/* paneles: marco de madera tallada y terciopelo, por 9 partes: las esquinas intactas y los bordes y el centro en mosaico
   (panel_tile.webp, hecho cíclico por scripts/make-slices.mjs): nada se estira */
.sheet, #statusCard, #tray {
  background: none !important; backdrop-filter: none !important; box-shadow: 0 14px 34px #0009;
  border-style: solid !important; border-color: transparent !important; border-width: 18px !important; border-image: url(/assets/opt/ui/panel_tile.webp) 100 200 fill / 30px 60px round !important;
}
.sheet { padding: 0 6px 6px !important; border-radius: 0 !important; }
.sheet::before { display: none !important; }
#statusCard { padding: 0 2px !important; }
#tray { padding: 0 !important; border-width: 14px !important; border-image-width: 23px 47px !important; }
#dock { background: url(/assets/opt/ui/bar.webp) center / 100% 100% no-repeat !important; backdrop-filter: none !important; border: 0 !important; box-shadow: none !important; padding: 12px 22px !important; }
#dock button, #tray button { color: #f6ecd8; text-shadow: 0 1px 2px #000a; }
#dock button.on, #dock button:active, #tray button:active { background: #ffffff18; }
#dock button.armed { background: #ffcf6e33; }
/* botones: pastilla de miel (principal) y de cristal lavanda (secundario) */
.sheet .primary, #welcome .go { background: url(/assets/opt/ui/button.webp) center / 100% 100% no-repeat !important; color: #3a230c !important; border: 0 !important; box-shadow: none !important; text-shadow: 0 1px 0 #fff6; }
.sheet .ghost, .memLinks button { background: url(/assets/opt/ui/button2.webp) center / 100% 100% no-repeat !important; border: 0 !important; color: #fff; }
.sheet .x, .memo .x { background: none !important; border: 0 !important; backdrop-filter: none !important; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; }
/* arriba a la derecha: lugares y el engranaje de Ajustes */
.topRight { display: flex; gap: 6px; align-items: flex-start; }
#settingsBtn { width: 50px; height: 50px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
#settingsBtn .ico { width: 42px; height: 42px; }
#tabs a { position: relative; display: flex; align-items: center; gap: 5px; }
#tabs a .ico { width: 24px; height: 24px; flex: none; }
#tabs a.locked::after { content: ''; position: absolute; left: 4px; bottom: 2px; width: 14px; height: 14px; background: url(/assets/opt/ui/lock.webp) center / contain no-repeat; }
/* celular: los lugares solo con su ícono; la tarjeta de estado nunca más angosta que lo que lleva */
@media (max-width: 520px) {
  .topRight { gap: 4px; flex: none; }
  #tabs { padding: 6px 6px !important; gap: 0 !important; }
  #tabs a { padding: 5px 5px !important; }
  #tabs a span { display: none; }
  #tabs a .ico { width: 27px; height: 27px; }
  #statusCard { min-width: 170px !important; border-width: 14px !important; border-image-width: 23px 47px !important; }
  #status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #settingsBtn { width: 44px; height: 44px; } #settingsBtn .ico { width: 38px; height: 38px; }
}
.spaces a.locked span::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; background: url(/assets/opt/ui/lock.webp) center / contain no-repeat; }
/* tarjeta de estado: carita de ánimo e íconos de cada necesidad */
.who .mood { width: 26px; height: 26px; vertical-align: -7px; margin-right: 5px; }
.meters span { display: flex; align-items: center; gap: 3px; }
.meters .mi { width: 15px; height: 15px; flex: none; }
.meters span > i { flex: 1 1 auto; min-width: 26px; }
/* pestañas de lugares y avisos, con las mismas piezas */
#tabs { background: url(/assets/opt/ui/bar.webp) center / 100% 100% no-repeat !important; backdrop-filter: none !important; border: 0 !important; box-shadow: none !important; padding: 7px 10px !important; }
#tabs a { color: #f6ecd8; text-shadow: 0 1px 2px #000a; }
#tabs a.on { background: url(/assets/opt/ui/button.webp) center / 100% 100% no-repeat !important; color: #3a230c !important; text-shadow: none; }
#toast { background: none !important; backdrop-filter: none !important; border-style: solid !important; border-color: transparent !important; border-width: 16px !important; border-image: url(/assets/opt/ui/panel_tile.webp) 100 200 fill / 27px 53px round !important; border-radius: 0 !important; padding: 2px 6px !important; }
#camBack { background: url(/assets/opt/ui/button2.webp) center / 100% 100% no-repeat !important; border: 0 !important; backdrop-filter: none !important; box-shadow: none !important; padding: 12px 22px !important; }
/* casillas: la palomita generada (apagada = la misma, en gris y tenue) */
.switch input { appearance: none; -webkit-appearance: none; width: 30px !important; height: 30px !important; margin: 0; flex: none; background: url(/assets/opt/ui/done.webp) center / contain no-repeat; filter: grayscale(1) brightness(.7); opacity: .45; cursor: pointer; transition: opacity .2s, filter .2s, transform .2s; }
.switch input:checked { filter: none; opacity: 1; transform: scale(1.06); }
#camBack img { width: 22px; height: 22px; vertical-align: -6px; margin-right: 4px; }
/* ajustes */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button { padding: 10px 4px; border-radius: 12px; background: url(/assets/opt/ui/button2.webp) center / 100% 100% no-repeat; color: #fff; font-size: 13px; opacity: .7; }
.seg button.on { background-image: url(/assets/opt/ui/button.webp); color: #3a230c; opacity: 1; font-weight: 700; }
/* galería, placa y llegada */
#gallery .nav img { width: 34px; height: 34px; object-fit: contain; }
#gallery .nav.prev img { transform: scaleX(-1); }
#gallery .nav { background: none; border: 0; backdrop-filter: none; width: 52px; height: 52px; }
#gallery .g-act button { display: inline-flex; align-items: center; gap: 6px; background: url(/assets/opt/ui/button2.webp) center / 100% 100% no-repeat; border: 0; backdrop-filter: none; padding: 12px 20px; }
#gallery .g-act .add { background-image: url(/assets/opt/ui/button.webp); }
#gallery .g-act img { width: 22px; height: 22px; object-fit: contain; }
#cine .skip { display: inline-flex; align-items: center; gap: 4px; }
#cine .skip img { width: 18px; height: 18px; object-fit: contain; }

/* ---------- SIN ESTIRAR (regla del dueño): botones y barras ----------
   Las puntas (scripts/make-slices.mjs: <pieza>_l / _r) se dibujan a su proporción, a todo el alto, sobre el borde
   transparente (que mide justo una punta); el medio (_m) se repite en mosaico entre las dos. Por eso cada pieza tiene un
   alto fijo (--h): el ancho de la punta sale de ahí (--k = ancho de la punta / alto de la imagen). */
.sheet .primary, #welcome .go, .sheet .ghost, .memLinks button, #camBack, .seg button, #gallery .g-act button, #tour .acts button, #dock, #tabs {
  --cap: calc(var(--h) * var(--k));
  box-sizing: border-box; height: var(--h) !important; min-height: 0 !important;
  border-style: solid !important; border-color: transparent !important; border-width: 0 var(--cap) !important; border-radius: 0 !important;
  background-color: transparent !important;
  background-image: var(--l), var(--r), var(--m) !important;
  background-size: auto 100%, auto 100%, auto 100% !important;
  background-position: left center, right center, left center !important;
  background-repeat: no-repeat, no-repeat, round no-repeat !important;
  background-origin: border-box, border-box, padding-box !important;
  background-clip: border-box, border-box, padding-box !important;
}
/* pieles: miel (principal), cristal lavanda (secundario) y la barra de madera */
.sheet .primary, #welcome .go, .seg button.on, #gallery .g-act .add, #tour .acts .next, #tabs a.on {
  --k: 0.507; --l: url(/assets/opt/ui/button_l.webp); --r: url(/assets/opt/ui/button_r.webp); --m: url(/assets/opt/ui/button_m.webp);
}
.sheet .ghost, .memLinks button, #camBack, .seg button:not(.on), #gallery .g-act button:not(.add), #tour .acts button:not(.next) {
  --k: 0.497; --l: url(/assets/opt/ui/button2_l.webp); --r: url(/assets/opt/ui/button2_r.webp); --m: url(/assets/opt/ui/button2_m.webp);
}
#dock, #tabs { --k: 0.467; --l: url(/assets/opt/ui/bar_l.webp); --r: url(/assets/opt/ui/bar_r.webp); --m: url(/assets/opt/ui/bar_m.webp); }
/* altos (los de siempre) y el aire para el texto, que ya no lleva el ancho de la punta */
.sheet .primary, #welcome .go, .sheet .ghost, .memLinks button, #camBack, #tour .acts button { --h: 46px; padding-inline: 4px !important; }
#gallery .g-act button { --h: 44px; padding-inline: 4px !important; }
.seg button { --h: 38px; padding-inline: 0 !important; white-space: nowrap; }
#dock { --h: 92px; padding-inline: 0 !important; }
#tabs { --h: 51px; padding-inline: 0 !important; }
/* lo de adentro de cada punta de la barra es terciopelo (el marco es solo el borde): el primer y el último botón pueden
   entrar un poco en ella, sin tocar la madera */
#dock > :first-child, #tabs > :first-child { margin-inline-start: calc(var(--cap) * -0.45) !important; }
#dock > :last-child, #tabs > :last-child { margin-inline-end: calc(var(--cap) * -0.45) !important; }
/* la pestaña del lugar actual: en el celular es un círculo (las dos puntas juntas); con texto, pastilla con su medio */
#tabs a.on {
  background-color: transparent !important;
  background-image: var(--l), var(--r) !important; background-size: auto 100%, auto 100% !important;
  background-position: left center, right center !important; background-repeat: no-repeat !important;
}
@media (min-width: 521px) {
  #tabs a { --h: 37px; --k: 0.507; height: var(--h); box-sizing: border-box; border: 0 solid transparent !important; border-width: 0 calc(var(--h) * var(--k)) !important; padding-inline: 2px !important; }
  #tabs a.on {
    background-image: var(--l), var(--r), var(--m) !important; background-size: auto 100%, auto 100%, auto 100% !important;
    background-position: left center, right center, left center !important; background-repeat: no-repeat, no-repeat, round no-repeat !important;
    background-origin: border-box, border-box, padding-box !important; background-clip: border-box, border-box, padding-box !important;
  }
}
@media (max-width: 520px) {
  #tabs { --h: 46px; }
  #tabs a { width: 34px; height: 34px; box-sizing: border-box; justify-content: center; padding: 3px !important; }
  #tabs a .ico { width: 26px; height: 26px; }
  #tabs > :first-child { margin-inline-start: calc(var(--cap) * -0.6) !important; }
  #tabs > :last-child { margin-inline-end: calc(var(--cap) * -0.6) !important; }
}

/* ---------- es un juego: nada de seleccionar texto, arrastrar imágenes ni el menú de mantener pulsado ---------- */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
img, svg { -webkit-user-drag: none; user-drag: none; }
button, a, [role="menu"] { touch-action: manipulation; } /* sin zoom por doble toque en los botones */
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* lugares sin desbloquear: candado (tocar abre la tienda en "Lugares") */
[data-space].locked { opacity: .62; }

/* ---------- barra de abajo: bandejita de Jugar / Decorar (main.js openTray) ---------- */
#tray { position: fixed; z-index: 13; display: flex; gap: 2px; padding: 6px; border-radius: 20px; animation: trayIn .16s ease-out; }
#tray[hidden] { display: none; }
#tray button { display: grid; justify-items: center; gap: 2px; min-width: 70px; padding: 8px 8px 6px; border-radius: 16px; font-size: 11.5px; color: var(--muted); }
#tray button svg { width: 24px; height: 24px; color: var(--ink); }
#tray button:active { background: #ffffff1c; color: var(--ink); }
@keyframes trayIn { from { transform: translateY(8px); opacity: 0; } }
#dock button[data-tray].on { background: #ffffff1c; color: var(--ink); }
.memLinks { display: flex; gap: 8px; margin: 4px 0 10px; }
.memLinks button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.memLinks svg { width: 18px; height: 18px; }

/* ---------- galería ---------- */
#gallery { background: #0b0a12; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; }
#gallery .g-bg { position: absolute; inset: -60px; z-index: 0; }
#gallery .g-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(46px) brightness(.42) saturate(1.2); }
#gallery::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 35%, #000a 100%); pointer-events: none; z-index: 1; }
#gallery > *:not(.g-bg) { position: relative; z-index: 2; }
#gallery > .x { position: absolute; z-index: 5; }
#gallery > .motes { position: absolute; z-index: 1; }
#gallery .g-top { display: flex; justify-content: center; text-align: center; padding: calc(16px + var(--safe-t)) 64px 6px; transition: opacity .4s; }
#gallery .g-top .x { position: absolute; }
#gallery h2 { margin: 0; font: 600 clamp(24px, 4vw, 34px)/1.1 Georgia, 'Times New Roman', serif; letter-spacing: .02em; text-shadow: 0 2px 18px #0008; }
#gallery .g-years { margin: 4px 0 0; color: #f3dfb6; font: italic 15px Georgia, serif; opacity: .9; }
#gallery .g-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 8px; gap: 6px; touch-action: pan-y; }
#gallery figure { position: relative; margin: 0; width: min(92vw, 980px); height: 100%; cursor: zoom-in; }
#gallery figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.1s ease; filter: drop-shadow(0 18px 40px #000c); }
#gallery figure img.on { opacity: 1; }
#gallery figure img.kb { animation: kenBurns 9s ease-out forwards; }
@keyframes kenBurns { from { transform: scale(1) translateX(calc(var(--dir, 1) * 10px)); } to { transform: scale(1.055) translateX(0); } }
#gallery .nav { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid #ffffff2a; background: #0005; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); transition: opacity .4s; }
#gallery .g-cap { text-align: center; margin: 4px 0 6px; color: var(--muted); font-size: 13px; transition: opacity .4s; }
#gallery .g-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; justify-content: safe center; transition: opacity .4s; }
#gallery .g-thumbs::-webkit-scrollbar { display: none; }
#gallery .g-thumbs button { flex: none; width: 58px; height: 58px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #0004; opacity: .55; cursor: pointer; transition: opacity .25s, border-color .25s, transform .25s; }
#gallery .g-thumbs button.on { opacity: 1; border-color: #f3d39a; transform: translateY(-2px); }
#gallery .g-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
#gallery .g-act { display: flex; justify-content: center; gap: 10px; padding: 4px 16px calc(16px + var(--safe-b)); transition: opacity .4s; }
#gallery .g-act button { border: 1px solid #ffffff30; background: #ffffff14; color: #fff; border-radius: 999px; padding: 10px 18px; font: 600 14px system-ui, sans-serif; cursor: pointer; backdrop-filter: blur(8px); }
#gallery .g-act .add { background: #e9a35a; color: #20170d; border-color: transparent; }
#gallery.bare .g-top, #gallery.bare .g-cap, #gallery.bare .g-thumbs, #gallery.bare .g-act, #gallery.bare .nav, #gallery.playing .nav { opacity: 0; pointer-events: none; }
#gallery.bare figure { cursor: zoom-out; }
@media (max-width: 640px) { #gallery .nav { display: none; } }

/* ---------- la placa de cerca ---------- */
#plaqueView { background: radial-gradient(ellipse at 50% 30%, #3b2f5c 0%, #1b1730 55%, #0d0b18 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: calc(64px + var(--safe-t)) 16px calc(16px + var(--safe-b)); overflow-y: auto; }
.pv-scene { position: relative; width: min(84vw, 430px); padding-bottom: 18px; flex: none; }
.pv-stone { position: relative; border-radius: 22px 22px 10px 10px; padding: 26px 22px 30px; background: linear-gradient(180deg, #ffffff10, #00000040), url(/assets/opt/textures/gen_flagstone/diff_512.webp) center/220px; box-shadow: inset 0 2px 0 #ffffff40, inset 0 -6px 14px #0006, 0 26px 50px #000a; }
.pv-plate { position: relative; text-align: center; padding: 20px 18px 22px; border-radius: 8px; color: #4a3416; background: linear-gradient(135deg, #b48a45 0%, #ecd496 28%, #c9a25a 52%, #f2dca2 74%, #a8823e 100%); box-shadow: inset 0 0 0 5px #8a6428, inset 0 0 0 7px #e9cf8f, inset 0 3px 10px #fff6, 0 6px 14px #0007; }
.pv-plate h2, .pv-plate p { text-shadow: 0 1px 0 #fff3cf99, 0 -1px 0 #0000004d; }
.pv-paw { width: 30px; height: 30px; fill: #6a4a1e; opacity: .75; }
.pv-name { margin: 4px 0 0; font: 600 clamp(30px, 8vw, 42px)/1.05 Georgia, serif; letter-spacing: .02em; }
.pv-years { margin: 6px 0 0; font: 20px Georgia, serif; }
.pv-years:empty { display: none; }
.pv-text { margin: 12px 4px 0; font: italic 18px/1.35 Georgia, serif; }
.pv-candle { position: absolute; right: 8px; top: -50px; width: 20px; height: 54px; border-radius: 4px 4px 3px 3px; background: linear-gradient(90deg, #e6d5b2, #fff4dc 45%, #d9c49b); box-shadow: 0 6px 12px #0006; }
.pv-candle .flame { position: absolute; left: 50%; top: -21px; width: 10px; height: 20px; margin-left: -5px; border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%; background: radial-gradient(ellipse at 50% 70%, #fff 0 20%, #ffd16b 45%, #ff8a2a 75%, #ff8a2a00 100%); animation: flick 1.6s infinite ease-in-out; transform-origin: 50% 100%; }
.pv-candle .glow { position: absolute; left: 50%; top: -62px; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%; background: radial-gradient(#ffc76a55, #ffc76a00 65%); animation: flick 2.3s infinite ease-in-out; pointer-events: none; }
@keyframes flick { 0%,100% { transform: scale(1, 1) rotate(-1deg); opacity: 1; } 30% { transform: scale(.94, 1.08) rotate(2deg); } 60% { transform: scale(1.04, .95) rotate(-2deg); opacity: .9; } }
.pv-bed { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; }
.pv-bed img { position: absolute; bottom: calc(-6px + var(--y)); left: calc(50% + var(--x) - 48px); width: 96px; height: 96px; object-fit: contain; transform: rotate(var(--r)); transform-origin: 50% 100%; filter: drop-shadow(0 6px 6px #0008); }
.pv-bed img.new { animation: laid .7s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes laid { from { transform: translateY(-40px) rotate(calc(var(--r) - 20deg)) scale(.6); opacity: 0; } to { transform: rotate(var(--r)); opacity: 1; } }
.pv-fly { position: fixed; z-index: 70; object-fit: contain; pointer-events: none; transition: all .7s cubic-bezier(.5,0,.3,1); filter: drop-shadow(0 8px 10px #0009); }
.pv-count { margin: 6px 0 0; color: #e8dcff; font-size: 14px; text-align: center; }
.pv-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: min(94vw, 520px); }
.pv-pick button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 14px; border: 1px solid #ffffff22; background: #ffffff10; color: #fff; font: 600 11px system-ui, sans-serif; cursor: pointer; transition: transform .2s, background .2s; }
.pv-pick button:hover { background: #ffffff22; transform: translateY(-2px); }
.pv-pick button:disabled { opacity: .5; }
.pv-pick img { width: 44px; height: 44px; object-fit: contain; }
.pv-edit { margin-top: 4px; border: 0; background: none; color: #cbbcf2; text-decoration: underline; font-size: 13px; cursor: pointer; }
@media (max-width: 420px) { .pv-pick { grid-template-columns: repeat(3, 1fr); } }

/* ---------- la llegada ---------- */
#cine { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
#cine .bar { position: absolute; left: 0; right: 0; height: var(--cineBar, 11vh); background: #000; transition: transform 1.1s cubic-bezier(.6,0,.2,1); }
#cine .bar.top { top: 0; transform: translateY(-100%); }
#cine .bar.bot { bottom: 0; transform: translateY(100%); }
#cine.on .bar { transform: none; }
#cine .line { position: absolute; left: 50%; bottom: calc(var(--cineBar, 11vh) + 22px); width: min(90vw, 760px); transform: translate(-50%, 8px); margin: 0; text-align: center; color: #fff6e6; font: italic clamp(17px, 2.6vw, 25px)/1.4 Georgia, 'Times New Roman', serif; text-shadow: 0 2px 12px #000, 0 0 2px #000; opacity: 0; transition: opacity .9s ease, transform .9s ease; }
#cine .line.on { opacity: 1; transform: translate(-50%, 0); }
#cine .line.big { font: 600 clamp(22px, 3.6vw, 36px)/1.3 Georgia, serif; color: #ffe2a6; }
#cine .veil { position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
#cine .veil.on { opacity: 1; transition-duration: .45s; }
#cine .veil.instant { transition: none; }
#cine .skip { position: absolute; right: 16px; bottom: calc(var(--cineBar, 11vh) - 42px); pointer-events: auto; border: 1px solid #ffffff40; background: #0008; color: #fff; border-radius: 999px; padding: 7px 16px; font: 600 13px system-ui, sans-serif; cursor: pointer; opacity: .75; }
body.cine #toast { display: none !important; }
/* el aviso y "Volver a…" los acomoda main.js (layoutFloaters) en el espacio libre; se mueven con suavidad */
#toast { transition: top .25s ease; }
#camBack { transition: bottom .25s ease; }
#top { transition: opacity .3s ease; }
body.topYield #top { opacity: 0; pointer-events: none; } /* con una hoja abierta, la tarjeta de arriba le deja el sitio al aviso */
body.cine .hud, body.cine #tags, body.cine #ring, body.cine #camBack { opacity: 0 !important; pointer-events: none !important; transition: opacity .6s; }
#welcome { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #2e2552e6, #0b0916f2); animation: wFadeIn .6s ease both; padding: 16px; }
#welcome.out { animation: wFadeOut .5s ease both; }
@keyframes wFadeIn { from { opacity: 0; } }
@keyframes wFadeOut { to { opacity: 0; } }
#welcome .box { width: min(92vw, 400px); text-align: center; color: #fff; }
#welcome .kicker { margin: 0; color: #cbbcf2; font: italic 16px Georgia, serif; }
#welcome h2 { margin: 4px 0 22px; font: 600 44px/1.1 Georgia, serif; color: #ffe2a6; text-shadow: 0 0 30px #ffcf6e66; }
#welcome label { display: block; text-align: left; font-size: 14px; color: #e8dcff; }
#welcome input { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; padding: 13px 14px; border-radius: 12px; border: 1px solid #ffffff33; background: #ffffff12; color: #fff; font-size: 16px; }
#welcome .go { width: 100%; margin-top: 16px; padding: 14px; border: 0; border-radius: 999px; background: linear-gradient(90deg, #ffb46a, #ffd98a); color: #2a1a08; font: 700 16px system-ui, sans-serif; cursor: pointer; box-shadow: 0 8px 30px #ffb46a55; }
#welcome .later { margin-top: 10px; border: 0; background: none; color: #a99cd0; font-size: 13px; cursor: pointer; }

/* ---------- recorrido guiado (tutorial.js): Lucero explica cada parte ---------- */
#tour { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
#tour[hidden] { display: none !important; }
#tour.on { opacity: 1; }
#tour .spot { position: fixed; pointer-events: none; outline: 200vmax solid #0b0a1a8c; box-shadow: 0 0 24px 6px #ffd98a88 inset, 0 0 18px 2px #ffd98a66; border: 2px solid #ffd98acc;
  transition: left .45s cubic-bezier(.3,.8,.3,1), top .45s cubic-bezier(.3,.8,.3,1), width .45s cubic-bezier(.3,.8,.3,1), height .45s cubic-bezier(.3,.8,.3,1), border-radius .45s; }
#tour .bubble { position: fixed; left: 50%; bottom: calc(var(--floatFloor, 112px) + 10px); transform: translateX(-50%); width: min(440px, calc(100vw - 24px));
  display: flex; gap: 10px; align-items: flex-end; pointer-events: auto; transition: bottom .45s ease, top .45s ease; }
#tour.top .bubble { bottom: auto; top: calc(var(--topFloor, 96px) + 10px); }
#tour .guide { width: 92px; height: 92px; flex: none; object-fit: contain; filter: drop-shadow(0 6px 10px #0008); animation: guideBob 3s ease-in-out infinite; }
@keyframes guideBob { 50% { transform: translateY(-5px) rotate(-2deg); } }
#tour .txt { flex: 1; color: #fff4e0; padding: 2px 6px 4px;
  border-style: solid; border-color: transparent; border-width: 16px; border-image: url(/assets/opt/ui/panel_tile.webp) 100 200 fill / 27px 53px round; }
#tour .who { display: block; font: 700 15px Georgia, serif; color: #ffd98a; margin-bottom: 2px; }
#tour p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.4; min-height: 3.9em; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
#tour p.on { opacity: 1; transform: none; }
#tour .dots { display: flex; gap: 4px; margin-bottom: 8px; }
#tour .dots i { width: 6px; height: 6px; border-radius: 50%; background: #ffffff33; transition: background .3s, transform .3s; }
#tour .dots i.on { background: #ffd98a; transform: scale(1.3); }
#tour .acts { display: flex; gap: 8px; justify-content: flex-end; }
#tour .acts button { padding: 9px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; color: #fff; background: url(/assets/opt/ui/button2.webp) center / 100% 100% no-repeat; border: 0; }
#tour .acts .next { background-image: url(/assets/opt/ui/button.webp); color: #3a230c; min-width: 110px; }
#sheet-settings .row.replay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* cinemática en pantalla vertical: los subtítulos y "Saltar" van dentro de la barra negra de abajo */
#cine.tall .line { bottom: auto; top: calc(100% - var(--cineBar) + 18px); }
#cine.tall .skip { bottom: 18px; }
