/* ─────────────────────────────────────────────────────────────
   저장을 시작하면서 늘어난 화면들
   ─────────────────────────────────────────────────────────────
   신원 · 내 기록 · 타인평가 · 규준 현황 · 확신도 · 재검사 안내.

   style.css 와 나눈 까닭은 이것들이 **검사 자체가 아니라 저장에
   딸려 온 화면**이기 때문입니다. 나중에 저장을 걷어 내기로 하면
   이 파일과 store/ 만 지우면 됩니다.
   ───────────────────────────────────────────────────────────── */

/* ── 시작 화면 ──────────────────────────────────────────── */
.tabs-line { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); }
.tabs-line .tab {
  padding: .5rem 1rem; text-decoration: none; color: var(--ink-soft);
  border-bottom: 2px solid transparent; font-weight: 600; font-size: .95rem;
}
.tabs-line .tab.is-on { color: var(--brand); border-bottom-color: var(--brand); }
.start-form { margin-top: 1.2rem; }
.field { margin-bottom: 1.1rem; }
.field-note { font-size: .84rem; color: var(--ink-soft); margin-top: .35rem; }
.pin-input {
  max-width: 8rem; letter-spacing: .5em; text-align: center; font-size: 1.3rem;
}
.consent {
  display: flex; gap: .6rem; align-items: flex-start; cursor: pointer;
  padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .6rem;
  margin-bottom: 1rem; font-size: .92rem;
}
.consent:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft);
}
.collect-box {
  border: 1px solid var(--line); border-left: 4px solid var(--lvl-mid);
  border-radius: .8rem; padding: 1.1rem 1.2rem; background: var(--paper);
}
.cb-title { font-weight: 700; margin-bottom: .7rem; }
.cb-list { margin: 0; font-size: .9rem; }
.cb-list dt { font-weight: 600; color: var(--brand); margin-top: .55rem; }
.cb-list dd { margin: 0; color: var(--ink-soft); }

.nav-me { font-weight: 600; }
.nav-out { color: var(--ink-soft); }

/* ── 도움말 메뉴 ────────────────────────────────────────────
   이름만 늘어놓으면 「규준 현황」이 무엇인지 눌러 봐야 압니다.
   한 줄 설명을 함께 두어 누르기 전에 알 수 있게 했습니다. */
.help-menu {
  border: 1px solid var(--line); border-radius: .7rem; padding: .35rem;
  min-width: 17rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.help-menu .dropdown-item {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .55rem .7rem; border-radius: .5rem; white-space: normal;
}
.help-menu .dropdown-item:hover,
.help-menu .dropdown-item:focus { background: var(--brand-soft); }
.help-menu .dropdown-item.active {
  background: var(--brand); color: #fff;
}
[data-bs-theme="dark"] .help-menu .dropdown-item.active { color: #14121f; }
.hm-name { font-weight: 600; }
.hm-note { font-size: .8rem; color: var(--ink-soft); }
.help-menu .dropdown-item.active .hm-note { color: inherit; opacity: .8; }

/* 꼬리말 — 두 이야기를 나란히 */
.footer-lead { max-width: 40rem; }
.footer-privacy {
  border: 1px solid var(--line); border-left: 3px solid var(--lvl-mid);
  border-radius: .6rem; padding: .75rem .9rem; background: var(--paper);
}
.fp-head { font-weight: 600; font-size: .88rem; margin-bottom: .2rem; }
.footer-privacy a { color: inherit; }
.footer-privacy a:hover { color: var(--brand); }

/* ── 「결과가 걱정된다면」으로 보내는 자리 ────────────────── */
.worried-link {
  border: 1px solid var(--line); border-left: 4px solid var(--lvl-mid);
  border-radius: .8rem; padding: 1.1rem 1.2rem; background: var(--paper);
}
.wl-title { font-weight: 700; font-size: 1.02rem; }
.wl-body { font-size: .92rem; color: var(--ink-soft); margin: .3rem 0 .8rem; }

/* ── 내 기록 ────────────────────────────────────────────── */
.me-card {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem;
  border: 1px solid var(--line); border-radius: .9rem; background: var(--paper);
}
.mc-head { display: flex; gap: .5rem; align-items: center; }
.mc-head i { color: var(--brand); }
.mc-name { font-weight: 700; }
.mc-score { display: flex; align-items: baseline; gap: .4rem; }
.mc-abbr { font-size: .78rem; color: var(--ink-soft); font-weight: 700; }
.mc-num {
  font-size: 1.9rem; font-weight: 800; color: var(--brand); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mc-when, .mc-none { font-size: .84rem; color: var(--ink-soft); }
.mc-diff { font-size: .84rem; }
.mc-diff.up { color: var(--lvl-far); }
.mc-diff.down { color: var(--lvl-near); }
.me-card .btn { align-self: flex-start; margin-top: .3rem; }

.table-wrap { overflow-x: auto; }
.hist-table { width: 100%; font-size: .9rem; border-collapse: collapse; }
.hist-table th, .hist-table td {
  padding: .5rem .7rem; border-bottom: 1px solid var(--line-soft);
  text-align: left; white-space: nowrap;
}
.hist-table th { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.hist-table td.num { font-variant-numeric: tabular-nums; }
.hist-table .ci { font-size: .78rem; color: var(--ink-soft); }
.hist-table tr.is-off td {
  background: color-mix(in srgb, var(--lvl-edge) 10%, transparent);
}

.own-box {
  height: 100%; border: 1px solid var(--line); border-radius: .8rem;
  padding: 1rem 1.1rem; background: var(--paper);
}
.own-box.is-danger { border-left: 4px solid var(--lvl-edge); }
.ob-title { font-weight: 700; margin-bottom: .3rem; }
.ob-body { font-size: .88rem; color: var(--ink-soft); }
.del-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.del-form input { max-width: 14rem; }

/* 이름 · PIN 바꾸기 */
.id-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.id-form input { max-width: 14rem; }
/* PIN 두 칸은 짧게. 네 자리인데 칸이 길면 더 넣으라는 뜻으로 보입니다. */
.id-form .pin-in {
  max-width: 5.5rem; text-align: center; letter-spacing: .3em;
  font-variant-numeric: tabular-nums;
}

/* ── 재검사 안내 (8번) ──────────────────────────────────── */
.again-box {
  border: 1px solid var(--line); border-left: 4px solid var(--lvl-near);
  border-radius: .8rem; padding: .9rem 1.1rem; margin-bottom: 1.4rem;
  background: var(--paper);
}
.again-box.is-soon { border-left-color: var(--lvl-far); }
.ab-head { font-weight: 700; }
.ab-body { font-size: .9rem; color: var(--ink-soft); margin-top: .25rem; }

/* ── 확신도 (7번) ───────────────────────────────────────── */
.q-foot {
  display: flex; gap: .8rem; align-items: center; flex-wrap: wrap;
  margin-top: .6rem;
}
.q-conf {
  display: flex; gap: .35rem; align-items: center; margin-left: auto;
  flex-wrap: wrap;
}
.qc-label { font-size: .8rem; color: var(--ink-soft); }
.qc-btn {
  border: 1px solid var(--line); background: var(--paper); border-radius: 1rem;
  padding: .15rem .7rem; font-size: .8rem; cursor: pointer; color: inherit;
}
.qc-btn:hover { border-color: var(--brand); }
.qc-btn.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
[data-bs-theme="dark"] .qc-btn.is-on { color: #14121f; }

/* ── 타인평가 (6번) ─────────────────────────────────────── */
.peer-box {
  border: 1px solid var(--line); border-radius: .9rem;
  padding: 1.2rem 1.3rem; background: var(--paper);
}
.pb-lead { font-size: .95rem; }
.pb-how { padding-left: 1.2rem; font-size: .92rem; margin-bottom: 1rem; }
.pb-how li { margin-bottom: .3rem; }
.peer-ask { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.peer-ask input { max-width: 14rem; }
.peer-list { display: grid; gap: .4rem; margin-bottom: .8rem; }
.peer-row {
  display: flex; gap: .7rem; align-items: center; flex-wrap: wrap;
  padding: .55rem .8rem; border: 1px solid var(--line); border-radius: .6rem;
}
.peer-row.is-done { border-left: 3px solid var(--lvl-mid); }
.pr-label { font-weight: 600; }
.pr-code {
  font-size: 1.1rem; font-weight: 700; letter-spacing: .18em;
  color: var(--brand); background: var(--brand-soft);
  padding: .1rem .6rem; border-radius: .4rem;
}
.pr-state { font-size: .84rem; color: var(--ink-soft); }
.peer-row form { margin-left: auto; }
.pr-drop { border: 0; background: none; color: var(--ink-soft); cursor: pointer; }
.pr-drop:hover { color: var(--lvl-edge); }
.pb-privacy {
  font-size: .86rem; color: var(--ink-soft); display: grid; gap: .4rem;
  border-top: 1px solid var(--line-soft); padding-top: .8rem;
}
.code-form { display: grid; gap: .6rem; max-width: 20rem; }
.code-input {
  font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-weight: 700;
}
.peer-invite {
  border: 1px dashed var(--line); border-radius: .9rem;
  padding: 1.2rem 1.3rem; text-align: center;
}
.pi-title { font-weight: 700; font-size: 1.05rem; }
.pi-body { font-size: .92rem; color: var(--ink-soft); margin: .4rem 0 .8rem; }

.peer-compare { display: grid; gap: .8rem; }
.pc-row {
  border: 1px solid var(--line); border-radius: .7rem; padding: .8rem 1rem;
  background: var(--paper);
}
.pc-row.is-big { border-left: 4px solid var(--lvl-far); }
.pc-name { font-weight: 700; margin-bottom: .4rem; }
.pc-bars { display: grid; gap: .3rem; }
.pc-bar { display: flex; gap: .5rem; align-items: center; }
.pc-tag { font-size: .78rem; color: var(--ink-soft); width: 1.2rem; }
.pc-track {
  flex: 1 1 auto; height: .6rem; background: var(--paper-2);
  border-radius: 1rem; overflow: hidden;
}
.pc-fill { height: 100%; border-radius: 1rem; }
.pc-fill.is-self { background: var(--brand); }
.pc-fill.is-peer { background: var(--lvl-mid); }
.pc-num {
  font-size: .85rem; width: 2.4rem; text-align: right;
  font-variant-numeric: tabular-nums;
}
.pc-gap { font-size: .85rem; color: var(--ink-soft); margin-top: .35rem; }

/* ── 규준 현황 ──────────────────────────────────────────── */
.stat-row { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.stat-row li { border: 0; padding: 0; }
.pill {
  font-size: .78rem; border: 1px solid var(--line); border-radius: 1rem;
  padding: .05rem .6rem;
}
.pill.is-obs {
  border-color: var(--lvl-mid); color: var(--lvl-mid); font-weight: 600;
}
.pill-note { font-size: .74rem; color: var(--ink-soft); margin-left: .3rem; }
.adaptive-box {
  border: 1px solid var(--line); border-radius: .8rem;
  padding: 1rem 1.1rem; background: var(--paper);
}
.adaptive-box.is-on { border-left: 4px solid var(--lvl-mid); }
.ab-state { font-weight: 700; margin-bottom: .7rem; }
.ab-bars { display: grid; gap: .5rem; }
.ab-row { display: flex; gap: .7rem; align-items: center; font-size: .88rem; }
.ab-row > span:first-child { width: 6rem; color: var(--ink-soft); }
.ab-track {
  flex: 1 1 auto; height: .45rem; background: var(--paper-2);
  border-radius: 1rem; overflow: hidden;
}
.ab-fill { height: 100%; background: var(--brand); }
.ab-row .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── 소리로 낼 때 (1번) ─────────────────────────────────── */
.digit-slot .ear, .word-slot .ear {
  font-size: 2.2rem; color: var(--brand); opacity: .38;
}

/* ── 인쇄 ───────────────────────────────────────────────────
   종이에만 나오는 것은 화면에서 숨깁니다. print.css 는
   media="print" 라 화면에는 아예 실리지 않으므로, 숨기는 일은
   **이쪽에서** 해야 합니다 — 저쪽에만 적어 두면 화면에 그대로
   드러납니다. */
.print-only { display: none !important; }

/* 인쇄 단추 — 쪽 오른쪽 위에 조용히 놓습니다. 결과를 읽는 데
   방해가 되면 안 되지만, 뽑고 싶은 사람이 찾아 헤매어도 안 됩니다. */
.page-tools {
  display: flex; justify-content: flex-end; gap: .4rem;
  margin-bottom: .8rem;
}
.btn-print { white-space: nowrap; }
@media (max-width: 575px) {
  .page-tools { justify-content: stretch; }
  .btn-print { width: 100%; }
}

/* ── 검사 조건 (C) ────────────────────────────────────────── */
.cond-box { max-width: 34rem; margin-bottom: 1.2rem; }
.cond-row { display: grid; gap: .3rem; margin-bottom: .7rem; max-width: 16rem; }
.cond-box .opt {
  font-size: .78rem; color: var(--ink-soft); font-weight: 400;
  border: 1px solid var(--line); border-radius: 1rem; padding: 0 .45rem;
}

/* ── 키보드로 조작하기 (C) ────────────────────────────────── */
/* 여기까지는 마우스로만 할 수 있었습니다 — 손이 불편한 사람도,
   화면 낭독기를 쓰는 사람도 이 과제를 아예 못 했습니다. */
.corsi-cell { position: relative; }
.cc-key {
  position: absolute; right: .25rem; bottom: .1rem;
  font-size: .7rem; color: var(--ink-soft); opacity: .55;
  pointer-events: none;
}
.corsi-cell.is-on .cc-key,
.corsi-cell.is-picked .cc-key { opacity: 0; }
.corsi-cell:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.pair-choice { position: relative; }
.pc-key {
  display: inline-block; min-width: 1.2rem; margin-right: .35rem;
  font-size: .72rem; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: .3rem;
  padding: 0 .2rem;
}
.pair-choice.is-picked .pc-key { border-color: currentColor; color: inherit; }
.pair-choice:focus-visible,
.recog-word:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ── 점수 추이 ──────────────────────────────────────────
   띠(신뢰구간)를 선보다 연하게 — 그러나 없는 듯해서는 안 됩니다.
   띠가 겹치는지가 이 그림이 하는 말의 전부입니다. */
.trend-box {
  border: 1px solid var(--line); border-radius: .8rem;
  padding: .9rem 1rem; background: var(--paper);
}
.tb-head { font-weight: 700; font-size: .95rem; margin-bottom: .4rem; }
.trend { width: 100%; height: auto; }
.tr-band { fill: var(--brand); opacity: .13; }
.tr-line { fill: none; stroke: var(--brand); stroke-width: 2; }
.tr-dot { fill: var(--brand); }
.tr-num { fill: currentColor; font-size: 12px; text-anchor: middle;
          font-weight: 700; }
.tr-date { fill: var(--ink-soft); font-size: 10.5px; text-anchor: middle; }
.tr-mean { stroke: var(--line); stroke-dasharray: 4 4; }
.tr-mean-t { fill: var(--ink-soft); font-size: 10.5px; }
