:root {
    --bg: #f6f8fc;
    --text: #0f172a;
    --muted: #475569;
    --line: #dce3ef;
    --card: #ffffff;
    --accent: #1d4ed8;
    --chip: #eef2ff;
    --btn-bg: #0f172a;
    --btn-text: #ffffff;
    --btn-border: #0f172a;
    --header-bg: #ffffff;
    --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

body.dark-mode {
    --bg: #0b1220;
    --text: #e6edf7;
    --muted: #b4c2d8;
    --line: #2a3650;
    --card: #111a2d;
    --accent: #7aa6ff;
    --chip: #1a2640;
    --btn-bg: #7aa6ff;
    --btn-text: #0b1220;
    --btn-border: #7aa6ff;
    --header-bg: #111a2d;
    --shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Sans KR", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 10% -20%, rgba(29, 78, 216, 0.12), transparent 34%), var(--bg);
    opacity: 1;
    transition: opacity 0.28s ease, background-color 0.25s ease, color 0.25s ease;
}

body.page-exit {
    opacity: 0;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
}

.logo {
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.05rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-nav {
    display: flex;
    gap: 10px;
}

.top-nav a {
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--muted);
    padding: 7px 12px;
    border-radius: 999px;
}

.top-nav a.active,
.top-nav a:hover {
    color: var(--text);
    background: var(--chip);
}

.theme-toggle-btn {
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 30px auto 56px;
}

.container.narrow {
    width: min(760px, calc(100% - 32px));
}

.hero {
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1,
.panel h1,
.detail-content h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    letter-spacing: -0.03em;
}

.hero p,
.detail-content p,
.panel p {
    color: var(--muted);
    line-height: 1.66;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--shadow);
    padding: 12px;
    margin-bottom: 18px;
}

.filter-bar label {
    font-size: 0.9rem;
    font-weight: 700;
}

.filter-bar select {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
    color: var(--text);
    background: var(--card);
}

.result-count {
    margin: 0 0 0 auto;
    font-size: 0.86rem;
    color: var(--muted);
}

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

.place-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.place-card:hover {
    transform: translateY(-2px);
}

.place-card-body {
    padding: 16px;
}

.place-card h2 {
    margin: 0;
    font-size: 1.06rem;
}

.place-rank {
    display: inline-block;
    margin-bottom: 8px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.74rem;
    font-weight: 800;
    background: var(--chip);
    color: var(--text);
}

.place-meta {
    margin: 8px 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.place-desc {
    margin: 0 0 12px;
    font-size: 0.91rem;
    color: var(--muted);
}

.style-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 12px;
}

.style-badge {
    font-size: 0.74rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 4px 9px;
    border: 1px solid transparent;
}

.style-history { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.style-shopping { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.style-night { background: #e0e7ff; color: #4338ca; border-color: #a5b4fc; }
.style-nature { background: #dcfce7; color: #166534; border-color: #86efac; }
.style-family { background: #ffe4e6; color: #9f1239; border-color: #fda4af; }
.style-art { background: #fae8ff; color: #86198f; border-color: #f0abfc; }
.style-local { background: #ffedd5; color: #9a3412; border-color: #fdba74; }

body.dark-mode .style-history { background: #3a2f11; color: #fcd34d; border-color: #b38716; }
body.dark-mode .style-shopping { background: #102a55; color: #93c5fd; border-color: #3b82f6; }
body.dark-mode .style-night { background: #24215c; color: #c7d2fe; border-color: #818cf8; }
body.dark-mode .style-nature { background: #163a2a; color: #86efac; border-color: #22c55e; }
body.dark-mode .style-family { background: #4a1f2d; color: #fecdd3; border-color: #f43f5e; }
body.dark-mode .style-art { background: #3f1f47; color: #f5d0fe; border-color: #d946ef; }
body.dark-mode .style-local { background: #4c2b18; color: #fed7aa; border-color: #fb923c; }

.button-link,
.clean-form button {
    display: inline-block;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    text-decoration: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.back-link {
    display: inline-block;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 14px;
}

.detail-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.detail-content {
    padding: 18px;
}

.meta-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.meta-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
}

.meta-item span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.meta-item strong {
    font-size: 0.98rem;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-top: 18px;
}

.panel h2 {
    margin: 0 0 12px;
    font-size: 1.1rem;
}

.panel h3 {
    margin: 0 0 8px;
    font-size: 0.96rem;
}

.trust-panel {
    margin-top: 24px;
}

.trust-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-grid article {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--card);
}

.trust-grid p {
    margin: 0;
    font-size: 0.9rem;
}

.map-frame {
    width: 100%;
    height: 360px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.text-link {
    margin-top: 10px;
    display: inline-block;
    font-size: 0.9rem;
    color: var(--accent);
}

.review-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.65;
}

.data-source-note {
    margin-top: 10px;
    font-size: 0.84rem;
    color: var(--muted);
}

.course-stop-list,
.hotel-list {
    margin: 12px 0 0;
    padding-left: 20px;
    display: grid;
    gap: 10px;
}

.course-stop-list li,
.hotel-list li {
    color: var(--muted);
    line-height: 1.55;
}

.restaurant-sections {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.district-block {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--card);
}

.district-block h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}

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

.meal-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    background: var(--card);
}

.meal-card h4 {
    margin: 0 0 8px;
    font-size: 0.9rem;
}

.meal-card ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.meal-card li {
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.86rem;
}

.broadcast-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--chip);
    color: var(--text);
}

.course-time-slots {
    margin-top: 14px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.time-slot {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: var(--card);
}

.time-slot h3 {
    margin: 0 0 8px;
    font-size: 0.9rem;
}

.time-slot ul {
    margin: 0;
    padding-left: 16px;
    display: grid;
    gap: 5px;
}

.time-slot li {
    font-size: 0.86rem;
    color: var(--muted);
}

.stop-title,
.hotel-name {
    color: var(--text);
    font-weight: 700;
}

.hotel-meta {
    font-size: 0.88rem;
}

.selected-place {
    margin: 10px 0 16px;
    font-size: 0.92rem;
}

.clean-form {
    display: grid;
    gap: 10px;
}

.clean-form label {
    font-size: 0.87rem;
    font-weight: 700;
}

.clean-form input,
.clean-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: var(--card);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--header-bg);
}

.footer-inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 24px;
    color: var(--muted);
    font-size: 0.84rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.footer-inner nav {
    display: flex;
    gap: 12px;
}

.footer-inner a {
    text-decoration: none;
}

@media (max-width: 1180px) {
    .place-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header {
        padding: 12px 14px;
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .header-controls {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .top-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .container,
    .container.narrow {
        width: calc(100% - 16px);
        margin-top: 14px;
    }

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

    .map-frame {
        height: 280px;
    }

    .filter-bar {
        flex-wrap: wrap;
    }

    .result-count {
        margin-left: 0;
    }

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

    .course-time-slots {
        grid-template-columns: 1fr;
    }

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

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

    .footer-inner {
        width: calc(100% - 16px);
        flex-direction: column;
        align-items: flex-start;
    }
}
