/* 트리즈 공부방 — 초등 고학년이 크롬북·휴대폰·교실 TV 에서 쓰는 화면.
   글자공장(../css/app.css)과 같은 틀을 쓰되, 이 페이지에 필요한 것만 따로 담았다.
   글자 크기는 모두 var(--ts) 를 곱한다(오른쪽 아래 '가+' 버튼이 바꾼다). */

:root {
  --bg: #f7f6fb;
  --card: #ffffff;
  --ink: #1d2330;
  --muted: #667085;
  --line: #e4e2ee;
  --brand: #5f3dc4;
  --brand-soft: #f3f0ff;
  --brand-ink: #ffffff;
  --hot: #ffd43b;
  --good: #2b8a3e;
  --good-bg: #ebfbee;
  --bad: #c92a2a;
  --bad-bg: #fff5f5;
  --warn: #b35309;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 20px rgba(16, 24, 40, .05);
  --ts: 1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 72px;
  background:
    radial-gradient(900px 500px at 100% 0%, #efe9ff 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: calc(18px * var(--ts));
  line-height: 1.65;
  overflow-x: hidden;
  word-break: keep-all;
}

main, .top, .foot, .bar-in { max-width: 1180px; margin: 0 auto; }

@font-face {
  font-family: 'GameKR';
  src: url('../fonts/jua.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---- 표지 ---- */
.top { padding: 20px 0 0; }
.hero {
  --ts: 1;
  position: relative; overflow: hidden;
  border-radius: 22px;
  padding: clamp(30px, 5vw, 60px) clamp(18px, 4vw, 56px);
  min-height: clamp(300px, 46vh, 520px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-align: center;
  background: radial-gradient(120% 130% at 12% 0%, #845ef7 0%, #5f3dc4 45%, #2b1a6b 100%);
  box-shadow: 0 12px 40px rgba(43, 26, 107, .3);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 78%);
}
.hero::after {
  content: '💡';
  position: absolute; right: -3%; bottom: -14%;
  font-size: clamp(200px, 32vw, 420px); line-height: 1;
  opacity: .1; filter: grayscale(1) brightness(3);
  pointer-events: none; user-select: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-club {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 clamp(10px, 1.6vw, 18px); padding: 6px 14px 6px 10px;
  border-radius: 999px; background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  font-size: clamp(13px, 1.6vw, 17px); font-weight: 700; color: #fff;
}
.hero-club b { color: var(--hot); letter-spacing: .06em; }
.hero-kicker {
  margin: 0 0 clamp(8px, 1.4vw, 16px);
  font-size: clamp(13px, 1.7vw, 18px); font-weight: 700;
  letter-spacing: .16em; color: #d0bfff;
}
.hero h1 {
  margin: 0; line-height: .95;
  font-family: 'GameKR', system-ui, sans-serif;
  font-size: clamp(56px, 13vw, 150px); font-weight: 400;
  text-shadow: 0 6px 26px rgba(0, 0, 0, .28);
}
.hero h1 span { color: var(--hot); }
.hero .big-q {
  margin: clamp(14px, 2.4vw, 28px) 0 0; color: #f3f0ff;
  font-size: clamp(20px, 3.4vw, 38px); font-weight: 800; line-height: 1.3;
}
.hero .big-q b { color: var(--hot); }
.hero .big-q .qm { font-family: 'GameKR', system-ui, sans-serif; font-size: 1.4em; color: var(--hot); line-height: 0; margin-left: .06em; }
.hero-line {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 8px; margin-top: clamp(18px, 3vw, 34px);
}
.hero-line .chip {
  padding: 7px 15px; border-radius: 999px; font-weight: 800;
  font-size: clamp(13px, 1.8vw, 19px);
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
}
.hero-line .chip-hot { background: var(--hot); color: #2b1a6b; border-color: var(--hot); }
.hero-line .arrow { color: #d0bfff; }

/* ---- 따라오는 막대: 등급 + 단계 ---- */
.bar {
  position: sticky; top: 0; z-index: 50;
  margin: 14px -16px 0; padding: 10px 16px;
  background: rgba(247, 246, 251, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar-in { display: flex; flex-direction: column; gap: 8px; }
.level { display: flex; align-items: center; gap: 10px; font-size: calc(15px * var(--ts)); }
.level-icon { font-size: 1.4em; line-height: 1; }
.level-name { font-weight: 800; color: var(--brand); white-space: nowrap; }
.level-bar { flex: 1; max-width: 280px; height: 10px; border-radius: 99px; background: #e5dbff; overflow: hidden; }
.level-bar i { display: block; height: 100%; background: linear-gradient(90deg, #9775fa, #5f3dc4); border-radius: inherit; transition: width .4s; }
.level-pts { color: var(--muted); font-weight: 700; white-space: nowrap; font-size: .92em; }

/* 여섯 단계가 한눈에 다 보이게 칸을 나눈다(옆으로 밀어야 하면 뒤에 더 있는 줄 모른다). */
.tabs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.tabs button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; padding: 8px 10px 8px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff;
  font-weight: 700; font-size: calc(15px * var(--ts)); line-height: 1.25;
  transition: background .15s, border-color .15s, transform .15s;
}
.tabs button:hover { border-color: #b197fc; }
.tabs button .num { width: 26px; height: 26px; font-size: calc(14px * var(--ts)); background: #e5dbff; color: var(--brand); }
.tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(95, 61, 196, .3); }
.tabs button[aria-selected="true"] .num { background: #fff; }
.tabs button:focus-visible, .btn:focus-visible { outline: 3px solid #9775fa; outline-offset: 2px; }

/* ---- 공통 ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 26px; margin: 18px 0;
}
.card h2 { margin: 0 0 12px; font-size: calc(24px * var(--ts)); display: flex; align-items: center; gap: 12px; }
.card h3 { margin: 18px 0 8px; font-size: calc(19px * var(--ts)); }
.num {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: calc(17px * var(--ts)); font-weight: 800;
}
.lead { margin: 0 0 16px; color: #3f4556; }
.muted { color: var(--muted); }
.warn { color: var(--warn); font-weight: 700; margin: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.row.center { justify-content: center; }

.btn {
  padding: 11px 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; cursor: pointer;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { background: #fff; border-color: var(--line); }
.btn-lg { padding: 14px 22px; font-size: calc(18px * var(--ts)); }
.btn.sm { padding: 6px 12px; font-size: calc(14px * var(--ts)); }
.btn.danger { color: var(--bad); }
.next { margin-top: 18px; }

.text-input, .note-form input, .note-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: #fff;
  font: inherit; color: inherit;
}
.text-input:focus, .note-form input:focus, .note-form textarea:focus { outline: none; border-color: #9775fa; }

.discover {
  margin-top: 18px; padding: 14px 16px;
  background: var(--brand-soft); border: 1px solid #e5dbff; border-radius: 12px;
}
.discover h3 { margin: 0 0 6px; color: var(--brand); }
.discover p { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; }
.pchip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: #fff; border: 1px solid #d0bfff; color: var(--brand);
  font-size: calc(14px * var(--ts)); font-weight: 700; white-space: nowrap;
}

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: calc(13px * var(--ts)); font-weight: 800; white-space: nowrap;
}

.result { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 2px solid; }
.result p { margin: 4px 0; }
.result.ok { background: var(--good-bg); border-color: #b2f2bb; }
.result.no { background: var(--bad-bg); border-color: #ffc9c9; }
.verdict { font-size: calc(20px * var(--ts)); font-weight: 800; }

/* ---- 단계 끝의 이전/다음 ---- */
.pager {
  display: flex; align-items: stretch; justify-content: space-between; gap: 10px;
  margin-top: 26px; padding-top: 18px; border-top: 1px dashed #d0bfff;
}
.pager .next { margin-top: 0; }
.pager-prev { align-self: center; }
.pager-next {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  margin-left: auto; padding: 10px 20px; border-radius: 14px;
  box-shadow: 0 6px 18px rgba(95, 61, 196, .28);
  animation: nudge 2.4s ease-in-out infinite;
}
.pager-next small { font-size: calc(13px * var(--ts)); font-weight: 700; color: #d0bfff; }
.pager-next > span { display: inline-flex; align-items: center; gap: 8px; font-size: calc(18px * var(--ts)); }
.pager-next .num { width: 26px; height: 26px; font-size: calc(14px * var(--ts)); background: #fff; color: var(--brand); }
.pager-end { margin: 0 0 0 auto; align-self: center; font-weight: 800; color: var(--brand); }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateX(4px); } 90% { transform: translateX(0); } }

/* ---- 1. 트리즈란? ---- */
.story-card {
  display: flex; align-items: center; gap: 20px;
  padding: 20px; border-radius: 16px;
  background: linear-gradient(135deg, #fff9db 0%, #f3f0ff 100%);
  border: 2px solid #eee4ff; min-height: 170px;
}
.story-icon { margin: 0; font-size: calc(64px * var(--ts)); line-height: 1; }
.story-card h3 { margin: 0 0 4px; font-size: calc(22px * var(--ts)); }
.story-card p { margin: 0; }
.story-step { color: var(--brand); font-weight: 800; font-size: calc(14px * var(--ts)); }
.story-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #d0bfff; }
.dots i.on { background: var(--brand); width: 24px; border-radius: 99px; }

.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.key { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: #fcfbff; }
.key h3 { margin: 4px 0 6px; color: var(--brand); }
.key p { margin: 0; }
.key-icon { font-size: calc(34px * var(--ts)); line-height: 1; }

/* ---- 오늘의 미션 · 배지 ---- */
.mission-btn {
  flex: none; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 2px solid #ffe066; background: #fff9db; color: #5c3c00; font-weight: 800; font-size: 14px; white-space: nowrap;
}
.mission-btn.all { border-color: #ff922b; background: linear-gradient(90deg, #fff3bf, #ffd8a8); }
.mission-btn:hover { transform: translateY(-1px); }
.mission-dialog { width: min(620px, calc(100vw - 24px)); }
.mission-dialog h3 { margin: 16px 0 8px; }
.missions { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.missions li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fcfbff; border: 1px solid var(--line); }
.missions li.done { background: var(--good-bg); border-color: #b2f2bb; }
.m-icon { font-size: 22px; }
.m-body { display: grid; gap: 4px; }
.m-count { font-weight: 800; color: var(--brand); }
.streak-line { margin: 6px 0; font-size: calc(18px * var(--ts)); }
.streak-line b { color: #e8590c; font-size: 1.3em; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; border: 1px dashed var(--line); text-align: center; opacity: .55; }
.badge.on { opacity: 1; border: 2px solid #ffd43b; background: #fff9db; }
.b-icon { font-size: 28px; }
.badge small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.pmiss { position: absolute; top: 8px; right: 10px; font-size: 18px; }
.review-chips { justify-content: center; margin-top: 12px; }
.back .pex { font-size: calc(13px * var(--ts)); padding: 5px 8px; }
.back .pidea { font-size: calc(14.5px * var(--ts)); }
.palias { font-size: calc(12px * var(--ts)); opacity: .85; }   /* 판넬 이름과 다른 교과서 이름 */

/* ---- 2. 모순 찾기 ---- */
.case-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.case-chip {
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: #fff; font-weight: 700;
}
.case-chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.case-chip .tick { color: var(--good); }
.case-stage { padding: 18px; border-radius: 16px; background: #fcfbff; border: 1px dashed #d0bfff; }
.case-big { margin: 0 0 8px; font-size: calc(56px * var(--ts)); line-height: 1; text-align: center; }
.cstep {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; margin: 8px 0; border-radius: 12px; background: #fff; border: 1px solid var(--line);
}
.cstep.fresh { animation: rise .35s ease-out; }
.cstep p { margin: 0; }
.cstep .tag { margin-top: 3px; }
.better .tag, .tag.better { background: #d3f9d8; color: #2b8a3e; }
.worse .tag, .tag.worse { background: #ffe3e3; color: #c92a2a; }
.contra { border: 2px solid var(--hot); background: #fff9db; font-weight: 800; }
.contra .tag { background: var(--hot); color: #5c3c00; }
.ask { margin: 16px 0 8px; font-weight: 700; }

.sep-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sep-btn {
  --c: var(--brand);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 8px; border-radius: 12px; cursor: pointer;
  border: 2px solid color-mix(in srgb, var(--c) 35%, #fff);
  background: color-mix(in srgb, var(--c) 7%, #fff);
  color: var(--c); font-weight: 800; text-align: center;
}
.sep-btn small { color: var(--muted); font-weight: 600; font-size: calc(12.5px * var(--ts)); line-height: 1.35; }
.sep-btn.on { background: var(--c); color: #fff; border-color: var(--c); }
.sep-btn.on small { color: rgba(255, 255, 255, .9); }
.sep-btn.right { background: var(--good); border-color: var(--good); color: #fff; }
.sep-btn.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.sep-btn:disabled { cursor: default; }
.sep-btn:disabled:not(.right):not(.wrong) { opacity: .5; }

/* ---- 3. 나누어 풀기 ---- */
.sep-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sep-card {
  --c: var(--brand);
  padding: 16px 18px; border-radius: 14px;
  border: 2px solid color-mix(in srgb, var(--c) 30%, #fff);
  border-top-width: 6px; border-top-color: var(--c);
  background: color-mix(in srgb, var(--c) 4%, #fff);
}
.sep-card h3 { margin: 0 0 6px; color: var(--c); }
.sep-card p { margin: 4px 0; }
.sep-q { font-weight: 800; }
.sep-ex { padding: 8px 10px; border-radius: 10px; background: #fff; }
.sep-more { color: var(--muted); font-size: .9em; }

/* ---- 4. 발명 원리 카드 ---- */
.card-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.card-tools .text-input { flex: 1 1 260px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.seg button { padding: 10px 14px; border: 0; background: none; cursor: pointer; font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.count { margin: 0; font-weight: 700; color: var(--muted); }
.count b { color: var(--brand); font-size: 1.2em; }
.empty { text-align: center; padding: 20px; }

.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; gap: 6px; perspective: 900px; }
.pcard-flip {
  position: relative; height: calc(210px * var(--ts)); padding: 0;
  border: 0; background: none; cursor: pointer;
  transform-style: preserve-3d; transition: transform .5s;
}
.pcard.flipped .pcard-flip { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; border-radius: 16px; padding: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  text-align: center; border: 2px solid var(--line);
}
.front { background: linear-gradient(160deg, #fff 0%, #f8f5ff 100%); }
.back { background: var(--brand); color: #fff; border-color: var(--brand); transform: rotateY(180deg); justify-content: space-evenly; }
.pcard.known .front { border-color: #8ce99a; background: linear-gradient(160deg, #fff 0%, #ebfbee 100%); }
.pno {
  position: absolute; top: 10px; left: 12px;
  font-family: 'GameKR', system-ui, sans-serif; font-size: calc(22px * var(--ts)); color: #b197fc; line-height: 1;
}
.pcard.known .pno { color: #51cf66; }
.picon { font-size: calc(46px * var(--ts)); line-height: 1.1; }
.pname { font-size: calc(21px * var(--ts)); font-weight: 900; }
.peasy { color: var(--muted); font-weight: 700; font-size: calc(15px * var(--ts)); }
.pidea { font-weight: 700; font-size: calc(15.5px * var(--ts)); line-height: 1.5; }
.pex { font-size: calc(14.5px * var(--ts)); line-height: 1.5; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .16); }
.pknow {
  padding: 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; font-weight: 800; color: var(--muted);
}
.pknow[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: #fff; }

/* ---- 5. 퀴즈 ---- */
.quiz-start { text-align: center; padding: 10px 0; }
.quiz-start p { margin: 6px 0; }
.quiz-big { font-size: calc(64px * var(--ts)); line-height: 1.1; }
.quiz-score { font-family: 'GameKR', system-ui, sans-serif; font-size: calc(64px * var(--ts)); line-height: 1.1; color: var(--brand); }
.quiz-score b { color: var(--brand); font-weight: 400; }
.new-best { font-weight: 800; color: #e67700; }
.quiz-start .chips { justify-content: center; }
.quiz-prog { margin: 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 800; }
.quiz-dots { display: flex; gap: 5px; }
.quiz-dots i { width: 22px; height: 6px; border-radius: 99px; background: #e5dbff; }
.quiz-dots i.done { background: #b197fc; }
.quiz-dots i.on { background: var(--brand); }
.quiz-q {
  margin: 14px 0; padding: 20px; border-radius: 16px;
  background: #fff9db; border: 2px solid #ffe066;
  font-size: calc(22px * var(--ts)); font-weight: 800; line-height: 1.5;
}
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice, .pick {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 14px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--line); background: #fff;
}
.choice b, .pick b { display: block; font-size: calc(19px * var(--ts)); }
.choice small, .pick small { display: block; color: var(--muted); font-weight: 600; font-size: calc(14px * var(--ts)); line-height: 1.4; }
.ci { font-size: calc(32px * var(--ts)); line-height: 1; flex: none; }
.choice:hover:not(:disabled), .pick:hover { border-color: #9775fa; }
.choice:disabled { cursor: default; opacity: .55; }
.choice.right { opacity: 1; border-color: var(--good); background: var(--good-bg); }
.choice.wrong { opacity: 1; border-color: var(--bad); background: var(--bad-bg); }

/* ---- 5. 퀴즈 고르기 · 여러 원리 찾기 · 원리 뽑기 ---- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 18px; }
.modes button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 8px; border-radius: 14px; cursor: pointer; text-align: center;
  border: 2px solid var(--line); background: #fff;
}
.modes button > span { font-size: calc(28px * var(--ts)); line-height: 1.1; }
.modes button b { font-size: calc(17px * var(--ts)); }
.modes button small { color: var(--muted); font-weight: 600; font-size: calc(13px * var(--ts)); line-height: 1.35; }
.modes button:hover { border-color: #b197fc; }
.modes button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 4px 14px rgba(95, 61, 196, .15); }
.modes button[aria-pressed="true"] b { color: var(--brand); }

.case-chip.hot { border-color: var(--hot); background: #fff9db; }
.hint-count { display: inline-block; padding: 0 10px; border-radius: 999px; background: var(--hot); color: #5c3c00; font-weight: 900; }
.hunt-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.hunt-opts .pick.on { border-color: var(--brand); background: var(--brand-soft); }
.hunt-opts .pick.on b::before { content: '✓ '; color: var(--brand); }

.meters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 14px; }
.meter { padding: 12px 14px; border-radius: 14px; background: #fcfbff; border: 1px solid #e5dbff; }
.meter-top { margin: 0 0 6px; font-weight: 700; }
.meter-top b { color: var(--brand); font-size: 1.35em; }
.meter-bar { display: block; height: 10px; border-radius: 99px; background: #e5dbff; overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9775fa, #5f3dc4); transition: width .5s; }
.ways { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.way { position: relative; padding: 12px 14px; border-radius: 14px; border: 2px solid; animation: rise .35s ease-out; }
.way p { margin: 2px 0; }
.way.hit { border-color: #b2f2bb; background: var(--good-bg); }
.way.miss { border-color: #ffe066; background: #fff9db; }
.way-mark { font-size: calc(13px * var(--ts)); font-weight: 800; color: var(--muted); }
.way-head b { font-size: calc(18px * var(--ts)); }

.spin-empty { text-align: center; padding: 26px 0; border-radius: 16px; border: 2px dashed #d0bfff; background: #fcfbff; }
.spin-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  max-width: 360px; margin: 0 auto 14px; padding: 22px 18px 18px; border-radius: 18px; text-align: center;
  color: #fff; background: radial-gradient(120% 120% at 20% 0%, #845ef7 0%, #5f3dc4 55%, #2b1a6b 100%);
  box-shadow: 0 10px 30px rgba(43, 26, 107, .3); animation: deal .45s ease-out;
}
.spin-card p { margin: 0; }
.spin-card .peasy { color: #d0bfff; }
.spin-no { position: absolute; top: 10px; left: 14px; font-family: 'GameKR', system-ui, sans-serif; font-size: calc(26px * var(--ts)); color: var(--hot); line-height: 1; }
.spin-idea { font-weight: 700; font-size: calc(15.5px * var(--ts)); line-height: 1.5; }
@keyframes deal { from { opacity: 0; transform: rotateY(90deg) scale(.9); } to { opacity: 1; transform: none; } }
.spin-write { display: block; font-weight: 800; }
.spin-write textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: #fff; font: inherit; color: inherit; resize: vertical;
}
.spin-write textarea:focus { outline: none; border-color: #9775fa; }
.spin-hint { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: #fff9db; border: 1px solid #ffe066; }
.meters.one { grid-template-columns: 1fr; max-width: 420px; }
.meter-top small { color: var(--muted); font-weight: 600; }
.way-flex { display: inline-block; margin-top: 6px; color: var(--brand); font-weight: 800; text-decoration: none; }
.way-flex:hover { text-decoration: underline; }

.flex-model { margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid #e5dbff; }
.flex-root { margin: 0 0 8px; font-weight: 800; }
.flex-root .plus { color: var(--brand); margin: 0 4px; }
.flex-model ol { margin: 0; padding-left: 1.5em; }
.flex-model li { padding: 3px 0; }
.flex-model li::marker { color: var(--brand); font-weight: 900; }

.spin-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spin-choose { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: calc(14px * var(--ts)); }
.spin-choose select { max-width: 90vw; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
.spin-ex { margin-top: 4px !important; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .14); font-size: calc(14px * var(--ts)); }
.flex-goal { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 12px; font-weight: 700; color: var(--muted); }
.flex-goal b { color: var(--brand); }
.goal-dots { display: inline-flex; gap: 5px; }
.goal-dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px dashed #d0bfff; }
.goal-dots i.on { border: 0; background: linear-gradient(135deg, #9775fa, #5f3dc4); box-shadow: 0 2px 6px rgba(95, 61, 196, .35); }
.goal-dots i:nth-child(n+3).on { background: linear-gradient(135deg, #ffd43b, #f08c00); }
.spin-hint p { margin: 0; font-weight: 800; }
.spin-hint ul { margin: 4px 0 0; padding-left: 1.3em; }

.idea-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.idea-group { padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; }
.idea-group.done { border-color: #ffe066; background: #fff9db; }
.idea-head { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.idea-head .linkish { text-decoration: none; padding: 0; }
.idea-head .tag { background: #e5dbff; color: var(--brand); }
.idea-group ol { margin: 0; padding-left: 1.5em; }
.idea-group li { padding: 3px 0; }
.idea-group li .linkish { font-size: calc(13px * var(--ts)); }

/* ---- 6. 모의 테스트: 원리 빙고판 ---- */
.test-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.test-topic { margin: 0; font-size: calc(22px * var(--ts)); font-weight: 700; }
.test-topic b { color: var(--brand); }
.timer {
  font-family: 'GameKR', system-ui, sans-serif; font-size: calc(26px * var(--ts)); line-height: 1;
  padding: 8px 16px; border-radius: 999px; background: var(--brand); color: #fff; font-variant-numeric: tabular-nums;
}
.timer.hurry { background: var(--bad); animation: pulse 1s ease-in-out infinite; }
.timer.end { background: var(--muted); }
@keyframes pulse { 50% { transform: scale(1.06); } }
.test-hint { margin: 8px 0 0; color: #3f4556; font-size: calc(15px * var(--ts)); }
.test-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.test-stats span { padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); border: 1px solid #e5dbff; font-weight: 700; font-size: calc(14.5px * var(--ts)); }
.test-stats b { color: var(--brand); font-size: 1.15em; }
.test-result { margin: 4px 0 14px; padding: 16px; border-radius: 16px; background: #fffdf3; border: 2px solid #ffe066; }
.test-result .verdict { margin: 4px 0; }

.bingo {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(118px, auto); gap: 6px;
  padding: 8px; border-radius: 16px; background: #efe9ff;
}
.cell {
  grid-row: var(--r); grid-column: var(--c);
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0;
  padding: 6px 6px 8px; border-radius: 10px; cursor: pointer; text-align: left;
  border: 1px solid #ddd3fb; background: #fff; transition: transform .12s, box-shadow .12s;
}
.cell:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(95, 61, 196, .15); }
.cell-top { display: flex; align-items: center; justify-content: space-between; }
.cell-no { font-family: 'GameKR', system-ui, sans-serif; font-size: calc(16px * var(--ts)); color: #b197fc; line-height: 1; }
.cell-icon { font-size: calc(18px * var(--ts)); line-height: 1; }
.cell-name { font-weight: 800; font-size: calc(13px * var(--ts)); line-height: 1.25; }
.cell.has { background: #fffbe6; border-color: #ffe066; }
.cell.full { background: #ebfbee; border-color: #69db7c; }
.cell-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; display: none; place-items: center; background: var(--brand); color: #fff; font-size: 12px; font-weight: 900; }
.stack { display: flex; flex-direction: column; gap: 3px; }
.more { font-size: 12px; font-weight: 800; color: var(--muted); }
.bingo.done .cell { cursor: default; }
.bingo.done .cell:hover { transform: none; box-shadow: none; }

.postit {
  display: block; padding: 3px 5px; border-radius: 2px 2px 6px 2px;
  font-size: calc(11.5px * var(--ts)); font-weight: 600; line-height: 1.3; color: #3b3b3b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.postit:nth-child(2n) { transform: rotate(1.2deg); }
.postit:nth-child(2n+1) { transform: rotate(-1deg); }
.pi-yellow { background: #fff08a; }
.pi-pink { background: #ffc9de; }
.pi-blue { background: #b9e3ff; }
.pi-green { background: #c3f2b8; }
.pi-orange { background: #ffd8a8; }
.pi-purple { background: #e0d1ff; }
.pi-gray { background: #e9ecef; color: #868e96; }

/* 대회 판넬의 참가번호·팀이름 칸(첫 줄 앞 두 칸) */
.panel-team {
  grid-row: 1; grid-column: 1 / span 2;
  display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 12px; border-radius: 10px;
  background: #f08c00; color: #fff;
}
.panel-team p { margin: 0; }
.pt-label { font-size: 12px; font-weight: 800; opacity: .85; }
.pt-name { font-family: 'GameKR', system-ui, sans-serif; font-size: calc(22px * var(--ts)); line-height: 1.15; }
.pt-topic { font-weight: 800; font-size: calc(14px * var(--ts)); }
.round-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: calc(13px * var(--ts)); }
.round-key .postit { display: inline-block; transform: none; padding: 2px 8px; }
.pd-goal .postit { display: inline-block; transform: none; padding: 1px 8px; }
.postit .rnd { display: block; margin-top: 4px; font-size: .72em; font-weight: 800; color: rgba(0, 0, 0, .5); }

.postit-dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 18px; border: 0; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(16, 24, 40, .35); color: var(--ink);
}
.postit-dialog::backdrop { background: rgba(29, 35, 48, .45); }
.pd-head { display: flex; gap: 12px; align-items: flex-start; }
.pd-head h3 { margin: 0 0 4px; font-size: calc(20px * var(--ts)); }
.pd-head h3 small { color: var(--muted); font-size: .7em; }
.pd-head p { margin: 0; font-size: calc(15px * var(--ts)); }
.pd-no { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #fff; font-family: 'GameKR', system-ui, sans-serif; font-size: 22px; }
.pd-x { margin-left: auto; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.pd-q { margin: 14px 0 8px; padding: 10px 12px; border-radius: 12px; background: #fff9db; font-weight: 700; }
.pd-notes { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.postit.big {
  position: relative; display: block; -webkit-line-clamp: unset; width: calc(50% - 4px); min-height: 70px;
  padding: 10px 26px 10px 10px; font-size: calc(15px * var(--ts));
}
.postit.big button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .12); cursor: pointer; font-size: 11px; }
.pd-goal { margin: 6px 0 8px; color: var(--muted); font-weight: 700; }
.pd-goal b { color: var(--brand); }
#pd-text { width: 100%; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); font: inherit; resize: vertical; }
#pd-text:focus { outline: none; border-color: #9775fa; }
.pd-colors { display: flex; gap: 8px; margin-top: 8px; }
.sw { width: 30px; height: 30px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.sw[aria-pressed="true"] { border-color: var(--ink); transform: scale(1.12); }

.hist-wrap { overflow-x: auto; }
.hist { width: 100%; border-collapse: collapse; font-size: calc(15px * var(--ts)); white-space: nowrap; }
.hist th, .hist td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.hist th { color: var(--muted); font-size: .9em; }
.hist td:nth-child(2) { text-align: left; }
.hist b { color: var(--brand); }
#test-custom { margin-top: -6px; max-width: 420px; }

/* ---- Step1 문제 상황 정의 워크시트 (대회 워크시트처럼 남색 바탕) ---- */
.check { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.step-banner {
  display: flex; align-items: baseline; gap: 10px; margin: 12px 0 8px; padding: 10px 16px; border-radius: 12px;
  background: #1b2a6b; color: #fff; font-size: calc(19px * var(--ts)); font-weight: 800;
}
.step-banner b { font-family: 'GameKR', system-ui, sans-serif; font-weight: 400; color: var(--hot); letter-spacing: .04em; white-space: nowrap; }
.step-banner { flex-wrap: wrap; row-gap: 2px; }
.step-banner span { font-size: .75em; color: #c5cdf7; font-weight: 700; }
.worksheet { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: #1b2a6b; }
.sheet-group { margin: 0; padding: 10px 12px 12px; border: 0; border-radius: 12px; background: #fff; display: grid; gap: 10px; }
.sheet-group legend { float: left; width: 100%; margin-bottom: 2px; padding: 0; font-weight: 900; color: #2f9e44; }
.sheet-field { display: grid; gap: 3px; }
.sf-label { font-weight: 800; color: #1b2a6b; }
.sf-label::before { content: '◆ '; color: #3b5bdb; font-size: .8em; }
.sf-q { color: var(--muted); font-size: calc(14px * var(--ts)); }
.sheet-field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line); background: #fcfcff;
  font: inherit; color: inherit; resize: vertical;
}
.sheet-field textarea:focus { outline: none; border-color: #9775fa; background: #fff; }
.hint-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.hint-chip { padding: 2px 10px; border-radius: 999px; border: 1px dashed #b197fc; background: #f8f5ff; color: var(--brand); font-size: calc(13px * var(--ts)); font-weight: 700; cursor: pointer; }
.hint-chip:hover { background: var(--brand-soft); }
/* ---- 문제 대상 고르기: 2026 예상 주제 ---- */
.topic-group { margin: 10px 0 4px; font-weight: 800; }
.topic-group small { font-weight: 600; }
.case-chip.hot { border-color: #fab005; background: #fff9db; }
.case-chip.hot.on { background: #fab005; color: #3a2600; border-color: #f08c00; }
.topic-why { margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: #fff9db; font-weight: 700; font-size: calc(14px * var(--ts)); }

/* ---- 💡 첫 구상 ---- */
.idea0-box { margin: 12px 0; padding: 10px 12px; border-radius: 12px; border: 2px dashed #fab005; background: #fff9db; }
.idea0-box .sheet-field { margin: 0; }
.idea0-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: #fff9db; font-weight: 800; }
.idea0-line .text-input { flex: 1 1 260px; margin: 0; }
.idea0-line small { flex-basis: 100%; font-weight: 600; }
.pd-q small { display: block; margin-top: 4px; font-weight: 600; color: var(--muted); }

/* ---- 🎤 만능 발표 틀 ---- */
.pitch-guide { margin: 10px 0 14px; padding: 12px 14px; border-radius: 14px; background: #f3f0ff; border: 2px solid #d0bfff; }
.pitch-guide summary { cursor: pointer; font-weight: 900; font-size: calc(17px * var(--ts)); }
.pitch-guide summary small { display: block; font-weight: 600; color: var(--muted); font-size: .8em; }
.pitch-time { display: flex; gap: 3px; list-style: none; margin: 10px 0; padding: 0; }
.pitch-time li { min-width: 0; padding: 6px 8px; border-radius: 8px; background: #fff; border-top: 4px solid #7048e8; font-size: calc(13px * var(--ts)); }
.pitch-time li:nth-child(4) { border-top-color: #f59f00; background: #fff9db; }
.pitch-time b { display: block; }
.pitch-time small { color: var(--muted); }
.pitch-tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.pitch-tips > div { padding: 8px 10px; border-radius: 10px; background: #fff; }
.pitch-tips p { margin: 0; font-size: calc(14px * var(--ts)); }
.pitch-tips p + p { margin-top: 2px; color: #3f4556; }
.pitch-qa-h { margin: 10px 0 4px; font-weight: 800; }
.pitch-qa { margin: 0; padding-left: 1.2em; font-size: calc(14px * var(--ts)); }
.pitch-lines { margin: 2px 0 6px; padding-left: 1.2em; font-size: calc(13.5px * var(--ts)); color: #3f4556; }
.blank-chip { padding: 0 5px; border-radius: 6px; background: #e5dbff; color: #5f3dc4; font-weight: 700; }
@media (max-width: 650px) {
  .pitch-time { flex-direction: column; }
  .pitch-time li { flex: none !important; }
}

/* ---- 📘 예시 답안 ---- */
.ex-badge { font-size: .85em; }
.topic-why .btn { margin-left: 6px; vertical-align: middle; }
.ex-dialog { width: min(1000px, calc(100vw - 24px)); }
.ex-top { display: flex; align-items: center; gap: 8px; }
.ex-top h2 { margin: 0; flex: 1; font-size: calc(20px * var(--ts)); }
.ex-top .pd-x { margin-left: 0; }
.ex-note { margin: 6px 0 10px; }
.ex-step { margin: 12px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.ex-h { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: calc(17px * var(--ts)); }
.ex-h b { padding: 1px 10px; border-radius: 8px; background: #1b2a6b; color: #ffd43b; }
.ex-h small { color: var(--muted); font-weight: 700; font-size: .78em; }
.ex-dl { display: grid; grid-template-columns: 120px 1fr; gap: 0; margin: 0; }
.ex-dl dt, .ex-dl dd { margin: 0; padding: 6px 8px; border-top: 1px solid var(--line); font-size: calc(15px * var(--ts)); }
.ex-dl dt { font-weight: 800; color: #1b2a6b; background: #f8f9ff; }
.ex-tip { margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: #fff9db; font-size: calc(14px * var(--ts)); }
.ex-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.ex-cell { padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: #fcfbff; display: flex; flex-direction: column; gap: 4px; }
.ex-cn { margin: 0; font-weight: 800; font-size: calc(13px * var(--ts)); color: #1b2a6b; }
.postit.ex-pi { display: block; -webkit-line-clamp: unset; margin: 0; font-size: calc(13px * var(--ts)); transform: none; }
.ex-sub { margin: 10px 0 4px; font-weight: 800; }
.ex-groups { display: grid; gap: 6px; }
.ex-group { padding: 6px 10px; border-radius: 12px; border: 2px solid var(--gc); }
.ex-group p { margin: 0; }
.ex-gl { font-size: calc(13.5px * var(--ts)); color: #3f4556; margin-top: 2px !important; }
.ex-ol { margin: 0; padding-left: 1.3em; }
.ex-idea0 { margin: 8px 0 0; padding: 6px 10px; border-radius: 10px; background: #fff9db; border: 1px dashed #fab005; }
.ex-idea0 small { color: var(--muted); }
.ex-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: #f3f0ff; font-weight: 700; }
.ex-part { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: #f8f9ff; }
.ex-part.key { background: #fff3bf; }
.ex-part p { margin: 0; }
.ex-pl { font-weight: 800; color: #1b2a6b; font-size: calc(13px * var(--ts)); }
.ex-qa dt { font-weight: 800; margin-top: 6px; }
.ex-qa dd { margin: 2px 0 0 1em; }
@media (max-width: 650px) {
  .ex-dl { grid-template-columns: 1fr; }
  .ex-dl dt { border-top: 0; padding-bottom: 0; background: none; }
}

/* ---- 대회 당일 안내 ---- */
.contest { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: #fff9db; border: 2px solid #ffd43b; }
.contest summary { cursor: pointer; font-weight: 900; font-size: calc(17px * var(--ts)); }
.contest h4 { margin: 14px 0 6px; font-size: calc(16px * var(--ts)); }
.contest p, .contest ul { margin: 4px 0; }
.contest ul { padding-left: 1.2em; }
.contest-where { line-height: 1.8; }
.dday { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 999px; background: #e03131; color: #fff; font-size: .85em; }
.contest table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; font-size: calc(14px * var(--ts)); }
.contest td { padding: 6px 10px; border-bottom: 1px solid #f1e6b8; vertical-align: top; }
.contest-time td:first-child { white-space: nowrap; font-weight: 800; color: #5c3c00; width: 1%; }
.contest-time small { color: var(--muted); }
.contest-time .cs-step td:first-child { box-shadow: inset 4px 0 0 #fab005; }
.contest-pen td:last-child { white-space: nowrap; text-align: right; color: #c92a2a; width: 1%; }
.contest small { font-weight: 600; }

.mat-box { margin: 8px 0 12px; padding: 10px 12px; border-radius: 12px; background: #fcfbff; border: 1px solid var(--line); }
.mat-box summary { cursor: pointer; font-weight: 800; }
.mat-box .warn { margin: 8px 0; font-size: calc(14px * var(--ts)); }
.mat-box .sf-q { display: block; margin: 8px 0 4px; }
.sheet-count { margin: 8px 0 0; font-weight: 700; }
.sheet-ex, .sheet-sum { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: #fff9db; border: 1px solid #ffe066; }
.sheet-sum { background: #f8f9ff; border-color: #dbe4ff; }
.sheet-ex summary, .sheet-sum summary { cursor: pointer; font-weight: 800; }
.sheet-ex dl, .sheet-sum dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; }
.sheet-ex dt, .sheet-sum dt { font-weight: 800; color: #1b2a6b; }
.sheet-ex dd, .sheet-sum dd { margin: 0; }
.grade { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-family: 'GameKR', system-ui, sans-serif; font-size: 22px; vertical-align: middle; }
.g-A { background: #2f9e44; } .g-B { background: #1c7ed6; } .g-C { background: #f08c00; } .g-D { background: #868e96; }
.total-line { margin: 4px 0; font-size: calc(18px * var(--ts)); font-weight: 800; }
.total-line b { color: var(--brand); font-size: 1.3em; }

/* ---- Step3 아이디어 평가 (후보 번호 색은 대회 상호비교법 양식과 같다) ---- */
.s3-sec { margin: 14px 0; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.s3-sec h3 { margin: 0 0 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.s3-sec h3 small { font-weight: 700; font-size: .7em; }
.s3-sheet { border: 3px solid #1b2a6b; }
.s3-wait { text-align: center; padding: 10px; border: 2px dashed var(--line); border-radius: 12px; }
.s3-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 360px; overflow: auto; padding: 2px; }
.s3-cell { padding: 8px; border-radius: 10px; background: #fcfbff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.s3-cn { margin: 0; font-weight: 800; font-size: calc(13px * var(--ts)); color: #1b2a6b; }
.s3-pick { text-align: left; font: inherit; font-size: calc(14px * var(--ts)); border: 2px solid transparent; cursor: pointer; width: 100%; }
.s3-pick[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px #fff inset; font-weight: 800; }
.s3-pick:disabled { opacity: .45; cursor: not-allowed; }
.s3-own { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.s3-own .text-input { flex: 2 1 240px; margin: 0; }
.s3-own select { flex: 1 1 160px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; color: var(--ink); min-width: 0; }
.s3-cands, .s3-rows, .s3-result { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.s3-cands li, .s3-rows li, .s3-result li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #f8f9ff; border: 1px solid #dbe4ff; }
.s3-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.s3-text small, .s3-result small { display: inline-block; }
.cno { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font-weight: 900; font-size: 14px; color: #1d2330; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.c1 { background: #fcc2d7; } .c2 { background: #ff922b; } .c3 { background: #ffe066; } .c4 { background: #8ce99a; }
.c5 { background: #99e9f2; } .c6 { background: #4dabf7; } .c7 { background: #f783ac; }
.s3-methods { margin: 0; }
.abc-seg button { min-width: 44px; font-weight: 900; }
.abc-seg .abc-A[aria-pressed="true"] { background: #1c7ed6; color: #fff; }
.abc-seg .abc-B[aria-pressed="true"] { background: #2f9e44; color: #fff; }
.abc-seg .abc-C[aria-pressed="true"] { background: #f08c00; color: #fff; }
.abc-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 12px; border-radius: 12px; overflow: hidden; }
.abc-col { min-height: 90px; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.abc-col p { margin: 0; display: flex; gap: 6px; align-items: center; font-size: calc(14px * var(--ts)); overflow-wrap: anywhere; }
.abc-col .abc-h { margin: 0 -8px 4px; padding: 6px; justify-content: center; color: #fff; font-weight: 900; }
.abc-col.abc-A { background: #e7f5ff; } .abc-A .abc-h { background: #1c7ed6; }
.abc-col.abc-B { background: #ebfbee; } .abc-B .abc-h { background: #2f9e44; }
.abc-col.abc-C { background: #fff4e6; } .abc-C .abc-h { background: #f08c00; }
.naf-key { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.naf-key span { padding: 4px 10px; border-radius: 8px; font-size: calc(14px * var(--ts)); }
.naf-key small { color: var(--muted); }
.naf-N { background: #d0ebff; } .naf-A { background: #d3f9d8; } .naf-F { background: #ffdeeb; }
.hist.naf td:first-child { text-align: left; min-width: 180px; white-space: normal; }
.hist.naf td:nth-child(2) { text-align: center; }
.hist.naf select { padding: 6px 4px; border-radius: 8px; border: 2px solid var(--line); font: inherit; background: #fff; }
.vs-list { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px; }
.vs-list li { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 6px; padding: 6px; border-radius: 12px; background: #fff9db; border: 1px solid #ffe066; }
.vs-list li.decided { background: #f8f9fa; border-color: var(--line); }
.vs { align-self: center; font-weight: 900; color: var(--muted); }
.vs-side { display: flex; align-items: center; gap: 6px; text-align: left; padding: 6px 8px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; font-size: calc(14px * var(--ts)); cursor: pointer; overflow-wrap: anywhere; min-width: 0; }
.vs-side[aria-pressed="true"] { border-color: #2f9e44; background: #ebfbee; font-weight: 800; }
.vs-side[aria-pressed="true"]::after { content: '👍'; margin-left: auto; }
.pair-matrix { border-collapse: collapse; margin: 4px 0; }
.pair-matrix th, .pair-matrix td { width: 40px; height: 34px; border: 1px solid var(--line); text-align: center; font-weight: 800; }
.pair-matrix thead th:first-child { width: auto; padding: 0 8px; background: #1b2a6b; color: #fff; }
.pair-matrix td.off { background: #f1f3f5; }
.s3-rank { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; font-weight: 800; }
.s3-rank span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: #f1f3f5; }
.s3-rank span.first { background: #fff3bf; box-shadow: 0 0 0 2px #fcc419; }
.s3-rank small { color: var(--muted); font-weight: 700; }
.s3-best-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; margin-bottom: 10px; }
.s3-best-pick .pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; text-align: left; }
.s3-best-pick .pick.on { border-color: var(--brand); background: var(--brand-soft); font-weight: 800; }
.tag-top { font-size: calc(12px * var(--ts)); padding: 1px 6px; border-radius: 999px; background: #fff3bf; color: #8a5a00; font-weight: 800; }
.s3-result li.best { background: #fff9db; border-color: #fcc419; font-weight: 800; }
.s3-score { margin-left: auto; color: var(--muted); font-weight: 700; white-space: nowrap; }

/* ---- Step3 유목화(묶기) — 대회에서 판넬 포스트잇을 펜으로 동그라미 치듯, 묶음마다 테두리 색이 있다 ---- */
.gc1 { --gc: #e03131; } .gc2 { --gc: #1971c2; } .gc3 { --gc: #2f9e44; } .gc4 { --gc: #f08c00; }
.gc5 { --gc: #9c36b5; } .gc6 { --gc: #0c8599; } .gc7 { --gc: #c2255c; }
.s3-groups { display: grid; gap: 6px; margin: 4px 0 10px; }
.s3-group { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 12px; border: 2px dashed var(--gc); background: #fff; }
.s3-group.on { border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc) 22%, transparent); }
.s3-group .g-name { flex: 1 1 160px; margin: 0; min-width: 0; padding: 6px 10px; }
.s3-group .g-count { flex: none; font-weight: 800; color: var(--muted); font-size: calc(13px * var(--ts)); }
.s3-group .pd-del { position: static; flex: none; }
.g-sel, .gmark { flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--gc); color: #fff; font-weight: 900; }
.g-sel { width: 30px; height: 30px; border: 0; cursor: pointer; font-size: 15px; }
.s3-group:not(.on) .g-sel { background: #fff; color: var(--gc); box-shadow: 0 0 0 2px var(--gc) inset; }
.gmark { width: 20px; height: 20px; font-size: 12px; margin-right: 4px; vertical-align: 1px; }
.s3-pick.in-g { border-color: var(--gc); }
.s3-pick.in-g[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--gc); }
.s3-mode { flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.s3-mode > span { padding: 0 10px; font-size: calc(13px * var(--ts)); font-weight: 700; }
.tag-group { font-size: calc(12px * var(--ts)); padding: 1px 6px; border-radius: 999px; background: #e7f5ff; color: #1864ab; font-weight: 800; white-space: nowrap; }
.s3-gsum { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.s3-gsum span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 2px solid var(--gc); font-weight: 700; font-size: calc(14px * var(--ts)); }
.s3-final { font-size: calc(18px * var(--ts)); }
.s3-cta { border: 2px solid #1b2a6b; background: #f8f9ff; }

/* ---- Step4 아이디어 구체화 ---- */
.s4-best { margin: 8px 0; padding: 10px 14px; border-radius: 12px; background: #fff9db; border: 1px solid #ffe066; }
.sheet-ex ul { margin: 8px 0 0; padding-left: 20px; }
.s4-sheet { display: grid; gap: 12px; }
.s4-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
.s4-draw .sf-label, .s4-draw .sf-q { display: block; margin: 0 0 4px; }
.s4-side { display: grid; gap: 12px; }
.s4-prins { margin: 4px 0 6px; }
.hint-chip.on { background: var(--brand); color: #fff; border-style: solid; }
#s4-add-prin { max-width: 100%; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
.pad-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.pad-color { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.pad-color[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--brand); }
.pad-gap { width: 6px; }
.pad-size { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 2px solid var(--line); background: #fff; cursor: pointer; }
.pad-size i { display: block; width: var(--z); height: var(--z); border-radius: 50%; background: var(--ink); }
.pad-size[aria-pressed="true"], .pad-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.pad-btn { padding: 5px 10px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; font-size: calc(13px * var(--ts)); font-weight: 700; cursor: pointer; }
.file-btn { cursor: pointer; }
.draw-pad { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; border: 3px solid #1b2a6b; background: #fff; touch-action: none; cursor: crosshair; }
.proto-box { display: grid; gap: 8px; margin-top: 10px; }
.proto-img { max-width: 100%; max-height: 320px; border-radius: 12px; border: 1px solid var(--line); justify-self: start; }
.roles { display: grid; gap: 6px; }
.role-row { display: grid; grid-template-columns: 1fr 2fr; gap: 6px; }
.role-row .text-input { margin: 0; }
.s4-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.s4-thumbs figure { margin: 0; text-align: center; }
.s4-thumbs img { display: block; max-width: 260px; max-height: 200px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.s4-thumbs figcaption { font-size: 13px; color: var(--muted); font-weight: 700; }

/* ---- Step5 아이디어 발표 ---- */
.script-part.key textarea { border-color: #ffd43b; background: #fffdf0; }
.script-part .sf-label small { font-weight: 600; }
.live-wrap { position: sticky; bottom: 8px; z-index: 5; margin: 10px 0; padding: 12px; border-radius: 16px; background: #1b2a6b; color: #fff; box-shadow: var(--shadow); }
.live-clock { margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 14px; flex-wrap: wrap; }
.live-clock b { font-family: 'GameKR', system-ui, sans-serif; font-weight: 400; font-size: calc(64px * var(--ts)); line-height: 1; letter-spacing: .04em; }
.live-clock small { font-size: calc(16px * var(--ts)); font-weight: 800; color: #c5cdf7; }
.live-clock.soon b, .live-clock.soon small { color: #ffd43b; }
.live-clock.over b, .live-clock.over small { color: #ff8787; }
.meter-bar.live { margin: 8px 0 10px; background: rgba(255, 255, 255, .2); }
.live-wrap .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.prompter { display: grid; gap: 14px; margin: 12px 0; font-size: calc(22px * var(--ts)); line-height: 1.6; }
.prompter p { margin: 0; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.prompter small { display: block; font-size: 14px; font-weight: 800; color: var(--brand); }
.talks { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding-left: 20px; }
.talks li { padding: 2px 10px; border-radius: 999px; background: var(--good-bg); color: var(--good); font-weight: 800; margin-right: 14px; }
.talks li.over { background: var(--bad-bg); color: var(--bad); }
.qa-list { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.qa-q { margin: 0 0 4px; font-weight: 800; }
.qa-list textarea { width: 100%; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--line); font: inherit; resize: vertical; }
.check-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checks .check { margin: 0; font-weight: 600; align-items: flex-start; }
.checks input:disabled { opacity: 1; }
.center { text-align: center; }
.bad { color: var(--bad); }

/* ---- 100점 성적표 ---- */
.scorecard { margin: 12px 0; padding: 16px; border-radius: 16px; border: 3px solid #fcc419; background: linear-gradient(180deg, #fff9db, #fff); }
.scorecard h3 { margin: 0; }
.sc-total { margin: 4px 0; display: flex; align-items: baseline; gap: 8px; }
.sc-total b { font-family: 'GameKR', system-ui, sans-serif; font-weight: 400; font-size: calc(56px * var(--ts)); line-height: 1; color: var(--brand); }
.sc-total span { font-weight: 800; color: var(--muted); }
.sc-table td:first-child { text-align: left; white-space: normal; }
.sc-step { display: inline-block; min-width: 4.6em; margin-right: 6px; color: var(--muted); font-weight: 700; }
.sc-table td.sc-pt { white-space: nowrap; width: 1%; }
.sc-pt small { color: var(--muted); font-weight: 700; margin-left: 1px; }
.grade.sm { width: 24px; height: 24px; font-size: 15px; border-radius: 7px; }

/* ---- 솔로 · 멀티 ---- */
.mode-seg { margin-bottom: 14px; }
.mode-seg button { padding: 10px 18px; }
.multi-cols { display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; margin-top: 14px; }
.multi-col { min-width: 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fcfbff; }
.multi-col h3 { margin-top: 0; }
.multi-col .seg { flex-wrap: wrap; }
.me-name { max-width: 260px; }
.code-input::placeholder { letter-spacing: 0; font-size: 16px; font-weight: 600; }
.code-input { max-width: 220px; font-size: calc(26px * var(--ts)); letter-spacing: .3em; text-align: center; font-weight: 800; }
.lobby { text-align: center; padding: 10px 0; }
.lobby p { margin: 4px 0; }
.room-code { font-family: 'GameKR', system-ui, sans-serif; font-size: calc(72px * var(--ts)); line-height: 1.05; letter-spacing: .12em; color: var(--brand); }
.players { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0; }
.room-bar .players { display: inline-flex; justify-content: flex-start; margin: 0 0 0 6px; vertical-align: middle; }
.room-bar { margin: 8px 0 0; color: var(--muted); }
.player { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: calc(14px * var(--ts)); color: var(--ink); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.live-score { margin: 0 0 10px; }
.live-score summary { cursor: pointer; font-weight: 800; color: var(--brand); }
.hist.score tr.me td { background: var(--brand-soft); font-weight: 800; }
.hist.log tr.link { cursor: pointer; }
.hist.log tr.link:hover td, .hist.log tr.link:focus-visible td { background: var(--brand-soft); }
.hist.log td { white-space: normal; vertical-align: top; }
.hist.log .players { display: inline-flex; justify-content: flex-start; margin: 0; gap: 4px; }
.hist.log .player { padding: 1px 8px; font-size: calc(13px * var(--ts)); }

.cell.owned { border: 2px solid var(--oc); }
.owner { font-size: 11px; font-weight: 800; color: var(--oc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-owner { margin: 0 0 6px; font-weight: 700; color: var(--muted); }

.postit .vm { font-style: normal; margin-right: 2px; }
.postit.v-bad { opacity: .6; text-decoration: line-through; text-decoration-color: rgba(201, 42, 42, .5); }
.postit.big.v-bad { opacity: .85; text-decoration: none; outline: 2px solid #ffa8a8; }
.postit.big.v-ok { outline: 2px solid #69db7c; }
.postit .who, .postit .why { display: block; margin-top: 4px; font-size: .78em; font-weight: 700; color: #555; }
.postit .why { color: #333; font-weight: 600; }
.postit .learn { display: block; margin-top: 6px; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .7); color: #1b2a6b; font-size: .76em; font-weight: 600; line-height: 1.45; }
.jd-learn { margin-top: 8px !important; padding: 8px 10px; border-radius: 12px; background: #eef6ff; border: 2px solid #cfe6ff; color: #1b2a6b; }
.pd-note { position: relative; display: block; width: calc(50% - 4px); }
.pd-note .postit.big { width: 100%; }
.pd-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .12); cursor: pointer; font-size: 11px; }

.judge-box { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px dashed #b197fc; }
.judge-box h3 { margin: 0 0 6px; }
.judge-box p { margin: 4px 0; }
.judge-sum { font-size: calc(18px * var(--ts)); font-weight: 700; }
.judge-run { font-weight: 700; color: var(--brand); }
.judge-detail { margin: 4px 0; color: var(--muted); font-size: calc(13px * var(--ts)); }
.judge-detail code { display: block; margin-top: 4px; padding: 8px; border-radius: 8px; background: #f8f9fa; white-space: pre-wrap; word-break: break-all; }
.judge-run .meter-bar { margin-top: 6px; }

/* ---- 8. 발명 갤러리 ---- */
.g-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.g-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.g-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #1d2330; }
.g-media iframe { width: 100%; height: 100%; border: 0; }
.g-thumb { cursor: pointer; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-play {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 64px; height: 46px; border-radius: 14px;
  background: rgba(230, 0, 0, .92); color: #fff; font-size: 22px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.g-thumb:hover .g-play { transform: translate(-50%, -50%) scale(1.08); }
.g-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(135deg, #fff9db, #f3f0ff); color: var(--ink); text-decoration: none;
}
.g-link span:first-child { font-size: 44px; }
.g-link b { color: var(--brand); }
.g-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.g-body h3 { margin: 0; font-size: calc(18px * var(--ts)); }
.g-body p { margin: 0; }
.g-note { padding: 8px 10px; border-radius: 10px; background: #fff9db; }
.g-meta { color: var(--muted); font-size: calc(13px * var(--ts)); }
.g-meta a { color: var(--brand); }
.linkish-chip { cursor: pointer; }
.linkish.danger { color: var(--bad); }
.g-teacher-in { margin: 18px 0 0; text-align: right; }
.g-form { display: grid; gap: 10px; margin-top: 20px; padding: 16px; border-radius: 16px; border: 2px dashed #b197fc; background: #fcfbff; }
.g-form h3 { margin: 0; }
.g-form label { display: grid; gap: 4px; font-weight: 800; }
.g-form textarea { resize: vertical; }
.g-hint { margin: -4px 0 0; font-size: calc(13px * var(--ts)); color: var(--muted); }
.g-pick { display: flex; flex-wrap: wrap; gap: 4px; }
.g-pp { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: calc(13px * var(--ts)); font-weight: 700; cursor: pointer; }
.g-pp.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.who-chip { display: inline-block; padding: 0 7px; border-radius: 999px; background: #e7f5ff; color: #1864ab; font-size: calc(12px * var(--ts)); font-weight: 800; }
.ex-fig { margin: 8px 0 10px; }
.ex-fig img { display: block; width: 100%; max-width: 720px; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ex-fig figcaption { margin-top: 4px; font-size: calc(13px * var(--ts)); color: var(--muted); }
.draw-how { margin: 4px 0 8px; padding: 6px 10px; border-radius: 12px; background: #f8f9fa; }
.draw-how summary { cursor: pointer; font-weight: 800; }
.draw-how ol { margin: 6px 0; padding-left: 20px; line-height: 1.6; font-size: calc(14px * var(--ts)); }
.draw-how p { margin: 4px 0 0; }
.topic-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 10px; }

#print-board { display: none; }
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { padding: 0; background: #fff; }
  body > *:not(#print-board) { display: none !important; }
  #print-board { display: block; color: #000; }
  .pb-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 4mm; }
  .pb-head h1 { margin: 0; font-size: 18pt; }
  .pb-head p { margin: 0; font-size: 11pt; }
  .blank { display: inline-block; width: 70mm; border-bottom: 1px solid #000; }
  .blank.short { width: 35mm; margin-right: 6mm; }
  .pb-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 29mm; border: 1.5px solid #000; }
  .pb-team { display: flex; flex-direction: column; justify-content: space-around; border: .5px solid #666; padding: 2mm; font-size: 10pt; font-weight: 700; }
  .pb-team p { margin: 0; border-bottom: .5px solid #999; }
  .pb-cell { border: .5px solid #666; padding: 1.5mm; overflow: hidden; }
  .pb-cell p { margin: 0; }
  .ps-sheet { display: grid; gap: 4mm; }
  .ps-group { border: 1.5px solid #000; padding: 3mm; }
  .ps-g { margin: 0 0 2mm; font-weight: 800; font-size: 12pt; }
  .ps-row { display: grid; grid-template-columns: 30mm 1fr; border-top: .5px solid #999; min-height: 22mm; }
  .ps-label { margin: 0; padding: 2mm; font-weight: 700; font-size: 11pt; }
  .ps-val { margin: 0; padding: 2mm; font-size: 11pt; border-left: .5px solid #999; }
  .p3-page + .p3-page { break-before: page; }
  .pb-head h1 small { font-size: 11pt; font-weight: 600; }
  .p3-abc { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid #000; min-height: 110mm; }
  .p3-abc > div { border-right: .5px solid #666; padding: 2mm; }
  .p3-abc p { margin: 0 0 2mm; font-size: 11pt; }
  .p3-h { text-align: center; font-weight: 800; border-bottom: .5px solid #666; padding-bottom: 2mm; }
  .p3-table { width: 100%; border-collapse: collapse; }
  .p3-table th, .p3-table td { border: .5px solid #666; padding: 2mm; font-size: 11pt; height: 13mm; text-align: center; }
  .p3-table td:first-child { text-align: left; width: 45%; }
  .p3-pair td.off { background: #ddd; }
  .p3-foot { margin-top: 4mm; border: 1.5px solid #000; }
  .p3-foot p { margin: 0; padding: 2mm; min-height: 12mm; border-bottom: .5px solid #999; font-size: 11pt; }
  .p4-sheet { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: auto 1fr; border: 1.5px solid #000; height: 165mm; }
  .p4-name { grid-column: 1 / -1; padding: 3mm; border-bottom: .5px solid #666; font-size: 13pt; }
  .p4-draw { border-right: .5px solid #666; display: grid; place-items: center; overflow: hidden; }
  .p4-draw img { max-width: 100%; max-height: 140mm; }
  .p4-side { display: flex; flex-direction: column; }
  .p4-side > div { padding: 3mm; border-bottom: .5px solid #666; min-height: 30mm; font-size: 11pt; }
  .p4-side > div.grow { flex: 1; }
  .p4-side p { margin: 1mm 0 0; }
  .p5-part { border-bottom: .5px solid #999; padding: 2mm 0; font-size: 14pt; line-height: 1.6; }
  .p5-part p { margin: 0; }
  .p5-h { font-weight: 800; font-size: 11pt; color: #444; }
  .pb-name { font-size: 9pt; }
  .pb-easy { font-size: 7pt; color: #555; }
  .pb-note { font-size: 7pt; line-height: 1.25; }
  /* 한 장(A4 가로)에 46줄이 다 들어가게 줄 높이를 줄인다 */
  .pm-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 5mm; align-items: start; }
  .pm-col h2 { margin: 0 0 1.5mm; font-size: 11pt; }
  .pm-table { width: 100%; border-collapse: collapse; table-layout: fixed; line-height: 1.15; }
  .pm-table th, .pm-table td { border: .5px solid #666; padding: .6mm 1.2mm; font-size: 8.5pt; text-align: left; overflow: hidden; white-space: nowrap; }
  .pm-table th { background: #eee; }
  .pm-table th:nth-child(1) { width: 5mm; }
  .pm-table th:nth-child(3) { width: 24mm; }
  .pm-table th:nth-last-child(-n+2) { width: 17mm; }
  .pm-table td:nth-child(2) { white-space: normal; }   /* 긴 물품 이름은 줄을 바꾼다 */
  .pm-box { text-align: center !important; }
  .pm-foot { margin: 3mm 0 0; font-size: 9pt; }
  /* 발표 틀 카드 · 구체화 질문 카드 — A4 세로 한 장 */
  .pp-page, .pa-page { font-size: 9pt; }
  .pp-page *, .pa-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* 발표 틀 카드 — A4 세로 한 장 */
  .pp-page .pb-head { flex-wrap: wrap; gap: 1mm 4mm; }
  .pp-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .pp-table th, .pp-table td { border: .5px solid #666; padding: 1mm 1.8mm; vertical-align: top; font-size: 9.2pt; line-height: 1.3; }
  .pp-table th { background: #eee; }
  .pp-table th:nth-child(1) { width: 22mm; } .pp-table th:nth-child(3) { width: 15mm; }
  .pp-table td p { margin: 0 0 .5mm; }
  .pp-sec { display: block; margin-top: .8mm; font-size: 9pt; color: #444; }
  .pp-table td p.pp-point { margin: .8mm 0 0; padding-top: .6mm; border-top: .5px dashed #aaa; font-size: 8.8pt; color: #333; }
  .pp-table tr:nth-child(4) td { background: #fff9db; }
  .pp-who { font-weight: 800; }
  .pp-name { display: block; margin-top: 6mm; border-bottom: .5px solid #666; }
  /* 팁·질의응답은 두 단으로 흘려 높이를 고르게(쪽에 여유를 남겨 글꼴이 달라도 한 장) */
  .pp-flow { margin-top: 3mm; column-count: 2; column-gap: 6mm; }
  .pp-h { margin: 2.5mm 0 1.2mm; font-size: 12pt; break-after: avoid; }
  .pp-flow .pp-h:first-child { margin-top: 0; }
  .pp-flow p { margin: 0 0 1.4mm; font-size: 8.9pt; line-height: 1.38; break-inside: avoid; }
  .blank-chip { background: #e5dbff; color: #000; }
  /* 구체화 질문 카드 — A4 세로 한 장, 4칸 × 10줄. 줄 높이는 쪽을 채우고, 칸의 빈 곳은 메모 자리 */
  .pa-page { display: flex; flex-direction: column; height: 274mm; }
  .pa-page .pb-head { margin-bottom: 2mm; }
  .pa-how { margin: 0 0 1.5mm; font-size: 9.5pt; }
  .pa-idea0 { margin: 0 0 2.5mm; font-size: 11pt; }
  .pa-idea0 .blank { width: 120mm; }
  .pa-grid { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(10, 1fr); border: 1.5px solid #000; }
  .pa-cell { border: .5px solid #888; padding: 1.2mm 1.8mm; }
  .pa-cell p { margin: 0; font-size: 9pt; line-height: 1.3; }
  .pa-n { margin-bottom: .6mm !important; font-size: 9.6pt !important; }
  /* 예시 답안 — A4 세로(printOn('portrait')), 한 쪽에 한 STEP. 쪽마다 따로 짜서 쪽 사이에서 잘리지 않는다. */
  .xp-doc { color: #000; font-size: 10pt; line-height: 1.45; }
  .xp-doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .xp-page { break-after: page; display: flex; flex-direction: column; height: 274mm; padding-right: .5mm; }   /* 넘치면 쪽이 늘어난다 — 쪽 수로 검사 */
  .xp-page:last-child { break-after: auto; }
  .xp-run { display: flex; justify-content: space-between; gap: 4mm; font-size: 8.5pt; color: #555; border-bottom: .6px solid #999; padding-bottom: 1mm; margin-bottom: 3mm; }
  .xp-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2.5mm; margin: 0 0 2.5mm; font-size: 15pt; }
  .xp-h b { background: #1f2a6b; color: #fff; padding: .4mm 2.4mm; border-radius: 1.6mm; font-size: 11pt; }
  .xp-h small { font-size: 9pt; font-weight: 600; color: #444; }
  .xp-sub { margin: 3.5mm 0 1.5mm; font-size: 11.5pt; }
  .xp-sub small { font-size: 8.5pt; font-weight: 600; color: #555; margin-left: 1.5mm; }
  .xp-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .xp-table th, .xp-table td { border: .6px solid #888; padding: 1.3mm 2mm; vertical-align: top; text-align: left; }
  .xp-table thead th { background: #e9ecef; font-size: 9.5pt; }
  .xp-table tbody th { background: #f4f5f7; font-weight: 800; }
  .xp-table th small { display: block; font-size: 8pt; font-weight: 600; color: #555; }
  .xp-c { text-align: center !important; }
  .xp-kv th { width: 30mm; }
  .xp-kv th, .xp-kv td { font-size: 10.5pt; padding: 1.6mm 2.2mm; }
  .xp-cover { margin-bottom: 4mm; }
  .xp-kicker { margin: 0; font-size: 9.5pt; font-weight: 700; color: #555; }
  .xp-cover h1 { margin: .5mm 0 1mm; font-size: 24pt; }
  .xp-why { margin: 0 0 2.5mm; font-size: 9.5pt; color: #333; }
  .xp-glance { border: 1.2px solid #1f2a6b; border-radius: 2.5mm; padding: 2.5mm 3.5mm; background: #f3f0ff; }
  .xp-gt { margin: 0 0 1.2mm; font-weight: 800; font-size: 10pt; }
  .xp-gs { margin: 1.5mm 0 0; font-size: 9.5pt; }
  .xp-flow { margin: 0 0 2.5mm; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5mm; font-size: 10.5pt; }
  .xp-glance .xp-flow { margin: 0; }
  .xp-arr { color: #666; font-weight: 800; }
  .xp-doc .pchip { font-size: 9.5pt; padding: .3mm 2mm; }
  .xp-idea0 { margin: 2.5mm 0 0; padding: 2mm 3mm; border: 1px dashed #d4a017; border-radius: 2mm; background: #fffbe6; }
  .xp-idea0 small { color: #555; font-size: 8.5pt; }
  .xp-roles th, .xp-roles td { font-size: 9.6pt; padding: 1.5mm 1.6mm; }
  .xp-roles thead th:first-child { width: 15mm; }
  .xp-note { margin: 1.5mm 0 0; font-size: 8.8pt; color: #444; }
  .xp-tip { margin: 0 0 2.5mm; padding: 1.8mm 3mm; border-radius: 2mm; background: #fff9db; font-size: 9pt; }
  .xp-key { white-space: nowrap; margin-left: 2mm; }
  .xp-dot { display: inline-block; width: 3mm; height: 3mm; border-radius: .6mm; margin-right: 1.2mm; vertical-align: -.3mm; border: .4px solid rgba(0, 0, 0, .25); }
  .xp-s2 th, .xp-s2 td { font-size: 9.6pt; padding: .9mm 1.8mm; line-height: 1.35; }
  .xp-s2 thead th:nth-child(1) { width: 33mm; } .xp-s2 thead th:nth-child(3) { width: 12mm; }
  .xp-s2 tbody th { vertical-align: middle; }
  .xp-s2 tr.xp-first td, .xp-s2 tr.xp-first th { border-top: 1.1px solid #333; }
  .xp-doc .gmark { width: 4.6mm; height: 4.6mm; font-size: 8pt; margin-right: 1mm; }
  .xp-groups { display: grid; gap: 1.6mm; }
  .xp-group { border: 1.3px solid var(--gc); border-radius: 2mm; padding: 1.2mm 2.5mm; break-inside: avoid; }
  .xp-gh { margin: 0 0 .8mm; font-size: 10.5pt; }
  .xp-gh small { color: #555; margin-left: 1mm; }
  .xp-gl { margin: 0; font-size: 9.4pt; line-height: 1.42; }
  .xp-gl span + span::before { content: ' · '; color: #888; }
  .xp-gl b { color: var(--gc); }
  .xp-eval th, .xp-eval td { font-size: 10pt; padding: 1mm 2mm; }
  .xp-eval thead th:nth-child(1) { width: 17mm; } .xp-eval thead th:nth-child(2) { width: 62mm; }
  .xp-best td { background: #fff3bf; font-weight: 700; }
  .xp-why3 { margin: 0; padding: 2mm 3mm; border: 1.2px solid #f08c00; border-radius: 2mm; background: #fff9db; }
  .xp-name { font-size: 13pt; font-weight: 900; }
  .xp-pl { margin: 0 0 .8mm; }
  .xp-dl { margin: 0 0 .8mm; }
  .xp-mat { display: inline-block; margin: 0 1mm .8mm 0; padding: .2mm 2mm; border: .6px solid #888; border-radius: 3mm; font-size: 9pt; }
  .xp-ol { margin: 0; padding-left: 5mm; }
  .xp-draw { flex: 1; min-height: 30mm; margin-top: 3mm; border: 1.2px dashed #888; border-radius: 2mm; padding: 2mm 3mm; }
  .xp-draw p { margin: 0; font-size: 9pt; color: #555; }
  .xp-s5 td, .xp-s5 th { font-size: 10pt; line-height: 1.48; padding: 1.3mm 2.2mm; }
  .xp-s5 thead th:nth-child(1) { width: 29mm; }
  .xp-s5 thead th { font-size: 9.5pt; }
  .xp-who { display: inline-block; margin-top: 1mm; padding: .2mm 1.8mm; border-radius: 3mm; background: #d0ebff; font-size: 9.5pt; font-weight: 800; white-space: nowrap; }
  .xp-key-row td, .xp-key-row th { background: #fff3bf !important; }
  .xp-qa { margin: 0; }
  .xp-qa { font-size: 10pt; }
  .xp-qa dt { font-weight: 800; margin-top: 1.1mm; }
  .xp-qa dd { margin: .3mm 0 0 5mm; }
  /* 예시 답안 4쪽 — 남는 높이만큼 예시 그림 */
  .xp-fig { flex: 1; min-height: 40mm; display: flex; flex-direction: column; margin: 3mm 0 0; padding: 1.5mm; border: .8px solid #adb5bd; border-radius: 2mm; }
  .xp-fig img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
  .xp-fig figcaption { margin-top: 1mm; font-size: 8.5pt; color: #555; }
  /* ✏️ 그림 그리는 법 · 예시 그림 — A4 세로 */
  .dg-title { margin: 0 0 1.5mm; font-size: 19pt; }
  .dg-title small { display: block; margin-top: .8mm; font-size: 10pt; font-weight: 600; color: #555; }
  .dg-rubric { margin: 0 0 3mm; padding: 2mm 3mm; border-radius: 2mm; background: #fff3bf; font-size: 10pt; }
  .dg-steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2mm 4mm; }
  .dg-step { border: .8px solid #ced4da; border-radius: 2mm; padding: 1.6mm 2.4mm; break-inside: avoid; }
  .dg-step p { margin: 0; font-size: 9.4pt; line-height: 1.4; }
  .dg-sh { margin-bottom: .6mm !important; font-size: 10.5pt !important; font-weight: 800; }
  .dg-sh b { display: inline-grid; place-items: center; width: 5mm; height: 5mm; margin-right: 1mm; border-radius: 50%; background: #1f2a6b; color: #fff; font-size: 8.5pt; }
  .dg-fig { margin: 0; text-align: center; }
  .dg-fig img { width: 100%; height: auto; max-height: 128mm; object-fit: contain; border: .8px solid #dee2e6; border-radius: 2mm; }
  .dg-two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 5mm; margin-top: 1mm; }
  .dg-p { margin: 0 0 1mm; font-size: 9.8pt; line-height: 1.42; }
  .dg-ol { font-size: 9.8pt; line-height: 1.42; }
  .dg-ol li { margin-bottom: .6mm; }
  .dg-checks { margin: 0; padding: 0; list-style: none; font-size: 10pt; line-height: 1.6; }
  .dg-checks li::before { content: '☐ '; font-size: 12pt; }
  .dg-page .xp-draw { min-height: 25mm; }
}

/* ---- 7. 발명 노트 ---- */
.note-form { display: flex; flex-direction: column; gap: 14px; }
.note-form label { display: block; font-weight: 800; }
.note-form label > input, .note-form label > textarea { display: block; margin-top: 6px; }
.note-form legend { display: flex; font-weight: 800; }
.note-form legend { align-items: center; margin-bottom: 8px; padding: 0; }
.note-form small { color: var(--muted); font-weight: 600; }
.note-form fieldset { border: 0; padding: 0; margin: 0; }
.note-form textarea { resize: vertical; }
.step {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: #e5dbff; color: var(--brand); font-size: calc(14px * var(--ts)); font-weight: 900;
  margin-right: 6px;
}
.pick-principles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.pick.on { border-color: var(--brand); background: var(--brand-soft); }
.pick.on b::before { content: '✓ '; color: var(--brand); }

.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.note {
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: repeating-linear-gradient(#fff 0 31px, #f1eefc 31px 32px);
}
.note h4 { margin: 0 0 6px; font-size: calc(19px * var(--ts)); }
.note p { margin: 4px 0; }
.note-when { color: var(--muted); font-size: calc(13px * var(--ts)); font-weight: 700; }
.note-idea { font-weight: 800; color: var(--brand); }
.note .row { margin-top: 10px; }

/* ---- 아래 ---- */
.foot { text-align: center; color: var(--muted); font-size: calc(15px * var(--ts)); padding: 16px 0 10px; }
.credit {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  margin-bottom: 10px; padding: 12px 22px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.foot .credit p { margin: 0; }
.credit-club { color: var(--ink); font-weight: 700; }
.credit-club b { color: var(--brand); letter-spacing: .06em; }
.credit-by { color: var(--muted); }
.credit-by b { color: var(--brand); }
.foot p { margin: 4px 0; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: inherit; }

.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); z-index: 80;
  padding: 12px 20px; border-radius: 999px;
  background: #2b1a6b; color: #fff; font-weight: 800;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
  animation: rise .3s ease-out;
  max-width: calc(100vw - 32px); text-align: center;
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast { animation-name: toast-in; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- 좁은 화면 ---- */
@media (max-width: 760px) {
  .s3-sec { padding: 12px; }
  .s4-cols, .check-cols { grid-template-columns: 1fr; }
  .live-clock b { font-size: calc(48px * var(--ts)); }
  .prompter { font-size: calc(18px * var(--ts)); }
  .role-row { grid-template-columns: 1fr 1.6fr; }
  .vs-list { grid-template-columns: 1fr; }
  .vs-list li { grid-template-columns: 1fr; gap: 4px; }
  .vs { justify-self: center; font-size: .85em; }
  .hist.naf, .hist.naf tbody { display: block; }
  .hist.naf thead { display: none; }
  .hist.naf tr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .hist.naf td { border: 0; padding: 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 8px; }
  .hist.naf td:first-child { grid-column: 1 / -1; display: block; min-width: 0; background: none; }
  .hist.naf td[data-label]::before { content: attr(data-label); font-size: 12px; font-weight: 800; color: var(--muted); }
  .hist.naf select { width: 100%; }
  .abc-board { grid-template-columns: 1fr; }
  .abc-col { min-height: 0; }
  .s3-result li { flex-wrap: wrap; }

  .card { padding: 18px 16px; }
  .keys { grid-template-columns: 1fr; }
  .sep-grid { grid-template-columns: 1fr; }
  .sep-pick { grid-template-columns: repeat(2, 1fr); }
  .choices { grid-template-columns: 1fr; }
  .modes { gap: 6px; }
  .modes button { padding: 10px 4px; }
  .modes button small { display: none; }
  .modes button b { font-size: calc(14px * min(var(--ts), 1.15)); }
  .meters { grid-template-columns: 1fr; }
  .hunt-opts { grid-template-columns: 1fr 1fr; }
  .hunt-opts .pick { flex-direction: column; text-align: center; gap: 4px; padding: 10px 6px; }
  .hunt-opts .pick b { font-size: calc(16px * var(--ts)); }
  .story-card { flex-direction: column; text-align: center; }
  .deck { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .level-bar { max-width: none; }
  .mission-btn { padding: 3px 8px; font-size: 13px; }
  .missions li { grid-template-columns: auto 1fr auto; }
  .missions li .btn { grid-column: 1 / -1; }
  .hero { min-height: 0; padding: 26px 16px 28px; }
  .hero::after { font-size: 220px; bottom: -8%; }
  .bar { padding: 8px 12px; margin: 12px -16px 0; }
  /* 휴대폰에서는 여덟 단계를 4칸 × 2줄로 */
  .tabs { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .tabs button {
    justify-content: flex-start; gap: 4px; padding: 5px 4px; border-radius: 12px;
    /* 칸이 좁아 글씨 크기 배율을 조금만 따른다. */
    font-size: calc(12px * min(var(--ts), 1.15)); text-align: left;
  }
  .tabs button .num { width: 20px; height: 20px; font-size: calc(11px * min(var(--ts), 1.15)); }
  .tabs .tl { letter-spacing: -.05em; overflow-wrap: anywhere; }
  /* 빙고판은 휴대폰에서 눕혀(5칸 × 8줄) 보여 준다. 가로·세로 줄이 그대로 빙고 줄이다. */
  /* 휴대폰에서는 팀 칸을 맨 위에 두고 1~40번을 4칸씩 차례대로 보여 준다. */
  .bingo { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(74px, auto); gap: 4px; padding: 5px; }
  .panel-team { grid-row: auto; grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; }
  .pt-name { font-size: 18px; }
  .cell { grid-row: auto; grid-column: auto; padding: 4px 3px 5px; align-items: center; text-align: center; border-radius: 8px; }
  .cell-top { flex-direction: column; gap: 1px; }
  .cell-name { font-size: calc(11px * min(var(--ts), 1.15)); letter-spacing: -.04em; overflow-wrap: anywhere; }
  .stack { display: none; }
  .cell-count { display: grid; }
  .timer { font-size: 22px; }
  .postit.big { width: 100%; }
  .pd-note { width: 100%; }
  .multi-cols { grid-template-columns: 1fr; }
  .worksheet { padding: 8px; }
  .sheet-ex dl, .sheet-sum dl { grid-template-columns: 1fr; }
  .sheet-ex dd, .sheet-sum dd { margin-bottom: 6px; }
  .owner { display: none; }
  .cell.owned { border-width: 3px; }
  .pager { flex-direction: column-reverse; }
  .pager-next { align-items: center; margin-left: 0; }
  .pager-prev { align-self: stretch; }
  .pager-end { margin: 0; text-align: center; }
  .credit { border-radius: 18px; flex-direction: column; gap: 2px; }
}

/* ---- 글씨 크기 버튼 (../js/text-size.js) — 배율을 따르지 않는다. 오른쪽 아래는 Netlify 배지가 덮어서 왼쪽에 둔다. ---- */
.ts-fab {
  position: fixed; left: 14px; bottom: 14px; z-index: 70;
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(16, 24, 40, .18);
}
.ts-now { min-width: 62px; text-align: center; white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--muted); }
.ts-btn {
  display: inline-flex; align-items: baseline; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 17px; font-weight: 800; line-height: 1; cursor: pointer; padding-top: 11px;
}
.ts-btn small { font-size: 13px; margin-left: 1px; }
.ts-btn.ts-up { background: var(--brand); border-color: var(--brand); color: #fff; font-size: 21px; padding-top: 9px; }
.ts-btn:disabled { opacity: .4; cursor: default; }
@media (max-width: 420px) {
  .ts-fab { left: 10px; bottom: 10px; padding: 6px 8px; gap: 4px; }
  .ts-now { display: none; }
  .ts-btn { width: 38px; height: 38px; }
}

/* ---- 멀티 Step1: 함께 쓰는 워크시트 ---- */
.sf-who { margin-left: 6px; font-weight: 700; color: var(--brand); font-size: .8em; }
.sf-who:empty { display: none; }

/* ---- 🌱 풍풍이 피드백: 칸을 짚어 주는 코치 투어 (가이랩 스튜디오 튜토리얼 · 풍풍꿈마당 체험 안내를 본뜸) ---- */
.ct-spot { position: fixed; inset: 0; z-index: 10000; pointer-events: none; }
.ct-spot i { position: fixed; background: rgba(12, 20, 16, .58); pointer-events: auto; }
/* 어두운 조각과 빛나는 테두리는 스크롤을 매 프레임 따라가므로 따로 움직이지(transition) 않는다 */
.ct-spot b { position: fixed; box-sizing: border-box; border: 3px solid #8ce99a; border-radius: 14px; pointer-events: none; animation: ct-glow 2.4s ease-in-out infinite; }
.ct-spot b em { position: absolute; font: normal 20px/1 system-ui; color: #ebfbee; filter: drop-shadow(0 0 5px #51cf66); animation: ct-sparkle 2.4s ease-in-out infinite; }
.ct-spot b em:nth-child(1) { left: -10px; top: -11px; } .ct-spot b em:nth-child(2) { right: -10px; top: -11px; animation-delay: .6s; }
.ct-spot b em:nth-child(3) { right: -10px; bottom: -11px; animation-delay: 1.2s; } .ct-spot b em:nth-child(4) { left: -10px; bottom: -11px; animation-delay: 1.8s; }
.ct-target { scroll-margin: 140px 0 220px; }
.ct-coach { position: fixed; z-index: 10010; box-sizing: border-box; max-height: calc(100dvh - 24px); overflow: auto; padding: 14px 16px 12px; border: 3px solid #51cf66; border-radius: 20px;
  background: #fff; color: var(--ink); box-shadow: 0 16px 60px rgba(8, 24, 12, .35); transition: left .42s cubic-bezier(.22,.7,.2,1), top .42s cubic-bezier(.22,.7,.2,1); }
.ct-coach[data-tone="fix"] { border-color: #fab005; }
.ct-coach::before { content: ''; position: absolute; width: 14px; height: 14px; transform: rotate(45deg); background: #fff; border: 3px solid; border-color: inherit; }
.ct-coach[data-side="right"]::before { left: -9px; top: calc(var(--ct-arrow) - 7px); border-right: 0; border-top: 0; }
.ct-coach[data-side="left"]::before { right: -9px; top: calc(var(--ct-arrow) - 7px); border-left: 0; border-bottom: 0; }
.ct-coach[data-side="bottom"]::before { top: -9px; left: calc(var(--ct-arrow) - 7px); border-right: 0; border-bottom: 0; }
.ct-coach[data-side="top"]::before { bottom: -9px; left: calc(var(--ct-arrow) - 7px); border-left: 0; border-top: 0; }
.ct-coach[data-side="none"]::before { display: none; }
.ct-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 800; color: #2b8a3e; }
.ct-coach[data-tone="fix"] .ct-top { color: #b35309; }
.ct-coach button { font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: #f8f9fa; color: inherit; cursor: pointer; white-space: nowrap; }
.ct-coach button.primary { background: #2f9e44; border-color: transparent; color: #fff; font-weight: 800; }
.ct-coach[data-tone="fix"] button.primary { background: #f08c00; }
.ct-coach button:disabled { opacity: .45; cursor: default; }
.ct-top button { border: 0; background: none; font-size: 20px; padding: 0 4px; }
.ct-msg { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; animation: ct-in .35s ease-out; }
.ct-msg img { width: 84px; height: 84px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 5px rgba(0,0,0,.15)); animation: ct-float 3.2s ease-in-out infinite; }
.ct-msg h3 { margin: 2px 0 6px; font-size: calc(17px * var(--ts)); line-height: 1.4; word-break: keep-all; }
.ct-msg p { margin: 0; font-size: calc(14.5px * var(--ts)); line-height: 1.7; word-break: keep-all; }
.ct-msg .ct-label { display: inline-block; margin-bottom: 2px; padding: 1px 8px; border-radius: 999px; background: #ebfbee; color: #2b8a3e; font-size: 12px; font-weight: 800; }
.ct-coach[data-tone="fix"] .ct-label { background: #fff4e6; color: #b35309; }
.ct-progress { display: flex; gap: 4px; margin: 12px 0 8px; }
.ct-progress i { flex: 1; height: 4px; border-radius: 4px; background: #e9ecef; position: relative; overflow: hidden; }
.ct-progress i.done { background: #8ce99a; } .ct-progress i.done.fix { background: #ffd8a8; }
.ct-progress i.current::after { content: ''; position: absolute; inset: 0; background: #2f9e44; transform: scaleX(calc(1 - var(--ct-remaining, 1))); transform-origin: left; }
.ct-play { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.ct-play [data-ct-timer] { flex: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.ct-nav { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.ct-hourglass { width: 18px; height: 22px; color: #2f9e44; flex: none; }
.ct-frame { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.ct-sand-top, .ct-sand-bottom { fill: currentColor; transform-box: fill-box; transform-origin: bottom; }
.ct-sand-top { transform: scaleY(var(--ct-remaining, 1)); } .ct-sand-bottom { transform: scaleY(calc(1 - var(--ct-remaining, 1))); }
.ct-sand-stream { stroke: currentColor; stroke-width: 1.3; opacity: .2; }
.is-playing .ct-sand-stream { opacity: 1; stroke-dasharray: 2 2; animation: ct-flow 1s linear infinite; }
@keyframes ct-flow { to { stroke-dashoffset: -4; } }
@keyframes ct-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes ct-float { 50% { transform: translateY(-4px) rotate(-2deg); } }
@keyframes ct-sparkle { 0%, 100% { opacity: .45; transform: scale(.75); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes ct-glow { 0%, 100% { box-shadow: 0 0 0 3px #51cf6630, 0 0 12px #51cf6650; } 50% { box-shadow: 0 0 0 6px #51cf6640, 0 0 26px #51cf6680; } }
@media (max-width: 650px) {
  .ct-coach { max-height: 52dvh; padding: 10px 12px; }
  .ct-msg img { width: 60px; height: 60px; }
  .ct-msg h3 { font-size: 15px; } .ct-msg p { font-size: 13.5px; line-height: 1.6; }
}
@media (prefers-reduced-motion: reduce) { .ct-spot i, .ct-spot b, .ct-coach, .ct-msg, .ct-msg img, .ct-spot b em { transition: none; animation: none; } }

/* 결과 화면의 풍풍이 피드백 상자 */
.pp-box { margin: 12px 0; padding: 14px 16px; border-radius: 18px; border: 3px solid #8ce99a; background: linear-gradient(180deg, #ebfbee, #fff); }
.pp-head { display: flex; align-items: center; gap: 10px; }
.pp-head img { width: 72px; height: 72px; object-fit: contain; flex: none; }
.pp-head h3 { margin: 0; }
.pp-head p { margin: 2px 0 0; }
.pp-overall { margin: 10px 0; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid #d3f9d8; line-height: 1.7; position: relative; }
.pp-items { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.pp-items button { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; width: 100%; text-align: left; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; }
.pp-items button:hover { border-color: #51cf66; }
.pp-items .pp-ic { grid-row: span 2; font-size: 18px; }
.pp-items b { font-size: calc(15px * var(--ts)); }
.pp-items small { color: var(--muted); font-size: calc(13px * var(--ts)); line-height: 1.5; }
.pp-items .pp-where { color: #2b8a3e; font-weight: 800; margin-right: 4px; }
.pp-items .fix .pp-where { color: #b35309; }
.pp-mine { margin: 12px 0 4px; font-weight: 900; color: #c2255c; }

/* ---- 🧑‍⚖️ AI 심사위원: 평가하는 사람(남색·정장) — 풍풍이(초록·돕는 사람)와 구분 ---- */
.btn-judge { background: #1b2a6b; color: #fff; border-color: #1b2a6b; font-weight: 800; }
.btn-judge:hover { background: #253a8f; }
.jd-avatar { flex: none; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(27, 42, 107, .25)); }
.jd-panel { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; border: 2px solid #c5d0f5; background: linear-gradient(180deg, #f3f6ff, #fff); }
.jd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.jd-role { margin: 0; font-weight: 900; color: #1b2a6b; font-size: calc(14px * var(--ts)); letter-spacing: .02em; }
.jd-item { margin: 2px 0 0; color: var(--muted); font-size: calc(13px * var(--ts)); }
.jd-item b { color: #1b2a6b; }
.jd-verdict { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #dbe4ff; }
.jd-verdict p { margin: 2px 0; line-height: 1.6; }
.jd-verdict b { display: inline-block; min-width: 4.4em; color: #1b2a6b; }
.jd-label { font-weight: 800; color: #1b2a6b; }
.jd-stamp { --c: #868e96; flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--c); color: #fff;
  font-family: 'GameKR', system-ui, sans-serif; font-size: 28px; line-height: 1; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); transform: rotate(-8deg); }
.jd-stamp small { font-family: system-ui, sans-serif; font-size: 11px; font-weight: 800; }
.jd-stamp.g-A { --c: #2f9e44; } .jd-stamp.g-B { --c: #1c7ed6; } .jd-stamp.g-C { --c: #f08c00; }
.jd-all { display: flex; gap: 12px; align-items: center; margin: 12px 0; padding: 14px 16px; border-radius: 18px; background: #1b2a6b; color: #fff; }
.jd-all .jd-role { color: #ffd43b; }
.jd-all h3 { margin: 2px 0 4px; color: #fff; }
.jd-all .muted { color: #c5cdf7; }
.jd-all .warn { color: #ffd8a8; }
.jd-all-body { flex: 1; min-width: 0; }
.jd-all .btn-judge { background: #ffd43b; color: #1b2a6b; border-color: #ffd43b; }
.jd-bar { display: block; margin-top: 6px; background: rgba(255,255,255,.2); }
.jd-final { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; padding: 14px 16px; border-radius: 18px; border: 3px solid #1b2a6b; background: #f8f9ff; }
.jd-final p { margin: 4px 0; line-height: 1.65; }
.jd-summary { font-size: calc(17px * var(--ts)); font-weight: 700; color: #1b2a6b; }
.jd-plus, .jd-minus { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; font-size: .85em; }
.jd-plus { background: #d3f9d8; color: #2b8a3e; } .jd-minus { background: #ffe3e3; color: #c92a2a; }
@media (max-width: 650px) {
  .jd-all { flex-direction: column; align-items: flex-start; }
  .jd-final { flex-direction: column; }
  .jd-verdict { gap: 10px; }
  .jd-stamp { width: 50px; height: 50px; font-size: 24px; }
}
.jd-all .jd-avatar { background: #fff; border-radius: 18px; padding: 2px; }

/* ===================================================================
   모험 지도 디자인 — 표지의 풍풍이 안내, 단계별 색·아이콘·진행 고리, 단계 배너, 축하
   =================================================================== */

/* 표지: 한 화면을 다 차지하지 않게 낮추고, 오른쪽에 풍풍이 안내 */
.hero { min-height: 0; padding: clamp(22px, 3.4vw, 40px) clamp(18px, 4vw, 48px); flex-direction: row; align-items: center; justify-content: space-between; gap: clamp(16px, 3vw, 40px); text-align: left; }
.hero::after { right: auto; left: -4%; bottom: -30%; font-size: clamp(160px, 22vw, 300px); opacity: .07; }
.hero-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.hero h1 { font-size: clamp(48px, 8.4vw, 104px); }
.hero .big-q { font-size: clamp(18px, 2.4vw, 28px); margin-top: clamp(10px, 1.6vw, 18px); }
.hero-line { justify-content: flex-start; margin-top: clamp(12px, 2vw, 22px); }
.hero-line .chip { font-size: clamp(12px, 1.4vw, 16px); padding: 5px 12px; }
.guide { flex: 0 1 430px; min-width: 0; display: flex; align-items: flex-end; gap: 4px; }
.guide-bubble { position: relative; flex: 1; min-width: 0; padding: 14px 16px; border-radius: 20px; background: #fff; color: var(--ink);
  box-shadow: 0 10px 30px rgba(20, 10, 60, .28); }
.guide-bubble::after { content: ''; position: absolute; right: -9px; bottom: 34px; width: 18px; height: 18px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
.guide-hi { margin: 0; font-size: calc(14px * var(--ts)); color: var(--muted); }
.guide-hi b { color: var(--brand); }
.guide-say { margin: 4px 0 0; font-size: calc(15px * var(--ts)); font-weight: 600; line-height: 1.5; }
.guide-go { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 10px 12px; border: 0; border-radius: 14px; cursor: pointer; text-align: left;
  background: linear-gradient(135deg, var(--stage), color-mix(in srgb, var(--stage) 70%, #000)); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--stage) 40%, transparent);
  transition: transform .15s; }
.guide-go:hover { transform: translateY(-2px); }
.guide-go:active { transform: scale(.98); }
.guide-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.22); font-size: 24px; }
.guide-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.guide-txt small { font-size: 11px; font-weight: 800; letter-spacing: .06em; opacity: .85; }
.guide-txt b { font-size: calc(17px * var(--ts)); }
.guide-txt em { font-style: normal; font-size: 12px; opacity: .9; }
.guide-arrow { flex: none; font-size: 18px; animation: nudge 2.4s ease-in-out infinite; }
.guide-pp { flex: none; width: clamp(96px, 12vw, 150px); height: auto; filter: drop-shadow(0 8px 14px rgba(0,0,0,.3)); animation: ct-float 3.2s ease-in-out infinite; }

/* 단계 탭: 단계 색 + 아이콘 + 진행 고리(--p 0~1), 다 하면 ⭐ */
.tabs button { --stage: var(--brand); --p: 0; position: relative; border-radius: 16px; padding: 7px 8px; gap: 8px; }
.tabs button .num { position: relative; width: 32px; height: 32px; color: var(--stage);
  background: radial-gradient(closest-side, #fff 74%, transparent 76% 100%), conic-gradient(var(--stage) calc(var(--p) * 1turn), #ece8f6 0); }
.tabs button .tl { min-width: 0; }
.tabs button .num { font-size: 17px; line-height: 1; }
.tabs button .num::after { content: attr(data-n); position: absolute; left: -5px; bottom: -4px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--stage); color: #fff; font-size: 10px; font-weight: 900; box-shadow: 0 0 0 2px #fff; }
.tabs button[aria-selected="true"] .num::after { background: #2b1a6b; }
.tabs button:hover { border-color: var(--stage); transform: translateY(-1px); }
.tabs button[aria-selected="true"] { background: var(--stage); border-color: var(--stage); box-shadow: 0 6px 16px color-mix(in srgb, var(--stage) 35%, transparent); }
.tabs button[aria-selected="true"] .num { background: radial-gradient(closest-side, #fff 74%, transparent 76% 100%), conic-gradient(#ffd43b calc(var(--p) * 1turn), rgba(255,255,255,.35) 0); }
.tabs button.done::after { content: '⭐'; position: absolute; top: -7px; right: -4px; font-size: 14px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }

/* 경험치 막대: 두껍게, 반짝이게 */
.level-bar { height: 12px; max-width: 320px; box-shadow: inset 0 1px 2px rgba(0,0,0,.08); }
.level-bar i { position: relative; overflow: hidden; background: linear-gradient(90deg, #ffd43b, #ff922b 40%, #845ef7); }
.level-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.7) 45%, transparent 70%); transform: translateX(-100%); animation: shine 3s ease-in-out infinite; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.level-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff3bf; box-shadow: 0 0 0 2px #ffd43b; font-size: 1.2em; }

/* 단계 배너: 단계 색 띠, 큰 아이콘, STAGE n · 진행 */
.panel { --stage: var(--brand); border-top: 6px solid var(--stage); }
.card h2.stage-head { display: flex; align-items: center; gap: 14px; margin: -4px 0 10px; }
.stage-ic { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; font-size: 32px;
  background: color-mix(in srgb, var(--stage) 14%, #fff); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--stage) 30%, #fff); }
.stage-tt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.stage-tt small { font-size: calc(12px * var(--ts)); font-weight: 900; letter-spacing: .08em; color: var(--stage); }
.stage-st { letter-spacing: 0; font-weight: 700; color: var(--muted); }
.stage-tt > span { font-family: 'GameKR', system-ui, sans-serif; font-weight: 400; font-size: calc(30px * var(--ts)); letter-spacing: .01em; }
.pp-tip { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 8px 14px 8px 8px; border-radius: 16px;
  background: linear-gradient(90deg, #ebfbee, #fff); border: 1px solid #d3f9d8; }
.pp-tip img { flex: none; width: 52px; height: 52px; object-fit: contain; }
.pp-tip p { margin: 0; font-size: calc(15px * var(--ts)); line-height: 1.5; }
.pp-tip b { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; background: #2f9e44; color: #fff; font-size: .82em; }
.panel:not([hidden]) { animation: panel-in .35s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 손맛: 누를 때 살짝 눌리고, 정답은 통통, 오답은 도리도리 */
.btn { transition: transform .12s, box-shadow .15s, background .15s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(95, 61, 196, .3); }
.choice.right, .sep-btn.right { animation: pop .45s ease-out; }
.choice.wrong, .sep-btn.wrong { animation: shake .4s ease-in-out; }
@keyframes pop { 40% { transform: scale(1.05); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.pcard .front, .pcard .back { transition: box-shadow .2s, transform .2s; }
.pcard:hover .front { box-shadow: 0 8px 22px rgba(43, 26, 107, .12); }

/* 색종이 축하 */
.confetti { position: fixed; inset: 0; z-index: 20000; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -24px; width: 9px; height: 14px; border-radius: 2px; animation: confetti var(--d) cubic-bezier(.25,.6,.4,1) var(--dl) forwards; }
.confetti i.cf-e { width: auto; height: auto; font-size: 24px; font-style: normal; }
@keyframes confetti { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: .9; } }

@media (max-width: 760px) {
  .hero { flex-direction: column; align-items: stretch; text-align: left; }
  .hero h1 { font-size: clamp(44px, 14vw, 64px); }
  .hero-line .arrow { display: none; }
  .guide { flex-basis: auto; }
  .guide-pp { width: 92px; }
  .guide-bubble::after { bottom: 26px; }
  .tabs button { border-radius: 14px; padding: 6px; gap: 6px; }
  .tabs button .num { width: 30px; height: 30px; font-size: 15px; }
  .hero-line { display: none; }
  .hero .big-q { font-size: 17px; }
  .guide-hi { display: none; }
  .guide-bubble { padding: 10px 12px; }
  .guide-say { margin: 0; font-size: 14px; }
  .guide-go { margin-top: 8px; padding: 8px 10px; }
  .guide-ic { width: 36px; height: 36px; font-size: 20px; }
  .guide-pp { width: 84px; }
  .stage-ic { width: 46px; height: 46px; font-size: 26px; border-radius: 14px; }
  .stage-tt > span { font-size: calc(24px * var(--ts)); }
  .pp-tip img { width: 42px; height: 42px; }
  .pp-tip p { font-size: calc(14px * var(--ts)); }
}
@media (prefers-reduced-motion: reduce) {
  .guide-pp, .guide-arrow, .level-bar i::after, .panel:not([hidden]), .choice.right, .choice.wrong, .sep-btn.right, .sep-btn.wrong { animation: none; }
}

/* ---- 🏅 선생님께 자랑하기 · 자랑 카드 ---- */
.btn-brag { background: linear-gradient(135deg, #ffd43b, #fab005); color: #5c3c00; border-color: #fab005; font-weight: 900; box-shadow: 0 4px 12px rgba(250, 176, 5, .35); }
.btn-brag:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(250, 176, 5, .45); }
.brag-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; padding: 10px 12px; border-radius: 14px; background: #fff9db; border: 1px dashed #fcc419; }
.brag-cta .muted { font-size: calc(14px * var(--ts)); }
.brag-growth { margin-top: 14px; }
.brag-dialog { max-width: 560px; padding: 0; border: 0; border-radius: 24px; overflow: hidden; }
.brag-card { position: relative; padding: 20px 22px 18px; background: radial-gradient(120% 80% at 100% 0%, #fff3bf, #fff 55%); }
.brag-card .pd-x { position: absolute; top: 10px; right: 12px; }
.brag-top { display: flex; align-items: center; gap: 12px; }
.brag-top img { flex: none; width: 96px; height: 96px; object-fit: contain; animation: ct-float 3.2s ease-in-out infinite; }
.brag-kicker { margin: 0; font-size: 13px; font-weight: 900; color: #e67700; }
.brag-card h3 { margin: 2px 0; font-family: 'GameKR', system-ui, sans-serif; font-weight: 400; font-size: 26px; line-height: 1.2; }
.brag-topic { margin: 0; color: var(--muted); }
.brag-score { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 0; }
.brag-score b { font-family: 'GameKR', system-ui, sans-serif; font-weight: 400; font-size: 64px; line-height: 1; color: var(--brand); }
.brag-score span { font-weight: 800; color: var(--muted); }
.brag-headline { margin: 4px 0 8px; font-size: 18px; font-weight: 800; }
.brag-idea { margin: 6px 0; padding: 8px 12px; border-radius: 12px; background: #f3f0ff; }
.brag-rows { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.brag-rows dt { color: var(--muted); font-weight: 700; }
.brag-rows dd { margin: 0; font-weight: 800; }
.brag-quote { margin: 10px 0; padding: 10px 14px; border-left: 4px solid #1b2a6b; border-radius: 8px; background: #f8f9ff; line-height: 1.6; }
.brag-foot { margin: 8px 0; text-align: center; font-size: 13px; color: var(--muted); font-weight: 700; }
@media (max-width: 650px) { .brag-top img { width: 72px; height: 72px; } .brag-score b { font-size: 52px; } .brag-rows { grid-template-columns: 1fr; } }

/* ---- 원리 뽑기: 심사위원 판정 ---- */
.spin-judge { margin-top: 14px; }
.spin-rejected { margin: 6px 0 0; padding-left: 18px; }
.spin-rejected li { margin: 6px 0; color: #5c5f66; }
:is(.idea-groups, .spin-rejected) li .why { display: block; margin-top: 2px; font-size: calc(14px * var(--ts)); color: #333; }
:is(.idea-groups, .spin-rejected) li .learn { display: block; margin: 4px 0 2px; padding: 5px 9px; border-radius: 10px; background: #eef6ff; color: #1b2a6b; font-size: calc(14px * var(--ts)); line-height: 1.5; }

/* ---- 원리 퀴즈: 문제 모양 · 틀렸을 때 배움 ---- */
.quiz-kind { margin-left: auto; padding: 1px 10px; border-radius: 999px; background: #fff4be; font-size: calc(13px * var(--ts)); font-weight: 800; color: #5c3c00; }
.quiz-prog { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quiz-problem { margin: 0 0 4px; font-weight: 800; color: var(--muted); }
.quiz-ask { margin: -4px 0 10px; font-weight: 800; color: var(--brand); }
.choice-ex b { font-size: calc(16px * var(--ts)) !important; line-height: 1.45; }
.quiz-why { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .75); }
