:root {
    --bg: #f3efe5;
    --paper: rgba(255, 252, 246, 0.78);
    --paper-strong: #fffaf1;
    --ink: #18211b;
    --muted: #5b645d;
    --line: rgba(24, 33, 27, 0.1);
    --accent: #1f6b52;
    --accent-soft: #dceee4;
    --warn: #9d3f2c;
    --shadow: 0 18px 40px rgba(41, 44, 35, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(31, 107, 82, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(214, 157, 83, 0.2), transparent 28%),
        linear-gradient(180deg, #f6f2e9 0%, #ece5d7 100%);
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Space Grotesk", sans-serif;
}

button,
input,
select {
    font: inherit;
}

.page-shell {
    width: min(1120px, calc(100% - 24px));
    margin: 0 auto;
    padding: 20px 0 40px;
}

.hero {
    display: grid;
    gap: 18px;
    padding: 18px 0 24px;
}

.hero-copy,
.hero-panel,
.message-card,
.day-card,
.load-more-card {
    backdrop-filter: blur(18px);
    background: var(--paper);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 28px 24px;
    border-radius: var(--radius-xl);
}

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

.hero-copy h1 {
    margin: 0;
    max-width: 14ch;
    font-size: clamp(2.3rem, 7vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.lede {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
}

.hero-panel {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 22px;
    border-radius: var(--radius-xl);
}

.panel-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.panel-label {
    color: var(--muted);
}

.panel-value {
    font-weight: 700;
}

.panel-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.message-card {
    margin-bottom: 18px;
    padding: 22px;
    border-radius: var(--radius-lg);
}

.spinner-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
}

.spinner-orbit {
    width: 96px;
    height: 96px;
    border: 3px solid rgba(31, 107, 82, 0.14);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-orbit.is-settled {
    border-color: rgba(31, 107, 82, 0.22);
    border-top-color: rgba(31, 107, 82, 0.22);
    animation: none;
}

.spinner-center {
    position: absolute;
    font-size: 2rem;
}

.message-card h2 {
    margin: 0;
    font-size: 1.15rem;
}

.message-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.error-card {
    border: 1px solid rgba(157, 63, 44, 0.22);
}

.results-grid {
    display: grid;
    gap: 16px;
}

.day-card {
    border-radius: var(--radius-lg);
    padding: 20px;
}

.load-more-card {
    display: grid;
    align-content: center;
    gap: 14px;
    min-height: 100%;
    border-radius: var(--radius-lg);
    padding: 20px;
}

.load-more-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.load-more-button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f6b52, #2b8d69);
    color: #f7fbf8;
    min-height: 48px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(31, 107, 82, 0.18);
}

.load-more-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.day-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.day-label {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

.day-date {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
}

.slot-count {
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
}

.slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.day-loading {
    display: grid;
    justify-items: start;
    gap: 12px;
}

.day-loading-text {
    margin: 0;
    color: var(--muted);
}

.day-failed {
    display: grid;
    justify-items: start;
    gap: 12px;
}

.day-loading[hidden],
.day-failed[hidden],
.slots[hidden] {
    display: none !important;
}

.day-failed-text {
    margin: 0;
    color: var(--warn);
    font-weight: 500;
}

.day-refresh-button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f6b52, #2b8d69);
    color: #f7fbf8;
    min-height: 42px;
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(31, 107, 82, 0.18);
}

.spinner-wrap--small {
    width: 58px;
    height: 58px;
}

.spinner-orbit--small {
    width: 58px;
    height: 58px;
}

.spinner-center--small {
    font-size: 1.35rem;
}

.slot-pill,
.empty-pill {
    border-radius: 999px;
    padding: 10px 14px;
}

.slot-pill {
    background: var(--paper-strong);
    border: 1px solid var(--line);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
    color: var(--ink);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.slot-pill:hover,
.slot-pill:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(31, 107, 82, 0.35);
    background: #ffffff;
}

.empty-pill {
    background: rgba(24, 33, 27, 0.06);
    color: var(--muted);
}

.slot-modal {
    width: min(92vw, 440px);
    padding: 0;
    border: 0;
    background: transparent;
}

.slot-modal::backdrop {
    background: rgba(24, 33, 27, 0.45);
    backdrop-filter: blur(6px);
}

.slot-modal__card {
    position: relative;
    padding: 28px 24px 24px;
    border-radius: 26px;
    background: #fffaf1;
    color: var(--ink);
    box-shadow: 0 28px 70px rgba(24, 33, 27, 0.28);
}

.slot-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(24, 33, 27, 0.08);
    color: var(--ink);
    font-size: 1.4rem;
    cursor: pointer;
}

.slot-modal__eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.slot-modal__title {
    margin: 0 0 12px;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.slot-modal__copy {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.5;
}

.slot-modal__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f6b52, #2b8d69);
    color: #f7fbf8;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 14px 22px rgba(31, 107, 82, 0.24);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 760px) {
    .page-shell {
        width: min(1120px, calc(100% - 48px));
        padding-top: 28px;
    }

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

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

@media (min-width: 1080px) {
    .results-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
