/* 승소 대행진 · 2026-11-07 신설 · 같은 날 2판(게임 로비 첫 화면 · 장·별·필살기)
   헌법 §7 재미 앱 표준(크림 줄무늬 · 검정 테두리 카드 · Black Han Sans · 빨강/노랑/남색). 게임 화면은 캔버스 하나. */
:root {
  --cream: #FFF6E5;
  --ink: #1B1B1F;
  --ink-2: #3A3530;
  --mute: #6E6456;
  --red: #E8332A;
  --yellow: #FFD13F;
  --navy: #2E4374;
  --green: #2E8B57;
  --blue: #2F7DF6;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex; flex-direction: column; overflow: hidden; height: 100dvh;
  color: var(--ink); word-break: keep-all; line-height: 1.55;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--cream) repeating-linear-gradient(135deg, transparent 0 24px, rgba(233,196,128,.20) 24px 48px);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}

/* ── 머리 ── */
.shin-header { flex: none; padding: 7px 0; background: rgba(255,255,255,.7); border-bottom: 2px solid var(--ink); position: relative; z-index: 30; }
.shin-header-inner { max-width: 640px; margin: 0 auto; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 2.5px solid var(--ink); border-radius: 8px; }
.brand-name { font-weight: 900; font-size: .92rem; letter-spacing: -.01em; }
.head-tools { display: flex; align-items: center; gap: 7px; flex: none; }
.tool-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: inherit;
  font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.tool-btn:active { transform: translate(2px,2px); box-shadow: none; }
.tool-btn[aria-pressed="false"] { opacity: .55; }

/* ── 무대(캔버스) ── */
.stage { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 520px; margin: 0 auto; overflow: hidden;
  border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); background: #9fd8ff; touch-action: none; user-select: none; -webkit-user-select: none; }
@media (max-width: 524px) { .stage { border-left: 0; border-right: 0; } }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ── 경기 중 위쪽 ── */
.hud { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; pointer-events: none; }
.hud-row { display: flex; align-items: center; gap: 7px; width: 100%; }
.hud-case { flex: none; padding: 3px 10px; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 99px; font-family: 'Black Han Sans', sans-serif; font-size: .95rem; box-shadow: 2px 2px 0 var(--ink); }
.hud-bar { position: relative; flex: 1; height: 14px; background: rgba(255,255,255,.85); border: 2.5px solid var(--ink); border-radius: 99px; overflow: visible; }
.hud-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--blue), #61B0FF); }
.hud-boss { position: absolute; right: -8px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 24px; height: 24px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--red); color: #fff; font-size: .78rem; }
.hud-coin { flex: none; display: flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; background: #fff; border: 2.5px solid var(--ink); border-radius: 99px; font-weight: 900; font-size: .88rem; box-shadow: 2px 2px 0 var(--ink); }
.hud-coin::before, .pill.coin i { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFF3B0, var(--yellow) 55%, #D9A200); border: 2px solid var(--ink); flex: none; }
.hud-coin.bump { animation: bump .3s; }
.hud-pause { pointer-events: auto; flex: none; width: 32px; height: 32px; border: 2.5px solid var(--ink); border-radius: 10px; background: #fff; font-weight: 900; font-size: .9rem; box-shadow: 2px 2px 0 var(--ink); cursor: pointer; }
.hud-goal { padding: 1px 9px; background: rgba(27,27,31,.72); color: #FFE79A; border-radius: 99px; font-size: .68rem; font-weight: 800; letter-spacing: -.01em; }
@keyframes bump { 40% { transform: scale(1.22); } }

.boss-hp { position: absolute; left: 14px; right: 14px; top: 66px; z-index: 5; pointer-events: none; text-align: center; }
.boss-hp span { display: inline-block; padding: 1px 10px; margin-bottom: 3px; background: var(--ink); color: #fff; border-radius: 6px; font-family: 'Black Han Sans', sans-serif; font-size: .85rem; letter-spacing: .02em; }
.boss-hp div { height: 14px; background: #fff; border: 2.5px solid var(--ink); border-radius: 6px; overflow: hidden; }
.boss-hp i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), #FF7B5C); transition: width .12s linear; }

/* ── 이의 있음!(필살기) ── */
.obj-btn { --p: 0%; position: absolute; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 6; width: 78px; height: 78px; padding: 0; border: 3px solid var(--ink); border-radius: 50%; cursor: pointer; color: #fff;
  background: conic-gradient(#FFD13F var(--p), rgba(27,27,31,.55) 0); box-shadow: 3px 3px 0 var(--ink); }
.obj-btn span { position: absolute; inset: 7px; display: grid; place-items: center; border-radius: 50%; background: #3A3F55; border: 2.5px solid var(--ink); font-family: 'Black Han Sans', sans-serif; font-size: .9rem; line-height: 1.02; text-shadow: 1px 1px 0 var(--ink); }
.obj-btn[disabled] { cursor: default; opacity: .9; }
.obj-btn.ready span { background: var(--red); color: #fff; }
.obj-btn.ready { animation: objReady .7s ease-in-out infinite; box-shadow: 0 0 0 4px rgba(255,209,63,.6), 3px 3px 0 var(--ink); }
.obj-btn.pressed { transform: scale(.9); }
.hud[hidden] ~ .obj-btn { display: none; }
@keyframes objReady { 50% { transform: scale(1.1) rotate(-6deg); } }
.obj-cut { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; pointer-events: none; }
.obj-cut b { padding: 14px 26px; font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: clamp(2.6rem, 14vw, 4rem); color: #fff; background: var(--red); border: 5px solid var(--ink); border-radius: 12px;
  text-shadow: 3px 3px 0 var(--ink); box-shadow: 8px 8px 0 var(--ink); transform: rotate(-8deg); clip-path: polygon(0 8%, 6% 0, 50% 6%, 94% 0, 100% 10%, 97% 50%, 100% 92%, 92% 100%, 50% 94%, 8% 100%, 0 90%, 3% 50%); }
.obj-cut.go b { animation: objCut 1.05s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes objCut { 0% { transform: scale(3) rotate(-8deg); opacity: 0; } 18% { transform: scale(1) rotate(-8deg); opacity: 1; } 75% { transform: scale(1.05) rotate(-8deg); opacity: 1; } 100% { transform: scale(1.4) rotate(-8deg); opacity: 0; } }
.big-stamp { position: absolute; left: 50%; top: 38%; z-index: 9; padding: 6px 22px; transform: translate(-50%, -50%) rotate(-12deg); pointer-events: none;
  font-family: 'Black Han Sans', sans-serif; font-size: 3.4rem; color: var(--red); border: 7px solid var(--red); border-radius: 14px; background: rgba(255,255,255,.75); }
.big-stamp.go { animation: stampIn 1.1s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes stampIn { 0% { transform: translate(-50%, -50%) rotate(-12deg) scale(3); opacity: 0; } 20% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }

/* ── 보스 컷인 ── */
.cutin { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; pointer-events: none; }
.cut-band { position: relative; display: flex; align-items: center; gap: 10px; width: 112%; min-height: 96px; padding: 10px 30% 10px 12%; background: var(--ink); color: #fff;
  border-top: 4px solid var(--yellow); border-bottom: 4px solid var(--yellow); transform: rotate(-4deg); animation: cutIn 2.25s cubic-bezier(.2,.9,.2,1) forwards; }
.cut-jo { width: 70px; height: 70px; border-radius: 50%; border: 3px solid var(--yellow); background: var(--red); object-fit: cover; flex: none; }
.cut-vs { font-family: 'Black Han Sans', sans-serif; font-size: 2rem; color: var(--yellow); text-shadow: 3px 3px 0 var(--red); flex: none; }
.cut-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.cut-txt small { color: var(--yellow); font-weight: 900; font-size: .72rem; }
.cut-txt strong { font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: 1.25rem; }
.cut-txt em { font-style: normal; font-size: .76rem; opacity: .9; }
.cut-boss { position: absolute; right: 12%; bottom: -6px; height: 168px; width: auto; filter: drop-shadow(4px 4px 0 rgba(0,0,0,.4)); transform: rotate(4deg); }
.cut-boss[hidden] { display: none; }
@keyframes cutIn { 0% { transform: translateX(110%) rotate(-4deg); } 16% { transform: translateX(0) rotate(-4deg); } 84% { transform: translateX(0) rotate(-4deg); } 100% { transform: translateX(-120%) rotate(-4deg); } }

/* ── 새 장 소개 ── */
.ch-card { --c1: #0E1838; --c2: #9E2232; position: absolute; inset: 0; z-index: 13; display: grid; place-items: center; padding: 18px; background: rgba(15,15,25,.55); }
.ch-card[hidden] { display: none; }
.ch-in { width: min(100%, 320px); padding: 20px 18px 16px; text-align: center; color: #fff; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 7px 7px 0 var(--ink);
  background: linear-gradient(160deg, var(--c1), var(--c2)); animation: pop .45s cubic-bezier(.2,1.4,.4,1); }
.ch-in small { display: inline-block; padding: 2px 12px; border-radius: 99px; background: var(--yellow); color: var(--ink); font-weight: 900; font-size: .8rem; }
.ch-in h2 { margin: 8px 0 4px; font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: 2.6rem; line-height: 1.05; text-shadow: 3px 3px 0 var(--ink); }
.ch-hz { margin: 0 0 4px; font-weight: 900; color: #FFE79A; }
.ch-tip { margin: 0 0 14px; font-size: .9rem; font-weight: 700; line-height: 1.5; }
.ch-in .btn { width: 100%; }

/* ══════ 첫 화면(게임 로비) ══════ */
.menu { --ch1: #5DB8FF; --ch2: #E8483D; position: absolute; inset: 0; z-index: 10; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; background: #15203A; }
.menu[hidden], .pause[hidden], .hud[hidden], .boss-hp[hidden], .cutin[hidden], .obj-cut[hidden], .big-stamp[hidden] { display: none; }
.menu-hero { position: relative; height: max(230px, 44%); overflow: hidden; }
.menu-hero .key { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; animation: kenburns 16s ease-in-out infinite alternate; }
.menu-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,16,34,.55) 0%, rgba(10,16,34,0) 34%, rgba(10,16,34,0) 66%, rgba(21,32,58,.92) 100%); }
@keyframes kenburns { 0% { transform: scale(1.04) translateY(0); } 100% { transform: scale(1.12) translateY(-2%); } }
.hero-top { position: absolute; left: 10px; right: 10px; top: 8px; z-index: 2; display: flex; gap: 6px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; background: rgba(255,255,255,.92); border: 2.5px solid var(--ink); border-radius: 99px; box-shadow: 2px 2px 0 var(--ink); font-weight: 900; font-size: .78rem; white-space: nowrap; }
.pill.ch { background: var(--ink); color: #fff; margin-right: auto; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pill.star { color: #B07800; }
.logo { position: absolute; left: 14px; top: 50px; z-index: 2; margin: 0; display: flex; flex-direction: column; font-family: 'Black Han Sans', sans-serif; font-weight: 400; line-height: .95; transform: rotate(-5deg); transform-origin: left center; }
.logo span { display: block; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.logo .l1 { font-size: clamp(2.2rem, 11vw, 2.9rem); color: #fff; text-shadow: 3px 3px 0 var(--ink), 5px 5px 0 var(--red); }
.logo .l2 { font-size: clamp(2.9rem, 15vw, 3.9rem); background: linear-gradient(180deg, #FFF3A6 0%, #FFD13F 45%, #FF9F1C 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(3px 3px 0 var(--ink)) drop-shadow(3px 3px 0 var(--red)); animation: logoBob 2.4s ease-in-out infinite; }
@keyframes logoBob { 50% { transform: translateY(-3px) rotate(1deg); } }
.tagline { position: absolute; left: 16px; right: 50%; top: calc(52px + clamp(5.4rem, 25vw, 6.9rem)); z-index: 2; margin: 0; color: #fff; font-size: .78rem; font-weight: 800; line-height: 1.45; text-shadow: 0 1px 3px rgba(0,0,0,.8), 1px 1px 0 var(--ink); }
.tagline b { color: var(--yellow); }
/* 키아트의 조변을 누르면 한마디(그림 위 투명 단추) */
.menu-jo { position: absolute; left: 30%; right: 26%; bottom: 8%; top: 40%; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; }
.menu-jo img { display: none; }
.bubble { position: absolute; left: 50%; top: -6px; z-index: 3; transform: translateX(-50%); width: max-content; max-width: 210px; padding: 7px 11px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); font-size: .8rem; font-weight: 800; line-height: 1.4; text-align: center; color: var(--ink); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); border: 8px solid transparent; border-top-color: var(--ink); }
.menu-jo.poke .bubble { animation: pop .3s; }

.sheet { position: relative; z-index: 3; margin-top: -16px; padding: 12px 12px 18px; background: var(--cream) repeating-linear-gradient(135deg, transparent 0 24px, rgba(233,196,128,.18) 24px 48px);
  border-top: 3px solid var(--ink); border-radius: 22px 22px 0 0; box-shadow: 0 -6px 18px rgba(0,0,0,.25); min-height: 56%; }
.go-row { display: grid; grid-template-columns: 40% 1fr; gap: 9px; align-items: stretch; }
.next-boss { position: relative; display: flex; align-items: flex-end; gap: 4px; padding: 6px 7px 7px 80px; min-height: 74px; background: linear-gradient(160deg, #2A2F45, #15182A); color: #fff; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); overflow: visible; }
.next-boss img, .next-boss canvas { position: absolute; left: 2px; bottom: 2px; height: 104px; width: auto; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.5)); animation: bossIdle 1.6s ease-in-out infinite; transform-origin: 50% 100%; }
.next-boss canvas { width: 74px; height: 96px; }
.next-boss [hidden] { display: none; }
@keyframes bossIdle { 50% { transform: scaleY(1.04) scaleX(.98); } }
.nb-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.nb-txt small { color: var(--yellow); font-weight: 900; font-size: .64rem; }
.nb-txt b { font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: .92rem; word-break: keep-all; }
.go-btn { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 8px 6px; font-family: 'Black Han Sans', sans-serif; font-size: 2rem; line-height: 1; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #FF5B4F, var(--red) 55%, #C21F17); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink), inset 0 3px 0 rgba(255,255,255,.35); text-shadow: 2px 2px 0 var(--ink); animation: goPulse 1.4s ease-in-out infinite; }
.go-btn small { display: block; margin-top: 4px; font-size: .8rem; text-shadow: none; color: var(--yellow); font-family: inherit; }
.go-btn.locked { background: linear-gradient(180deg, #8F95A8, #6B7086); animation: none; font-size: 1.15rem; }
.go-btn.locked small { color: #fff; font-size: .66rem; line-height: 1.3; }
.go-btn.pressed, .go-btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }
@keyframes goPulse { 50% { transform: scale(1.035); } }
.daily { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin-top: 9px; padding: 7px 12px; cursor: pointer; font: inherit; color: var(--ink);
  background: linear-gradient(90deg, #FFE27A, var(--yellow)); border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); }
.daily b { font-weight: 900; font-size: .92rem; }
.daily small { font-weight: 800; font-size: .72rem; color: #7A5200; }
.daily.done { background: #fff; }
.daily.pressed { transform: translate(3px,3px); box-shadow: none; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 11px 0 0; border: 2.5px solid var(--ink); border-radius: 12px 12px 0 0; overflow: hidden; }
.tab { padding: 7px 2px; font: inherit; font-weight: 900; font-size: .82rem; color: var(--mute); background: #EFE6D4; border: 0; border-right: 2px solid var(--ink); cursor: pointer; }
.tab:last-child { border-right: 0; }
.tab.on { background: #fff; color: var(--ink); }
.panel { padding: 9px 8px 8px; background: #fff; border: 2.5px solid var(--ink); border-top: 0; border-radius: 0 0 12px 12px; box-shadow: 3px 3px 0 var(--ink); }
.panel[hidden] { display: none; }
.ups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.up { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 5px; cursor: pointer; font: inherit; color: var(--ink);
  background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 2px 2px 0 var(--ink); line-height: 1.15; }
.up .ic { font-size: 1.3rem; line-height: 1.1; }
.up .nm { font-weight: 900; font-size: .74rem; }
.up .lv { font-size: .62rem; font-weight: 800; color: var(--mute); }
.up .cost { margin-top: 3px; padding: 1px 7px; border-radius: 99px; background: var(--yellow); border: 2px solid var(--ink); font-weight: 900; font-size: .72rem; }
.up.cant .cost { background: #eee; color: #999; }
.up.cant { opacity: .8; }
.up.max .cost { background: var(--navy); color: #fff; }
.up.pressed { transform: translate(2px,2px); box-shadow: none; }
.up.buy { animation: buyFlash .45s; }
@keyframes buyFlash { 30% { background: var(--yellow); transform: scale(1.06); } }
.cap { margin: 7px 0 0; text-align: center; font-size: .7rem; font-weight: 800; color: var(--mute); }

.book { display: grid; gap: 5px; }
.bk-row { display: grid; grid-template-columns: 58px 1fr; gap: 6px; align-items: center; }
.bk-ch { --c: #E8483D; display: flex; flex-direction: column; padding: 3px 6px; border-radius: 9px; background: var(--c); color: #fff; font-weight: 900; font-size: .74rem; line-height: 1.1; border: 2px solid var(--ink); }
.bk-ch small { font-size: .58rem; font-weight: 800; opacity: .9; }
.bk-cases { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.bk-c { display: flex; flex-direction: column; align-items: center; padding: 2px 0 1px; font: inherit; border: 2px solid var(--ink); border-radius: 9px; background: #F3EEE4; color: var(--mute); cursor: default; line-height: 1.05; }
.bk-c b { font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: .84rem; }
.bk-c i { font-style: normal; font-size: .56rem; color: #D9A200; letter-spacing: -.05em; min-height: .7rem; }
.bk-c.done { background: #fff; color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.bk-c.now { background: var(--yellow); color: var(--ink); }
.bk-c.boss b { color: var(--red); }
.bk-c.pressed { transform: translate(2px,2px); box-shadow: none; }
.bk-row.shut { opacity: .55; }
.bk-lock { font-size: .72rem; font-weight: 800; color: var(--mute); }

.ward { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wd { display: flex; align-items: center; gap: 4px; padding: 3px 5px; font: inherit; cursor: pointer; text-align: left; background: #fff; border: 2.5px solid var(--ink); border-radius: 11px; box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.wd canvas { width: 30px; height: 42px; flex: none; }
.wd span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.wd b { font-size: .74rem; font-weight: 900; }
.wd small { font-size: .64rem; font-weight: 900; color: #B07800; }
.wd.on { background: var(--yellow); }
.wd.on small { color: var(--ink); }
.wd.cant { opacity: .7; }
.wd.pressed { transform: translate(2px,2px); box-shadow: none; }

.how { margin: 10px 0 4px; padding: 7px 10px; font-size: .76rem; line-height: 1.55; background: #fff; border: 2px dashed var(--ink); border-radius: 12px; }
.how summary { font-weight: 900; cursor: pointer; }
.how p { margin: 6px 0 0; }
.note { margin: 6px 0; font-size: .7rem; color: var(--mute); }
.pz-foot { text-align: center; margin-top: 8px; font-size: .8rem; }
.pz-foot a { color: var(--ink); font-weight: 800; }
.copy { text-align: center; font-size: .7rem; color: var(--mute); margin: 4px 0 0; }

/* ── 멈춤 ── */
.pause { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; background: rgba(27,27,31,.45); }
.pause-card { display: grid; gap: 10px; width: min(78%, 280px); padding: 18px; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); }
.pause-card h2 { margin: 0; font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: 2rem; }

.btn { padding: 11px 12px; font: inherit; font-weight: 900; font-size: .95rem; cursor: pointer; color: var(--ink); background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); }
.btn.primary { background: var(--red); color: #fff; }
.btn:active { transform: translate(3px,3px); box-shadow: none; }

/* ── 판결 ── */
.result-backdrop { position: absolute; inset: 0; z-index: 14; display: grid; place-items: center; padding: 12px; background: rgba(27,27,31,.5); overflow-y: auto; }
.result-backdrop[hidden] { display: none; }
.result-card { position: relative; width: min(100%, 360px); padding: 16px 16px 12px; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 7px 7px 0 var(--ink); animation: pop .42s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.r-stamp { position: absolute; right: 14px; top: 14px; padding: 2px 10px; border: 3px solid var(--red); border-radius: 8px; color: var(--red); font-family: 'Black Han Sans', sans-serif; font-size: 1.25rem; transform: rotate(12deg); animation: stamp .5s .25s both cubic-bezier(.2,1.6,.4,1); }
.r-stamp.lose { border-color: var(--navy); color: var(--navy); }
@keyframes stamp { 0% { transform: scale(2.4) rotate(12deg); opacity: 0; } 100% { transform: scale(1) rotate(12deg); opacity: 1; } }
.r-jo { display: block; height: 128px; width: auto; margin: 0 auto 4px; }
.r-level { margin: 0; font-weight: 900; font-size: .78rem; color: var(--mute); }
.r-title { margin: 0; font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: 2.3rem; line-height: 1.1; color: var(--red); text-shadow: 2px 2px 0 var(--ink); }
.r-title.lose { color: var(--navy); }
.r-num { margin: 4px 0 0; font-weight: 800; }
.r-num b { font-size: 1.25rem; }
.r-coin { margin: 4px auto 0; display: inline-block; padding: 3px 12px; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 99px; font-weight: 900; }
.r-desc { margin: 8px 0 10px; font-size: .8rem; color: var(--ink-2); line-height: 1.5; }
.r-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
.link-btn { margin-top: 10px; padding: 4px; background: none; border: 0; font: inherit; font-weight: 800; font-size: .82rem; cursor: pointer; text-decoration: underline; color: var(--ink-2); }
.lawyer-cta { display: block; margin-top: 4px; font-size: .74rem; color: var(--mute); }

.toast { position: absolute; left: 50%; bottom: 18px; z-index: 20; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: 99px; font-weight: 800; font-size: .82rem; white-space: nowrap; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 판결 · 별 세 개 */
.r-stars { display: flex; justify-content: center; gap: 6px; margin: 4px 0 2px; }
.r-stars .st { display: flex; flex-direction: column; align-items: center; width: 88px; opacity: 0; animation: starIn .45s cubic-bezier(.2,1.6,.4,1) forwards; }
.r-stars .st b { font-size: 2.1rem; line-height: 1; color: #D8D2C4; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.r-stars .st.on b { color: var(--yellow); text-shadow: 0 0 10px rgba(255,209,63,.8); }
.r-stars .st small { font-size: .62rem; font-weight: 800; color: var(--mute); line-height: 1.2; }
.r-stars .st.on small { color: var(--ink); }
.r-stars .st:nth-child(2) b { font-size: 2.6rem; transform: translateY(-4px); }
@keyframes starIn { 0% { opacity: 0; transform: scale(2.4) rotate(-30deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }

@media (max-height: 700px) {
  .menu-hero { height: max(210px, 40%); }
  .logo .l1 { font-size: 2.1rem; } .logo .l2 { font-size: 2.8rem; }
  .tagline { top: calc(52px + 5.2rem); }
  .go-btn { font-size: 1.7rem; }
  .r-jo { height: 96px; }
}
/* 동작 줄이기: 계속 흔들리는 것만 끈다(헌법 §7 · 결과 연출은 남긴다) */
@media (prefers-reduced-motion: reduce) {
  .go-btn, .logo .l2, .menu-hero .key, .next-boss img, .next-boss canvas, .obj-btn.ready { animation: none; }
}

/* 처음부터 다시 */
.reset-link { display: block; margin: 8px auto 0; padding: 6px 10px; font: inherit; font-size: .74rem; font-weight: 800; color: var(--mute); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.reset-link[hidden] { display: none; }
.reset { z-index: 20; }
.reset-card { text-align: left; }
.reset-card h2 { text-align: center; color: var(--red); }
.reset-card p { margin: 0; font-size: .84rem; line-height: 1.5; }
.reset-list { margin: 0; padding: 8px 10px 8px 26px; font-size: .82rem; line-height: 1.6; background: #FFF3EF; border: 2px dashed var(--red); border-radius: 10px; }
.reset-warn { font-weight: 900; color: var(--red); text-align: center; }
.btn.danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn.danger:disabled { opacity: .45; cursor: default; }
.reset .btn.primary { background: var(--ink); color: #fff; }

/* 말풍선: 얼굴 옆(자리는 game.js placeBubble 이 정한다) */
.bubble.side { transform: none; text-align: left; }
.bubble.side::after { left: -13px; top: auto; bottom: 8px; transform: none; border: 7px solid transparent; border-right: 9px solid var(--ink); border-left: 0; }
.bubble.up { transform: translateX(-50%); }
