/* 학던 수업 화이트보드 와이어프레임 — sketchy low-fi system */

@font-face { font-family: "Pretendard"; font-weight: 400; src: url("fonts/Pretendard-Regular.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Pretendard"; font-weight: 500; src: url("fonts/Pretendard-Medium.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Pretendard"; font-weight: 600; src: url("fonts/Pretendard-SemiBold.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Pretendard"; font-weight: 700; src: url("fonts/Pretendard-Bold.woff") format("woff"); font-display: swap; }

:root {
  --ink: #1b1c1e;
  --ink-2: #46474c;
  --ink-3: #70737c;
  --ink-4: #aeb0b6;
  --paper: #faf7ef;
  --paper-2: #f3eedf;
  --line: #1b1c1e;
  --accent: #0066ff;
  --accent-2: #ffd84a; /* highlighter */
  --warn: #ff4242;
  --ok: #00bf40;
  --spirit: #9747ff;
  --font-sketch: "Gaegu", "Pretendard", system-ui, sans-serif;
  --font-text: "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-text);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}

/* ── shell ── */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 24px 80px;
}

.shell-title {
  font-family: var(--font-sketch);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 8px 0 4px;
}
.shell-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 18px;
  max-width: 880px;
  text-align: center;
  line-height: 1.5;
}

/* ── tabs ── */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 4px;
  box-shadow: 4px 4px 0 var(--ink);
}
.tab {
  font-family: var(--font-sketch);
  font-size: 17px;
  font-weight: 700;
  padding: 8px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-2);
  border-radius: 2px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.tab small {
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 500;
  display: block;
  color: var(--ink-4);
  margin-top: 1px;
}
.tab:hover { background: var(--paper-2); }
.tab.active {
  background: var(--ink);
  color: var(--paper);
}
.tab.active small { color: var(--paper-2); opacity: .8; }

/* ── stage (16:9 frame for variants) ── */
.stage-wrap {
  width: 100%;
  max-width: 1600px;
  aspect-ratio: 16/9;
  position: relative;
}
.stage {
  width: 1600px;
  height: 900px;
  background: var(--paper);
  border: 3px solid var(--ink);
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  overflow: hidden;
  box-shadow: 10px 10px 0 var(--ink);
}

/* outer bezel hint (전자칠판 frame) */
.stage::before {
  content: "전자칠판 · 전체 공유 화면 (1920×1080)";
  position: absolute;
  top: -28px;
  left: 6px;
  font-family: var(--font-sketch);
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: -0.01em;
}

/* ── sketchy primitives ── */
.box {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 12px 14px;
  position: relative;
}
.box.dashed { border-style: dashed; }
.box.thin { border-width: 1.5px; }
.box.muted { background: var(--paper-2); }
.box.dark { background: var(--ink); color: var(--paper); }
.box.accent { background: var(--accent); color: #fff; border-color: var(--ink); }

.box-title {
  font-family: var(--font-sketch);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  text-transform: uppercase;
}
.box-title::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--ink);
  border-radius: 50%;
}
.box.dark .box-title { color: var(--paper-2); }
.box.dark .box-title::before { background: var(--accent-2); }

/* corner tag (variant label etc) */
.corner-tag {
  position: absolute;
  top: -1px;
  right: -1px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sketch);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  letter-spacing: 0.04em;
}

/* hatched fill */
.hatched {
  background-image: repeating-linear-gradient(
    45deg,
    var(--ink) 0,
    var(--ink) 1.2px,
    transparent 1.2px,
    transparent 7px
  );
  opacity: 0.18;
}

/* sketchy underline */
.sketch-u {
  background-image: linear-gradient(transparent 80%, var(--accent-2) 80%, var(--accent-2) 95%, transparent 95%);
  padding: 0 2px;
}

/* labels in placeholder boxes */
.placeholder {
  font-family: var(--font-sketch);
  color: var(--ink-3);
  font-size: 14px;
}

/* pill chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--paper);
  white-space: nowrap;
}
.chip.dark { background: var(--ink); color: var(--paper); }
.chip.accent { background: var(--accent); color: #fff; border-color: var(--ink); }
.chip.warn { background: var(--warn); color: #fff; border-color: var(--ink); }
.chip.ok { background: var(--ok); color: #fff; border-color: var(--ink); }
.chip.yellow { background: var(--accent-2); color: var(--ink); border-color: var(--ink); }
.chip.spirit { background: var(--spirit); color: #fff; border-color: var(--ink); }
.chip.ghost { background: transparent; color: var(--ink-3); border-style: dashed; }

/* button look */
.btn {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 6px 12px;
  font-family: var(--font-sketch);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.warn { background: var(--warn); color: #fff; }
.btn.lg { padding: 10px 18px; font-size: 19px; }

/* ── annotations ── */
.anno {
  position: absolute;
  font-family: var(--font-sketch);
  font-size: 14px;
  color: var(--accent);
  pointer-events: none;
  z-index: 50;
}
.anno-box {
  background: var(--accent-2);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 3px 8px;
  font-weight: 700;
  display: inline-block;
  transform: rotate(-1.5deg);
}
.anno-arrow {
  position: absolute;
}
.anno-mute { color: var(--ink-3); }

/* hide annotations toggle */
.no-anno .anno { display: none; }

/* student tile */
.s-tile {
  border: 1.5px solid var(--ink);
  background: var(--paper);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  position: relative;
}
.s-tile.hand { background: var(--accent-2); }
.s-tile.correct { background: var(--ok); color: #fff; border-color: var(--ink); }
.s-tile.wrong { background: #ffd9d9; }
.s-tile.muted { color: var(--ink-4); background: var(--paper-2); }

.s-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.s-tile.correct .s-avatar { background: var(--paper); color: var(--ink); }

/* voice wave */
.wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 18px;
}
.wave i {
  display: block;
  width: 3px;
  background: var(--ink);
  border-radius: 1px;
}
.wave.lg i { width: 4px; }
.wave.accent i { background: var(--accent); }

/* mic pulse */
.mic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(255,66,66,0.25);
}

/* tiny grid utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; min-width: 0; min-height: 0; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.ai-center { align-items: center; }
.txt-c { text-align: center; }

/* footer note */
.footer-note {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-sketch);
  max-width: 880px;
}
.footer-note kbd {
  font-family: var(--font-text);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

/* legend strip */
.legend {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  font-family: var(--font-sketch);
  font-size: 13px;
  color: var(--ink-2);
  flex-wrap: wrap;
  justify-content: center;
}
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 14px; border: 1.5px solid var(--ink); display: inline-block; }
.legend i.hand { background: var(--accent-2); }
.legend i.correct { background: var(--ok); }
.legend i.wrong { background: #ffd9d9; }
.legend i.idle { background: var(--paper); }

/* utility text */
.t-sketch { font-family: var(--font-sketch); }
.t-mute { color: var(--ink-3); }
.t-strong { font-weight: 700; }
.t-tiny { font-size: 10px; }
.t-sm { font-size: 12px; }
.t-md { font-size: 14px; }
.t-lg { font-size: 18px; }
.t-xl { font-size: 24px; }
.t-2xl { font-size: 32px; }
.t-3xl { font-size: 48px; }

/* spirit orb (placeholder) */
.orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #d6c4ff 50%, #9747ff);
  border: 1.5px solid var(--ink);
  display: inline-block;
}
.orb.lg { width: 56px; height: 56px; }
.orb.xl { width: 120px; height: 120px; }
.orb.dim { filter: grayscale(.6) brightness(.95); }

/* score badge */
.score-badge {
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-family: var(--font-text);
}
.score-badge.warn { background: var(--warn); }
.score-badge.ok { background: var(--ok); }
.score-badge.accent { background: var(--accent); }
