:root {
  --ink: #2a2346;
  --muted: #7a7398;
  --navy: #1c1736;
  --navy-2: #2a2350;
  --line: rgba(255, 255, 255, .12);
  --gold: #ffc933;
  --pb: clamp(48px, min(15.5vw, 8.4dvh), 68px);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: var(--navy); color: var(--ink);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#app { height: 100dvh; max-width: 520px; margin: 0 auto; position: relative; overflow: hidden; background: #f4f1ff; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
img { -webkit-user-drag: none; }

/* ---------- 공용 ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(28, 23, 54, .78); color: #fff; font-size: 14px; }
.coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c2, var(--gold) 45%, #d99a00); box-shadow: inset 0 0 0 2px #ffe27a; display: inline-block; }
.coin.big { width: 34px; height: 34px; }
.attr-badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; line-height: 18px; letter-spacing: .02em; }
.attr-badge.sm { padding: 0 6px; font-size: 11px; line-height: 16px; }
.bicon { width: 1em; height: 1em; display: block; }
.btn { display: block; width: 100%; padding: 13px; border-radius: 14px; font-weight: 800; font-size: 15px; margin-top: 8px; }
.btn.primary { background: linear-gradient(180deg, #8f6bff, #6a46f0); color: #fff; box-shadow: 0 4px 0 #4a2fb3; }
.btn.ghost { background: #ece8fb; color: var(--ink); }
.btn.danger { background: #ffe3e6; color: #d43750; }
.btn:active { transform: translateY(2px); }

/* ---------- 모달 ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(18, 14, 36, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fadeIn .15s; }
.modal { width: min(520px, 100%); max-height: 88dvh; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 20px 18px calc(16px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.modal h3 { margin: 0 0 8px; font-size: 18px; }
.modal h4 { margin: 14px 0 6px; font-size: 14px; color: var(--muted); }
.chart-big { width: 180px; margin: 4px auto; }
.attr-rows { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.attr-rows li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.attr-rows .arrow { color: var(--muted); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }

/* ---------- 홈 ---------- */
.home { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: radial-gradient(120% 60% at 50% 0%, #e7f0ff 0%, #f1e9ff 55%, #f4f1ff 100%); }
.home-top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: linear-gradient(#eef3ffee, #eef3ff00); }
.logo { font-size: 24px; font-weight: 900; letter-spacing: .02em;
  background: linear-gradient(90deg, #5b8cff, #a15cff 60%, #ff7bc0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { position: relative; height: min(48dvh, 420px); margin-top: -52px; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 120%; height: 70%; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 30%, transparent), transparent); }
.hero-art { position: absolute; left: 50%; bottom: -12%; height: 118%; transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateX(-50%) translateY(-6px); } }
.hero-tag { position: absolute; left: 16px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(60, 40, 120, .12); }
.hero-tag b { font-size: 16px; }
.hero-tag span:last-child { color: var(--muted); font-size: 13px; }
.butterflies i { position: absolute; width: 18px; height: 14px; opacity: .8;
  background: radial-gradient(ellipse at 25% 50%, #5aa2ff 45%, transparent 47%), radial-gradient(ellipse at 75% 50%, #5aa2ff 45%, transparent 47%);
  animation: flutter 7s ease-in-out infinite; }
.butterflies i:nth-child(1) { left: 12%; top: 30%; }
.butterflies i:nth-child(2) { right: 14%; top: 22%; animation-delay: -2.5s; transform: scale(.7); }
.butterflies i:nth-child(3) { right: 22%; top: 62%; animation-delay: -5s; transform: scale(.55); }
@keyframes flutter { 0%, 100% { translate: 0 0; } 25% { translate: 10px -14px; scale: .85 1; } 50% { translate: -6px -24px; } 75% { translate: -12px -8px; scale: .85 1; } }

.home-panel { position: relative; padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; }
.sec-head h2 { margin: 0; font-size: 17px; }
.party-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pcard { position: relative; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 2.5px var(--c), 0 4px 10px rgba(60, 40, 120, .12); aspect-ratio: 3 / 3.9; }
.pcard .face { position: absolute; inset: 0 0 22px; background-repeat: no-repeat; }
.pcard-lv { position: absolute; left: 4px; top: 4px; font-size: 10px; font-weight: 800; color: #fff; background: rgba(28, 23, 54, .7); border-radius: 6px; padding: 1px 5px; }
.pcard-name { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; line-height: 22px; font-size: 12px; font-weight: 800; color: #fff; background: var(--c); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(60, 40, 120, .1); }
.chip .attr-chart { width: 24px; height: 24px; }
.dungeons { display: grid; gap: 10px; }
.dcard { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(60, 40, 120, .1); }
.dcard:active:not(.locked) { transform: scale(.98); }
.dstage { flex: none; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, #6aa0ff, #a15cff); }
.dcard.boss .dstage { background: linear-gradient(135deg, #ff6b88, #a12c5c); }
.dinfo { flex: 1; display: grid; gap: 2px; }
.dinfo b { font-size: 15px; }
.dinfo span { font-size: 12px; color: var(--muted); }
.dgo { flex: none; padding: 8px 14px; border-radius: 12px; background: #6a46f0; color: #fff; font-weight: 800; font-size: 14px; }
.dcard.locked { opacity: .55; }
.dcard.locked .dgo { background: #ddd8ee; }
.dcard.locked .dstage { filter: grayscale(.8); }
.foot { text-align: center; margin-top: 16px; }

/* 캐릭터 상세 */
.cdetail-art { display: block; width: 100%; height: 200px; object-fit: cover; object-position: 50% 12%; border-radius: 16px; background: #f2eefc; box-shadow: inset 0 0 0 2px var(--c); }
.cdetail-head { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.cdetail-head h3 { margin: 0; }
.stats { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats th, .stats td { padding: 6px 4px; text-align: right; border-bottom: 1px solid #eee9fa; }
.stats td:first-child, .stats th:first-child { text-align: left; color: var(--muted); }
.cmd-detail { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cmd-detail li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cmd-detail .muted { margin-left: auto; font-size: 13px; }
.seq { display: inline-flex; gap: 2px; font-size: 18px; padding: 3px 5px; border-radius: 8px; background: var(--navy); }
.skill-line { margin: 0; font-size: 14px; }

/* ---------- 전투 ---------- */
.battle { height: 100%; display: flex; flex-direction: column; background: var(--navy); position: relative; }
.b-top { position: absolute; z-index: 6; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 10px 0; pointer-events: none; }
.b-top > * { pointer-events: auto; }
.wave-label { font-weight: 900; font-size: 14px; letter-spacing: .08em; color: var(--ink); background: rgba(255, 255, 255, .75); padding: 3px 12px; border-radius: 999px; }
.wave-label b { font-size: 18px; color: #6a46f0; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; background: rgba(28, 23, 54, .78); display: grid; place-content: center; gap: 4px; grid-auto-flow: column; }
.menu-btn span { width: 4px; height: 14px; border-radius: 2px; background: #fff; display: block; }

.field { flex: 1 1 auto; min-height: 150px; position: relative; overflow: hidden;
  background:
    radial-gradient(60% 30% at 50% 88%, rgba(255, 255, 255, .9), transparent 70%),
    radial-gradient(40% 35% at 18% 20%, rgba(255, 255, 255, .7), transparent 70%),
    radial-gradient(80% 60% at 50% 60%, color-mix(in srgb, var(--mc, #a15cff) 22%, transparent), transparent 75%),
    linear-gradient(180deg, #dfeaff 0%, #efe6ff 60%, #f8f3ff 100%); }
.chart-mini { position: absolute; z-index: 6; left: 8px; top: calc(52px + env(safe-area-inset-top)); width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, .8); padding: 3px; }
.m-head { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); top: calc(50px + env(safe-area-inset-top)); width: min(calc(100% - 124px), 300px); display: grid; gap: 4px; }
.m-title { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 14px; }
.m-hp { position: relative; height: 14px; border-radius: 999px; background: rgba(28, 23, 54, .75); overflow: hidden; box-shadow: 0 0 0 2px #fff; }
.m-hp-fill { height: 100%; width: 100%; background: linear-gradient(180deg, #ff9aa8, #ff4d64); transition: width .35s ease-out; }
.m-hp-num { position: absolute; inset: 0; text-align: center; font-size: 10px; line-height: 14px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #0008; }
.m-sub { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--ink); }
.m-weak { display: inline-flex; gap: 4px; align-items: center; }
.m-count b { font-size: 15px; color: #6a46f0; }
.m-count.danger b { color: #ff3b57; animation: pulse .6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.3); display: inline-block; } }

.monster-wrap { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); width: min(46%, 46dvh, 220px); aspect-ratio: 1; }
.platform { position: absolute; left: -20%; right: -20%; bottom: -6%; height: 26%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--mc) 40%, #fff), transparent); }
.monster { position: absolute; inset: 0; animation: bob 2.4s ease-in-out infinite; }
.monster-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 10px rgba(40, 20, 80, .25)); }
@keyframes bob { 50% { transform: translateY(-6px) scale(1.02, .98); } }
.monster.spawn { animation: spawn .5s ease-out, bob 2.4s .5s ease-in-out infinite; }
@keyframes spawn { from { transform: scale(.2); opacity: 0; } 70% { transform: scale(1.1); } }
.monster.hit { animation: hit .28s ease-out; }
@keyframes hit { 0% { filter: brightness(2.2); transform: translateX(0); } 30% { transform: translateX(-8px) rotate(-3deg); } 60% { transform: translateX(6px) rotate(2deg); } 100% { filter: none; transform: none; } }
.monster.attack { animation: lunge .5s ease-in-out; }
@keyframes lunge { 40% { transform: scale(1.25) translateY(14%); } 100% { transform: none; } }
.monster.dead { animation: die .8s ease-in forwards; }
@keyframes die { 0% { filter: brightness(2.5); } 100% { transform: scale(.3) translateY(-30%); opacity: 0; filter: blur(6px) brightness(2); } }

.fx { position: absolute; inset: 0; pointer-events: none; }
.spark { position: absolute; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%;
  background: radial-gradient(closest-side, #fff, var(--c) 45%, transparent 70%); animation: spark .45s ease-out forwards; mix-blend-mode: screen; }
@keyframes spark { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.float { position: absolute; z-index: 8; pointer-events: none; font-weight: 900; white-space: nowrap; transform: translate(-50%, -50%); animation: floatUp 1s ease-out forwards; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -55%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -140%); } }
.float.dmg { font-size: 30px; color: #fff; -webkit-text-stroke: 1px var(--c); text-shadow: 0 2px 0 var(--c), 0 0 12px var(--c); }
.float.dmg.weak { font-size: 38px; }
.float.dmg small { display: block; text-align: center; font-size: 14px; color: var(--c); -webkit-text-stroke: 0; text-shadow: 0 0 6px #fff, 0 0 2px #fff; }
.float.skill-name { left: 50%; top: auto; bottom: 4px; font-size: 15px; color: #fff; background: var(--c); padding: 3px 12px; border-radius: 999px; animation-duration: .9s; }
.float.miss { left: 32%; top: 52px; font-size: 16px; color: #ff6b80; }
.float.info { left: 50%; top: 60%; font-size: 13px; color: #fff; background: rgba(28, 23, 54, .8); padding: 4px 12px; border-radius: 999px; animation-duration: 1.2s; }
.float.heal { right: 14px; left: auto; top: 50%; transform: none; font-size: 18px; color: #3fe08f; text-shadow: 0 0 6px #0f5; animation-name: floatSmall; }
.float.hurt-num { right: 14px; left: auto; top: 50%; transform: none; font-size: 20px; color: #ff4d64; text-shadow: 0 0 6px #f00a; animation-name: floatSmall; }
@keyframes floatSmall { 0% { opacity: 0; translate: 0 6px; } 15% { opacity: 1; } 100% { opacity: 0; translate: 0 -34px; } }
.float.gold-drop { left: 50%; top: 58%; font-size: 26px; color: var(--gold); -webkit-text-stroke: 1px #b07400; text-shadow: 0 2px 0 #b07400; }

/* 파티 줄 */
.party-row { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 12px 4px; background: linear-gradient(180deg, #2a2350, var(--navy)); }
.unit { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: visible; transition: transform .2s; }
.unit .face { position: absolute; inset: 0; border-radius: 12px; background-color: #fff; background-repeat: no-repeat; box-shadow: 0 0 0 2.5px var(--c); filter: saturate(.75) brightness(.8); transition: filter .2s; }
.unit.active { transform: translateY(-4px) scale(1.04); }
.unit.active .face { filter: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5.5px var(--c), 0 0 18px var(--c); }
.unit.active::after { content: "TURN"; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); font-size: 9px; font-weight: 900; letter-spacing: .1em; color: #fff; background: var(--c); padding: 0 6px; border-radius: 6px; }
.skill-badge { position: absolute; right: -4px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; font-size: 12px; line-height: 22px; font-weight: 900; color: #fff; background: #3d3566; box-shadow: 0 0 0 2px var(--navy); }
.unit.ready .skill-badge { font-size: 9px; letter-spacing: .04em; background: linear-gradient(90deg, #ff7bc0, #ffb13b); animation: glow 1s ease-in-out infinite alternate; }
.unit.ready .face { filter: none; }
@keyframes glow { to { box-shadow: 0 0 0 2px var(--navy), 0 0 12px #ffb13b; } }
.unit.act { animation: act .45s ease-out; }
@keyframes act { 40% { transform: translateY(-14px) scale(1.08); } }
.unit.nope { animation: nope .3s; }
@keyframes nope { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }

.party-hp { flex: none; position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 10px 6px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; }
.hp-label { color: #7dffb0; }
.hp-bar { flex: 1; height: 10px; border-radius: 999px; background: #0e0b20; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.hp-fill { height: 100%; width: 100%; background: linear-gradient(180deg, #8dffb9, #22c76b); transition: width .4s ease-out; }
.hp-fill.low { background: linear-gradient(180deg, #ffb0b0, #ff4d64); }
.hp-num { min-width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.party-hp.healed .hp-bar { animation: healGlow .6s; }
@keyframes healGlow { 50% { box-shadow: 0 0 0 2px #3fe08f, 0 0 12px #3fe08f; } }
.battle.hurt .field { animation: shake .4s; }
.battle.hurt::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 9; animation: redflash .5s forwards; box-shadow: inset 0 0 80px rgba(255, 40, 70, .8); }
@keyframes redflash { to { opacity: 0; } }
@keyframes shake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }

/* 커맨드 패널 */
.panel { flex: none; position: relative; color: #fff; padding: 6px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, #6a46f0) 22%, #1f1a3c), #141029 70%); border-top: 2px solid color-mix(in srgb, var(--c, #6a46f0) 70%, #fff); }
.panel.turn-in { animation: turnIn .35s ease-out; }
@keyframes turnIn { from { filter: brightness(1.8); } }
.panel-head { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 24px; }
.turn-name { display: inline-flex; align-items: center; gap: 5px; }
.turn-name b { font-size: 15px; }
.turn-stats { font-size: 11px; color: #a69fcf; }
.pips { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.pips i { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px var(--c); }
.pips i.used { background: #3d3566; box-shadow: none; }
.pips span { margin-left: 3px; font-size: 12px; color: #a69fcf; font-variant-numeric: tabular-nums; }
.panel-body { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.cmd-side { flex: 1; min-width: 0; display: grid; gap: 6px; }
.slots { display: flex; gap: 6px; }
.slot { width: calc(var(--pb) * .62); height: calc(var(--pb) * .62); border-radius: 10px; display: grid; place-items: center; font-size: calc(var(--pb) * .38);
  background: #0e0b20; box-shadow: inset 0 0 0 1.5px var(--line); }
.slot.filled { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, #fff); animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(1.3); } }
.slots.fail .slot { box-shadow: inset 0 0 0 2px #ff4d64; animation: nope .3s; }
.cmd-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.cmd-list li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 4px 6px; border-radius: 10px; background: rgba(255, 255, 255, .06); transition: opacity .15s, background .15s; }
.cmd-list .seq { grid-row: span 2; font-size: 15px; background: #0e0b20; }
.cmd-name { font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-eff { font-size: 11px; color: #a69fcf; white-space: nowrap; }
.cmd-list li.match { background: color-mix(in srgb, var(--c) 35%, transparent); box-shadow: inset 0 0 0 1.5px var(--c); }
.cmd-list li.dim { opacity: .35; }
.cmd-list li.fire { animation: fire .4s; }
@keyframes fire { 0% { background: #fff; } }

.pad { flex: none; display: grid; grid-template-areas: ". up ." "left . right" ". down ."; grid-template-columns: repeat(3, var(--pb)); grid-template-rows: repeat(3, var(--pb)); gap: 0; }
.pbtn { border-radius: 50%; display: grid; place-items: center; font-size: calc(var(--pb) * .46);
  background: radial-gradient(circle at 50% 35%, #3a3268, #221c44 70%); box-shadow: 0 4px 0 #0c0919, inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 0 1.5px rgba(255, 255, 255, .08); transition: transform .06s; }
.pbtn.up { grid-area: up; } .pbtn.down { grid-area: down; } .pbtn.left { grid-area: left; } .pbtn.right { grid-area: right; }
.pbtn:active, .pbtn.pressed { animation: press .14s; }
@keyframes press { 50% { transform: translateY(3px) scale(.94); box-shadow: 0 1px 0 #0c0919, inset 0 1px 0 rgba(255, 255, 255, .18); filter: brightness(1.4); } }

/* 오버레이: 배너, 컷인, 결과 */
.overlay { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.overlay > * { pointer-events: auto; }
.banner { position: absolute; left: 0; right: 0; top: 30%; display: grid; justify-items: center; gap: 4px; padding: 14px; color: #fff;
  background: linear-gradient(90deg, transparent, rgba(28, 23, 54, .85) 20%, rgba(28, 23, 54, .85) 80%, transparent); animation: banner 1.1s ease-in-out forwards; pointer-events: none; }
.banner b { font-size: 32px; font-weight: 900; letter-spacing: .1em; background: linear-gradient(90deg, #8fd0ff, #d6a8ff, #ffb3dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.banner span { font-size: 13px; color: #cfc7f5; }
@keyframes banner { 0% { opacity: 0; transform: scaleY(0); } 15% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
.cutin { position: absolute; inset: 0; background: rgba(10, 8, 24, .45); animation: fadeIn .15s; pointer-events: none; }
.cutin-band { position: absolute; left: -10%; right: -10%; top: 26%; height: 30%; transform: skewY(-8deg); overflow: hidden;
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 40%, #fff)); box-shadow: 0 0 0 4px #fff, 0 0 40px var(--c); animation: band 1.15s ease-in-out forwards; }
.cutin-band img { position: absolute; left: 6%; top: -40%; height: 240%; transform: skewY(8deg); object-fit: cover; animation: slideArt 1.15s ease-out forwards; }
.cutin-text { position: absolute; right: 14%; top: 50%; transform: translateY(-50%) skewY(8deg); text-align: right; color: #fff; display: grid; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.cutin-text small { font-size: 12px; font-weight: 900; letter-spacing: .3em; opacity: .9; }
.cutin-text b { font-size: 26px; font-weight: 900; }
.cutin-text span { font-size: 12px; font-weight: 700; }
@keyframes band { 0% { transform: skewY(-8deg) scaleY(0); } 12% { transform: skewY(-8deg) scaleY(1); } 88% { opacity: 1; } 100% { opacity: 0; transform: skewY(-8deg) translateX(-20%); } }
@keyframes slideArt { from { translate: -40% 0; } 30% { translate: 0 0; } to { translate: 6% 0; } }

.result { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(14, 11, 32, .6); animation: fadeIn .25s; }
.result-card { width: min(86%, 340px); background: #fff; border-radius: 22px; padding: 22px 18px 16px; text-align: center; animation: up .3s ease-out; }
.result-card h2 { margin: 0; font-size: 22px; }
.result.win h2 { color: #6a46f0; }
.result.lose h2 { color: #d43750; }
.result-card p { margin: 4px 0; }
.reward { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 4px; font-size: 16px; font-weight: 800; }
.reward b { font-size: 32px; color: #c98a00; }
.result-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
