:root {
    --bg: #f6f5ef;
    --text: #272622;
    --panel: #ffffff;
    --muted: #6f6c63;
    --line: #d7d2c8;
    --primary: #1d7b5c;
    --primary-strong: #0f5f45;
    --chip: rgba(255, 255, 255, 0.92);
    --chip-active: #fff6d8;
    --shadow: 0 14px 35px rgba(43, 34, 20, 0.14);
}

html[data-theme='dark'] {
    --bg: #141919;
    --text: #f3f4ef;
    --panel: #202625;
    --muted: #afb6ae;
    --line: #3a433f;
    --primary: #5dc59f;
    --primary-strong: #7ce1bc;
    --chip: rgba(24, 31, 30, 0.92);
    --chip-active: #2c3e36;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 32px 0 80px;
    font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(29, 123, 92, 0.14), transparent 35%),
        linear-gradient(180deg, var(--bg) 0%, #ece8dc 100%);
    color: var(--text);
}

html[data-theme='dark'] body {
    background:
        radial-gradient(circle at 10% 0%, rgba(93, 197, 159, 0.16), transparent 35%),
        linear-gradient(180deg, #141919 0%, #101414 100%);
}

.floating-controls {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-toggle,
.scroll-control {
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.container {
    width: min(940px, 92vw);
    margin: 0 auto;
}

.hero,
.map-section,
.list-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.hero {
    padding: 28px;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 5vw, 40px);
    line-height: 1.12;
}

.subtitle {
    margin: 10px 0 18px;
    color: var(--muted);
}

.primary-button {
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.primary-button:hover {
    background: var(--primary-strong);
}

.map-section,
.list-section {
    overflow: hidden;
    margin-bottom: 18px;
}

.section-head {
    padding: 20px 22px 12px;
}

.section-head h2 {
    margin: 0;
    font-size: 22px;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.map-shell {
    position: relative;
    height: min(56vh, 520px);
    border-top: 1px solid var(--line);
    background: #dfe7dd;
}

.map-canvas {
    width: 100%;
    height: 100%;
    border: 0;
}

.map-status {
    position: absolute;
    left: 12px;
    top: 12px;
    margin: 0;
    z-index: 3;
    border: 1px solid var(--line);
    background: var(--chip);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.map-pin {
    pointer-events: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--chip);
    color: var(--text);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.map-pin.active {
    background: var(--chip-active);
    border-color: var(--primary);
}

.restaurant-list {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    padding: 14px;
}

.restaurant-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: var(--panel);
}

.restaurant-card.active {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.restaurant-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.restaurant-name {
    margin: 0;
    font-size: 17px;
}

.tag {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--muted);
}

.restaurant-meta {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-link {
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.action-link.primary {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}

.empty-text {
    margin: 0;
    padding: 20px 14px;
    color: var(--muted);
}

@media (max-width: 768px) {
    body {
        padding-top: 86px;
    }

    .floating-controls {
        top: 10px;
        right: 10px;
    }

    .hero {
        padding: 22px;
    }

    .section-head {
        padding: 16px 16px 10px;
    }

    .map-shell {
        height: min(46vh, 380px);
    }

    .restaurant-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
