:root {
    color-scheme: light;
    --bg: #eaf4ed;
    --paper: #fbfff9;
    --paper-soft: #f1faef;
    --ink: #10251d;
    --muted: #5f7067;
    --line: #c5d8ca;
    --line-dark: #416a54;
    --gold: #6fa33c;
    --wine: #1f7a5f;
    --forest: #0f5b43;
    --shadow: 0 24px 60px rgba(16, 60, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(18, 80, 56, 0.055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(18, 80, 56, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 18% 8%, rgba(111, 163, 60, 0.2), transparent 26rem),
        linear-gradient(180deg, #f7fbf2 0%, var(--bg) 68%, #dcebdd 100%);
    background-size: 30px 30px, 30px 30px, auto, auto;
    color: var(--ink);
    font-family: "Noto Serif KR", "Noto Serif CJK KR", "Times New Roman", serif;
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line-dark);
    background: var(--gold);
    color: #fff;
    font-weight: 900;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.language-nav,
.top-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.language-nav a {
    min-height: 34px;
    padding: 5px 11px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.78);
    color: var(--muted);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
}

.language-nav a:hover,
.language-nav .is-active {
    border-color: var(--line-dark);
    background: var(--ink);
    color: #fff;
}

.top-controls {
    align-items: center;
    gap: 8px;
}

.select-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 30px;
    min-height: 30px;
    border: 1px solid var(--line-dark);
    background: #f9fff6;
    box-shadow: 0 3px 8px rgba(16, 60, 42, 0.08);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    overflow: hidden;
}

.select-control span {
    display: inline-flex;
    height: 30px;
    min-height: 30px;
    align-items: center;
    padding: 3px 9px;
    background: linear-gradient(180deg, #75ad42, var(--forest));
    color: #fff;
    white-space: nowrap;
}

.select-control select {
    width: 118px;
    min-width: 118px;
    height: 30px;
    min-height: 30px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 0;
    border-radius: 0;
    background: #f9fff6;
    color: var(--ink);
    cursor: pointer;
    padding: 3px 26px 3px 8px;
    font: inherit;
    line-height: 1.2;
    outline: none;
}

.select-control::after {
    position: absolute;
    right: 9px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--forest);
    border-bottom: 1.5px solid var(--forest);
    content: "";
    pointer-events: none;
    transform: translateY(-62%) rotate(45deg);
}

.select-control:focus-within {
    border-color: var(--forest);
    box-shadow: 0 0 0 2px rgba(111, 163, 60, 0.22), 0 3px 8px rgba(16, 60, 42, 0.08);
}

.section-select select {
    width: 150px;
    min-width: 150px;
}

main,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.84fr);
    gap: 42px;
    align-items: center;
    min-height: calc(100vh - 150px);
    padding: 36px 0 58px;
}

.chapter-label,
.eyebrow {
    margin: 0;
    color: var(--wine);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.chapter-label::before,
.chapter-label::after {
    content: "—";
    margin: 0 0.55em;
    color: var(--gold);
}

.hero .eyebrow {
    margin-top: 16px;
    color: var(--forest);
}

h1,
h2,
h3,
p,
span {
    overflow-wrap: anywhere;
}

h1 {
    max-width: 860px;
    margin: 10px 0 0;
    font-size: clamp(2.6rem, 7.6vw, 6.15rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: 0;
}

.hero-description {
    max-width: 690px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
}

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

.primary-action,
.secondary-action {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border: 1px solid var(--line-dark);
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 800;
}

.primary-action {
    background: var(--ink);
    color: #fff;
}

.secondary-action {
    background: var(--paper);
}

.visual-panel {
    position: relative;
    display: grid;
    min-height: 500px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line-dark);
    background:
        linear-gradient(90deg, transparent 49%, rgba(65, 106, 84, 0.22) 50%, transparent 51%),
        linear-gradient(180deg, rgba(251, 255, 249, 0.86), rgba(220, 238, 220, 0.9)),
        var(--paper-soft);
    box-shadow: var(--shadow);
}

.visual-panel::before,
.visual-panel::after {
    position: absolute;
    right: 20px;
    left: 20px;
    height: 1px;
    background: var(--line-dark);
    content: "";
}

.visual-panel::before {
    top: 20px;
}

.visual-panel::after {
    bottom: 20px;
}

.gate-frame {
    position: relative;
    display: grid;
    width: min(78%, 330px);
    min-height: 350px;
    place-items: center;
    padding: 34px 24px;
    border: 1px solid var(--line-dark);
    background: rgba(255, 253, 248, 0.74);
    text-align: center;
}

.gate-frame::before {
    position: absolute;
    inset: 12px;
    border: 1px solid var(--line);
    content: "";
}

.gate-kicker,
.gate-subtitle,
.gate-actions {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.gate-kicker {
    color: var(--wine);
}

.gate-title {
    writing-mode: vertical-rl;
    color: var(--ink);
    font-size: 2.05rem;
    font-weight: 900;
    line-height: 1.6;
}

.gate-subtitle {
    color: var(--muted);
}

.gate-actions {
    position: absolute;
    right: 28px;
    bottom: 32px;
    left: 28px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    color: var(--muted);
}

.gate-actions span {
    border-top: 1px solid var(--line-dark);
    padding-top: 7px;
    text-align: center;
}

.intro-tabs {
    padding: 26px 0 72px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3.15rem);
    line-height: 1.12;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.intro-card {
    display: grid;
    min-height: 230px;
    align-content: start;
    padding: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.78);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.intro-card:hover,
.intro-card:focus-visible,
.intro-card.is-active {
    border-color: var(--line-dark);
    background: var(--paper);
    box-shadow: 0 18px 35px rgba(16, 60, 42, 0.13);
    transform: translateY(-3px);
    outline: none;
}

.intro-card.is-active {
    box-shadow: inset 0 0 0 4px rgba(111, 163, 60, 0.22), 0 18px 35px rgba(16, 60, 42, 0.13);
}

.card-icon {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    margin-bottom: 12px;
    border: 1px solid var(--ink);
    background: var(--gold);
    color: #fff;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 900;
}

.card-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--wine);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.card-title {
    display: block;
    margin-bottom: 8px;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.3;
}

.card-summary {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
}

.route-detail {
    margin-top: 18px;
    border: 1px solid var(--line-dark);
    background:
        linear-gradient(90deg, rgba(111, 163, 60, 0.16), transparent 24%),
        var(--paper);
    padding: clamp(24px, 5vw, 44px);
    box-shadow: var(--shadow);
}

.page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line);
    padding: 10px 0 10px;
}

.page-header h1 {
    max-width: 760px;
    margin-top: 6px;
    font-size: clamp(1.25rem, 3vw, 2rem);
}

.page-header .hero-description {
    margin-top: 6px;
    font-size: 0.88rem;
    line-height: 1.55;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 0 12px;
}

.content-card {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    background: rgba(251, 255, 249, 0.78);
    padding: 8px;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.content-card:hover,
.content-card:focus-visible,
.content-card.is-active {
    border-color: var(--line-dark);
    box-shadow: 0 8px 18px rgba(16, 60, 42, 0.1);
    transform: translateY(-2px);
    outline: none;
}

.content-card.is-active {
    box-shadow: inset 0 0 0 3px rgba(111, 163, 60, 0.2), 0 8px 18px rgba(16, 60, 42, 0.1);
}

.content-card img {
    display: block;
    width: 100%;
    height: 92px;
    aspect-ratio: auto;
    border: 1px solid var(--line);
    object-fit: cover;
}

.content-card-title {
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.35;
}

.content-card .card-summary {
    font-size: 0.78rem;
    line-height: 1.45;
}

.card-link-label {
    display: inline-flex;
    width: fit-content;
    min-height: 24px;
    align-items: center;
    margin-top: 2px;
    border: 1px solid var(--line-dark);
    background: var(--forest);
    color: #fff;
    padding: 2px 8px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
}

.wiki-list {
    display: grid;
    margin: 14px 0 28px;
    border-top: 1px solid var(--line-dark);
    background: rgba(251, 255, 249, 0.58);
}

.wiki-list-item {
    display: grid;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    padding: 12px 4px;
}

.wiki-list-title {
    width: fit-content;
    color: var(--forest);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.35;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wiki-list-summary,
.wiki-list-body {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.wiki-list-summary {
    color: var(--ink);
    font-weight: 700;
}

.wiki-list-link {
    width: fit-content;
    color: var(--wine);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.item-detail {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    margin: 0;
    max-width: 820px;
    margin-bottom: 24px;
    border: 1px solid var(--line-dark);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.item-media {
    margin: 0;
    min-height: 100%;
}

.item-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 120px;
    max-height: 170px;
    object-fit: cover;
}

.item-copy {
    padding: 14px;
}

.item-copy h2 {
    margin: 6px 0 8px;
    font-size: clamp(1rem, 2vw, 1.45rem);
    line-height: 1.18;
}

.item-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.quick-link {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    margin-top: 12px;
    border: 1px solid var(--line-dark);
    background: linear-gradient(180deg, #75ad42, var(--forest));
    color: #fff;
    padding: 4px 10px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
}

.route-detail h3 {
    margin: 10px 0 14px;
    font-size: clamp(1.7rem, 4vw, 3.1rem);
    line-height: 1.16;
}

.route-detail p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.fact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 0;
}

.fact-list div {
    border: 1px solid var(--line);
    background: rgba(251, 255, 249, 0.72);
    padding: 8px;
}

.fact-list dt {
    color: var(--forest);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
}

.fact-list dd {
    margin: 4px 0 0;
    color: var(--muted);
}

.detail-back {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    margin-top: 0;
    border: 1px solid var(--line-dark);
    background: var(--forest);
    color: #fff;
    padding: 4px 10px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 800;
    font-size: 0.78rem;
}

.contact-band {
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    margin-bottom: 42px;
    padding: 30px;
    border: 1px solid var(--line-dark);
    background: var(--ink);
    color: #fff;
}

.contact-band .chapter-label,
.contact-band .eyebrow,
.contact-band p {
    color: rgba(255, 255, 255, 0.76);
}

.contact-band h2,
.contact-band p {
    margin: 0;
}

.contact-band h2 {
    font-size: 1.55rem;
    line-height: 1.25;
}

.site-footer {
    padding: 24px 0 34px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.9rem;
}

@media (max-width: 920px) {
    .site-header,
    .hero,
    .page-header,
    .contact-band {
        grid-template-columns: 1fr;
    }

    .page-header {
        display: block;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .language-nav {
        justify-content: flex-start;
    }

    .hero {
        min-height: auto;
        gap: 28px;
        padding-top: 22px;
    }

    .visual-panel {
        min-height: 410px;
    }

    .intro-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .item-detail,
    .fact-list {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    main,
    .site-header,
    .site-footer {
        width: min(100% - 24px, 1180px);
    }

    h1 {
        font-size: clamp(2.25rem, 15vw, 4rem);
    }

    .section-heading {
        display: block;
    }

    .section-heading h2 {
        margin-top: 8px;
    }

    .intro-grid {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .top-controls,
    .select-control {
        width: 100%;
    }

    .select-control select {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .intro-card {
        min-height: auto;
    }

    .visual-panel {
        min-height: 360px;
    }

    .gate-frame {
        min-height: 270px;
    }

    .gate-title {
        font-size: 1.65rem;
    }

    .gate-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
