:root {
    color-scheme: light;
    --page: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --text: #202431;
    --muted: #606779;
    --subtle: #7c8496;
    --border: #dfe3ec;
    --primary: #5b35d5;
    --primary-dark: #4521b6;
    --accent: #ff8500;
    --accent-dark: #e96e00;
    --success: #197a4b;
    --header: rgba(255,255,255,.92);
    --shadow: 0 20px 55px rgba(34,42,67,.12);
    --shadow-soft: 0 10px 28px rgba(34,42,67,.08);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #111526;
    --surface: #1a2033;
    --surface-soft: #232a40;
    --text: #f4f6fd;
    --muted: #c0c7d8;
    --subtle: #98a2b8;
    --border: #374059;
    --primary: #9d83ff;
    --primary-dark: #b5a2ff;
    --accent: #ffad42;
    --accent-dark: #ffc46f;
    --success: #62ce97;
    --header: rgba(17,21,38,.92);
    --shadow: 0 20px 55px rgba(0,0,0,.35);
    --shadow-soft: 0 10px 28px rgba(0,0,0,.23);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.72;
    transition: background .25s ease, color .25s ease;
}

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
button, input, textarea { font: inherit; }
img { max-width: 100%; }

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    transform: translateY(-160%);
    border-radius: 8px;
    background: var(--text);
    color: var(--surface);
    padding: 9px 13px;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: var(--header);
    backdrop-filter: blur(14px);
}

.header-inner {
    width: min(1120px, calc(100% - 32px));
    min-height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 18px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), #2575fc);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.nav-wrap { display: flex; align-items: center; gap: 12px; }
.site-nav { display: flex; align-items: center; gap: 5px; }

.site-nav a {
    border-radius: 8px;
    color: var(--muted);
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

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

.theme-toggle {
    min-width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.theme-toggle:hover { transform: translateY(-1px); }

.site-main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 80px;
}

.hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 28px;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #fff;
    padding: clamp(42px, 8vw, 88px) clamp(24px, 7vw, 76px);
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -130px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
}

.eyebrow {
    margin: 0 0 12px;
    color: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.17;
    letter-spacing: -.035em;
}

.hero-copy {
    max-width: 680px;
    margin: 20px 0 0;
    color: rgba(255,255,255,.86);
    font-size: clamp(17px, 2vw, 20px);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    padding: 11px 20px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}

.button:hover { color: #fff; filter: brightness(1.05); transform: translateY(-2px); }
.button-secondary { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.42); }

.trust-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 22px 0 0;
}

.trust-item,
.content-card,
.panel {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.trust-item { padding: 18px; }
.trust-item strong { display: block; margin-bottom: 3px; }
.trust-item span { color: var(--muted); font-size: 14px; }

.section { margin-top: 64px; scroll-margin-top: 96px; }
.section-heading { max-width: 720px; margin-bottom: 24px; }
.section-heading h2 { margin: 0 0 9px; font-size: clamp(26px, 4vw, 36px); line-height: 1.3; letter-spacing: -.025em; }
.section-heading p { margin: 0; color: var(--muted); }

.panel { padding: clamp(24px, 5vw, 44px); }
.tool-panel { text-align: center; }
.tool-panel .button { min-width: 200px; font-size: 18px; }

.numbers { margin-top: 28px; }
.number-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.set-label { width: 48px; color: var(--muted); font-weight: 800; }

.ball {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    font-weight: 850;
    box-shadow: inset 0 -5px 8px rgba(0,0,0,.18), 0 5px 12px rgba(0,0,0,.12);
    animation: pop .34s ease both;
}

.yellow { background: #f4c430; color: #252525; }
.blue { background: #2675d8; }
.red { background: #df4545; }
.gray { background: #717785; }
.green { background: #35a364; }

@keyframes pop { from { transform: scale(.45); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.notice,
.callout {
    border-left: 4px solid var(--accent);
    border-radius: 0 10px 10px 0;
    background: var(--surface-soft);
    color: var(--muted);
    padding: 14px 16px;
}

.notice { max-width: 720px; margin: 25px auto 0; font-size: 14px; text-align: left; }

.content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.content-grid.two { grid-template-columns: repeat(2, 1fr); }
.content-card { padding: 24px; }
.content-card h3 { margin: 0 0 8px; font-size: 19px; }
.content-card p { margin: 0; color: var(--muted); }
.content-card a.more { display: inline-block; margin-top: 14px; font-weight: 800; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 34px; align-items: start; }
.article { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); padding: clamp(26px, 5vw, 52px); box-shadow: var(--shadow-soft); }
.article h1 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 48px); line-height: 1.23; letter-spacing: -.03em; }
.article h2 { margin: 46px 0 14px; font-size: clamp(23px, 3vw, 30px); line-height: 1.35; }
.article h3 { margin: 28px 0 9px; }
.article p, .article li { color: var(--muted); }
.article strong { color: var(--text); }
.article-meta { margin: 0 0 30px; color: var(--subtle); font-size: 14px; }
.article ul, .article ol { padding-left: 22px; }
.article li + li { margin-top: 8px; }

.toc { position: sticky; top: 92px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 20px; }
.toc strong { display: block; margin-bottom: 10px; }
.toc a { display: block; color: var(--muted); padding: 5px 0; font-size: 14px; text-decoration: none; }
.toc a:hover { color: var(--primary); }

.stat {
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-soft);
    padding: 20px;
    text-align: center;
}

.stat strong { display: block; color: var(--primary); font-size: clamp(26px, 4vw, 38px); line-height: 1.2; }
.stat span { color: var(--muted); font-size: 14px; }

.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 17px 19px; }
.faq summary { color: var(--text); font-weight: 800; cursor: pointer; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { color: var(--text); font-size: 14px; font-weight: 800; }
.field input, .field textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--text); padding: 12px 14px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,133,0,.17); }
.consent { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 14px; }
.consent input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); }
.honeypot { position: absolute; left: -9999px; }
.form-grid .button { grid-column: 1 / -1; }

.comments-panel { min-height: 220px; }
.moderation-note { margin-bottom: 22px; color: var(--muted); font-size: 14px; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0; }
.footer-top { display: flex; justify-content: space-between; gap: 28px; }
.footer-copy { max-width: 520px; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px 18px; }
.footer-links a { color: var(--muted); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.copyright { margin: 24px 0 0; color: var(--subtle); font-size: 13px; }

@media (max-width: 900px) {
    .header-inner { align-items: flex-start; padding: 13px 0; }
    .nav-wrap { align-items: flex-start; }
    .site-nav { max-width: 520px; flex-wrap: wrap; justify-content: flex-end; }
    .content-grid, .trust-row { grid-template-columns: 1fr; }
    .content-grid.two { grid-template-columns: 1fr; }
    .article-layout { grid-template-columns: 1fr; }
    .toc { position: static; order: -1; }
}

@media (max-width: 620px) {
    .header-inner { width: min(100% - 22px, 1120px); }
    .brand span:last-child { display: none; }
    .nav-wrap { flex: 1; justify-content: flex-end; }
    .site-nav { gap: 1px; }
    .site-nav a { padding: 7px 6px; font-size: 12px; }
    .theme-toggle { min-width: 38px; height: 38px; }
    .site-main { width: min(100% - 22px, 1120px); padding-top: 30px; }
    .hero { border-radius: 20px; }
    .hero-actions .button { width: 100%; }
    .panel { border-radius: 15px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-full, .consent, .form-grid .button { grid-column: 1; }
    .ball { width: 44px; height: 44px; font-size: 17px; }
    .set-label { width: 100%; }
    .footer-top { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
