/* =====================================================================
   NGÂN HÀ 20/10 — bảng màu: tím than vũ trụ · vàng kim · oải hương
   ===================================================================== */
:root {
  --cyan: #3ff3ff;
  --cyan-glow: #19e3ff;
  --pink: #ff8fc1;
  --green: #7dffad;
  --gold: #ffcf70;
  --gold-deep: #f2a53a;
  --lavender: #c9b6ff;
  --violet: #8b5cf6;
  --night: #07031a;
  --e: clamp(54px, 7.2vw, 84px);   /* kích thước mắt */
  --gap: clamp(36px, 5.6vw, 66px);  /* khoảng cách hai mắt */
  --eyes-top: 46%;
  --wheel-top: 57%;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  color: #fff;
  font-family: "Courier Prime", "Courier New", monospace;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body {
  background:
    radial-gradient(ellipse at 25% 20%, rgba(60, 24, 120, .55), transparent 60%),
    radial-gradient(ellipse at 80% 85%, rgba(40, 18, 100, .5), transparent 60%),
    radial-gradient(ellipse at 50% 50%, #0d0626 0%, var(--night) 75%);
  background-color: var(--night);
}

/* ================= Bầu trời Ngân Hà (canvas tĩnh, trôi bằng CSS) ================= */
#sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; display: block;
  opacity: 0; transition: opacity 2.2s ease;
  transform-origin: 55% 50%;
  animation: skyDrift 80s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
@keyframes skyDrift {
  from { transform: scale(1.08) rotate(-1.2deg) translate(-1%, .5%); }
  to   { transform: scale(1.14) rotate(1.4deg) translate(1%, -.8%); }
}
body[data-scene="intro"] #sky { opacity: .55; }
body[data-scene="stars"] #sky,
body[data-scene="meadow"] #sky,
body[data-scene="river"] #sky,
body[data-scene="zodiac"] #sky,
body[data-scene="oracle"] #sky,
body[data-scene="beauty"] #sky,
body[data-scene="question"] #sky,
body[data-scene="final"] #sky { opacity: 1; }
body[data-scene="pink"] #sky,
body[data-scene="smile"] #sky { opacity: .7; }
body[data-scene="health"] #sky { opacity: .55; }
body[data-scene="clover"] #sky,
body[data-scene="luck"] #sky { opacity: .45; }

/* ================= Cảnh nền ================= */
.bg {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity 1.4s ease, visibility 0s linear 1.4s;
}
.bg.on { opacity: 1; visibility: visible; transition: opacity 1.4s ease; }

/* Nét vẽ "tự vẽ ra" */
.art { overflow: visible; }
.d {
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0;
}
.bg.on .d { animation: draw var(--dur, 2.6s) cubic-bezier(.45, .05, .3, 1) var(--dl, 0s) both; }
@keyframes draw {
  0% { stroke-dashoffset: 1; opacity: 0; }
  3% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

.bg[data-scene="pink"] {
  background:
    linear-gradient(135deg, rgba(255, 105, 180, .38) 0%, rgba(200, 40, 160, .12) 32%, transparent 70%),
    radial-gradient(ellipse at 85% 100%, rgba(255, 90, 160, .16), transparent 60%);
}

/* --- Cảnh 20/10: hai cô gái neon vàng kim giữa dải Ngân Hà --- */
.bg[data-scene="meadow"] {
  background:
    radial-gradient(ellipse at 74% 55%, rgba(255, 170, 70, .16), transparent 50%),
    radial-gradient(ellipse at 20% 35%, rgba(120, 60, 200, .18), transparent 55%);
}
/* Hiệu ứng "4D": các lớp lệch nhau theo --mx/--my (JS cập nhật theo chuột hoặc tự đung đưa) */
:root { --mx: 0; --my: 0; }
#sky { translate: calc(var(--mx) * -8px) calc(var(--my) * -6px); }
.vol-rays { position: absolute; inset: 0; overflow: hidden; translate: calc(var(--mx) * 6px) calc(var(--my) * 4px); }
.vol-rays i {
  position: absolute; top: -30vh; height: 160vh; width: 9vw;
  background: linear-gradient(to bottom, rgba(255, 214, 140, .2), rgba(255, 180, 90, .06) 55%, transparent 80%);
  transform: rotate(24deg); transform-origin: top center; opacity: .5;
}
.vol-rays i:nth-child(1) { right: 34vw; width: 5vw; }
.vol-rays i:nth-child(2) { right: 24vw; width: 11vw; }
.vol-rays i:nth-child(3) { right: 14vw; width: 4vw; }
.vol-rays i:nth-child(4) { right: 6vw; width: 8vw; }
.vol-rays i:nth-child(5) { right: -4vw; width: 6vw; }
.bg.on .vol-rays i { animation: volBeam 6s ease-in-out infinite alternate; }
.bg.on .vol-rays i:nth-child(2n) { animation-duration: 8s; animation-delay: -3s; }
.bg.on .vol-rays i:nth-child(3n) { animation-duration: 5s; animation-delay: -1.5s; }
@keyframes volBeam { from { opacity: .15; } to { opacity: .75; } }
.girls-halo {
  position: absolute; right: 2vw; bottom: 4vh; width: 50vw; height: 88vh; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 190, 90, .2), rgba(255, 150, 60, .06) 45%, transparent 68%);
  translate: calc(var(--mx) * -8px) calc(var(--my) * -6px);
}
.bg.on .girls-halo { animation: haloBreath 5s ease-in-out infinite; }
@keyframes haloBreath { 50% { opacity: .7; transform: scale(1.04); } }
.girls-box {
  position: absolute; right: 4vw; bottom: 0; height: 100vh; aspect-ratio: 765 / 1024;
  /* mờ dần ở 4 cạnh để hình tan vào bầu trời */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 19%, #000 81%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 14%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 19%, #000 81%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 14%, #000 100%);
  mask-composite: intersect;
}
/* "screen": phần nền tối của ảnh hòa vào bầu trời, chỉ còn lại nét sáng */
.girls-wrap { mix-blend-mode: screen; translate: calc(var(--mx) * -16px) calc(var(--my) * -10px); }
.trails-wrap { translate: calc(var(--mx) * -30px) calc(var(--my) * -18px); }
.girls { position: absolute; inset: 0; width: 100%; height: 100%; }
.girls-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; clip-path: inset(100% 0 0 0); }
/* lớp bloom: bản sao làm mờ, sáng hơn -> quầng sáng "thở" quanh nét vẽ */
.girls-img.bloom { filter: blur(10px) brightness(1.5) saturate(1.2); mix-blend-mode: screen; opacity: 0; will-change: opacity; }
.bg.on .girls-img { animation: reveal 3s cubic-bezier(.4, 0, .2, 1) .3s forwards; }
.bg.on .girls-img.bloom { animation: reveal 3s cubic-bezier(.4, 0, .2, 1) .3s forwards, bloomBreath 3.4s ease-in-out 3.3s infinite; }
@keyframes reveal { to { clip-path: inset(0 0 0 0); } }
@keyframes bloomBreath { 0%, 100% { opacity: .25; } 50% { opacity: .7; } }
/* vệt sáng quét từ dưới lên khi hình hiện ra */
.girls-wrap .scan {
  position: absolute; left: 6%; right: 6%; bottom: 0; height: 3px; border-radius: 3px; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff3cf 20%, #fff 50%, #fff3cf 80%, transparent);
  box-shadow: 0 0 18px 6px rgba(255, 190, 90, .6), 0 0 60px 20px rgba(255, 160, 60, .3);
}
.bg.on .girls-wrap .scan { animation: scanUp 3s cubic-bezier(.4, 0, .2, 1) .3s forwards; }
@keyframes panCine { from { transform: translateX(-24%); } to { transform: translateX(-76%); } }
/* vệt sáng đi từ đáy lên đỉnh CỦA KHUNG CHỨA (bottom: 0 → 100%), cùng nhịp với hiệu ứng reveal nên luôn khớp mép hình */
@keyframes scanUp { 0% { bottom: 0; opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { bottom: 100%; opacity: 0; } }
/* Vệt sáng vàng kim */
.trails .t-base { stroke: rgba(255, 205, 120, .3); stroke-width: 2.2; }
.trails .t-run { fill: none; stroke: #fff3cf; stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: .13 .87; stroke-dashoffset: 1; opacity: 0; }
.trails .t-wide { stroke: #ffae45; stroke-width: 18; }
/* Đèn lồng nhỏ trong cỏ */
.lanterns i {
  position: absolute; bottom: 5vh; width: 16px; height: 22px; border-radius: 40% 40% 45% 45%;
  background: radial-gradient(circle at 50% 55%, #fff6d8, #ffc35a 45%, #e8792a 100%);
  box-shadow: 0 0 14px 4px rgba(255, 180, 70, .7), 0 0 44px 14px rgba(255, 140, 40, .3);
}
.lanterns i::before { content: ""; position: absolute; left: 50%; top: -6px; width: 8px; height: 5px; margin-left: -4px; border-radius: 2px; background: #b5652a; }
.lanterns i:nth-child(1) { right: 7vw; }
.lanterns i:nth-child(2) { right: 12vw; bottom: 3vh; transform: scale(.75); }
.lanterns i:nth-child(3) { right: 3vw; bottom: 2vh; transform: scale(.6); }
.bg.on .lanterns i { animation: flicker 2.6s ease-in-out infinite; }
.bg.on .lanterns i:nth-child(2) { animation-duration: 3.3s; animation-delay: -1s; }
.bg.on .lanterns i:nth-child(3) { animation-duration: 2.1s; animation-delay: -.5s; }
@keyframes flicker { 0%, 100% { opacity: 1; } 40% { opacity: .78; } 55% { opacity: .95; } 70% { opacity: .82; } }
.bg.on .trails .t-run { animation-name: trailRun; animation-timing-function: linear; animation-iteration-count: infinite; }
.bg.on .trails .t-wide { animation-name: trailRunWide; }
@keyframes trailRun { 0% { stroke-dashoffset: 1; opacity: 0; } 12%, 80% { opacity: .95; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes trailRunWide { 0% { stroke-dashoffset: 1; opacity: 0; } 12%, 80% { opacity: .28; } 100% { stroke-dashoffset: 0; opacity: 0; } }
/* Gió nhẹ làm tóc & tà áo lay động (SVG displacement, chỉ bật trên máy đủ mạnh) */
.wind .river-wrap:not(.has-video) .girls-img.main { filter: url(#wind); }
/* --- Cảnh sông Ngân dùng video thasen.mp4 (khung ngang 16:9) --- */
/* máy tính: khung video thu nhỏ, đặt bên phải, viền mờ dần vào dải Ngân Hà */
.cine {
  position: absolute; right: 2.5vw; top: 50%; width: min(60vw, 1150px); aspect-ratio: 16 / 9;
  transform: translateY(-50%); overflow: hidden; display: none;
  mix-blend-mode: screen; /* bầu trời tối của video hòa vào dải Ngân Hà */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-composite: intersect;
  translate: calc(var(--mx) * -10px) calc(var(--my) * -6px);
}
/* quầng sáng vàng nhẹ phía sau khung video */
.cine-halo { position: absolute; right: 0; top: 50%; width: 66vw; height: 46vw; transform: translateY(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 190, 100, .12), transparent 65%); display: none; }
#river:has(.cine.has-video) .cine-halo { display: block; }
.cine.has-video { display: block; }
.cine-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(100% 0 0 0); }
.bg.on .cine-vid { animation: reveal 3s cubic-bezier(.4, 0, .2, 1) .3s forwards; }
.cine .scan {
  position: absolute; left: 10%; right: 10%; bottom: 0; height: 3px; border-radius: 3px; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff3cf 20%, #fff 50%, #fff3cf 80%, transparent);
  box-shadow: 0 0 18px 6px rgba(255, 190, 90, .6), 0 0 60px 20px rgba(255, 160, 60, .3);
}
.bg.on .cine .scan { animation: scanUp 3s cubic-bezier(.4, 0, .2, 1) .3s forwards; }
/* có video thì ẩn ảnh tĩnh + hiệu ứng thả sen vẽ bằng code (video đã có sẵn) */
#river:has(.cine.has-video) .girls-box, #river:has(.cine.has-video) .girls-halo { display: none; }
/* bố cục cột trái khi video nằm bên phải */
.line.pos-left { top: 26vh; left: 20vw; width: min(34vw, 460px); font-size: clamp(1.15rem, 2.3vw, 1.9rem); line-height: 1.6; letter-spacing: .06em; }
.eyes.at-left { top: 68%; left: 20%; }
.eyes.at-left .eye-row { transform: scale(.85); }

/* Khi có video trong assets/video/: dùng video thay ảnh tĩnh */
.girls-img.vid { display: none; }
.has-video .girls-img.vid { display: block; }
.has-video .girls-img.main, .has-video .girls-img.bloom { display: none; }
.line.pos-topleft { translate: calc(var(--mx) * 10px) calc(var(--my) * 6px); }

/* --- Vòng hoàng đạo --- */
.bg[data-scene="zodiac"] {
  background:
    radial-gradient(circle at 50% var(--wheel-top), rgba(255, 200, 110, .14), transparent 38%),
    radial-gradient(ellipse at 50% 50%, rgba(110, 60, 200, .22), transparent 65%);
}
.wheel-wrap {
  position: absolute; left: 50%; top: var(--wheel-top);
  width: min(72vmin, 620px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
.wheel { width: 100%; height: 100%; }
.bg.on .wheel { animation: spin 140s linear infinite; }
.wheel .w-ring { stroke: rgba(255, 207, 112, .75); stroke-width: 1.6; }
.wheel .w-ring.thin { stroke: rgba(201, 182, 255, .45); stroke-width: 1; }
.wheel .w-tick { stroke: rgba(255, 207, 112, .5); stroke-width: 1; }
.wheel .w-sym {
  fill: var(--gold); font-size: 26px; text-anchor: middle; dominant-baseline: central;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", serif;
  opacity: 0;
}
.bg.on .wheel .w-sym { animation: fadeIn .8s ease forwards; }
.wheel .w-sym.sel { fill: #fff; font-size: 34px; paint-order: stroke; stroke: rgba(255, 190, 80, .8); stroke-width: 6px; }
.wheel .c-line { stroke: rgba(201, 182, 255, .55); stroke-width: 1; }
.wheel .knots circle { fill: #f3ecff; opacity: .8; }
.wheel .w-con.sel .c-line { stroke: var(--gold); stroke-width: 1.8; }
.wheel .w-con.sel .knots circle { fill: #fff3d4; }
.bg.on .wheel .w-con.sel { animation: knot 1.2s ease-in-out infinite alternate; }

/* --- Chòm sao + pha lê --- */
.bg[data-scene="oracle"] {
  background:
    radial-gradient(ellipse at 50% 70%, rgba(60, 110, 220, .26), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(120, 70, 210, .22), transparent 50%);
}
.constellation { position: absolute; width: min(30vw, 320px); }
.constellation.k1 { left: 5vw; top: 18vh; }
.constellation.k2 { right: 5vw; bottom: 14vh; }
.constellation.k3 { right: 9vw; top: 12vh; width: min(22vw, 250px); }
.constellation .c-line { stroke: rgba(201, 182, 255, .7); stroke-width: 1.3; }
.constellation .knots circle { fill: #f3ecff; opacity: 0; }
.constellation .c-label { fill: var(--gold); font: 700 15px "Courier Prime", monospace; letter-spacing: .12em; text-anchor: middle; opacity: 0; }
.bg.on .constellation .c-label { animation: fadeIn 1s 1.6s forwards; }
.bg.on .constellation .knots circle { animation: knot 2.2s ease-in-out infinite alternate; }
.bg.on .constellation .knots circle:nth-child(2n) { animation-delay: -1.1s; }
@keyframes knot { from { opacity: .3; } to { opacity: 1; } }
.ribbons { position: absolute; left: 0; bottom: 0; width: 100%; height: 34vh; stroke: rgba(201, 182, 255, .3); stroke-width: 1.4; --dur: 4s; }
.crystal { position: absolute; left: 50%; top: calc(var(--eyes-top) + 15vh); width: clamp(110px, 14vw, 170px); transform: translateX(-50%); }
.crystal svg { width: 100%; overflow: visible; }
.crystal .c-ring { fill: none; stroke: rgba(255, 207, 112, .45); stroke-dasharray: 1 8; }
.crystal ellipse { fill: none; stroke: rgba(201, 182, 255, .55); stroke-width: 1.2; }
.crystal .orb1, .crystal .orb2 { transform-box: view-box; transform-origin: 110px 110px; }
.bg.on .crystal .orb1 { animation: spin 9s linear infinite; }
.bg.on .crystal .orb2 { animation: spin 13s linear infinite reverse; }
.crystal .glass { fill: url(#glassG); stroke: rgba(240, 230, 255, .8); stroke-width: 1.5; }
.crystal .core { fill: #fff8e6; transform-box: fill-box; transform-origin: center; }
.bg.on .crystal .core { animation: pulse 2.4s ease-in-out infinite; }
.bg.on .crystal { animation: hover 4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(.82); opacity: .7; } }
@keyframes hover { 50% { transform: translate(-50%, -10px); } }
@keyframes fadeIn { to { opacity: 1; } }

/* --- Sức khỏe --- */
.bg[data-scene="health"] {
  background:
    radial-gradient(ellipse at 80% 55%, rgba(210, 40, 80, .3), transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(120, 30, 120, .25), transparent 55%);
}
.big-heart { position: absolute; right: 7vw; top: 50%; width: min(38vw, 420px); transform: translateY(-50%); stroke: rgba(255, 230, 240, .85); stroke-width: 1.6; }
.big-heart .beat { fill: #ff2d55; opacity: 0; transform-box: fill-box; transform-origin: center; }
.bg.on .big-heart .beat { animation: beatIn 1s 1.8s forwards, heartbeat 1.2s 1.8s ease-in-out infinite; }
@keyframes beatIn { to { opacity: .9; } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.14); } 28% { transform: scale(1); } 42% { transform: scale(1.1); } }
.ecg { position: absolute; left: 4vw; bottom: 9vh; width: min(46vw, 520px); height: 90px; fill: none; stroke-linejoin: round; }
.ecg-base { stroke: rgba(255, 140, 170, .18); stroke-width: 2; }
.ecg-run { stroke: #ff7a9c; stroke-width: 2.4; stroke-dasharray: .22 .78; stroke-dashoffset: 1; }
.bg.on .ecg-run { animation: ecg 2.4s linear infinite; }
@keyframes ecg { to { stroke-dashoffset: 0; } }
.mini-hearts i { position: absolute; bottom: -30px; color: #ff6b8f; font-style: normal; opacity: 0; }
.mini-hearts i:nth-child(1) { left: 8%; font-size: 18px; animation-delay: 0s; }
.mini-hearts i:nth-child(2) { left: 22%; font-size: 12px; animation-delay: 1.4s; }
.mini-hearts i:nth-child(3) { left: 36%; font-size: 22px; animation-delay: 2.6s; }
.mini-hearts i:nth-child(4) { left: 55%; font-size: 14px; animation-delay: .7s; }
.mini-hearts i:nth-child(5) { left: 68%; font-size: 16px; animation-delay: 3.3s; }
.mini-hearts i:nth-child(6) { left: 90%; font-size: 20px; animation-delay: 2s; }
.bg.on .mini-hearts i { animation-name: rise; animation-duration: 6s; animation-iteration-count: infinite; animation-timing-function: ease-in; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .8; } 100% { transform: translateY(-90vh) rotate(20deg); opacity: 0; } }

/* --- Xinh đẹp --- */
.bg[data-scene="beauty"] {
  background:
    radial-gradient(ellipse at 50% 110%, rgba(170, 110, 230, .38), transparent 55%),
    radial-gradient(ellipse at 50% 0%, rgba(90, 50, 160, .22), transparent 60%);
}
.vines { position: absolute; bottom: 0; height: 96vh; width: auto; aspect-ratio: 260 / 610; }
.vines.left { left: 0; }
.vines.right { right: 0; transform: scaleX(-1); }
.horizon-svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 14vh; }
.vines .vine { stroke: rgba(235, 215, 255, .75); stroke-width: 1.4; }
.vines .bloom { stroke: rgba(255, 220, 160, .95); stroke-width: 1.3; }
.horizon-svg .horizon { stroke: rgba(210, 170, 255, .6); stroke-width: 2; --dur: 3.5s; }
.vines .dot { fill: #fff; opacity: 0; }
.bg.on .vines .dot { animation: knot 1.8s ease-in-out infinite alternate; }
.butterfly { position: absolute; width: 52px; height: 40px; display: flex; justify-content: center; }
.butterfly i { width: 24px; height: 34px; border: 1.5px solid rgba(255, 220, 160, .9); border-radius: 60% 40% 50% 50%; background: rgba(255, 200, 120, .15); transform-origin: right center; }
.butterfly i + i { transform-origin: left center; border-radius: 40% 60% 50% 50%; }
.bg.on .butterfly i { animation: flapL .35s ease-in-out infinite alternate; }
.bg.on .butterfly i + i { animation-name: flapR; }
@keyframes flapL { to { transform: scaleX(.25); } }
@keyframes flapR { to { transform: scaleX(.25); } }
.butterfly.b1 { left: 16%; top: 24%; }
.butterfly.b2 { right: 18%; top: 18%; transform: scale(.8); }
.butterfly.b3 { right: 28%; top: 62%; transform: scale(.65); }
.bg.on .butterfly.b1 { animation: flutter1 9s ease-in-out infinite; }
.bg.on .butterfly.b2 { animation: flutter2 11s ease-in-out infinite; }
.bg.on .butterfly.b3 { animation: flutter1 8s ease-in-out infinite reverse; }
@keyframes flutter1 { 25% { transform: translate(40px, -30px) rotate(8deg); } 50% { transform: translate(80px, 10px) rotate(-6deg); } 75% { transform: translate(30px, 30px) rotate(4deg); } }
@keyframes flutter2 { 33% { transform: translate(-50px, 20px) scale(.8) rotate(-8deg); } 66% { transform: translate(-20px, -30px) scale(.8) rotate(6deg); } }

/* --- Nụ cười --- */
.bg[data-scene="smile"] {
  background:
    radial-gradient(ellipse at 75% 35%, rgba(255, 160, 200, .2), transparent 55%),
    radial-gradient(ellipse at 20% 90%, rgba(150, 70, 160, .26), transparent 55%);
}
.moon-glow { position: absolute; right: 8vw; top: 6vh; width: 34vmin; height: 34vmin; border-radius: 50%; background: radial-gradient(circle, rgba(255, 220, 180, .32), transparent 65%); }
.crescent { position: absolute; right: 12vw; top: 10vh; width: 22vmin; }
.bg.on .crescent { animation: hover2 6s ease-in-out infinite; }
@keyframes hover2 { 50% { transform: translateY(-10px) rotate(-4deg); } }
.girl-pink { position: absolute; right: 9vw; bottom: 0; height: 66vh; width: auto; aspect-ratio: 160 / 440; stroke: #ffb6d5; -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent); mask-image: linear-gradient(to bottom, #000 75%, transparent); }
.girl-pink .glow { stroke-width: 6; opacity: .22; }
.girl-pink .core { stroke-width: 1.6; }
.notes i { position: absolute; bottom: 18vh; font-style: normal; color: #ffd6a0; opacity: 0; font-size: 22px; }
.notes i:nth-child(1) { left: 12%; } .notes i:nth-child(2) { left: 20%; animation-delay: 1.1s !important; }
.notes i:nth-child(3) { left: 27%; animation-delay: 2.2s !important; } .notes i:nth-child(4) { left: 8%; animation-delay: 3.1s !important; }
.notes i:nth-child(5) { left: 33%; animation-delay: 4s !important; }
.bg.on .notes i { animation: note 5s ease-out infinite; }
@keyframes note { 0% { transform: translate(0, 0) rotate(-10deg); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(30px, -45vh) rotate(15deg); opacity: 0; } }

/* --- Cỏ 4 lá --- */
.bg[data-scene="clover"] { background: radial-gradient(ellipse at 70% 40%, rgba(40, 200, 110, .36), transparent 55%), radial-gradient(ellipse at 30% 70%, rgba(20, 120, 70, .3), transparent 60%), rgba(1, 12, 8, .55); }
.clover-wrap {
  position: absolute; left: 72vw; top: 14vh; width: clamp(130px, 17vw, 230px);
  transform: translateX(-50%);
  transition: left 1.4s cubic-bezier(.5, 0, .2, 1), top 1.4s cubic-bezier(.5, 0, .2, 1), width 1.4s;
}
.clover { width: 100%; stroke: #8dffb7; stroke-width: 3; }
.clover .leaf { fill: rgba(70, 230, 130, 0); }
.bg.on .clover .leaf { animation: draw 1.6s ease var(--dl) both, leafFill 1s ease calc(var(--dl) + 1.4s) forwards; }
@keyframes leafFill { to { fill: rgba(70, 230, 130, .55); } }
.bg.on .clover-wrap { animation: sway 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: translateX(-50%) rotate(-5deg) translateY(-8px); } }
body.give .clover-wrap { left: 50%; top: calc(var(--eyes-top) + var(--e) / 2 + 4vh); width: clamp(80px, 9vw, 120px); }

/* --- May mắn --- */
.bg[data-scene="luck"] { background: radial-gradient(ellipse at 0% 30%, rgba(120, 255, 170, .36), transparent 55%), radial-gradient(ellipse at 100% 100%, rgba(30, 140, 80, .32), transparent 60%), rgba(1, 12, 8, .5); }
.rays i {
  position: absolute; left: -20vw; top: 30vh; width: 140vw; height: 9vh;
  background: linear-gradient(90deg, rgba(200, 255, 220, .35), rgba(200, 255, 220, 0) 70%);
  transform-origin: 0 50%; opacity: .5;
}
.rays i:nth-child(1) { transform: rotate(8deg); }
.rays i:nth-child(2) { transform: rotate(18deg); height: 5vh; }
.rays i:nth-child(3) { transform: rotate(-4deg); height: 6vh; }
.rays i:nth-child(4) { transform: rotate(28deg); height: 12vh; }
.bg.on .rays i { animation: ray 4s ease-in-out infinite alternate; }
.bg.on .rays i:nth-child(2n) { animation-delay: -2s; }
@keyframes ray { from { opacity: .15; } to { opacity: .6; } }

/* --- Câu hỏi & kết --- */
.bg[data-scene="question"] {
  background:
    radial-gradient(ellipse at 52% 8%, rgba(190, 160, 255, .45), transparent 40%),
    radial-gradient(ellipse at 75% 35%, rgba(80, 90, 230, .25), transparent 55%),
    radial-gradient(ellipse at 20% 85%, rgba(130, 50, 170, .22), transparent 55%);
}
.bg[data-scene="final"] {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 190, 110, .2), transparent 50%),
    radial-gradient(ellipse at 15% 85%, rgba(140, 80, 240, .28), transparent 55%),
    radial-gradient(ellipse at 90% 80%, rgba(255, 120, 190, .18), transparent 55%);
}

/* ================= Canvas hạt ================= */
#fx { position: fixed; inset: 0; z-index: 2; pointer-events: none; display: block; }

/* ================= Đôi mắt robot ================= */
.eyes {
  position: fixed; left: 50%; top: var(--eyes-top); z-index: 5; pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity .8s, top 1.2s cubic-bezier(.5, 0, .2, 1), left 1.2s cubic-bezier(.5, 0, .2, 1);
}
.eyes[data-expr="hidden"] { opacity: 0; }
.eyes.low { top: 80%; left: 42%; }
.eyes.at-wheel { top: var(--wheel-top); }
.eye-row { display: flex; gap: var(--gap); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.eye { position: relative; width: var(--e); height: var(--e); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.sq {
  position: absolute; inset: 0; border-radius: 24%;
  background: radial-gradient(circle at 50% 45%, #c8ffff 0%, var(--cyan) 55%, #22d8f0 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .3) inset, 0 0 16px var(--cyan-glow), 0 0 44px rgba(25, 227, 255, .6);
  transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), opacity .2s, border-radius .3s;
}
.eye svg {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  opacity: 0; transform: scale(.5);
  transition: opacity .2s, transform .35s cubic-bezier(.3, 1.5, .5, 1);
}
.eye .arc path, .eye .chev path { fill: none; stroke: var(--cyan); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.eye .arc, .eye .chev { filter: drop-shadow(0 0 6px var(--cyan-glow)); }
.eye .hrt path { fill: #ff7cb5; }
.eye .hrt { filter: drop-shadow(0 0 10px rgba(255, 110, 170, .9)); }
.blush {
  position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%);
  font-size: calc(var(--e) * .2); letter-spacing: 3px; color: #ff8fb8; opacity: 0; transition: opacity .4s;
  white-space: nowrap;
}

.eyes[data-expr="closed"] .sq { transform: scaleY(.08); }
.eyes[data-expr="blush"] .blush, .eyes[data-expr="love"] .blush, .eyes[data-expr="squint"] .blush, .eyes[data-expr="heart"] .blush { opacity: 1; }
.eyes[data-expr="love"] .eye { transform: scale(1.12); }
.eyes[data-expr="happy"] .sq { opacity: 0; transform: scaleY(.1); }
.eyes[data-expr="happy"] .arc { opacity: 1; transform: none; }
.eyes[data-expr="wink"] .r .sq { opacity: 0; transform: scaleY(.1); }
.eyes[data-expr="wink"] .r .arc { opacity: 1; transform: none; }
.eyes[data-expr="squint"] .sq { opacity: 0; transform: scale(.4); }
.eyes[data-expr="squint"] .chev { opacity: 1; transform: none; }
.eyes[data-expr="heart"] .sq { opacity: 0; transform: scale(.4); }
.eyes[data-expr="heart"] .hrt { opacity: 1; transform: none; animation: hrtBeat 1s ease-in-out infinite; }
@keyframes hrtBeat { 50% { transform: scale(1.15); } }
.eyes.blink .sq { transform: scaleY(.08) !important; transition-duration: .07s; }
.eyes.look .eye { animation: look 2.8s ease-in-out; }
@keyframes look { 20%, 40% { transform: translateX(-16%); } 60%, 80% { transform: translateX(16%); } }
.eyes.small { top: 24%; }
.eyes.small .eye-row { transform: scale(.7); animation: none; }

/* ================= Lời thoại ================= */
.line {
  position: fixed; z-index: 6; left: 50%; transform: translateX(-50%);
  width: min(calc(100vw - 32px), 900px); text-align: center; pointer-events: none;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem); line-height: 1.65; letter-spacing: .12em; font-weight: 700;
  text-shadow: 0 0 6px rgba(255, 255, 255, .6), 0 0 18px rgba(200, 180, 255, .4);
  opacity: 0; transition: opacity .3s;
}
.line.show { opacity: 1; }
.line span { opacity: 0; transition: opacity .18s; }
.line span.on { opacity: 1; }
.line.pos-top { top: 9vh; }
.line.pos-center { top: 50%; transform: translate(-50%, -50%); }
.line.pos-below { top: calc(var(--eyes-top) + var(--e) / 2 + 9vh); }
.line.pos-topleft {
  top: 34vh; left: 25vw; width: min(46vw, 560px);
  font-size: clamp(1.4rem, 3.4vw, 2.7rem); line-height: 1.5; letter-spacing: .06em;
}
.c-p { color: #ff9fd0; text-shadow: 0 0 8px rgba(255, 120, 190, .95), 0 0 22px rgba(255, 90, 180, .6); }
.c-g { color: var(--green); text-shadow: 0 0 10px rgba(60, 255, 140, .8); }
.c-b { color: #9ad8ff; text-shadow: 0 0 12px rgba(100, 180, 255, .9); }
.c-r { color: #ff7d95; text-shadow: 0 0 10px rgba(255, 60, 100, .8); }
.c-y { color: var(--gold); text-shadow: 0 0 10px rgba(255, 180, 60, .9), 0 0 24px rgba(255, 160, 40, .5); }
.c-v { color: var(--lavender); text-shadow: 0 0 10px rgba(160, 120, 255, .95), 0 0 24px rgba(139, 92, 246, .6); }

/* ================= Nút ================= */
.btn {
  font: 700 1rem "Courier Prime", monospace; letter-spacing: .06em; color: #fff;
  padding: .8em 1.7em; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 236, 200, .5);
  background: linear-gradient(135deg, #f2a53a, #c46bd6 55%, #7b5cf6);
  box-shadow: 0 0 22px rgba(242, 165, 58, .45), 0 0 34px rgba(139, 92, 246, .35);
  text-shadow: 0 1px 2px rgba(40, 10, 60, .5);
  transition: transform .2s, box-shadow .2s;
}
.btn { white-space: nowrap; }
.btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(242, 165, 58, .7), 0 0 44px rgba(139, 92, 246, .5); }
.btn:active { transform: scale(.96); }

.ask {
  position: fixed; left: 50%; top: calc(var(--eyes-top) + var(--e) / 2 + 9vh); z-index: 8;
  transform: translateX(-50%); display: flex; gap: 18px;
  opacity: 0; pointer-events: none; transition: opacity .6s;
}
.ask.show { opacity: 1; pointer-events: auto; }
.btn.no { background: rgba(255, 255, 255, .08); box-shadow: none; transition: transform .2s, left .25s, top .25s; }
.btn.no.flee { position: fixed; z-index: 9; }
body:not(:has(.ask.show)) > .btn.no.flee { display: none; }

/* ================= Thiệp cuối ================= */
.finale {
  position: fixed; left: 0; right: 0; top: 38%; z-index: 7; padding: 0 16px;
  display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center;
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity 1.4s, transform 1.4s;
}
.finale.show { opacity: 1; transform: none; pointer-events: auto; }
.f-to { letter-spacing: .15em; color: #ffe2b0; }
.f-big {
  font-family: "Dancing Script", cursive; font-size: clamp(3.4rem, 12vw, 7rem); line-height: 1.05;
  background: linear-gradient(90deg, #ffcf70, #ffa8d6, #c9b6ff, #ffa8d6, #ffcf70); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }
.f-title { font-size: clamp(1.1rem, 2.6vw, 1.5rem); font-weight: 700; letter-spacing: .1em; text-shadow: 0 0 12px rgba(255, 190, 100, .7); }
.f-text { max-width: 560px; line-height: 1.7; color: #efe6ff; margin-bottom: .8rem; }

/* ================= Màn bắt đầu ================= */
.intro {
  position: fixed; inset: 0; z-index: 20; cursor: pointer;
  background: radial-gradient(ellipse at 50% 50%, rgba(13, 6, 38, .55), rgba(7, 3, 26, .92) 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem;
  text-align: center; padding: 0 16px; letter-spacing: .12em;
  transition: opacity 1s;
}
.intro.hide { opacity: 0; pointer-events: none; }
.intro-brand {
  font-size: .85rem; letter-spacing: .5em; color: var(--gold); margin-bottom: 1rem;
  text-shadow: 0 0 12px rgba(255, 190, 90, .8);
}
.intro-wait, .intro-tap { font-size: clamp(1.05rem, 2.4vw, 1.5rem); font-weight: 700; text-shadow: 0 0 10px rgba(255, 255, 255, .6); }
.intro-tap { display: none; animation: breathe 2s ease-in-out infinite; }
.intro.ready .intro-wait { display: none; }
.intro.ready .intro-tap { display: block; }
.intro-sub { font-size: .85rem; color: rgba(230, 215, 255, .55); opacity: 0; transition: opacity 1s; }
.intro.ready .intro-sub { opacity: 1; }
@keyframes breathe { 50% { opacity: .35; } }

.music {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 30;
  width: 42px; height: 42px; border-radius: 50%; font-size: 1.1rem; color: var(--gold); cursor: pointer;
  border: 1px solid rgba(255, 207, 112, .4); background: rgba(20, 10, 50, .5);
  opacity: 0; pointer-events: none; transition: opacity 1s;
}
.music.ready { opacity: .85; pointer-events: auto; }
.music.on { animation: spin 4s linear infinite; box-shadow: 0 0 14px rgba(255, 190, 90, .55); }

/* ================= Màn hình dọc / nhỏ ================= */
@media (max-aspect-ratio: 1/1) {
  :root { --eyes-top: 42%; }
  .girls-box { right: 50%; transform: translateX(50%); height: min(74vh, 132vw); }
  .lanterns i:nth-child(1) { right: 10vw; }
  .girls-halo { right: 0; width: 100vw; height: 60vh; bottom: 0; }
  .vol-rays i { width: 14vw !important; }
  .cine-halo { display: none !important; }
  .line.pos-left { left: 50%; top: 9vh; width: calc(100vw - 32px); font-size: clamp(1rem, 4.6vw, 1.4rem); }
  .eyes.at-left { top: 28%; left: 50%; }
  .eyes.at-left .eye-row { transform: scale(.72); }
  .cine { inset: auto 0 0 0; top: 30vh; height: 62vh; width: auto; aspect-ratio: auto; transform: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent); }
  .cine-vid { left: 50%; width: auto; aspect-ratio: 16 / 9; transform: translateX(-50%); }
  .bg.on .cine-vid { animation: reveal 3s cubic-bezier(.4, 0, .2, 1) .3s forwards, panCine 16s ease-in-out 3.3s infinite alternate; }
  .line.pos-topleft { left: 50%; top: 11vh; width: calc(100vw - 32px); font-size: clamp(1.3rem, 6.4vw, 2rem); }
  .eyes.low { top: 30%; left: 50%; }
  :root { --wheel-top: 50%; }
  .wheel-wrap { width: 96vw; }
  .big-heart { right: 50%; transform: translate(50%, 0); top: auto; bottom: 6vh; width: 70vw; opacity: .8; }
  .ecg { width: 80vw; left: 10vw; bottom: 2vh; }
  .constellation { width: 52vw; }
  .constellation.k1 { top: 22vh; }
  .constellation.k2 { bottom: 8vh; }
  .constellation.k3 { right: 3vw; top: 17vh; width: 30vw; }
  .crescent { right: 8vw; top: 22vh; }
  .moon-glow { top: 18vh; }
  .girl-pink { right: 50%; transform: translateX(50%); height: 46vh; }
  .clover-wrap { left: 50%; top: 58vh; }
  .notes i { bottom: 10vh; }
  .vines { height: 70vh; }
  .vines.left { left: -6vw; }
  .vines.right { right: -6vw; }
  .f-title { font-size: 1rem; letter-spacing: .03em; }
  .f-text { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  #sky, .eye-row, .bg.on * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ================= Cảnh "xinh đẹp": khung ngắm quanh mắt + chữ nổi nhẹ ================= */
.ret {
  position: absolute; inset: -22%; pointer-events: none; opacity: 0; transition: opacity .8s;
  /* 4 góc khung ngắm */
  background:
    linear-gradient(var(--cyan), var(--cyan)) top left / 16px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top left / 2px 16px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top right / 16px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) top right / 2px 16px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 16px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 2px 16px no-repeat;
  filter: drop-shadow(0 0 4px var(--cyan-glow));
}
.ret::before { /* vòng nét đứt xoay */
  content: ""; position: absolute; inset: -14%; border-radius: 50%;
  border: 1px dashed rgba(63, 243, 255, .45);
}
.ret::after { /* vạch chữ thập ở giữa 4 cạnh */
  content: ""; position: absolute; inset: -6%;
  background:
    linear-gradient(rgba(63, 243, 255, .7), rgba(63, 243, 255, .7)) top center / 2px 8px no-repeat,
    linear-gradient(rgba(63, 243, 255, .7), rgba(63, 243, 255, .7)) bottom center / 2px 8px no-repeat,
    linear-gradient(rgba(63, 243, 255, .7), rgba(63, 243, 255, .7)) left center / 8px 2px no-repeat,
    linear-gradient(rgba(63, 243, 255, .7), rgba(63, 243, 255, .7)) right center / 8px 2px no-repeat;
}
body[data-scene="beauty"] .ret { opacity: 1; animation: retPulse 2.4s ease-in-out infinite; }
body[data-scene="beauty"] .ret::before { animation: spin 9s linear infinite; }
@keyframes retPulse { 50% { transform: scale(1.06); } }
body[data-scene="beauty"] .line { animation: floaty 3.2s ease-in-out infinite; }
@keyframes floaty { 50% { translate: 0 -6px; } }
body[data-scene="beauty"] .line .c-p.on { animation: pinkPulse 2s ease-in-out infinite; }
@keyframes pinkPulse { 50% { text-shadow: 0 0 14px rgba(255, 120, 190, 1), 0 0 34px rgba(255, 80, 170, .85); color: #ffc2e0; } }

/* Chữ "hero" hai dòng neon (cảnh xinh đẹp) */
.line.pos-hero {
  top: 13vh; font-family: "Quicksand", "Courier Prime", sans-serif; font-weight: 700;
  font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1.15; letter-spacing: .02em;
  color: #f4fbff;
  text-shadow: 0 0 6px #fff, 0 0 16px rgba(140, 220, 255, .9), 0 0 36px rgba(120, 160, 255, .6);
}
.line.pos-hero .c-p { color: #ff7ec4; text-shadow: 0 0 6px #ffd0ea, 0 0 18px rgba(255, 70, 170, 1), 0 0 40px rgba(255, 50, 160, .7); }
/* Đôi mắt khối kính lập phương (cảnh xinh đẹp) */
.eye .cube { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: none; transition: opacity .6s; overflow: visible; }
.eye .cube rect, .eye .cube path { fill: none; stroke: #9ffaff; stroke-width: 2.5; }
.eye .cube rect:first-child { fill: rgba(63, 243, 255, .1); }
body[data-scene="beauty"] .eye .cube { opacity: 1; filter: drop-shadow(0 0 5px var(--cyan-glow)); }
body[data-scene="beauty"] .eyes[data-expr="open"] .sq,
body[data-scene="beauty"] .eyes[data-expr="blush"] .sq {
  background: radial-gradient(circle at 50% 50%, rgba(170, 255, 255, .55), rgba(63, 243, 255, .16) 65%, rgba(63, 243, 255, .06));
  border-radius: 6%;
  box-shadow: inset 0 0 22px rgba(63, 243, 255, .6), 0 0 18px var(--cyan-glow), 0 0 44px rgba(25, 227, 255, .35);
}
@media (max-aspect-ratio: 1/1) { .line.pos-hero { top: 9vh; font-size: clamp(1.7rem, 8.5vw, 2.6rem); } }

/* Mắt cười dạng nhiều vòng cung neon có hạt sáng chạy dọc (cảnh nụ cười) */
.eye .fan { position: absolute; inset: -18% -24%; width: 148%; height: 136%; overflow: visible; opacity: 0; transform: none; transition: opacity .5s; }
.eye .fan path { fill: none; stroke-linecap: round; }
.eye .fan .f1 { stroke: #3ff3ff; stroke-width: 3.2; }
.eye .fan .f2 { stroke: #7ff8ff; stroke-width: 2.2; }
.eye .fan .f3 { stroke: #3ff3ff; stroke-width: 1.6; opacity: .8; }
.eye .fan .f4 { stroke: #b8fbff; stroke-width: 1.2; opacity: .6; }
body[data-scene="smile"] .eyes[data-expr="happy"] .arc { opacity: 0 !important; }
body[data-scene="smile"] .eyes[data-expr="happy"] .fan { opacity: 1; filter: drop-shadow(0 0 4px #19e3ff) drop-shadow(0 0 10px rgba(25, 227, 255, .6)); }
body[data-scene="smile"] .eyes[data-expr="happy"] .fan path { stroke-dasharray: 6 3; animation: fanFlow 1.6s linear infinite; }
body[data-scene="smile"] .eyes[data-expr="happy"] .fan .f2 { animation-duration: 2.2s; animation-direction: reverse; }
body[data-scene="smile"] .eyes[data-expr="happy"] .fan .f4 { animation-duration: 1.2s; }
@keyframes fanFlow { to { stroke-dashoffset: -18; } }

/* ================= Cảnh câu hỏi: mắt khối lập phương 3D + nạp năng lượng + thư kính mờ ================= */
.eye .cube3d { position: absolute; inset: -14%; width: 128%; height: 128%; overflow: visible; opacity: 0; transform: none; transition: opacity .5s; }
.eye .cube3d path { fill: none; stroke: #8ff9ff; stroke-width: 2; stroke-linejoin: round; }
.eye .cube3d .back { stroke-dasharray: 3 3; opacity: .6; }
.eye .cube3d .core3d { fill: rgba(120, 250, 255, .35); stroke: #c8ffff; stroke-width: 1.5; }
body[data-scene="question"] .eyes:is([data-expr="open"], [data-expr="blush"], [data-expr="squint"]) .cube3d { opacity: 1; filter: drop-shadow(0 0 5px #19e3ff) drop-shadow(0 0 14px rgba(25, 227, 255, .6)); }
body[data-scene="question"] .eyes:is([data-expr="open"], [data-expr="blush"]) .sq {
  background: radial-gradient(circle, rgba(200, 255, 255, .55), rgba(63, 243, 255, .12) 70%);
  border-radius: 4%; transform: scale(.78);
  box-shadow: inset 0 0 18px rgba(63, 243, 255, .6), 0 0 26px var(--cyan-glow);
}
body[data-scene="question"] .ret { opacity: 1; }

.charge {
  position: fixed; left: 50%; top: calc(var(--eyes-top) + var(--e) / 2 + 9vh); z-index: 8; transform: translateX(-50%);
  width: min(calc(100vw - 32px), 460px); text-align: center; opacity: 0; transition: opacity .5s; pointer-events: none;
}
.charge.show { opacity: 1; }
.charge p { font-weight: 700; letter-spacing: .06em; font-size: clamp(.95rem, 2vw, 1.15rem); text-shadow: 0 0 10px rgba(120, 240, 255, .8); margin-bottom: .7em; }
.charge-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(160, 230, 255, .4); overflow: hidden; }
.charge-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3ff3ff, #ff7ec4, #ffd27a); box-shadow: 0 0 14px #3ff3ff; }

.finale { top: 50%; transform: translateY(-40%); }
.finale.show { transform: translateY(-50%); }
.finale .card {
  max-width: 600px; padding: 1.6rem 1.8rem 1.8rem; border-radius: 26px; text-align: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 20px 60px rgba(10, 0, 40, .45), 0 0 40px rgba(255, 126, 196, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
}
.finale .f-text { font-size: clamp(1rem, 2.1vw, 1.2rem); line-height: 1.75; color: #fff; margin: .2rem 0 .9rem; }
.finale .f-text b { color: #ffd0ec; text-shadow: 0 0 10px rgba(255, 120, 200, .8); }
.eyes.small { top: 13%; }

/* Đôi mắt robot vẽ bằng canvas (EyeFx) — cùng một thiết kế cho mọi cảnh */
.eye-row canvas { display: block; }
.music { font-size: 1rem; }
.music:not(.on) { opacity: .45; }

/* Cảnh chòm sao: đủ 12 cung hoàng đạo */
.constellation.zall { left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.zall .c-line { stroke-width: 1.2; }
.zall .c-label { font-size: 13px; letter-spacing: .08em; }
.bg.on .zall .c-label { animation: fadeIn 1s var(--lb, 1.6s) forwards; }
.zall .zc.hi .c-line { stroke: rgba(255, 214, 140, .85); stroke-width: 1.6; }
.zall .zc.hi .knots circle { fill: #fff3d4; }
.zall .zc.hi .c-label { font-size: 15px; }
body[data-scene="oracle"] #sky { opacity: .3; }
@media (max-width: 700px) { .zall .c-label { font-size: 11px; } .zall .zc.hi .c-label { font-size: 12px; } }
