/* 타임보드 스타일 — 색 토큰은 Sign PDF·Voice Denoise와 같다. 색은 모두 토큰으로 정의하고 다크 모드에서 다시 지정한다.
   큰 숫자(.stage)는 화면 크기에 맞춰 JS(fitText)가 글자 크기를 정하고, 작은 글자는 컨테이너 단위(cqw·cqh)로 커진다. */
:root {
  color-scheme: light dark;
  --bg: #f5f6fa; --card: #ffffff; --foreground: #1a1a2e; --muted: #5b6075;
  --border: #d6d9e3; --border-strong: #b8bdcf;
  --accent: #3563e9; --accent-text: #2a55d6; --accent-soft: #3563e91f;
  --go: #15803d; --go-hover: #116c33; --stop: #dc2626; --stop-hover: #b91c1c;
  --warn: #d97706; --danger: #b91c1c; --track: #e3e6ee;
  --num-font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117; --card: #181b24; --foreground: #e6e8ef; --muted: #a0a6b8;
    --border: #2c3140; --border-strong: #3c4254;
    --accent-text: #8fb0ff; --accent-soft: #5b8cff29;
    --warn: #f59e0b; --danger: #f87171; --track: #2c3140;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif; background: var(--bg); color: var(--foreground); margin: 0; line-height: 1.55; }
a { color: var(--accent-text); }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 20px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.stage-open { overflow: hidden; }

/* ---- 헤더·푸터 ---- */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); }
.site-header .inner { max-width: 1080px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; color: var(--foreground); text-decoration: none; padding: 4px 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; font-size: 1rem; font-weight: 600; color: var(--foreground); text-decoration: none; white-space: nowrap; }
.site-nav a svg { width: 19px; height: 19px; flex: none; opacity: 0.75; }
.site-nav a:hover { background: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.site-nav a[aria-current="page"] svg { opacity: 1; }
.badge { font: 700 0.72rem/1 var(--num-font); font-variant-numeric: tabular-nums; padding: 4px 6px; border-radius: 6px; background: var(--accent); color: #fff; }
.badge.pause { background: var(--border-strong); color: var(--foreground); }
.badge.done { background: var(--stop); animation: blink 1s steps(2, start) infinite; }
@media (max-width: 640px) {
  .site-header .inner { padding: 8px 12px; }
  .site-nav { width: 100%; margin: 0; }
  .site-nav a { flex: 1 1 0; justify-content: center; padding: 8px 4px; font-size: 0.92rem; gap: 5px; }
  .site-nav a svg { width: 17px; height: 17px; }
  .site-nav a .badge { position: absolute; top: -6px; right: 2px; font-size: 0.66rem; padding: 3px 4px; }
}
@media (max-width: 360px) { .site-nav a svg { display: none; } }
.site-footer { margin-top: 56px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.82rem; }
.site-footer .inner { max-width: 1080px; margin: 0 auto; padding: 20px 20px 40px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--foreground); }

/* ---- 도구 머리말 ---- */
.tool-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px; margin: 0 0 14px; }
.tool-head h1 { font-size: 1.55rem; line-height: 1.3; margin: 0; letter-spacing: -0.01em; }
.tool-head .sub { margin: 0; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 600px) { .tool-head h1 { font-size: 1.3rem; } .tool-head .sub { font-size: 0.9rem; } }

/* ---- 무대: 큰 숫자가 들어가는 카드. 전체 화면이 되는 요소 ---- */
.stage {
  --s-bg: var(--card); --s-fg: var(--foreground); --s-muted: var(--muted); --s-track: var(--track); --s-border: var(--border); --s-accent: var(--accent);
  position: relative; container-type: size;
  height: clamp(340px, min(64vh, 120vw), 680px);
  display: flex; flex-direction: column;
  background: var(--s-bg); color: var(--s-fg);
  border: 1px solid var(--s-border); border-radius: 22px; overflow: hidden;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
@media (prefers-color-scheme: dark) { .stage { --s-accent: #6b93ff; } }
.stage[data-theme="light"] { --s-bg: #ffffff; --s-fg: #111318; --s-muted: #5b6075; --s-track: #e3e6ee; --s-border: #d6d9e3; --s-accent: #3563e9; color-scheme: light; }
.stage[data-theme="dark"] { --s-bg: #0b0d12; --s-fg: #f2f4f8; --s-muted: #9aa1b5; --s-track: #262b38; --s-border: #262b38; --s-accent: #6b93ff; color-scheme: dark; }
.stage:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
.stage:-webkit-full-screen { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
.stage::backdrop { background: #000; }
.stage.pseudo { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
.stage.is-full.idle { cursor: none; }

.stage-tools { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; gap: 6px; transition: opacity 0.3s, visibility 0.3s; }
.stage.is-full.idle .stage-tools, .stage.is-full.idle:not(.ringing) .controls.autohide { opacity: 0; visibility: hidden; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; font: inherit; font-size: 0.86rem; font-weight: 600; border-radius: 10px; border: 1px solid var(--s-border); background: color-mix(in srgb, var(--s-bg) 88%, transparent); color: var(--s-fg); cursor: pointer; }
.tool-btn svg { width: 18px; height: 18px; flex: none; }
.tool-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.stage[data-theme="dark"] .tool-btn:hover { color: #8fb0ff; }
.tool-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) { .tool-btn span { display: none; } .tool-btn { width: 40px; padding: 0; justify-content: center; } }
.stage.is-full .tool-btn span { display: inline; }

.stage-body { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2cqh; padding: 56px 3cqw 3.5cqh; }
.fit { width: max-content; max-width: none; line-height: 1; white-space: nowrap; }

/* 고정 폭 숫자 칸 (core.js setDigits) */
.digits { display: inline-flex; align-items: baseline; font-family: var(--num-font); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.digits > span { display: inline-block; text-align: center; }
.digits .d { width: 0.6em; }
.digits .c { width: 0.3em; position: relative; top: -0.07em; }
.digits .p { width: 0.26em; }
.digits .sg { width: 0.5em; }

/* ---- 시계 ---- */
.clock-date { margin: 0; font-size: clamp(15px, min(3.3cqw, 5.4cqh), 80px); font-weight: 600; color: var(--s-muted); letter-spacing: -0.01em; }
.clock-digital { display: inline-flex; align-items: baseline; }
.clock-digital .ampm { font-size: 0.2em; font-weight: 700; margin-right: 0.35em; align-self: center; color: var(--s-muted); }
.clock-digital .ampm:empty { display: none; }
.clock-digital .sec { font-size: 0.42em; margin-left: 0.04em; color: var(--s-muted); }
.clock-analog { display: block; overflow: visible; }
.clock-analog .face { fill: none; stroke: var(--s-fg); stroke-width: 2.2; opacity: 0.85; }
.clock-analog .tick { stroke: var(--s-fg); stroke-width: 1.2; opacity: 0.55; }
.clock-analog .tick.major { stroke-width: 3.2; opacity: 1; }
.clock-analog .num { fill: var(--s-fg); font: 700 15px var(--num-font); text-anchor: middle; dominant-baseline: central; }
.clock-analog .hand { stroke: var(--s-fg); stroke-linecap: round; }
.clock-analog .hour { stroke-width: 6.5; }
.clock-analog .min { stroke-width: 4.2; }
.clock-analog .hand-sec { stroke: #e5484d; fill: #e5484d; stroke-width: 1.6; }
.clock-analog .cap { fill: var(--s-bg); }

/* 시험 막대 */
.exam { width: min(88cqw, 1400px); font-size: clamp(14px, min(3.2cqw, 5.2cqh), 64px); --e-color: var(--s-accent); }
.exam-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.15em 0.8em; margin-bottom: 0.45em; }
.exam-name { font-weight: 800; font-size: 1.15em; }
.exam-range { color: var(--s-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.exam-left { margin-left: auto; font-weight: 800; font-size: 1.15em; font-variant-numeric: tabular-nums; color: var(--e-color); }
.exam-bar { height: max(6px, 0.42em); border-radius: 999px; background: var(--s-track); overflow: hidden; }
.exam-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--e-color); transition: width 0.9s linear; }
.exam[data-state="before"], .exam[data-state="break"] { --e-color: var(--s-muted); }
.exam[data-state="warn"] { --e-color: var(--warn); }
.exam[data-state="last"], .exam[data-state="ended"] { --e-color: #e5484d; }
.exam[data-state="over"] { --e-color: var(--s-muted); }
.exam[data-state="last"] .exam-left { animation: pulse-text 2s ease-in-out infinite; }

/* ---- 스톱워치·타이머 숫자 ---- */
.sw-display .frac { font-size: 0.55em; color: var(--s-muted); }
.stage.paused .sw-display, .stage[data-state="pause"] .t-display { animation: blink-soft 1.6s ease-in-out infinite; }
.sw-lap { margin: 0; min-height: 1.4em; font: 600 clamp(15px, min(2.6cqw, 4.4cqh), 52px) var(--num-font); font-variant-numeric: tabular-nums; color: var(--s-muted); }

.t-bar { width: min(72cqw, 1100px); height: max(8px, 1.3cqh); border-radius: 999px; background: var(--s-track); overflow: hidden; }
.t-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--s-accent); transition: width 0.25s linear; }
.t-bar.warn i { background: #e5484d; }
.t-sub { margin: 0; min-height: 1.4em; font: 600 clamp(14px, min(2.3cqw, 4cqh), 44px) var(--num-font); font-variant-numeric: tabular-nums; color: var(--s-muted); text-align: center; }
.stage[data-state="done"] .t-display { color: #e5484d; }
.stage.ringing { animation: ring-bg 1s ease-in-out infinite; }
.stage[data-state="done"] .t-sub { color: #e5484d; }

/* 시간 입력 (타이머 대기 상태) */
.t-editor { display: inline-flex; align-items: flex-start; font-family: var(--num-font); font-weight: 700; }
.seg { display: flex; flex-direction: column; align-items: center; }
.seg input { width: 1.3em; padding: 0; margin: 0; border: 0; border-radius: 0.1em; background: transparent; color: var(--s-fg); font: inherit; line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; caret-color: var(--accent); -webkit-user-select: text; user-select: text; }
.seg input:hover { background: var(--accent-soft); }
.seg input:focus { outline: none; background: var(--accent-soft); box-shadow: inset 0 -0.05em 0 var(--accent); }
.seg-label { font-size: 0.13em; font-weight: 600; color: var(--s-muted); margin-top: 0.15em; }
.t-editor .colon { width: 0.34em; margin-top: 0.28em; position: relative; top: -0.06em; text-align: center; line-height: 1.1; color: var(--s-muted); }
.step { font-size: inherit; width: 1.1em; height: 0.28em; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0.06em; background: transparent; color: var(--s-muted); opacity: 0.55; cursor: pointer; touch-action: manipulation; }
.step svg { width: 0.22em; height: 0.22em; }
.t-editor:hover .step { opacity: 1; }
.step:hover { color: var(--s-accent); background: var(--accent-soft); }
@media (pointer: coarse) { .step { opacity: 1; } }
.step:focus-visible { outline: 2px solid var(--accent); }

/* ---- 큰 조작 버튼 (무대 안) ---- */
.controls { display: flex; justify-content: center; align-items: center; gap: clamp(10px, 1.6cqw, 22px); flex-wrap: wrap; transition: opacity 0.3s, visibility 0.3s; }
.ctl { min-width: clamp(104px, 14cqw, 220px); height: clamp(50px, 8.5cqh, 84px); padding: 0 1.2em; font: 700 clamp(16px, min(2.1cqw, 3.6cqh), 30px)/1 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; border-radius: 999px; border: 2px solid transparent; cursor: pointer; touch-action: manipulation; transition: background 0.15s, transform 0.08s; }
.ctl:active { transform: scale(0.97); }
.ctl:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.ctl:disabled { opacity: 0.4; cursor: default; transform: none; }
.ctl.go { background: var(--go); color: #fff; }
.ctl.go:hover:not(:disabled) { background: var(--go-hover); }
.ctl.stop { background: var(--stop); color: #fff; }
.ctl.stop:hover { background: var(--stop-hover); }
.ctl.pause { background: var(--warn); color: #fff; }
.ctl.ghost { background: transparent; color: var(--s-fg); border-color: var(--s-border); }
.ctl.ghost:hover:not(:disabled) { border-color: var(--accent); }

/* ---- 무대 아래 ---- */
.stage-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin: 10px 4px 0; font-size: 0.86rem; color: var(--muted); }
.stage-foot p { margin: 0; }
.stage-foot .keys kbd, .prose kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; margin: 0 2px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--card); font: 600 0.8rem/1.4 ui-monospace, Menlo, Consolas, monospace; text-align: center; color: var(--foreground); }
.stage-foot .keys span { white-space: nowrap; margin-right: 8px; }
@media (pointer: coarse) { .stage-foot .keys { display: none; } }
.offset b { color: var(--foreground); }
.offset.off b { color: var(--warn); }
.hint-line { color: var(--accent-text); font-weight: 600; }

.notice { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 12px 0 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); font-size: 0.92rem; }
.notice .grow { flex: 1; min-width: 200px; }

.presets { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.presets .cap { font-size: 0.86rem; color: var(--muted); margin-right: 4px; }
.chip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--card); color: var(--foreground); font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.chip:hover { border-color: var(--accent); color: var(--accent-text); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 랩 표 */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.laps { margin-top: 16px; }
.laps-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.laps-head h2 { font-size: 1.05rem; margin: 0; }
.laps table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.laps th { text-align: right; font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); }
.laps td { text-align: right; padding: 8px; border-bottom: 1px solid var(--border); font: 600 1rem var(--num-font); }
.laps th:first-child, .laps td:first-child { text-align: left; font-family: inherit; }
.laps tr.live td { color: var(--muted); }
.laps tr.best td { color: var(--go); }
.laps tr.worst td { color: var(--stop); }
@media (prefers-color-scheme: dark) { .laps tr.best td { color: #4ade80; } .laps tr.worst td { color: #f87171; } }
.laps .tag { font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 5px; border: 1px solid currentColor; margin-left: 4px; }
.laps .scroll { max-height: 420px; overflow: auto; }

/* ---- 버튼(일반) ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 15px; font: inherit; font-size: 0.9rem; font-weight: 600; border-radius: 9px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: #2a55d6; border-color: #2a55d6; }
.btn.ghost { background: transparent; color: var(--foreground); border-color: var(--border-strong); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.btn.small { padding: 6px 12px; font-size: 0.84rem; }
.btn.big { font-size: 1.1rem; padding: 14px 28px; border-radius: 12px; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- 대화상자 ---- */
dialog.sheet { width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--card); color: var(--foreground); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28); }
dialog.sheet::backdrop { background: rgba(10, 12, 20, 0.5); }
.sheet form { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); margin: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.sheet-head h2 { font-size: 1.15rem; margin: 0; }
.sheet-body { padding: 6px 18px 12px; overflow: auto; }
.sheet-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--border); }
.sheet-foot .grow { flex: 1; }
.x { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.x:hover { background: var(--accent-soft); color: var(--foreground); }
.sheet fieldset { border: 0; padding: 0; margin: 14px 0 0; }
.sheet legend { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; padding: 0; }
.seg-choice { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-choice label, .opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: 9px; cursor: pointer; font-size: 0.92rem; }
.seg-choice label:has(input:checked), .opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.seg-choice input, .opt input { accent-color: var(--accent); margin: 0; }
.sound-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.check { display: flex; gap: 9px; align-items: flex-start; margin: 14px 0 0; font-size: 0.94rem; cursor: pointer; }
.check input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.check small, .field small { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; font-weight: 700; font-size: 0.92rem; }
.field select, .field input[type="range"] { font: inherit; font-weight: 400; }
.field select { padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--card); color: var(--foreground); }
.field input[type="range"] { flex: 1; min-width: 140px; accent-color: var(--accent); }
.field output { min-width: 3em; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.sheet .hint { margin: 4px 0 0; font-size: 0.84rem; color: var(--muted); }
.err { color: var(--danger); font-weight: 600; font-size: 0.9rem; margin: 12px 0 0; }

/* 시험 시간표 줄 */
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 4px; font-size: 0.88rem; }
.quick > span { color: var(--muted); margin-right: 2px; }
.quick button { padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: transparent; color: var(--foreground); font: inherit; font-size: 0.86rem; cursor: pointer; }
.quick button:hover { border-color: var(--accent); color: var(--accent-text); }
.periods { list-style: none; padding: 0; margin: 12px 0 10px; display: grid; gap: 8px; }
.period { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.period input { font: inherit; font-size: 0.95rem; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); color: var(--foreground); }
.period .p-name { flex: 1 1 120px; min-width: 0; }
.period .p-times { display: inline-flex; align-items: center; gap: 4px; }
.period input[type="time"] { font-variant-numeric: tabular-nums; }
.period .p-len { min-width: 3.4em; font-size: 0.84rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- 다른 페이지에서 타이머가 끝났을 때 ---- */
.alarm-toast { position: fixed; z-index: 2000; top: 12px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px 12px 16px; border-radius: 14px; background: var(--stop); color: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); font-weight: 600; }
.alarm-toast .alarm-icon { font-size: 1.3rem; animation: shake 0.6s ease-in-out infinite; }
.alarm-toast .btn { background: #fff; color: var(--stop); border-color: #fff; }
.alarm-toast .btn.ghost { background: transparent; color: #fff; border-color: #ffffffa0; }

/* ---- 글(소개·가이드) ---- */
.prose { max-width: 760px; }
.home-content { margin-top: 40px; }
.prose h1 { font-size: 1.7rem; line-height: 1.35; margin: 0 0 10px; }
.prose h2 { font-size: 1.22rem; line-height: 1.4; margin: 34px 0 10px; }
.prose h3 { font-size: 1.04rem; margin: 24px 0 6px; }
.prose p, .prose li { font-size: 1rem; line-height: 1.8; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 4px; }
.prose .meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 18px; }
.prose .lead { font-size: 1.06rem; color: var(--muted); }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.92rem; margin: 12px 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--card); }
.table-scroll { overflow-x: auto; }
.prose .cta { margin: 36px 0 0; }
.prose .cta .btn { text-decoration: none; }
.prose .tip { padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 10px 10px 0; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0 !important; list-style: none; }
.features li { margin: 0 !important; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); font-size: 0.92rem; line-height: 1.65; }
.features b { display: block; margin-bottom: 2px; font-size: 1rem; }
.faq details { border: 1px solid var(--border); border-radius: 10px; background: var(--card); padding: 10px 14px; }
.faq details + details { margin-top: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; }
.cardlinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 0 !important; margin: 12px 0 0; list-style: none; }
.cardlinks li + li { margin-top: 0; }
.cardlinks a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--foreground); text-decoration: none; }
.cardlinks a:hover { border-color: var(--accent); }
.cardlinks b { display: block; margin-bottom: 4px; line-height: 1.45; }
.cardlinks span { display: block; font-size: 0.85rem; line-height: 1.6; color: var(--muted); }

/* ---- 광고 자리 (assets/ads.js). 무대 밖, 버튼과 떨어진 곳에만 ---- */
.ad-slot { margin: 44px 0; min-height: 100px; }
.ad-slot .ad-label { display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 4px; }
.ad-slot.preview { display: grid; place-items: center; min-height: 120px; border: 2px dashed var(--border-strong); border-radius: 12px; color: var(--muted); font-size: 0.85rem; }

/* ---- 움직임 ---- */
@keyframes blink { to { visibility: hidden; } }
@keyframes blink-soft { 50% { opacity: 0.35; } }
@keyframes pulse-text { 50% { opacity: 0.55; } }
@keyframes ring-bg { 50% { background: color-mix(in srgb, #e5484d 22%, var(--s-bg)); } }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) {
  .badge.done, .stage.paused .sw-display, .stage[data-state="pause"] .t-display, .exam[data-state="last"] .exam-left, .alarm-toast .alarm-icon { animation: none; }
  .stage.ringing { animation: none; background: color-mix(in srgb, #e5484d 16%, var(--s-bg)); }
  .exam-bar i, .t-bar i { transition: none; }
}
