:root {
    --ink: #1a1a1a;
    --muted: #5f6368;
    --line: #e2e2e2;
    --accent: #1b4332;
    --accent-hover: #143026;
    --bg: #fafaf8;
    --card: #ffffff;
    --error: #b3261e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}

.page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 5rem;
}

.intro h1 {
    font-size: 1.7rem;
    margin-bottom: 0.4rem;
}

.price {
    font-weight: 600;
    color: var(--accent);
    margin-top: 0;
}

.notice {
    background: #eef3ee;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
}

.notice-error {
    background: #fdecea;
    border-color: #f3c1bd;
    color: var(--error);
}

.slots h2, .details h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.booking-widget {
    display: flex;
    gap: 1.5rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.25rem;
    flex-wrap: wrap;
}

.calendar {
    flex: 1 1 300px;
    min-width: 280px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.cal-nav {
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 6px;
    width: 2rem;
    height: 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

.cal-nav:hover:not(:disabled) {
    border-color: var(--accent);
}

.cal-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

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

.cal-day {
    aspect-ratio: 1;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: default;
    color: var(--muted);
}

.cal-day-empty {
    visibility: hidden;
}

.cal-day-available {
    border-color: var(--line);
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
}

.cal-day-available:hover {
    border-color: var(--accent);
}

.cal-day-unavailable {
    color: #cfcfcf;
}

.cal-day-selected {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.75rem;
}

.legend-dot {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    margin-right: 0.2rem;
}

.legend-available { background: var(--accent); }
.legend-unavailable { background: #e2e2e2; margin-left: 0.75rem; }

.slots-panel {
    flex: 1 1 240px;
    min-width: 220px;
    border-left: 1px solid var(--line);
    padding-left: 1.5rem;
}

.slots-panel h3 {
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

.slot-group {
    margin-bottom: 1rem;
}

.slot-group h4 {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 0.5rem;
}

.slot-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.slot-btn {
    border: 1px solid var(--line);
    background: var(--card);
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
}

.slot-btn:hover {
    border-color: var(--accent);
}

.slot-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

@media (max-width: 620px) {
    .slots-panel {
        border-left: none;
        border-top: 1px solid var(--line);
        padding-left: 0;
        padding-top: 1.25rem;
    }
}

.details {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.details label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.details input {
    font-size: 1rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: inherit;
}

.submit-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.85rem 1.25rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background: var(--accent-hover);
}

.policy-note {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    margin-top: 0.75rem;
}

.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.file-upload-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.file-upload-btn {
    border: 1px solid var(--line);
    background: var(--card);
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
}

.file-upload-btn:hover {
    border-color: var(--accent);
}

.file-upload-name {
    font-size: 0.85rem;
    color: var(--muted);
}

/* --- Admin --- */
.admin-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.admin-page table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-page th, .admin-page td {
    text-align: left;
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}

.admin-page nav a {
    margin-right: 1rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.admin-page form.stacked {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 420px;
}

.admin-page fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
}

.admin-page .day-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.admin-page .day-row label:first-child {
    width: 90px;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { background: var(--accent-hover); }

.btn-danger { background: var(--error); }
.btn-danger:hover { background: #8c1d15; }
