/* 인터랙션 009. DUEL-008 시안의 색·글자 규칙을 그대로 쓴다. */
:root {
  --ink: #14213A; --sub: #5E6A80; --paper: #FFFBF4; --track: #EFE9DF; --bar: #E0D7C8;
  --coral: #FF6B47; --coral-lo: #D9472A; --coral-hi: #FFB49A; --teal: #22B8A6; --teal-lo: #147F74; --gold: #FFC845;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --app-h: 100dvh;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0D1526; font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#app { position: fixed; left: 0; right: 0; top: 0; height: var(--app-h); overflow: hidden; color: #fff; }

/* ---------- 세계 ---------- */
#stage { position: absolute; inset: 0; overflow: hidden; }
#stage > * { position: absolute; left: 0; top: 0; }
.bg { inset: 0; width: 100%; height: 100%; }
.sun { width: 420px; height: 420px; --r: 34px; --g: 110px; --c: #FFF6DA; background: radial-gradient(circle, var(--c) 0, var(--c) var(--r), color-mix(in srgb, var(--c) 55%, transparent) calc(var(--r) + 2px), color-mix(in srgb, var(--c) 18%, transparent) var(--g), transparent 210px); will-change: transform; transition: opacity .6s; }
.flash { inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255,255,255,.85), rgba(255,255,255,.35) 50%, transparent 100%); }
.flash.on { animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.layer .mill { animation: mill 14s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes mill { to { transform: rotate(360deg); } }
.layer { width: 100%; will-change: transform; }
.shade { inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cv-back, .cv-front { pointer-events: none; }
.actor { width: 120px; height: 120px; will-change: transform, filter; transform-origin: 60px 60px; filter: drop-shadow(0 8px 8px rgba(20, 40, 90, .25)); }
.actor svg { overflow: visible; display: block; }
.actor .pulse { animation: pulse .42s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1); } }
#stage.jump { animation: jump .35s ease; }
@keyframes jump { 0% { opacity: 1; } 40% { opacity: .2; } 100% { opacity: 1; } }

/* ---------- UI 기둥 ---------- */
.ui { position: absolute; inset: 0; margin: 0 auto; max-width: 460px; display: flex; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom)); pointer-events: none; }
.ui > * { pointer-events: auto; }
.hud { display: grid; gap: 10px; }
.bar { display: flex; align-items: center; gap: 8px; height: 34px; }
.logo { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 900; letter-spacing: -.06em; text-shadow: 0 1px 2px rgba(20, 33, 58, .35), 0 0 12px rgba(20, 50, 120, .35); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px 0 9px; border-radius: 999px; background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.pill svg { width: 15px; height: 15px; }
.spacer { flex: 1; }
.pair { background: rgba(255, 200, 69, .25); box-shadow: inset 0 0 0 1.5px rgba(255, 200, 69, .8); }
.pair b { color: var(--gold); font-size: 15px; }
.pair.bump { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.25); } }
.icon-btn { width: 34px; height: 34px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.txt { width: auto; padding: 0 10px; font-size: 12.5px; font-weight: 800; }

.qcard { padding: 12px 15px 14px; border-radius: 22px; background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: 0 10px 30px rgba(20, 50, 110, .18); }
.prog { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; color: var(--sub); }
.prog b { color: var(--ink); font-variant-numeric: tabular-nums; }
.segs { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0; margin: 0; list-style: none; }
.segs li { height: 5px; border-radius: 3px; background: #E3E8F0; }
.segs li.ok { background: #9FB3D1; } .segs li.miss { background: #D5DAE3; } .segs li.now { background: var(--coral); } .segs li.hit { background: var(--gold); }
.clock { display: inline-flex; align-items: center; gap: 3px; min-width: 44px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.clock svg { width: 14px; height: 14px; }
.tbar { height: 4px; margin-top: 8px; border-radius: 2px; background: #EEF1F6; overflow: hidden; }
.tbar i { display: block; height: 100%; background: #7FA5D8; transform-origin: left; }
.hud.warn .tbar i { background: var(--coral); }
.hud.warn .clock { color: var(--coral-lo); }
.qcard h1 { margin: 8px 0 0; font-size: 19px; line-height: 1.38; font-weight: 800; letter-spacing: -.045em; word-break: keep-all; }
.qcard .mine { margin: 8px 0 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--sub); }
.qcard .mine b { color: var(--ink); }
.qcard .mine i { width: 12px; height: 12px; border-radius: 50%; background: var(--coral); flex: none; }
.qcard .mine i.here { background: #9FB3D1; }

/* ---------- 눈금 ---------- */
.ruler { position: absolute; right: 12px; width: 26px; top: var(--rt, 200px); bottom: var(--rb, 140px); pointer-events: none; transition: top .4s, bottom .4s; }
.ruler .track { position: absolute; left: 11px; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: rgba(20, 33, 58, .2); }
.ruler .node { position: absolute; left: 7px; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: rgba(255, 255, 255, .45); border: 2px solid rgba(20, 33, 58, .2); }
.ruler .node.zone { background: #fff; }
.ruler .me { position: absolute; left: 1px; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: var(--coral); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(217, 71, 42, .45); }
.ruler .goal { position: absolute; right: 30px; margin-top: -12px; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(20, 33, 58, .45); font-size: 12.5px; font-weight: 800; white-space: nowrap; display: flex; align-items: center; }
[data-screen="start"] .ruler { display: none; }

/* ---------- 판정·도착 ---------- */
.judge { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; }
.judge.show { animation: judge 1.3s cubic-bezier(.2, .9, .3, 1) forwards; }
.judge.stay { animation: judgeIn .3s cubic-bezier(.2, .9, .3, 1) forwards; }
.judge b { display: block; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 18px; font-weight: 900; letter-spacing: -.03em; white-space: nowrap; box-shadow: 0 0 0 3px rgba(255, 200, 69, .7), 0 10px 28px rgba(20, 40, 90, .3); }
.judge.ok b em { font-style: normal; color: var(--coral-lo); }
.judge.match b { background: var(--gold); box-shadow: 0 0 0 4px #fff, 0 10px 28px rgba(255, 170, 40, .5); }
.judge.no b { box-shadow: 0 0 0 3px rgba(20, 33, 58, .2), 0 10px 28px rgba(20, 40, 90, .25); }
.judge.time b { background: #2B3854; color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }
@keyframes judge { 0% { opacity: 0; transform: translate(var(--jx), calc(var(--jy) + 14px)) scale(.7); } 14% { opacity: 1; transform: translate(var(--jx), var(--jy)) scale(1.06); } 22% { transform: translate(var(--jx), var(--jy)) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--jx), calc(var(--jy) - 24px)); } }
@keyframes judgeIn { from { opacity: 0; transform: translate(var(--jx), calc(var(--jy) + 10px)) scale(.8); } to { opacity: 1; transform: translate(var(--jx), var(--jy)); } }

.banner { position: absolute; left: 14px; right: 14px; top: var(--bt, 210px); text-align: center; pointer-events: none; opacity: 0; }
.banner.show { animation: banner 2.1s cubic-bezier(.2, .9, .3, 1) forwards; }
.banner small { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(20, 33, 58, .38); font-size: 13px; font-weight: 800; }
.banner b { display: block; margin-top: 6px; font-size: 40px; font-weight: 900; letter-spacing: -.06em; text-shadow: 0 3px 0 rgba(20, 33, 58, .2), 0 10px 30px rgba(10, 30, 80, .4); }
.banner p { margin: 4px 0 0; font-size: 15px; font-weight: 800; text-shadow: 0 1px 8px rgba(10, 30, 80, .5); }
.banner.small b { font-size: 26px; }
@keyframes banner { 0% { opacity: 0; transform: translateY(14px) scale(.96); } 12% { opacity: 1; transform: none; } 78% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }

.slip { position: fixed; z-index: 30; padding: 8px 14px; border-radius: 10px; background: #fff; color: var(--ink); font: 900 17px var(--font); letter-spacing: -.03em; box-shadow: 0 6px 18px rgba(20, 40, 90, .3); pointer-events: none; white-space: nowrap; }
.slip::after { content: ""; position: absolute; right: -6px; top: 6px; border: 7px solid transparent; border-left-color: #fff; border-right: 0; }

.skip { position: absolute; right: 14px; bottom: calc(var(--dock-h, 90px) + 16px); height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(20, 33, 58, .45); font-size: 13.5px; font-weight: 800; }

/* ---------- 아래 판 ---------- */
.dock { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; } /* 021: 360px에서 입력 줄이 판보다 넓어지던 넘침 수정(그리드 트랙이 입력칸 고유 폭을 따르지 않게) */
.hint { min-height: 20px; margin: 0 4px; font-size: 14.5px; font-weight: 800; text-align: center; text-shadow: 0 1px 8px rgba(10, 30, 80, .55); }
.hint.warn { color: #FFE2D8; }
.throw { display: flex; gap: 8px; padding: 8px; border-radius: 22px; background: rgba(255, 255, 255, .95); box-shadow: 0 10px 30px rgba(20, 50, 110, .2); }
.throw input { flex: 1; min-width: 0; height: 52px; padding: 0 14px; border: 2px solid #E3E8F0; border-radius: 15px; font: 800 18px var(--font); color: var(--ink); letter-spacing: -.03em; background: #fff; outline: none; }
.throw input:focus { border-color: var(--coral-hi); }
.throw input:disabled, .throw input.busy { background: #F4F6F9; color: #8A93A5; }
.go { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 52px; padding: 0 18px; border: 0; border-radius: 15px; background: linear-gradient(180deg, #FF7D5A, var(--coral)); color: #fff; font-size: 17px; font-weight: 900; letter-spacing: -.03em; box-shadow: 0 4px 0 var(--coral-lo); transition: transform .08s, box-shadow .08s, filter .2s; }
.go svg { width: 18px; height: 18px; }
.go:active, .go.press { transform: translateY(4px); box-shadow: 0 0 0 var(--coral-lo); }
.go:disabled { filter: grayscale(.5) brightness(.95); }
.go.big { width: 100%; height: 58px; border-radius: 18px; font-size: 19px; box-shadow: 0 5px 0 var(--coral-lo), 0 12px 24px rgba(217, 71, 42, .3); }

.sheet { padding: 16px 16px 16px; border-radius: 26px; background: var(--paper); color: var(--ink); box-shadow: 0 -12px 40px rgba(20, 40, 90, .2); animation: sheetIn .38s cubic-bezier(.2, .9, .3, 1); }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
.sheet .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.verdict { font-size: 18px; font-weight: 900; letter-spacing: -.04em; line-height: 1.3; }
.verdict em { font-style: normal; color: var(--coral-lo); }
.verdict small { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 700; color: var(--sub); letter-spacing: -.02em; }
.demo { flex: none; height: 22px; padding: 0 8px; border-radius: 6px; background: #F2EADB; color: #8A6A2E; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; }
.top5 { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.top5 li { position: relative; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 9px; height: 40px; padding: 0 14px 0 8px; border-radius: 13px; background: var(--track); overflow: hidden; font-size: 16.5px; font-weight: 800; letter-spacing: -.03em; opacity: 0; transform: translateX(-14px); transition: opacity .22s, transform .3s cubic-bezier(.2, .9, .3, 1); }
.top5 li.in { opacity: 1; transform: none; }
.top5 li .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--bar); transition: width .5s cubic-bezier(.2, .9, .3, 1); }
.top5 li.in .fill { width: var(--w); }
.top5 li > :not(.fill) { position: relative; }
.top5 .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 900; color: var(--sub); background: rgba(255, 255, 255, .7); }
.top5 .ans { display: flex; align-items: center; gap: 7px; min-width: 0; }
.top5 .sw { width: 13px; height: 13px; border-radius: 50%; flex: none; }
.top5 .p { font-weight: 900; font-variant-numeric: tabular-nums; }
.top5 li.r1 .n { background: var(--gold); color: var(--ink); }
.top5 li.me { background: #FFE3D9; color: #fff; }
.top5 li.me .fill { background: linear-gradient(90deg, #FF805F, var(--coral)); }
.top5 li.me .n { background: #fff; color: var(--coral); }
.top5 li.me .p { color: var(--coral-lo); }
.top5 li.me.in { animation: mine .6s .15s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 6px 16px rgba(255, 107, 71, .28); }
@keyframes mine { 40% { transform: scale(1.04); } }
.tag { height: 21px; padding: 0 7px; border-radius: 999px; background: #fff; color: var(--coral-lo); font-size: 12px; font-weight: 900; display: inline-flex; align-items: center; flex: none; }
.tag.fr { background: var(--teal); color: #fff; }
.outside { margin: 8px 2px 0; padding: 9px 12px; border-radius: 13px; border: 2px dashed #F2B8A6; font-size: 14.5px; font-weight: 800; color: var(--coral-lo); opacity: 0; transition: opacity .3s; }
.outside.in { opacity: 1; }
.gap { word-break: keep-all; margin: 10px 2px 10px; font-size: 13.5px; font-weight: 700; color: var(--sub); }
.gap b { color: var(--ink); }

.result h2 { margin: 2px 0 0; font-size: 34px; font-weight: 900; letter-spacing: -.06em; }
.result .eyebrow { font-size: 13.5px; font-weight: 800; color: var(--sub); }
.result .facts { display: flex; justify-content: space-between; margin: 10px 0; font-size: 14px; font-weight: 700; color: var(--sub); }
.result .facts b { color: var(--ink); }
.medals { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0 12px; padding: 0; list-style: none; }
.medals li { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--sub); }
.medals i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12.5px; font-weight: 900; color: var(--ink); background: var(--track); }
.medals i.r1 { background: var(--gold); } .medals i.top { background: #FFD9CC; } .medals i.hit { box-shadow: 0 0 0 3px var(--gold); } .medals i.out { background: #fff; border: 2px dashed #D5CBBB; } .medals i.time { background: #E6E9EF; color: #8A93A5; }
.text-btn { height: 44px; border: 0; background: none; font-size: 15px; font-weight: 800; color: var(--sub); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* 시작 */
.start-card { padding: 18px 16px 16px; border-radius: 26px; background: var(--paper); color: var(--ink); box-shadow: 0 -12px 40px rgba(20, 40, 90, .2); }
.start-card h1 { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.06em; line-height: 1.2; word-break: keep-all; }
.start-card h1 em { font-style: normal; color: var(--coral); }
.start-card p { margin: 6px 0 14px; font-size: 14.5px; font-weight: 700; color: var(--sub); line-height: 1.5; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.modes button { display: grid; gap: 2px; justify-items: start; padding: 12px 14px; border-radius: 16px; border: 2px solid #E8E1D4; background: #fff; text-align: left; }
.modes button b { font-size: 17px; font-weight: 900; letter-spacing: -.04em; }
.modes button small { font-size: 12.5px; font-weight: 700; color: var(--sub); }
.modes button[aria-checked="true"] { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255, 107, 71, .15); }
.invite { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(34, 184, 166, .1); border: 1.5px solid rgba(34, 184, 166, .45); font-size: 14px; font-weight: 800; }
.invite small { display: block; font-size: 12.5px; font-weight: 700; color: var(--sub); }
.fine { margin: 10px 0 0 !important; font-size: 12.5px !important; text-align: center; }

/* 오버레이: 시연 메뉴, 결과 카드 */
.overlay { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(8, 14, 30, .62); backdrop-filter: blur(4px); }
.panel { width: min(100%, 420px); max-height: 100%; overflow: auto; padding: 16px; border-radius: 24px; background: var(--paper); color: var(--ink); }
.panel h3 { margin: 0 0 4px; font-size: 18px; font-weight: 900; }
.panel p { margin: 0 0 12px; font-size: 13.5px; color: var(--sub); line-height: 1.5; }
.panel .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.panel .grid button { min-height: 44px; border: 0; border-radius: 12px; background: #EFE9DF; font-size: 14px; font-weight: 800; color: var(--ink); }
.panel .grid button.on { background: var(--ink); color: #fff; }
.cardwrap { display: grid; justify-items: center; gap: 12px; width: 100%; max-height: 100%; }
.cardwrap .cardbox { height: min(calc(var(--app-h) - 170px), 760px); aspect-ratio: 9 / 16; max-width: 100%; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.cardwrap .cardbox svg { width: 100%; height: 100%; display: block; }
.cardwrap .acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; width: min(100%, 420px); }
.cardwrap .acts button { height: 48px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 14.5px; font-weight: 900; }
.cardwrap .acts button.main { background: var(--coral); color: #fff; }
.cardwrap .note { margin: 0; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .8); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .judge.show, .banner.show { animation: none; opacity: 1; }
}
@media (max-height: 700px) {
  .qcard h1 { font-size: 17px; }
  .top5 li { height: 34px; }
  .banner b { font-size: 32px; }
}
@media (min-width: 900px) {
  .ui { padding-top: 24px; padding-bottom: 24px; }
}
.actor .no { animation: no .5s ease; transform-box: fill-box; transform-origin: center; }
@keyframes no { 20% { transform: rotate(-16deg); } 50% { transform: rotate(13deg); } 80% { transform: rotate(-6deg); } }

/* ===================== 프로토타입 011: 결과·순위·친구·지역·프로필 ===================== */
.me-chip { position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.me-chip .avt { display: block; }
.me-chip b { position: absolute; right: -6px; bottom: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 900; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.practice { word-break: keep-all; margin: -6px 0 12px !important; padding: 8px 12px; border-radius: 12px; background: #F2EADB; color: #7A5B22 !important; font-size: 13.5px !important; font-weight: 800 !important; }

.sheet.result { display: flex; flex-direction: column; height: clamp(400px, calc(var(--app-h) * .64), 620px); padding: 6px 0 10px; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 0 10px 4px; padding: 4px; border-radius: 16px; background: var(--track); }
.tabs button { height: 38px; border: 0; border-radius: 12px; background: none; font-size: 15px; font-weight: 800; color: var(--sub); letter-spacing: -.03em; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 0 rgba(20, 33, 58, .08), 0 2px 6px rgba(20, 33, 58, .06); }
.tabs .badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 2px; border-radius: 10px; background: var(--gold); color: var(--ink); font-size: 12px; font-style: normal; font-weight: 900; vertical-align: 1px; }
.pane { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 8px 16px 4px; outline: none; }
.foot { padding: 8px 16px 0; display: grid; gap: 2px; }
.foot .row2 { margin-bottom: -6px; }
.sheet .fine { margin: 10px 2px 2px; font-size: 12.5px; font-weight: 700; color: var(--sub); line-height: 1.5; word-break: keep-all; }
.sheet .demo { white-space: nowrap; }

/* 기록 */
.rhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.rhead h2 { margin: 2px 0 0; font-size: 32px; font-weight: 900; letter-spacing: -.06em; line-height: 1.05; }
.rhead .eyebrow { font-size: 13px; font-weight: 800; color: var(--sub); }
.rhead .score { display: grid; justify-items: end; gap: 4px; }
.rhead .score > b { font-size: 34px; font-weight: 900; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.rhead .score small { font-size: 15px; font-weight: 800; color: var(--sub); letter-spacing: 0; }
.change { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--sub); }
.change b { color: var(--ink); }
.change .up { color: #0F8A5F; } .change .down { color: var(--coral-lo); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.stat { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px #EDE5D7; }
.stat b { font-size: 26px; font-weight: 900; letter-spacing: -.04em; line-height: 1.05; }
.stat b small { font-size: 14px; color: var(--sub); font-weight: 800; margin-left: 1px; }
.stat span { font-size: 12.5px; font-weight: 800; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.medals i.rare { background: #1D5C8C; color: #fff; font-size: 11.5px; }
.medals i.pct { background: var(--track); font-size: 11.5px; }
.perq { margin: 2px 0 6px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px #EDE5D7; }
.perq summary { height: 42px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; font-weight: 800; cursor: pointer; list-style: none; }
.perq summary::-webkit-details-marker { display: none; }
.perq summary::after { content: ""; width: 8px; height: 8px; border-right: 2.5px solid var(--sub); border-bottom: 2.5px solid var(--sub); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.perq[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.perq ol { list-style: none; margin: 0; padding: 0 10px 4px; }
.perq li { display: grid; grid-template-columns: 22px 64px 1fr auto 40px; align-items: center; gap: 6px; height: 36px; border-top: 1px solid #F1EBE1; font-size: 14px; font-weight: 700; }
.perq li > i { font-style: normal; font-weight: 900; color: var(--sub); font-size: 12.5px; }
.perq .ql { color: var(--sub); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perq li b { font-weight: 900; display: flex; align-items: center; gap: 5px; min-width: 0; }
.perq li b.none { color: #A2A9B6; font-weight: 800; }
.perq .rk { font-size: 12.5px; color: var(--sub); white-space: nowrap; }
.perq li em { font-style: normal; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.perq .sw { width: 11px; height: 11px; border-radius: 50%; display: inline-block; text-decoration: none; }
.perq .fine { padding: 0 12px 10px; margin: 0; }
.xp { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; margin: 4px 0 2px; padding: 8px 12px 8px 8px; border: 0; border-radius: 16px; background: #F2EADB; text-align: left; color: var(--ink); }
.lvl { display: grid; gap: 5px; }
.lvl b { font-size: 14px; font-weight: 900; }
.xbar { display: block; height: 7px; border-radius: 4px; background: rgba(20, 33, 58, .1); overflow: hidden; }
.xbar i { display: block; height: 100%; border-radius: 4px; background: var(--gold); box-shadow: inset 0 -2px 0 rgba(160, 100, 0, .2); transition: width .9s cubic-bezier(.2, .9, .3, 1); }
.xnote { font-size: 12.5px; font-weight: 700; color: #7A5B22; text-align: right; line-height: 1.3; }
.xnote b { display: block; font-size: 14px; color: var(--ink); }

/* 공용 조작 */
.ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.ctl .demo { margin-left: auto; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--track); }
.seg button { height: 32px; padding: 0 11px; border: 0; border-radius: 9px; background: none; font-size: 13.5px; font-weight: 800; color: var(--sub); white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; }

/* 순위 */
.rsum { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 8px; margin-bottom: 10px; }
.myrank { display: flex; align-items: baseline; gap: 6px; }
.myrank b { font-size: 34px; font-weight: 900; letter-spacing: -.05em; line-height: 1; color: var(--coral-lo); }
.myrank b small, .board .rk small { font-size: 13px; font-weight: 900; margin-right: 2px; letter-spacing: -.02em; }
.myrank span { font-size: 15px; font-weight: 800; color: var(--sub); }
.myrank.none b { font-size: 24px; color: var(--sub); }
.rsum .lead { grid-column: 1; margin: 0; font-size: 14px; font-weight: 700; color: var(--sub); }
.rsum .lead b { color: var(--ink); }
.rsum .state { grid-column: 2; grid-row: 1 / span 2; align-self: center; height: 26px; padding: 0 10px; border-radius: 13px; display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 800; background: rgba(34, 184, 166, .14); color: var(--teal-lo); }
.rsum .state.closed { background: var(--track); color: var(--sub); }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.board li { display: grid; grid-template-columns: 44px 30px 1fr auto; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 6px; border-radius: 13px; background: #fff; font-size: 15px; font-weight: 800; }
.board .rk { text-align: center; font-weight: 900; color: var(--sub); font-variant-numeric: tabular-nums; white-space: nowrap; }
.board li.podium .rk { color: var(--ink); }
.board .nm { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; }
.board li b { font-weight: 900; font-variant-numeric: tabular-nums; }
.board li.me { background: #FFE3D9; box-shadow: inset 0 0 0 2px var(--coral); }
.board li.me .rk { color: var(--coral-lo); }
.board li.fr { box-shadow: inset 0 0 0 2px var(--teal); }
.board li.gap { height: 18px; background: none; display: block; text-align: center; color: var(--sub); line-height: 12px; }
.board .tag { background: var(--coral); color: #fff; font-style: normal; }
.board .tag.fr { background: var(--teal); }

/* 친구 */
.finvite { display: grid; justify-items: center; text-align: center; padding: 6px 4px 0; }
.finvite h3 { margin: 6px 0 4px; font-size: 20px; font-weight: 900; letter-spacing: -.04em; }
.finvite p { margin: 0; font-size: 14px; font-weight: 700; color: var(--sub); line-height: 1.5; word-break: keep-all; }
.fhead { margin: 2px 0 0; font-size: 25px; font-weight: 900; letter-spacing: -.05em; line-height: 1.2; word-break: keep-all; }
.fhead em { font-style: normal; color: #C98A00; }
.fsub { margin: 4px 0 10px; font-size: 15px; font-weight: 800; color: var(--sub); }
.knots { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 0 0 12px; padding: 0; }
.knots li { height: 36px; display: grid; place-items: center; border-radius: 50%; aspect-ratio: 1; justify-self: center; font-size: 14px; font-weight: 900; color: var(--sub); background: var(--track); }
.knots li.on { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(255, 200, 69, .55); }
.vs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.vs li { display: grid; grid-template-columns: 30px 64px 1fr 40px; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 800; }
.vs .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs .b { height: 12px; border-radius: 6px; background: var(--track); overflow: hidden; }
.vs .b i { display: block; height: 100%; border-radius: 6px; }
.vs li.me .b i { background: var(--coral); } .vs li.fr .b i { background: var(--teal); }
.vs li b { text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }
.consent { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px #EDE5D7; }
.consent .their { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; color: var(--sub); white-space: nowrap; }
.consent .their small { margin-left: 3px; padding: 1px 5px; border-radius: 5px; background: #F2EADB; color: #8A6A2E; font-size: 11px; }
.sw { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw span { width: 40px; height: 24px; border-radius: 12px; background: #D9D2C5; position: relative; transition: background .2s; flex: none; }
.sw span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.sw input:checked + span { background: var(--coral); }
.sw input:checked + span::after { transform: translateX(16px); }
.sw input:focus-visible + span { outline: 3px solid rgba(255, 107, 71, .4); outline-offset: 2px; }
.sw.light { color: #fff; }
.locked { margin: 10px 2px 0; font-size: 13.5px; font-weight: 800; color: var(--sub); }
.ansl { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 3px; }
.ansl li { display: grid; grid-template-columns: 20px 64px 1fr 1fr 34px; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; background: #fff; font-size: 14px; }
.ansl li.hit { background: #FFF3CF; }
.ansl i { font-style: normal; font-weight: 900; font-size: 12.5px; color: var(--sub); }
.ansl .ql { font-size: 12.5px; font-weight: 700; color: var(--sub); white-space: nowrap; overflow: hidden; }
.ansl b { font-weight: 900; } .ansl b.m { color: var(--coral-lo); } .ansl b.f { color: var(--teal-lo); }
.ansl em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--sub); text-align: right; font-variant-numeric: tabular-nums; }

/* 지역 */
.qchips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 10px; }
.qchips button { height: 34px; border: 0; border-radius: 10px; background: var(--track); font-size: 14px; font-weight: 900; color: var(--sub); }
.qchips button.none { color: #B4AC9E; }
.qchips button[aria-checked="true"] { background: var(--coral); color: #fff; }
.rq { margin: 0 2px 8px; font-size: 16px; font-weight: 800; }
.rq small { display: block; font-size: 12.5px; color: var(--sub); font-weight: 700; margin-top: 1px; }
.rbars, .rsim { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.rbars li { display: grid; grid-template-columns: 36px 1fr 38px 48px; align-items: center; gap: 8px; height: 30px; font-size: 14px; font-weight: 800; }
.rbars .rn, .rsim .rn { white-space: nowrap; }
.rbars .b { position: relative; height: 14px; border-radius: 7px; background: var(--track); }
.rbars .b i { display: block; height: 100%; border-radius: 7px; background: #9FB3D1; }
.rbars .b u { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.rbars li b { text-align: right; font-variant-numeric: tabular-nums; }
.rbars li small { font-size: 12px; color: var(--sub); text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rbars li.mine .rn, .rsim li.mine .rn { color: var(--coral-lo); }
.rbars li.mine .b i { background: var(--coral); }
.legend { margin: 6px 2px 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--sub); }
.legend u { width: 2px; height: 14px; background: var(--ink); }
.rsim li { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border-radius: 11px; background: #fff; font-size: 14.5px; font-weight: 800; }
.rsim .dots { display: grid; grid-template-columns: repeat(7, 14px); gap: 5px; }
.rsim .dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--track); }
.rsim .dots i.on { background: var(--coral); }
.rsim li b { text-align: right; font-weight: 900; } .rsim li b small { color: var(--sub); font-size: 12px; }
.smallr { margin: 10px 0 0; font-size: 13px; font-weight: 800; color: var(--sub); }
.smallr summary { cursor: pointer; }
.smallr p { margin: 6px 0 0; font-weight: 700; line-height: 1.6; }
.myreg { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px #EDE5D7; font-size: 13.5px; font-weight: 800; }
.myreg span { font-size: 12.5px; color: var(--sub); font-weight: 700; }
select { font: 800 14px var(--font); color: var(--ink); height: 34px; padding: 0 8px; border: 1.5px solid #E3DACB; border-radius: 10px; background: #fff; }

/* 프로필 (별도 화면) */
.prof { width: min(100%, 440px); max-height: 100%; overflow: auto; padding: 14px 16px 18px; border-radius: 24px; background: var(--paper); color: var(--ink); }
.ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ph h3 { margin: 0; font-size: 18px; font-weight: 900; }
.back { height: 36px; padding: 0 10px 0 4px; border: 0; background: none; font-size: 15px; font-weight: 800; color: var(--sub); }
.who { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.avbtn { padding: 0; border: 0; background: none; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #EDE5D7; }
.avbtn .avt { display: block; }
.who .nm { display: grid; gap: 3px; flex: 1; min-width: 0; }
.who input { width: 100%; height: 40px; padding: 0 10px; border: 1.5px solid transparent; border-radius: 10px; background: transparent; font: 900 22px var(--font); letter-spacing: -.04em; color: var(--ink); }
.who input:focus { outline: none; border-color: var(--coral-hi); background: #fff; }
.who small { padding-left: 10px; font-size: 12.5px; font-weight: 700; color: var(--sub); }
.avpick { display: grid; gap: 10px; margin: -2px 0 12px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1.5px #EDE5D7; }
.avpick > div { display: flex; gap: 10px; }
.avpick button { padding: 0; border: 0; background: none; border-radius: 50%; }
.avpick button[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.avpick .dot { width: 30px; height: 30px; }
.lvcard { padding: 12px 14px; border-radius: 16px; background: #F2EADB; }
.lvrow { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.lvrow b { font-size: 22px; font-weight: 900; letter-spacing: -.04em; }
.lvrow span { font-size: 13px; font-weight: 800; color: #7A5B22; font-variant-numeric: tabular-nums; }
.lvcard .xbar { height: 9px; }
.lvcard p { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: #7A5B22; line-height: 1.45; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 14px; }
.tiles > div { display: grid; gap: 3px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px #EDE5D7; }
.tiles b { font-size: 21px; font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tiles b i { font-style: normal; color: #C9BFAE; margin: 0 4px; } .tiles b small { font-size: 13px; }
.tiles span { font-size: 12.5px; font-weight: 800; color: var(--sub); }
.tiles span small { display: block; font-weight: 700; margin-top: 2px; }
.prof h4 { margin: 0 2px 6px; font-size: 14px; font-weight: 900; }
.recent { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 3px; }
.recent li { display: grid; grid-template-columns: 52px 44px 44px 1fr; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 11px; background: #fff; font-size: 14px; font-weight: 800; }
.recent .d { color: var(--sub); font-size: 13px; }
.recent .m { justify-self: start; padding: 2px 7px; border-radius: 6px; font-size: 12px; background: #DDE9F8; color: #2C5C9C; }
.recent .m.abyss { background: #D8E7EE; color: #1D5C8C; }
.recent b { font-variant-numeric: tabular-nums; }
.recent small { text-align: right; color: var(--sub); font-size: 12.5px; font-weight: 700; }
.reg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; }
.reg small { flex-basis: 100%; font-size: 12.5px; color: var(--sub); font-weight: 700; }

/* 친구 연결 A→B 시연 */
.fdemo .steps { list-style: none; margin: 8px 0 14px; padding: 0; display: grid; gap: 4px; }
.fdemo .steps li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 10px; border-radius: 14px; background: #fff; }
.fdemo .steps i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 14px; background: var(--track); color: var(--sub); }
.fdemo .steps li.done i { background: var(--teal); color: #fff; }
.fdemo .steps li.now { box-shadow: inset 0 0 0 2px var(--coral); }
.fdemo .steps li.now i { background: var(--coral); color: #fff; }
.fdemo .steps b { display: block; font-size: 14.5px; font-weight: 900; line-height: 1.35; word-break: keep-all; }
.fdemo .steps span { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--sub); }
.fdemo .row2 { align-items: center; }
.text-btn.wide { width: 100%; margin: -4px 0 8px; height: 40px; font-size: 13.5px; }
.cardwrap .sw { font-size: 13.5px; }

@media (max-height: 700px) {
  .rhead h2 { font-size: 27px; } .rhead .score > b { font-size: 28px; }
  .tabs button { height: 34px; }
}

/* 지역 타일 지도: 같은 크기의 종이 칸. 진하기 = 값, 빗금 = 표본 부족 */
.kmap { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 56px; gap: 6px; margin: 4px 0 0; }
.tile { position: relative; display: grid; align-content: center; justify-items: start; gap: 1px; padding: 0 9px; border: 0; border-radius: 11px; text-align: left; color: var(--ink);
  background: color-mix(in srgb, var(--coral) calc(var(--a) * 100%), #FFF4EC); box-shadow: inset 0 -3px 0 rgba(20, 33, 58, .07); overflow: hidden; transition: transform .15s; }
.tile::after { content: ""; position: absolute; right: 0; top: 0; border: 7px solid transparent; border-right-color: rgba(255, 255, 255, .55); border-top-color: rgba(255, 255, 255, .55); border-top-right-radius: 4px; }
.tile .tn { font-size: 12.5px; font-weight: 800; opacity: .85; }
.tile .tv { font-size: 18px; font-weight: 900; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile .tv small { font-size: 11.5px; font-weight: 800; margin-left: 1px; opacity: .8; }
.tile.dark { color: #fff; }
.tile.small { background: repeating-linear-gradient(135deg, #F3EEE6 0 5px, #ECE6DB 5px 10px); color: #A39A89; box-shadow: none; }
.tile.small .tv { font-size: 11.5px; font-weight: 800; }
.tile.mine { outline: 2.5px solid var(--ink); outline-offset: -2.5px; }
.tile[aria-pressed="true"] { transform: translateY(-2px); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink), 0 6px 12px rgba(20, 33, 58, .18); z-index: 1; }
.tile:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
.mlegend { align-self: center; display: grid; gap: 4px; padding: 0 2px 0 8px; font-size: 11.5px; font-weight: 800; color: var(--sub); }
.mlegend .ramp { position: relative; }
.mlegend .ramp u { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.mlegend .ramp i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--coral) 12%, #FFF4EC), color-mix(in srgb, var(--coral) 88%, #FFF4EC)); }
.mlegend .lr { display: flex; justify-content: space-between; }
.mlegend .lx { display: flex; align-items: center; gap: 5px; }
.mlegend .hatch { width: 14px; height: 10px; border-radius: 3px; background: repeating-linear-gradient(135deg, #EFE9DF 0 3px, #D9D0C0 3px 6px); }
.mdetail { min-height: 40px; margin: 0 0 8px; padding: 9px 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px #EDE5D7; font-size: 13.5px; font-weight: 700; color: var(--sub); line-height: 1.45; word-break: keep-all; }
.mdetail b { color: var(--ink); font-weight: 900; }
@media (max-width: 370px) { .kmap { grid-auto-rows: 52px; gap: 5px; } .tile { padding: 0 7px; } .tile .tv { font-size: 16px; } }

/* 지역 보드: 종이 반도 위 원판 더미 */
.pbwrap { display: grid; justify-items: center; }
.pboard { width: 100%; max-width: 330px; height: auto; display: block; }
.pboard .tok { cursor: pointer; outline: none; }
.pboard .tok:focus-visible ellipse:last-of-type { stroke: var(--teal); }
.pboard .tok:focus-visible { filter: drop-shadow(0 0 3px rgba(34, 184, 166, .9)); }
.pboard.anim .ly { animation: discDrop .42s var(--d, 0ms) cubic-bezier(.3, 1.45, .5, 1) both; }
@keyframes discDrop { from { transform: translateY(-18px); opacity: 0; } 60% { opacity: 1; } }
.blegend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 6px 0 0; font-size: 12px; font-weight: 800; color: var(--sub); }
.blegend span { display: inline-flex; align-items: center; gap: 3px; }
@media (max-width: 370px) { .seg button { padding: 0 8px; } }

/* 답 결과 발견 연출: 순위 → 같은 답을 고른 비율(100칸) → TOP 5 */
.verdict .big { display: block; font-size: 23px; font-weight: 900; letter-spacing: -.05em; line-height: 1.2; }
.verdict .big em { font-style: normal; color: var(--coral-lo); }
.find { margin: 0 0 10px; }
.fline { margin: 0 0 6px; font-size: 14.5px; font-weight: 800; color: var(--sub); }
.fline b { margin-left: 4px; font-size: 22px; font-weight: 900; color: var(--coral-lo); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.g100 { display: grid; grid-template-columns: repeat(25, 1fr); gap: 3px; }
.g100 i { aspect-ratio: 1; border-radius: 3px; background: #E8E1D5; }
.g100 i.on { transition: background .16s var(--d, 0ms), transform .28s var(--d, 0ms) cubic-bezier(.3, 1.8, .5, 1); }
.find.lit .g100 i.on { background: var(--coral); transform: scale(1); }
.find:not(.lit) .g100 i.on { transform: scale(.4); }
.find.now .g100 i.on { transition: none; }
/* 012: 좋은 답 강조(하늘 1위·인기 TOP 5, 심해 TOP 5 밖 확인된 답). 기본 인정은 평범하게 */
.verdict .big.top { display: inline-block; margin: 0 0 3px -2px; padding: 2px 10px 3px; border-radius: 10px; background: var(--gold); color: var(--ink); transform: rotate(-1.5deg); animation: topPop .5s cubic-bezier(.3, 1.6, .5, 1); }
.verdict .big.good { color: var(--coral-lo); }
@keyframes topPop { from { transform: rotate(-1.5deg) scale(.6); opacity: 0; } }
.fline small { font-size: 12.5px; font-weight: 700; margin-left: 4px; }
.setnote { margin: -4px 0 10px !important; font-size: 12.5px !important; font-weight: 800 !important; color: #8A6A2E !important; }
.setinfo { margin: -4px 0 10px !important; font-size: 12.5px !important; }
.setinfo b { color: var(--ink); }
/* ===================== 017: 캐릭터 탭 반응(공용) ===================== */
/* 키보드용 조작: 평소엔 화면 밖, 포커스되면 아래 판 위에 나타난다 */
.poke { position: absolute; left: -9999px; bottom: calc(var(--dock-h, 90px) + 16px); height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(20, 33, 58, .55); color: #fff; font-size: 13.5px; font-weight: 800; }
.poke:focus-visible { left: 14px; outline: 3px solid var(--gold); outline-offset: 2px; }
.actor { cursor: pointer; }
.actor .body > g { pointer-events: auto; }

/* ===================== 019: 원화 복어(하늘 기본) · 포즈 교체 + 전체 변형 ===================== */
.actor .pa { transform-box: fill-box; transform-origin: 50% 62%; animation: paBreath 2.6s ease-in-out infinite; }
.actor .pa .f { opacity: 0; transition: opacity .12s ease; }
.actor .pa .f-base { opacity: 1; }
@keyframes paBreath { 50% { transform: scale(1.03, .975); } }
/* 상태 중에는 기본 포즈를 숨기고 상태 포즈를 켠다(교체 순서는 opacity 키프레임) */
.actor.tap .pa .f-base, .actor.pf-ok .pa .f-base, .actor.pf-top .pa .f-base, .actor.charge .pa .f-base, .actor.fly .pa .f-base, .actor.arrive .pa .f-base { opacity: 0; }
/* 탭 1.1초: 놀람(눈맞춤) → 터치 반응(톡 튐) → 작게 부풀기(팽창) → 거품 분사(방울은 JS) → 기본 */
.actor.tap .pa { animation: paTap 1.1s cubic-bezier(.3, 1.2, .5, 1); }
.actor.tap .pa .f-surprise { animation: paF1 1.1s steps(1, end); }
.actor.tap .pa .f-touch { animation: paF2 1.1s steps(1, end); }
.actor.tap .pa .f-puff { animation: paF3 1.1s steps(1, end); }
.actor.tap .pa .f-blow { animation: paF4 1.1s steps(1, end); }
.actor.tap .pa .f-base { animation: paF5 1.1s steps(1, end); }
@keyframes paF1 { 0%, 18% { opacity: 1; } 18.01%, 100% { opacity: 0; } }
@keyframes paF2 { 0%, 18% { opacity: 0; } 18.01%, 42% { opacity: 1; } 42.01%, 100% { opacity: 0; } }
@keyframes paF3 { 0%, 42% { opacity: 0; } 42.01%, 66% { opacity: 1; } 66.01%, 100% { opacity: 0; } }
@keyframes paF4 { 0%, 66% { opacity: 0; } 66.01%, 86% { opacity: 1; } 86.01%, 100% { opacity: 0; } }
@keyframes paF5 { 0%, 86% { opacity: 0; } 86.01%, 100% { opacity: 1; } }
@keyframes paTap { 0% { transform: none; } 10% { transform: scale(1.02) rotate(-4deg); } 22% { transform: translateY(-6px) scale(1.06, .98) rotate(-6deg); } 34% { transform: translateY(0) scale(1.0) rotate(-3deg); } 50% { transform: scale(1.3) rotate(-2deg); } 64% { transform: scale(1.26, 1.22); } 74% { transform: scale(1.1, .98) rotate(2deg); } 86% { transform: scale(.97, 1.03); } 100% { transform: none; } }
/* 답 인정: 유효한 답은 '답 인정' 포즈로 살짝 부풀고, 좋은 답은 '기쁨' 포즈로 크게 부풀며 좌우로 흔든다 */
.actor.pf-ok .pa { animation: paOk .5s cubic-bezier(.3, 1.6, .5, 1); }
.actor.pf-ok .pa .f-accept { opacity: 1; }
.actor.pf-top .pa { animation: paTop 1s cubic-bezier(.3, 1.5, .5, 1); }
.actor.pf-top .pa .f-joy { opacity: 1; }
@keyframes paOk { 40% { transform: scale(1.15); } }
@keyframes paTop { 20% { transform: scale(1.38) rotate(-8deg); } 45% { transform: scale(1.32) rotate(7deg); } 70% { transform: scale(1.28) rotate(-3deg); } 100% { transform: none; } }
/* 상승: 모으기는 '결의' 포즈로 웅크리고 → 오를 때 '상승' 포즈(위를 봄)로 길게 늘어나며 공기를 뿜는다(방울은 기존 캔버스) */
.actor.charge .pa { animation: none; transform: scale(1.14, .84); transition: transform .14s ease-out; }
.actor.charge .pa .f-resolve { opacity: 1; }
.actor.fly .pa { animation: paFly .32s ease-in-out infinite; }
.actor.fly .pa .f-rise { opacity: 1; }
@keyframes paFly { 50% { transform: scale(.94, 1.06); } }
/* 비행 자세(모으기·상승·도착)가 답 인정 포즈보다 우선한다(좋은 답 반응 1초와 모으기가 겹치는 구간) */
.actor.charge .pa .f-joy, .actor.charge .pa .f-accept, .actor.fly .pa .f-joy, .actor.fly .pa .f-accept, .actor.arrive .pa .f-joy, .actor.arrive .pa .f-accept { opacity: 0; }
/* 도착: '도착' 포즈(윙크)로 툭 멈추며 출렁 */
.actor.arrive .pa { animation: paArrive .76s cubic-bezier(.3, 1.6, .5, 1); }
.actor.arrive .pa .f-land { opacity: 1; }
@keyframes paArrive { 25% { transform: scale(1.22, .86); } 50% { transform: scale(.94, 1.08); } 75% { transform: scale(1.03, .98); } }
@media (prefers-reduced-motion: reduce) {
  .actor .pa, .actor .pa .f { animation: none !important; transition: none !important; }
  .actor.tap .pa .f-puff { opacity: 1; } .actor.tap .pa { transform: scale(1.2); }
}

/* 022: 친구 배우는 카드와 같은 색조(hueRotate 150·채도 .85)로 돌려 나(주황)와 구분한다. 발광·그림자(바깥 .actor filter)는 그대로 */
#fr .pa { filter: hue-rotate(150deg) saturate(.85); }
/* 심해 친구: 네이비를 150° 돌리면 갈색이 되어 보라(60°)로. 심해 배경의 보라 해파리와 같은 계열 */
[data-char="abyss"] #fr .pa { filter: hue-rotate(60deg) saturate(.9); }

/* 019: 원화 복어 로고 */
.logo .logo-img { width: 26px; height: 24px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(20, 33, 58, .35)); }

/* ===================== 020: 심해 복어(?mode=abyss 기본) ===================== */
/* 심해는 하늘보다 느린 리듬: 숨쉬기 3.4초, 탭 뒤 돌아오는 출렁임이 부드럽다. 발광은 world.js가 filter로 준다 */
[data-char="abyss"] .actor .pa { animation-duration: 3.4s; }
[data-char="abyss"] .actor.fly .pa { animation: paDive .5s ease-in-out infinite; }
@keyframes paDive { 50% { transform: scale(1.04, .96); } }
[data-char="abyss"] .actor.arrive .pa { animation: paSettle .9s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes paSettle { 25% { transform: scale(1.12, .9) translateY(4px); } 55% { transform: scale(.96, 1.05) translateY(-3px); } 80% { transform: scale(1.02, .99); } }
[data-mode="abyss"] .flash { background: radial-gradient(ellipse 70% 60% at 50% 55%, rgba(140,240,255,.55), rgba(140,240,255,.2) 50%, transparent 100%); }
