/* =====================================================================
   WebsiteInfo — 진단 계기판(instrument readout) 컨셉
   - 데이터는 고정폭 글꼴, 설명은 본문 글꼴로 역할을 나눈다.
   - 강조색(파랑)과 판정색(초록/노랑/빨강)을 분리한다. 판정색이 강조색과
     겹치면 "좋음"과 "링크"가 같은 색이 되어 읽기가 무너진다.
   ===================================================================== */
:root {
    /* 밝은 테마 — 순백은 눈이 부시다는 피드백으로 전체를 두 단계 눌렀다.
       바닥은 짙은 회백, 패널은 순백 대신 옅은 회백. 계측기 패널 느낌 유지. */
    --ground: #d9dfe6;
    --panel: #edf0f4;
    --ink: #141a21;
    --body: #3d4855;
    --muted: #556170;
    --line: #ccd3db;
    --line-soft: #dce1e7;
    --accent: #14568f;          /* 강조: 링크·포커스 전용 */
    --accent-soft: #dae6f2;
    --pass: #0d6f43;
    --warn: #8a570a;
    --fail: #b3261e;
    --pass-bg: #dceee5;
    --warn-bg: #f2e8d2;
    --fail-bg: #f3dfdd;
    --shadow: 0 1px 2px rgba(15, 23, 32, .06), 0 10px 28px rgba(15, 23, 32, .07);
    --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
    --sans: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ground: #0d1216;
        --panel: #151b21;
        --ink: #e9eef3;
        --body: #c0cad4;
        --muted: #8593a0;
        --line: #262f38;
        --line-soft: #1d252c;
        --accent: #6aa9e0;
        --accent-soft: #16232f;
        --pass: #4cc38a;
        --warn: #d9a441;
        --fail: #e2665c;
        --pass-bg: #10241b;
        --warn-bg: #251e10;
        --fail-bg: #26140f;
        --shadow: none;
    }
}
:root[data-theme="dark"] {
    --ground: #0d1216; --panel: #151b21; --ink: #e9eef3; --body: #c0cad4;
    --muted: #8593a0; --line: #262f38; --line-soft: #1d252c;
    --accent: #6aa9e0; --accent-soft: #16232f;
    --pass: #4cc38a; --warn: #d9a441; --fail: #e2665c;
    --pass-bg: #10241b; --warn-bg: #251e10; --fail-bg: #26140f;
    --shadow: none;
}
:root { color-scheme: light dark; }

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--ground);
    color: var(--body);
    font-family: var(--sans);
    line-height: 1.65;
    word-break: keep-all;
    -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wrap { width: min(820px, calc(100% - 32px)); margin: 0 auto; }
body.landing .wrap { width: min(1060px, calc(100% - 32px)); }

/* 첫 화면은 검색창 하나뿐이라 위로 쏠려 보인다.
   화면 높이를 채우고 가운데 정렬하되, 상단 바와 하단 문구는 제자리에 둔다. */
body.landing .wrap { min-height: 100vh; display: flex; flex-direction: column; }
body.landing .hero {
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
    padding-bottom: 8vh;            /* 시각적 중심은 기하학적 중심보다 살짝 위 */
}
body.landing .foot { margin-top: 0; }

/* ── 상단 바 ───────────────────────────────────────────────── */
.top {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 0; border-bottom: 1px solid var(--line);
}
.logo {
    font-family: var(--mono); font-size: 0.95rem; font-weight: 700;
    color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.logo span { color: var(--accent); }
.top .spacer { margin-left: auto; }
.ghost-btn {
    background: none; border: 1px solid var(--line); border-radius: 7px;
    color: var(--muted); font-size: 0.8rem; padding: 5px 10px; cursor: pointer;
    font-family: inherit;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--muted); }
a.ghost-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* 테마 버튼 — 글자 대신 아이콘. 지금 화면이 어두우면 해, 밝으면 달을 보여준다
   (누르면 무엇이 되는지가 아니라, 지금 무엇으로 바꿀 수 있는지를 나타낸다) */
.icon-btn { width: 34px; padding: 0; justify-content: center; font-size: 0.95rem; line-height: 1; }
.icon-btn .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-btn .icon-moon { display: none; }
    :root:not([data-theme="light"]) .icon-btn .icon-sun { display: inline; }
}
:root[data-theme="dark"] .icon-btn .icon-moon { display: none; }
:root[data-theme="dark"] .icon-btn .icon-sun { display: inline; }
:root[data-theme="light"] .icon-btn .icon-moon { display: inline; }
:root[data-theme="light"] .icon-btn .icon-sun { display: none; }

/* ── 검색(첫 화면) ──────────────────────────────────────────── */
.hero { padding: 64px 0 40px; text-align: center; }
.hero.compact { padding: 26px 0 18px; text-align: left; }
.hero h1 {
    margin: 0 0 10px; color: var(--ink);
    font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.3;
    letter-spacing: -0.02em; text-wrap: balance;
}
.hero p { margin: 0 auto; max-width: 52ch; color: var(--muted); font-size: 0.96rem; text-wrap: pretty; }
.hero.compact p { margin: 0; }

.search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 26px; width: 100%; max-width: 880px; align-self: center;
    text-align: left;
}
.search-label {
    grid-column: 1 / -1;
    font-size: 0.82rem; font-weight: 600; color: var(--muted);
    letter-spacing: 0.02em; margin-bottom: -2px;
}
.hero.compact .search { margin-top: 14px; align-self: stretch; max-width: none; }
.search input {
    flex: 1; min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--line); border-radius: 9px;
    background: var(--panel); color: var(--ink);
    font-family: var(--mono); font-size: 1rem;
}
.search input[aria-invalid="true"] { border-color: var(--fail); }
.search input::placeholder { color: var(--muted); opacity: 0.7; }
.search button {
    padding: 16px 28px; border: 0; border-radius: 9px;
    background: var(--accent); color: #fff;
    font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
    white-space: nowrap;
}
.search button:hover { filter: brightness(1.08); }

.examples {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; flex-wrap: wrap; margin-top: 16px;
    font-size: 0.85rem; color: var(--muted);
}
.examples a {
    font-family: var(--mono); font-size: 0.82rem; text-decoration: none;
    color: var(--body); background: var(--panel);
    border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px;
}
.examples a:hover { color: var(--accent); border-color: var(--accent); }

.notice {
    /* 검색 폼(grid) 안에 놓이므로 두 칸을 다 쓴다 — 입력창과 폭이 어긋나지 않는다 */
    grid-column: 1 / -1;
    margin: 2px 0 0; padding: 10px 14px;
    border: 1px solid var(--fail); border-left-width: 3px; border-radius: 8px;
    background: var(--fail-bg); color: var(--fail); font-size: 0.88rem; text-align: left;
}

/* ── 점수 요약 ─────────────────────────────────────────────── */
.summary {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    margin: 22px 0 6px; padding: 18px 20px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.score { font-family: var(--mono); font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--ink); }
.score small { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.summary .target { flex: 1; min-width: 180px; }
.summary .target strong { display: block; color: var(--ink); font-family: var(--mono); font-size: 1.02rem; }
.summary .target span { font-size: 0.82rem; color: var(--muted); }
.tallies { display: flex; gap: 8px; flex-wrap: wrap; }
.tally {
    font-size: 0.82rem; padding: 4px 10px; border-radius: 99px;
    font-variant-numeric: tabular-nums;
}
.tally.pass { background: var(--pass-bg); color: var(--pass); }
.tally.warn { background: var(--warn-bg); color: var(--warn); }
.tally.fail { background: var(--fail-bg); color: var(--fail); }

/* ── 결과 목록 ─────────────────────────────────────────────── */
.group { margin-top: 26px; }
.group > h2 {
    margin: 0 0 10px; font-size: 0.78rem; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--muted); font-family: var(--mono); font-weight: 600;
}
.rows {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 12px; overflow: hidden;
}
.row { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 14px 18px; }
.row + .row { border-top: 1px solid var(--line-soft); }
.dot {
    width: 9px; height: 9px; border-radius: 50%; margin-top: 8px; justify-self: center;
}
.row.pass .dot { background: var(--pass); }
.row.warn .dot { background: var(--warn); }
.row.fail .dot { background: var(--fail); }
.row.info .dot { background: var(--muted); opacity: 0.5; }

.row .head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.row .label { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.row .value {
    font-family: var(--mono); font-size: 0.86rem; color: var(--body);
    font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.row.pass .value { color: var(--pass); }
.row.warn .value { color: var(--warn); }
.row.fail .value { color: var(--fail); }
.row .why { margin: 3px 0 0; font-size: 0.89rem; color: var(--muted); }
.row .extra {
    margin-top: 6px; font-family: var(--mono); font-size: 0.78rem;
    color: var(--muted); overflow-wrap: anywhere;
}
.row .fix {
    margin-top: 9px; padding: 9px 12px;
    background: var(--accent-soft); border-radius: 8px;
    font-size: 0.85rem; color: var(--body);
}
.row .fix b { color: var(--ink); font-weight: 600; }
.row .fix code {
    display: block; margin-top: 5px; font-family: var(--mono); font-size: 0.8rem;
    color: var(--ink); overflow-x: auto; white-space: pre;
}

/* ── 정책 문서 ─────────────────────────────────────────────── */
.doc { max-width: none; padding: 30px 0 20px; }
.doc h1 { margin: 0 0 4px; color: var(--ink); font-size: 1.5rem; letter-spacing: -0.02em; }
.doc-updated { margin: 0 0 26px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.doc h2 {
    margin: 30px 0 8px; color: var(--ink); font-size: 1.02rem;
    padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; }
.doc p { margin: 0 0 12px; font-size: 0.95rem; max-width: 78ch; }

/* ── 하단 ──────────────────────────────────────────────────── */
.foot {
    margin: 40px 0 30px; padding-top: 16px; border-top: 1px solid var(--line);
    font-size: 0.8rem; color: var(--muted);
}
.foot-note { margin: 0 0 8px; }

/* 링크와 저작권을 한 줄에 — 좁은 화면에서만 두 줄로 접힌다 */
.foot-bar {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 10px 20px; flex-wrap: wrap;
}
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.copyright { font-size: 0.78rem; opacity: 0.75; white-space: nowrap; }

@media (max-width: 560px) {
    .search { flex-direction: column; }
    .hero { padding: 40px 0 28px; }
    .summary { gap: 14px; }
}


/* ═══════════ 사용법 데모 ═══════════ */
.demo {
    width: 100%; max-width: 560px; align-self: center; margin-top: 34px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    overflow: hidden; text-align: left;
}
.demo-head {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px; border-bottom: 1px solid var(--line-soft); background: var(--ground);
}
.demo-dots { display: inline-flex; gap: 5px; }
.demo-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.demo-dots i:first-child { background: var(--accent); }
.demo-title { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.demo-body {
    padding: 12px 18px 16px;
    /* 최종 화면 높이를 미리 잡아 둔다 — 줄이 하나씩 붙을 때마다 아래 내용이
       밀려 내려가면 읽는 사람 눈이 계속 따라다녀야 해서 정신이 사납다. */
    height: 232px;
    display: flex; flex-direction: column;
    font-size: 0.88rem;
    overflow: hidden;
}
/* 줄들은 위에서부터 쌓이고, 남는 공간은 아래에 그대로 둔다 */
.demo-body > :last-child { margin-bottom: auto; }

.demo-typed { font-family: var(--mono); color: var(--ink); margin-bottom: 10px; }
.demo-caret { color: var(--accent); margin-right: 7px; }
.demo-scan { font-size: 0.82rem; color: var(--muted); padding: 4px 0; }
.demo-scan::after { content: ""; animation: wi-dots 1s steps(4, end) infinite; }
@keyframes wi-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

.demo-row {
    display: grid;
    /* 이름 칸을 고정 폭으로 잡아 값들이 세로로 줄을 맞추게 한다.
       마지막 1fr 이 남는 공간을 흡수해, 값이 오른쪽 끝까지 밀려나지 않는다. */
    grid-template-columns: 12px 1fr auto;
    gap: 10px; align-items: baseline;
    padding: 7px 0; border-top: 1px solid var(--line-soft);
    animation: wi-in .28s ease both;
}
@keyframes wi-in { from { opacity: 0; } to { opacity: 1; } }
.demo-dot { width: 8px; height: 8px; border-radius: 50%; justify-self: center; }
.demo-row.pass .demo-dot { background: var(--pass); }
.demo-row.warn .demo-dot { background: var(--warn); }
.demo-row.fail .demo-dot { background: var(--fail); }
.demo-label { color: var(--ink); font-weight: 600; }
.demo-value { font-family: var(--mono); font-size: 0.78rem; text-align: right; }
.demo-row.pass .demo-value { color: var(--pass); }
.demo-row.warn .demo-value { color: var(--warn); }
.demo-row.fail .demo-value { color: var(--fail); }
.demo-done { margin-top: 10px; font-size: 0.8rem; color: var(--muted); animation: wi-in .3s ease both; }

@media (max-width: 520px) {
    /* 좁은 화면에서는 이름 칸 고정을 풀고 값을 아래 줄로 내린다 */
    .demo-row { grid-template-columns: 12px 1fr; }
    .demo-value { grid-column: 2; margin-top: 2px; }
    .demo-body { height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
    .demo-row, .demo-done { animation: none; }
    .demo-scan::after { animation: none; content: "…"; }
}

/* ═══════════ 검사 종류 안내 ═══════════ */
.tool-nav {
    margin-top: 30px; padding: 16px 18px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    display: flex; flex-direction: column; gap: 14px;
}
.tool-group + .tool-group { padding-top: 14px; border-top: 1px solid var(--line-soft); }
.tool-nav-title {
    display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 9px;
}
/* 만들기 도구는 색으로 구분 — 검사와 성격이 다르다 */
.tool-nav-links a.gen-link { border-style: dashed; }
.tool-nav-links a.gen-link:hover { border-style: solid; }
.tool-nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-nav-links a, .tool-nav-links .current {
    font-size: 0.85rem; padding: 6px 13px; border-radius: 99px;
    border: 1px solid var(--line); text-decoration: none;
}
.tool-nav-links a { color: var(--body); }
.tool-nav-links a:hover { color: var(--accent); border-color: var(--accent); }
.tool-nav-links .current { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* 착륙 페이지 */
.tool-hero { text-align: center; padding: 40px 0 10px; }
.tool-doc { padding-top: 26px; }


/* ═══════════ 레코드 생성기 ═══════════ */
.gen { max-width: 720px; margin: 0 auto; padding-bottom: 10px; }
.gen-field { margin-bottom: 22px; }
.gen-field > label {
    display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted);
    margin-bottom: 8px; letter-spacing: 0.02em;
}
.gen-field input[type="text"], .gen-field input[type="email"] {
    width: 100%; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: 9px;
    background: var(--panel); color: var(--ink);
    font-family: var(--mono); font-size: 0.92rem;
}
.gen-help { margin: 7px 0 0; font-size: 0.82rem; color: var(--muted); }

.gen-choices { display: flex; flex-direction: column; gap: 6px; }
.choice {
    display: flex; align-items: baseline; gap: 10px;
    padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px;
    background: var(--panel); cursor: pointer; font-size: 0.9rem;
}
.choice:hover { border-color: var(--muted); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin: 0; flex: none; accent-color: var(--accent); }
.choice b { font-family: var(--mono); color: var(--ink); }
.choice small { display: block; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-top: 2px; }

/* 결과 상자 */
.gen-out {
    margin-top: 26px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--panel); overflow: hidden;
}
.gen-out-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: var(--ground); border-bottom: 1px solid var(--line-soft);
    font-size: 0.8rem; color: var(--muted);
}
.copy-btn {
    border: 1px solid var(--line); border-radius: 7px; background: var(--panel);
    color: var(--body); font-family: inherit; font-size: 0.78rem;
    padding: 5px 12px; cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.gen-rows { padding: 6px 14px 12px; }
.gen-rows > div {
    display: grid; grid-template-columns: 68px 1fr; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline;
}
.gen-rows > div:last-child { border-bottom: 0; }
.gen-rows span { font-size: 0.78rem; color: var(--muted); }
.gen-rows code {
    font-family: var(--mono); font-size: 0.85rem; color: var(--ink);
    overflow-wrap: anywhere;
}
.gen-warn {
    margin: 0; padding: 11px 14px;
    background: var(--warn-bg); color: var(--warn);
    font-size: 0.84rem; border-top: 1px solid var(--line-soft);
}

/* 검사 결과에서 이어지는 링크 */
.row-links { margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.row-links a { font-size: 0.83rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.row-links a:hover { text-decoration: underline; }


/* ═══════════ 언어 선택 ═══════════ */
.lang-pick { position: relative; }
.lang-current { display: inline-flex; align-items: center; gap: 6px; }
.flag { font-size: 1rem; line-height: 1; }

.lang-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
    min-width: 168px; padding: 5px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0,0,0,.16);
    display: flex; flex-direction: column; gap: 2px;
}
.lang-menu[hidden] { display: none; }
.lang-menu a {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 11px; border-radius: 7px;
    color: var(--body); text-decoration: none; font-size: 0.88rem; white-space: nowrap;
}
.lang-menu a:hover { background: var(--ground); color: var(--ink); }
.lang-menu a.on { color: var(--accent); font-weight: 600; background: var(--accent-soft); }

/* 웹 서버가 응답하지 않을 때 — 점수보다 먼저 읽혀야 하는 사실 */
.offline-note {
    max-width: 880px;
    margin: 0 auto 18px;
    padding: 16px 18px;
    border: 1px solid var(--fail);
    border-left-width: 3px;
    border-radius: 8px;
    background: var(--fail-bg);
}
.offline-note strong { display: block; font-size: 1.02rem; margin-bottom: 6px; }
.offline-note p { margin: 0; font-size: .9rem; line-height: 1.65; opacity: .85; }

/* ── 주요 서비스 상태 띠 ────────────────────────────────────────────
   평소에는 한 줄만 차지한다. 검색이 이 사이트의 본론이고, 이건 곁들임이다.
   마우스를 올렸을 때 펼쳐지는 목록은 자리를 밀어내지 않도록 띄워서 그린다. */
.ticker {
    position: relative;
    align-self: center;
    margin-bottom: 22px;
    font-size: .82rem;
}
.ticker-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    cursor: default;
    white-space: nowrap;
}
.ticker-pulse {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--pass);
    box-shadow: 0 0 0 0 var(--pass);
    animation: ticker-pulse 2.4s ease-out infinite;
    flex: none;
}
.ticker.slow .ticker-pulse { background: var(--warn); box-shadow: 0 0 0 0 var(--warn); }
.ticker.down .ticker-pulse { background: var(--fail); box-shadow: 0 0 0 0 var(--fail); }
@keyframes ticker-pulse {
    0%   { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    70%  { box-shadow: 0 0 0 6px transparent; opacity: .85; }
    100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}
.ticker-sum { font-weight: 600; }
.ticker.down .ticker-sum { color: var(--fail); }
.ticker.slow .ticker-sum { color: var(--warn); }
.ticker-sep { opacity: .35; }

/* 순환하는 자리 — 폭이 들쭉날쭉하면 띠 전체가 흔들린다. 최소폭을 준다. */
.ticker-slot {
    display: inline-block;
    min-width: 132px;
    opacity: .85;
    font-variant-numeric: tabular-nums;
    animation: ticker-in .45s ease both;
}
.ticker-slot.down { color: var(--fail); opacity: 1; }
.ticker-slot.slow { color: var(--warn); opacity: 1; }
@keyframes ticker-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: .85; transform: none; }
}
.ticker-when { opacity: .4; font-size: .76rem; }

/* 펼침 목록 — 띄워 그려서 아래 내용이 밀리지 않게 한다 */
.ticker-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 2px 18px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .32);
    opacity: 0;
    visibility: hidden;
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.ticker:hover .ticker-panel,
.ticker.open .ticker-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.ticker-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.ticker-item:hover .ticker-name { text-decoration: underline; }
.ticker-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pass); flex: none; }
.ticker-item.slow .ticker-dot { background: var(--warn); }
.ticker-item.down .ticker-dot { background: var(--fail); }
.ticker-name { flex: 1; }
.ticker-ms { opacity: .5; font-variant-numeric: tabular-nums; font-size: .78rem; }
.ticker-item.down .ticker-ms { color: var(--fail); opacity: 1; }

@media (max-width: 560px) {
    .ticker-panel { grid-template-columns: 1fr; max-height: 60vh; overflow-y: auto; }
    .ticker-slot { min-width: 108px; }
    .ticker-when { display: none; }
}

/* 입력한 주소가 다른 곳으로 넘어갈 때 — 경고가 아니라 사실 안내라 색을 눌러 둔다 */
.moved-note {
    max-width: 880px;
    margin: 0 auto 14px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    background: var(--panel);
}
.moved-note strong { display: block; font-size: .95rem; margin-bottom: 5px; }
.moved-note p { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--muted); }

/* ── 검사 버튼의 "검사 중" 상태 ─────────────────────────────────────
   글자만 바뀌면 폭이 줄었다 늘었다 하므로 늘 flex 로 가운데 정렬한다. */
.search button.busy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: .85;
    cursor: wait;
}
.spin {
    width: 14px;
    height: 14px;
    flex: none;
    border: 2px solid currentColor;
    border-right-color: transparent;   /* 한 곳이 비어야 도는 게 보인다 */
    border-radius: 50%;
    animation: wi-spin .7s linear infinite;
}
@keyframes wi-spin {
    to { transform: rotate(360deg); }
}
/* 움직임을 원치 않는 이용자에게는 글자("검사 중…")만 보여 준다 */
@media (prefers-reduced-motion: reduce) {
    .spin { display: none; }
}

/* 밝은 테마의 층 표현 — 바닥을 어둡게 누른 대신, 카드는 그림자로 살짝 띄운다.
   다크 모드에서는 --shadow: none 이라 아무 영향 없다. */
.summary, .rows, .demo, .tool-nav, .gen, .offline-note, .moved-note,
.search input, .ticker-bar {
    box-shadow: var(--shadow);
}

/* ── 방문자 지역 시각 칩 ────────────────────────────────────────────
   숫자가 바뀔 때 칩 폭이 들썩이지 않도록 고정폭 숫자를 쓴다. */
.clock-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--body);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.clock-zone { font-size: 0.68rem; color: var(--muted); }
@media (max-width: 560px) {
    .clock-zone { display: none; }     /* 좁은 화면에서는 시각만 */
}

/* ── 상태 띠: 나라별 묶음 ──────────────────────────────────────────── */
.ticker-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 420px;
}
.ticker-country { display: flex; flex-direction: column; gap: 1px; }
.ticker-country + .ticker-country { padding-top: 9px; border-top: 1px solid var(--line-soft); }
.ticker-cc {
    display: flex; align-items: center; gap: 6px;
    font-size: .72rem; font-weight: 600; letter-spacing: .05em;
    color: var(--muted);
}
.ticker-flag { font-size: .9rem; line-height: 1; }
.ticker-cc-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 0 18px;
}
@media (max-width: 560px) {
    .ticker-panel { min-width: 0; }
    .ticker-cc-items { grid-template-columns: 1fr; }
}

/* ── 모바일 잘림 수정 ────────────────────────────────────────────────
   원인: "고치는 법"의 코드 한 줄이 줄바꿈 금지(pre)라서 grid 칸의
   최소 폭을 화면보다 넓게 벌린다. 카드는 overflow:hidden 이라 그만큼
   오른쪽이 통째로 잘린다 — 코드뿐 아니라 옆의 설명문까지.
   grid 칸이 내용보다 줄어들 수 있게 min-width:0 을 준다. */
.row > * { min-width: 0; }
.summary > * { min-width: 0; }

@media (max-width: 560px) {
    /* 코드 상자: 좁은 화면에서는 옆으로 미는 대신 줄을 꺾는다.
       nginx 지시문처럼 띄어쓰기 없는 긴 토막도 break-all 로 꺾인다. */
    .row .fix code { white-space: pre-wrap; word-break: break-all; }
    .row .extra { word-break: break-all; }
    .row { padding: 12px 14px; }

    /* 도구 칩: 들쭉날쭉한 흘림 배치 대신 2열 정렬 */
    .tool-nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .tool-nav-links a, .tool-nav-links .current {
        text-align: center;
        padding: 8px 6px;
        white-space: normal;       /* 긴 이름은 칩 안에서 줄을 꺾는다 */
    }

    /* 예시 칩: "눌러서 바로 보기"는 제 줄로, 칩 셋은 한 줄에 균등 */
    .examples span { flex-basis: 100%; }
    .examples a {
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
        padding: 6px 4px;
        font-size: 0.76rem;
    }
}

/* ── 쿠키·저장 안내 (하단 띠) ──────────────────────────────────────── */
.consent {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(680px, calc(100% - 24px));
    padding: 12px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.consent p { margin: 0; flex: 1; font-size: .82rem; line-height: 1.55; color: var(--body); }
.consent a { color: var(--accent); }
.consent button {
    flex: none;
    padding: 8px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
@media (max-width: 560px) {
    .consent { flex-direction: column; align-items: stretch; text-align: center; gap: 10px; }
}
