:root {
  --bg: #151229;
  --bg2: #1e1a3a;
  --panel: #262150;
  --panel2: #2f2963;
  --line: #3d3680;
  --text: #ecebff;
  --muted: #a39fd0;
  --accent: #ffcb3d;
  --p0: #4de1ff;
  --p1: #ff4d6d;
  --good: #52e07a;
  --radius: 14px;
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at top, #2c2463 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0.4em 0; line-height: 1.15; }

#app { display: flex; flex-direction: column; height: 100dvh; max-width: 760px; margin: 0 auto; }
.screen { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.in-battle .topbar, .in-battle .tabbar { display: none; }

/* ---------- Top bar & tabs ---------- */
.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
  background: rgba(20, 16, 45, 0.85); border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; font-size: 17px; white-space: nowrap; }
.logo span { background: linear-gradient(90deg, #ffcb3d, #ff6bd5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wallet { margin-left: auto; display: flex; gap: 10px; font-weight: 700; font-size: 14px; }
.cur { white-space: nowrap; font-variant-numeric: tabular-nums; }
.icon-btn { background: none; border: 0; font-size: 18px; cursor: pointer; padding: 4px; }
@media (max-width: 420px) { .logo span { display: none; } }

.tabbar {
  display: flex; background: rgba(20, 16, 45, 0.95); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 6px; background: none; border: 0; cursor: pointer; color: var(--muted);
}
.tab .ti { font-size: 22px; font-family: var(--emoji); transition: transform 0.15s; }
.tab .tl { font-size: 11px; font-weight: 600; }
.tab.active { color: var(--text); }
.tab.active .ti { transform: translateY(-2px) scale(1.15); }

/* ---------- Generic ---------- */
.page { padding: 12px 14px 24px; }
.page-title { font-size: 24px; }
.sub { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.row { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.row.wrap { flex-wrap: wrap; }
.btn {
  background: linear-gradient(180deg, #ffd85c, #f5a623); color: #2a1a00; border: 0; border-radius: 12px;
  padding: 10px 16px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 #b8741a;
  transition: transform 0.08s, filter 0.15s;
}
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #b8741a; }
.btn:disabled { filter: grayscale(1) brightness(0.6); cursor: not-allowed; }
.btn.big { font-size: 18px; padding: 12px 26px; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.ghost { background: var(--panel2); color: var(--text); box-shadow: 0 3px 0 #17132e; }
.btn.danger { background: linear-gradient(180deg, #ff6b81, #e0314f); color: #fff; box-shadow: 0 3px 0 #8f1c30; }
.btn.gem { background: linear-gradient(180deg, #8fd0ff, #5b7cff); color: #0b1440; box-shadow: 0 3px 0 #2f45a8; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px;
  color: var(--c); border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}
.tag.foe { --c: var(--p1); margin-left: 4px; }
.stars { color: var(--accent); letter-spacing: -1px; font-size: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

.toast {
  position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 100;
  background: var(--panel2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 99px;
  font-weight: 700; box-shadow: 0 8px 30px #0008; animation: pop 0.25s ease-out; transition: opacity 0.4s;
}
.toast.out { opacity: 0; }

.modal-back {
  position: fixed; inset: 0; z-index: 50; background: rgba(8, 6, 20, 0.7); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px; animation: fade 0.18s;
}
.modal-back.closing { animation: fade 0.18s reverse forwards; }
.modal-card {
  width: min(440px, 100%); max-height: 90dvh; overflow-y: auto; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 20px 60px #000a;
  animation: pop 0.22s cubic-bezier(.2, 1.4, .5, 1); text-align: center;
}
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Avatars ---------- */
.avatar {
  --s: 52px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--el) 55%, #fff 10%), color-mix(in srgb, var(--el) 25%, #0d0b20) 70%);
  border: 2px solid var(--rar); position: relative;
}
.avatar .emoji { font-family: var(--emoji); font-size: calc(var(--s) * 0.6); line-height: 1; }
.avatar.s { --s: 34px; }
.avatar.l { --s: 72px; }
.avatar.xl { --s: 108px; }
.avatar.hidden { background: #0d0b20; border-color: var(--line); }
.avatar.hidden .emoji { filter: brightness(0) opacity(0.55); }
.shiny .emoji { filter: hue-rotate(150deg) saturate(1.6) brightness(1.1); }
.shiny::after {
  content: '✨'; position: absolute; top: -6%; right: -6%; font-size: max(10px, calc(var(--s, 40px) * 0.3));
  font-family: var(--emoji); animation: twinkle 1.6s infinite;
}
@keyframes twinkle { 50% { transform: scale(0.6) rotate(30deg); opacity: 0.6; } }

/* ---------- Movement diagram ---------- */
.movediag { display: grid; grid-template-columns: repeat(7, 11px); gap: 2px; flex: none; }
.movediag i { width: 11px; height: 11px; background: #ffffff10; border-radius: 2px; }
.movediag i.on { background: var(--p0); }
.movediag i.far { background: linear-gradient(135deg, var(--p0), #fff); }
.movediag i.leap { background: #ff9f43; }
.movediag i.self { background: #fff; border-radius: 50%; }
.trait { font-size: 13px; color: var(--muted); }
.trait b { color: var(--text); }

/* ---------- Starter ---------- */
.starter { padding: 32px 16px; text-align: center; }
.starter h1 { font-size: 40px; background: linear-gradient(90deg, #ffcb3d, #ff6bd5, #4de1ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); max-width: 440px; margin: 0 auto 24px; }
.starter-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.starter-card {
  width: 150px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.starter-card:hover { transform: translateY(-4px); border-color: var(--el); }
.starter-card small { color: var(--muted); }

/* ---------- Adventure ---------- */
.chapter {
  background: linear-gradient(135deg, color-mix(in srgb, var(--el) 18%, var(--panel)), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; margin-bottom: 12px;
}
.chapter.locked { opacity: 0.45; }
.chapter-head { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 8px; }
.chapter-head .reward { margin-left: auto; }
.stages { display: flex; gap: 8px; align-items: center; }
.stage {
  position: relative; flex: 1; aspect-ratio: 1; max-width: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg2); border: 2px solid var(--el); cursor: pointer; font-weight: 800;
}
.stage.boss { max-width: 76px; border-width: 3px; box-shadow: 0 0 14px color-mix(in srgb, var(--el) 60%, transparent); }
.stage:disabled { border-color: var(--line); cursor: not-allowed; opacity: 0.6; }
.stage.done { background: color-mix(in srgb, var(--el) 30%, var(--bg2)); }
.stage .check { position: absolute; bottom: -4px; right: -4px; background: var(--good); color: #062; border-radius: 50%; width: 20px; height: 20px; font-size: 13px; display: grid; place-items: center; }
.lineup { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.lineup-mon { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lineup-mon small { font-size: 11px; color: var(--muted); }
.rewards { margin: 8px 0; display: grid; gap: 6px; justify-items: center; }
.boss-reward { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; }

/* ---------- Arena ---------- */
.rank-card {
  display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, var(--panel)), var(--panel)); border: 1px solid var(--c);
}
.rank-icon { font-size: 48px; font-family: var(--emoji); }
.big-num { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.rank-card small { color: var(--muted); }
.challenger {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-top: 8px;
}
.challenger .ch-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.challenger .ch-head small { color: var(--muted); }
.challenger .lineup { justify-content: flex-start; margin: 4px 0 0; grid-column: 1; }
.challenger .btn { grid-column: 2; grid-row: 1 / span 2; }
.ladder { list-style: none; padding: 0; margin: 0; background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.ladder li { display: flex; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ladder li .pos { width: 36px; color: var(--muted); }
.ladder li .nm { flex: 1; }
.ladder li.me { background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 800; }

/* ---------- Team ---------- */
.formation { background: var(--panel); border-radius: var(--radius); padding: 10px; border: 1px solid var(--line); }
.flabel { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 6px; }
.frow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 6px; }
.fslot {
  aspect-ratio: 1; border-radius: 10px; background: #ffffff0d; border: 2px dashed var(--line); cursor: pointer;
  display: grid; place-items: center; position: relative; padding: 0;
}
.fslot.front { background: #4de1ff10; }
.fslot.sel { border: 2px solid var(--accent); box-shadow: 0 0 12px var(--accent); }
.fslot .avatar { --s: min(44px, 11vw); }
.fslot .crown { position: absolute; top: -8px; right: -4px; font-family: var(--emoji); font-size: 16px; }
.team-actions { display: flex; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.team-actions span { margin-right: auto; font-weight: 700; color: var(--muted); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mcard {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 8px;
  background: var(--panel); border: 1px solid var(--line); border-bottom: 3px solid var(--rar); border-radius: 12px; cursor: pointer;
}
.mcard b { font-size: 13px; }
.mcard small { color: var(--muted); font-size: 11px; }
.mcard.inteam { background: color-mix(in srgb, var(--p0) 18%, var(--panel)); }
.mcard.unknown { opacity: 0.6; }
.badge { position: absolute; top: 4px; right: 6px; background: var(--p0); color: #022; border-radius: 99px; font-size: 11px; font-weight: 900; padding: 0 5px; }
.badge.up { background: var(--good); }

/* ---------- Monster detail ---------- */
.detail { text-align: left; }
.detail-head { display: flex; gap: 14px; align-items: center; }
.detail-head h3 { margin-top: 0; }
.detail-body { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 12px 0; }
.statgrid { display: grid; gap: 4px; }
.xpbar { height: 6px; background: #ffffff15; border-radius: 9px; margin-top: 10px; overflow: hidden; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--p0), #a0f); }
.detail > .btn.ghost { width: 100%; margin-top: 12px; }

/* ---------- Hatchery ---------- */
.eggs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.egg-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.egg-card.premium { background: linear-gradient(160deg, #3b2c8a, var(--panel)); border-color: #7f6bff; }
.egg-card small { color: var(--muted); font-size: 12px; min-height: 3em; }
.egg-icon { font-size: 56px; font-family: var(--emoji); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(4deg); } }
.tips { margin-top: 18px; color: var(--muted); }
.tips ul { padding-left: 18px; }
.hatch { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.hatch-stage { display: grid; justify-items: center; gap: 8px; position: relative; padding: 20px 0; }
.hatch-egg { font-size: 110px; font-family: var(--emoji); transform-origin: 50% 85%; }
.hatch-stage.burst .hatch-egg { animation: eggburst 0.35s ease-in forwards; }
@keyframes eggburst { to { transform: scale(2.2); opacity: 0; filter: brightness(5); } }
.hatch-stage.revealed { background: var(--bg2); border: 2px solid var(--rar); border-radius: 18px; padding: 24px 16px; overflow: hidden; animation: pop 0.4s cubic-bezier(.2, 1.5, .5, 1); }
.hatch-stage.revealed > * { position: relative; }
.rays {
  position: absolute !important; inset: -50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rar) 35%, transparent) 0 10deg, transparent 10deg 20deg);
  animation: spin 12s linear infinite; mask: radial-gradient(circle, #000 0 20%, transparent 55%);
}
@keyframes spin { to { transform: rotate(360deg); } }
.gain { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--panel); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.gain small { display: block; color: var(--muted); }

/* ---------- Rewards ---------- */
.reward-row { display: flex; gap: 16px; justify-content: center; font-size: 18px; font-weight: 800; margin: 10px 0; flex-wrap: wrap; }
.lvups { margin-top: 10px; }
.lvup { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0; }
.rating-change { font-weight: 700; margin: 6px 0; }
.promo { font-size: 20px; font-weight: 900; color: var(--accent); animation: pop 0.4s; }
.settings { display: grid; gap: 12px; }
.toggle { display: flex; align-items: center; justify-content: center; gap: 8px; }
.stats-line { color: var(--muted); font-size: 13px; }

/* ---------- Battle ---------- */
.battle {
  position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top) + 6px) 10px calc(env(safe-area-inset-bottom) + 8px); gap: 6px;
}
.bhead { width: 100%; display: flex; align-items: center; gap: 8px; }
.btitle { flex: 1; text-align: center; display: flex; flex-direction: column; }
.btitle small { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.ply { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.sidebar { width: var(--bw); display: flex; align-items: center; gap: 8px; font-family: var(--emoji); }
.sidebar .bar { flex: 1; height: 8px; background: #ffffff15; border-radius: 9px; overflow: hidden; }
.sidebar .bar i { display: block; height: 100%; transition: width 0.4s; }
.sidebar.enemy .bar i { background: var(--p1); }
.sidebar.player .bar i { background: var(--p0); }
.turnpill { font-family: system-ui, sans-serif; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 99px; background: var(--p0); color: #022; white-space: nowrap; }
.turnpill.enemy { background: var(--p1); color: #fff; animation: pulse 1s infinite; }
.turnpill:empty { display: none; }
@keyframes pulse { 50% { opacity: 0.55; } }

.battle { --bw: min(100%, calc((100dvh - 250px) * 6 / 7), 560px); }
.board {
  position: relative; width: var(--bw); aspect-ratio: var(--w) / var(--h); flex: none;
  border-radius: 12px; overflow: visible; container-type: inline-size; cursor: pointer; touch-action: manipulation;
  box-shadow: 0 10px 40px #0009, 0 0 0 3px #3a3375;
}
.cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--w), 1fr); border-radius: 12px; overflow: hidden; }
.cell.light { background: #3a3470; }
.cell.dark { background: #2c275a; }
.cell.zone1.light { background: #4a3266; }
.cell.zone1.dark { background: #3a2655; }
.cell.zone0.light { background: #2f4377; }
.cell.zone0.dark { background: #243663; }
.cell.last { box-shadow: inset 0 0 0 100px #ffcb3d22; }
.layer { position: absolute; inset: 0; pointer-events: none; }
.unit, .mark { position: absolute; left: 0; top: 0; width: calc(100% / var(--w)); height: calc(100% / var(--h)); }
.unit { will-change: transform; }
.u-in {
  position: absolute; inset: 9%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--el) 60%, #fff 5%), color-mix(in srgb, var(--el) 22%, #0d0b20) 72%);
  box-shadow: 0 4px 0 #0006;
}
.side0 .u-in { border: 2.5px solid var(--p0); }
.side1 .u-in { border: 2.5px solid var(--p1); }
.u-in .emoji { font-family: var(--emoji); font-size: calc(100cqw / var(--w) * 0.5); line-height: 1; }
.side1 .u-in .emoji { transform: scaleX(-1); }
.unit.boss .u-in { inset: 2%; box-shadow: 0 0 18px var(--p1), 0 4px 0 #0006; }
.unit.boss .u-in .emoji { font-size: calc(100cqw / var(--w) * 0.62); }
.u-in .crown { position: absolute; top: -18%; right: -10%; font-family: var(--emoji); font-size: calc(100cqw / var(--w) * 0.24); filter: drop-shadow(0 1px 1px #000); }
.u-in .lv {
  position: absolute; bottom: -8%; left: -8%; font-size: calc(100cqw / var(--w) * 0.15); font-weight: 900;
  background: #0d0b20; border: 1px solid var(--line); border-radius: 99px; padding: 0 0.35em; line-height: 1.3;
}
.unit .hp { position: absolute; left: 14%; right: 14%; bottom: 3%; height: 6%; background: #000a; border-radius: 9px; overflow: hidden; }
.unit .hp i { display: block; height: 100%; background: var(--good); transition: width 0.3s; }
.unit .hp i.mid { background: #ffcb3d; }
.unit .hp i.low { background: #ff4d6d; }
.unit.shiny::after { --s: calc(100cqw / var(--w)); }

.mark.sel { box-shadow: inset 0 0 0 3px var(--accent); border-radius: 8px; }
.mark.sel.enemy { box-shadow: inset 0 0 0 3px var(--p1); }
.mark.dot::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: #ffffff70; }
.mark.atk { box-shadow: inset 0 0 0 3px var(--p1); border-radius: 50%; animation: pulse 1s infinite; z-index: 3; }
.mark.atk.super { box-shadow: inset 0 0 0 3px #ffcb3d; }
.mark.atk span, .mark.atk.weak span {
  position: absolute; top: -4%; left: 50%; transform: translateX(-50%); font-weight: 900; font-size: calc(100cqw / var(--w) * 0.2);
  background: var(--p1); color: #fff; padding: 0 0.35em; border-radius: 99px; white-space: nowrap;
}
.mark.atk.super span { background: #ffcb3d; color: #2a1a00; }
.mark.atk.weak span { background: #777; }
.mark.threat { background: #ff4d6d22; }
.mark.threat.hit { background: #ff4d6d55; }
.marks { z-index: 3; }
.units { z-index: 2; }
.fx { z-index: 4; }

.fx > * { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.float { font-weight: 900; font-size: calc(100cqw / var(--w) * 0.32); text-shadow: 0 2px 0 #000, 0 0 8px #000; white-space: nowrap; }
.float.dmg { color: #fff; }
.float.super { color: #ffcb3d; font-size: calc(100cqw / var(--w) * 0.42); }
.float.weak { color: #bbb; }
.float.heal { color: var(--good); }
.float.thorns { color: #ff9f43; }
.float.note { font-size: calc(100cqw / var(--w) * 0.17); color: #ffcb3d; }
.float.note.dim { color: #bbb; }
.particle { border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.ring { width: calc(100cqw / var(--w)); aspect-ratio: 1; border-radius: 50%; border: 4px solid #fff; }
.bolt { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 12px 4px #fff8; background: #fff; }
.kotext {
  font-weight: 900; font-size: calc(100cqw / var(--w) * 0.45); color: #fff; white-space: nowrap; letter-spacing: 1px;
  -webkit-text-stroke: 2px #d0204a; text-shadow: 0 4px 0 #6d0c22, 0 0 20px #ff4d6d;
}

.info {
  width: var(--bw); min-height: 92px; display: flex; gap: 10px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px;
}
.info-main { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; }
.info-name { font-size: 14px; }
.info-move { color: var(--muted); }
.info .trait { font-size: 12px; }
.hint { color: var(--muted); font-size: 13px; text-align: center; width: 100%; }

.result-banner {
  position: absolute; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center;
  background: radial-gradient(circle, #000a, #000d); animation: fade 0.4s;
}
.result-banner h2 { font-size: 54px; font-weight: 900; margin: 0; animation: pop 0.5s cubic-bezier(.2, 1.6, .5, 1); }
.result-banner.win h2 { color: #ffcb3d; text-shadow: 0 0 30px #ffcb3d99; }
.result-banner.lose h2 { color: #ff4d6d; }
.result-banner p { color: var(--muted); margin: 0 0 14px; }
.confetti { position: absolute; top: 0; width: 8px; height: 14px; z-index: 30; pointer-events: none; border-radius: 2px; }
.battle { overflow: hidden; }

@media (min-width: 700px) {
  .page { padding: 18px 22px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .egg-icon, .rays, .shiny::after, .mark.atk, .turnpill.enemy { animation: none; }
}
