/* 렉스 판정단 너도양판 v004 — v003 배치(DESIGN.md) 그대로, 겉모양만 너도양 브랜드 1.1.0(05 BRAND.md 3절·4-0절 수업 도구).
   색: 살구·진한 살구·숯·크림·흰색, 주황은 선·테두리에만. 글꼴: 선플라워 Medium(본문)·Bold(제목). 모양: 이름표(흰 카드 + 주황 테두리 + 펀치 구멍).
   예외(내용 색): 렉스 노랑(렉스 차·막대), LIVE 빨강, 틀림·채팅 방해 빨강, 반응 챌린지 빨강·초록 신호 — 브랜드 색이 아니라 수업 내용의 신호. */
@font-face { font-family: "Sunflower"; src: url("fonts/Sunflower-Medium.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Sunflower"; src: url("fonts/Sunflower-Bold.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }

:root {
  --apricot: #FDE7D6;
  --deep: #F7C9A8;
  --orange: #EE8546;
  --cream: #F0F0D8;
  --ink: #33373A;
  --ink-2: #33373A;
  --ink-3: #4a4f52;
  --paper: #ffffff;
  --surface: #FDE7D6;
  --desk: #FDE7D6;
  --line: #F7C9A8;
  --muted: rgba(51, 55, 58, .68);
  --mint: #F7C9A8;
  --mint-ink: #33373A;
  --live: #ff4545;
  --rex: #ffd84a;
  --bad: #d23a2a;
  --radius: 12px;
  --font: "Sunflower", "Malgun Gothic", sans-serif;
  --s-small: 15px; --s-body: 19px; --s-lead: 23px;
  --s-head: clamp(28px, 2.4vw, 44px);
  --s-display: clamp(56px, 6.5vw, 120px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 var(--s-body)/1.5 var(--font); color: var(--ink); background: var(--desk); font-variant-numeric: tabular-nums; font-synthesis: none; word-break: keep-all; overflow-wrap: break-word; }
[hidden] { display: none !important; }
h1, h2, h3, p, blockquote, ol, ul, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; text-wrap: balance; }
img { max-width: 100%; }
.kicker { font-weight: 800; font-size: var(--s-small); letter-spacing: .02em; color: var(--muted); }
.lead { font-size: var(--s-lead); line-height: 1.45; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: var(--s-small); }
.note { color: var(--mint-ink); font-weight: 700; min-height: 1.5em; }
.warn { color: var(--bad); font-weight: 700; }
.good { color: var(--mint-ink); font-weight: 700; }

/* ---------- 부품 ---------- */
.btn { font: 800 16px var(--font); border-radius: 0; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); padding: .55em 1.1em; cursor: pointer; }
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--mint); }
.btn.primary:hover { filter: brightness(.96); }
.btn.big { font-size: 20px; padding: .7em 1.4em; }
.btn.small { font-size: 14px; padding: .35em .8em; }
.btn:disabled { opacity: .35; cursor: default; }
.btn:focus-visible, .chip:focus-visible, .bl-opt:focus-visible, .field:focus-visible, .speed:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.chip { font: 700 15px var(--font); border: 2px solid var(--line); background: var(--paper); color: var(--ink); padding: .3em .8em; border-radius: 0; cursor: pointer; }
.chip.on { background: var(--mint); border-color: var(--ink); }
.chip.big { font-size: 20px; padding: .5em 1.2em; }
.field { font: 400 18px var(--font); background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 0; padding: .5em .7em; width: 100%; }

/* 모양 하나: 자 괄호(⊢──⊣) + 눈금. --frac만큼 민트가 차오른다. */
.ruler { position: relative; height: 16px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.ruler::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid currentColor; }
.ruler-fill { position: absolute; left: 0; top: 3px; bottom: 3px; width: calc(var(--frac, 0) * 100%); background: var(--mint); transition: width .4s; }
.ruler-ticks { position: absolute; inset: 0; background-image:
  /* taste-skill-ignore: 자 눈금(1cm = 1m)은 이 앱의 모양 하나(DESIGN.md 1·4절), 장식 줄무늬가 아님 */
  repeating-linear-gradient(to right, currentColor 0 1px, transparent 1px calc(100% / var(--ticks, 10))),
  repeating-linear-gradient(to right, currentColor 0 2px, transparent 2px calc(500% / var(--ticks, 10)));
  background-size: 100% 45%, 100% 100%; background-repeat: no-repeat; background-position: 0 0, 0 0; opacity: .9; }

/* 빈칸 문장 */
.blanks { line-height: 2; }
.bl { display: inline-block; min-width: 4em; text-align: center; border-bottom: 2px solid var(--ink); padding: 0 .3em; margin: 0 .15em; font-weight: 800; line-height: 1.3; }
.bl.empty { color: var(--muted); border-bottom-style: solid; }
.bl.filled { background: var(--surface); }
.bl.ok { background: var(--mint); }
.bl.bad { border-bottom: 3px solid var(--bad); color: var(--bad); }
.bl-pick { display: inline-flex; gap: 4px; flex-wrap: wrap; margin: 0 .2em; vertical-align: middle; }
.bl-opt { font: 800 16px var(--font); background: var(--paper); color: var(--ink); border: 2px solid var(--line); border-radius: 0; padding: .15em .6em; cursor: pointer; }
.bl-opt.on { background: var(--mint); border-color: var(--ink); }
.bl-opt.ok { background: var(--mint); border-color: var(--ink); }
.bl-opt.bad { border-color: var(--bad); color: var(--bad); }

/* 교과서 인용 */
.quote { background: var(--surface); padding: .6em .9em; display: grid; gap: .3em; }
.quote cite { font-style: normal; font-size: var(--s-small); font-weight: 800; color: var(--muted); }
.quote.rex { background: var(--rex); }
.stamp { display: inline-block; justify-self: start; font-weight: 900; font-size: clamp(22px, 2vw, 36px); color: var(--bad); border: 4px solid var(--bad); padding: .1em .6em; transform: rotate(-2deg); }

/* 그래프(종이 위) */
.graph { display: block; width: 100%; background: var(--paper); }
.g-grid { stroke: var(--line); stroke-width: 1; }
.g-minor { stroke-opacity: .5; }
.g-tick { fill: var(--muted); font: 13px var(--font); }
.g-axis { fill: var(--ink); font: 800 14px var(--font); }
.g-speedline { stroke-width: 2; stroke-dasharray: 6 5; }
.g-linelab { font: 800 12px var(--font); paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.g-rexlab { fill: var(--ink); font: 800 14px var(--font); paint-order: stroke; stroke: #fff; stroke-width: 3px; }

/* ---------- 첫 화면 ---------- */
.paper { background: var(--paper); }
.home { max-width: 1080px; margin: 40px auto; padding: 40px; border: 2px solid var(--ink); }
.home-head { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: center; }
.home-face { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--ink); object-fit: cover; }
.home h1 { font-size: var(--s-display); line-height: 1; margin: .1em 0 .2em; }
.home-ruler { margin: 28px 0; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.home-card { border: 2px solid var(--ink); padding: 24px; display: grid; gap: 12px; align-content: start; }
.home-card h2 { font-size: 26px; }
.join { display: grid; gap: 12px; }
.field.code { font-size: 32px; font-weight: 900; letter-spacing: .3em; text-align: center; }
.who { display: flex; gap: 18px; }
.who label { display: flex; gap: .4em; align-items: center; font-weight: 800; cursor: pointer; }
.offline-box { margin-top: 24px; color: var(--muted); }
.offline-box summary { cursor: pointer; font-weight: 800; }
.offline-box .btn { margin: 8px 8px 0 0; }
.gate-card { margin-top: 28px; }
.g-bar { height: 16px; border: 2px solid var(--ink); }
.g-bar span { display: block; height: 100%; width: 0; background: var(--mint); transition: width .2s; }

/* ---------- 전자칠판: 방송 플랫폼 틀 ---------- */
body[data-role="board"] { background: var(--ink); color: var(--paper); }
.board { display: grid; grid-template-rows: 1fr auto; height: 100dvh; }
.b-main { display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.b-stagearea { display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 10px; min-height: 0; min-width: 0; }
.screen { position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100dvh - 190px) * 16 / 9)); margin: 0 auto; background: #000; overflow: hidden; container-type: size; color: var(--ink); }
.channel { display: flex; gap: 14px; align-items: center; width: min(100%, calc((100dvh - 190px) * 16 / 9)); margin: 0 auto; }
.ch-face { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--live); object-fit: cover; }
.ch-text { margin-right: auto; min-width: 0; }
.ch-title { font-weight: 900; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-name { color: #bdbdbd; font-size: 15px; }
.ch-name b { color: var(--paper); }
.board .chip { background: transparent; color: #bdbdbd; border-color: var(--ink-3); cursor: default; }
.board .chip.on { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.b-chat { background: var(--ink-2); display: grid; grid-template-rows: auto 1fr; min-height: 0; border-left: 1px solid var(--ink-3); }
/* taste-skill-ignore: 방송 플랫폼 채팅 줄의 경계(레퍼런스 치지직·SOOP) */
.chat-head { padding: 12px 16px; font-weight: 900; border-bottom: 1px solid var(--ink-3); }
.chatlist { list-style: none; padding: 10px 12px; margin: 0; overflow: auto; display: grid; gap: 6px; align-content: start; }
.chatlist li { font-size: 16px; line-height: 1.45; padding: 4px 6px; }
.chatlist li b { color: #bdbdbd; margin-right: .3em; }
.chatlist li.judge b { color: var(--mint); }
.chatlist li.hot { background: var(--rex); color: var(--ink); }
.chatlist li.hot b { color: var(--ink); }
.chatlist .pin { display: block; font-size: 12px; font-weight: 900; color: var(--muted); }
.b-teacher { display: flex; gap: 12px; align-items: center; padding: 10px 16px; background: #141414; border-top: 1px solid var(--ink-3); flex-wrap: wrap; }
.t-room b { color: var(--mint); font-weight: 900; font-size: 20px; margin-left: .3em; }
.t-stage { font-weight: 800; min-width: 0; }
.dots { flex: 1; display: flex; gap: 6px; justify-content: center; min-width: 120px; }
.dot { width: 10px; height: 10px; background: var(--ink-3); }
.dot.past { background: #8a8a8a; }
.dot.on { background: var(--mint); }
.status { font-size: 13px; color: #bdbdbd; }
.status[data-s="online"] { color: var(--mint); }
.status[data-s="trouble"], .status[data-s="offline"] { color: var(--rex); }
.b-teacher .btn { background: transparent; color: var(--paper); border-color: #8a8a8a; }
.b-teacher .btn.primary { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.b-manual { position: fixed; left: 16px; bottom: 72px; display: flex; gap: 8px; align-items: center; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); padding: 10px 14px; }
.b-manual select, .b-manual input { font: 400 15px var(--font); padding: .3em; }

/* LIVE 알약: 화면 안 왼쪽 위 하나 */
.live-pill { position: absolute; top: 2.4cqh; left: 1.6cqw; display: flex; gap: .5em; align-items: center; z-index: 3; font-size: max(12px, 1.1cqw); font-weight: 800; color: var(--paper); background: rgba(20, 20, 20, .72); padding: .25em .6em .25em .25em; }
.live { background: var(--live); color: #fff; padding: .05em .5em; font-weight: 900; letter-spacing: .06em; }

/* 플레이어(렉스 영상) */
.player { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; background: #000; }
.tv-frame { position: relative; min-height: 0; overflow: hidden; }
.tv { position: absolute; inset: 0; display: grid; place-items: center; }
.tv-video, .tv iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.tv-hype iframe { position: static; }
.caption { position: absolute; left: 50%; bottom: 4cqh; transform: translateX(-50%); max-width: 86%; background: rgba(20, 20, 20, .86); color: #fff; font-size: max(16px, 2.3cqw); font-weight: 800; line-height: 1.35; padding: .35em .8em; text-align: center; z-index: 2; text-wrap: balance; }
.caption b { color: var(--rex); margin-right: .3em; }
/* 렉스가 대답하는 채팅(영상 위 렉스 옆, 피드백 8번) */
.callout { position: absolute; left: 3cqw; top: 22cqh; max-width: 34cqw; z-index: 2; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); padding: 1.2cqh 1.4cqw; font-size: max(16px, 2.2cqw); font-weight: 800; display: grid; gap: .3em; animation: rise .25s ease-out; }
.callout b { font-size: .7em; color: var(--muted); }
.co-tag { justify-self: start; font-size: .6em; font-weight: 900; background: var(--ink); color: #fff; padding: .1em .5em; }
.tv-ctrl { display: flex; gap: 6px; align-items: center; padding: .8cqh 1cqw; background: #111; }
.tv-btn { font: 800 max(13px, 1.05cqw) var(--font); background: transparent; color: #fff; border: 1px solid #6e6e6e; padding: .35em .8em; cursor: pointer; border-radius: 0; }
.tv-btn.primary { background: var(--mint); color: var(--ink); border-color: var(--mint); }
.tv-btn:disabled { opacity: .35; }
.tv-pos { margin-left: auto; color: #9a9a9a; font-size: max(12px, 1cqw); }
.tv-ready { display: grid; justify-items: center; gap: 2.4cqh; color: #fff; }
.tv-ready img { width: 16cqw; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--live); object-fit: cover; }
.tv-card { width: 70%; display: grid; gap: 2cqh; color: #fff; text-align: center; font-size: max(16px, 2cqw); justify-items: center; }
.tv-card .kicker { color: #bdbdbd; font-size: max(13px, 1.2cqw); }
.tv-card .lead { font-size: max(18px, 2.4cqw); }
.tv-card .line { font-size: max(16px, 2cqw); }
.tv-hype { width: 100%; height: 100%; display: grid; grid-template-rows: 1fr auto; }
.hype-src { color: #bdbdbd; font-size: max(12px, 1cqw); padding: .4em 1em; background: #111; }
.tv-comment { width: 100%; height: 100%; display: grid; grid-template-columns: 34% 1fr; align-items: center; gap: 4cqw; padding: 4cqw; background: var(--ink-2); }
.rex-read { width: 100%; aspect-ratio: 1; object-fit: cover; border: 3px solid var(--paper); }
.cm-pop { background: var(--paper); color: var(--ink); padding: 3cqw; display: grid; gap: 1.6cqh; font-size: max(16px, 2.2cqw); border: 4px solid var(--mint); }
.cm-pop .cm-who { font-weight: 900; color: var(--muted); font-size: max(13px, 1.4cqw); }
.cm-pop .muted { font-size: max(12px, 1.2cqw); }

/* 방송 화면 공유(영상이 아닌 단계): 흰 종이를 화면에 띄운 모습 */
.share { position: absolute; inset: 0; background: var(--paper); color: var(--ink); }
.share-body { position: absolute; inset: 0; padding: 7cqh 4cqw 4cqh; display: grid; align-content: start; gap: 2.4cqh; overflow: hidden; }
.share .kicker { font-size: max(12px, 1.3cqw); }
.share h2 { font-size: max(22px, 3.4cqw); }
.share h2.q { font-size: max(28px, 5cqw); }
.share .lead { font-size: max(16px, 2.1cqw); }
.share .muted { font-size: max(12px, 1.4cqw); }
.share .ruler { height: max(10px, 1.5cqh); }
.share .chip { font-size: max(14px, 1.6cqw); color: var(--ink); border-color: var(--line); }
.share .chip.on { background: var(--mint); border-color: var(--ink); }
.share.sh-lobby .share-body { align-content: center; justify-items: center; text-align: center; }
.join-how { font-size: max(16px, 2.2cqw); color: var(--muted); }
.join-url { font-size: max(20px, 3.4cqw); font-weight: 900; white-space: nowrap; }
.room-code { font-size: 22cqh; font-weight: 900; line-height: 1; letter-spacing: .08em; }
.joined { display: flex; gap: 1.2cqw; justify-content: center; }
.rank { list-style: none; padding: 0; display: grid; gap: 1.4cqh; max-width: 70cqw; }
.rank li { display: grid; grid-template-columns: 5cqw 1fr auto; align-items: center; border: 2px solid var(--ink); padding: 1.6cqh 2cqw; font-size: max(18px, 2.6cqw); }
.rank li.rex { background: var(--rex); }
.rank-n { font-weight: 900; color: var(--muted); }
.rank li.rex .rank-n { color: var(--ink); }
.rank-name { font-weight: 800; display: flex; align-items: center; gap: 1cqw; }
.rank .av { width: 4.4cqw; height: 4.4cqw; border-radius: 50%; object-fit: cover; border: 2px solid var(--ink); }
.rank-t { font-weight: 900; font-size: max(20px, 3.2cqw); }
.criterion { display: grid; gap: 1cqh; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2cqw; align-items: center; }
.vs-card { border: 2px solid var(--ink); padding: 2cqh 2cqw; display: grid; gap: .6cqh; }
.vs-card.rex { background: var(--rex); }
.vs-card.normal { background: var(--surface); }
.vs-name { font-weight: 900; font-size: max(18px, 2.4cqw); }
.vs-num { font-weight: 800; font-size: max(16px, 2cqw); }
.vs-sub { color: var(--ink); font-weight: 700; font-size: max(13px, 1.4cqw); border-top: 1px solid var(--ink); padding-top: .4em; }
.vs-x { font-weight: 900; font-size: max(20px, 3cqw); }
.votes { display: grid; gap: 1cqh; }
.vote { display: flex; flex-wrap: wrap; gap: .4cqh 1.4cqw; align-items: baseline; border-top: 1px solid var(--line); padding-top: 1cqh; font-size: max(14px, 1.6cqw); }
.vote > b { min-width: 9cqw; }
.vote.wait { color: var(--muted); }
.vote .pick { font-weight: 900; padding: 0 .5em; }
.vote .pick.ok { background: var(--mint); }
.vote .pick.bad { color: var(--bad); }

/* 1학기 단서 */
.clue-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqw; }
.slot { display: grid; gap: .4cqh; padding: 1cqh 1cqw; border: 2px solid var(--line); background: var(--paper); color: var(--ink); }
.slot.now { border-color: var(--ink); }
.slot.on { border-color: var(--ink); background: var(--mint); }
.slot-n { font-weight: 800; font-size: max(11px, 1.1cqw); color: var(--muted); }
.slot.on .slot-n { color: var(--ink); }
.slot-name { font-weight: 900; font-size: max(14px, 1.8cqw); }
.clue-play, .clue-got { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; background: var(--paper); }
.clue-play .clue-slots, .clue-got .clue-slots { padding: 1.4cqh 1.4cqw; }
.clue-play .player, .clue-got .player { position: relative; inset: auto; }
.got-row { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 0; }
.clue-card { padding: 2cqh 2cqw; display: grid; gap: 1.2cqh; align-content: start; overflow: auto; border-left: 2px solid var(--ink); }
.clue-card .got { font-weight: 900; font-size: max(12px, 1.3cqw); color: var(--mint-ink); }
.clue-card h3 { font-size: max(20px, 2.8cqw); }
.clue-card .quote { font-size: max(13px, 1.45cqw); }
.got-line { font-weight: 900; background: var(--mint); padding: .3em .6em; font-size: max(14px, 1.6cqw); }
.clue-card .answers { display: grid; gap: .8cqh; font-size: max(12px, 1.3cqw); border-top: 1px solid var(--line); padding-top: 1cqh; }
.clue-live, .note-progress { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; }
.live-card { border: 2px solid var(--ink); padding: 1.6cqh 1.6cqw; display: grid; gap: 1cqh; font-size: max(14px, 1.7cqw); }
.live-card b { font-size: max(16px, 2cqw); }
.hypo-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2cqw; align-items: center; font-size: max(15px, 2cqw); }
.quote.big { font-size: max(18px, 2.6cqw); }

/* 그래프·1초 막대 */
.g-row { display: grid; grid-template-columns: 1fr 28%; gap: 2cqw; align-items: start; min-height: 0; }
.share .graph { max-height: 52cqh; border: 2px solid var(--ink); }
.legend { color: var(--muted); font-size: max(12px, 1.3cqw); }
.sec-bars { border: 2px solid var(--ink); padding: 1.4cqh 1.2cqw; display: grid; gap: 1cqh; }
.sec-title { font-weight: 900; font-size: max(13px, 1.5cqw); }
.sec-bar { display: grid; grid-template-columns: 6em 1fr 3.6em; gap: .6cqw; align-items: center; font-size: max(12px, 1.3cqw); }
.sec-lab { font-weight: 800; }
.sec-track { height: max(10px, 1.6cqh); border: 1px solid var(--ink); }
.sec-fill { display: block; height: 100%; }
.sec-val { text-align: right; font-weight: 900; }

/* 판정 */
#b-verdict { display: grid; gap: 1.8cqh; }
.v-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2cqw; align-items: start; }
.v-grid .graph { max-height: 42cqh; }
.bars { display: grid; gap: 1.6cqh; }
.vbar { display: grid; grid-template-columns: 1fr 5.5em; grid-template-areas: "lab lab" "rule val"; gap: .4em 1em; align-items: center; }
.vbar-lab { grid-area: lab; font-weight: 800; font-size: max(13px, 1.5cqw); }
.vbar .ruler { grid-area: rule; height: max(14px, 2.6cqh); }
.vbar.rex .ruler-fill { background: var(--rex); }
.vbar.chatbar .ruler-fill { background: var(--bad); }
.vbar-val { grid-area: val; font-weight: 900; font-size: max(18px, 2.6cqw); }
.finding { font-size: max(14px, 1.6cqw); }
.race2 { display: grid; gap: 2cqh; }
.race-row { display: grid; grid-template-columns: 12cqw 1fr 12cqw; gap: 1.6cqw; align-items: center; }
.race-row .ruler { height: max(14px, 3cqh); }
.race-row.rex .ruler-fill { background: var(--rex); }
.race-name { font-weight: 900; font-size: max(16px, 2.2cqw); display: grid; }
.race-name small, .race-val small { font-size: max(12px, 1.2cqw); color: var(--muted); font-weight: 700; }
.race-val { font-weight: 900; font-size: max(20px, 3cqw); display: grid; }
.ask { font-weight: 900; font-size: max(18px, 2.6cqw); }
.ask.dim { font-weight: 700; color: var(--muted); font-size: max(15px, 2cqw); }
.safety { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6cqw; }
.safety article { border: 2px solid var(--ink); padding: 1.6cqh 1.4cqw; display: grid; gap: 1cqh; align-content: start; font-size: max(13px, 1.5cqw); }
.safety h3 { font-size: max(15px, 1.9cqw); }
.safety-videos { display: flex; gap: 1cqw; align-items: center; flex-wrap: wrap; }
.video-dlg { width: min(90vw, 1280px); border: 2px solid var(--ink); padding: 12px; display: grid; gap: 10px; }
.video-dlg iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* 댓글·노트·새 상황·정리 */
.clist, .wrap-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; }
.cm { border: 2px solid var(--ink); padding: 1.6cqh 1.6cqw; display: grid; gap: .8cqh; font-size: max(14px, 1.7cqw); }
.cm.wait { color: var(--muted); border-color: var(--line); }
.cm-who { font-weight: 900; }
.cm b { font-weight: 900; }
.wa-final { font-weight: 800; font-size: max(15px, 1.9cqw); }
.wa-self { display: flex; gap: .4em; align-items: center; flex-wrap: wrap; }
.dotc { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; padding: 0; cursor: pointer; }
.dotc.on { background: var(--mint); }
.note-cmp { width: 100%; border-collapse: collapse; font-size: max(11px, 1.25cqw); }
.note-cmp th, .note-cmp td { border-bottom: 1px solid var(--line); padding: .5cqh .6cqw; vertical-align: top; text-align: left; }
.note-cmp .from { color: var(--muted); font-weight: 800; white-space: nowrap; }
.note-cmp .blanks { line-height: 1.7; }
.rex-line { display: grid; grid-template-columns: auto 1fr; gap: 1.4cqw; align-items: center; font-size: max(15px, 2cqw); }
.rex-line img { width: 7cqw; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 3px solid var(--ink); }
.tr-calc { display: flex; gap: 1.6cqw; flex-wrap: wrap; }
.tr-box { border: 2px solid var(--ink); padding: 1.2cqh 1.6cqw; min-width: 18cqw; }
.tr-box.warn { background: var(--surface); border-color: var(--bad); }
.tr-num { font-weight: 900; font-size: max(24px, 4cqw); line-height: 1.1; }
.tr-ans { display: grid; gap: 1cqh; }
.share.sh-final .share-body { align-content: center; }
.final-card { display: grid; grid-template-columns: 26cqw 1fr; gap: 4cqw; align-items: center; }
.final-card img { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--mint); object-fit: cover; }
.final-card > div { display: grid; gap: 1.4cqh; justify-items: start; }
.final-old { font-size: max(16px, 2.2cqw); color: var(--muted); text-decoration: line-through; }
.final-new { font-weight: 900; font-size: max(40px, 7cqw); line-height: 1.05; }

/* ---------- 노트북: 판정단 기록지 ---------- */
body[data-role="student"] { background: var(--desk); }
.student { display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; }
.s-headbar { display: flex; gap: 14px; align-items: center; padding: 10px 20px; background: var(--ink); color: var(--paper); }
.s-who { background: var(--mint); color: var(--ink); font-weight: 900; padding: .15em .7em; }
.s-stage { font-weight: 800; margin-right: auto; }
.s-headbar .status { color: #bdbdbd; }
.s-headbar .btn { background: transparent; color: var(--paper); border-color: #8a8a8a; }
.s-view { width: min(1200px, calc(100% - 32px)); margin: 16px auto 32px; padding: 28px 32px; border: 2px solid var(--ink); }
.sheet-sec { display: grid; gap: 16px; }
.sheet-sec > h2 { font-size: var(--s-head); }
.lab { font-weight: 800; font-size: var(--s-small); color: var(--muted); }
.look { display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: center; min-height: 50vh; }
.s-look { display: block; }
.look img { width: 140px; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--ink); object-fit: cover; }
.look .lead { font-size: clamp(22px, 2.4vw, 32px); font-weight: 800; }
.cover-title { font-size: var(--s-display); line-height: 1; }
.cover-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: var(--s-lead); }
.cover-dl dt { color: var(--muted); font-weight: 800; }
.cover-dl dd { font-weight: 900; }
.today { padding-left: 1.4em; display: grid; gap: 4px; font-size: var(--s-lead); font-weight: 700; }
.q { font-weight: 900; font-size: clamp(28px, 3.4vw, 48px); line-height: 1.25; }

.steps { list-style: none; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; font-weight: 800; }
.steps li { display: flex; gap: 8px; align-items: center; }
.sw { width: 22px; height: 22px; display: inline-block; border: 2px solid var(--ink); }
.sw.red { background: #d8363e; }
.sw.green { background: #1fae78; }
.sw.ink { background: var(--ink); }
.react-box { width: 100%; height: 46vh; border: 2px solid var(--ink); cursor: pointer; display: grid; place-content: center; gap: 8px; color: #fff; font-family: var(--font); }
.react-big { font-weight: 900; font-size: clamp(36px, 5vw, 72px); }
.react-small { font-weight: 700; font-size: 20px; opacity: .85; }
.react-box.wait { background: var(--ink); }
.react-box.red { background: #d8363e; }
.react-box.green { background: #1fae78; }
.react-list { display: flex; gap: 10px; padding: 0; list-style: none; font-size: 20px; font-weight: 800; flex-wrap: wrap; }
.react-list li { border: 2px solid var(--ink); padding: 4px 12px; }

.vs-card .vs-num { font-size: 20px; }
.s-view .vs-name { font-size: 24px; }
.frame { font-size: 20px; }
.frame .blanks { line-height: 2.3; }
.choices { display: flex; gap: 10px; flex-wrap: wrap; }

/* 단서(노트북) */
.clue-list { display: grid; gap: 32px; }
.clue { display: grid; gap: 16px; }
.clue-head { display: grid; gap: 2px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.clue-n { font-weight: 900; color: var(--muted); font-size: var(--s-small); }
.clue-head h2 { font-size: var(--s-head); }
.task { font-size: var(--s-lead); font-weight: 700; }
.blanks-box { background: var(--surface); padding: 14px 18px; display: grid; gap: 8px; font-size: 19px; }
.clue.done .blanks-box { background: var(--paper); border: 2px solid var(--ink); }
.clue-quote { display: grid; gap: 10px; }

/* 시뮬레이션: 위에서 본 도로 */
.sim { display: grid; gap: 14px; }
.road-wrap { display: grid; gap: 6px; padding-top: 44px; }
.sim-race .road-wrap { padding-top: 8px; }
.lane { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; align-items: center; }
.lane-lab { font-weight: 800; font-size: 15px; }
.lane-road { position: relative; height: 64px; background: url("assets/img/kenney/asphalt.png") 0 0 / 64px 64px, #9fb3b6; background-blend-mode: normal; border-top: 4px solid #e8e3d6; border-bottom: 4px solid #e8e3d6; overflow: visible; }
.lane-road::after { content: ""; position: absolute; inset: 0; background: rgba(200, 60, 50, .34); pointer-events: none; }
.lane-car { position: absolute; top: 50%; height: 52px; width: auto; transform: translate(-100%, -50%) rotate(90deg); transform-origin: center; z-index: 2; margin-left: -6px; }
.flag { position: absolute; top: -26px; bottom: -8px; width: 0; border-left: 2px solid var(--ink); z-index: 3; }
.flag b { position: absolute; top: -4px; left: 0; transform: translate(-50%, -100%); background: var(--ink); color: #fff; font-size: 13px; padding: 2px 6px; white-space: nowrap; }
.flag.start { left: 0; }
.flag.end { border-left-color: var(--bad); }
.flag.end b { background: var(--bad); }
.bracket { position: absolute; left: 0; bottom: -26px; height: 10px; border: 2px solid var(--ink); border-top: 0; z-index: 3; }
.bracket-lab { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); font-weight: 900; font-size: 14px; white-space: nowrap; }
.road-scale { display: grid; grid-template-columns: 1fr; margin-left: calc(9.5em + 10px); position: relative; padding-top: 30px; padding-bottom: 24px; }
.road-scale > span { position: absolute; top: 46px; font-size: 13px; font-weight: 800; transform: translateX(-50%); }
.road-scale > span:nth-of-type(1) { left: 0; }
.road-scale > span:nth-of-type(2) { left: 33.33%; }
.road-scale > span:nth-of-type(3) { left: 66.66%; }
.road-scale > span:nth-of-type(4) { left: 100%; }
.sim-race .road-scale > span:nth-of-type(2) { left: 50%; }
.sim-race .road-scale > span:nth-of-type(3) { left: 100%; }
.sim-race .road-scale { padding-top: 6px; }
.sim-race .road-scale > span { top: 22px; }
.time-ctl { display: grid; gap: 4px; margin-top: 24px; }
.time-range { width: 100%; accent-color: var(--ink); height: 28px; }
.time-ticks { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--muted); }
.readout { font-size: 22px; }
.readout b { background: var(--mint); padding: 0 .3em; }
.race { display: grid; gap: 10px; border-top: 2px solid var(--ink); padding-top: 12px; }
.race h3 { font-size: 22px; display: grid; }
.race h3 small { font-size: 16px; font-weight: 700; color: var(--muted); }
.race-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.finish { position: absolute; top: -4px; bottom: -4px; border-left: 3px dashed #fff; z-index: 1; color: #fff; font-size: 12px; font-weight: 800; padding-left: 4px; }
.race-result { font-size: 18px; min-height: 1.5em; }
.race-result b { background: var(--mint); padding: 0 .3em; }
.sec-step { display: grid; gap: 10px; border-top: 2px solid var(--ink); padding-top: 12px; }
.sec-step h3 { font-size: 22px; display: grid; }
.sec-step h3 small { font-size: 16px; font-weight: 700; color: var(--muted); }
.guess { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; }
.guess-out { font-size: 28px; font-weight: 900; min-width: 3em; }
.slice-bars { display: grid; gap: 10px; }
.slice-row { display: grid; grid-template-columns: 4em 1fr 7em; gap: 10px; align-items: center; animation: rise .4s ease-out both; animation-delay: var(--d); }
/* taste-skill-ignore: 1시간을 60분·3600초로 쪼갠 칸(내용 그림) */
.slice-strip { height: 22px; border: 2px solid var(--ink); position: relative; background-image: repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 100%); }
.slice-strip.n0 { background: var(--surface); }
.slice-strip.n1 { background-image: repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px calc(100% / 60)); }
.slice-strip.n2 { background-image: repeating-linear-gradient(to right, var(--muted) 0 1px, transparent 1px 3px); }
.piece { position: absolute; left: 0; top: 0; bottom: 0; background: var(--mint); border-right: 2px solid var(--ink); }
.slice-strip.n0 .piece { width: 100%; }
.slice-strip.n1 .piece { width: calc(100% / 60); }
.slice-strip.n2 .piece { width: 3px; }
.compare { display: grid; gap: 8px; margin-top: 8px; }
.cmp { display: grid; grid-template-columns: 6em 1fr 5em; gap: 10px; align-items: center; font-weight: 800; }
.cmp-track { height: 18px; border: 2px solid var(--ink); }
.cmp-fill { display: block; height: 100%; background: var(--surface); }
.cmp.rex .cmp-fill { background: var(--rex); }
.cmp.real .cmp-fill { background: var(--mint); }

/* 운전(조사 1·2) */
.s-drive { display: grid; gap: 12px; }
.drive-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.speeds { display: flex; gap: 6px; align-items: center; margin-right: auto; }
.speed { font: 900 22px var(--font); background: var(--paper); color: var(--ink); border: 2px solid var(--line); padding: .2em .55em; cursor: pointer; border-radius: 0; }
.speed small { font: 700 11px var(--font); margin-left: 2px; }
.speed.on { border-color: var(--ink); background: var(--mint); }
.speed:disabled { opacity: .3; cursor: default; }
.scale-note { font-weight: 900; }
.road-box { position: relative; margin: 0 -32px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.road { display: block; width: 100%; height: 340px; }
.drive-chat { position: absolute; top: 10px; right: 14px; width: min(400px, 42%); display: grid; gap: 6px; }
.chat-q { background: var(--paper); border: 2px solid var(--ink); padding: 8px 10px; font-size: 18px; transition: opacity .25s; }
.chat-q b { color: var(--bad); margin-right: .3em; }
.chat-q.right { background: var(--mint); opacity: 0; }
.chat-q.wrong { opacity: 0; }
.chat-opts { display: flex; gap: 6px; margin-top: 6px; }
.chat-opts button { font: 900 18px var(--font); background: var(--surface); color: var(--ink); border: 2px solid var(--ink); padding: .2em .9em; cursor: pointer; border-radius: 0; }
.rex-quip { position: absolute; right: 14px; bottom: 12px; background: var(--rex); color: var(--ink); border: 2px solid var(--ink); padding: 6px 12px; font-weight: 800; }
.drive-bottom { display: grid; grid-template-columns: 1fr minmax(320px, 40%); gap: 18px; align-items: start; }
.result { border: 2px solid var(--ink); padding: 14px 16px; display: grid; gap: 10px; min-height: 160px; align-content: start; }
.res-head { display: flex; gap: 32px; }
.big-num { font-weight: 900; font-size: 40px; line-height: 1.1; }
.big-num small { font-weight: 700; font-size: 15px; margin-left: 3px; }
.ruler-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--surface); padding: 10px 14px; font-weight: 800; }
.ruler-form .field.cm { width: 6.5em; display: inline-block; font-size: 24px; font-weight: 900; padding: .2em .5em; }
.reveal { display: grid; gap: 6px; justify-items: start; }
.record { font-size: 19px; font-weight: 800; }
.record .tag { background: var(--ink); color: #fff; font-size: 13px; padding: 2px 6px; margin-right: 8px; }
.drive-side { border: 2px solid var(--ink); padding: 12px; display: grid; gap: 8px; }
.drive-side h3 { font-size: 16px; color: var(--muted); }
.mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini th, .mini td { text-align: right; padding: 3px 6px; border-bottom: 1px solid var(--line); }
.mini th:first-child, .mini td:first-child { text-align: left; }
.s-cal { display: grid; gap: 16px; }
.cal-paper { padding: 28px 0 28px 28px; overflow: hidden; border: 2px solid var(--ink); }
.cal-bar { position: relative; height: 40px; display: flex; justify-content: space-between; align-items: flex-end; font: 800 12px var(--font); padding: 0 4px; }
.cal-bar .ruler { position: absolute; left: 0; right: 0; top: 0; height: 22px; }
.cal-bar .ruler-fill { width: 100%; }
.cal-ctrl { display: flex; gap: 12px; align-items: center; }
.cal-range { flex: 1; accent-color: var(--ink); }

/* 판정·댓글·정리(노트북) */
.s-view .vbar-lab { font-size: 16px; }
.s-view .vbar .ruler { height: 22px; }
.s-view .vbar-val { font-size: 26px; }
.comment { display: grid; gap: 14px; }
.cfield { display: grid; gap: 4px; font-weight: 800; }
.cfield > span { color: var(--muted); font-size: var(--s-small); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.note-list { padding-left: 1.4em; display: grid; gap: 14px; font-size: 19px; }
.note-list .from { display: block; font-size: 13px; font-weight: 800; color: var(--muted); }
.practice { background: var(--surface); padding: 12px 16px; }
.promise { font-weight: 900; font-size: 20px; }
.self-dots { display: inline-flex; gap: 8px; vertical-align: middle; }
.self-dots .dotc { width: 30px; height: 30px; }
.s-view .tr-num { font-size: 40px; }
.s-view .tr-box { min-width: 200px; padding: 10px 16px; }
.s-view .rex-line { font-size: 20px; }
.s-view .rex-line img { width: 72px; }

/* 기록지 인쇄(A4) */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  html, body, body[data-role] { background: #fff !important; color: #000 !important; height: auto; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; background: #fff; color: #33373A; }
  .sheet { page-break-after: always; break-after: page; font-size: 8.6pt; line-height: 1.35; color: #33373A; background: #fff; display: grid; gap: 2.4mm; }
  .sheet section { break-inside: avoid; }
  .sheet .muted { color: #555; }
  .sheet:last-child { page-break-after: auto; }
  .sheet h1 { font-size: 18pt; }
  .sheet h2 { font-size: 9.5pt; border-bottom: 1.2pt solid #EE8546; padding-bottom: .6mm; margin-bottom: 1mm; }
  .sheet-head { display: flex; justify-content: space-between; align-items: end; border-bottom: 3pt solid #EE8546; padding-bottom: 2mm; }
  .sheet-head dl { display: grid; grid-template-columns: auto auto; gap: 0 3mm; font-size: 10pt; }
  /* 너도양 이름표: 학습지 이름 칸 = 흰 카드 + 주황 테두리 + 펀치 구멍 */
  .sheet-tag { position: relative; border: 2pt solid #EE8546; border-radius: 4mm; padding: 1.6mm 3mm 1.6mm 8mm; }
  .sheet-tag::before { content: ""; position: absolute; left: 2.4mm; top: 50%; width: 3mm; height: 3mm; transform: translateY(-50%); border: 1.6pt solid #EE8546; border-radius: 50%; box-sizing: border-box; }
  .sheet-brand { display: flex; justify-content: space-between; align-items: center; gap: 4mm; }
  .sheet-brand img { width: 11mm; height: auto; }
  .sheet-head dt { color: #555; }
  .sheet-kicker { font-size: 9pt; color: #555; font-weight: 800; }
  .sheet-q { font-size: 12pt; }
  .sheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
  .sheet-clue { display: grid; gap: 1mm; margin-bottom: 1.5mm; }
  .sheet .blanks { line-height: 1.6; }
  .sheet .bl { min-width: 3em; }
  .sheet .bl.ok { background: #FDE7D6; }
  .sheet .graph { max-height: 42mm; border: 1pt solid #000; }
  .sheet .bl-opt, .sheet .bl { font-size: 8.6pt; }
  .sheet ol { columns: 2; column-gap: 6mm; }
  .sheet .mini { font-size: 9pt; }
  .sheet ol, .sheet ul { padding-left: 5mm; }
  .sheet-foot { border-top: 1.5pt solid #EE8546; padding-top: 2mm; }
}

@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* 좁은 칠판 창(녹화 상황 960폭)·좁은 노트북 */
@media (max-width: 1100px) {
  .b-main { grid-template-columns: 1fr; grid-template-rows: auto 220px; }
  .screen, .channel { width: 100%; }
  .b-chat { border-left: 0; border-top: 1px solid var(--ink-3); }
  .dots { display: none; }
  .t-stage { margin-right: auto; }
  .home-grid, .drive-bottom { grid-template-columns: 1fr; }
  .s-view { padding: 20px; }
  .road-box { margin: 0 -20px; }
}
@media (max-width: 720px) {
  .home { margin: 12px; padding: 20px; }
  .home-head { grid-template-columns: 72px 1fr; gap: 16px; }
  .home-face { width: 72px; height: 72px; }
  .lane { grid-template-columns: 1fr; }
  .road-scale { margin-left: 0; }
}

/* 칠판: 학생 시뮬레이션을 작게 비춰 보기 */
.mini-road { position: relative; height: 7cqh; background: url("assets/img/kenney/asphalt.png") 0 0 / 4cqh 4cqh, #9fb3b6; border-top: 3px solid #e8e3d6; border-bottom: 3px solid #e8e3d6; margin: 2.6cqh 0 1cqh; }
.mini-road::after { content: ""; position: absolute; inset: 0; background: rgba(200, 60, 50, .34); }
.mr-flag { position: absolute; left: 0; top: -2.4cqh; bottom: -.6cqh; border-left: 2px solid var(--ink); z-index: 2; }
.mr-flag.end { border-left-color: var(--bad); }
.mr-car { position: absolute; top: 50%; height: 5.6cqh; transform: translate(-100%, -50%) rotate(90deg); z-index: 3; }
.mr-lab { position: absolute; right: .6cqw; top: -2.4cqh; font-weight: 900; font-size: max(13px, 1.4cqw); }
.mini-cmp { display: grid; gap: .8cqh; margin: 1cqh 0; }
.mini-bar { display: grid; grid-template-columns: 11cqw 1fr 5cqw; gap: .8cqw; align-items: center; font-size: max(12px, 1.3cqw); }
.mb-track { height: 1.8cqh; border: 1px solid var(--ink); }
.mb-fill { display: block; height: 100%; background: var(--surface); }
.mini-bar.rex .mb-fill { background: var(--rex); }
.mini-bar.real .mb-fill { background: var(--mint); }

/* =================== 너도양 겉모양 (v004) =================== */
/* 모양 규칙: 이름표 — 흰 카드 + 주황 테두리 + 펀치 구멍(주황 고리) */
.nametag { position: relative; background: var(--paper); border: 3px solid var(--orange); border-radius: 16px; padding-left: 2.2em; }
.nametag::before { content: ""; position: absolute; left: .7em; top: 50%; width: .8em; height: .8em; transform: translateY(-50%); border: 3px solid var(--orange); border-radius: 50%; background: var(--paper); box-sizing: border-box; }

/* 둥근 모서리(견본처럼 부드럽게), 그림자 없음 */
.btn, .chip, .field, .bl-opt, .speed, .chat-opts button, .tv-btn { border-radius: 10px; }
.home, .home-card, .s-view, .result, .drive-side, .cal-paper, .safety article, .cm, .live-card, .vs-card, .tr-box, .sec-bars, .b-manual, .video-dlg, .cm-pop, .callout, .quote, .blanks-box { border-radius: var(--radius); }
.btn { font-weight: 700; }
.btn.primary { background: var(--deep); border-color: var(--orange); }
.btn.primary:hover { background: #f3bd96; filter: none; }
.btn:focus-visible, .chip:focus-visible, .bl-opt:focus-visible, .field:focus-visible, .speed:focus-visible { outline-color: var(--orange); }
.chip.on, .bl-opt.on, .bl-opt.ok, .speed.on, .slot.on, .dotc.on { border-color: var(--orange); }
.bl.ok { background: var(--deep); }
.ruler-fill { background: var(--deep); }
.g-bar { border-radius: 8px; overflow: hidden; border-color: var(--orange); }
.g-bar span { background: var(--deep); }
.note, .good { color: var(--ink); }
.readout b, .race-result b, .got-line, .s-who { background: var(--deep); }
.got-line { text-decoration: underline 3px var(--orange); text-underline-offset: 5px; }
.clue-card .got { color: var(--ink); text-decoration: underline 3px var(--orange); text-underline-offset: 4px; }

/* 처음 화면·저장 화면: 살구 면 위 흰 종이 */
body[data-role="home"] { background: var(--apricot); }
.home { border: 0; }
.home-card { border: 3px solid var(--orange); position: relative; padding-top: 28px; }
.home-card::before { content: ""; position: absolute; left: 18px; top: 14px; width: 14px; height: 14px; border: 3px solid var(--orange); border-radius: 50%; box-sizing: border-box; }
.home-card h2 { padding-left: 26px; margin-top: -6px; }
.home-ruler { color: var(--ink); }
.brand-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 16px; border-top: 3px solid var(--orange); }
.brand-foot .sheep { display: flex; align-items: flex-end; gap: 6px; }
.brand-foot .sheep img { display: block; height: auto; }
.brand-foot .sheep .t { width: 74px; }
.brand-foot .sheep .l { width: 46px; }
.brand-foot .logo { width: 64px; height: auto; }
.brand-foot p { font-size: var(--s-small); color: var(--muted); }

/* 전자칠판: 살구 면 + 방송 화면(숯) + 흰 채팅 종이 + 진한 살구 선생님 줄 */
body[data-role="board"] { background: var(--apricot); color: var(--ink); }
.screen { background: var(--ink); border-radius: 10px; }
.player, .tv-video, .tv iframe { background: var(--ink); }
.ch-name { color: var(--muted); }
.ch-name b { color: var(--ink); }
.board .chip { background: var(--paper); color: var(--muted); border-color: var(--deep); }
.board .chip.on { background: var(--deep); color: var(--ink); border-color: var(--orange); }
.b-chat { background: var(--paper); color: var(--ink); border-left: 0; border-radius: 12px; margin: 8px 8px 8px 0; overflow: hidden; border: 3px solid var(--deep); }
.chat-head { border-bottom: 3px solid var(--orange); }
.chatlist li b { color: var(--muted); }
.chatlist li.judge b { color: var(--ink); text-decoration: underline 2px var(--orange); text-underline-offset: 3px; }
.b-teacher { background: var(--deep); color: var(--ink); border-top: 3px solid var(--orange); }
.t-room b { color: var(--ink); text-decoration: underline 3px var(--orange); text-underline-offset: 4px; }
.dot { background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.dot.past { background: var(--ink); }
.dot.on { background: var(--orange); border-color: var(--orange); }
.status { color: var(--muted); }
.status[data-s="online"] { color: var(--ink); }
.status[data-s="trouble"], .status[data-s="offline"] { color: var(--bad); }
.b-teacher .btn { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.b-teacher .btn.primary { background: var(--paper); color: var(--ink); border-color: var(--orange); border-width: 3px; }
.t-logo { width: 34px; height: auto; display: block; }
.tv-ctrl { background: var(--ink); }
.tv-btn.primary { background: var(--deep); color: var(--ink); border-color: var(--orange); }
.hype-src { background: var(--ink); color: var(--cream); }
.tv-pos { color: inherit; opacity: .8; }
.tv-comment { background: var(--apricot); }
.rex-read { border-color: var(--ink); border-radius: 12px; }
.cm-pop { border: 4px solid var(--orange); }
.share .chip.on { background: var(--deep); border-color: var(--orange); }
.final-card img { border-color: var(--orange); }

/* 노트북: 살구 책상 위 흰 기록지, 머리에 이름표 */
body[data-role="student"] { background: var(--apricot); }
.s-headbar { background: var(--deep); color: var(--ink); border-bottom: 3px solid var(--orange); }
.s-headbar .status { color: var(--muted); }
.s-headbar .btn { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.s-who { background: var(--paper); border: 3px solid var(--orange); border-radius: 12px; padding: .1em .8em .1em 1.9em; position: relative; }
.s-who::before { content: ""; position: absolute; left: .55em; top: 50%; width: .75em; height: .75em; transform: translateY(-50%); border: 3px solid var(--orange); border-radius: 50%; box-sizing: border-box; }
.s-view { border: 0; }
.clue-head { border-bottom: 3px solid var(--orange); }
.race, .sec-step, .road-box { border-top-color: var(--deep); }
.piece { background: var(--deep); }
.cmp.real .cmp-fill { background: var(--deep); }
.chat-q.right { background: var(--deep); }

/* 너도양 인트로(칠판, 수업 시작 때 한 번): 9:16 정본 컷을 살구 바탕 가운데에 */
.brand-intro { position: fixed; inset: 0; z-index: 50; background: var(--apricot); display: grid; place-items: center; cursor: pointer; transition: opacity .25s; }
.brand-intro.out { opacity: 0; }
.brand-intro-v { height: 100dvh; width: auto; max-width: 100vw; aspect-ratio: 9 / 16; object-fit: contain; background: var(--apricot); }
@media (max-width: 1100px) {
  .b-chat { margin: 8px; }
  .t-logo { display: none; } /* 좁은 칠판에서 선생님 줄이 두 줄로 넘어가지 않게(v003 단계 점 숨김과 같은 이유) */
}
