/* ==========================================================================
   Osteria Splende - Reserve Form (FULL)
   Light / Elegant / Modern  — serif headings + sans body + Inter for Latin
   ========================================================================== */

/* ===== Design Tokens (light theme) ======================================= */
:root {
    --bg: #f7f5f1;
    /* 背景：ごく薄いアイボリー */
    --card: #ffffff;
    /* カード：白 */
    --ink: #222426;
    /* 本文：ほぼ黒 */
    --muted: #6f757a;
    /* 補助テキスト */
    --accent: #b99a6a;
    /* シャンパンゴールド（控えめ） */
    --line: #e5e2db;
    /* 区切り線：淡め */
    --ring: rgba(185, 154, 106, .25);
    /* フォーカスの淡い光 */
    --danger: #c62828;
    --success: #2e7d32;
    --radius: 20px;

    /* Fonts */
    --font-sans: "Noto Sans JP", Inter, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    --font-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

/* ===== Base =============================================================== */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "palt" 1, "liga" 1, "kern" 1;
    font-family: var(--font-sans);
}

.container {
    padding: clamp(16px, 2vw, 32px);
}

.card {
    max-width: 900px;
    margin: 44px auto;
    padding: clamp(22px, 3vw, 46px);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
    line-height: 1.6;
    overflow: visible;
    padding-bottom: 80px;
    /* ドロップダウンの下スペース確保 */
}


select:focus {
    outline: 2px solid var(--accent-color, #c9a063);
    outline-offset: 2px;
}

/* ===== Typography ========================================================= */
h1 {
    margin: 0 0 .3em;
    font-size: clamp(22px, 3.2vw, 30px);
    letter-spacing: .01em;
    font-family: var(--font-serif);
    font-variation-settings: "wght" 700;
}

.sub {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: clamp(14px, 2vw, 16px);
}

.lead {
    margin: 1rem 0 1.4rem;
    color: var(--muted);
}

label {
    display: block;
    margin: .75rem 0 .45rem;
    font-weight: 600;
    letter-spacing: .01em;
    font-family: var(--font-serif);
}

.hint,
.hint-small {
    color: var(--muted);
    font-weight: 500;
    font-size: .85em;
    margin-left: .35em;
}

input,
select,
textarea,
.hours,
.help {
    font-variant-numeric: tabular-nums;
}

/* ===== Form Grid ========================================================== */
form#reserve {
    display: grid;
    gap: 16px 20px;
}

@media (min-width:720px) {
    form#reserve {
        grid-template-columns: 1fr 1fr;
    }

    form#reserve>.full,
    form#reserve>.actions,
    form#reserve>.help,
    #error,
    #ok {
        grid-column: 1 / -1;
    }
}

/* ===== Fields ============================================================= */
input,
select,
textarea {
    width: 100%;
    padding: 0.95em 1em;
    border-radius: 12px;
    background: #fbfaf7;
    color: var(--ink);
    border: 1px solid var(--line);
    outline: none;
    transition: border .2s, box-shadow .2s, background .2s;
}

input::placeholder,
textarea::placeholder {
    color: #9aa0a5;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--ring);
}

/* invalid state (JSが aria-invalid 付与) */
[aria-invalid="true"] {
    border-color: color-mix(in srgb, var(--danger) 60%, #ffdddd 40%) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

/* ===== Actions ============================================================ */
.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

button[type="submit"] {
    background: linear-gradient(180deg, var(--accent), #a98857);
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    padding: .95em 1.25em;
    cursor: pointer;
    letter-spacing: .02em;
    box-shadow: 0 6px 16px rgba(185, 154, 106, .25);
    transition: filter .2s, transform .06s ease, box-shadow .2s;
    transform: translateZ(0);
    font-family: var(--font-sans);
}

button[type="submit"]:hover {
    filter: saturate(1.05) contrast(1.03);
    box-shadow: 0 8px 20px rgba(185, 154, 106, .28);
}

button[type="submit"]:active {
    transform: translateY(1px);
}

.btn.ghost {
    display: inline-block;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .9em 1.1em;
    background: #fff;
    font-family: var(--font-sans);
}

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ring);
    border-color: var(--accent);
}

/* ===== Notices (Accordion / Details) ===================================== */
.notice {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin: 0 0 14px;
    background: #fff;
}

.notice-head {
    display: block;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: .95em 1em;
    color: var(--ink);
    font-weight: 700;
    position: relative;
    font-family: var(--font-serif);
}

.notice-body {
    border-top: 1px solid var(--line);
    padding: 1em 1em;
    background: #fff;
}

#bizToggle[aria-expanded="true"]+.notice-body {
    display: block;
}

/* details要素のマーカー非表示＋矢印 */
details.notice>summary.notice-head {
    list-style: none;
}

details.notice>summary::-webkit-details-marker {
    display: none;
}

details.notice>summary.notice-head::after,
#bizToggle.notice-head::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-60%) rotate(45deg);
    transition: transform .2s ease, border-color .2s;
}

details[open]>summary.notice-head::after {
    transform: translateY(-20%) rotate(-135deg);
    border-color: var(--accent);
}

.hours {
    margin: 0;
    padding-left: 1.1em;
}

.hours li {
    margin: .35em 0;
}

/* ===== Messages =========================================================== */
.error,
.success {
    margin-top: 8px;
    padding: .9em 1em;
    border-radius: 10px;
    border: 1px solid transparent;
}

.error {
    background: #fdeaea;
    color: #7a1b1b;
    border-color: #f4c9c9;
}

.success {
    background: #e9f6ee;
    color: #124224;
    border-color: #cdebd6;
}

/* ===== Flatpickr (light tuning) ========================================== */
.flatpickr-calendar {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
}

.flatpickr-day {
    color: var(--ink);
}

.flatpickr-day.disabled,
.flatpickr-day.nextMonthDay,
.flatpickr-day.prevMonthDay {
    color: #b8bfc6;
    opacity: .7;
}

.flatpickr-day.selected {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}

.flatpickr-day.today {
    border-color: var(--accent);
}

.flatpickr-months .flatpickr-month,
.flatpickr-weekdays {
    color: #444;
}

/* ===== Payment logos placeholder (空でも崩れない) ======================= */
.payment-logos {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 28px;
}

.payment-logos img {
    height: 20px;
    filter: grayscale(1);
    opacity: .9;
}

/* ===== Help =============================================================== */
.help {
    color: var(--muted);
    margin: .2rem 0 0;
    font-size: .95em;
}

/* ===== Small niceties ===================================================== */
/* セクション区切りのごく淡いライン（読みやすさUP） */
form#reserve>div+div label::after {
    content: "";
    display: block;
    height: 0;
    margin-top: .2rem;
    border-top: 1px solid color-mix(in srgb, var(--line) 85%, #000 15%);
}

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .notice-body {
        transition: opacity .2s ease;
    }

    details[open] .notice-body {
        opacity: 1;
    }
}

.is-invalid {
    border-color: #dc2626;
    background: #fff7f7
}

.field-error {
    color: #b91c1c;
    font-size: .9rem;
    margin: .35rem 0 0
}