/* TELENOVELA - 1920x1080 stage, scaled into any window by js/main.js (letterbox).
   Look: deep plum glass, thin gold lines, rose accents; Playfair Display + Nunito Sans. */
:root {
  --ink: #140a12; --glass: rgba(30, 13, 25, .78); --glass2: rgba(44, 20, 35, .86);
  --gold: #e8c47e; --gold2: #f7e2ae; --gold3: #b98c4a; --rose: #f28fb0; --rose2: #ffc6da;
  --text: #fbf1ea; --muted: #cdb6be; --line: rgba(232, 196, 126, .5);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0a0408; }
body { font-family: var(--sans); color: var(--text); -webkit-user-select: none; user-select: none; touch-action: manipulation; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; margin: 0; }
input { font: inherit; }
#frame { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: radial-gradient(ellipse at center, #1c0c18, #060205); }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden; transform-origin: 0 0; background: #000; contain: layout paint; }
.ico { width: 1em; height: 1em; display: block; flex: none; }
.gem { display: block; flex: none; filter: drop-shadow(0 2px 6px rgba(255, 110, 180, .35)); }

/* ------------------------------------------------------------------ the picture */
#shake, #pulse, #scene, #bg, #cg, #chars { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
#scene { transition: filter 1.4s ease; }
#bg .layer, #cg .layer {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #000 center / cover no-repeat; opacity: 0;
  transition: opacity 1.2s ease; transform: scale(1.06); will-change: opacity;
}
#bg .layer.on, #cg .layer.on { opacity: 1; }
.kb1 { animation: kb1 46s ease-in-out infinite alternate; }
.kb2 { animation: kb2 52s ease-in-out infinite alternate; }
.kb3 { animation: kb3 48s ease-in-out infinite alternate; }
.kb4 { animation: kb4 56s ease-in-out infinite alternate; }
@keyframes kb1 { from { transform: scale(1.06) translate(0, 0); } to { transform: scale(1.13) translate(-1.2%, -.8%); } }
@keyframes kb2 { from { transform: scale(1.13) translate(1%, .6%); } to { transform: scale(1.06) translate(-.5%, 0); } }
@keyframes kb3 { from { transform: scale(1.08) translate(-1.3%, 0); } to { transform: scale(1.08) translate(1.3%, -.4%); } }
@keyframes kb4 { from { transform: scale(1.1) translate(.8%, -.8%); } to { transform: scale(1.06) translate(-.8%, .5%); } }
.still .layer, .still .leak, .still .glow { animation: none !important; }
#chars { transition: opacity .7s ease; }
#chars.away { opacity: 0; }
.spr {
  position: absolute; bottom: var(--y, 0px); left: 960px; width: 0; height: calc(1080px * var(--s, 1));
  display: flex; justify-content: center; transition: left .75s cubic-bezier(.22, .8, .3, 1);
}
.spr .fig { position: relative; height: 100%; flex: none; transition: filter .4s ease; }
.spr .fig img { display: block; height: 100%; width: auto; }
.spr .fig img.next { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .3s ease; }
.spr .fig img.next.show { opacity: 1; }
.spr.flip .fig { transform: scaleX(-1); }
.spr.dim .fig { filter: brightness(.6) saturate(.8); }
/* night and storm already darken the stage: a listener stays readable there (REVIEW_B M6) */
#stage[data-atmo="night"] .spr.dim:not(.sil) .fig, #stage[data-atmo="storm"] .spr.dim:not(.sil) .fig, #stage[data-atmo="nightsnow"] .spr.dim:not(.sil) .fig { filter: brightness(.85) saturate(.85); }
.spr.sil .fig { filter: brightness(0) drop-shadow(0 0 2px rgba(255, 205, 225, .8)) drop-shadow(0 0 18px rgba(240, 120, 170, .45)); }

/* ------------------------------------------------------------------ atmospheres (colour grades) */
.atm { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 1.4s ease, visibility 0s linear 1.4s; }
.atm.on { opacity: 1; visibility: visible; transition: opacity 1.4s ease, visibility 0s; }
.atm i { position: absolute; display: block; }
/* day: bright, warm, soft light leaks */
#stage[data-atmo="day"] #scene { filter: saturate(1.12) contrast(1.03) brightness(1.04); }
.g-day { mix-blend-mode: screen; }
.g-day .leak { border-radius: 50%; }
.g-day .l1 { left: -420px; top: -520px; width: 1150px; height: 1150px; background: radial-gradient(circle, rgba(255, 190, 110, .6) 0%, rgba(255, 160, 90, .2) 38%, rgba(255, 150, 80, 0) 68%); animation: leak1 17s ease-in-out infinite alternate; }
.g-day .l2 { right: -440px; top: -420px; width: 950px; height: 950px; background: radial-gradient(circle, rgba(255, 228, 175, .5) 0%, rgba(255, 200, 140, 0) 66%); animation: leak2 21s ease-in-out infinite alternate; }
.g-day .l3 { left: 26%; bottom: -660px; width: 1350px; height: 950px; background: radial-gradient(ellipse, rgba(255, 168, 120, .24), rgba(255, 168, 120, 0) 65%); animation: leak3 25s ease-in-out infinite alternate; }
.g-day .haze { top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgba(255, 236, 200, .16), rgba(255, 236, 200, 0) 48%); }
@keyframes leak1 { from { transform: translate(0, 0) scale(1); opacity: .7; } to { transform: translate(150px, 70px) scale(1.12); opacity: 1; } }
@keyframes leak2 { from { transform: translate(0, 0) scale(1.05); opacity: .9; } to { transform: translate(-120px, 90px) scale(.92); opacity: .55; } }
@keyframes leak3 { from { transform: translate(-80px, 0); opacity: .6; } to { transform: translate(120px, -40px); opacity: 1; } }
/* night: moody blue, mysterious glows */
#stage[data-atmo="night"] #scene { filter: saturate(.86) brightness(.95) contrast(1.06); }
#stage[data-atmo="nightsnow"] #scene { filter: saturate(.8) brightness(1.02) contrast(1.04); }
.g-night { mix-blend-mode: multiply; }
.g-night .tint { top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgb(92, 108, 186) 0%, rgb(140, 142, 204) 58%, rgb(112, 104, 168) 100%); }
.g-nglow { mix-blend-mode: screen; }
.g-nglow .gl1 { left: -300px; top: -360px; width: 1200px; height: 1000px; border-radius: 50%; background: radial-gradient(circle, rgba(110, 150, 255, .32), rgba(110, 150, 255, 0) 62%); animation: leak2 19s ease-in-out infinite alternate; }
.g-nglow .gl2 { right: -260px; bottom: -380px; width: 1100px; height: 900px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 110, 175, .2), rgba(255, 110, 175, 0) 62%); animation: leak1 23s ease-in-out infinite alternate; }
.g-nglow .moon { right: 180px; top: -260px; width: 700px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(220, 230, 255, .2), rgba(220, 230, 255, 0) 60%); }
/* day rain: cool, grey, wet shimmer on the ground */
#stage[data-atmo="rain"] #scene { filter: saturate(.74) brightness(.97) contrast(.97); }
.g-rain { mix-blend-mode: multiply; }
.g-rain .tint { top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgb(176, 192, 216), rgb(204, 214, 230)); }
.g-wet { mix-blend-mode: screen; }
.g-wet .shimmer { left: 0; right: 0; bottom: 0; height: 27%; overflow: hidden; -webkit-mask-image: linear-gradient(to top, #000 25%, transparent); mask-image: linear-gradient(to top, #000 25%, transparent); background: linear-gradient(to top, rgba(185, 205, 235, .2), rgba(185, 205, 235, 0)); }
.g-wet .shimmer::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 200%; background: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0) 0 70px, rgba(225, 238, 255, .16) 95px, rgba(255, 255, 255, 0) 125px); animation: sheen 9s linear infinite; }
@keyframes sheen { to { transform: translateX(-50%); } }
/* night thunderstorm */
#stage[data-atmo="storm"] #scene { filter: saturate(.66) brightness(.9) contrast(1.1); }
.g-storm { mix-blend-mode: multiply; }
.g-storm .tint { top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgb(58, 72, 126) 0%, rgb(92, 102, 150) 70%, rgb(70, 76, 120) 100%); }
#stage[data-atmo="storm"] .g-wet .shimmer { opacity: .55; }
/* memory and snow memory: bloom, film grain, dreamy blurred edges; the 1990s memory is warm sepia, the one snowfall is
   cool and white-blue, so the snow reads as snow (REVIEW_B H4) */
#stage[data-atmo="memory"] #scene { filter: sepia(.55) saturate(.6) contrast(.9) brightness(1.07); }
#stage[data-atmo="snow"] #scene { filter: saturate(.8) contrast(.96) brightness(1.06); }
.g-memory { mix-blend-mode: soft-light; }
.g-memory .warm { top: 0; right: 0; bottom: 0; left: 0; background: radial-gradient(ellipse at 50% 38%, rgba(255, 214, 168, .7), rgba(150, 96, 62, .6)); }
.g-mglow { mix-blend-mode: screen; }
.g-mglow .bloom { left: -10%; right: -10%; top: -30%; height: 90%; background: radial-gradient(ellipse at 50% 30%, rgba(255, 240, 222, .3), rgba(255, 240, 222, 0) 62%); }
.g-mglow .flicker { top: 0; right: 0; bottom: 0; left: 0; background: rgba(255, 244, 228, .07); animation: flicker .24s steps(2) infinite; }
@keyframes flicker { 50% { opacity: .25; } }
.g-mvig { background: radial-gradient(ellipse 70% 66% at 50% 47%, rgba(60, 34, 20, 0) 52%, rgba(52, 30, 18, .78) 100%); }
#stage[data-atmo="snow"] .g-memory .warm { background: radial-gradient(ellipse at 50% 38%, rgba(226, 236, 255, .55), rgba(70, 92, 132, .5)); }
#stage[data-atmo="snow"] .g-mglow .bloom { background: radial-gradient(ellipse at 50% 30%, rgba(236, 244, 255, .3), rgba(236, 244, 255, 0) 62%); }
#stage[data-atmo="snow"] .g-mglow .flicker { background: rgba(236, 244, 255, .06); }
#stage[data-atmo="snow"] .g-mvig { background: radial-gradient(ellipse 70% 66% at 50% 47%, rgba(18, 26, 44, 0) 52%, rgba(16, 24, 42, .72) 100%); }
.g-blur { -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); -webkit-mask-image: radial-gradient(ellipse 64% 62% at 50% 48%, transparent 56%, #000 100%); mask-image: radial-gradient(ellipse 64% 62% at 50% 48%, transparent 56%, #000 100%); }
.grain { top: -64px; right: -64px; bottom: -64px; left: -64px; background-size: 256px 256px; mix-blend-mode: overlay; }
.grain.on { opacity: .2; animation: grain .7s steps(7) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 15% { transform: translate(-28px, 18px); } 30% { transform: translate(22px, -30px); } 45% { transform: translate(-14px, -12px); } 60% { transform: translate(30px, 24px); } 75% { transform: translate(-26px, 32px); } 90% { transform: translate(12px, -20px); } 100% { transform: translate(0, 0); } }
/* scene overlays (FX.overlay): mist, under water, police lights; the particle ones are drawn on the canvas */
.ovl { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 1.6s ease, visibility 0s linear 1.6s; }
.ovl.on { opacity: 1; visibility: visible; transition: opacity 1.6s ease, visibility 0s; }
.ovl i { position: absolute; display: block; }
.o-mist { mix-blend-mode: screen; }
.o-mist i { left: -30%; width: 160%; border-radius: 50%; }
.o-mist .m1 { top: 34%; height: 46%; background: radial-gradient(ellipse at center, rgba(205, 215, 232, .34), rgba(205, 215, 232, 0) 68%); animation: mist1 38s ease-in-out infinite alternate; }
.o-mist .m2 { top: 56%; height: 50%; background: radial-gradient(ellipse at center, rgba(190, 200, 222, .3), rgba(190, 200, 222, 0) 66%); animation: mist2 52s ease-in-out infinite alternate; }
.o-mist .m3 { top: 12%; height: 36%; background: radial-gradient(ellipse at center, rgba(215, 222, 238, .16), rgba(215, 222, 238, 0) 70%); animation: mist1 64s ease-in-out infinite alternate-reverse; }
@keyframes mist1 { from { transform: translateX(-9%); } to { transform: translateX(9%); } }
@keyframes mist2 { from { transform: translateX(8%) scaleY(1.1); } to { transform: translateX(-10%) scaleY(.9); } }
.o-under .tint { top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgba(20, 110, 140, .42), rgba(4, 30, 60, .62)); mix-blend-mode: multiply; }
.o-under .caus { top: -10%; right: -10%; bottom: -10%; left: -10%; mix-blend-mode: screen; opacity: .5;
  background: radial-gradient(ellipse 120px 40px at 20% 30%, rgba(160, 240, 255, .35), transparent 70%), radial-gradient(ellipse 160px 50px at 70% 20%, rgba(160, 240, 255, .3), transparent 70%),
    radial-gradient(ellipse 140px 44px at 45% 60%, rgba(160, 240, 255, .25), transparent 70%), radial-gradient(ellipse 180px 60px at 85% 75%, rgba(160, 240, 255, .2), transparent 70%);
  animation: caus 7s ease-in-out infinite alternate; }
@keyframes caus { from { transform: translate(0, 0) scale(1); } to { transform: translate(-3%, 2%) scale(1.06); } }
.o-police { mix-blend-mode: screen; }
.o-police i { top: -20%; width: 70%; height: 140%; border-radius: 50%; }
.o-police .r { left: -32%; background: radial-gradient(circle, rgba(255, 40, 70, .7), rgba(255, 40, 70, 0) 64%); animation: police 1.3s ease-in-out infinite; }
.o-police .b { right: -32%; background: radial-gradient(circle, rgba(60, 110, 255, .75), rgba(60, 110, 255, 0) 64%); animation: police 1.3s ease-in-out infinite .65s; }
@keyframes police { 0%, 100% { opacity: .1; } 40%, 55% { opacity: 1; } }
.still .ovl i { animation: none !important; }
#vignette { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; background: radial-gradient(ellipse 74% 70% at 50% 46%, rgba(0, 0, 0, 0) 56%, rgba(12, 4, 9, .5) 100%); transition: opacity 1.4s ease; }
#stage[data-atmo="day"] #vignette { opacity: .45; }
#stage[data-atmo="memory"] #vignette, #stage[data-atmo="snow"] #vignette { opacity: 0; }
#fx { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; pointer-events: none; }
#lightning { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: radial-gradient(ellipse 95% 75% at 50% 0%, rgba(238, 242, 255, 1), rgba(170, 190, 255, .78) 55%, rgba(120, 140, 220, .45)); }
#pulsevig { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse 72% 66% at 50% 50%, rgba(120, 0, 30, 0) 46%, rgba(160, 12, 48, .68) 100%); }
#flash, #blackout { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; opacity: 0; }
#flash { background: #fff; }
#blackout { background: #000; }

/* ------------------------------------------------------------------ HUD */
#hud { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
#topbar { position: absolute; left: 34px; right: 34px; top: 26px; height: 76px; display: flex; align-items: center; gap: 24px; opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.in-story #topbar { opacity: 1; pointer-events: auto; }
.ib { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: var(--glass); border: 1px solid var(--line); color: var(--gold2); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .15s, border-color .15s; }
.ib:hover { border-color: var(--gold2); transform: scale(1.05); }
.ib .ico { width: 34px; height: 34px; }
#eptitle { flex: 1; text-align: center; font-family: var(--serif); font-style: italic; font-size: 27px; color: rgba(251, 241, 234, .9); text-shadow: 0 2px 10px rgba(0, 0, 0, .75); letter-spacing: .03em; }
.wallet { height: 62px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 12px; border-radius: 40px; background: var(--glass); border: 1px solid var(--line); cursor: pointer; font-size: 28px; font-weight: 800; color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .15s, border-color .15s; }
.wallet:hover { border-color: var(--gold2); }
.wallet .g .gem { width: 40px; height: 40px; }
.wallet .n { min-width: 40px; text-align: right; }
.wallet .plus { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #f7dca0, #c99a52); color: #3a2010; font-size: 28px; line-height: 1; }
.wallet .plus .ico { width: 24px; height: 24px; stroke-width: 2.6; }
.wallet.pulse { animation: none; }
#modeflag { position: absolute; right: 40px; top: 118px; display: flex; gap: 8px; pointer-events: none; }
#modeflag span { display: none; padding: 6px 18px; border-radius: 16px; background: linear-gradient(180deg, #f2d495, #c4954e); color: #2a160a; font-size: 17px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;  }
.auto-on #modeflag .a, .skip-on #modeflag .s { display: block; }
@keyframes breathe { 50% { opacity: .55; } }

/* dialogue */
#dialog { position: absolute; left: 150px; right: 150px; bottom: 34px; height: 262px; pointer-events: auto; transition: opacity .3s ease, transform .3s ease; }
#dialog.hidden { opacity: 0; transform: translateY(24px); pointer-events: none; }
#dialog .box { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 24px; background: linear-gradient(180deg, rgba(36, 16, 30, .8), rgba(20, 8, 17, .87)); -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15); border: 1px solid rgba(232, 196, 126, .45); box-shadow: 0 18px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 236, 200, .16); }
#dialog .box::before { content: ''; position: absolute; top: 8px; right: 8px; bottom: 8px; left: 8px; border-radius: 18px; border: 1px solid rgba(232, 196, 126, .16); pointer-events: none; }
#dialog .plate { position: absolute; left: 50px; top: -31px; height: 62px; padding: 0 34px; display: flex; align-items: center; gap: 14px; border-radius: 31px; background: linear-gradient(180deg, #3d1c32, #250f1f); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
#dialog .plate::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--who, #f6e7da); box-shadow: 0 0 10px var(--who, #f6e7da); }
#dialog .nm { font-family: var(--serif); font-size: 33px; font-weight: 600; color: var(--who, #f6e7da); letter-spacing: .01em; white-space: nowrap; }
#dialog .tag { font-size: 19px; font-style: italic; color: var(--muted); }
#dialog .tag:empty { display: none; }
#dialog .text { position: absolute; left: 66px; right: 74px; top: 56px; bottom: 30px; font-size: 34px; line-height: 1.5; color: var(--text); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); overflow: hidden; }
.text span { opacity: 0; transition: opacity .14s linear; }
.text span.on { opacity: 1; }
.text.all span { transition: opacity .1s linear; }
.text .em { font-style: italic; color: var(--rose2); }
#dialog.narr .plate { display: none; }
#dialog.narr .box { background: linear-gradient(180deg, rgba(22, 10, 18, .74), rgba(14, 6, 12, .84)); }
#dialog.narr .box::after { content: ''; position: absolute; left: 50%; top: 26px; width: 260px; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--gold), transparent); }
#dialog.narr .text { left: 130px; right: 130px; top: 54px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 35px; color: #f7e8db; }
#dialog.think .box { background: linear-gradient(180deg, rgba(40, 22, 48, .78), rgba(24, 12, 30, .86)); }
#dialog.think .text { font-style: italic; color: #f4dbe8; }
#dialog .next { position: absolute; right: 46px; bottom: 30px; width: 20px; height: 20px; border-right: 3px solid var(--gold); border-bottom: 3px solid var(--gold); transform: rotate(45deg); opacity: 0; transition: opacity .2s; }
#dialog.ready .next { opacity: .9; transition: opacity .6s ease; }
@keyframes bob { 50% { transform: translateY(7px) rotate(45deg); } }
#dialog .face { display: none; position: absolute; left: 36px; bottom: 22px; width: 236px; height: 300px; border-radius: 20px; background-color: rgba(44, 20, 35, .95); background-repeat: no-repeat; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
#dialog.withface .face { display: block; }
#dialog.withface .text { left: 312px; }
#dialog.withface .plate { left: 300px; }
#qm { position: absolute; right: 38px; top: -46px; display: flex; gap: 6px; }
#qm button { height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid rgba(232, 196, 126, .32); background: rgba(20, 8, 17, .66); color: var(--muted); font-size: 16px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: color .15s, border-color .15s; }
#qm button:hover { color: var(--gold2); border-color: var(--gold); }
.auto-on #qm [data-k=auto], .skip-on #qm [data-k=skip] { background: linear-gradient(180deg, #f2d495, #c4954e); color: #2a160a; border-color: #f7e2ae; }
.ui-hidden #dialog, .ui-hidden #topbar, .ui-hidden #choices, .ui-hidden #modeflag, .ui-hidden #caption { opacity: 0 !important; pointer-events: none !important; }

/* choices */
#choices { position: absolute; left: 0; right: 0; top: 130px; bottom: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; pointer-events: none; }
#choices.on { pointer-events: auto; }
.choice {
  position: relative; width: 1080px; min-height: 94px; padding: 18px 90px 18px 100px; border-radius: 47px; text-align: left; cursor: pointer;
  display: flex; align-items: center; color: var(--text); font-size: 31px; line-height: 1.32;
  border: 1px solid rgba(232, 196, 126, .5); background: linear-gradient(180deg, rgba(44, 20, 35, .88), rgba(24, 10, 20, .92));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 12px 34px rgba(0, 0, 0, .36);
  animation: cin .5s cubic-bezier(.2, .8, .2, 1) both; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .25s ease;
}
.choice .key { position: absolute; left: 30px; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 1px solid rgba(232, 196, 126, .5); display: grid; place-items: center; font-size: 21px; font-weight: 800; color: var(--gold2); }
.choice:hover, .choice.focus { transform: translateY(-2px); border-color: var(--gold2); box-shadow: 0 14px 34px rgba(0, 0, 0, .42); }
.choice.prem { padding-right: 236px; border: 1.5px solid transparent; background: linear-gradient(180deg, rgba(64, 28, 44, .94), rgba(34, 12, 26, .95)) padding-box, linear-gradient(110deg, #fbe7b4, #d7a24f 38%, #ffd6e6 68%, #b9864a) border-box; overflow: hidden; }
.choice.prem::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(105deg, rgba(255, 236, 200, 0) 38%, rgba(255, 236, 200, .14) 50%, rgba(255, 236, 200, 0) 62%); background-size: 260% 100%; animation: none; }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -20% 0; } }
.choice.prem .t { color: #fff3dd; }
.choice.prem .ptitle { position: absolute; left: 100px; top: 7px; font-size: 15px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--gold2); opacity: .9; }
.choice.prem.titled { padding-top: 30px; }
.choice .price { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); height: 58px; padding: 0 22px 0 14px; border-radius: 29px; display: flex; align-items: center; gap: 8px; background: linear-gradient(180deg, #f8e0a6, #c9974f); color: #2b1608; font-weight: 800; font-size: 29px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 4px 12px rgba(0, 0, 0, .3); }
.choice .price .ico { width: 24px; height: 24px; stroke-width: 2.2; }
.choice .price .gem { width: 36px; height: 36px; }
.choice .price.own { background: rgba(255, 255, 255, .08); color: var(--gold2); font-size: 18px; letter-spacing: .14em; text-transform: uppercase; box-shadow: none; border: 1px solid var(--line); }
.choice.locked { opacity: .45; cursor: not-allowed; }
.choice .why { position: absolute; left: 100px; bottom: 7px; font-size: 17px; color: var(--muted); }
.choice.picked { border-color: #fff; box-shadow: 0 0 44px rgba(255, 220, 180, .5); }
#choices.closing .choice:not(.picked) { opacity: 0; transform: scale(.97); }
@keyframes cin { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.timer { width: 900px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.timer i { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--gold)); transform-origin: 0 50%; }

/* toasts, caption, hints */
#toasts { position: absolute; top: 118px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 10px 40px; font-family: var(--serif); font-style: italic; font-size: 27px; color: #f7ecdf; text-shadow: 0 1px 10px rgba(0, 0, 0, .85), 0 0 2px rgba(0, 0, 0, .9); background: radial-gradient(ellipse at center, rgba(14, 6, 12, .55), rgba(14, 6, 12, 0) 72%); animation: tfade 4.6s ease-in-out both; }
@keyframes tfade { 0% { opacity: 0; } 24% { opacity: 1; } 76% { opacity: 1; } 100% { opacity: 0; } }
.toast .ico { width: 32px; height: 32px; color: var(--gold2); }
.toast .ti .ico { color: inherit; }
.toast .gem { width: 36px; height: 36px; }
.toast.down { border-color: rgba(200, 140, 160, .5); }
.toast.gift { box-shadow: none; }   /* free crystals or an unlocked scene: a plain caption too, no glow (user rule 2026-11-11) */
.toast.small { font-size: 20px; padding: 8px 24px 8px 14px; }
.toast.small .ico { width: 24px; height: 24px; }
@keyframes tin { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateY(-10px); } }
#caption { position: absolute; left: 72px; top: 132px; min-width: 520px; padding: 18px 40px 20px 30px; border-left: 3px solid var(--gold); background: linear-gradient(90deg, rgba(20, 8, 17, .8), rgba(20, 8, 17, 0)); opacity: 0; transform: translateX(-22px); transition: opacity .8s ease, transform .8s ease; pointer-events: none; }
#caption.on { opacity: 1; transform: none; }
#caption .c1 { font-family: var(--serif); font-size: 42px; font-weight: 600; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
#caption .c2 { margin-top: 6px; font-size: 21px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold2); }
#taphint { position: absolute; left: 50%; bottom: 56px; width: 26px; height: 26px; margin-left: -13px; border-right: 3px solid var(--gold2); border-bottom: 3px solid var(--gold2); transform: rotate(45deg); opacity: 0; pointer-events: none; transition: opacity .3s; filter: drop-shadow(0 0 6px rgba(0, 0, 0, .8)); }
#taphint.on { opacity: .9; transition: opacity .6s ease; }

/* ------------------------------------------------------------------ story overlays */
#overlay { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
#overlay > * { pointer-events: auto; }
.out { animation: fadeOut .42s ease forwards !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.titlecard { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(ellipse at center, rgba(34, 13, 27, .84), rgba(6, 2, 5, .97)); animation: fadeIn .9s ease both; cursor: pointer; }
.titlecard .t1 { font-size: 26px; font-weight: 700; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); }
.titlecard .t2 { margin-top: 18px; padding: 0 80px; font-family: var(--serif); font-size: 106px; font-weight: 600; font-style: italic; line-height: 1.1; color: #fff; text-shadow: 0 4px 34px rgba(240, 140, 176, .35); animation: rise 1.4s ease both .2s; }
.titlecard .t3 { margin-top: 28px; font-size: 24px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); animation: fadeIn 1.2s ease both .8s; }
.titlecard.ending .t2 { font-size: 96px; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); letter-spacing: .06em; } to { opacity: 1; transform: none; letter-spacing: .01em; } }
.loccard { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(10, 4, 8, .35), rgba(10, 4, 8, .72) 50%, rgba(10, 4, 8, .35)); animation: fadeIn .9s ease both; cursor: pointer; }
.loccard .l1 { font-family: var(--serif); font-size: 90px; font-weight: 600; font-style: italic; color: #fff; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); animation: rise 1.3s ease both; }
.loccard .rule { width: 0; height: 1px; margin: 22px 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: grow 1.4s ease forwards .3s; }
@keyframes grow { to { width: 520px; } }
.loccard .l2 { font-size: 26px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold2); animation: fadeIn 1.2s ease both .6s; }
.phonemsg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 3, 7, .35); animation: fadeIn .4s ease both; cursor: pointer; }
.phonemsg .ph { width: 680px; padding: 26px 30px 36px; border-radius: 40px; background: linear-gradient(180deg, rgba(22, 16, 26, .96), rgba(14, 10, 18, .97)); border: 2px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: slideUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.phonemsg .top { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; color: #fff; padding: 0 6px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.phonemsg .top .ico { width: 30px; height: 30px; color: var(--rose); }
.phonemsg .top i { margin-left: auto; font-size: 18px; font-weight: 400; color: var(--muted); }
.phonemsg .bubble { margin-top: 22px; max-width: 92%; padding: 18px 26px; border-radius: 26px 26px 26px 8px; background: #36263f; font-size: 30px; line-height: 1.4; color: #fff; }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
/* a handwritten note or letter */
.notecard { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 3, 7, .45); animation: fadeIn .5s ease both; cursor: pointer; }
.notecard .paper { position: relative; width: 860px; min-height: 360px; padding: 70px 80px 64px; transform: rotate(-1.6deg); border-radius: 6px;
  background: linear-gradient(180deg, #fbf3e2, #f1e3c4); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 0 60px rgba(160, 120, 60, .18);
  display: flex; align-items: center; justify-content: center; animation: slideUp .6s cubic-bezier(.2, .8, .2, 1) both; }
.notecard .paper::before { content: ''; position: absolute; left: 0; right: 0; top: 30px; bottom: 30px; background: repeating-linear-gradient(180deg, transparent 0 55px, rgba(80, 110, 160, .16) 55px 57px); pointer-events: none; }
.notecard .hand { position: relative; font-family: 'Segoe Script', 'Bradley Hand', 'Comic Sans MS', cursive; font-size: 46px; line-height: 1.5; color: #2b2340; text-align: center; }
.cliff { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(30, 6, 16, .9), #050104 75%); animation: fadeIn 1.2s ease both; cursor: pointer; padding: 0 240px; text-align: center; }
.cliff .ct { font-family: var(--serif); font-style: italic; font-size: 56px; line-height: 1.35; color: #fff; text-shadow: 0 0 40px rgba(240, 80, 120, .35); }
.cliff .tbc { margin-top: 60px; font-size: 26px; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); opacity: 0; transition: opacity 1.4s ease .5s; }
.cliff.typed .tbc { opacity: 1; }

/* ------------------------------------------------------------------ buttons, windows */
.btn { height: 64px; padding: 0 34px; border-radius: 32px; border: 1px solid var(--line); background: rgba(44, 20, 35, .82); color: var(--text); font-size: 24px; font-weight: 700; letter-spacing: .04em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.btn:hover { border-color: var(--gold2); transform: translateY(-1px); box-shadow: 0 0 22px rgba(232, 196, 126, .2); }
.btn:active { transform: scale(.97); }
.btn.gold { background: linear-gradient(180deg, #f7dfa4, #c69450); color: #2b1608; border-color: #fbe9bf; }
.btn.gold .ico { color: #2b1608; }
.btn.ghost { background: rgba(255, 255, 255, .03); }
.btn.danger { color: #ffb8b8; border-color: rgba(255, 130, 130, .5); }
.btn.danger.gold, .btn.gold.danger { background: linear-gradient(180deg, #ff9f9f, #c24f5a); color: #2a0808; }
.btn.icon { width: 54px; height: 54px; padding: 0; border-radius: 50%; }
.btn.mini { width: 42px; height: 42px; }
.btn .ico { width: 26px; height: 26px; }
.btn .gem { width: 32px; height: 32px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.big { height: 74px; font-size: 27px; }
.ov { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 3, 7, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn .25s ease both; }
.modal { width: 840px; padding: 46px 60px 42px; border-radius: 30px; background: linear-gradient(180deg, #2e1526, #1a0b15); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); text-align: center; animation: pop .35s ease both; }
.modal .mt { font-family: var(--serif); font-size: 44px; font-style: italic; color: #fff; margin-bottom: 16px; }
.modal .mb { font-size: 25px; line-height: 1.5; color: var(--muted); }
.modal .mb p { margin: 0; }
.modal .pq { font-family: var(--serif); font-style: italic; font-size: 32px; color: #fff3dd; margin: 4px 0 20px; }
.modal .pc { display: inline-flex; align-items: center; gap: 10px; font-size: 44px; font-weight: 800; color: #fff; margin-bottom: 14px; }
.modal .pc .gem { width: 54px; height: 54px; }
.modal .note { font-size: 20px; color: var(--muted); margin-top: 8px; }
.modal .rc table { width: 100%; border-collapse: collapse; font-size: 23px; color: var(--text); margin-bottom: 18px; }
.modal .rc td { padding: 6px 4px; border-bottom: 1px solid rgba(232, 196, 126, .15); text-align: left; }
.modal .rc td:last-child { text-align: right; }
.modal .rc .tot td { font-weight: 800; color: var(--gold2); border-bottom: none; padding-top: 12px; }
.modal .got { display: inline-flex; align-items: center; gap: 10px; font-size: 34px; color: #fff; }
.modal .got .gem { width: 44px; height: 44px; }
.mbtns { display: flex; gap: 18px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.panel { width: 640px; padding: 40px 56px 46px; border-radius: 30px; background: linear-gradient(180deg, #2e1526, #1a0b15); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); display: flex; flex-direction: column; gap: 14px; animation: pop .3s ease both; }
.panel .pt { font-family: var(--serif); font-style: italic; font-size: 30px; text-align: center; color: var(--gold2); margin-bottom: 10px; }
.panel .btn { width: 100%; }

/* ------------------------------------------------------------------ screens */
.screen { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; background: rgba(14, 5, 11, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: fadeIn .28s ease both; cursor: default; }
.screen .sbody { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 36px 90px 46px; min-height: 0; }
.shead { position: relative; width: 100%; height: 96px; flex: none; display: flex; align-items: center; justify-content: center; }
.shead .st { font-family: var(--serif); font-size: 56px; font-style: italic; color: #fff; }
.shead .back, .screen .back { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
.empty { color: var(--muted); font-size: 24px; text-align: center; padding: 40px; line-height: 1.5; }
/* title */
.titlescr { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.tshade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, rgba(14, 4, 11, .86) 0%, rgba(14, 4, 11, .5) 36%, rgba(14, 4, 11, 0) 64%); pointer-events: none; }
.logo { position: absolute; left: 130px; top: 120px; pointer-events: none; }
.logo .l0 { font-size: 23px; font-weight: 700; letter-spacing: .42em; text-transform: uppercase; color: var(--gold2); animation: fadeIn 1.6s ease both; }
.logo .l1 { margin-top: 14px; font-family: var(--serif); font-size: 148px; font-weight: 700; font-style: italic; line-height: 1; letter-spacing: .01em; background: linear-gradient(180deg, #fff7ea 10%, #f3cb8e 55%, #c98b4c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .55)); animation: rise 1.8s ease both; }
.orn { display: flex; align-items: center; gap: 16px; color: var(--gold); margin-top: 20px; }
.orn i { width: 170px; height: 1px; background: linear-gradient(90deg, rgba(232, 196, 126, 0), var(--gold)); }
.orn i:last-child { transform: scaleX(-1); }
.orn .ico { width: 30px; height: 30px; }
.tmenu { position: absolute; left: 130px; top: 448px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.tmenu .btn { width: 440px; justify-content: flex-start; padding-left: 42px; animation: cin .5s ease both; }
.tmenu .btn:nth-child(2) { animation-delay: .05s; } .tmenu .btn:nth-child(3) { animation-delay: .1s; } .tmenu .btn:nth-child(4) { animation-delay: .15s; }
.tmenu .btn:nth-child(5) { animation-delay: .2s; } .tmenu .btn:nth-child(6) { animation-delay: .25s; } .tmenu .btn:nth-child(7) { animation-delay: .3s; }
.titlescr .tw { position: absolute; right: 40px; top: 34px; }
.ver { position: absolute; right: 32px; bottom: 22px; font-size: 16px; color: rgba(255, 255, 255, .42); letter-spacing: .2em; }
.phbadge { position: absolute; right: 32px; bottom: 54px; padding: 6px 18px; border-radius: 16px; background: rgba(255, 200, 80, .16); border: 1px dashed rgba(255, 210, 120, .6); color: #ffe2a4; font-size: 16px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
/* shop */
.shop .sbody { padding-top: 30px; }
.shophead { width: 100%; height: 90px; display: flex; align-items: center; justify-content: center; position: relative; flex: none; }
.shophead .st { font-family: var(--serif); font-size: 56px; font-style: italic; color: #fff; }
.shophead .wallet { position: absolute; right: 0; top: 50%; transform: translateY(-50%); cursor: default; padding-right: 26px; }
.shophead .wallet .sh { font-size: 18px; font-weight: 600; color: var(--muted); }
.need { margin: 4px 0 6px; padding: 10px 26px; border-radius: 22px; background: rgba(255, 120, 170, .14); border: 1px solid rgba(255, 140, 185, .5); font-size: 23px; }
.shopmain { flex: 1; width: 100%; display: flex; gap: 40px; margin-top: 16px; min-height: 0; }
.shopleft { flex: 1; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.packs { display: flex; gap: 16px; }
.pack { position: relative; flex: 1; padding: 20px 14px 18px; border-radius: 24px; text-align: center; background: linear-gradient(180deg, rgba(58, 26, 46, .9), rgba(28, 11, 22, .92)); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; }
.pack.tagged { border: 1.5px solid transparent; background: linear-gradient(180deg, rgba(70, 30, 52, .95), rgba(30, 11, 24, .95)) padding-box, linear-gradient(140deg, #fbe7b4, #d7a24f, #ffd6e6) border-box; }
.pack .ribbon { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); padding: 4px 16px; border-radius: 14px; background: linear-gradient(180deg, #ff9cc4, #d9558f); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.heap { position: relative; width: 120px; height: 100px; }
.heap span { position: absolute; width: 56px; height: 56px; }
.heap .gem { width: 100%; height: 100%; }
.pack .amt { font-size: 40px; font-weight: 800; color: #fff; line-height: 1; margin-top: 6px; }
.pack .lbl { font-size: 18px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.pack .price { margin-top: 10px; font-size: 32px; font-weight: 800; color: var(--gold2); }
.pack .off { margin-top: 2px; font-size: 18px; font-weight: 800; color: #9ff0b4; }
.pack .off.none { visibility: hidden; }
.pbtns { display: flex; gap: 8px; margin-top: 12px; }
.pbtns .btn { height: 52px; padding: 0 22px; font-size: 21px; }
.pbtns .btn.icon { width: 52px; height: 52px; }
.loose { display: flex; flex-direction: column; gap: 12px; padding: 22px 26px; border-radius: 24px; background: rgba(40, 17, 32, .7); border: 1px solid rgba(232, 196, 126, .3); }
.srow { display: flex; align-items: center; gap: 18px; }
.srow .sl { flex: 1; display: flex; flex-direction: column; }
.srow .sl b { font-size: 25px; }
.srow .sl span { font-size: 18px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input, .euro input { width: 120px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10, 4, 8, .6); color: #fff; font-size: 25px; font-weight: 700; text-align: center; outline: none; -webkit-user-select: text; user-select: text; }
.stepper input:focus, .euro input:focus { border-color: var(--gold2); }
.euro { display: flex; align-items: center; gap: 8px; font-size: 28px; font-weight: 800; color: var(--gold2); }
.euro input { width: 182px; }
.srow .sub { width: 120px; text-align: right; font-size: 23px; font-weight: 700; color: var(--gold2); }
.srow .btn { height: 52px; padding: 0 22px; font-size: 21px; }
.cartbox { width: 560px; flex: none; display: flex; flex-direction: column; padding: 24px 28px; border-radius: 26px; background: linear-gradient(180deg, rgba(50, 21, 40, .9), rgba(24, 9, 19, .94)); border: 1px solid var(--line); }
.cartbox .ct { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 32px; font-style: italic; color: #fff; margin-bottom: 10px; }
.cartbox .ct .ico { width: 32px; height: 32px; color: var(--gold2); }
.cartbox .lines { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: none; }
.cartbox .lines::-webkit-scrollbar { display: none; }
.cartbox .empty { padding: 30px 10px; font-size: 21px; }
.line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(232, 196, 126, .14); font-size: 21px; }
.line .ln { flex: 1; min-width: 0; }
.line .lq { display: flex; align-items: center; gap: 6px; }
.line .lq span { min-width: 46px; text-align: center; font-weight: 800; }
.line .lp { width: 104px; text-align: right; font-weight: 800; color: var(--gold2); }
.line .btn.mini { width: 36px; height: 36px; }
.line .btn .ico { width: 20px; height: 20px; }
.cartbox .sum { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; font-size: 25px; color: var(--muted); }
.cartbox .sum b { font-size: 40px; color: #fff; }
.cartbox .gets { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 21px; color: var(--muted); }
.cartbox .gets .gem { width: 30px; height: 30px; }
.cartbox .gets b { color: #fff; }
.cartbox .paybtn { width: 100%; height: 72px; font-size: 28px; }
.cartbox .rule { margin-top: 12px; font-size: 17px; line-height: 1.45; color: var(--muted); text-align: center; }
.shopfoot { margin-top: 18px; font-size: 21px; color: var(--gold2); letter-spacing: .04em; padding: 10px 26px; border-radius: 20px; border: 1px dashed rgba(232, 196, 126, .5); }
.shop .back { top: 62px; transform: none; left: 90px; }
/* settings */
.sgrid { width: 1100px; display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 10px; }
.srow2 { display: grid; grid-template-columns: 340px 1fr 150px; align-items: center; gap: 24px; min-height: 66px; padding: 0 26px; border-radius: 20px; background: rgba(44, 20, 35, .55); }
.srow2 label { font-size: 26px; font-weight: 600; }
.srow2 .sv { font-size: 22px; color: var(--gold2); text-align: right; font-weight: 700; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--rose), var(--gold)); outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: #fff3dd; border: 3px solid var(--gold3); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
input[type=range]::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #fff3dd; border: 3px solid var(--gold3); }
.tog { width: 84px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); position: relative; cursor: pointer; padding: 0; justify-self: start; transition: background .2s; }
.tog i { position: absolute; left: 4px; top: 4px; width: 34px; height: 34px; border-radius: 50%; background: #e9d9cf; transition: transform .2s ease, background .2s; }
.tog.on { background: linear-gradient(90deg, var(--rose), var(--gold)); }
.tog.on i { transform: translateX(40px); background: #fff; }
.demo { width: 1100px; height: 60px; margin-top: 16px; font-size: 30px; font-style: italic; color: var(--text); text-align: center; }
.srow3 { display: flex; gap: 18px; margin-top: 14px; }
/* slots */
.slotgrid { display: grid; grid-template-columns: repeat(2, 660px); gap: 28px; margin-top: 10px; }
.slot { position: relative; height: 196px; padding: 18px 20px 18px 330px; border-radius: 24px; background: rgba(44, 20, 35, .72); border: 1px solid var(--line); cursor: pointer; transition: transform .15s, border-color .15s; overflow: hidden; }
.slot:hover { transform: translateY(-2px); border-color: var(--gold2); }
.slot .th { position: absolute; left: 14px; top: 14px; bottom: 14px; width: 298px; border-radius: 16px; background: rgba(0, 0, 0, .4) center / cover no-repeat; }
.slot .sk { font-size: 17px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.slot .se { margin-top: 6px; font-family: var(--serif); font-size: 26px; font-style: italic; color: #fff; }
.slot .sd { font-size: 17px; color: var(--muted); margin-top: 2px; }
.slot .sl { margin-top: 8px; font-size: 18px; color: var(--muted); line-height: 1.35; max-height: 50px; overflow: hidden; }
.slot.empty .se { color: var(--muted); }
.slot .del { position: absolute; right: 14px; top: 14px; }
/* episodes */
.epgrid { flex: 1; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; align-content: start; overflow-y: auto; padding: 14px 4px 20px; scrollbar-width: none; }
.epgrid::-webkit-scrollbar { display: none; }
.epcard { position: relative; height: 300px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: rgba(44, 20, 35, .7); cursor: pointer; transition: transform .15s, border-color .15s; }
.epcard:hover { transform: translateY(-3px); border-color: var(--gold2); }
.epcard .th { position: absolute; top: 0; right: 0; bottom: 92px; left: 0; background: rgba(0, 0, 0, .4) center / cover no-repeat; }
.epcard.locked .th { filter: brightness(.25) blur(3px) grayscale(.6); }
.epcard .lk { position: absolute; left: 50%; top: 104px; transform: translate(-50%, -50%); width: 64px; height: 64px; color: var(--gold2); }
.epcard .lk .ico { width: 64px; height: 64px; }
.epcard .en { position: absolute; left: 22px; bottom: 50px; font-size: 16px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.epcard .et { position: absolute; left: 22px; right: 18px; bottom: 14px; font-family: var(--serif); font-size: 27px; font-style: italic; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epcard .ed { position: absolute; right: 14px; top: 14px; display: flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 14px; background: rgba(20, 8, 17, .8); font-size: 15px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold2); }
.epcard .ed .ico { width: 18px; height: 18px; }
/* gallery */
.gcount { font-size: 21px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin: -6px 0 14px; }
.ggrid { flex: 1; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-content: start; overflow-y: auto; padding: 4px 4px 20px; scrollbar-width: none; }
.ggrid::-webkit-scrollbar { display: none; }
.gcard { position: relative; height: 262px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: rgba(44, 20, 35, .7); cursor: pointer; transition: transform .15s, border-color .15s; }
.gcard:hover { transform: translateY(-3px); border-color: var(--gold2); }
.gcard .th { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: center / cover no-repeat; }
.gcard.locked { cursor: default; }
.gcard .lk { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); color: rgba(232, 196, 126, .7); }
.gcard .lk .ico { width: 54px; height: 54px; }
.gcard .pm { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; background: rgba(20, 8, 17, .75); display: grid; place-items: center; }
.gcard .pm .gem { width: 30px; height: 30px; }
.gcard .gt { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 18px 12px; background: linear-gradient(0deg, rgba(14, 5, 11, .9), rgba(14, 5, 11, 0)); font-family: var(--serif); font-style: italic; font-size: 23px; color: #fff; }
.gends { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 12px; font-size: 21px; color: var(--muted); }
.gends b { color: var(--gold2); letter-spacing: .16em; text-transform: uppercase; font-size: 18px; margin-right: 6px; }
.gends span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 16px; border: 1px solid rgba(232, 196, 126, .3); }
.gends span .ico { width: 20px; height: 20px; }
.gends span.on { color: #fff; border-color: var(--gold); }
.gends span.on .ico { color: var(--gold2); fill: var(--gold2); }
.viewer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #000; animation: fadeIn .3s ease both; cursor: pointer; overflow: hidden; }
.viewer .vimg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: center / cover no-repeat; transform: scale(1.04); }
.viewer .vimg.kb { animation: kb1 40s ease-in-out infinite alternate; }
.viewer .vcap { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); padding: 10px 28px; border-radius: 22px; background: rgba(14, 5, 11, .7); font-size: 22px; color: var(--text); white-space: nowrap; }
.viewer .vprev, .viewer .vnext { position: absolute; top: 50%; margin-top: -27px; }
.viewer .vprev { left: 34px; } .viewer .vnext { right: 34px; }
/* log */
.logbox { flex: 1; width: 1300px; overflow-y: auto; padding: 10px 20px 30px; scrollbar-width: thin; scrollbar-color: rgba(232, 196, 126, .4) transparent; }
.lg { position: relative; padding: 14px 70px 14px 0; border-bottom: 1px solid rgba(232, 196, 126, .1); font-size: 26px; line-height: 1.45; }
.lg b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; margin-bottom: 2px; }
.lg.narr span { font-family: var(--serif); font-style: italic; color: #f2e1d4; }
.lg.think span { font-style: italic; color: #f0d6e3; }
.lg .btn { position: absolute; right: 6px; top: 50%; margin-top: -21px; }
/* relationships */
.relbox { width: 1100px; display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.rel { display: grid; grid-template-columns: 60px 300px 1fr 60px; align-items: center; gap: 20px; padding: 18px 28px; border-radius: 22px; background: rgba(44, 20, 35, .6); }
.rel .ri .ico { width: 42px; height: 42px; }
.rel .rn { font-family: var(--serif); font-size: 30px; font-style: italic; }
.rel .rn small { display: block; font-family: var(--sans); font-style: normal; font-size: 17px; color: var(--muted); }
.rel .bar { height: 14px; border-radius: 7px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.rel .bar i { display: block; height: 100%; border-radius: 7px; }
.rel .rv { font-size: 28px; font-weight: 800; text-align: right; }
/* credits */
.credits { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: radial-gradient(ellipse at center, #1e0b18, #050104); overflow: hidden; cursor: pointer; animation: fadeIn 1s ease both; }
.credits .roll { position: absolute; left: 0; right: 0; top: 0; text-align: center; will-change: transform; transform: translateY(1080px); }
.credits .ctitle { font-family: var(--serif); font-size: 110px; font-style: italic; font-weight: 700; color: var(--gold2); margin-bottom: 120px; }
.credits .cs { margin-bottom: 80px; }
.credits .ch { font-size: 22px; font-weight: 800; letter-spacing: .4em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.credits .cn { font-family: var(--serif); font-size: 40px; color: #fff; line-height: 1.5; }
.credits .cthanks { margin-top: 160px; padding-bottom: 200px; font-family: var(--serif); font-size: 64px; font-style: italic; color: #fff; }
/* episode end */
.epend { background: radial-gradient(ellipse at center, rgba(40, 14, 30, .9), rgba(6, 2, 5, .97)); }
.epend .sbody { justify-content: center; text-align: center; }
.epend .e1 { font-size: 26px; font-weight: 800; letter-spacing: .44em; text-transform: uppercase; color: var(--gold); }
.epend .e2 { margin-top: 14px; font-family: var(--serif); font-size: 88px; font-style: italic; font-weight: 600; color: #fff; }
.epend .orn { justify-content: center; margin: 22px 0 30px; }
.epend .recap { max-width: 1100px; font-size: 27px; line-height: 1.6; color: #eadbd2; }
.epend .reward { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; padding: 12px 30px; border-radius: 30px; background: rgba(255, 120, 180, .12); border: 1px solid rgba(255, 150, 200, .45); font-size: 26px; }
.epend .reward .gem { width: 40px; height: 40px; }
/* phones held upright */
#rotate { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9; background: #0e050b; color: var(--text); align-items: center; justify-content: center; text-align: center; padding: 30px; }
#rotate b { display: block; font-family: var(--serif); font-size: 26px; font-style: italic; margin-bottom: 8px; }
#rotate span { font-size: 16px; color: var(--muted); }
body.portrait #rotate { display: flex; }
@media (prefers-reduced-motion: reduce) { .layer, .leak, .glow { animation: none !important; } }

/* ------------------------------------------------------------------ REVIEW_B (2026-11-12) */
/* a premium option says what it holds, after its title (M2) */
.choice.prem .ptitle .pnote { margin-left: 14px; font-style: italic; font-weight: 600; letter-spacing: .02em; text-transform: none; color: #f3dcc4; opacity: .85; }
/* a gold option the wallet can't cover yet: the price dims and says what you have (L16) */
.choice.short .price { filter: saturate(.35) brightness(.78); top: calc(50% - 9px); }
.choice .have { position: absolute; right: 26px; bottom: 6px; font-size: 15px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.choice .have:empty { display: none; }
/* the first gold option ever: one quiet line about premium scenes (H6) */
.ptip { width: 1080px; padding: 18px 44px 20px; border-radius: 30px; font-size: 26px; line-height: 1.42; text-align: center; color: #f6e7da; background: linear-gradient(180deg, rgba(44, 20, 35, .93), rgba(24, 10, 20, .95)); border: 1px solid rgba(232, 196, 126, .4); box-shadow: 0 12px 34px rgba(0, 0, 0, .4); animation: fadeIn 1.2s ease both; pointer-events: none; }
/* the very first line: how to go on, under the box, until the first tap (L17) */
#dialog.first.ready::after { content: 'Tap or click to continue'; position: absolute; right: 44px; bottom: -31px; font-size: 19px; font-style: italic; letter-spacing: .04em; color: rgba(251, 241, 234, .82); text-shadow: 0 1px 6px rgba(0, 0, 0, .9); animation: fadeIn .8s ease both .4s; pointer-events: none; }
/* the shop when crystals are missing: one tap tops up exactly that; where free crystals come from (H6, M3) */
.needrow { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 4px 0 2px; flex: none; }
.needrow .need { margin: 0; }
.needrow .topup { height: 52px; padding: 0 24px; font-size: 21px; }
.needfree, .shopfree { flex: none; font-size: 19px; font-style: italic; color: var(--muted); text-align: center; }
.needfree { margin-top: 4px; }
.shopfree { margin-top: 10px; }
/* on the title screen a gift is said at the bottom, clear of the logo (H6) */
body:has(.titlescr) #toasts { top: auto; bottom: 64px; }
/* relationships: what the bars are for (M12) */
.relnote { margin-top: 22px; font-family: var(--serif); font-size: 25px; font-style: italic; color: var(--muted); text-align: center; }

/* A phone in landscape (a window under 520 px tall shows the stage at about a third of its size) or Settings > Large
   text: bigger text inside the stage, the layout stays the same (H5). main.js sets body.compact. */
body.compact #dialog { left: 44px; right: 44px; height: 336px; }
body.compact #dialog .plate { left: 46px; top: -38px; height: 76px; padding: 0 36px; border-radius: 38px; }
body.compact #dialog .nm { font-size: 42px; }
body.compact #dialog .tag { font-size: 27px; }
body.compact #dialog .text { left: 58px; right: 66px; top: 54px; bottom: 22px; font-size: 44px; line-height: 1.42; }
body.compact #dialog.narr .text { left: 84px; right: 84px; top: 52px; font-size: 45px; }
body.compact #dialog.withface .text { left: 296px; }
body.compact #dialog.withface .plate { left: 286px; }
body.compact #dialog .face { left: 32px; bottom: 20px; width: 232px; height: 336px; }
body.compact #dialog .next { right: 30px; bottom: 20px; }
body.compact #dialog.first.ready::after { right: 30px; bottom: -32px; font-size: 26px; }
body.compact #qm { right: 30px; top: -84px; gap: 8px; }
body.compact #choices { top: 100px; bottom: 412px; gap: 12px; }
body.compact .choice { width: 1580px; min-height: 98px; padding: 12px 96px 12px 104px; border-radius: 49px; font-size: 42px; line-height: 1.26; }
body.compact .choice.prem { padding-right: 268px; }
body.compact .choice.prem.titled { padding-top: 44px; }
body.compact .choice .key { left: 28px; width: 54px; height: 54px; margin-top: -27px; font-size: 26px; }
body.compact .choice.prem .ptitle { top: 8px; font-size: 25px; letter-spacing: .14em; }
body.compact .choice .price { right: 20px; height: 68px; padding: 0 24px 0 16px; font-size: 34px; }
body.compact .choice .price .gem { width: 42px; height: 42px; }
body.compact .choice .price.own { font-size: 24px; }
body.compact .choice .why { font-size: 26px; bottom: 4px; }
body.compact .toast { font-size: 36px; }
body.compact .toast .ico { width: 40px; height: 40px; }
body.compact .toast.small { font-size: 30px; }
body.compact #caption .c1 { font-size: 52px; }
body.compact .modal { width: 1100px; }
body.compact .modal .mb { font-size: 32px; }
body.compact .modal .note { font-size: 30px; line-height: 1.4; }
body.compact .modal .btn { height: 76px; font-size: 30px; }
body.compact .relnote { font-size: 32px; }
body.compact .bub { font-size: 31px; }

/* FINAL_VERIFY (2026-11-12 night). L14: the storm lighthouse is a dark picture under the storm grade; lift it so the
   tower reads. L13: in a split-screen call the scene caption sits under the call's name tags, not on them. */
#bg .layer[data-art="lighthouse_storm"] { filter: brightness(1.75) contrast(1.06); }
#stage.split-on #caption { top: 188px; }
/* M3: on a phone (and with Large text) nothing on the story or menu screens is smaller than 31 stage px, about 11 px on
   an 844x390 screen. The shop becomes one scrolling column there: packs, other amounts, then the cart. */
body.compact .btn { height: 72px; font-size: 31px; }
body.compact .btn.big { height: 76px; font-size: 32px; }
body.compact .btn.icon { width: 68px; height: 68px; }
body.compact .wallet { font-size: 31px; }
body.compact #eptitle { font-size: 31px; }
body.compact #qm button { height: 64px; padding: 0 20px; border-radius: 32px; font-size: 31px; letter-spacing: .08em; }
body.compact #caption .c2 { font-size: 31px; }
body.compact .choice .have { right: 28px; bottom: 6px; font-size: 31px; }
body.compact .choice.prem.short { min-height: 132px; }
body.compact .choice.short .price { top: calc(50% - 20px); }
body.compact .ptip { width: 1580px; font-size: 34px; padding: 16px 48px 18px; }
body.compact .chip { font-size: 31px; }
body.compact .screen .sbody { overflow-y: auto; scrollbar-width: none; }
body.compact .screen .sbody::-webkit-scrollbar { display: none; }
/* title */
body.compact .logo .l0 { font-size: 31px; letter-spacing: .3em; }
body.compact .tmenu { gap: 12px; }
body.compact .tmenu .btn.big { height: 70px; }
body.compact .ver { font-size: 31px; }
/* settings */
body.compact .srow2 { grid-template-columns: 420px 1fr 170px; min-height: 72px; }
body.compact .srow2 label, body.compact .srow2 .sv { font-size: 31px; }
body.compact .demo { font-size: 32px; }
/* relationships */
body.compact .relbox { width: 1400px; }
body.compact .rel { grid-template-columns: 70px 430px 1fr 80px; }
body.compact .rel .rn, body.compact .rel .rv { font-size: 36px; }
body.compact .rel .rn small { font-size: 31px; }
/* the shop */
body.compact .screen.shop .sbody { padding: 26px 40px 40px; }
body.compact .shopmain { flex: none; flex-direction: column; gap: 26px; }
body.compact .shopleft { flex: none; }
body.compact .cartbox { width: 100%; flex: none; }
body.compact .cartbox .lines { flex: none; overflow: visible; }
body.compact .shophead .wallet .sh, body.compact .need, body.compact .needfree, body.compact .shopfree, body.compact .shopfoot { font-size: 31px; }
body.compact .needrow .topup { height: 72px; font-size: 31px; }
body.compact .pack .ribbon { top: -22px; padding: 2px 16px; font-size: 31px; letter-spacing: .04em; }
body.compact .pack .amt { font-size: 46px; }
body.compact .pack .lbl, body.compact .pack .off { font-size: 31px; letter-spacing: .06em; }
body.compact .pack .price { font-size: 38px; }
body.compact .pbtns .btn { height: 72px; font-size: 31px; }
body.compact .pbtns .btn.icon { width: 72px; height: 72px; }
body.compact .srow .sl b { font-size: 34px; }
body.compact .srow .sl span, body.compact .srow .sub, body.compact .srow .btn { font-size: 31px; }
body.compact .srow .sub { width: 150px; }
body.compact .srow .btn { height: 72px; }
body.compact .stepper input, body.compact .euro input { height: 72px; font-size: 31px; }
body.compact .euro { font-size: 34px; }
body.compact .euro input { width: 220px; }
body.compact .cartbox .empty, body.compact .line, body.compact .cartbox .gets, body.compact .cartbox .sum, body.compact .cartbox .rule { font-size: 31px; }
body.compact .line .lp { width: 150px; }
body.compact .line .btn.mini { width: 58px; height: 58px; }
body.compact .cartbox .paybtn { height: 84px; font-size: 34px; }
/* episodes, gallery, save / load, the story log, the game menu */
body.compact .epcard .en { font-size: 31px; letter-spacing: .1em; bottom: 52px; }
body.compact .epcard .et { font-size: 33px; }
body.compact .epcard .ed { font-size: 31px; letter-spacing: .04em; }
body.compact .gcount, body.compact .gcard .gt, body.compact .gends, body.compact .gends b { font-size: 31px; }
body.compact .slotgrid { grid-template-columns: repeat(2, 850px); }
body.compact .slot { height: 252px; }
body.compact .slot .sk, body.compact .slot .se, body.compact .slot .sd, body.compact .slot .sl { font-size: 31px; }
body.compact .slot .sk { letter-spacing: .1em; }
body.compact .slot .sl { max-height: 84px; }
body.compact .logbox { width: 1600px; }
body.compact .lg, body.compact .lg b { font-size: 32px; }
body.compact .panel { width: 760px; }
body.compact .panel .pt { font-size: 34px; }
/* the call overlays on the stage (the phone device itself keeps its real proportions; its messages and replies are
   enlarged above) */
body.compact .chud { font-size: 31px; }
body.compact .ctag { height: 64px; font-size: 32px; }
body.compact .ctag .loc { font-size: 31px; letter-spacing: .04em; }
body.compact .ccard { width: 600px; }
body.compact .ccard .cs { font-size: 31px; }

/* Touch screens (a phone in landscape shows the 1920x1080 stage at about a third of its size): the small buttons get
   a larger invisible touch area. Nothing changes in how they look (final QA 2026-11-12). */
@media (pointer: coarse) {
  #qm button, #b-menu, #topbar .wallet { position: relative; }
  #qm button::before { content: ''; position: absolute; left: -3px; right: -3px; top: -56px; bottom: -42px; }
  #b-menu::before, #topbar .wallet::before { content: ''; position: absolute; top: -28px; right: -28px; bottom: -28px; left: -28px; }
}
