/* 리셋·서체·링크·포커스·유틸(최소 집합) — 화면 이름을 넣지 않는다. 틀: mih_tool base.css */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--text-md); line-height: var(--leading-normal);
  word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote, pre { margin: 0; }
h1, h2, h3, h4 { line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); font-weight: var(--weight-bold); text-wrap: balance; }
p { text-wrap: pretty; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--primary-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-ink); text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--primary-line); color: var(--text); }
html { scrollbar-color: var(--border-strong) transparent; scroll-padding-top: calc(var(--topbar-h) + var(--space-4)); }   /* 스크롤바도 토큰 색 · 고정 상단 바가 포커스를 가리지 않게 */
a, button, summary, label { -webkit-tap-highlight-color: transparent; }   /* 누름 반응은 :active·:focus-visible 로 직접 */
input, textarea { caret-color: var(--primary-ink); }
.num { font-variant-numeric: tabular-nums; }
/* 모노는 같은 크기에서 커 보여 살짝 줄이되 12px 아래로는 내리지 않는다(§8-1) */
.mono { font-family: var(--font-mono); font-size: max(var(--text-xs), .92em); letter-spacing: 0; word-break: break-all; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--space-4); top: -100px; z-index: 200; padding: var(--space-3) var(--space-4); background: var(--surface); color: var(--text); border-radius: var(--r-sm); box-shadow: var(--shadow-2); }
.skip:focus { top: var(--space-4); }
[hidden] { display: none !important; }
body.no-scroll { overflow: hidden; }

/* 유틸 — 한 번 쓰는 여백·글자(규칙서 §8-1 「최소 집합」) */
.mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mb-3 { margin-bottom: var(--space-3); }
.muted { color: var(--text-2); } .faint { color: var(--text-3); font-size: var(--text-sm); }
.nowrap { white-space: nowrap; } .break { word-break: break-all; }
.stack { display: grid; gap: var(--space-4); }
.stack-lg { display: grid; gap: var(--space-5); align-content: start; min-width: 0; }
.row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.inline-form { display: inline-flex; margin: 0; }
.t-num { text-align: right; } .t-right { text-align: right; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
