@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
    --bg: #f7f1e8;
    --bg-alt: #efe6d8;
    --ink: #24160f;
    --accent: #de6b48;
    --accent-dark: #b3492d;
    --mist: rgba(255, 255, 255, 0.7);
    --shadow: 0 18px 40px rgba(27, 18, 12, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--ink);
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 45%),
        radial-gradient(circle at 15% 80%, rgba(222, 107, 72, 0.12), transparent 50%),
        linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 3rem clamp(1.5rem, 5vw, 5rem) 2rem;
}

.brand {
    max-width: 540px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 0.75rem;
}

.subhead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(36, 22, 15, 0.8);
}

.header-card {
    background: var(--mist);
    border: 1px solid rgba(36, 22, 15, 0.08);
    border-radius: 24px;
    padding: 1.5rem 2rem;
    min-width: 220px;
    box-shadow: var(--shadow);
    text-align: right;
    animation: floatIn 0.8s ease forwards;
}

.header-card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.header-card-value {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0.5rem 0 0.3rem;
}

.header-card-note {
    font-size: 0.9rem;
    opacity: 0.7;
}

.layout {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.5fr);
    gap: 2rem;
    padding: 0 clamp(1.5rem, 5vw, 5rem) 4rem;
}

.panel {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(36, 22, 15, 0.08);
    animation: floatIn 0.8s ease forwards;
}

.planner-panel {
    grid-column: 1 / -1;
}

.panel-header h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}

.panel-header p {
    color: rgba(36, 22, 15, 0.7);
    margin-bottom: 1.5rem;
}

.place-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.field-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(36, 22, 15, 0.7);
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

input,
select,
textarea {
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(36, 22, 15, 0.18);
    font-family: inherit;
    font-size: 1rem;
    background-color: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(222, 107, 72, 0.35);
    border-color: rgba(222, 107, 72, 0.7);
}

.primary-btn {
    padding: 0.9rem 1.4rem;
    background: var(--accent);
    color: white;
    font-size: 1rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 20px rgba(222, 107, 72, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 26px rgba(222, 107, 72, 0.35);
}

.explore-tools {
    position: sticky;
    top: 1rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(239, 230, 216, 0.9);
    border: 1px solid rgba(36, 22, 15, 0.08);
    box-shadow: 0 10px 25px rgba(36, 22, 15, 0.1);
    backdrop-filter: blur(6px);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(36, 22, 15, 0.7);
}

.results-meta {
    font-size: 0.9rem;
    color: rgba(36, 22, 15, 0.7);
}

.empty-state {
    padding: 1rem 0;
    color: rgba(36, 22, 15, 0.6);
    display: none;
}

.empty-state.is-visible {
    display: block;
}

.region-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.4rem;
}

.region-card {
    background: white;
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid rgba(36, 22, 15, 0.08);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.region-card.is-hidden {
    display: none;
}

.region-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.region-card-header h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
}

.region-count {
    font-size: 0.85rem;
    color: rgba(36, 22, 15, 0.6);
}

.region-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.place-item {
    padding: 0.85rem;
    border-radius: 14px;
    background: rgba(239, 230, 216, 0.5);
    border: 1px solid rgba(36, 22, 15, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.place-item.is-hidden {
    display: none;
}

.place-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.place-name {
    font-weight: 600;
}

.place-rating {
    font-size: 0.85rem;
    color: rgba(36, 22, 15, 0.8);
    background: rgba(222, 107, 72, 0.12);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.place-date {
    font-size: 0.85rem;
    color: rgba(36, 22, 15, 0.7);
}

.place-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.meta-pill {
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: rgba(36, 22, 15, 0.08);
    color: rgba(36, 22, 15, 0.7);
}

.place-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-chip {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(222, 107, 72, 0.12);
    color: rgba(36, 22, 15, 0.7);
}

.place-review {
    font-size: 0.92rem;
    line-height: 1.5;
}

.place-memo {
    font-size: 0.85rem;
    color: rgba(36, 22, 15, 0.72);
    line-height: 1.4;
}

.place-actions {
    display: flex;
    justify-content: flex-end;
}

.plan-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(36, 22, 15, 0.15);
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.plan-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.planner-meta {
    font-size: 0.95rem;
    color: rgba(36, 22, 15, 0.7);
    margin-bottom: 1rem;
}

.plan-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.plan-item {
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(36, 22, 15, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

.plan-main {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.plan-place {
    font-weight: 600;
    font-size: 1rem;
}

.plan-meta-text {
    font-size: 0.85rem;
    color: rgba(36, 22, 15, 0.6);
}

.plan-note {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: rgba(36, 22, 15, 0.7);
}

.plan-remove {
    border: none;
    background: rgba(222, 107, 72, 0.15);
    color: var(--accent-dark);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
}

.site-footer {
    text-align: center;
    padding: 2rem 1.5rem 3rem;
    color: rgba(36, 22, 15, 0.7);
}

.animate-in {
    animation: fadeUp 0.5s ease both;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .header-card {
        text-align: left;
        width: 100%;
    }

    .planner-panel {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 2.5rem 1.5rem 1.5rem;
    }

    .panel {
        padding: 1.5rem;
    }

    .place-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .plan-main {
        align-items: flex-start;
    }
}
