:root {
    --bg: #f4f4f4;
    --bg-accent: #ffffff;
    --panel: rgba(255, 255, 255, 0.96);
    --panel-strong: #ffffff;
    --text: #111111;
    --muted: #5b5b5b;
    --line: rgba(17, 17, 17, 0.1);
    --line-strong: rgba(17, 17, 17, 0.24);
    --primary: #c8102e;
    --primary-soft: rgba(200, 16, 46, 0.08);
    --accent: #c8102e;
    --accent-soft: rgba(200, 16, 46, 0.1);
    --danger: #a10f27;
    --danger-soft: rgba(161, 15, 39, 0.1);
    --success: #1f7a3d;
    --success-soft: rgba(31, 122, 61, 0.12);
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --page-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        linear-gradient(180deg, #ffffff 0%, #f3f3f3 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(200, 16, 46, 0.05), transparent 180px);
}

.page-shell {
    width: min(calc(100% - 2rem), var(--page-width));
    margin: 0 auto;
    padding: 1rem 0 3rem;
    position: relative;
}

.hero-card,
.panel,
.notice {
    position: relative;
    border: 1px solid rgba(17, 17, 17, 0.08);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-card {
    overflow: hidden;
    padding: 1.35rem 1.5rem;
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    border-top: 5px solid var(--primary);
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 8px;
    background: var(--primary);
}

.eyebrow,
.section-label {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.77rem;
    color: var(--muted);
}

.section-hint {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-copy {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.hero-card h1,
.panel h2,
.booking-item h3 {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 700;
}

.hero-card h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.meta-pill,
.day-status,
.booking-badge,
.booking-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    line-height: 1;
}

.meta-pill,
.day-status {
    background: #ffffff;
    color: var(--text);
    border: 1px solid rgba(17, 17, 17, 0.12);
}

.notice {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.notice.success {
    border-color: rgba(31, 122, 61, 0.18);
    background: linear-gradient(180deg, rgba(248, 255, 250, 0.98), rgba(239, 248, 243, 0.98));
}

.notice.error {
    border-color: rgba(200, 16, 46, 0.2);
    background: linear-gradient(180deg, rgba(255, 248, 249, 0.98), rgba(255, 239, 242, 0.97));
}

.notice strong {
    display: block;
    margin-bottom: 0.4rem;
}

.notice ul {
    margin: 0;
    padding-left: 1.1rem;
}

.panel {
    border-radius: var(--radius-xl);
    padding: 1.2rem;
    border-top: 4px solid #111111;
}

.panel + .panel,
.panel + .content-grid,
.hero-card + .panel {
    margin-top: 1rem;
}

.panel-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-header.compact {
    align-items: center;
}

.panel-header h2 {
    font-size: clamp(1.6rem, 2vw, 2.1rem);
}

.calendar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    background: var(--bg-accent);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.7rem 0.95rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.nav-link:hover,
.nav-link:focus-visible {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
    outline: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
}

.weekday-head {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    padding-bottom: 0.25rem;
}

.day-card {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.day-card:hover,
.day-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(200, 16, 46, 0.12);
    outline: none;
}

.day-card.is-selected {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(200, 16, 46, 0.11), rgba(255, 255, 255, 0.98));
    box-shadow: inset 0 0 0 1px rgba(200, 16, 46, 0.15);
}

.day-card.is-today .day-number {
    color: var(--primary);
}

.day-card.is-muted {
    opacity: 0.55;
}

.day-card.is-past {
    background: rgba(245, 245, 245, 0.9);
}

.day-number {
    font-size: 1.15rem;
    font-weight: 700;
}

.booking-counter {
    background: var(--primary-soft);
    color: var(--primary);
    width: fit-content;
    font-weight: 700;
}

.booking-counter--empty {
    background: rgba(17, 17, 17, 0.05);
    color: var(--muted);
}

.booking-preview {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1rem;
    margin-top: 1rem;
}

.empty-state {
    padding: 1.2rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed var(--line-strong);
    color: var(--muted);
}

.booking-list {
    display: grid;
    gap: 0.8rem;
}

.booking-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
}

.booking-time {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.booking-body {
    display: grid;
    gap: 0.55rem;
}

.booking-badge {
    background: var(--accent-soft);
    color: #8e0f25;
    width: fit-content;
}

.booking-info {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.booking-form {
    display: grid;
    gap: 1rem;
}

.booking-form label,
.booking-form fieldset {
    display: grid;
    gap: 0.45rem;
}

.booking-form span,
.booking-form legend {
    font-weight: 700;
}

.booking-form input,
.booking-form select,
.booking-form textarea,
.booking-form button {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    padding: 0.9rem 1rem;
    font: inherit;
    color: var(--text);
    background: var(--panel-strong);
}

.selected-date-note {
    padding: 0.85rem 0.95rem;
    border-radius: var(--radius-sm);
    background: rgba(17, 17, 17, 0.04);
    border: 1px solid rgba(17, 17, 17, 0.08);
    color: var(--muted);
}

.selected-date-note strong {
    color: var(--text);
}

.booking-form textarea {
    resize: vertical;
    min-height: 120px;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus,
.booking-form button:focus-visible {
    outline: 2px solid rgba(200, 16, 46, 0.18);
    border-color: var(--primary);
}

.time-fieldset,
.radio-fieldset {
    border: 1px solid var(--line);
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(17, 17, 17, 0.02);
}

.time-fieldset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.radio-fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
}

.radio-option input {
    width: auto;
    margin: 0;
    padding: 0;
}

.booking-form button {
    background: linear-gradient(135deg, #111111, var(--primary));
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(200, 16, 46, 0.18);
}

.booking-form button:hover {
    filter: brightness(1.04);
}

@media (max-width: 920px) {
    .hero-copy,
    .panel-header,
    .panel-header.compact,
    .content-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .calendar-nav,
    .hero-meta {
        justify-content: flex-start;
    }

    .content-grid {
        gap: 1rem;
    }

    .booking-item {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(calc(100% - 1rem), var(--page-width));
        padding-top: 0.5rem;
    }

    .hero-card,
    .panel {
        padding: 1rem;
        border-radius: 22px;
    }

    .calendar-grid {
        gap: 0.4rem;
    }

    .weekday-head {
        font-size: 0.75rem;
    }

    .day-card {
        min-height: 88px;
        padding: 0.65rem;
        gap: 0.45rem;
    }

    .booking-counter,
    .booking-preview,
    .nav-link,
    .meta-pill,
    .day-status {
        font-size: 0.78rem;
    }

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

@media (max-width: 480px) {
    .calendar-grid {
        grid-template-columns: repeat(7, minmax(42px, 1fr));
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .weekday-head {
        min-width: 42px;
    }

    .day-card {
        min-width: 42px;
        min-height: 84px;
    }

    .day-number {
        font-size: 1rem;
    }

    .booking-counter {
        padding: 0.35rem 0.5rem;
    }

    .booking-counter,
    .booking-preview {
        font-size: 0.72rem;
    }
}
