/* ═══════════════════════════════════════════════════
   신답 분수 게임 공책 — 테마 T6 「모눈 공책」
   크림색 모눈 종이 + 잉크 5색. 분수는 세로 분수로 표기.
   레이아웃 L2 무대 집중 (상태 스트립 / 무대 / 조작 독)
   전자칠판(무스크롤) / 크롬북 16:9 기준
   ═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg:        #f4f1e8;
  --grid:      rgba(43, 79, 179, .085);
  --surface:   #fffdf8;
  --surface-2: #f5f2ea;
  --surface-3: #ebe6d9;
  --line:      rgba(27, 34, 51, .13);
  --line-2:    rgba(27, 34, 51, .26);
  --text:      #1b2233;
  --text-2:    #4a5468;
  --text-3:    #667083;

  --ink:         #2b4fb3;           /* 파란 펜 */
  --red:         #c8383a;           /* 빨간 펜 */
  --accent:      var(--ink);
  --accent-soft: rgba(43, 79, 179, .11);
  --hl:          rgba(255, 224, 92, .55);   /* 형광펜 */

  --good: #2a8a5c;
  --warn: #b77a12;
  --bad:  #c8383a;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;

  --shadow: 0 1px 2px rgba(27,34,51,.08), 0 10px 28px rgba(27,34,51,.14);

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "D2Coding", ui-monospace, monospace;
  --serif: "Noto Serif KR", "Nanum Myeongjo", Georgia, "Times New Roman", serif;
}

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body { overflow: hidden; }
button { font-family: inherit; }
[hidden] { display: none !important; }   /* .btn 의 display 가 hidden 속성을 덮지 않게 */
h1, h2, h3, h4, p { margin: 0; }
mark { background: linear-gradient(transparent 38%, var(--hl) 38%, var(--hl) 92%, transparent 92%); color: inherit; padding: 0 3px; }

/* 단색 SVG 아이콘 */
.ico { display: inline-flex; width: 1.25em; height: 1.25em; vertical-align: -.25em; flex: 0 0 auto; color: inherit; }
.ico svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ico.sm { width: 1em; height: 1em; vertical-align: -.16em; }
.ico.lg { width: 1.75em; height: 1.75em; }
.ico.xl { width: 2.75em; height: 2.75em; }

#app {
  height: 100dvh;
  display: flex; flex-direction: column;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--bg);
}

/* ── 분수 표기 ──────────────────────────────────── */
.frac {
  display: inline-flex; align-items: center; gap: .18em;
  font-family: var(--serif); font-weight: 700; line-height: 1;
  vertical-align: middle;
}
.frac .fw { font-size: 1.15em; font-family: var(--font); font-weight: 800; }
.frac .fs { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.frac .fn { padding: 0 .2em .08em; font-size: .9em; min-width: 1.1ch; text-align: center; }
.frac .fd { padding: .08em .2em 0; font-size: .9em; min-width: 1.1ch; text-align: center; border-top: 2px solid currentColor; }
.frac.lg { font-size: 1.5em; }
.frac.xl { font-size: 2.2em; }
.frac.xl .fd { border-top-width: 2.5px; }
.op { font-family: var(--serif); font-weight: 700; margin: 0 .35em; }

/* ── 상단바 ─────────────────────────────────────── */
.topbar {
  flex: 0 0 auto; height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  border-bottom: 2px solid var(--text);
  background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 7px; flex: 0 0 auto;
  background: var(--ink); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 11px; line-height: 1;
}
.brand-mark .bm-n { padding-bottom: 2px; }
.brand-mark .bm-d { padding-top: 2px; border-top: 1.5px solid #fff; }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.brand-text b { font-size: 16px; letter-spacing: -.01em; }
.brand-text small { font-size: 11.5px; color: var(--text-3); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.btn {
  height: 38px; padding: 0 16px;
  border-radius: var(--r);
  border: 1.5px solid var(--text);
  background: var(--surface);
  color: var(--text);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: background .14s ease, transform .08s ease, box-shadow .14s ease;
  display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap; text-decoration: none;
  box-shadow: 2px 2px 0 var(--text);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--text); }
.btn.ghost { border-color: var(--line-2); color: var(--text-2); box-shadow: none; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--text); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 2px 2px 0 var(--text); }
.btn.primary:hover { filter: brightness(1.06); background: var(--ink); }
.btn[disabled] { opacity: .38; cursor: not-allowed; transform: none; }
.btn[aria-pressed="false"] { opacity: .45; }

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2); background: transparent; color: var(--text-2);
  cursor: pointer; font-size: 15px; line-height: 1;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--text); }

.dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); vertical-align: middle; margin: 0 9px; }

/* ── 뷰 공통 ────────────────────────────────────── */
.view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.view[hidden] { display: none; }

/* ── 대시보드 ───────────────────────────────────── */
#view-dashboard { padding: 26px 30px 18px; gap: 20px; }
.dash-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
.dash-head p  { margin-top: 8px; font-size: 14.5px; color: var(--text-2); max-width: 78ch; line-height: 1.6; }
.dash-head b  { color: var(--text); font-weight: 700; }

.card-grid {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}
.gcard {
  position: relative;
  display: flex; flex-direction: column;
  padding: 22px 18px 16px;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--text);
  background: var(--surface);
  cursor: pointer; text-align: left; color: inherit;
  box-shadow: 2px 2px 0 var(--text);
  transition: transform .16s cubic-bezier(.2,.7,.3,1), box-shadow .16s ease;
  overflow: hidden;
}
.gcard::before {            /* 공책 인덱스 탭 */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
  background: var(--c);
}
.gcard:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--text); }
.gcard:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--text); }
.gcard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-left: 6px; }
.gcard-num { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--c); font-weight: 700; }
.gcard-emoji { font-size: 30px; line-height: 1; color: var(--c); }
.gcard-emoji .ico { width: 40px; height: 40px; vertical-align: 0; color: var(--c); }
.ov-icon .ico { width: 1em; height: 1em; vertical-align: 0; }
.gcard h3 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; padding-left: 6px; }
.gcard-student { margin-top: 6px; font-size: 12.5px; color: var(--c); font-weight: 700; padding-left: 6px; }
.gcard-desc { margin-top: 12px; padding-left: 6px; font-size: 13.5px; line-height: 1.62; color: var(--text-2); flex: 1 1 auto;
  background: repeating-linear-gradient(transparent 0 calc(1.62em - 1px), var(--line) calc(1.62em - 1px) 1.62em); }
.gcard-foot { margin-top: 14px; padding-left: 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.gcard-play { align-self: flex-end; }
.badge {
  font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  white-space: nowrap;
}
.gcard-play { font-size: 13px; font-weight: 800; color: var(--text); }

.dash-foot { flex: 0 0 auto; font-size: 12px; color: var(--text-3); display: flex; align-items: center; flex-wrap: wrap; }

/* ── 게임 헤더 ──────────────────────────────────── */
#view-game { padding: 0; }
.game-head {
  flex: 0 0 auto;
  display: flex; align-items: stretch; justify-content: space-between; gap: 20px;
  padding: 12px 26px;
  border-bottom: 1.5px solid var(--text);
  background: var(--surface);
}
.gh-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.gh-num {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em;
  color: #fff; background: var(--c, var(--ink));
  padding: 6px 9px; border-radius: 6px;
}
.game-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.gh-meta { margin-top: 3px; font-size: 12.5px; color: var(--text-3); }
.gh-meta #gh-student { color: var(--c, var(--ink)); font-weight: 700; }

.gh-review {
  display: flex; align-items: center; gap: 12px;
  max-width: 680px; padding: 8px 14px;
  border-radius: var(--r);
  border: 1.5px dashed var(--red);
  background: rgba(200,56,58,.05);
}
.gh-review-tag {
  flex: 0 0 auto; font-size: 11px; font-weight: 800; letter-spacing: .02em;
  padding: 4px 9px; border-radius: 999px;
  background: var(--red); color: #fff;
}
.gh-review p { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.gh-review b { color: var(--red); }

/* ── 게임 본문 L2 : 상태 스트립 / 무대 / 조작 독 ── */
.game-body {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-rows: auto minmax(0,1fr) auto;
  gap: 12px; padding: 12px 26px 16px;
}

.stat-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px;
  border: 1.5px solid var(--text); border-radius: var(--r);
  background: var(--surface);
  min-height: 52px;
}
.stat {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 12px; border-radius: 8px;
  background: var(--surface-2);
}
.stat-label { font-size: 14px; color: var(--text-2); font-weight: 600; }
.stat-value { font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.stat-value .frac { font-size: 20px; }
.stat-value.c  { color: var(--c, var(--ink)); }
.stat-value.good { color: var(--good); }
.stat-value.warn { color: var(--warn); }
.stat-value.bad  { color: var(--bad); }
.gauge { display: inline-flex; flex-direction: column; gap: 4px; min-width: 170px; padding: 3px 12px; }
.gauge-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); font-weight: 600; }
.gauge-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; border: 1px solid var(--line); }
.gauge-fill { height: 100%; border-radius: 99px; transition: width .25s ease, background .25s ease; }
.stat-strip .hint { margin-left: auto; font-size: 12.5px; color: var(--text-2); }
.stat-strip .hint b { color: var(--text); }

.stage {
  position: relative; min-width: 0; min-height: 0;
  border: 1.5px solid var(--text);
  border-radius: var(--r);
  background:
    linear-gradient(rgba(43,79,179,.045) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(43,79,179,.045) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--surface);
  overflow: hidden;
}
.stage::before {           /* 공책 여백 빨간 줄 */
  content: ""; position: absolute; left: 44px; top: 0; bottom: 0; width: 1.5px;
  background: rgba(200,56,58,.32); pointer-events: none; z-index: 0;
}

.dock {
  display: flex; align-items: stretch; justify-content: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 14px;
  border: 1.5px solid var(--text); border-radius: var(--r);
  background: var(--surface);
  min-height: 74px;
}
.ctrl-group { display: flex; flex-direction: column; gap: 5px; }
.cg-title { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--text-3); text-transform: uppercase; padding-left: 2px; }
.cg-row { display: flex; gap: 8px; flex-wrap: wrap; }

.abtn {
  min-height: 46px; min-width: 96px; padding: 8px 14px;
  border-radius: var(--r);
  border: 1.5px solid var(--text);
  background: var(--surface);
  color: var(--text);
  font-size: 14px; font-weight: 700;
  cursor: pointer; text-align: left;
  display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 2px 2px 0 var(--text);
  transition: background .13s ease, transform .08s ease, box-shadow .08s ease;
}
.abtn:hover:not([disabled]) { background: var(--surface-2); }
.abtn:active:not([disabled]) { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--text); }
.abtn[disabled] { opacity: .34; cursor: not-allowed; box-shadow: none; }
.abtn .ab-ico { font-size: 19px; line-height: 1; flex: 0 0 auto; display: inline-flex; }
.abtn .ab-ico .ico { width: 1em; height: 1em; vertical-align: 0; }
.abtn .ab-body { min-width: 0; white-space: nowrap; }
.abtn .ab-sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-3); margin-top: 2px; }
.abtn.accent { background: var(--c, var(--ink)); color: #fff; border-color: var(--text); }
.abtn.accent .ab-sub { color: rgba(255,255,255,.75); }
.abtn.accent:hover:not([disabled]) { filter: brightness(1.07); background: var(--c, var(--ink)); }
.abtn.key::after {
  content: attr(data-key);
  margin-left: 6px; flex: 0 0 auto;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  padding: 3px 7px; border-radius: 5px;
  background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--line-2);
}
.abtn.accent.key::after { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.4); }

/* ── 오버레이 ───────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27,34,51,.45);
  animation: fadein .18s ease;
}
.overlay[hidden] { display: none; }
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97) } to { opacity: 1; transform: none } }
.overlay-card {
  width: min(500px, 90vw); padding: 32px 30px 26px;
  border-radius: var(--r-lg);
  border: 2px solid var(--text);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--text);
  text-align: center;
  animation: pop .22s cubic-bezier(.2,.8,.3,1);
}
.ov-icon { font-size: 44px; line-height: 1; margin-bottom: 14px; color: var(--c, var(--ink)); }
.overlay-card h3 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.overlay-card p { margin-top: 10px; font-size: 14.5px; line-height: 1.7; color: var(--text-2); }
.overlay-card p b { color: var(--text); }
.ov-actions { margin-top: 24px; display: flex; gap: 9px; justify-content: center; }

/* ── 모달 ───────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(27,34,51,.5);
  animation: fadein .18s ease; padding: 24px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(980px, 94vw); max-height: 90dvh;
  display: flex; flex-direction: column;
  border-radius: var(--r-lg);
  border: 2px solid var(--text);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--text);
  animation: pop .22s cubic-bezier(.2,.8,.3,1);
  overflow: hidden;
}
.modal-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1.5px solid var(--text); }
.modal-head h3 { font-size: 16px; font-weight: 800; }
.sheet-scroll { flex: 1 1 auto; overflow-y: auto; padding: 18px 20px 24px; display: grid; gap: 16px; background: var(--surface-2); }
.sheet-scroll img { width: 100%; display: block; border-radius: 6px; background: #fff; border: 1px solid var(--line-2); }
.sheet-cap { font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: -8px; }
.sheet-game { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; padding: 14px 0 4px; border-top: 1.5px solid var(--text); margin-top: 8px; }
.sheet-game:first-child { border-top: 0; margin-top: 0; padding-top: 4px; }
.sheet-game small { font-size: 13px; font-weight: 600; color: var(--text-3); }
.dash-key { display: block; margin-top: 6px; font-size: 13px; color: var(--text-3); }
.dash-key kbd { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--text); }

/* ── AI 기획 평가서 (모달) ──────────────────────── */
.modal-card.wide { width: min(1060px, 96vw); }
.modal-head-actions { display: flex; align-items: center; gap: 8px; }
.rv-scroll { flex: 1 1 auto; overflow-y: auto; padding: 22px 26px 30px; }

.rv { --c: var(--ink); }
.rv-head { padding-bottom: 14px; border-bottom: 2px solid var(--c); }
.rv-kicker { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--c); }
.rv-head h2 { margin-top: 7px; font-size: 24px; font-weight: 800; letter-spacing: -.025em; display: flex; align-items: center; gap: 10px; }
.rv-emoji { font-size: 26px; }
.rv-who { margin-top: 5px; font-size: 13px; color: var(--text-3); }
.rv-score { margin-top: 12px; display: flex; gap: 7px; }
.rv-pill { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; border: 1.5px solid var(--line-2); }
.rv-pill.good { color: var(--good); border-color: var(--good); background: rgba(42,138,92,.08); }
.rv-pill.warn { color: var(--warn); border-color: var(--warn); background: rgba(183,122,18,.08); }
.rv-pill.bad  { color: var(--bad); border-color: var(--bad); background: rgba(200,56,58,.08); }
.rv-summary { margin-top: 16px; padding: 14px 16px; border-radius: var(--r); border: 1.5px solid var(--text); background: var(--surface-2); font-size: 14.5px; line-height: 1.68; }
.rv-sec { margin-top: 26px; }
.rv-sec h3 { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--text-3); padding-bottom: 9px; border-bottom: 1.5px solid var(--text); }
.rv-lead { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.rv-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.rv-table th { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--text-3); text-align: left; padding: 0 12px 9px; border-bottom: 1px solid var(--line-2); }
.rv-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13.5px; }
.rv-table.tight td { padding: 10px 12px; }
.rv-table tr:last-child td { border-bottom: 0; }
.rv-mark { font-size: 19px; font-weight: 800; text-align: center; line-height: 1.2; }
.rv-mark.good { color: var(--good); }
.rv-mark.warn { color: var(--warn); }
.rv-mark.bad  { color: var(--bad); }
.rv-name { font-weight: 700; }
.rv-name span { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.rv-note { color: var(--text-2); line-height: 1.65; }
.rv-mono { font-family: var(--mono); font-size: 12.5px; color: var(--c); font-weight: 700; }
.rv-bug { margin-top: 14px; padding: 16px 18px; border-radius: var(--r); border: 1.5px solid var(--text); background: var(--surface); box-shadow: 3px 3px 0 var(--text); }
.rv-bug-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rv-bug-head b { font-size: 15.5px; font-weight: 800; letter-spacing: -.015em; }
.rv-lv { flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 5px; background: var(--red); color: #fff; }
.rv-lv.lv2 { background: var(--warn); }
.rv-row { display: flex; gap: 14px; padding: 7px 0; }
.rv-k { flex: 0 0 128px; font-size: 11.5px; font-weight: 700; color: var(--text-3); padding-top: 2px; }
.rv-v { flex: 1 1 auto; font-size: 13.5px; line-height: 1.66; color: var(--text-2); }
.rv-fix { display: flex; gap: 14px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.rv-fix ol { margin: 0; padding-left: 20px; flex: 1 1 auto; }
.rv-fix li { font-size: 13.5px; line-height: 1.66; color: var(--text); margin-bottom: 8px; }
.rv-fix li:last-child { margin-bottom: 0; }
.rv-fix li::marker { color: var(--c); font-weight: 700; }

/* ── 스테이지 공용 부품 ─────────────────────────── */
.scene-pad { position: absolute; inset: 0; padding: 18px 22px 18px 62px; display: flex; flex-direction: column; }
.scene-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

.toast {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  padding: 9px 16px; border-radius: 999px;
  background: var(--text); color: #fff;
  font-size: 13.5px; font-weight: 700;
  white-space: nowrap; z-index: 20;
  animation: toastin .22s cubic-bezier(.2,.8,.3,1);
  pointer-events: none;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -8px) } to { opacity: 1; transform: translate(-50%, 0) } }
.float-num { position: absolute; font-family: var(--mono); font-weight: 800; font-size: 18px; pointer-events: none; z-index: 25; animation: floatup 1s ease-out forwards; }
@keyframes floatup { from { opacity: 1; transform: translateY(0) } to { opacity: 0; transform: translateY(-42px) } }

/* 말풍선 */
.bubble {
  position: relative; display: inline-block;
  padding: 12px 18px; border-radius: 14px;
  border: 1.5px solid var(--text); background: #fff;
  font-size: 16px; font-weight: 600; line-height: 1.5;
  box-shadow: 3px 3px 0 var(--text);
}
.bubble::after {
  content: ""; position: absolute; left: 26px; bottom: -9px;
  width: 14px; height: 14px; background: #fff;
  border-right: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text);
  transform: rotate(45deg);
}
.bubble .frac { font-size: 26px; }
.bubble .ico { width: 1.5em; height: 1.5em; vertical-align: -.35em; }

/* 일시정지 배지 */
.pause-badge {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%); z-index: 75;
  padding: 8px 16px; border-radius: 999px; background: var(--text); color: #fff;
  font-size: 14px; font-weight: 700; pointer-events: none;
}
.pause-badge[hidden] { display: none; }

/* 종이 라벨 */
.label-tag {
  display: inline-block; padding: 4px 10px; border-radius: 5px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
  background: var(--text); color: #fff;
}

@media (max-width: 1180px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  #view-dashboard { padding: 20px 20px 14px; }
  .gh-review { display: none; }
  .game-body { padding: 10px 14px 12px; gap: 10px; }
  .scene-pad { padding-left: 56px; }
}

/* ── 버전 전환 (1차 / 2차) ───────────────────────── */
.ver-switch { display: inline-flex; align-items: stretch; border: 1.5px solid var(--text); border-radius: 8px; overflow: hidden; font-size: 13px; font-weight: 800; margin-right: 6px; }
.ver-switch a, .ver-switch span { padding: 6px 11px; color: var(--text-2); text-decoration: none; }
.ver-switch a:hover { background: var(--surface-2); color: var(--text); }
.ver-switch .on { background: var(--ink); color: #fff; }

/* ── 토스트를 스테이지 위가 아니라 정해진 자리에 (2차: "자막이 글자를 가리지 않게") ── */
.toast-slot { min-height: 40px; display: flex; align-items: center; justify-content: center; }
.toast.inline { position: static; transform: none; animation: toastfade .22s ease; white-space: normal; text-align: center; max-width: 100%; }
@keyframes toastfade { from { opacity: 0 } to { opacity: 1 } }
.sheet-cap.v2 { color: var(--ink); font-size: 13px; margin-top: 8px; }
.rv-v2 { padding: 14px 16px 6px; border: 1.5px solid var(--ink); border-radius: var(--r); background: rgba(43,79,179,.05); }
.rv-v2 h3 { color: var(--ink); border-bottom-color: var(--ink); }
.rv-ask { display: inline-block; margin: 2px 4px 2px 0; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: 12px; color: var(--text-2); }
.rv-none { color: var(--text-3); font-style: normal; }
