:root {
  color-scheme: dark;
  --ink: #f7f8ff;
  --muted: #8d96ad;
  --paper: #11182b;
  --coral: #ff6b8d;
  --yellow: #ffd84d;
  --purple: #7856ff;
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, rgba(40,200,181,.18), transparent 32rem), radial-gradient(circle at 88% 8%, rgba(231,80,158,.15), transparent 30rem), radial-gradient(circle at 75% 92%, rgba(91,119,221,.2), transparent 35rem), #11182b;
  overflow-x: hidden;
  overflow-y: auto;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgba(120,86,255,.38); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

.topbar {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 26px;
  background: linear-gradient(to bottom, rgba(10,15,29,.68), transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-weight: 950;
  font-size: 22px;
  letter-spacing: -1px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: white;
  font: 900 20px/1 "Nunito", sans-serif;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  transform: rotate(-5deg);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }

.language-picker { display: flex; align-items: center; gap: 8px; }
.language-picker > label { color: rgba(255,255,255,.64); font-size: 9px; line-height: 1; font-weight: 900; letter-spacing: 1px; cursor: pointer; }

.language-select {
  height: 40px;
  max-width: 112px;
  padding: 0 28px 0 13px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  outline: 0;
  background: rgba(255,255,255,.07);
  color-scheme: light;
  font: 800 11px/1 inherit;
  cursor: pointer;
}
.language-select option { color: #171b2d; background: #fff; font-weight: 700; }
.language-select:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

.icon-button, .pill-button {
  height: 40px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(57, 42, 69, .06);
}
.icon-button { width: 40px; }
.pill-button { padding: 0 18px; font-size: 13px; font-weight: 900; }

.page-shell {
  width: 100%;
  min-height: 100svh;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(620px, 960px);
  justify-content: center;
  align-items: start;
}

.game-column { min-width: 0; min-height: 100svh; position: relative; }

.game-card {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: transparent;
}

.game-head {
  position: absolute;
  z-index: 15;
  left: 24px;
  right: 24px;
  top: 86px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
  padding: 0;
  border: 0;
}
.eyebrow { font-size: 9px; letter-spacing: 2px; color: rgba(255,255,255,.38); font-weight: 800; }
.game-head h1 { margin: 4px 0 0; color: #fff; font-size: 20px; letter-spacing: -.7px; font-weight: 750; }
.game-head h1 em { color: var(--coral); font-style: normal; }
.break-result {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: calc(50% + 160px);
  padding: 10px 16px;
  color: white;
  background: rgba(8,12,24,.78);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  opacity: 0;
  transform: translate(-50%, 18px) scale(.7) rotate(-4deg);
  transition: .28s cubic-bezier(.2,1.4,.4,1);
  pointer-events: none;
  white-space: nowrap;
}
.break-result.show { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(-2deg); }

.mini-stats { width: min(240px, 34vw); margin-left: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.mini-stats > .stat-chip, .fortune-replay { min-width: 0; height: 50px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.06); backdrop-filter: blur(10px); }
.mini-stats > .stat-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: rgba(255,255,255,.5); text-align: center; }
.mini-stats small { width: 100%; overflow: hidden; font-size: 9px; line-height: 1.1; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.mini-stats strong { display: flex; align-items: baseline; justify-content: center; color: #fff; line-height: 1; }
.mini-stats b { color: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }
.mini-stats em { margin-left: 2px; color: rgba(255,255,255,.52); font-size: 9px; font-style: normal; font-weight: 800; }
.fortune-replay { color: #ffe6a0; border-color: rgba(255,221,125,.28); background: rgba(255,211,91,.1); font-size: 9px; line-height: 1.25; font-weight: 900; cursor: pointer; }
.fortune-replay:hover { color: #fff5d2; background: rgba(255,211,91,.18); }
.mini-stats > [hidden] { display: none !important; }

.playground {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, rgba(112,127,177,.12), transparent 25rem);
}

.question-box {
  position: absolute;
  z-index: 15;
  left: 50%;
  top: 155px;
  width: min(390px, calc(100% - 48px));
  height: 46px;
  display: flex;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(10,15,29,.46);
  box-shadow: 0 14px 40px rgba(0,0,0,.12);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  transition: opacity .2s, border-color .2s;
}
.question-box:focus-within { border-color: rgba(255,255,255,.28); }
.question-box.locked { opacity: .54; }
.question-box input { min-width: 0; flex: 1; padding: 0 8px 0 15px; color: #fff; background: transparent; border: 0; outline: 0; font-size: 13px; }
.question-box input::placeholder { color: rgba(255,255,255,.35); }
.question-box input:disabled { color: rgba(255,255,255,.68); -webkit-text-fill-color: rgba(255,255,255,.68); opacity: 1; }
.question-box button { min-width: 58px; padding: 0 13px; color: #fff; border: 0; border-radius: 999px; background: rgba(255,255,255,.11); font-size: 11px; font-weight: 800; cursor: pointer; }
.question-box button:disabled { color: rgba(255,255,255,.55); cursor: default; }

.answer-card {
  position: absolute;
  z-index: 14;
  left: 50%;
  top: 50%;
  width: min(440px, calc(100% - 44px));
  padding: 45px 30px 31px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 23px;
  color: #fff;
  text-align: center;
  background: rgba(12,17,31,.86);
  box-shadow: 0 30px 90px rgba(0,0,0,.45);
  backdrop-filter: blur(22px);
  opacity: 0;
  transform: translate(-50%, -42%) scale(.88);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2,1.3,.4,1);
  pointer-events: none;
}
.answer-card.show { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.answer-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: rgba(255,255,255,.68); border: 1px solid rgba(255,255,255,.12); border-radius: 50%; background: rgba(255,255,255,.06); font-size: 21px; font-weight: 500; line-height: 1; cursor: pointer; transition: color .15s, background .15s, transform .15s; }
.answer-close:hover { color: #fff; background: rgba(255,255,255,.13); }
.answer-close:active { transform: scale(.92); }
.answer-kind { display: block; margin-bottom: 10px; color: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: 1.2px; }
.answer-question { margin: 0 0 14px; color: rgba(255,255,255,.42); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.answer-card h2 { margin: 0; color: #fff; font-size: clamp(22px, 4vw, 29px); font-weight: 760; line-height: 1.48; letter-spacing: -1px; word-break: keep-all; }

.ambient { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .18; }
.ambient-one { width: 220px; height: 220px; background: #47d9c3; left: 3%; top: 22%; }
.ambient-two { width: 260px; height: 260px; background: #c957aa; right: 2%; bottom: 10%; }
.floating-copy { position: absolute; z-index: 12; left: 50%; top: 25%; transform: translateX(-50%); margin: 0; color: rgba(255,255,255,.58); font-weight: 650; font-size: 13px; letter-spacing: -.2px; pointer-events: none; }
.current-hit { position: absolute; z-index: 13; left: 50%; top: calc(25% + 28px); display: flex; align-items: baseline; gap: 6px; min-width: 88px; padding: 6px 11px; color: rgba(255,255,255,.46); border: 1px solid rgba(255,255,255,.09); border-radius: 999px; background: rgba(8,13,26,.42); box-shadow: 0 8px 24px rgba(0,0,0,.12); backdrop-filter: blur(10px); transform: translateX(-50%); pointer-events: none; }
.current-hit > span { font-size: 8px; line-height: 1; font-weight: 800; white-space: nowrap; }
.current-hit strong { display: flex; align-items: baseline; margin-left: auto; color: #fff; line-height: 1; }
.current-hit b { font-size: 13px; font-variant-numeric: tabular-nums; }
.current-hit em { margin-left: 2px; color: rgba(255,255,255,.48); font-size: 8px; font-style: normal; font-weight: 800; }

.ball-wrap {
  position: relative;
  width: 440px;
  height: 440px;
  display: grid;
  place-items: center;
  z-index: 2;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.ball-wrap *, .floating-copy, .break-result {
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
.ball-wrap::before, .ball-wrap::after { content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.5); }
.ball-wrap::before { width: 330px; height: 330px; z-index: -1; background: radial-gradient(circle, rgba(255,222,114,.46), rgba(255,184,62,.12) 42%, transparent 70%); filter: blur(18px); }
.ball-wrap::after { width: 365px; height: 365px; z-index: -1; border: 1px solid rgba(255,225,133,.5); box-shadow: 0 0 32px rgba(255,202,76,.22), inset 0 0 32px rgba(255,202,76,.13); }
.fortune-omen-1 .ball-wrap::before { opacity: .16; transform: translate(-50%, -50%) scale(.82); transition: .7s ease; }
.fortune-omen-2 .ball-wrap::before { opacity: .42; transform: translate(-50%, -50%) scale(1.02); animation: omenGlow 1.8s ease-in-out infinite; }
.fortune-omen-2 .ball-wrap::after { opacity: .22; transform: translate(-50%, -50%) scale(.9); animation: omenRing 4s linear infinite; }
.fortune-omen-3 .ball-wrap::before { opacity: .78; filter: blur(12px); animation-duration: .75s; }
.fortune-omen-3 .ball-wrap::after { opacity: .7; animation-duration: 1.7s; }
.fortune-omen-1 .wax-ball { box-shadow: inset -18px -22px 32px rgba(91,22,56,.18), inset 12px 13px 24px rgba(255,255,255,.32), 0 34px 70px rgba(0,0,0,.38), 0 0 62px rgba(255,214,95,.16); }
.fortune-omen-2 .wax-ball { filter: brightness(1.04) saturate(1.04); }
.fortune-omen-3 .wax-ball { filter: brightness(1.12) saturate(.92); }
.fortune-mote { position: absolute; z-index: 12; left: var(--mote-x); top: var(--mote-y); width: var(--mote-size); height: var(--mote-size); border-radius: 50%; background: #fff0a9; box-shadow: 0 0 9px 3px rgba(255,210,84,.58); pointer-events: none; animation: omenMote 1.05s ease-out forwards; }
.game-card.fortune-opening .ball-wrap { z-index: 18; animation: omenOpening 1.25s cubic-bezier(.16,1,.3,1) both; }
.game-card.fortune-opening .playground::after { content: ""; position: absolute; z-index: 17; inset: 0; background: radial-gradient(circle at center, transparent 10%, rgba(4,5,16,.88) 67%); animation: omenVignette 1.2s ease-out both; pointer-events: none; }
.game-card.fortune-opening .question-box, .game-card.fortune-opening .floating-copy, .game-card.fortune-opening .current-hit, .game-card.fortune-opening .break-result { opacity: 0; transition: opacity .25s ease; }
.game-card.fortune-opening .wax-ball { animation: membraneCrush .72s cubic-bezier(.2,.8,.24,1) forwards, omenBallBurst 1.2s ease-in both; }

.shadow {
  position: absolute;
  width: 245px;
  height: 38px;
  bottom: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,.42);
  filter: blur(14px);
  transform: scaleX(calc(1 + var(--press, 0) * .3));
}

.wax-ball {
  --press: 0;
  --ball-a: #ff8e91;
  --ball-b: #f95069;
  --shell-a: #ffc4bc;
  --shell-b: #ed6e7d;
  --texture-hue: 0deg;
  --hole: -4%;
  --impact-x: 50%;
  --impact-y: 42%;
  --deform: 0;
  position: relative;
  width: 300px;
  height: 300px;
  padding: 0;
  border: 0;
  border-radius: 48% 52% 49% 51% / 52% 47% 53% 48%;
  cursor: pointer;
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  transform: translateY(calc(var(--deform) * 10px)) scaleX(calc(1 + var(--deform) * .09)) scaleY(calc(1 - var(--deform) * .07)) rotate(calc(var(--deform) * -.7deg));
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.9), transparent 10%),
    radial-gradient(circle at 60% 74%, rgba(87, 17, 52, .2), transparent 28%),
    linear-gradient(145deg, var(--ball-a), var(--ball-b));
  box-shadow:
    inset -18px -22px 32px rgba(91, 22, 56, .18),
    inset 12px 13px 24px rgba(255,255,255,.32),
    0 34px 70px rgba(0,0,0,.38), 0 0 80px color-mix(in srgb, var(--ball-a) 22%, transparent);
  transform-origin: 50% 70%;
  transition: transform .22s cubic-bezier(.2,.8,.3,1), border-radius .3s ease, filter .15s ease;
  will-change: transform;
}
.wax-ball * {
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
.wax-ball.mint { --ball-a: #79e7c1; --ball-b: #23bb9d; --texture-hue: 102deg; }
.wax-ball.mint { --shell-a: #c5f7e2; --shell-b: #68cbb4; }
.wax-ball.lemon { --ball-a: #ffe77a; --ball-b: #f6b926; --shell-a: #fff3b3; --shell-b: #e9c24e; --texture-hue: 43deg; }
.wax-ball.grape { --ball-a: #b29aff; --ball-b: #7651dc; --shell-a: #d8caff; --shell-b: #8f74dc; --texture-hue: 238deg; }
.wax-ball.damage-1 { border-radius: 47% 53% 48% 52% / 50% 48% 52% 50%; }
.wax-ball.damage-2 { border-radius: 45% 55% 47% 53% / 48% 46% 54% 52%; }
.wax-ball.damage-3 { border-radius: 43% 57% 46% 54% / 46% 44% 56% 54%; }
.wax-ball.broken { animation: membraneCrush .72s cubic-bezier(.2,.8,.24,1) forwards; pointer-events: none; }
.wax-ball.broken .wax-shell { opacity: .12; filter: brightness(.97) saturate(.92); }
.wax-ball.broken .real-shell-texture { animation: realCrushReveal .55s ease-out forwards; }
.wax-ball.broken .cracks { opacity: .16; }
.wax-ball.broken .outer-membrane { animation: membraneTension .72s cubic-bezier(.2,.8,.24,1) forwards; }
.wax-ball.enter { animation: enterBall .46s cubic-bezier(.2,1.5,.5,1); }

.wax-shell {
  position: absolute;
  inset: -1px;
  z-index: 3;
  border-radius: inherit;
  background:
    radial-gradient(circle at 28% 19%, rgba(255,255,255,.82), transparent 13%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 90 90' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence baseFrequency='.75' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)' opacity='.08'/%3E%3C/svg%3E"),
    linear-gradient(145deg, var(--shell-a), var(--shell-b));
  box-shadow: inset -15px -18px 24px rgba(72,31,51,.2), inset 9px 10px 17px rgba(255,255,255,.5);
  transition: filter .2s ease;
}

.real-shell-texture {
  position: absolute;
  z-index: 4;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background-image: linear-gradient(145deg, var(--shell-a), var(--shell-b)), url("./assets/wax-shell-broken-v1.webp");
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat;
  background-blend-mode: color;
  filter: saturate(1.02) contrast(1.04);
  opacity: var(--damage-haze, 0);
  transform: scale(1.025);
  transition: opacity .28s ease;
  will-change: opacity;
}

.impact-dent {
  position: absolute;
  z-index: 7;
  left: var(--impact-x);
  top: var(--impact-y);
  width: 88px;
  height: 58px;
  border: 2px solid rgba(62,28,47,.18);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(45,14,36,.38), rgba(86,29,57,.13) 48%, transparent 70%);
  box-shadow: inset 0 9px 14px rgba(42,15,34,.25), 0 -3px 5px rgba(255,255,255,.2);
  opacity: calc(var(--press) * 1.45);
  transform: translate(-50%, -50%) scale(calc(.48 + var(--press) * 1.15), calc(.3 + var(--press) * .9));
  transition: left .12s ease, top .12s ease, opacity .08s, transform .08s;
  pointer-events: none;
}
.wax-ball.damage-2 .wax-shell { filter: brightness(.98) saturate(.97); }
.wax-ball.damage-3 .wax-shell { filter: brightness(.95) saturate(.92); }

.ball-shine { position: absolute; width: 44%; height: 23%; left: 17%; top: 13%; border-radius: 50%; background: rgba(255,255,255,.28); transform: rotate(-24deg); filter: blur(4px); }
.ball-grain { position: absolute; inset: 0; border-radius: inherit; opacity: .2; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='x'%3E%3CfeTurbulence baseFrequency='.5' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23x)' opacity='.22'/%3E%3C/svg%3E"); mix-blend-mode: overlay; }

.cracks { position: absolute; z-index: 7; inset: 0; overflow: hidden; contain: layout paint style; will-change: opacity; border-radius: inherit; pointer-events: none; opacity: var(--loose-opacity, 1); transition: opacity .22s ease; }
.wax-reveal, .wax-flake {
  position: absolute;
  left: var(--damage-x);
  top: var(--damage-y);
  pointer-events: none;
}
.wax-reveal {
  z-index: 1;
  width: var(--reveal-size);
  height: var(--reveal-size);
  background-image: linear-gradient(145deg, var(--shell-a), var(--shell-b)), url("./assets/wax-shell-broken-v1.webp");
  background-size: 100% 100%, 300px 300px;
  background-position: center, var(--reveal-bg-x) var(--reveal-bg-y);
  background-repeat: no-repeat;
  background-blend-mode: color;
  filter: saturate(1.02) contrast(1.04);
  -webkit-mask: radial-gradient(closest-side, #000 45%, rgba(0,0,0,.93) 72%, transparent 100%);
  mask: radial-gradient(closest-side, #000 45%, rgba(0,0,0,.93) 72%, transparent 100%);
  transform: translate(-50%, -50%) rotate(var(--damage-r)) scale(.25);
  animation: revealOpen .32s ease-out forwards;
}
.wax-flake {
  z-index: 2;
  width: var(--flake-w);
  height: var(--flake-h);
  background: linear-gradient(165deg, rgba(255,255,255,.7), var(--shell-a) 72%, rgba(255,255,255,.38));
  border: 1px solid rgba(255,255,255,.48);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.38), 0 1px 1.5px rgba(42,23,35,.16);
  transform: translate(-50%, -50%) rotate(var(--damage-r)) scale(.25);
  animation: flakeSettle .38s cubic-bezier(.18,1.25,.35,1) forwards;
}

.outer-membrane {
  position: absolute;
  z-index: 10;
  inset: -3px;
  border-radius: inherit;
  pointer-events: none;
  border: 2px solid rgba(255,255,255,.32);
  background:
    radial-gradient(ellipse at 25% 15%, rgba(255,255,255,.35), transparent 24%),
    linear-gradient(115deg, rgba(255,255,255,.11), transparent 34% 69%, rgba(255,255,255,.08));
  box-shadow: inset 5px 6px 13px rgba(255,255,255,.18), inset -7px -8px 15px rgba(57,30,48,.08), 0 1px 2px rgba(255,255,255,.48);
  opacity: .8;
}

.controls {
  position: absolute;
  z-index: 15;
  left: 50%;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}
.result-share-button { height: 42px; padding: 0 20px; border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; cursor: pointer; backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0,0,0,.18); transition: .15s; }
.result-share-button { color: #fff; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.09); }
.result-share-button:hover { color: #fff; background: rgba(255,255,255,.14); }
.result-share-button:active { transform: scale(.96); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%, 18px); padding: 12px 20px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #fff; background: rgba(8,12,24,.96); box-shadow: 0 12px 36px rgba(0,0,0,.42); backdrop-filter: blur(14px); font-size: 12px; font-weight: 900; opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.partner-panel { z-index: 20; color: #fff; text-align: center; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.085), rgba(255,255,255,.03)); box-shadow: 0 22px 60px rgba(0,0,0,.24); backdrop-filter: blur(16px); }
.partner-panel[hidden] { display: none; }
.partner-body { min-width: 0; }
.partner-toggle { display: none; color: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(12,17,31,.94); font-size: 9px; font-weight: 850; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.partner-kicker { display: block; margin-bottom: 5px; color: rgba(255,255,255,.34); font: 900 7px/1.2 "Nunito", sans-serif; letter-spacing: 2.2px; }
.partner-panel h2 { margin: 0 0 13px; color: rgba(255,255,255,.86); font-size: 14px; font-weight: 850; letter-spacing: -.3px; }
.partner-slot { width: 320px; height: 120px; margin: 0 auto; overflow: hidden; border-radius: 12px; background: rgba(255,255,255,.04); }
.partner-slot iframe { display: block; width: 320px; height: 120px; border: 0; }
.partner-panel p { max-width: 320px; margin: 11px auto 0; color: rgba(255,255,255,.5); font-size: 9px; line-height: 1.55; word-break: keep-all; }
.footnote { position: relative; z-index: 15; display: flex; justify-content: center; gap: 12px; padding: 18px 16px 22px; color: rgba(255,255,255,.35); font-size: 9px; }
.footnote nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.footnote a { color: inherit; text-underline-offset: 2px; }
.footnote a:hover { color: rgba(255,255,255,.75); }

dialog { width: min(390px, calc(100% - 40px)); padding: 34px; border: 1px solid rgba(255,255,255,.12); border-radius: 24px; text-align: center; color: #fff; background: #192137; box-shadow: 0 30px 100px rgba(0,0,0,.45); }
dialog::backdrop { background: rgba(31,22,38,.45); backdrop-filter: blur(4px); }
.modal-close { position: absolute; right: 14px; top: 12px; width: 34px; height: 34px; color: #fff; border: 0; background: rgba(255,255,255,.08); border-radius: 50%; cursor: pointer; font-size: 22px; }
.modal-icon { display: block; font-size: 42px; }
dialog h2 { margin: 10px 0 8px; font-weight: 950; }
dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.modal-go { width: 100%; height: 48px; margin-top: 22px; border: 0; border-radius: 13px; background: var(--coral); color: white; font-weight: 900; cursor: pointer; }
.share-name-form { margin-top: 20px; }
.share-name-input { width: 100%; height: 50px; padding: 0 16px; color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; outline: 0; background: rgba(255,255,255,.07); font-size: 16px; font-weight: 750; text-align: center; }
.share-name-input::placeholder { color: rgba(255,255,255,.35); }
.share-name-input:focus { border-color: rgba(255,211,91,.68); box-shadow: 0 0 0 3px rgba(255,211,91,.1); }
.share-name-form .modal-go { margin-top: 10px; }

.fortune-reveal {
  position: absolute;
  z-index: 40;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: #fff8df;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,218,104,.28), transparent 34rem),
    radial-gradient(circle at 15% 55%, rgba(117,69,205,.3), transparent 32rem),
    radial-gradient(circle at 88% 75%, rgba(180,87,154,.24), transparent 30rem),
    linear-gradient(160deg, #180e2b 0%, #0b1123 47%, #181028 100%);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.035);
  transition: opacity .65s ease, transform 1.2s cubic-bezier(.16,1,.3,1), visibility 0s linear .65s;
  scrollbar-width: none;
}
.fortune-reveal::-webkit-scrollbar { display: none; width: 0; height: 0; }
.fortune-reveal.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.fortune-reveal::before {
  content: "";
  position: fixed;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: white;
  opacity: 0;
}
.fortune-reveal.show::before { animation: fortuneFlash .9s ease-out; }
.fortune-rays { position: fixed; z-index: 0; left: 50%; top: 5%; width: min(980px, 130vw); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .2; background: repeating-conic-gradient(from 4deg, rgba(255,228,139,.42) 0 4deg, transparent 4deg 13deg); -webkit-mask: radial-gradient(circle, #000 0 12%, transparent 63%); mask: radial-gradient(circle, #000 0 12%, transparent 63%); animation: fortuneRaySpin 32s linear infinite; pointer-events: none; }
.fortune-sparks { position: fixed; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.fortune-sparks i { position: absolute; left: var(--spark-x); top: var(--spark-y); width: var(--spark-size); height: var(--spark-size); border-radius: 50%; background: #ffe9a6; box-shadow: 0 0 12px 3px rgba(255,220,119,.5); opacity: 0; animation: fortuneSpark 2.8s var(--spark-delay) ease-in-out infinite; }
.fortune-content { position: relative; z-index: 3; width: min(720px, calc(100% - 48px)); margin: 0 auto; padding: 82px 0 86px; text-align: center; opacity: 0; transform: translateY(28px); }
.fortune-reveal.show .fortune-content { animation: fortuneContentIn .8s .22s cubic-bezier(.16,1,.3,1) forwards; }
.fortune-emblem { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 18px; color: #ffe59a; border: 1px solid rgba(255,225,137,.48); border-radius: 50%; background: radial-gradient(circle, rgba(255,218,108,.23), rgba(255,255,255,.02)); box-shadow: 0 0 0 9px rgba(255,226,143,.035), 0 0 60px rgba(255,211,99,.25); font-size: 31px; animation: fortuneEmblem 2.5s ease-in-out infinite; }
.fortune-drop { color: #e7cb83; font: 800 9px/1.2 "Nunito", sans-serif; letter-spacing: 4px; }
.fortune-content > h2 { margin: 10px 0 4px; color: #fff7d6; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 8vw, 72px); font-weight: 500; line-height: 1.08; letter-spacing: -4px; text-shadow: 0 3px 30px rgba(255,217,112,.18); }
.fortune-date { margin: 0 0 58px; color: rgba(255,239,196,.48); font-size: 12px; letter-spacing: .5px; }
.fortune-section { position: relative; margin: 0; padding: 31px 4px 34px; text-align: left; border-top: 1px solid rgba(255,229,158,.14); }
.fortune-section::before { content: ""; position: absolute; left: 0; top: -1px; width: 54px; height: 1px; background: #ddba65; box-shadow: 0 0 12px #ddba65; }
.fortune-section h3 { margin: 0 0 14px; color: #ffe6a5; font-size: 17px; font-weight: 800; letter-spacing: -.35px; }
.fortune-section h3 small { margin-left: 7px; color: rgba(255,237,190,.34); font: 700 9px/1 "Nunito", sans-serif; letter-spacing: 1.1px; text-transform: uppercase; }
.fortune-section p { margin: 0; color: rgba(255,249,231,.76); font-size: 15px; font-weight: 450; line-height: 1.95; letter-spacing: -.2px; word-break: keep-all; }
.fortune-general { padding-top: 35px; }
.fortune-general p { color: rgba(255,250,231,.9); font-size: 16px; }
.lucky-details { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 10px; border: 1px solid rgba(255,229,158,.14); border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.07); }
.lucky-details > span { position: relative; min-width: 0; min-height: 104px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; padding: 15px 8px; background: rgba(9,10,27,.7); }
.lucky-details b { color: rgba(255,240,199,.4); font-size: 9px; letter-spacing: .7px; }
.lucky-details em { color: #fff4d0; font-size: 13px; font-style: normal; font-weight: 800; text-align: center; word-break: keep-all; }
.lucky-details .lucky-color { width: 17px; height: 17px; margin-bottom: 1px; border: 2px solid rgba(255,255,255,.7); border-radius: 50%; box-shadow: 0 0 14px currentColor; }
.fortune-disclaimer { margin: 25px 0 0; color: rgba(255,255,255,.25); font-size: 10px; }
.fortune-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 25px; }
.fortune-actions button { width: min(260px, 100%); height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 950; cursor: pointer; }
.fortune-actions button:hover { filter: brightness(1.07); transform: translateY(-1px); }
.fortune-again { color: #23182e; border: 0; background: linear-gradient(135deg, #fff1b9, #e9bd58); box-shadow: 0 15px 45px rgba(223,177,74,.24); }
.fortune-share { color: #fff; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.06); box-shadow: 0 10px 30px rgba(0,0,0,.14); backdrop-filter: blur(12px); }
.fortune-share:hover { background: rgba(255,255,255,.11); }
.fortune-instagram { color: #fff; border: 1px solid transparent; background: linear-gradient(#171326, #171326) padding-box, linear-gradient(120deg, #f9ce34, #ee2a7b 52%, #6228d7) border-box; box-shadow: 0 10px 30px rgba(238,42,123,.12); }
.fortune-instagram:hover { background: linear-gradient(#21182f, #21182f) padding-box, linear-gradient(120deg, #f9ce34, #ee2a7b 52%, #6228d7) border-box; }
html[lang="en"] .game-info p, html[lang="en"] .fortune-section p, html[lang="en"] .answer-card h2,
html[lang="ja"] .game-info p, html[lang="ja"] .fortune-section p, html[lang="ja"] .answer-card h2,
html[lang="zh-CN"] .game-info p, html[lang="zh-CN"] .fortune-section p, html[lang="zh-CN"] .answer-card h2 { word-break: normal; overflow-wrap: anywhere; }

@keyframes float { 50% { transform: translateY(-5px); } }
@keyframes revealOpen { to { transform: translate(-50%, -50%) rotate(var(--damage-r)) scale(1); } }
@keyframes flakeSettle { 0% { transform: translate(-50%, -50%) rotate(var(--damage-r)) scale(.25); opacity: .12; } 58% { transform: translate(calc(-50% + var(--flake-dx)), calc(-50% + var(--flake-dy) - 2px)) rotate(var(--damage-r)) scale(1.06); opacity: .9; } 100% { transform: translate(calc(-50% + var(--flake-dx)), calc(-50% + var(--flake-dy))) rotate(var(--damage-r)) scale(1); opacity: .82; } }
@keyframes membraneCrush { 0% { transform: translateY(10px) scale(1.12,.86); } 25% { transform: translateY(48px) scale(1.48,.52) rotate(-1deg); } 48% { transform: translateY(-5px) scale(.92,1.12) rotate(1deg); } 72% { transform: translateY(34px) scale(1.32,.65); } 100% { transform: translateY(25px) scale(1.22,.72); } }
@keyframes membraneTension { 28% { border-width: 3px; opacity: .98; filter: brightness(1.16); } 52% { opacity: .72; } 100% { opacity: .9; } }
@keyframes realCrushReveal { 0% { opacity: .58; transform: scale(1.01); } 42% { opacity: .94; transform: scale(1.055); } 100% { opacity: 1; transform: scale(1.025); } }
@keyframes enterBall { from { transform: scale(0) rotate(-20deg); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fortuneFlash { 0% { opacity: .94; } 24% { opacity: .3; } 100% { opacity: 0; } }
@keyframes fortuneRaySpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes fortuneSpark { 0% { opacity: 0; transform: translateY(24px) scale(.4); } 36%, 62% { opacity: .85; } 100% { opacity: 0; transform: translate(var(--spark-drift), -80px) scale(1.25); } }
@keyframes fortuneContentIn { to { opacity: 1; transform: none; } }
@keyframes fortuneEmblem { 50% { transform: rotate(12deg) scale(1.06); box-shadow: 0 0 0 13px rgba(255,226,143,.025), 0 0 75px rgba(255,211,99,.34); } }
@keyframes omenGlow { 50% { opacity: .72; transform: translate(-50%, -50%) scale(1.13); } }
@keyframes omenRing { to { transform: translate(-50%, -50%) scale(1.08) rotate(360deg); } }
@keyframes omenMote { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.3); } 28% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--mote-drift)), -85px) scale(1.25); } }
@keyframes omenOpening { 0% { filter: brightness(1); } 42% { filter: brightness(.75); } 78% { filter: brightness(1.7); } 100% { filter: brightness(2.3); } }
@keyframes omenVignette { from { opacity: 0; } to { opacity: 1; } }
@keyframes omenBallBurst { 0%, 36% { filter: brightness(1.1); } 68% { filter: brightness(1.8) saturate(.7); } 100% { filter: brightness(3) saturate(.3); box-shadow: 0 0 120px 35px rgba(255,217,100,.8); } }

@media (max-width: 1120px) {
  .page-shell { grid-template-columns: minmax(600px, 960px); }
}

@media (min-width: 1000px) {
  .page-shell { width: 100%; max-width: none; grid-template-columns: minmax(0, 1fr); }
  .game-head { left: clamp(36px, 5vw, 88px); right: clamp(36px, 5vw, 88px); }
  .question-box { top: clamp(155px, calc(50% - min(12.5vw, 210px) - 95px), 225px); width: min(520px, 44vw); }
  .floating-copy { top: calc(50% - min(12.5vw, 210px) - 42px); }
  .current-hit { top: calc(50% - min(12.5vw, 210px) - 14px); }
  .ball-wrap { width: min(520px, 34vw); height: min(520px, 34vw); transform: translateY(40px); }
  .wax-ball { width: clamp(330px, 25vw, 420px); height: auto; aspect-ratio: 1; }
  .break-result { top: calc(50% + min(12.5vw, 210px) + 18px); }
  .controls { top: calc(50% + min(12.5vw, 210px) + 70px); bottom: auto; }
}

@media (min-width: 1340px) {
  .page-shell { width: calc(100% - 200px); margin-left: 0; }
}

@media (min-width: 1340px) {
  .partner-panel.is-desktop-rail { position: fixed; z-index: 19; right: 14px; top: 50%; width: 176px; margin: 0; padding: 8px; border-color: rgba(255,255,255,.07); border-radius: 14px; background: rgba(13,19,34,.5); box-shadow: 0 16px 44px rgba(0,0,0,.16); transform: translateY(-50%); backdrop-filter: blur(8px); }
  .partner-panel.is-desktop-rail .partner-kicker, .partner-panel.is-desktop-rail h2 { display: none; }
  .partner-panel.is-desktop-rail .partner-slot { width: 160px; height: 600px; border-radius: 8px; }
  .partner-panel.is-desktop-rail .partner-slot iframe { width: 160px; height: 600px; }
  .partner-panel.is-desktop-rail p { max-width: 160px; margin-top: 7px; color: rgba(255,255,255,.38); font-size: 7px; line-height: 1.45; }
}

@media (min-width: 681px) and (max-width: 999px) {
  .floating-copy { top: max(212px, calc(50% - 195px)); }
  .current-hit { top: max(240px, calc(50% - 167px)); }
}

@media (max-width: 999px) {
  .partner-panel { position: fixed; left: 50%; bottom: 8px; width: min(316px, calc(100% - 16px)); margin: 0; padding: 6px; overflow: visible; border-radius: 16px; transform: translateX(-50%); }
  .partner-toggle { position: absolute; top: -24px; right: 0; display: block; height: 24px; padding: 0 10px; }
  .partner-kicker, .partner-panel h2 { display: none; }
  .partner-slot { width: 300px; height: 113px; border-radius: 10px; }
  .partner-slot iframe { transform: scale(.9375); transform-origin: left top; }
  .partner-panel p { max-width: 300px; margin-top: 5px; font-size: 8px; line-height: 1.45; }
  .game-card.partner-ad-visible .controls { bottom: 190px; }
  .partner-panel.is-collapsed { left: auto; right: 8px; width: auto; padding: 0; border: 0; background: transparent; box-shadow: none; transform: none; backdrop-filter: none; }
  .partner-panel.is-collapsed .partner-body { display: none; }
  .partner-panel.is-collapsed .partner-toggle { position: static; height: 34px; padding: 0 13px; color: #fff; border-color: rgba(255,211,91,.25); background: rgba(24,19,39,.94); }
}

@media (max-width: 999px) and (max-height: 790px) {
  .partner-panel { bottom: 4px; width: min(276px, calc(100% - 16px)); padding: 5px; }
  .partner-slot { width: 260px; height: 98px; }
  .partner-slot iframe { transform: scale(.8125); transform-origin: left top; }
  .partner-panel p { max-width: 260px; margin-top: 4px; font-size: 7px; line-height: 1.35; }
  .game-card.partner-ad-visible .controls { bottom: 153px; }
}

@media (max-width: 680px) {
  .topbar { height: 52px; gap: 10px; padding: 0 10px; }
  .brand { gap: 0; font-size: 16px; }
  .brand > span:last-child { display: none; }
  .brand-mark { width: 30px; height: 30px; border-radius: 10px; font-size: 14px; }
  .language-select { width: 78px; height: 32px; padding: 0 20px 0 9px; font-size: 9px; }
  .language-picker { gap: 4px; }
  .language-picker > label { font-size: 7px; letter-spacing: .6px; }
  .top-actions { gap: 4px; }
  .icon-button { width: 32px; height: 32px; }
  .page-shell { display: block; }
  .game-head { top: 50px; left: 12px; right: 12px; display: grid; grid-template-columns: 1fr; align-items: start; gap: 5px; }
  .eyebrow { font-size: 7px; letter-spacing: 1.5px; }
  .game-head h1 { margin-top: 2px; font-size: 15px; }
  .mini-stats { width: 100%; margin: 0; display: flex; gap: 5px; }
  .mini-stats > .stat-chip, .fortune-replay { flex: 1 1 0; height: 38px; padding: 4px 7px; border-radius: 11px; }
  .mini-stats > .stat-chip { gap: 2px; }
  .mini-stats small { font-size: 8px; }
  .mini-stats b { font-size: 13px; }
  .mini-stats em { font-size: 7px; }
  .fortune-replay { font-size: 7px; }
  .playground { min-height: 100svh; }
  .question-box { top: 142px; width: calc(100% - 24px); height: 42px; }
  .question-box input { padding-left: 12px; font-size: 12px; }
  .question-box button { min-width: 54px; padding-inline: 11px; font-size: 10px; }
  .floating-copy { z-index: 16; top: 194px; width: calc(100% - 32px); text-align: center; font-size: 11px; line-height: 1.35; }
  .current-hit { top: 215px; min-width: 82px; padding: 5px 10px; }
  .ball-wrap { position: absolute; left: 0; right: 0; top: 235px; width: 100%; height: 320px; }
  .wax-ball { width: min(260px, 72vw); height: auto; aspect-ratio: 1; }
  .game-card.partner-ad-visible .ball-wrap { top: 253px; height: 350px; }
  .game-card.partner-ad-visible .wax-ball { width: min(84vw, clamp(260px, calc(100svh - 515px), 330px)); }
  .answer-card { width: calc(100% - 32px); padding: 45px 22px 27px; }
  .answer-close { top: 10px; right: 10px; width: 34px; height: 34px; }
  .answer-card h2 { font-size: 23px; }
  .break-result { top: 520px; }
  .controls { top: 565px; bottom: auto; }
  .game-card.partner-ad-visible .controls { top: auto; bottom: 175px; }
  .footnote { flex-direction: column; align-items: center; gap: 7px; padding-bottom: 24px; }
  .break-result.show { transform: translate(-50%, 0) scale(1) rotate(-2deg); }
  .fortune-content { width: calc(100% - 36px); padding: 70px 0 64px; }
  .fortune-content > h2 { font-size: 48px; letter-spacing: -3px; }
  .fortune-date { margin-bottom: 42px; }
  .fortune-section { padding: 27px 2px 30px; }
  .fortune-section h3 { font-size: 15px; }
  .fortune-section h3 small { display: block; margin: 7px 0 0 28px; }
  .fortune-section p, .fortune-general p { font-size: 14px; line-height: 1.9; }
  .lucky-details { grid-template-columns: repeat(2, 1fr); }
  .lucky-details > span { min-height: 96px; }
}

@media (max-width: 680px) and (max-height: 790px) {
  .game-card.partner-ad-visible .ball-wrap { top: 245px; height: 250px; }
  .game-card.partner-ad-visible .wax-ball { width: min(240px, 72vw); }
  .controls { top: 545px; bottom: auto; }
  .game-card.partner-ad-visible .controls { top: auto; bottom: 153px; }
  .break-result { top: 455px; }
}

@media (max-width: 360px) {
  .topbar { padding-inline: 9px; }
  .game-head { left: 10px; right: 10px; }
  .ball-title .eyebrow { letter-spacing: 1.3px; }
  .question-box { top: 142px; width: calc(100% - 20px); }
  .floating-copy { top: 194px; }
  .current-hit { top: 215px; }
  .ball-wrap { top: 235px; height: 310px; }
  .wax-ball { width: min(245px, 72vw); }
}

@media (max-width: 340px) {
  .partner-panel { width: min(296px, calc(100% - 16px)); }
  .partner-slot { width: 280px; height: 105px; }
  .partner-slot iframe { transform: scale(.875); transform-origin: left top; }
}

@media (hover: none) and (pointer: coarse) {
  .shadow { display: none; }
  .question-box input { font-size: 16px; }
}

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