/*  디자인 토큰 — 색·글꼴·간격·연출 길이는 여기 변수로만 쓴다(docs/spec/DESIGN-HANDOFF.md §1 — 지피티는 값만 바꾼다).
    팔레트 A(대표님 10-15 승인) · 표제 Noto Serif KR 700 · 본문 Pretendard. 그림은 app/assets/skin/ 슬롯(js/skin.js · js/pixel.js).
    도트(캐릭터·동료·층 바닥·동료 탭)는 styles-pixel.css — 여기서 읽어 들인다. */
@import url('/styles-pixel.css');
:root {
  --paper: #F5F0E8;   /* 종이 — 바탕 */
  --ink: #19171A;     /* 먹 — 글자·주 단추 */
  --ember: #C8552E;   /* 불빛 — 강조색은 이것 하나(면·초점 테두리) */
  --ember-text: #B04A27;   /* 불빛 글자 — 작은 글자 대비 4.5:1 이상(종이 4.80 · 면 5.14) */
  --sand: #D9CDB8;    /* 모래 — 면·구분 */
  --olive: #5B6650;   /* 올리브 — 완료·확정 */
  --sub: rgba(25, 23, 26, .64);
  --line: rgba(25, 23, 26, .12);
  --line-strong: rgba(25, 23, 26, .5);   /* 입력칸 경계 — 비텍스트 대비 3:1 이상(면 3.33) */
  --surface: #FBF8F3;
  --faint: rgba(25, 23, 26, .32);

  --font-display: 'Noto Serif KR', 'Nanum Myeongjo', 'AppleMyungjo', serif;   /* 표제·큰 숫자 */
  --font-body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font: var(--font-body);
  --serif: var(--font-display);

  /* 도트 — 스프라이트 확대 배율 · 던전 바닥 · 금고 등급 재질(1 나무 · 2 철 · 3 강철 · 4 은 · 5 금 · 6 흑요석 · 7 다이아몬드 · 8 전설) */
  --pixel-scale: 4;
  --dungeon-bg: #EAE2D3;
  --tier-1: #9A6A43; --tier-2: #6E6A66; --tier-3: #5E7180; --tier-4: #B9BDC2;
  --tier-5: #C9A23A; --tier-6: #2C2633; --tier-7: #9FD3DA; --tier-8: var(--ember);

  /* 연출 타이밍(DESIGN-HANDOFF §4) — 단추 → 망치 → 흔들림 → 데미지 숫자 → 금. JS(js/screens/vault.js·clear.js)도 이 값을 읽는다 */
  --press-ms: 60ms;
  --swing-ms: 120ms;
  --shake-ms: 300ms;  --shake-px: 6px;
  --hit-ms: 420ms;    --pop-px: 24px;
  --crack-ms: 180ms;
  --crit-scale: 1.4;  --flash-ms: 120ms;
  --stage-ms: 240ms;  --stage-scale: 1.05;  --band-ms: 2000ms;
  --clear-ms: 1500ms;
  --r: 12px;
  --gap: 20px;
  --pad: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--font); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; word-break: keep-all;
  overflow-wrap: anywhere;   /* 띄어쓰기 없는 긴 이름은 넘칠 때만 끊는다 */
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }   /* 화면 제목·영역으로 옮긴 포커스(스크린 리더용)는 테두리 없이 */

.wrap {
  max-width: 440px; margin: 0 auto; min-height: 100dvh;
  padding: calc(var(--pad) + env(safe-area-inset-top)) var(--pad) calc(var(--pad) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: var(--gap);
}

/* 머리 — 심벌 + 「모금」 */
.mark a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: inherit; text-decoration: none;
  font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.mark img { border-radius: 7px; }

/* 시작 화면 — 심벌 + 워드마크 */
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 24px; }
.symbol { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 0 1px var(--line); }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 28px; line-height: 1.2; letter-spacing: -0.03em; }

/* 글 */
.eyebrow { font-size: 13px; font-weight: 600; color: var(--ember-text); letter-spacing: 0; }
.h1 { font-family: var(--serif); font-size: 30px; line-height: 1.3; font-weight: 700; letter-spacing: -0.03em; }
.lead { font-size: 16px; color: var(--sub); }
.small { font-size: 13px; color: var(--sub); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.big { font-size: 48px; line-height: 1.05; font-weight: 700; letter-spacing: -0.04em; }
.big small { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--sub); }
.err { font-size: 14px; color: var(--ember-text); min-height: 1.4em; }
.label { font-size: 13px; font-weight: 600; }
.center { text-align: center; }

/* 배치 */
.spacer { flex: 1; }
.hero { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.or { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--sub); }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

/* 면 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card .kv b { font-size: 20px; letter-spacing: -0.02em; }
.vault { gap: 10px; }
.meter { height: 6px; border-radius: 3px; background: var(--sand); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ember); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 32px 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows b { font-weight: 600; }
.rows .num { color: var(--ember-text); font-size: 13px; font-weight: 600; padding-top: 2px; }

/* 단추·입력 */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 52px; padding: 0 20px; border-radius: var(--r); border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; cursor: pointer;
  transition: opacity .15s;
}
a.btn { text-decoration: none; }
.btn:active { opacity: .85; }
.btn:disabled { opacity: .4; cursor: default; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-text { display: inline-flex; align-items: center; align-self: center; background: none; border: 0; min-height: 44px; color: var(--sub); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.field {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 16px;
}
.field:focus { border-color: var(--ink); outline: none; }
.inline-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.inline-field .field { min-width: 0; letter-spacing: 0.08em; text-transform: uppercase; }
.inline-field .btn { width: auto; }

/* 초대 문구·코드 */
.msg { white-space: pre-line; word-break: break-all; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: 15px; user-select: all; }
.code { font-size: 20px; letter-spacing: 0.12em; }

/* 내 모임 · 멤버 */
.list, .people { list-style: none; margin: 0; padding: 0; }
.list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-weight: 600; }
.list li:last-child a { border-bottom: 1px solid var(--line); }
.list small, .people small { font-size: 12px; color: var(--ember-text); font-weight: 600; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); }
.people li:last-child { border-bottom: 1px solid var(--line); }
.people li.me { font-weight: 700; }
.people li.empty { color: var(--faint); }

/* 홈 — 머리줄(심벌 · 마이) · 패 카드(금고 그림 · 등급 · 진행률) */
.topbar { display: flex; align-items: center; justify-content: space-between; }
.groups a { align-items: center; gap: 14px; padding: 14px 0; }
.groups .thumb { width: 52px; height: 52px; flex: none; }
.groups a > .stack { flex: 1; min-width: 0; gap: 6px; }
.groups .kv > span:first-child { min-width: 0; }

/* 도트 그림 — 슬롯 파일이든 기본 SVG 든 픽셀 그대로 키운다 */
.px { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.sheet { background-size: calc(var(--frames) * 100%) 100%; background-repeat: no-repeat; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 금고(전투) — 위 띠 · 금고 · 체력 · 에너지 · 내리치기 */
.vault-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 8px; }
.vault-head .stack { gap: 6px; min-width: 0; }
.clears { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.clears b { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.arena { position: relative; width: min(62vw, 232px); aspect-ratio: 1; margin: 8px auto 0; }
.arena::before { content: ''; position: absolute; left: -12%; right: -12%; bottom: -4%; height: 18%; border-radius: 50%; background: var(--dungeon-bg); z-index: -1; }
.arena .art { width: 100%; height: 100%; }
.arena.tremble .art { animation: tremble 2.6s ease-in-out infinite; }
.arena .swing { position: absolute; right: -8%; top: -12%; width: 40%; aspect-ratio: 1; transform-origin: 50% 100%; opacity: 0; pointer-events: none; }
.arena .spark { position: absolute; left: 30%; top: 22%; width: 40%; aspect-ratio: 1; opacity: 0; pointer-events: none; }
.arena .fresh { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--ember); clip-path: inset(0 100% 0 0); pointer-events: none; }
.pop { position: absolute; left: 0; right: 0; top: 4%; text-align: center; font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink); text-shadow: 0 2px 0 var(--paper); pointer-events: none; opacity: 0; }
.pop.crit { color: var(--ember-text); font-size: calc(36px * var(--crit-scale)); }
/* 한 번 내리칠 때의 박자 — 망치 → 흔들림(+불꽃) → 숫자 → 금 */
.arena.hit .swing { animation: swing var(--swing-ms) ease-in both, fade 200ms calc(var(--swing-ms) + var(--shake-ms)) forwards; }
.arena.hit .art { animation: shake var(--shake-ms) var(--swing-ms) both; }
.arena.hit .spark { animation: spark var(--shake-ms) var(--swing-ms) ease-out both; }
.arena.hit .spark .sheet { animation: sheet var(--shake-ms) var(--swing-ms) steps(var(--frames), jump-none) both; }   /* 이펙트 시트만 — 캐릭터 시트는 styles-pixel.css .crew-m */
.arena.hit .pop { animation: pop var(--hit-ms) calc(var(--swing-ms) + var(--shake-ms)) ease-out both; }
.arena.hit .fresh { animation: crack var(--crack-ms) calc(var(--swing-ms) + var(--shake-ms) + var(--hit-ms)) steps(4) forwards; }
.arena.stage-up .vault-art { animation: stage var(--stage-ms) ease-out; }
.band { position: absolute; left: 50%; bottom: -14px; z-index: 2; width: max-content; max-width: calc(100vw - 48px); translate: -50% 0;
  padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600; text-align: center; animation: rise .24s ease-out; }
.flash { position: fixed; inset: 0; z-index: 20; background: var(--ember); opacity: 0; pointer-events: none; animation: flash var(--flash-ms) var(--swing-ms) ease-out both; }
@keyframes swing { from { opacity: 1; transform: rotate(30deg); } to { opacity: 1; transform: rotate(-70deg); } }
@keyframes fade { to { opacity: 0; } }
@keyframes shake {
  20% { transform: translateX(calc(var(--shake-px) * -1)); }
  40% { transform: translateX(var(--shake-px)); }
  60% { transform: translateX(calc(var(--shake-px) * -.6)); }
  80% { transform: translateX(calc(var(--shake-px) * .3)); }
}
@keyframes spark { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.3); } }
@keyframes sheet { from { background-position: 0 0; } to { background-position: 100% 0; } }
@keyframes pop {
  0% { opacity: 0; transform: translateY(0) scale(.8); }
  25% { opacity: 1; transform: translateY(calc(var(--pop-px) * -.3)) scale(1.06); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateY(calc(var(--pop-px) * -1)); }
}
@keyframes crack { to { clip-path: inset(0); } }
@keyframes stage { 50% { transform: scale(var(--stage-scale)); } }
@keyframes flash { from { opacity: .35; } to { opacity: 0; } }
@keyframes tremble { 0%, 84%, 100% { transform: none; } 88% { transform: translateY(-3px) rotate(-.8deg); } 92% { transform: rotate(.8deg); } 96% { transform: translateY(-2px); } }

/* 금고 위 띠(오늘 우리 패 광고) · 층 바닥 타일 · 켜진 버프 · 작은 단추 넷(대장간·아이템·연타·동료) */
.party-band { margin-top: -8px; }
.tiles { display: grid; grid-template-columns: repeat(8, 1fr); margin-top: -4px; border-radius: 6px; overflow: hidden; opacity: .55; }
.tiles .px { aspect-ratio: 1; height: auto; }
.buffs { display: flex; flex-wrap: wrap; gap: 6px; }
.buffs .chip { margin: 0; color: var(--ink); }
.more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.more a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 72px; padding: 8px 2px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.more .px { width: 36px; height: 36px; }
.item-ico { display: block; width: 32px; height: 32px; flex: none; }

/* 오늘 남은 광고 칸(서버가 센 값, 모든 광고 자리 합산) — 쓰면 줄어든다 */
.energy { display: grid; grid-template-columns: repeat(var(--cap), 1fr); gap: 3px; }
.energy i { height: 14px; border-radius: 2px; background: var(--sand); }
.energy i.on { background: var(--ember); }

/* 내리치기 — 고른 망치 그림 + 쿨타임 고리(남은 간격만큼 차 있다가 비워진다) */
.btn-hit { min-height: 64px; gap: 12px; font-size: 17px; transition: transform var(--press-ms) ease-out, opacity .15s; }
.btn-hit:active:not(:disabled) { transform: scale(.97); }
.btn-hit .ring { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.btn-hit .ring .px { width: 24px; height: 24px; }
.btn-hit .ring svg:last-child { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.btn-hit .ring circle { fill: none; stroke: var(--ember); stroke-width: 3; stroke-dasharray: 100; stroke-dashoffset: 100; }
.blink { animation: blink 1.2s ease-in-out infinite; }   /* 튜토리얼이 가리키는 단추(내리치기·대장간·동료) */
@keyframes blink { 50% { box-shadow: 0 0 0 6px rgba(200, 85, 46, .28); } }

/* 튜토리얼 말풍선 · 초대 카드 */
.bubble { position: relative; padding: 12px 14px; border-radius: var(--r); background: var(--ink); color: var(--paper); font-size: 14px; animation: rise .3s ease-out; }
.bubble::after { content: ''; position: absolute; left: var(--at, 50%); bottom: -6px; width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.invite-card { animation: rise .4s ease-out; }
.invite-card .lead { color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 18px; }

/* 해금 축하 — 작은 카드(칭호·망치·배지) */
.toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; translate: -50% 0;
  width: min(392px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); box-shadow: 0 6px 24px rgba(25, 23, 26, .12); text-align: left; cursor: pointer; animation: rise .3s ease-out; }
.toast .px { width: 32px; height: 32px; flex: none; }
.toast span { display: flex; flex-direction: column; }
.toast small { font-size: 12px; font-weight: 600; color: var(--ember-text); }
.toast b { font-size: 16px; }

/* 칭호 뱃지 */
.chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 7px 1px 3px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--sub); vertical-align: middle; white-space: nowrap; }
.chip .px { width: 16px; height: 16px; }
.chip-lg { align-self: flex-start; margin: 0; padding: 4px 10px 4px 6px; font-size: 14px; color: var(--ink); }
.chip-lg .px { width: 20px; height: 20px; }


/* 순위 — 1위만 불빛 · 왕관·메달 · 오늘 친 사람 점 */
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; min-height: 48px; border-top: 1px solid var(--line); }
.rank li:last-child { border-bottom: 1px solid var(--line); }
.rank .n { font-size: 13px; font-weight: 600; color: var(--sub); }
.rank .name { min-width: 0; }
.rank .name small { margin-left: 6px; font-size: 12px; color: var(--sub); }
.rank .s { font-weight: 600; }
.rank li.me .name { font-weight: 700; }
.rank li.first .n, .rank li.first .s { color: var(--ember-text); }
.rank li.first .s { font-size: 18px; }
.rank .n .px { width: 20px; height: 20px; }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--olive); vertical-align: middle; }

/* 멤버 10칸 */
.slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.slots li { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 15px; overflow: hidden; }
.slots .on { background: var(--ink); color: var(--paper); }
.slots .on.me { background: var(--ember-text); color: #fff; }   /* 흰 글자 대비 5.4:1 */
.slots .off { border: 1px dashed var(--line-strong); }

/* 마이 — 설정 줄 */
.settings li { min-height: 52px; }
.settings li.off { color: var(--sub); }
.settings label { flex: 1; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.settings input { width: 22px; height: 22px; accent-color: var(--ember); }
.settings label.two { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 0; }
.settings input[type="time"] { width: auto; height: 40px; padding: 0 10px; font: inherit; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; }
.settings input:disabled { opacity: .4; }
.row-link { flex: 1; min-height: 44px; display: flex; align-items: center; color: inherit; text-decoration: none; }

/* 마이 — 캐릭터 · 광고 세 칸 · 망치 단계 · 배지 격자 */
.me-char { width: 96px; height: 96px; }
.trio { grid-template-columns: repeat(3, 1fr); }
.me-hammer { display: inline-flex; align-items: center; gap: 4px; }
.me-hammer .px { width: 24px; height: 24px; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.badges li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 1px solid var(--line); border-radius: var(--r);
  text-align: center; font-size: 13px; font-weight: 600; line-height: 1.3; }
.badges .px { width: 40px; height: 40px; }
.badges small { font-size: 11px; font-weight: 400; color: var(--sub); }
.badges li.off span { color: var(--sub); }
.badges li.off .px { filter: grayscale(1); opacity: .35; }

/* 대장간 — 카드 안 망치는 16칸 크기 · 강화 성공 연출(.card.up) */
.card .pixel-slot { width: calc(16px * var(--pixel-scale)); }
.card.up { border-color: var(--ember); animation: stage var(--stage-ms) ease-out, rise .3s ease-out; }

/* 연타 모드 — 화면 전체가 두드리는 판(js/screens/rush.js) */
.rush-pad { position: fixed; inset: 0; z-index: 50; width: 100%; margin: 0; border: 0; font: inherit; cursor: pointer;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--ink); color: var(--paper); touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.rush-pad .top { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.rush-pad .t { margin: 0; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rush-pad .bar { height: 6px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--paper) 20%, transparent); }
.rush-pad .bar i { display: block; height: 100%; background: var(--ember); transform-origin: left; }
.rush-pad .n { font-size: 120px; line-height: 1; font-weight: 800; color: var(--ember); font-variant-numeric: tabular-nums; }
.rush-pad .hint { margin: 0; font-size: 15px; color: var(--sand); }

/* 클리어 — 깨지는 연출 --clear-ms(흔들리다 터지고 빛과 조각이 흩어진다, 슬롯 12장이 있으면 그것) → 카드 */
.breaking { flex: 1; display: grid; place-items: center; min-height: 70dvh; }
.breaking > * { grid-area: 1 / 1; }
.breaking .art { width: min(60vw, 232px); aspect-ratio: 1; }
.breaking:not(.frames) .art { animation: burst var(--clear-ms) ease-in both; }
.breaking .glow, .breaking .bits { width: min(68vw, 260px); overflow: visible; }
.breaking .glow circle { transform-box: fill-box; transform-origin: center; opacity: 0; animation: glow calc(var(--clear-ms) * .8) calc(var(--clear-ms) * .2) ease-out forwards; }
.breaking .bits rect { transform-box: fill-box; transform-origin: center; opacity: 0; animation: fly calc(var(--clear-ms) * .65) calc(var(--clear-ms) * .3) cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes burst { 10% { transform: translateX(-6px); } 20% { transform: translateX(6px); } 30% { transform: scale(1.08); } 100% { transform: scale(.6); opacity: 0; } }
@keyframes glow { 0% { opacity: 0; transform: scale(.3); } 40% { opacity: .85; } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes fly { 0% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
.clear-card { animation: rise .5s ease-out; }
.clear-card > .kv:first-child b { font-size: 34px; }
.facts p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.facts p > .small:first-child { width: 100%; }
.facts b { font-size: 22px; font-weight: 700; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* 개발용 가짜 광고 */
.fake-ad { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--ink); color: var(--paper); }
.fake-ad .btn-text { color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .arena .swing, .arena .spark, .flash { display: none; }
  .arena.hit .pop { opacity: 1; transform: translateY(calc(var(--pop-px) * -.5)); }
  .arena.hit .fresh { clip-path: none; }
}
