:root {
    --ink: #1f2a37;
    --ink-soft: #334155;
    --amber: #ffb020;
    --amber-soft: #fff4dc;
    --green: #086747;
    --green-soft: #e3f5ec;
    --red: #c2410c;
    --text: #1c2430;
    --muted: #64707f;
    --line: #e4e1da;
    --surface: #ffffff;
    --background: #f6f5f2;
    --radius: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
    margin: 0;
    padding: 0;
}

body {
    min-width: 320px;
    color: var(--text);
    background: var(--background);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

:focus-visible {
    outline: 3px solid #1768b3;
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

/* 헤더 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
    background: var(--ink);
    box-shadow: 0 1px 0 rgba(255,255,255,.12);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    color: var(--ink);
    background: var(--amber);
}

.site-nav {
    display: flex;
    gap: 2px;
}

.site-nav a {
    padding: 8px 11px;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: #fff;
    background: var(--ink-soft);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 4px 0;
    border-radius: 2px;
    background: #fff;
}

/* 본문 */
.page {
    padding: 20px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb a {
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.hero {
    padding: 38px 32px 28px;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(ellipse at top right, rgba(255, 176, 32, 0.14), transparent 55%),
        var(--ink);
}

.eyebrow {
    color: var(--amber);
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    margin-top: 6px;
    font-size: clamp(28px, 5vw, 40px);
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.hero .lead {
    margin-top: 10px;
    color: #cbd5e1;
}

.search-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin-top: 24px;
    padding: 18px;
    border-radius: 16px;
    color: var(--text);
    background: #fff;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field label {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 800;
}

.field select,
.field input {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: #fff;
}

.field select:disabled {
    background: #f3f2ee;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    gap: 8px;
}

.btn:hover {
    border-color: var(--ink);
}

.btn-primary {
    border-color: var(--amber);
    color: var(--ink);
    background: var(--amber);
}

.btn-primary:hover {
    border-color: #e89a00;
    background: #ffa500;
}

.btn-lg {
    min-height: 48px;
    padding: 0 26px;
    font-size: 16px;
}

.btn-call {
    border-color: var(--green);
    color: #fff;
    background: var(--green);
}

.btn-ghost {
    border-color: transparent;
    background: transparent;
    text-decoration: underline;
}

.page-head {
    padding: 8px 0 6px;
}

.page-head h1 {
    font-size: clamp(26px, 4.5vw, 36px);
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.lead {
    margin-top: 8px;
    color: var(--muted);
    font-size: 17px;
}

.callout {
    margin-top: 14px;
    padding: 12px 16px;
    border-left: 4px solid var(--amber);
    border-radius: 4px 12px 12px 4px;
    background: var(--amber-soft);
    font-size: 15px;
}

.section {
    margin-top: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 3px 12px rgba(31,42,55,.025);
}

.section h2 {
    font-size: 21px;
    letter-spacing: -0.02em;
}

.section h3 {
    margin-top: 16px;
    font-size: 16px;
}

.section > * + * {
    margin-top: 14px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.section-head a {
    color: var(--muted);
    font-size: 14px;
}

.section-head h2 a {
    color: inherit;
    font-size: inherit;
    text-decoration: none;
}

.section-desc,
.note,
.source {
    color: var(--muted);
    font-size: 14px;
}

.source a {
    color: var(--muted);
}

.prose h2 + p,
.prose p + h2,
.prose ul + h2,
.prose .table-wrap + h2,
.prose .source + h2 {
    margin-top: 12px;
}

.prose h2:not(:first-child) {
    margin-top: 26px;
}

/* 홈 */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.quick-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-decoration: none;
}

.quick-card strong {
    font-size: 16px;
}

.quick-card span {
    color: var(--muted);
    font-size: 13px;
}

.quick-card:hover {
    border-color: var(--ink);
    background: #fffaf0;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
}

.price-grid li {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-radius: 12px;
    background: var(--background);
}

.price-grid span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.price-grid strong {
    font-size: 24px;
    letter-spacing: -0.02em;
}

.price-grid small {
    color: var(--muted);
    font-size: 12px;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    list-style: none;
}

.region-grid a {
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
}

.region-grid span {
    color: var(--muted);
    font-size: 13px;
}

.region-grid a:hover {
    border-color: var(--ink);
}

.link-list {
    list-style: none;
}

.link-list li + li {
    border-top: 1px solid var(--line);
}

.link-list a {
    display: block;
    padding: 11px 0;
    font-weight: 700;
    text-decoration: none;
}

.link-list a::after {
    float: right;
    color: var(--muted);
    content: "\203A";
}

.chip-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.chip-links a {
    display: inline-flex;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    min-height: 44px;
    align-items: center;
}

.chip-links span {
    color: var(--muted);
    font-weight: 600;
}

.chip-links a:hover {
    border-color: var(--ink);
}

/* 검사소 카드 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.chip {
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.chip[aria-pressed="true"],
.chip[aria-selected="true"] {
    border-color: var(--ink);
    color: #fff;
    background: var(--ink);
}

.filter-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 14px;
}

.filter-empty {
    color: var(--muted);
}

.center-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    list-style: none;
}

.center-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    scroll-margin-top: 86px;
}

.center-card:hover {
    border-color: #b8c1c9;
    box-shadow: 0 4px 16px rgba(31,42,55,.06);
}

.center-head h3 {
    margin-top: 6px;
    font-size: 17px;
    line-height: 1.4;
}

.center-head h3 a {
    text-decoration: none;
}

.center-head h3 a:hover {
    text-decoration: underline;
}

.kind {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
}

.kind-ts {
    color: var(--ink);
    background: var(--amber);
}

.kind-private {
    color: var(--ink-soft);
    background: #eceae4;
}

.center-address {
    color: var(--muted);
    font-size: 14px;
}

.abilities {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
}

.abilities li {
    padding: 1px 8px;
    border-radius: 6px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 12px;
    font-weight: 700;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.card-note {
    color: var(--muted);
    font-size: 13px;
}

/* 상세 */
.center-head-block .card-actions {
    margin-top: 16px;
}

.info-table,
.ability-table {
    display: grid;
    border-top: 1px solid var(--line);
}

.info-table div,
.ability-table div {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.info-table dt,
.ability-table dt {
    color: var(--muted);
    font-weight: 700;
}

.yes {
    color: var(--green);
    font-weight: 800;
}

.no {
    color: #626d78;
}

.map {
    display: grid;
    height: 260px;
    place-items: center;
    border-radius: 12px;
    background: repeating-linear-gradient(0deg, transparent 0 31px, #dde4df 31px 32px), repeating-linear-gradient(90deg, #edf2ee 0 31px, #dde4df 31px 32px);
}

.nearby-list {
    list-style: none;
}

.nearby-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.nearby-list a {
    font-weight: 700;
}

.nearby-list span {
    color: var(--muted);
    font-size: 13px;
}

/* 표 */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

caption {
    padding-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    text-align: left;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

thead th {
    color: var(--muted);
    background: var(--background);
    font-size: 13px;
}

.fee-table td {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.fee-table thead th:not(:first-child) {
    text-align: right;
}

/* 계산기 */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: end;
    gap: 12px;
}

.calc-result {
    display: block;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--amber-soft);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.calc-result-box,
.my-result {
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--background);
}

.calc-result-box strong,
.my-result strong {
    display: block;
    font-size: 20px;
}

.my-result p + p,
.calc-result-box p + p {
    margin-top: 6px;
}

.tag-yes {
    color: var(--green);
}

.tag-warn {
    color: var(--red);
}

/* 체크리스트 */
.progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--background);
}

.progress-bar {
    width: 0;
    height: 100%;
    background: var(--green);
    transition: width 0.2s ease;
}

.progress-text {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.checklist {
    display: grid;
    gap: 8px;
    list-style: none;
}

.checklist label {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
}

.checklist input {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: var(--green);
}

.checklist strong {
    display: block;
}

.checklist span {
    color: var(--muted);
    font-size: 14px;
}

.checklist strong {
    color: var(--text);
    font-size: 16px;
}

.checklist input:checked + span strong {
    color: var(--green);
}

/* 불합격 */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fail-panel {
    padding: 18px;
    border-radius: 12px;
    background: var(--background);
}

.tabs-ready .fail-panel[data-collapsed] {
    display: none;
}

[data-fail-helper]:not(.tabs-ready) [role="tablist"] {
    display: none;
}

.fail-panel ul {
    padding-left: 20px;
}

.region-text {
    padding-left: 20px;
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    padding: 12px 0;
    font-weight: 700;
    cursor: pointer;
}

.faq details p {
    padding-bottom: 12px;
    color: var(--ink-soft);
}

.data-info {
    background: transparent;
}

.ad-box {
    min-height: 100px;
    margin-top: 22px;
    overflow: hidden;
    text-align: center;
}

/* 푸터 */
.site-footer {
    padding: 28px 0 40px;
    color: #94a3b8;
    background: var(--ink);
    font-size: 13px;
}

.site-footer p + p {
    margin-top: 6px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 14px;
}

.footer-nav a {
    color: #e2e8f0;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 860px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 58px;
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        padding: 8px 16px 16px;
        background: var(--ink);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 12px;
        font-size: 16px;
    }

    .search-card {
        grid-template-columns: 1fr 1fr;
    }

    .search-card .btn {
        grid-column: 1 / -1;
    }

    .quick-grid,
    .price-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .center-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hero {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .search-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 14px;
    }

    .search-card .search-type {
        grid-column: 1 / -1;
    }

    .section {
        padding: 20px 16px;
    }

    .info-table div,
    .ability-table div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .price-grid strong {
        font-size: 20px;
    }

    .calc-result {
        font-size: 24px;
    }

    .filter-count {
        width: 100%;
        margin-left: 0;
    }
}

/* 공통 조작과 상태 표시 */
.skip-link {
    position: fixed;
    top: 8px;
    left: 16px;
    z-index: 200;
    padding: 12px 20px;
    border-radius: 8px;
    color: var(--ink);
    background: var(--amber);
    transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
#main-content { scroll-margin-top: 76px; }
.site-header :focus-visible, .hero-help:focus-visible { outline-color: var(--amber); }
button:disabled { cursor: wait; opacity: .7; }
.hero-help { display: inline-block; margin-top: 18px; color: #e2e8f0; font-size: 14px; text-underline-offset: 4px; }
.hero-help span { margin-left: 8px; }
.search-card-inline { border: 1px solid var(--line); margin-top: 18px; }
.form-status { grid-column: 1 / -1; color: var(--ink-soft); font-size: 14px; }
.field-help { color: var(--muted); font-size: 13px; line-height: 1.5; }
[data-fee-calc] .calc-grid { align-items: start; }
.region-retry { grid-column: 1 / -1; justify-self: start; }
.list-tools { padding: 18px; background: var(--background); border-radius: 12px; }
.list-tools-heading { display: flex; gap: 12px; align-items: end; justify-content: space-between; }
.list-tools-heading .field { flex: 1; max-width: 500px; }
.list-tools .note { margin: 12px 0 10px; }
.filter-summary { padding-top: 14px; font-size: 14px; font-weight: 700; color: var(--ink); }
.filter-empty { padding: 32px 20px; border: 1px dashed #bcc5ce; border-radius: 12px; text-align: center; background: #f8faf9; }
.filter-empty strong { display: block; font-size: 18px; color: var(--ink); }
.filter-empty p { margin: 8px 0 18px; }
.filter-empty .btn { margin: 3px; }
.list-more { text-align: center; }
.list-more:has([hidden]) { display: none; }
.list-more .btn { width: min(100%, 360px); min-height: 48px; }
.alternative-centers summary { cursor: pointer; font-size: 17px; font-weight: 700; }
.alternative-centers summary span { margin-left: 8px; font-size: 14px; color: var(--muted); }
.center-summary { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: stretch; }
.center-summary > .section { min-width: 0; }
.center-summary .info-table div { grid-template-columns: 84px minmax(0,1fr); }
.center-head-block { padding: 14px 0 2px; }
.center-head-block h1 { margin-top: 10px; }
.map-placeholder { padding: 16px; text-align: center; }
.map-canvas { width: 100%; height: 100%; border-radius: inherit; }
.map-symbol { display: block; width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 50%; font-size: 26px; background: white; color: var(--green); }
.map-placeholder > p { font-size: 14px; margin-bottom: 12px; }
.map-status { max-width: 280px; margin: 10px auto 0; }
.mobile-cell-label { display: none; }
.table-hint { font-size: 13px; color: var(--ink-soft); margin-top: 14px; }
.table-hint[hidden] + .table-wrap { margin-top: 14px; }
.table-wrap { border-radius: 8px; }
.table-wrap:not(:focus-visible) { outline: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 860px) {
    .center-summary { grid-template-columns: 1fr; gap: 0; }
    .hero { padding: 28px 22px 22px; }
    .site-nav { max-height: calc(100dvh - 58px); overflow-y: auto; box-shadow: 0 8px 18px rgba(0,0,0,.18); }
}
@media (max-width: 560px) {
    .hero { padding: 24px 16px 20px; }
    .hero .lead { font-size: 15px; }
    .hero-help { font-size: 13px; line-height: 1.7; }
    .search-card { gap: 12px 8px; margin-top: 18px; }
    .search-card select { padding: 0 7px; font-size: 14px; }
    .list-tools { padding: 14px 12px; }
    .list-tools-heading { flex-wrap: wrap; gap: 4px; }
    .list-tools-heading .field { flex-basis: 100%; max-width: none; }
    .list-tools-heading > .btn { margin-left: auto; }
    .chip { padding: 0 11px; }
    .section-head { align-items: center; }
    .section-head > a { flex-shrink: 0; font-size: 13px; }
    .quick-card { padding: 16px 14px; }
    .quick-card strong { font-size: 15px; }
    .center-card { padding: 16px 14px; }
    .card-actions .btn { flex-grow: 1; }
    .center-head-block .card-actions .btn-call { flex-basis: 100%; }
    .center-summary .info-table div { grid-template-columns: 1fr; }
    .center-summary .map { height: 240px; }
    th, td { white-space: normal; padding: 10px 8px; }
    table { font-size: 14px; }
    .fee-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .fee-table tbody, .fee-table tr { display: block; }
    .fee-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; gap: 0 12px; }
    .fee-table tr + tr { margin-top: 10px; }
    .fee-table tbody th { grid-column: 1 / -1; border: 0; padding: 0 0 8px; font-size: 15px; }
    .fee-table td { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 4px; padding: 8px 0; font-size: 14px; }
    .mobile-cell-label { display: inline; color: var(--muted); font-size: 12px; }
    .calc-grid { grid-template-columns: minmax(0,1fr); }
    .footer-nav a { padding: 7px 0; }
}
