/* 스쿨 스타즈 — «공책·포스트잇·스티커» UI. 글자·터치 타깃은 DOM, 월드는 캔버스. 색은 전부 토큰 경유(design-gate). */
:root {
  --background: 45 62% 95%;
  --foreground: 226 36% 15%;
  --card: 0 0% 100%;
  --card-foreground: 226 36% 15%;
  --popover: 0 0% 100%;
  --popover-foreground: 226 36% 15%;
  --primary: 42 96% 55%;
  --primary-foreground: 226 40% 13%;
  --secondary: 212 88% 42%;
  --secondary-foreground: 0 0% 100%;
  --muted: 45 32% 87%;
  --muted-foreground: 226 18% 32%;
  --accent: 24 94% 55%;
  --accent-foreground: 226 40% 12%;
  --destructive: 0 72% 42%;
  --destructive-foreground: 0 0% 100%;
  --border: 226 20% 78%;
  --ring: 212 88% 42%;
  --team-a: 212 88% 48%;
  --team-b: 24 94% 52%;
  --g0: 130 46% 46%;
  --g1: 212 72% 52%;
  --g2: 272 62% 58%;
  --g3: 42 92% 52%;
  --paper-line: 205 60% 85%;
  --shadow: 226 40% 10%;
  --overlay: 226 40% 8%;
  --z-hud: 10;
  --z-overlay: 20;
  --z-modal: 30;
  --z-toast: 40;
  --radius: 14px;
  --fs: 16px;
  font-size: var(--fs);
}
.dark {
  --background: 226 30% 11%;
  --foreground: 45 40% 94%;
  --card: 226 26% 17%;
  --card-foreground: 45 40% 94%;
  --popover: 226 26% 17%;
  --popover-foreground: 45 40% 94%;
  --primary: 42 96% 58%;
  --primary-foreground: 226 40% 11%;
  --secondary: 212 80% 58%;
  --secondary-foreground: 226 40% 10%;
  --muted: 226 20% 22%;
  --muted-foreground: 45 20% 78%;
  --accent: 24 94% 58%;
  --accent-foreground: 226 40% 10%;
  --destructive: 0 80% 62%;
  --destructive-foreground: 226 40% 10%;
  --border: 226 18% 32%;
  --ring: 42 96% 58%;
  --paper-line: 226 20% 20%;
}
.bigtext { --fs: 20px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: hsl(var(--background));
  background-image: repeating-linear-gradient(0deg, hsl(var(--paper-line)) 0 1px, transparent 1px 32px);
  color: hsl(var(--foreground));
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
input, textarea { -webkit-user-select: text; user-select: text; font: inherit; }

/* 캔버스: 16:9 고정 영역(남는 곳 = 여백, D53). 크기는 JS 가 --gw/--gh 로 준다 */
#stage { position: fixed; inset: 0; display: grid; place-items: center; background: hsl(var(--overlay)); }
#stage[data-idle] { background: transparent; }
#game { width: var(--gw, 100vw); height: var(--gh, 56.25vw); display: block; touch-action: none; }

.screen { position: fixed; inset: 0; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto; height: 100dvh; z-index: var(--z-overlay); }
.screen.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.overlay { position: fixed; inset: 0; z-index: var(--z-modal); background: hsl(var(--background)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 16px; }

h1, h2, h3 { margin: 0.2em 0; line-height: 1.25; }
.logo { font-size: 2.2rem; letter-spacing: -0.02em; transform: rotate(-2deg); }
.logo span { color: hsl(var(--accent-foreground)); background: hsl(var(--primary)); padding: 0 0.25em; border-radius: 8px; box-shadow: 3px 3px 0 hsl(var(--shadow) / 0.25); }
.logo.big { font-size: clamp(2.4rem, 8vw, 4.2rem); }
.tagline { font-size: 1.15rem; }
.muted { color: hsl(var(--muted-foreground)); }
.small { font-size: 0.9rem; }
.fine { font-size: 0.85rem; max-width: 34em; }
.center-text { text-align: center; }
.pad { padding: 0 4px; }
.err { color: hsl(var(--destructive)); min-height: 1.4em; font-weight: 600; }

.btn { min-height: 44px; min-width: 44px; padding: 10px 18px; border-radius: var(--radius); border: 2px solid hsl(var(--border));
  background: hsl(var(--card)); color: hsl(var(--card-foreground)); font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 0 hsl(var(--shadow) / 0.18); transition: transform 0.08s; touch-action: manipulation; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 hsl(var(--shadow) / 0.18); }
.btn:focus-visible, .mode-card:focus-visible, .choice:focus-visible, input:focus-visible, textarea:focus-visible, .char-cell:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 2px; }
.btn.primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.xl { font-size: 1.2rem; padding: 14px 26px; min-height: 56px; }
.btn.icon { padding: 6px; width: 48px; height: 48px; font-size: 1.3rem; position: relative; }
.btn.icon.sm { width: 44px; height: 44px; font-size: 1.1rem; }
.btn.icon em { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--destructive)); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; width: min(420px, 100%); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: hsl(var(--muted)); color: hsl(var(--foreground)); font-weight: 700; }
.chip.star::before { content: ""; width: 1.05em; height: 1.05em; background: hsl(var(--g3)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9z'/%3E%3C/svg%3E") center / contain no-repeat; }
.card { background: hsl(var(--card)); color: hsl(var(--card-foreground)); border: 2px solid hsl(var(--border)); border-radius: var(--radius); padding: 14px 16px; box-shadow: 4px 4px 0 hsl(var(--shadow) / 0.12); }

.bar { width: min(360px, 80vw); height: 14px; border-radius: 999px; background: hsl(var(--muted)); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: hsl(var(--primary)); transition: width 0.2s; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.topbar h2 { flex: 1; text-align: center; }
.me { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nick { font-weight: 800; }
.iconbar { display: flex; gap: 8px; }

.lobby-grid { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; }
.hero-card { display: flex; gap: 16px; align-items: center; background: hsl(var(--card)); border: 2px solid hsl(var(--border)); border-radius: var(--radius); padding: 12px; box-shadow: 4px 4px 0 hsl(var(--shadow) / 0.12); }
.hero-char img { width: 120px; height: 160px; object-fit: contain; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mode-card { text-align: left; min-height: 84px; padding: 14px 16px; border-radius: var(--radius); border: 3px solid hsl(var(--border)); background: hsl(var(--card)); color: hsl(var(--card-foreground)); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.mode-card b { font-size: 1.15rem; }
.mode-card[aria-pressed="true"] { border-color: hsl(var(--primary)); background: hsl(var(--primary) / 0.18); box-shadow: 4px 4px 0 hsl(var(--primary) / 0.5); }
.play-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.play-row .btn { flex: 1 1 200px; }
.small-row .btn { flex: 1 1 120px; }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.char-cell { position: relative; border: 3px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); color: hsl(var(--card-foreground)); padding: 6px; cursor: pointer; min-height: 44px; font: inherit; }
.char-cell img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; display: block; }
.char-cell[aria-pressed="true"] { border-color: hsl(var(--primary)); }
.char-cell.locked img { filter: grayscale(1) brightness(0.6); }
.char-cell .lock { position: absolute; top: 6px; right: 8px; }
.detail { margin-top: 12px; }
.detail table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.detail td { padding: 3px 4px; border-bottom: 1px dashed hsl(var(--border)); }

.road { list-style: none; padding: 0; display: grid; gap: 10px; max-width: 640px; margin: 0 auto; }
.road li { display: flex; gap: 12px; align-items: center; background: hsl(var(--card)); border: 2px solid hsl(var(--border)); border-radius: var(--radius); padding: 10px 12px; }
.road li.done { border-color: hsl(var(--primary)); }
.road img { width: 56px; height: 72px; object-fit: contain; }
.road .prog { flex: 1; }
.road .bar { width: 100%; }

.codex { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.codex .card img { width: 64px; height: 84px; object-fit: contain; float: left; margin-right: 10px; }
.codex .card.locked img { filter: grayscale(1); }
.missions { list-style: none; padding: 0; display: grid; gap: 10px; max-width: 560px; margin: 0 auto; }
.missions li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.settings { display: grid; gap: 12px; max-width: 640px; margin: 0 auto; }
fieldset { border: 2px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); padding: 10px 14px; display: grid; gap: 8px; }
legend { font-weight: 800; padding: 0 6px; }
label.row { justify-content: flex-start; min-height: 44px; }
input[type="checkbox"] { width: 24px; height: 24px; accent-color: hsl(var(--secondary)); }
input[type="range"] { width: 100%; min-height: 32px; accent-color: hsl(var(--secondary)); }
textarea { width: 100%; border-radius: 10px; border: 2px solid hsl(var(--border)); padding: 8px; background: hsl(var(--background)); color: hsl(var(--foreground)); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 10px; background: hsl(var(--muted)); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 44px; padding: 6px 14px; border-radius: 10px; border: 2px solid hsl(var(--border)); background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border-color: hsl(var(--secondary)); }

.class-top { text-align: center; }
.code { font-size: 2.4rem; font-weight: 900; letter-spacing: 0.25em; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); display: inline-block; padding: 4px 16px; border-radius: 12px; }
.seats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; max-width: 760px; margin: 12px auto; }
.seats li { display: flex; align-items: center; gap: 8px; justify-content: space-between; background: hsl(var(--card)); border: 2px solid hsl(var(--border)); border-radius: 10px; padding: 6px 10px; min-height: 48px; }
#class-host { max-width: 760px; margin: 0 auto; display: grid; gap: 8px; }
.codebox { font-size: 2rem; text-align: center; letter-spacing: 0.3em; width: min(320px, 90vw); text-transform: uppercase; border-radius: 12px; border: 3px solid hsl(var(--border)); padding: 8px; background: hsl(var(--card)); color: hsl(var(--card-foreground)); }

.spinner { width: 48px; height: 48px; border-radius: 50%; border: 5px solid hsl(var(--muted)); border-top-color: hsl(var(--primary)); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fact { max-width: 440px; }
.rotate-icon { font-size: 3rem; animation: tilt 1.6s ease-in-out infinite; }
@keyframes tilt { 50% { transform: rotate(90deg); } }

/* ── HUD(경기 화면 위 DOM) ── */
#hud { position: fixed; inset: 0; z-index: var(--z-hud); pointer-events: none; }
#hud button, #hud .stick, #hud .wheel { pointer-events: auto; }
.hud-top { position: absolute; top: max(6px, env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: center; gap: 10px; align-items: center; }
.score { display: flex; gap: 10px; align-items: center; font-weight: 900; font-size: 1.3rem; background: hsl(var(--card) / 0.92); color: hsl(var(--card-foreground)); padding: 4px 14px; border-radius: 999px; border: 2px solid hsl(var(--border)); }
.score .sa { color: hsl(var(--secondary)); }
.score .sb { color: hsl(var(--destructive)); }
.dark .score .sb { color: hsl(var(--accent)); }
.alive { font-weight: 800; background: hsl(var(--card) / 0.92); color: hsl(var(--card-foreground)); padding: 4px 12px; border-radius: 999px; }
.lag { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); padding: 4px 8px; border-radius: 999px; }
.banner { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); font-size: clamp(1.4rem, 4vw, 2.4rem); font-weight: 900; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: 6px 20px; border-radius: 14px; box-shadow: 4px 4px 0 hsl(var(--shadow) / 0.3); width: max-content; max-width: min(86vw, 900px); text-align: center; word-break: keep-all; line-height: 1.25; }
.banner.long { font-size: clamp(1rem, 2.6vw, 1.5rem); }   /* 설명 배너(필살기 안내) — 폰 화면 밖으로 잘렸다(실측) */
.hint { position: absolute; bottom: max(8px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); font-size: 0.85rem; background: hsl(var(--card) / 0.85); color: hsl(var(--card-foreground)); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.feed { position: absolute; top: 52px; right: 10px; display: grid; gap: 4px; font-size: 1.1rem; }
.feed span { background: hsl(var(--card) / 0.9); color: hsl(var(--card-foreground)); padding: 2px 8px; border-radius: 8px; }
/* 킬·데스: 내 기록 칩(늘 보임) + 전광판(📊·Tab) — 2026-10-01 사용자 «킬데스 전광판» */
.kdchip { display: flex; gap: 8px; font-weight: 800; font-size: 0.95rem; background: hsl(var(--card) / 0.92); color: hsl(var(--card-foreground)); padding: 4px 10px; border-radius: 999px; border: 2px solid hsl(var(--border)); cursor: pointer; min-height: 44px; min-width: 44px; align-items: center; }
.board { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); width: min(92vw, 560px); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: hsl(var(--card) / 0.96); color: hsl(var(--card-foreground)); padding: 10px; border-radius: 14px; border: 2px solid hsl(var(--border)); box-shadow: 4px 4px 0 hsl(var(--shadow) / 0.25); pointer-events: auto; }
.board.solo { grid-template-columns: 1fr; }
.board h4 { margin: 0 0 4px; font-size: 0.95rem; }
.board table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.board th { font-weight: 700; opacity: 0.75; text-align: right; padding: 2px 4px; white-space: nowrap; }
.board th:first-child, .board td:first-child { text-align: left; }
.board td:first-child { white-space: normal; word-break: keep-all; }
.board td { text-align: right; white-space: nowrap; padding: 3px 4px; border-top: 1px solid hsl(var(--border) / 0.6); font-variant-numeric: tabular-nums; }
.board tr.mine td { font-weight: 900; background: hsl(var(--primary) / 0.22); }
.board .t0 h4 { color: hsl(var(--secondary)); } .board .t1 h4 { color: hsl(var(--destructive)); }
.dark .board .t1 h4 { color: hsl(var(--accent)); }
#res-board { margin-top: 10px; position: static; transform: none; box-shadow: none; }
.hud-left { position: absolute; top: max(6px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); display: flex; gap: 6px; }
.wheel { position: absolute; top: 58px; left: 8px; display: grid; grid-template-columns: repeat(4, 48px); gap: 6px; background: hsl(var(--card) / 0.95); padding: 8px; border-radius: 14px; border: 2px solid hsl(var(--border)); }
.wheel button { width: 48px; height: 48px; font-size: 1.5rem; border-radius: 10px; border: 0; background: hsl(var(--muted)); cursor: pointer; }
/* 이동 = 왼쪽 55 % 어디든 플로팅 스틱 · 공격·필살기 = 오른쪽 아래 고정 버튼(끌면 조준) */
.stick { position: absolute; bottom: 0; width: 55%; height: 70%; touch-action: none; }
#stick-l { left: 0; }
.lefty #stick-l { left: auto; right: 0; }
.stick i { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 3px solid hsl(var(--card) / 0.7); background: hsl(var(--card) / 0.15); display: none; }
.stick i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: hsl(var(--card) / 0.8); transform: translate(var(--kx, 0), var(--ky, 0)); }
.stick.on i { display: block; }
.atkbtn, .super { position: absolute; border-radius: 50%; touch-action: none; font: inherit; font-weight: 900; cursor: pointer; display: grid; place-items: center; user-select: none; -webkit-user-select: none; }
.atkbtn { --r: max(28px, 4%); right: max(var(--r), env(safe-area-inset-right)); bottom: max(26px, env(safe-area-inset-bottom)); width: 108px; height: 108px;
  border: 4px solid hsl(0 0% 100% / 0.9); background: hsl(8 82% 52% / 0.88); color: #fff; font-size: 1rem; box-shadow: 0 4px 0 hsl(8 70% 34% / 0.9); }
.atkbtn span { position: relative; z-index: 1; margin-top: -10px; text-shadow: 0 1px 2px #0008; }
.atkbtn .ammo { position: absolute; bottom: 18px; display: flex; gap: 4px; z-index: 1; }
.atkbtn .ammo i { width: 20px; height: 7px; border-radius: 4px; background: hsl(0 0% 100% / 0.3); }
.atkbtn .ammo i.full { background: #ffd23f; }
.atkbtn.empty { animation: shake 0.25s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.knob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: hsl(0 0% 100% / 0.35); pointer-events: none; opacity: 0; transition: opacity 0.1s; }
.aiming .knob { opacity: 1; }
.super { right: calc(max(28px, 4%) + 118px); bottom: max(70px, calc(env(safe-area-inset-bottom) + 44px)); width: 84px; height: 84px; border: 3px solid hsl(var(--border));
  background: hsl(var(--muted)); color: hsl(var(--foreground)); font-size: 0.72rem; line-height: 1.1; overflow: hidden; padding: 6px; text-align: center; }
.lefty .atkbtn { right: auto; left: max(28px, 4%); }
.lefty .super { right: auto; left: calc(max(28px, 4%) + 118px); }
.super span { position: relative; z-index: 1; word-break: keep-all; }
.super > i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: hsl(var(--primary) / 0.55); }
.super.ready { border-color: hsl(var(--primary)); background: hsl(var(--primary) / 0.25); box-shadow: 0 0 0 4px hsl(var(--primary) / 0.5), 0 0 18px hsl(var(--primary)); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.autoaim { position: absolute; right: 12px; bottom: 50%; background: hsl(var(--card) / 0.9); color: hsl(var(--card-foreground)); padding: 2px 8px; border-radius: 8px; font-size: 0.85rem; }
.pc .stick i, .pc #btn-super, .pc #btn-atk { opacity: 0.8; }
.fullbtn[hidden] { display: none; }

.res-title { font-size: clamp(2rem, 7vw, 3.6rem); }
.res-winner { font-size: clamp(1.1rem, 3.6vw, 1.6rem); font-weight: 800; margin: .2rem 0 .4rem; padding: .35rem .9rem; border-radius: 999px; background: #fff6cc; color: #5a3d00; }
.res-winner:empty { display: none; }
.stats { min-width: min(420px, 90vw); text-align: left; }
.stats table { width: 100%; border-collapse: collapse; }
.stats td { padding: 4px 6px; border-bottom: 1px dashed hsl(var(--border)); }

.offer { max-width: 520px; display: grid; gap: 10px; }
.ladder { list-style: none; display: flex; gap: 6px; justify-content: center; padding: 0; margin: 4px 0; }
.ladder li { background: hsl(var(--primary) / 0.25); padding: 6px 10px; border-radius: 10px; font-weight: 900; }
.ladder li:last-child { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.qpanel { width: min(640px, 100%); display: grid; gap: 12px; }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.question { font-size: 1.35rem; font-weight: 800; line-height: 1.45; min-height: 2.9em; margin: 0; }
.timebar { height: 8px; background: hsl(var(--muted)); border-radius: 999px; overflow: hidden; }
.timebar i { display: block; height: 100%; width: 100%; background: hsl(var(--secondary)); transform-origin: left; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { min-height: 64px; font: inherit; font-size: 1.15rem; font-weight: 800; border-radius: 12px; border: 3px solid hsl(var(--border)); background: hsl(var(--background)); color: hsl(var(--foreground)); cursor: pointer; padding: 8px; }
.choice.right { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border-color: hsl(var(--secondary)); }
.choice.wrong { border-color: hsl(var(--destructive)); text-decoration: line-through; }
.feedback { min-height: 2.8em; margin: 0; font-weight: 700; }
.reward { min-width: min(420px, 90vw); display: grid; gap: 6px; }
.big-num { font-size: 2rem; margin: 0; }
.unlock { font-weight: 900; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: 6px 10px; border-radius: 10px; }

.modal { position: fixed; inset: 0; z-index: var(--z-modal); background: hsl(var(--overlay) / 0.55); display: grid; place-items: center; padding: 16px; }
.modal .card { max-width: 420px; text-align: center; display: grid; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: var(--z-toast); background: hsl(var(--foreground)); color: hsl(var(--background)); padding: 10px 16px; border-radius: 12px; font-weight: 700; max-width: 90vw; }

@media (max-width: 520px) { .choices { grid-template-columns: 1fr; } .hero-char img { width: 90px; height: 120px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.reduce * { animation: none !important; transition: none !important; }

/* 쇼룸(개발용 페이지 showroom.html — D47) */
.showroom { overflow: auto; }
.showroom-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 10px 16px; }
.showroom-bar select { min-height: 44px; }
.showroom-bar .ok { color: hsl(var(--primary)); font-weight: 700; }
.showroom-bar .bad { color: hsl(var(--destructive)); font-weight: 700; }
#sr-canvas { display: block; }
.showroom-report { padding: 12px 16px; font-size: 12px; white-space: pre-wrap; }

/* 스티커 말풍선 = 버튼(누르면 그 친구 스티커 숨김, D43) */
.bubble { min-height: 44px; min-width: 44px; border: 0; font: inherit; font-weight: 700; cursor: pointer; pointer-events: auto; }
.bubble:focus-visible { outline: 3px solid hsl(var(--ring)); outline-offset: 2px; }

/* 연속 처치 배지 — 더블·트리플은 색과 크기를 올린다(사용자 요청 «더블킬 트리플킬 확실하게») */
.streak { position: absolute; top: 34%; left: 50%; transform: translate(-50%, 0) scale(1); font-weight: 900; font-size: clamp(1.6rem, 5vw, 3rem); color: #fff; padding: 4px 22px; border-radius: 16px; background: #2b2b3a; box-shadow: 0 0 0 4px #fff, 5px 6px 0 rgb(0 0 0 / 0.35); white-space: nowrap; pointer-events: none; z-index: 30; }
.streak.s2 { background: #e0457b; font-size: clamp(1.9rem, 6vw, 3.6rem); }
.streak.s3 { background: #ff7a1a; font-size: clamp(2.1rem, 7vw, 4rem); }
.streak.s4 { background: linear-gradient(90deg, #8a5cff, #ff4fa3, #ffb321); font-size: clamp(2.3rem, 7.5vw, 4.4rem); }
.streak.pop { animation: streak-pop 0.45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes streak-pop { 0% { transform: translate(-50%, 0) scale(2.2) rotate(-6deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: translate(-50%, 0) scale(1) rotate(0); } }
/* 맞으면 화면 가장자리가 붉게 번쩍 */
.vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 55%, rgb(230 30 30 / 0.55) 100%); transition: opacity 0.25s ease-out; z-index: 5; }
#hud.hurt .vignette { opacity: 1; transition: none; }
@media (prefers-reduced-motion: reduce) { .streak.pop { animation: none; } }

/* 단원 고르기(설정) — 과목마다 접는 목록 */
.units { display: grid; gap: 8px; }
.unit-group { border: 2px solid hsl(var(--border)); border-radius: 12px; padding: 6px 10px; }
.unit-group > summary { min-height: 44px; display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.unit-group .checks label { min-height: 44px; }
#class-unit { min-height: 44px; font: inherit; border-radius: 10px; padding: 0 8px; max-width: 100%; }

/* v1.2 로비 옆칸: 열린 방 · 학교 순위 */
.lobby-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.side-card { display: grid; gap: 8px; align-content: start; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn.sm { min-height: 44px; padding: 6px 12px; font-size: 0.9rem; }
a.btn[data-gb="site-link"] { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; background: transparent; box-shadow: none; }
.rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rooms li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 10px; background: hsl(var(--muted) / 0.6); }
.rooms li .btn { min-height: 44px; }
.rank { margin: 0; padding-left: 1.6em; display: grid; gap: 2px; }
.rank li.me { font-weight: 800; color: hsl(var(--secondary)); }
.rank li.empty, .rooms li.empty { list-style: none; background: none; margin-left: -1.6em; }
/* 학교 순위 — 메달 줄(1·2·3위 강조) · 로비 맨 위 카드 · 타이틀 칸 */
.rank.medal { padding-left: 0; list-style: none; gap: 4px; }
.rank.medal li { display: flex; gap: 8px; align-items: baseline; padding: 4px 10px; border-radius: 10px; background: hsl(var(--muted) / 0.35); font-weight: 700; }
.rank.medal li:nth-child(1) { background: hsl(45 95% 60% / 0.45); font-size: 1.08em; }
.rank.medal li:nth-child(2) { background: hsl(210 15% 75% / 0.45); }
.rank.medal li:nth-child(3) { background: hsl(25 70% 60% / 0.38); }
.rank.medal li.empty { background: none; margin-left: 0; font-weight: 400; }
.school-card { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-radius: var(--radius); background: hsl(var(--card)); border: 3px solid hsl(45 90% 55%); box-shadow: 4px 4px 0 hsl(var(--shadow) / 0.12); }
.school-card #h-school { font-size: 1.1rem; }
/* 로비 맨 위는 «한 덩어리 띠» — 5줄 목록이면 주 단추(온라인 빠른 대전)가 PC 에서도 화면 밖으로 밀렸다(830 > 720 실측) */
.school-card .rank.medal { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; flex: 1 1 auto; }
.school-card .rank.medal li { padding: 2px 10px; }
.school-card #btn-school { margin-left: auto; min-height: 44px; padding: 4px 12px; }
.school-card #school-mine { flex-basis: 100%; margin: 0; }
@media (max-width: 480px) { .school-card .rank.medal li:nth-child(n+4) { display: none; } .school-card #school-mine.hint { display: none; } .school-card { padding: 6px 10px; gap: 4px 8px; } .school-card #h-school { font-size: 1rem; } .school-card .rank.medal { gap: 4px; } .school-card .rank.medal li { padding: 1px 8px; } .school-card #h-school { order: 1; } .school-card #btn-school { order: 2; } .school-card .rank.medal { order: 3; flex-basis: 100%; } .school-card #school-mine { order: 4; } }   /* 폰 세로 — 제목·단추 한 줄(단추 44px 유지 = D36), 칩은 다음 줄 */   /* 폰 세로 — 1~3위 + 우리 학교(주 단추가 첫 화면에 남게) */
/* 선행쌤 — 첫 화면 위쪽 반짝이는 배너 */
.gb-site { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px;
  width: min(420px, 92vw); min-height: 60px; margin: 6px 0; padding: 10px 14px; box-sizing: border-box;
  border-radius: 16px; text-decoration: none; color: #fff;
  background: linear-gradient(110deg, #6d28d9, #db2777, #f97316, #db2777, #6d28d9); background-size: 300% 100%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35) inset, 0 8px 24px rgba(219, 39, 119, .45);
  animation: gb-site-flow 7s linear infinite; }
.gb-site::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%); animation: gb-site-shine 3.2s ease-in-out infinite; }
.gb-site-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px; background: rgba(255, 255, 255, .22); animation: gb-site-pop 1.6s ease-in-out infinite; }
.gb-site-ic svg { width: 24px; height: 24px; }
.gb-site-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; text-align: left; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.gb-site-tx b { font-size: 18px; font-weight: 900; letter-spacing: -.01em; }
.gb-site-tx small { font-size: 13px; font-weight: 600; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-site-go { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; min-height: 36px; padding: 0 12px; border-radius: 999px; background: #fff; color: #be185d; font-weight: 800; font-size: 13px; }
.gb-site-go svg { width: 14px; height: 14px; }
.gb-site:hover, .gb-site:focus-visible { filter: brightness(1.08); box-shadow: 0 0 0 2px #fff inset, 0 10px 30px rgba(219, 39, 119, .6); }
@keyframes gb-site-flow { to { background-position: 300% 0; } }
@keyframes gb-site-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes gb-site-pop { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .gb-site, .gb-site::after, .gb-site-ic { animation: none; } }

.title-school { display: grid; gap: 6px; width: min(420px, 92vw); padding: 10px 14px; border-radius: var(--radius); background: hsl(var(--card) / 0.92); border: 3px solid hsl(45 90% 55%); text-align: left; }
.title-school > b { font-size: 1.1rem; text-align: center; }
@media (max-height: 520px) { .title-school .rank.medal li:nth-child(n+4) { display: none; } .title-school { padding: 6px 12px; gap: 4px; } }
.school-pick { display: grid; gap: 10px; max-width: 640px; margin: 0 auto; }
.school-pick .row { display: flex; gap: 8px; flex-wrap: wrap; }
.school-pick select, .school-pick input { min-height: 44px; font: inherit; border-radius: 10px; border: 2px solid hsl(var(--border)); background: hsl(var(--background)); color: hsl(var(--foreground)); padding: 6px 10px; }
.school-pick input { flex: 1 1 160px; }
.pack-list { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; text-align: left; }
.pack-list li.ok::marker { color: hsl(var(--secondary)); }
.pack-list li.no::marker { color: hsl(var(--destructive)); }

/* PC 조작 안내(v1.3): 버튼 위 키 표시 · 조작법 창 */
.pc-only { display: none; }
body.pc .pc-only { display: inline-block; }
.atkbtn .key, .super .key { position: absolute; top: -10px; z-index: 2; font: 800 0.72rem/1 system-ui, sans-serif; padding: 3px 6px; border-radius: 6px; background: hsl(var(--card)); color: hsl(var(--card-foreground)); border: 1px solid hsl(var(--border)); box-shadow: 0 2px 0 hsl(var(--border)); }
.help-card { max-width: 560px; text-align: left; }
.help-card h2 { text-align: center; }
.help-card table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.help-card td { padding: 5px 6px; border-bottom: 1px solid hsl(var(--border)); vertical-align: top; }
.help-card td:first-child { white-space: nowrap; width: 1%; }
.help-card kbd { display: inline-block; min-width: 1.6em; text-align: center; font: 800 0.8rem/1.4 system-ui, sans-serif; padding: 1px 6px; margin: 1px 2px; border-radius: 6px; background: hsl(var(--muted)); border: 1px solid hsl(var(--border)); box-shadow: 0 2px 0 hsl(var(--border)); }
.help-card h3 { margin: 6px 0 2px; font-size: 1rem; }
.modal.peek { pointer-events: none; background: transparent; }
.modal.peek .card { opacity: 0.94; }
.size-seg { justify-content: center; margin: 4px 0 2px; }
/* 서바이벌 탈락 뒤 «결과 보고 나가기»(2026-10-09) — 관전 화면 아래 가운데, 엄지가 닿는 자리 */
#btn-out { position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; pointer-events: auto; min-height: 52px; padding: 10px 22px; font-size: 1.05rem; box-shadow: 0 6px 18px rgb(0 0 0 / 0.35); }

/* @gb-frac v1 — 분수 세로 표기(kit/frac/frac.css 사본 · CSP style-src 'self' 라 주입 대신 여기) */
/* @gb-frac v1 — frac.js 의 FRAC_CSS 사본. CSP 로 인라인 <style> 이 막힌 게임은 이 파일을 스타일시트에 넣는다. */
.frac{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;line-height:1.05;margin:0 .12em;font-size:.9em;font-variant-numeric:tabular-nums}
.frac-n{padding:0 .18em .06em;border-bottom:.09em solid currentColor}.frac-d{padding:.06em .18em 0}.frac-mixed{white-space:nowrap}.frac-mixed>.frac{margin-left:.06em}
/* @gb-juice-css v1 — kit/juice/juice.css. 게임 스타일시트 끝에 그대로 붙인다(CSP style-src 'self' 라 JS 가 <style> 을 넣지 않는다). */
.gbj-layer{position:fixed;inset:0;pointer-events:none;z-index:40;overflow:hidden}
.gbj-pop{position:absolute;transform:translate(-50%,-50%) scale(var(--s));font:900 22px/1 system-ui,sans-serif;text-shadow:0 2px 0 #0008,0 0 12px currentColor;white-space:nowrap;animation:gbjPop .9s cubic-bezier(.2,1.6,.4,1) forwards}
@keyframes gbjPop{0%{opacity:0;transform:translate(-50%,-50%) scale(calc(var(--s)*.3))}15%{opacity:1;transform:translate(-50%,-80%) scale(calc(var(--s)*1.35))}35%{transform:translate(calc(-50% + var(--dx)),-120%) scale(var(--s))}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),-260%) scale(calc(var(--s)*.9))}}
.gbj-punch{animation:gbjPunch .32s cubic-bezier(.2,2,.4,1)}
@keyframes gbjPunch{0%{transform:scale(1)}30%{transform:scale(var(--gbj-p))}100%{transform:scale(1)}}
.gbj-flash{position:absolute;inset:0;opacity:0}
.gbj-flash.gbj-go{animation:gbjFlash .35s ease-out forwards}
@keyframes gbjFlash{to{opacity:0}}
/* 가운데 큰 글자 — 자리는 게임이 --gbj-banner-top 으로 옮긴다(HUD 배너·선택 카드와 겹치지 않게 · 2026-10-12 끝까지 진화 실측). 좁은 화면에서 넘치지 않게 vw 로 줄인다 */
.gbj-banner{position:absolute;left:50%;top:var(--gbj-banner-top,40%);transform:translate(-50%,-50%);font:900 clamp(22px,8vw,44px)/1.1 system-ui,sans-serif;text-align:center;opacity:0;text-shadow:0 3px 0 #000a,0 0 24px currentColor;max-width:92vw;width:max-content}
.gbj-banner.gbj-go{animation:gbjBan var(--d,1.4s) cubic-bezier(.2,1.5,.4,1) forwards}
@keyframes gbjBan{0%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(-8deg)}15%{opacity:1;transform:translate(-50%,-50%) scale(1.25) rotate(2deg)}30%{transform:translate(-50%,-50%) scale(1)}80%{opacity:1}100%{opacity:0;transform:translate(-50%,-70%) scale(1.05)}}
@media (prefers-reduced-motion:reduce){.gbj-pop,.gbj-banner.gbj-go,.gbj-punch{animation-duration:.01s}}
.school-why { margin: 0; padding: 10px 12px; border-radius: 10px; background: hsl(var(--primary) / .12); font-weight: 700; }

/* 1.4.0 — 첫 화면 통계 줄 · 전체 순위(더보기) */
.gb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px 0; text-align: center; flex-basis: 100%; }
.gb-stats:empty { display: none; }
.gb-stats span { display: flex; flex-direction: column; min-width: 0; }
.gb-stats b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.gb-stats small { font-size: 12px; color: hsl(var(--muted-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-more { min-height: 44px; }
.title-school .gb-more { justify-self: center; }
.rank-all { justify-content: flex-start; padding-top: max(16px, env(safe-area-inset-top)); }
.rank-all .seg { justify-content: center; }
.rank-all .seg button.on { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }
.rank-scroll { list-style: none; padding: 0; width: min(520px, 100%); flex: 1 1 auto; min-height: 0; overflow-y: auto; text-align: left; display: block; }
.rank-scroll li { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; min-height: 32px; border-bottom: 1px solid hsl(var(--border) / 0.5); font-weight: 700; }
.rank-scroll li .no { min-width: 2.2em; text-align: right; }
.rank-scroll li .nm { flex: 1 1 auto; }
.rank-scroll li.me { background: hsl(var(--secondary) / 0.18); border-radius: 10px; }
.rank-scroll li.empty { justify-content: center; border: 0; }
@media (max-width: 480px) { .school-card .gb-stats { order: 3; flex-basis: 100%; padding: 0; } .school-card .rank.medal { order: 4; } .school-card #school-more { order: 5; flex-basis: 100%; } .school-card #school-mine { order: 6; } }

/* ── v2.0 등급·추천서·축제 패스·학년 등급·합류 연출 ───────────────────────── */
.gchip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; color: #fff; background: hsl(var(--g0)); vertical-align: middle; }
.gchip.g1, .grade-head.g1 { background: hsl(var(--g1)); }
.gchip.g2, .grade-head.g2 { background: hsl(var(--g2)); }
.gchip.g3, .grade-head.g3 { background: linear-gradient(135deg, hsl(var(--g3)), hsl(32 96% 60%)); color: hsl(226 40% 13%); }
.char-cell.g1 { border-color: hsl(var(--g1) / 0.7); } .char-cell.g2 { border-color: hsl(var(--g2) / 0.75); }
.char-cell.g3 { border-color: hsl(var(--g3)); box-shadow: 0 0 0 2px hsl(var(--g3) / 0.35), 0 0 18px hsl(var(--g3) / 0.35); }
.char-cell .gchip { position: absolute; left: 8px; top: 8px; }
.char-cell .mlv { display: block; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.char-cell .lock { font-size: 0.75rem; font-weight: 800; background: hsl(var(--overlay) / 0.7); color: #fff; padding: 2px 6px; border-radius: 8px; }
.prog-card { display: grid; gap: 10px; padding: 12px 14px; background: hsl(var(--card)); border: 2px solid hsl(var(--border)); border-radius: var(--radius); box-shadow: 4px 4px 0 hsl(var(--shadow) / 0.12); }
.prog-card .goal-row { display: flex; gap: 12px; align-items: center; }
.prog-card .goal-row img { width: 56px; height: 75px; object-fit: contain; border-radius: 10px; background: hsl(var(--muted)); }
.prog-card .goal-txt { flex: 1; min-width: 0; }
.prog-card .bar { width: 100%; height: 12px; margin: 4px 0; }
.prog-card .bar i { background: linear-gradient(90deg, hsl(var(--g2)), hsl(var(--g1))); }
.prog-card .bar.pass i { background: linear-gradient(90deg, hsl(var(--accent)), hsl(var(--primary))); }
.feat { display: inline-block; font-size: 0.72rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.chip.grade { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); font-size: 0.8rem; }
.chip.grade.y3, .chip.grade.y4 { background: hsl(var(--g2)); color: #fff; } .chip.grade.y5, .chip.grade.y6 { background: hsl(var(--g1)); color: #fff; }
.chip.grade.y7 { background: linear-gradient(135deg, hsl(var(--g3)), hsl(32 96% 60%)); color: hsl(226 40% 13%); }
.road .grade-head { display: block; color: #fff; font-weight: 900; padding: 6px 12px; border: 0; background: hsl(var(--g1)); }
.road li.target { border-color: hsl(var(--accent)); box-shadow: 0 0 0 2px hsl(var(--accent) / 0.4); }
.road li.g3 img { filter: drop-shadow(0 0 6px hsl(var(--g3) / 0.8)); }
.rw-prog { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; text-align: left; }
.rw-prog li { padding: 6px 10px; border-radius: 10px; background: hsl(var(--muted)); font-weight: 700; font-size: 0.92rem; animation: rwIn 0.35s ease-out both; }
.rw-prog li:nth-child(2) { animation-delay: 0.08s; } .rw-prog li:nth-child(3) { animation-delay: 0.16s; } .rw-prog li:nth-child(4) { animation-delay: 0.24s; }
.rw-prog li.rec { background: hsl(var(--g2) / 0.18); } .rw-prog li.streak { background: hsl(var(--accent) / 0.25); }
.rw-prog li.lv { background: hsl(var(--g1) / 0.2); } .rw-prog li.pass { background: hsl(var(--primary) / 0.25); } .rw-prog li.grade { background: hsl(var(--g3) / 0.3); }
@keyframes rwIn { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
.join-fx { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, hsl(var(--g1) / 0.55), hsl(var(--overlay) / 0.88) 70%); }
.join-fx.g2 { background: radial-gradient(circle at 50% 45%, hsl(var(--g2) / 0.6), hsl(var(--overlay) / 0.9) 70%); }
.join-fx.g3 { background: radial-gradient(circle at 50% 45%, hsl(var(--g3) / 0.75), hsl(var(--overlay) / 0.92) 72%); }
.join-fx .jf-card { text-align: center; color: #fff; display: grid; gap: 8px; justify-items: center; padding: 16px; }
.join-fx img { width: min(56vw, 240px); height: auto; aspect-ratio: 3 / 4; object-fit: contain; filter: drop-shadow(0 10px 24px hsl(var(--shadow) / 0.6)); }
.join-fx.on img { animation: jfPop 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.join-fx.g3.on img { animation: jfPop 1.4s cubic-bezier(0.2, 1.4, 0.4, 1) both, jfGlow 1.6s ease-in-out 1.4s infinite alternate; }
.join-fx h3 { font-size: 1.8rem; margin: 0; text-shadow: 0 3px 0 hsl(var(--shadow) / 0.5); }
.jf-grade { font-weight: 900; letter-spacing: 0.08em; padding: 4px 14px; border-radius: 999px; background: hsl(var(--g1)); }
.jf-grade.g2 { background: hsl(var(--g2)); } .jf-grade.g3 { background: linear-gradient(135deg, hsl(var(--g3)), hsl(32 96% 60%)); color: hsl(226 40% 13%); }
@keyframes jfPop { 0% { transform: scale(0.2) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.12) rotate(3deg); opacity: 1; } 100% { transform: none; } }
@keyframes jfGlow { from { filter: drop-shadow(0 0 10px hsl(var(--g3) / 0.6)); } to { filter: drop-shadow(0 0 28px hsl(var(--g3))); } }
@media (prefers-reduced-motion: reduce) { .join-fx.on img, .rw-prog li { animation: none; } }
.reduce .join-fx.on img, .reduce .rw-prog li { animation: none; }

/* 아이콘(v2.0 — 이모지 대신 직접 그린 SVG, web/js/ui/icons.js) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; display: inline-block; }
.btn.icon .ic { width: 1.4em; height: 1.4em; vertical-align: middle; }
.mode-card b .ic { width: 1.25em; height: 1.25em; color: hsl(var(--secondary)); margin-right: 2px; }
.mode-card[data-mode="team"] b .ic { color: hsl(var(--g3)); } .mode-card[data-mode="paint"] b .ic { color: hsl(var(--g2)); } .mode-card[data-mode="survival"] b .ic { color: hsl(var(--accent)); }
.stk { width: 1.9em; height: 1.9em; display: block; }
.bubble .stk { width: 2.2em; height: 2.2em; }
.kdchip .ic { color: hsl(var(--accent)); }
