@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');

:root {
    color-scheme: light;
    --ink: #173a35;
    --muted: #74817b;
    --cream: #f7f5ef;
    --paper: #fffefa;
    --green: #1d5b4b;
    --line: #e7e8e1;
    font-family: "DM Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
}

button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }

.page-shell { max-width: 1440px; margin: 0 auto; padding: 0 7.2%; }

.topbar {
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.3px;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--green);
    font-size: 19px;
}

.brand-light { font-weight: 400; }
.topbar-note { color: #78837c; font-size: 12px; letter-spacing: .04em; }
.language-toggle {
    min-width: 42px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #dfe3db;
    border-radius: 3px;
    color: var(--green);
    background: var(--paper);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}
.language-toggle:hover { border-color: #9eb4a7; background: #edf3ee; }
.language-toggle:focus-visible { outline: 2px solid #69917e; outline-offset: 2px; }

.hero {
    min-height: 430px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 5px;
    color: white;
    background:
        linear-gradient(90deg, rgba(14, 42, 37, .82) 0%, rgba(19, 48, 41, .61) 49%, rgba(17, 43, 38, .08) 100%),
        linear-gradient(0deg, rgba(14, 38, 34, .18), rgba(14, 38, 34, .18)),
        url("https://images.unsplash.com/photo-1508009603885-50cf7c579365?auto=format&fit=crop&w=2000&q=85") center 48% / cover,
        #325b4d;
}

.hero-content { max-width: 620px; padding: 55px 7.5%; }
.eyebrow { margin: 0 0 17px; color: #8db4a1; font-size: 10px; font-weight: 700; letter-spacing: .2em; }
.hero h1 { margin: 0; font: 500 clamp(38px, 5vw, 61px)/1.08 "Playfair Display", Georgia, serif; letter-spacing: -.035em; }
.hero h1 em { color: #d7bc83; font-weight: 500; }
.hero-copy { max-width: 410px; margin: 20px 0 26px; color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.8; }
.hero-link { color: #fff; font-size: 12px; font-weight: 600; text-decoration: none; }
.hero-link span { display: inline-block; margin-left: 9px; color: #d7bc83; }

.hero-stamp {
    position: absolute;
    right: 7%;
    bottom: 38px;
    width: 104px;
    height: 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 50%;
    color: #fff;
    text-align: center;
    transform: rotate(9deg);
}

.hero-stamp span { font-size: 7px; letter-spacing: .16em; }
.hero-stamp strong { font-size: 12px; line-height: 1.2; letter-spacing: .08em; }

.guide-section { padding: 66px 0 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.section-heading .eyebrow { margin-bottom: 9px; color: #8b9b8e; }
.section-heading h2 { margin: 0; font: 500 clamp(27px, 3vw, 36px)/1.2 "Playfair Display", Georgia, serif; letter-spacing: -.025em; }
.section-hint { margin: 0 0 4px; color: var(--muted); font-size: 11px; }
.section-hint span { padding: 0 5px; color: #b6a36f; }

.guide-layout { display: grid; grid-template-columns: minmax(255px, .75fr) 1.6fr; gap: 20px; }
.guide-sidebar, .highlight-detail { border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.guide-sidebar { padding: 24px 23px 20px; }
.field-label { display: block; color: #89938a; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.region-select {
    width: 100%;
    margin: 10px 0 22px;
    padding: 12px 35px 12px 12px;
    border: 1px solid #dfe3db;
    border-radius: 3px;
    color: var(--ink);
    background: #fff;
}

.search-wrap { display: flex; align-items: center; gap: 8px; margin-top: 9px; padding: 0 10px; border: 1px solid #e8e9e3; border-radius: 3px; color: #85918a; }
.search-wrap span { font-size: 21px; line-height: 1; }
.search-wrap input { width: 100%; min-width: 0; padding: 10px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-wrap:focus-within { border-color: #9eb4a7; }

.highlight-list { display: grid; gap: 3px; max-height: 390px; margin: 14px -8px 0; padding: 0 5px 0 0; overflow-y: auto; list-style: none; }
.highlight-list button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 9px;
    border: 0;
    border-radius: 3px;
    color: #596961;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 11px;
}
.highlight-list button:hover { background: #f5f6f1; }
.highlight-list button[aria-current="true"] { color: var(--green); background: #edf3ee; font-weight: 700; }
.list-arrow { color: #a2aaa1; font-size: 15px; }
.empty-state { color: var(--muted); font-size: 12px; }

.highlight-detail { min-height: 470px; display: flex; flex-direction: column; padding: clamp(24px, 4vw, 46px); }
.detail-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-region { color: #8b9b8e; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.duration { color: #7e8980; font-size: 10px; }
.highlight-detail h3 { max-width: 630px; margin: 22px 0 15px; font: 500 clamp(25px, 3vw, 34px)/1.22 "Playfair Display", Georgia, serif; letter-spacing: -.025em; }
.detail-summary { max-width: 720px; margin: 0; color: #66746d; font-size: 13px; line-height: 1.9; }
.audio-controls { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.listen-button, .stop-button { min-height: 43px; border-radius: 3px; cursor: pointer; font-size: 11px; font-weight: 700; }
.listen-button { display: inline-flex; align-items: center; gap: 10px; padding: 0 17px; border: 1px solid var(--green); color: #fff; background: var(--green); }
.listen-button:hover:not(:disabled) { background: #174a3d; }
.listen-button:disabled, .stop-button:disabled { opacity: .48; cursor: not-allowed; }
.play-icon { font-size: 9px; }
.stop-button { padding: 0 15px; border: 1px solid #dfe3db; color: #647269; background: transparent; }
.audio-status { min-height: 16px; margin: 10px 0 0; color: #89938b; font-size: 10px; }
.source-area { margin-top: auto; padding-top: 26px; }
.source-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.source-links a { padding: 7px 10px; border: 1px solid #e5e8e1; border-radius: 2px; color: #69776e; font-size: 10px; text-decoration: none; }
.source-links a:hover { border-color: #a8bbab; color: var(--green); }

.error-card { padding: 18px; border-left: 3px solid #b65c45; color: #71483d; background: #fff7f3; font-size: 13px; }
.footer { display: flex; justify-content: space-between; gap: 18px; padding: 20px 0 24px; border-top: 1px solid #e4e6df; color: #849087; font-size: 10px; }
.footer span:first-child { color: #53665b; font-weight: 700; }

@media (max-width: 760px) {
    .page-shell { padding: 0 5%; }
    .topbar { height: 68px; }
    .topbar-note { display: none; }
    .language-toggle { min-width: 44px; min-height: 44px; }
    .hero { min-height: 390px; background-position: 58% center; }
    .hero-content { padding: 40px 7%; }
    .hero-link { display: inline-flex; align-items: center; min-height: 44px; }
    .guide-section { padding: 48px 0 55px; }
    .section-heading { align-items: start; flex-direction: column; gap: 10px; }
    .guide-layout { grid-template-columns: 1fr; }
    .guide-sidebar { padding: 20px; }
    .region-select { min-height: 46px; font-size: 16px; }
    .search-wrap { min-height: 46px; }
    .search-wrap input { font-size: 16px; }
    .highlight-list { max-height: 280px; }
    .highlight-list button { min-height: 44px; padding: 11px 9px; font-size: 13px; }
    .highlight-detail { min-height: 0; padding: 25px 22px; }
    .detail-summary { font-size: 15px; line-height: 1.75; }
    .listen-button, .stop-button { min-height: 46px; font-size: 13px; }
    .source-area { margin-top: 30px; padding-top: 0; }
    .source-links a { min-height: 40px; display: inline-flex; align-items: center; font-size: 12px; }
    .footer { flex-direction: column; font-size: 12px; line-height: 1.6; }
}

@media (max-width: 420px) {
    .page-shell {
        padding-right: calc(16px + env(safe-area-inset-right));
        padding-left: calc(16px + env(safe-area-inset-left));
    }

    .topbar { height: 62px; }
    .brand { gap: 8px; font-size: 14px; }
    .brand-mark { width: 31px; height: 31px; }
    .hero { min-height: 360px; border-radius: 4px; background-position: 60% center; }
    .hero-content { padding: 34px 22px; }
    .hero h1 { font-size: clamp(38px, 10vw, 46px); }
    .hero-copy { margin: 16px 0 18px; font-size: 14px; line-height: 1.65; }
    .hero-stamp { display: none; }
    .guide-section { padding: 40px 0 44px; }
    .section-heading h2 { font-size: 29px; }
    .section-hint { font-size: 12px; line-height: 1.5; }
    .guide-sidebar { padding: 17px; }
    .highlight-list { max-height: 260px; }
    .highlight-detail { padding: 22px 18px; }
    .detail-topline { flex-wrap: wrap; }
    .detail-region { font-size: 9px; }
    .duration { font-size: 11px; }
    .highlight-detail h3 { margin: 18px 0 13px; font-size: 27px; }
    .audio-controls { gap: 8px; margin-top: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
