/* 한길쌤 창작마당 — 리디자인 시안 (2026-10-12)
   원칙
   1) 누를 수 있는 것만 '입체 픽셀'(채운 색 + 픽셀 테두리 + 아래 그림자 + 눌림)이다.
   2) 정보 상자는 평평하다(흰 종이 + 얇은 선). 창(결과 틀)은 픽셀 테두리만 있고 그림자가 없다.
   3) 픽셀 글꼴은 로고·큰 제목·버튼·탭에만, 읽는 글은 Pretendard. */

@font-face {
  font-family: "Galmuri11";
  src: url("assets/fonts/Galmuri11.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* 색: 학교 마당 그림에서 뽑았다 */
  --cream: #fff8ea;
  --paper: #fffdf7;
  --paper-2: #fff3d9;
  --ink: #2b1e15;
  --ink-2: #5b4535;
  --line: #e4d4b6;
  --leaf: #2f8f4e;
  --leaf-dark: #1d6435;
  --leaf-light: #6cc183;
  --leaf-soft: #e3f4e6;
  --sky: #3c96dc;
  --sky-dark: #24689e;
  --sky-soft: #dceefb;
  --wood: #a8612b;
  --wood-dark: #74401a;
  --wood-light: #d99a5e;
  --sun: #f4c03f;
  --sun-soft: #fff4cf;
  --rose: #c8473d;

  --pixel: "Galmuri11", "Pretendard", sans-serif;
  --body: "Pretendard", "Malgun Gothic", sans-serif;

  /* 간격: 4px 단위 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --wrap: 1120px;

  /* 픽셀 테두리(모서리가 계단처럼 깎인 4px 선) */
  --px-border: 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--cream); }
body {
  margin: 0;
  font: 400 17px/1.75 var(--body);
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(43, 30, 21, .06) 1px, transparent 1.5px) 0 0 / 8px 8px,
    var(--cream);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
a { color: var(--sky-dark); text-underline-offset: 3px; }
a:hover { color: var(--leaf-dark); }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pixel-art { image-rendering: pixelated; }
.icon { width: 24px; height: 24px; flex: none; shape-rendering: crispEdges; }
.icon--lg { width: 40px; height: 40px; }

/* ---------- layout ---------- */
.wrap { width: min(var(--wrap), calc(100% - 2 * var(--s5))); margin-inline: auto; }
.stack { display: flex; flex-direction: column; gap: var(--gap, var(--s4)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--s3)); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.section { padding-block: var(--s9); }
.prose { max-width: 68ch; }
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .section { padding-block: var(--s8); }
  .wrap { width: calc(100% - 2 * var(--s4)); }
}

/* ---------- type ---------- */
.display { font: 400 44px/1.35 var(--pixel); letter-spacing: -.01em; }
.h2 { font: 400 33px/1.4 var(--pixel); display: flex; align-items: center; gap: var(--s3); }
.h3 { font: 700 20px/1.5 var(--body); }
.eyebrow { font: 700 15px/1.4 var(--body); color: var(--leaf-dark); letter-spacing: .04em; }
.title-version { display: inline-block; margin-left: .5em; font: 400 15px/1 var(--body); color: var(--ink-2); letter-spacing: 0; text-decoration: none; }
.title-version:hover, .title-version:focus-visible { text-decoration: underline; }
.malgyeol-changes { width: 100%; max-width: 68ch; align-self: center; overflow-wrap: anywhere; }
.malgyeol-changes ul { padding-left: 1.25em; }
.lead { font-size: 19px; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 15px; }
@media (max-width: 760px) { .display { font-size: 33px; } .h2 { font-size: 22px; } }

/* ---------- 버튼: 입체 픽셀 ---------- */
.btn {
  --bg: var(--paper);
  --fg: var(--ink);
  --shade: #dcc8a2;
  --light: #ffffff;
  appearance: none;
  border: 0;
  margin: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 10px 22px 14px;
  font: 400 22px/1 var(--pixel);
  color: var(--fg);
  background: var(--bg);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: var(--px-border), inset -4px -4px 0 0 var(--shade), inset 4px 4px 0 0 var(--light), 0 10px 0 0 rgba(43, 30, 21, .22);
  transition: transform .06s, filter .12s;
}
.btn:hover { color: var(--fg); filter: brightness(1.06); transform: translateY(-2px); }
.btn:active {
  transform: translateY(6px);
  box-shadow: var(--px-border), inset 4px 4px 0 0 var(--shade), 0 4px 0 0 rgba(43, 30, 21, .22);
}
.btn--primary { --bg: var(--leaf); --fg: #fff; --shade: var(--leaf-dark); --light: var(--leaf-light); }
.btn--sky { --bg: var(--sky); --fg: #fff; --shade: var(--sky-dark); --light: #7fbcea; }
.btn--wood { --bg: var(--wood); --fg: #fff; --shade: var(--wood-dark); --light: var(--wood-light); }
.btn--danger { --bg: #fff; --fg: var(--rose); --shade: #f0c9c4; }
.btn--sm { min-height: 40px; padding: 6px 14px 10px; font-size: 22px; }
/* 목록 줄 안의 작은 단추(숨기기·되돌리기). 입체 픽셀은 유지하되 그림자를 줄인다. */
.btn--xs { min-height: 26px; padding: 2px 8px 5px; font-size: 15px; gap: 4px;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink), inset -2px -2px 0 0 var(--shade), inset 2px 2px 0 0 var(--light), 0 5px 0 0 rgba(43, 30, 21, .22); }
.btn--xs:active { transform: translateY(3px); box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink), inset 2px 2px 0 0 var(--shade), 0 2px 0 0 rgba(43, 30, 21, .22); }
.btn--block { width: calc(100% - 8px); }
.btn[disabled] { filter: grayscale(.8); opacity: .55; cursor: not-allowed; transform: none; }
.btn .icon { width: 22px; height: 22px; }

/* ---------- 정보 상자: 평평 ---------- */
.card { background: var(--paper); border: 2px solid var(--line); padding: var(--s5); }
.card--warm { background: var(--paper-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px;
  font: 700 14px/1.6 var(--body);
  background: var(--sky-soft); color: var(--sky-dark);
}
.chip--leaf { background: var(--leaf-soft); color: var(--leaf-dark); }
.chip--wood { background: #f6e3d0; color: var(--wood-dark); }

/* 창: 픽셀 테두리만(그림자 없음) */
.window { background: var(--paper); box-shadow: var(--px-border); margin: 4px; }
.window__bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 10px var(--s5);
  font: 400 22px/1.4 var(--pixel);
  color: #fff; background: var(--wood);
  box-shadow: inset 0 -4px 0 0 var(--ink);
}
.window__bar--sky { background: var(--sky); }
.window__bar--leaf { background: var(--leaf); }
.window__body { padding: var(--s5); }

/* ---------- 머리띠 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 248, 234, .94);
  backdrop-filter: blur(6px);
  border-bottom: 4px solid var(--ink);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: var(--s3); font: 400 22px/1 var(--pixel); color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: var(--s5); }
.nav a { font: 700 16px/1 var(--body); color: var(--ink); text-decoration: none; padding: 10px 2px; border-bottom: 4px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--leaf); color: var(--ink); }

/* ---------- 홈 히어로 ---------- */
.hero { position: relative; min-height: min(86vh, 820px); overflow: hidden; border-bottom: 4px solid var(--ink); }
.hero__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(43, 30, 21, .35), transparent); pointer-events: none; }
.hero__sign { position: relative; z-index: 2; width: min(620px, 82vw); height: auto; margin: var(--s8) auto 0; }
.hero__clouds { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cloud { position: absolute; width: 140px; opacity: .95; animation: drift linear infinite; }
.cloud--a { top: 9%; left: -160px; animation-duration: 70s; }
.cloud--b { top: 24%; left: -160px; width: 96px; animation-duration: 95s; animation-delay: -40s; }
.cloud--c { top: 4%; left: -160px; width: 120px; animation-duration: 120s; animation-delay: -80s; }
@keyframes drift { to { transform: translateX(calc(100vw + 320px)); } }

.dialogue {
  position: absolute; z-index: 3;
  left: max(var(--s5), calc((100% - var(--wrap)) / 2));
  bottom: var(--s7);
  width: min(560px, calc(100% - 2 * var(--s5)));
  padding: var(--s5) var(--s5) var(--s4);
  background: var(--paper);
  box-shadow: var(--px-border), 0 12px 0 0 rgba(43, 30, 21, .25);
}
.dialogue__name {
  position: absolute; top: -22px; left: 16px;
  padding: 6px 14px 8px;
  font: 400 22px/1 var(--pixel); color: #fff; background: var(--wood);
  box-shadow: var(--px-border);
}
.dialogue__text { font: 500 20px/1.7 var(--body); margin-top: var(--s2); }
.dialogue__next { position: absolute; right: 20px; bottom: 12px; color: var(--wood); font: 22px/1 var(--pixel); animation: blink 1s steps(2, jump-none) infinite; }
.dialogue .cluster { margin-top: var(--s4); }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 760px) {
  .hero { min-height: 640px; }
  .hero__sign { margin-top: var(--s6); }
  .dialogue { left: var(--s4); right: var(--s4); width: auto; bottom: var(--s5); }
  .dialogue__text { font-size: 18px; }
}

/* ---------- 홈: 도구 소개 ---------- */
.spotlight { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s7); align-items: center; }
.spotlight__screen { background: var(--sky-soft); padding: var(--s6); box-shadow: var(--px-border); margin: 4px; }
.mock-row { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) 0; border-bottom: 2px dashed #a9cfee; }
.mock-row:last-child { border-bottom: 0; }
.mock-row strong { display: block; font: 700 16px/1.4 var(--body); }
.mock-row span { font-size: 15px; color: var(--ink-2); }
@media (max-width: 760px) { .spotlight { grid-template-columns: minmax(0, 1fr); gap: var(--s5); } }

/* 작품 카드(누르는 카드 = 버튼 규칙의 약한 판) */
.work {
  display: flex; flex-direction: column;
  color: var(--ink); text-decoration: none;
  background: var(--paper);
  box-shadow: var(--px-border), 0 10px 0 0 rgba(43, 30, 21, .18);
  margin: 4px;
  transition: transform .08s;
}
.work:hover { transform: translateY(-4px); color: var(--ink); }
.work:active { transform: translateY(4px); box-shadow: var(--px-border); }
.work__thumb { aspect-ratio: 16 / 10; background: var(--sky-soft); display: grid; place-items: center; border-bottom: 4px solid var(--ink); position: relative; overflow: hidden; }
/* 세로로 긴 대표 이미지도 칸 비율을 늘리지 않게 칸 위에 띄워 채운다(넘치는 부분은 잘림). */
.work__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work__body { padding: var(--s4) var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.work__title { font: 400 22px/1.4 var(--pixel); }
/* 말결 칸을 위아래 반으로: 말결(서버) · 말결 라이트(이 기기). 칸 높이는 옆 카드와 같다. */
.work-split { display: grid; grid-template-rows: 1fr 1fr; gap: var(--s4); min-width: 0; }
.work--half { flex-direction: row; min-height: 0; }
.work--half .work__thumb { aspect-ratio: auto; width: 34%; flex: none; border-bottom: 0; border-right: 4px solid var(--ink); }
.work--half .work__thumb--lite { background: var(--leaf-soft); color: var(--leaf-dark); }
.work--half .work__body { padding: var(--s3) var(--s4); justify-content: center; min-width: 0; }
.work--half .work__title { font-size: 20px; }
.work--soon { box-shadow: none; border: 2px dashed var(--line); background: transparent; cursor: default; }
.work--soon:hover { transform: none; }

.about { display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: start; }
.avatar { width: 96px; height: 96px; background: var(--sun-soft); box-shadow: var(--px-border); margin: 4px; display: grid; place-items: center; }
.bubble { position: relative; background: var(--paper); border: 2px solid var(--line); padding: var(--s5); }
.bubble::before { content: ""; position: absolute; left: -12px; top: 28px; width: 12px; height: 12px; background: var(--paper); border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }

.footer { border-top: 4px solid var(--ink); padding-block: var(--s6); font-size: 15px; color: var(--ink-2); }

/* ---------- 분석기 공통 ---------- */
.page-head { padding-block: var(--s7) var(--s5); }
.steps { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: var(--s2); font: 700 16px/1 var(--body); color: var(--ink-2); }
.steps li + li::before { content: ""; width: 40px; height: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 12px); }
.step-num { width: 32px; height: 32px; display: grid; place-items: center; font: 400 22px/1 var(--pixel); background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); color: var(--ink-2); }
.steps [aria-current="step"] { color: var(--leaf-dark); }
.steps [aria-current="step"] .step-num { background: var(--leaf); color: #fff; box-shadow: none; }
.steps .done .step-num { background: var(--leaf-soft); color: var(--leaf-dark); box-shadow: none; }

/* 폼 */
.field { display: flex; flex-direction: column; gap: var(--s2); }
.field__label { font: 700 16px/1.4 var(--body); }
.field__help { font-size: 15px; color: var(--ink-2); }
.field__error { font: 700 15px/1.5 var(--body); color: var(--rose); display: flex; gap: 6px; align-items: center; }
.input, .select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: 400 17px/1.4 var(--body);
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 0;
}
.input::placeholder { color: #8a7766; }
.input:focus, .select:focus { outline: 4px solid var(--sun); outline-offset: 0; }
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 52px;
  cursor: pointer;
  --arrow-bg: var(--sun-soft);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' shape-rendering='crispEdges'%3E%3Cpath fill='%232b1e15' d='M0 0h10v2H8v2H6v2H4V4H2V2H0z'/%3E%3C/svg%3E") no-repeat right 12px center / 20px 12px,
    linear-gradient(to left, var(--arrow-bg) 0 42px, var(--ink) 42px 44px, #fff 44px);
}
.select:hover { --arrow-bg: var(--sun); }

/* 체크박스: 24px 픽셀, 줄 전체가 누르는 영역 */
.check {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 48px; padding: var(--s2) var(--s3);
  cursor: pointer; user-select: none;
  font: 500 17px/1.5 var(--body);
  border: 2px solid transparent;
}
.check:hover { background: var(--paper-2); }
.check input {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 24px; height: 24px; margin: 0;
  background: #fff; border: 3px solid var(--ink);
  display: grid; place-content: center;
  cursor: pointer;
}
.check input::after { content: ""; width: 14px; height: 12px; transform: scale(0); transition: transform .08s steps(2); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff' d='M6 0h1v2H6v1H5v1H4v1H3v1H2V5H1V4H0V3h2v1h1V3h1V2h1V1h1z'/%3E%3C/svg%3E") center / contain no-repeat; }
.check input:checked { background: var(--leaf); border-color: var(--leaf-dark); }
.check input:checked::after { transform: scale(1); }
.check:has(input:checked) { background: var(--leaf-soft); border-color: var(--leaf); }
.checklist { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.checklist .check { border-color: var(--line); background: #fff; }

/* 파일 놓는 곳 */
.drop {
  display: grid; place-items: center; gap: var(--s3);
  padding: var(--s7) var(--s5);
  text-align: center;
  background: var(--sky-soft);
  border: 4px dashed var(--sky);
  cursor: pointer;
}
.drop:hover, .drop.is-over { background: #c9e5fa; border-style: solid; }
.drop__title { font: 400 22px/1.4 var(--pixel); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop__file { font: 700 16px/1.4 var(--body); color: var(--leaf-dark); }

/* 공지(개인정보) */
.notice {
  background: var(--sun-soft);
  border-left: 8px solid var(--sun);
  box-shadow: inset 0 0 0 2px #ecd796;
  padding: var(--s5) var(--s5) var(--s5) var(--s6);
}
.notice__title { display: flex; gap: var(--s2); align-items: center; font: 400 22px/1.4 var(--pixel); margin-bottom: var(--s3); }
.notice ul { padding-left: 0; list-style: none; display: grid; gap: var(--s2); font-size: 16px; }
.notice li { padding-left: 20px; position: relative; }
.notice li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 8px; background: var(--wood); }
.agree { margin-top: var(--s4); background: #fff; border: 3px solid var(--ink); font-weight: 700; }
.agree:has(input:checked) { background: var(--leaf-soft); border-color: var(--leaf); }

details.more > summary { cursor: pointer; font: 700 16px/1.4 var(--body); color: var(--sky-dark); list-style: none; user-select: none; }
details.more > summary::before { content: "▸ "; }
details.more[open] > summary::before { content: "▾ "; }

/* ---------- 결과 ---------- */
.result-head { display: flex; justify-content: space-between; gap: var(--s5); align-items: flex-start; flex-wrap: wrap; }
.meta { display: flex; flex-wrap: wrap; gap: var(--s2); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); }
.code-card { display: grid; gap: var(--s3); justify-items: start; }
.code {
  font: 400 22px/1 var(--pixel);
  padding: 12px 16px;
  background: #fff;
  border: 2px dashed var(--wood);
  letter-spacing: .02em;
}
.reflect { display: flex; gap: var(--s3); align-items: flex-start; }
/* 기록 코드 창과 성찰 안내를 같은 높이로 나란히. 분석 중 자동 새로고침에도 접히지 않게 펼침 없이 다 보인다. */
.head-pair { align-items: stretch; }
.head-pair > * { margin-block: 4px; }
.head-pair .reflect { padding: var(--s4) var(--s5); }
.reflect__body { display: grid; gap: var(--s2); }
.reflect__title { font: 700 17px/1.4 var(--body); }
.reflect__text { font-size: 15px; line-height: 1.65; }

.tabs { display: flex; gap: var(--s2); padding-inline: var(--s4); overflow-x: auto; scrollbar-width: none; position: relative; z-index: 1; }
.tab {
  appearance: none; border: 0; margin: 4px 4px 0;
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 12px 18px 12px;
  font: 400 22px/1 var(--pixel); color: var(--sky-dark);
  background: var(--sky-soft);
  cursor: pointer; user-select: none; white-space: nowrap;
  box-shadow: 0 -4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), inset 0 -4px 0 0 #b7d9f3;
  transition: transform .06s;
}
.tab:hover { background: #c6e3f9; transform: translateY(-2px); }
.tab[aria-selected="true"] { color: var(--leaf-dark); background: var(--paper); transform: translateY(4px); box-shadow: 0 -4px 0 0 var(--ink), -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink); }
.tab-frame { margin: 0 4px 4px; background: var(--paper); box-shadow: var(--px-border); padding: var(--s6) var(--s5); }
.tab-hint { font-size: 15px; color: var(--ink-2); padding-inline: var(--s4); margin-bottom: var(--s2); display: flex; gap: 6px; align-items: center; }

.glance { display: grid; gap: 0; }
.glance__row { display: grid; grid-template-columns: 48px 1fr auto; gap: var(--s4); align-items: center; padding: var(--s4) 0; border-bottom: 2px dashed var(--line); }
.glance__row:last-child { border-bottom: 0; }
.glance__icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--sun-soft); }
.glance__title { font: 700 15px/1.4 var(--body); color: var(--ink-2); }
.glance__text { font: 600 19px/1.5 var(--body); }
.go { font: 700 15px/1 var(--body); white-space: nowrap; text-decoration: none; color: var(--sky-dark); padding: 10px 12px; border: 2px solid var(--sky-soft); }
.go:hover { background: var(--sky-soft); }

.metric { position: relative; background: #fff; border: 2px solid var(--line); padding: var(--s4); }
.metric__label { font: 700 15px/1.4 var(--body); color: var(--ink-2); padding-right: 40px; }
.metric__value { font: 700 30px/1.3 var(--body); font-variant-numeric: tabular-nums; margin-top: var(--s1); }
.metric__desc { font-size: 15px; color: var(--ink-2); margin-top: var(--s1); }
.help {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; padding: 0; border: 0;
  font: 400 22px/1 var(--pixel); color: var(--sky-dark); background: var(--sky-soft);
  box-shadow: inset 0 0 0 2px var(--sky); cursor: pointer;
}
.help:hover { background: var(--sky); color: #fff; }

.bars { display: grid; gap: var(--s3); }
.bar { display: grid; grid-template-columns: 9.5em 1fr 6.5em; gap: var(--s3); align-items: center; font-size: 16px; }
.bar__track { height: 16px; background: var(--sky-soft); box-shadow: inset 0 0 0 2px #b7d9f3; }
.bar__fill { height: 100%; background: repeating-linear-gradient(90deg, var(--leaf) 0 12px, var(--leaf-dark) 12px 16px); }
.bar__val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 760px) { .bar { grid-template-columns: 6.5em 1fr 4.5em; font-size: 15px; } }

.wordlist { list-style: none; padding: 0; display: grid; }
.wordlist li:has(> .word-hide) { display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 2px solid var(--line); }
.wordlist li:has(> .word-hide) > .word { border-bottom: 0; }
.word-hide { margin: 0 var(--s2) 4px; }
.hidden-words-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.word {
  width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3); align-items: center;
  padding: 12px var(--s3); border: 0; border-bottom: 2px solid var(--line);
  background: transparent; text-align: left; cursor: pointer; user-select: none;
  font: 500 17px/1.4 var(--body); color: var(--ink);
}
.word:hover { background: var(--leaf-soft); }
.word__pos { color: var(--ink-2); font-size: 15px; margin-left: 6px; }
.word__count { font-weight: 800; font-variant-numeric: tabular-nums; }
.word__go { font: 700 14px/1 var(--body); color: var(--sky-dark); }

dialog.sheet { border: 0; padding: 0; width: min(640px, calc(100% - 32px)); background: var(--paper); box-shadow: var(--px-border); margin: auto; }
dialog.sheet::backdrop { background: rgba(43, 30, 21, .55); }
.sheet .window__body { max-height: 70vh; overflow: auto; display: grid; gap: var(--s3); }
.quote { background: #fff; border: 2px solid var(--line); padding: var(--s3) var(--s4); }
.quote time { display: block; font-size: 14px; color: var(--ink-2); }
.quote mark { background: var(--sun); color: var(--ink); padding: 0 2px; }

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

/* ---------- 휴대폰 손질 ---------- */
.nav a { white-space: nowrap; }
@media (max-width: 760px) {
  .topbar__inner { min-height: 56px; }
  .brand { font-size: 22px; }
  .brand .label { display: none; }
  .nav { gap: var(--s4); }
  .nav a { font-size: 15px; }
  .glance__row { grid-template-columns: 40px 1fr; gap: var(--s3); }
  .glance__icon { width: 40px; height: 40px; }
  .glance__row .go { grid-column: 2; justify-self: start; padding: 8px 10px; }
  .glance__text { font-size: 17px; }
  .result-head .toolbar { width: 100%; }
}

/* Live application adapters: data, accessibility, tables, and progress. */
button, input, select, textarea { font: inherit; }
.display, .h2, .window__bar, .code, .word, .chip, td, th { overflow-wrap: anywhere; }
.stack > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
fieldset { border: 0; margin: 0; padding: 0; }
.field__error:empty { display: none; }
.error, .errorlist { color: var(--rose); }
.errorlist { margin: 0; padding-left: var(--s5); font-size: 15px; }
.form-errors { color: var(--rose); }
.month-fields { grid-template-columns: repeat(2, minmax(0, 240px)); }
.option-group legend { font-weight: 700; padding-bottom: var(--s3); }
.check input:disabled { opacity: .5; cursor: not-allowed; }
.check:has(input:disabled) { cursor: not-allowed; }
.check input[type=radio] { border-radius: 50%; }
.drop:focus-within { outline: 4px solid var(--sun); outline-offset: 4px; }
.select[multiple] { background: #fff; padding-right: 14px; }
textarea.input { min-height: 160px; resize: vertical; }
.upload-layout { align-items: start; padding-bottom: var(--s8); }
.help-popup { position: fixed; z-index: 1000; width: 400px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; background: var(--paper); border: 2px solid var(--line); padding: var(--s4); color: var(--ink); font: 400 17px/1.75 var(--body); text-align: left; }
.metric-help { display: inline; }
.metric { padding-right: 52px; }
.style-metrics:empty { display: none; }
.bar__val { overflow-wrap: anywhere; }
.word--data { cursor: default; }
.word--data:hover { background: transparent; }
.stat-controls, .visual-controls, .comparison-controls { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; }
.stat-controls > *, .visual-controls label { flex: 1; min-width: 120px; }
.visual-controls label { display: flex; flex-direction: column; gap: var(--s2); }
.visual-chart { width: 100%; height: auto; background: var(--paper); }
.visual-metrics { display: grid; gap: var(--s5); }
.visual-metrics dl, .overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--s4); }
.visual-metrics dl > div, .overview > div { position: relative; background: #fff; border: 2px solid var(--line); padding: var(--s4); }
.visual-metrics p { font-size: 15px; color: var(--ink-2); }
.overview strong { display: block; font-size: 22px; }
.noun-preview img { width: 100%; height: auto; }
.result-alert { display: flex; gap: var(--s3); align-items: center; padding: var(--s4); background: var(--sun-soft); }
.result-alert > span { flex: 1; }
.delete-confirm form { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); max-width: 360px; background: var(--paper); border: 2px solid var(--line); }
.delete-job { display: flex; flex-direction: column; align-items: start; gap: var(--s3); }
.result-context dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--s4); margin: 0; }
.result-context dt { font-weight: 700; }
.result-context dd { margin: 0; }
.evidence-items { display: grid; gap: var(--s3); }
.evidence-dialog .evidence-panel { padding: 0; }
.evidence-dialog .window__bar { position: sticky; top: 0; z-index: 1; }
.window__bar .btn { flex-shrink: 0; white-space: nowrap; overflow-wrap: normal; }
.evidence-dialog .window__body { display: flex; flex-direction: column; gap: var(--s3); }
.quote p { margin: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font: 400 17px/1.75 var(--body); font-variant-numeric: tabular-nums; }
th, td { padding: var(--s3); text-align: left; vertical-align: top; border-bottom: 2px solid var(--line); }
caption { font-weight: 700; text-align: left; padding: var(--s3); }
.comparison-table { min-width: 720px; }
.comparison-table small { display: block; }
.comparison-names > section { background: var(--sky-soft); padding: var(--s3); }
.error-log pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
.review-candidates, .request-list { display: grid; gap: var(--s5); }
.review-tabs, .pagination, .reason-tags { display: flex; flex-wrap: wrap; gap: var(--s3); }
.review-candidate > header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3); }
.reason-tags { list-style: none; padding: 0; }
.status-badge { background: var(--leaf-soft); padding: var(--s1) var(--s2); }
.article-body { width: 100%; max-width: 68ch; }
.article-body img, .article-cover { height: auto; }
.article-body pre { overflow: auto; }
.article-body blockquote { border-left: 4px solid var(--wood); padding-left: var(--s4); margin-inline: 0; }
.busy-indicator .icon { animation: blink 1s steps(2) infinite; }
.pixel-progress { appearance: none; width: 100%; height: 24px; border: 2px solid var(--ink); background: var(--sky-soft); }
.pixel-progress::-webkit-progress-bar { background: var(--sky-soft); }
.pixel-progress::-webkit-progress-value { background: repeating-linear-gradient(90deg,var(--leaf) 0 12px,var(--leaf-dark) 12px 16px); transition: width .2s steps(4); }
@media(max-width:760px) {
  .about { grid-template-columns: 64px minmax(0,1fr); }
  .avatar { width: 56px; height: 56px; }
  .window__bar { padding-inline: var(--s4); }
  .window__body { padding: var(--s4); }
  .visual-metrics dl, .overview, .result-context dl { grid-template-columns: minmax(0,1fr); }
  .bar { grid-template-columns: 6em minmax(0,1fr) 6.5em; }
  .comparison-table { min-width: 0; display: block; }
  .comparison-table thead { display: none; }
  .comparison-table tbody { display: grid; gap: var(--s4); }
  .comparison-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--s3); padding: var(--s4); border: 2px solid var(--line); }
  .comparison-table td, .comparison-table th { display: block; padding: 0; border: 0; min-width: 0; }
  .comparison-table th, .comparison-table td[colspan] { grid-column: 1/-1; }
  .comparison-table td::before { content: attr(data-label); display: block; font-size: 15px; font-weight: 700; }
}

.pixel-progress:indeterminate { background: repeating-linear-gradient(90deg,var(--leaf) 0 12px,var(--leaf-dark) 12px 16px); animation: loading-blocks 1s steps(8) infinite; }
@keyframes loading-blocks { to { background-position: 128px 0; } }

/* Browser trend view: fixed text sizes and a scrollable accessible table. */
.trend-scroll { overflow-x: auto; max-width: 100%; }
.trend-chart svg { display: block; max-width: none; font-family: var(--body); }
.trend-chart rect:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.trend-legend-item { display: inline-flex; align-items: center; gap: var(--s2); font-size: 15px; }
.trend-swatch { display: inline-block; width: 16px; height: 16px; }
[data-trend-unit][aria-pressed=true] { --bg: var(--leaf); --fg: #fff; --shade: var(--leaf-dark); --light: var(--leaf-light); }
.trend-controls .check:has(input:disabled) { opacity: .65; cursor: not-allowed; }
.trend-controls .check input:disabled { cursor: not-allowed; }
.trend-point-info { min-height: 1.75em; }

.evidence-trend { min-width: 0; }
.evidence-trend svg { display: block; width: 100%; height: auto; font-family: var(--body); }
.evidence-trend rect:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Participant selectors share the existing form/card components. */
.speaker-picker .select {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
}
.comparison-controls .field {
  flex: 1 1 240px;
  min-width: 0;
}
.comparison-controls .field .select {
  width: 100%;
}

/* 그래프의 근거 조작은 그림 크기를 유지하고 키보드 초점을 보여 줘요. */
.visual-evidence-chart svg { display: block; width: 100%; height: auto; font-family: Pretendard, "Malgun Gothic", sans-serif; }
.visual-evidence-chart .stat-item { cursor: pointer; }
.visual-evidence-chart .stat-item:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }
.bar:has(> .stat-item) { grid-template-columns: minmax(90px, 1fr) minmax(40px, 2fr) auto auto; }
@media (max-width: 600px) {
  .bar:has(> .stat-item) { grid-template-columns: minmax(70px, 1fr) minmax(30px, 1fr) auto; }
  .bar > .stat-item { grid-column: 1 / -1; justify-self: end; }
}

.analysis-stage { font-family: var(--body); font-weight: 400; text-shadow: none; box-shadow: none; }

.reference-tag { margin-inline-start: 4px; vertical-align: middle; }
.pos-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pos-chips[hidden] { display: none; }
.pos-chips .btn[aria-pressed="true"] { --bg: var(--leaf); --fg: #fff; --shade: var(--leaf-dark); --light: var(--leaf-light); }
