:root {
    --bg: #fff7ed;
    --ink: #1f1a17;
    --muted: #6b5b4e;
    --accent: #b8500a;
    --line: #f1e3d3;
    --line-strong: #e5d3bf;
    --white: #ffffff;
    --icon-bg: #fde7d3;
    --badge-bg: #f3eee8;
    --ad-line: #d9c3ab;
    --max: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body.modal-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Noto Sans KR", system-ui, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 2px;
}

.skip {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 10;
    padding: 8px 12px;
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
}

.skip:focus {
    top: 12px;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.hero {
    padding: 72px 24px 40px;
    text-align: center;
}

.hero h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.3;
    font-weight: 800;
}

.hero .lead {
    margin: 16px 0 0;
    font-size: 18px;
    color: var(--muted);
}

.search {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 640px;
    margin: 32px auto 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.search input {
    flex: 1 1 320px;
    min-width: 0;
    height: 56px;
    padding: 0 20px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}

.search button,
.chip {
    font-family: inherit;
    cursor: pointer;
}

.search button {
    flex: 0 0 auto;
    height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 16px;
    background: var(--accent);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.chip {
    padding: 10px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

.chip.is-active {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--white);
    font-weight: 700;
}

.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    margin-top: 8px;
    border: 1px dashed var(--ad-line);
    border-radius: 12px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.ad-gap {
    padding-top: 40px;
}

.section {
    padding-top: 56px;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.section h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
}

.section-note,
.guide-lead {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.guide-lead {
    max-width: 720px;
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.8;
}

.card-grid,
.cat-grid,
.step-grid {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}

.card-grid,
.cat-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.step-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
}

.tool-card:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.tool-card.is-disabled {
    cursor: default;
}

.tool-card.is-disabled:hover {
    border-color: var(--line);
}

.tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--icon-bg);
    color: var(--accent);
}

.tool-card h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}

.tool-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.tool-go {
    margin-top: auto;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
}

.cat-card,
.step-card,
.faq details {
    border: 1px solid var(--line);
    background: var(--white);
}

.cat-card,
.step-card {
    min-width: 0;
    padding: 24px;
    border-radius: 20px;
}

.cat-card h3,
.step-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.step-label {
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
}

.step-card h3 {
    margin-top: 8px;
}

.step-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.tool-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tool-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-size: 15px;
}

.tool-list a,
.tool-list button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.tool-list a:hover,
.tool-list button:hover {
    color: var(--accent);
}

.badge {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--badge-bg);
    color: var(--muted);
    font-size: 12px;
}

.tool-list li[hidden],
.is-hidden,
.tool-list li.is-hidden {
    display: none;
}

.empty-note {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin-top: 24px;
}

.faq details {
    padding: 20px 24px;
    border-radius: 16px;
}

.faq summary {
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: var(--white);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 32px;
    padding-bottom: 40px;
}

.footer-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.footer-copy,
.footer-visits,
.footer-mail {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.footer-mail a {
    color: var(--accent);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.footer-nav a {
    padding: 12px;
    font-size: 14px;
    text-decoration: none;
}

.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    top: var(--site-header-offset, 0px);
    z-index: 30;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(31, 26, 23, 0.45);
}

.modal-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
    width: min(440px, 100%);
    max-width: 100%;
    min-width: 0;
    max-height: calc(100dvh - var(--site-header-offset, 0px) - 48px);
    min-height: 0;
    padding: 28px 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--white);
    margin: 0 auto;
    overflow: auto;
    overscroll-behavior: contain;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-dialog h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.modal-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.modal-ip {
    margin: 20px 0 0;
    min-height: calc(32px * 1.3);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    word-break: break-all;
}

.modal-close {
    flex: 0 0 auto;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 24px;
}

.modal-copy {
    flex: 0 0 auto;
    height: 48px;
    min-width: 88px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: var(--white);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.modal-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: 20px;
}

.modal-form label {
    font-size: 14px;
    font-weight: 700;
}

.modal-age {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 16px 0 0;
    min-height: 76px;
    padding: 14px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
}

.modal-age.is-error {
    font-size: 15px;
    font-weight: 500;
    color: var(--accent);
}

@media (max-width: 720px) {
    .hero {
        padding-top: 48px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .search button {
        width: 100%;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
