/* ========================================
   バス駐車場予約システム — main.css
   ======================================== */

/* ---------- CSS変数 ---------- */
:root {
    --color-navy: #1e3a5f;
    --color-navy-light: #2d5986;
    --color-blue: #2563eb;
    --color-blue-dark: #1d4ed8;
    --color-blue-light: #3b82f6;
    --color-blue-pale: #eff6ff;
    --color-blue-border: #93c5fd;
    --color-text: #1e293b;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --color-text-placeholder: #94a3b8;
    --color-bg: #f0f4f8;
    --color-bg-card: #fff;
    --color-bg-section: #f8fafc;
    --color-border: #e2e8f0;
    --color-border-input: #d1d5db;
    --color-red: #dc2626;
    --color-green: #16a34a;
    --color-green-dark: #15803d;
    --color-yellow: #eab308;
    --radius-card: 16px;
    --radius-input: 10px;
    --radius-btn: 10px;
    --shadow-card: 0 2px 16px rgba(0,0,0,.05);
    --shadow-card-lg: 0 4px 24px rgba(0,0,0,.07);
}

/* ---------- リセット・ベース ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--color-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------- コンテナ ---------- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---------- ヘッダー ---------- */
.site-header {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    color: #fff;
    padding: .75rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.site-header .container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex-wrap: wrap;
    gap: .5rem;
}

.site-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.site-title a {
    color: #fff;
    text-decoration: none;
}

.site-title a:hover {
    opacity: .9;
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 1rem;
    position: absolute;
    right: 1rem;
}

.site-nav a {
    color: #cbd5e1;
    font-size: .875rem;
}

.site-nav a:hover {
    color: #fff;
    text-decoration: none;
}

/* ---------- メインコンテンツ ---------- */
.main-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 120px);
}

/* ---------- フッター ---------- */
.site-footer {
    background: #e2e8f0;
    text-align: center;
    padding: 1rem 0;
    margin-top: 3rem;
    font-size: .8rem;
    color: var(--color-text-muted);
}

/* =============================================
   予約ページ — Booking Page
   ============================================= */

.booking-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* --- Hero --- */
.booking-hero {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.booking-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-navy);
    letter-spacing: .04em;
}

.booking-subtitle {
    font-size: .9rem;
    color: var(--color-text-muted);
    margin-top: .4rem;
}

/* --- カレンダーカード --- */
.calendar-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-height: 800px;
    overflow: hidden;
    transition: max-height .45s ease, opacity .3s ease, margin-bottom .35s ease, padding .35s ease;
}

.calendar-card.is-hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

/* --- カレンダー --- */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-navy);
}

.calendar-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--color-text-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
}

.calendar-nav-btn:hover {
    background: var(--color-blue);
    color: #fff;
    text-decoration: none;
    transform: scale(1.05);
}

.calendar-nav-btn.is-disabled {
    color: #cbd5e1;
    pointer-events: none;
    opacity: .5;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.calendar-header {
    background: #f1f5f9;
    text-align: center;
    padding: .5rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    border-radius: 6px;
}

.calendar-header.sun { color: var(--color-red); }
.calendar-header.sat { color: var(--color-blue); }

.calendar-cell {
    background: var(--color-bg-card);
    text-align: center;
    padding: .7rem .25rem;
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all .2s;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-cell:hover {
    background: var(--color-blue-pale);
    border-color: var(--color-blue-border);
    transform: translateY(-1px);
}

.calendar-cell.sun { color: var(--color-red); }
.calendar-cell.sat { color: var(--color-blue); }

.calendar-cell.today {
    font-weight: 800;
    background: #fefce8;
    border-color: #fde047;
}

.calendar-cell.selected {
    background: var(--color-blue);
    color: #fff !important;
    border-color: var(--color-blue-dark);
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}

/* --- 日付範囲ハイライト（開始〜終了） --- */
.calendar-cell.in-range,
.calendar-cell.in-range:hover {
    background: var(--color-blue-pale);
    border: 2px solid var(--color-blue-border);
    border-radius: 8px;
    transform: none;
    box-shadow: none;
}

.calendar-cell.in-range:hover {
    background: #dbeafe;
}

.calendar-cell.range-end,
.calendar-cell.range-end:hover {
    background: var(--color-blue-pale);
    border: 2px solid var(--color-blue);
    border-radius: 8px;
    transform: none;
    box-shadow: none;
    font-weight: 700;
}

.calendar-cell.range-end:hover {
    background: #dbeafe;
}

.calendar-cell.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    background: var(--color-bg-section);
}

.calendar-cell.disabled:hover {
    background: var(--color-bg-section);
    border-color: transparent;
    transform: none;
}

.calendar-cell.full::after {
    content: "\00D7";
    font-size: .65rem;
    display: block;
    color: #ef4444;
}

.calendar-cell.empty {
    background: transparent;
    cursor: default;
}

.calendar-cell.empty:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
}

/* --- 選択日付バナー --- */
.selected-date-banner {
    margin-bottom: 1.5rem;
}

.date-banner-placeholder {
    text-align: center;
    display: block;
    width: 100%;
    background: var(--color-bg-section);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: .8rem 1.5rem;
    font-size: .9rem;
    color: var(--color-text-placeholder);
}

.date-banner-content {
    display: flex;
    align-items: stretch;
    gap: .75rem;
    justify-content: center;
}

.date-banner-item {
    flex: 1;
    max-width: 300px;
    background: var(--color-blue-pale);
    border: 2px solid var(--color-blue-border);
    border-radius: 14px;
    padding: .75rem 1.25rem;
    text-align: center;
    transition: border-color .3s, box-shadow .3s;
}

.date-banner-item:hover {
    border-color: var(--color-blue);
    box-shadow: 0 2px 8px rgba(37,99,235,.1);
}

.date-banner-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    color: var(--color-blue);
    letter-spacing: .08em;
    margin-bottom: .3rem;
}

.date-banner-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.3;
}

.date-banner-time {
    display: none;
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-top: .2rem;
}

.date-banner-time.is-visible {
    display: block;
}

.date-banner-divider {
    display: flex;
    align-items: center;
    color: var(--color-blue-border);
    flex-shrink: 0;
}

/* --- 予約フォームセクション --- */
.reservation-form-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    margin-top: 1.5rem;
}

.reservation-form-section.is-visible {
    display: block;
    animation: fadeInUp .5s ease forwards;
}

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

/* --- ステッププログレスバー --- */
.step-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: .5rem 0 1rem;
}

.step-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #94a3b8;
    transition: all .35s ease;
    border: 3px solid transparent;
}

.step-progress-label {
    font-size: .72rem;
    color: #94a3b8;
    margin-top: .35rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color .35s ease;
}

.step-progress-line {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    margin: 0 2px;
    margin-top: 19px;
    max-width: 56px;
    min-width: 16px;
    border-radius: 2px;
    transition: background .35s ease;
}

/* Active step */
.step-progress-item.active .step-progress-circle {
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-light) 100%);
    color: #fff;
    border-color: rgba(37, 99, 235, .2);
    box-shadow: 0 3px 12px rgba(37, 99, 235, .3);
    transform: scale(1.12);
}

.step-progress-item.active .step-progress-label {
    color: var(--color-blue);
    font-weight: 700;
}

/* Completed step */
.step-progress-item.completed .step-progress-circle {
    background: var(--color-green);
    color: #fff;
    border-color: rgba(22, 163, 74, .2);
    font-size: 0;
}

.step-progress-item.completed .step-progress-circle::after {
    content: "\2713";
    font-size: 1rem;
    font-weight: 700;
}

.step-progress-item.completed .step-progress-label {
    color: var(--color-green);
}

.step-progress-line.completed {
    background: var(--color-green);
}

/* --- フォームステップ (カード型) --- */
fieldset.step {
    border: 2px solid transparent;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--color-bg-card);
}

fieldset.step legend {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-navy);
    border-bottom: 2px solid var(--color-border);
    padding: 0 0 .5rem 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: .6rem;
    float: none;
}

/* --- ステップバッジ --- */
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-blue), var(--color-blue-light));
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* --- 日時グリッド --- */
.datetime-grid {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.datetime-block {
    flex: 1;
    min-width: 0;
    background: var(--color-bg-section);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}

.datetime-label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: .6rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.datetime-fields {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.datetime-fields .form-group {
    margin-bottom: 0;
}

.datetime-arrow-wrap {
    display: flex;
    align-items: center;
    padding-top: 2rem;
}

.datetime-arrow-icon {
    width: 28px;
    height: 28px;
    color: var(--color-blue-border);
    flex-shrink: 0;
}

/* =============================================
   フォーム共通
   ============================================= */

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

.form-group label,
.datetime-fields label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: .3rem;
}

.required {
    color: var(--color-red);
    font-size: .7rem;
    margin-left: .25rem;
    font-weight: 700;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea,
.datetime-fields input[type="text"],
.datetime-fields select {
    width: 100%;
    padding: .6rem .85rem;
    border: 1.5px solid var(--color-border-input);
    border-radius: var(--radius-input);
    font-size: .9rem;
    font-family: inherit;
    background: var(--color-bg-card);
    transition: border-color .2s, box-shadow .2s;
    color: var(--color-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.datetime-fields input:focus,
.datetime-fields select:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint {
    display: block;
    font-size: .75rem;
    color: var(--color-text-placeholder);
    margin-top: .25rem;
    font-weight: 400;
}

/* --- エラー表示 --- */
.is-error {
    border-color: var(--color-red) !important;
}

.field-error {
    display: block;
    color: var(--color-red);
    font-size: .8rem;
    margin-top: .25rem;
}

.form-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-input);
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
}

.form-errors ul {
    list-style: disc;
    margin-left: 20px;
}

.form-errors li {
    color: #991b1b;
    font-size: .85rem;
}

/* --- 利用ポリシー（予約フォーム確認画面） --- */
.usage-policy {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-input);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.usage-policy-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: .5rem;
}

.usage-policy-heading {
    font-size: .85rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-top: .6rem;
}

.usage-policy-text {
    font-size: .82rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* --- Flatpickr 日付入力カスタマイズ --- */
#start_date,
#end_date {
    cursor: pointer;
}

.flatpickr-input[readonly] {
    cursor: pointer;
    background: var(--color-bg-card);
}

.flatpickr-input.active {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.flatpickr-calendar {
    font-family: inherit;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    border: 1px solid var(--color-border);
}

.flatpickr-months .flatpickr-month {
    background: var(--color-navy);
    color: #fff;
    border-radius: 11px 11px 0 0;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: #fff;
    color: #fff;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--color-blue-border);
}

.flatpickr-current-month {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: var(--color-navy);
    color: #fff;
    font-weight: 700;
}

span.flatpickr-weekday {
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: .8rem;
}

.flatpickr-day {
    border-radius: 8px;
    font-size: .9rem;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--color-blue);
    border-color: var(--color-blue);
}

.flatpickr-day.today:not(.selected) {
    background: #fefce8;
    border-color: #fde047;
    color: var(--color-text);
    font-weight: 800;
}

.flatpickr-day.today:not(.selected):hover {
    background: #fef9c3;
    border-color: #facc15;
}

/* --- Flatpickr 曜日カラー（土曜・日曜） --- */
.flatpickr-day.fp-sat:not(.selected):not(.flatpickr-disabled) {
    color: var(--color-blue);
}

.flatpickr-day.fp-sun:not(.selected):not(.flatpickr-disabled) {
    color: var(--color-red);
}

span.flatpickr-weekday:nth-child(1) {
    color: var(--color-red);
}

span.flatpickr-weekday:nth-child(7) {
    color: var(--color-blue);
}

/* --- 入力ハイライトアニメーション --- */
@keyframes inputHighlight {
    0%   { box-shadow: 0 0 0 0 rgba(37,99,235,.4); }
    50%  { box-shadow: 0 0 0 6px rgba(37,99,235,.15); }
    100% { box-shadow: 0 0 0 0 rgba(37,99,235,.0); }
}

input.highlight {
    animation: inputHighlight .7s ease;
    border-color: var(--color-blue);
}

/* --- ファイルアップロード --- */
.file-upload-group {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.file-upload-group input[type="file"],
.form-group input[type="file"] {
    font-size: .85rem;
    padding: .5rem;
    border: 1.5px dashed var(--color-border-input);
    border-radius: var(--radius-input);
    background: var(--color-bg-section);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.file-upload-group input[type="file"]:hover,
.form-group input[type="file"]:hover {
    border-color: var(--color-blue-border);
    background: var(--color-blue-pale);
}

/* =============================================
   ボタン
   ============================================= */

.btn {
    display: inline-block;
    padding: .6rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--color-blue);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-blue-dark);
}

.btn-next {
    background: var(--color-blue);
    color: #fff;
}

.btn-next:hover {
    background: var(--color-blue-dark);
}

.btn-prev {
    background: transparent;
    border-color: #cbd5e1;
    color: var(--color-text-secondary);
}

.btn-prev:hover {
    background: #f1f5f9;
}

.btn-submit {
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-light) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37,99,235,.25);
    transition: all .2s;
    width: 100%;
    display: block;
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--color-blue-dark) 0%, var(--color-blue) 100%);
    box-shadow: 0 6px 20px rgba(37,99,235,.35);
    transform: translateY(-1px);
}

.btn-search {
    background: var(--color-blue);
    color: #fff;
}

.btn-search:hover {
    background: var(--color-blue-dark);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* --- 送信後の注意文 --- */
.submit-note {
    text-align: center;
    font-size: .8rem;
    color: var(--color-text-placeholder);
    margin-top: 1rem;
    line-height: 1.7;
}

/* =============================================
   確認テーブル / 詳細テーブル
   ============================================= */

.confirm-table,
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.confirm-table th,
.detail-table th {
    text-align: left;
    padding: .6rem .85rem;
    background: #f1f5f9;
    border: 1px solid var(--color-border);
    width: 30%;
    font-size: .85rem;
    vertical-align: top;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.confirm-table td,
.detail-table td {
    padding: .6rem .85rem;
    border: 1px solid var(--color-border);
    font-size: .9rem;
}

/* =============================================
   完了・照会画面
   ============================================= */

.complete-section,
.lookup-section {
    max-width: 640px;
    margin: 0 auto;
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.complete-section h2,
.lookup-section h2 {
    font-size: 1.3rem;
    margin-bottom: .75rem;
    color: var(--color-green);
    font-weight: 700;
}

.lookup-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.lookup-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.nav-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 16px;
}

.no-result {
    color: #888;
    font-style: italic;
    padding: 12px 0;
}

/* =============================================
   管理画面: ログイン
   ============================================= */

.login-container {
    max-width: 400px;
    margin: 2rem auto;
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 2rem;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--color-navy);
    font-weight: 700;
}

.login-container label {
    display: block;
    font-weight: 600;
    margin-bottom: .3rem;
    font-size: .85rem;
    color: var(--color-text-secondary);
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: .6rem .85rem;
    font-size: .9rem;
    border: 1.5px solid var(--color-border-input);
    border-radius: var(--radius-input);
    margin-bottom: 1rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}

.login-container input:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.btn-login {
    display: block;
    width: 100%;
    padding: .75rem;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-light) 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all .2s;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--color-blue-dark) 0%, var(--color-blue) 100%);
    transform: translateY(-1px);
}

/* =============================================
   管理画面: ダッシュボード
   ============================================= */

.dashboard-container {
    max-width: 100%;
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

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

.dashboard-header h2 {
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--color-navy);
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.dashboard-actions > a {
    white-space: nowrap;
}

.btn-schedule {
    padding: .5rem 1.25rem;
    background: var(--color-blue);
    color: #fff;
    border-radius: var(--radius-btn);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}

.btn-schedule:hover {
    background: var(--color-blue-dark);
    text-decoration: none;
}

.btn-logout {
    padding: .5rem 1.25rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    color: var(--color-text-secondary);
    border-radius: var(--radius-btn);
    font-size: .85rem;
    cursor: pointer;
    transition: all .2s;
}

.btn-logout:hover {
    background: #f1f5f9;
}

.success-message {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-input);
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    color: #166534;
    font-size: .9rem;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-input);
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    color: #991b1b;
    font-size: .9rem;
}

.error-list {
    margin-bottom: 1rem;
}

/* --- フィルタフォーム --- */
.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: .75rem;
    background: var(--color-bg-section);
    border-radius: var(--radius-input);
    border: 1px solid var(--color-border);
}

.filter-form select {
    margin-right: 24px;
}

.filter-form label {
    font-size: .8rem;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
    color: var(--color-text-secondary);
}

.filter-form select {
    padding: .4rem .6rem;
    border: 1.5px solid var(--color-border-input);
    border-radius: 6px;
    font-size: .85rem;
    font-family: inherit;
    height: 40px;
}

.filter-form select:focus,
.filter-form input:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}

.filter-date-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-date-label {
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.filter-date-group input {
    padding: .5rem .7rem;
    border: 1.5px solid var(--color-border-input);
    border-radius: 6px;
    font-size: .9rem;
    font-family: inherit;
    height: 40px;
    width: 160px;
    cursor: pointer;
}

.filter-date-sep {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    padding: 0 4px;
    line-height: 40px;
}

.btn-search {
    padding: .5rem 1.5rem;
    background: linear-gradient(135deg, var(--color-blue), var(--color-blue-dark));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 2px 4px rgba(37,99,235,.2);
    height: 40px;
}

.btn-search:hover {
    background: linear-gradient(135deg, var(--color-blue-dark), #1e40af);
    box-shadow: 0 3px 8px rgba(37,99,235,.3);
    transform: translateY(-1px);
}

/* --- 予約一覧テーブル --- */
.reservation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8rem;
}

.reservation-table th {
    background: #f1f5f9;
    padding: .5rem .4rem;
    text-align: center;
    border: 1px solid var(--color-border);
    white-space: nowrap;
    font-weight: 700;
    color: var(--color-text-secondary);
    font-size: .8rem;
}

.reservation-table td {
    padding: .5rem .4rem;
    border: 1px solid var(--color-border);
    vertical-align: top;
}

.reservation-table tr.status-tentative {
    background: #fffde7;
}

.reservation-table tr.status-confirmed {
    background: #f0fdf4;
}

.reservation-table tr.status-cancelled {
    background: var(--color-bg-section);
    color: #999;
}

.reservation-table th:nth-child(2),
.reservation-table td:nth-child(2) {
    width: 4em;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: .2rem .5rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
}

.badge-tentative {
    background: #fef3c7;
    color: #92400e;
}

.badge-confirmed {
    background: #dcfce7;
    color: #166534;
}

.badge-cancelled {
    background: #f1f5f9;
    color: var(--color-text-muted);
}

/* --- アクションバー --- */
.action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: .6rem 1rem;
    margin-bottom: 1rem;
    background: #f8fafc;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-input);
    flex-wrap: wrap;
}

.action-bar-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-right: auto;
}

.action-bar button:disabled,
.action-bar a.disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

/* --- 行選択 --- */
tr.selectable-row {
    cursor: pointer;
    transition: background .15s;
}

tr.selectable-row:hover {
    background: #f1f5f9;
}

tr.selectable-row.selected {
    background: #dbeafe;
    outline: 2px solid var(--color-blue);
    outline-offset: -2px;
}

/* --- 編集直後の行ハイライト（タスク1: 変更後は色を変える） --- */
.reservation-table tr.row-recently-updated {
    background: #fef9c3 !important;
    box-shadow: inset 0 0 0 2px #f59e0b;
    transition: background 1s ease, box-shadow 1s ease;
}

.btn-confirm {
    padding: .25rem .6rem;
    background: var(--color-green);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .75rem;
    cursor: pointer;
    transition: background .2s;
}

.btn-confirm:hover {
    background: var(--color-green-dark);
}

.btn-cancel {
    padding: .25rem .6rem;
    background: var(--color-red);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .75rem;
    cursor: pointer;
    transition: background .2s;
}

.btn-cancel:hover {
    background: #b91c1c;
}

.btn-edit {
    padding: .25rem .6rem;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .75rem;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}

.btn-edit:hover {
    background: #d97706;
    text-decoration: none;
}

.btn-mail {
    padding: .25rem .6rem;
    background: var(--color-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .75rem;
    text-decoration: none;
    transition: background .2s;
}

.btn-mail:hover {
    background: var(--color-blue-dark);
    text-decoration: none;
}

/* --- 削除ボタン --- */
.btn-delete {
    padding: .25rem .6rem;
    background: #7f1d1d;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .75rem;
    cursor: pointer;
    transition: background .2s;
}

.btn-delete:hover {
    background: #450a0a;
}

/* --- ユーザー管理ボタン --- */
.btn-users {
    padding: .5rem 1.25rem;
    background: #8b5cf6;
    color: #fff;
    border-radius: var(--radius-btn);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}

.btn-users:hover {
    background: #7c3aed;
    text-decoration: none;
}

/* --- ログインユーザー表示 --- */
.login-user {
    font-size: .85rem;
    color: var(--color-text-secondary);
    padding: .5rem 0;
}

/* =============================================
   管理画面: ユーザー管理
   ============================================= */

.users-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.user-add-section {
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    padding: .5rem;
}

.user-add-toggle {
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    color: var(--color-blue);
    padding: .5rem;
}

.user-add-form {
    padding: .75rem .5rem 0;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.users-table th {
    background: #f1f5f9;
    padding: .6rem;
    text-align: left;
    border: 1px solid var(--color-border);
    font-weight: 700;
    color: var(--color-text-secondary);
}

.users-table td {
    padding: .6rem;
    border: 1px solid var(--color-border);
    vertical-align: middle;
}

.users-table select {
    padding: .3rem .5rem;
    border: 1.5px solid var(--color-border-input);
    border-radius: 6px;
    font-size: .8rem;
    font-family: inherit;
}

.role-badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
}

.role-admin    { background: #fef3c7; color: #92400e; }
.role-operator { background: #dbeafe; color: #1e40af; }
.role-viewer   { background: #f1f5f9; color: #64748b; }

/* =============================================
   管理画面: ユーザー編集
   ============================================= */

.user-edit-container {
    max-width: 520px;
    margin: 0 auto;
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.user-edit-container h2 {
    font-size: 1.2rem;
    margin-bottom: .5rem;
    color: var(--color-navy);
}

.user-edit-container .edit-info {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-size: .9rem;
}

.user-edit-container label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    margin-top: 1rem;
    margin-bottom: .3rem;
    color: var(--color-text-secondary);
}

.user-edit-container input,
.user-edit-container select {
    width: 100%;
    padding: .6rem .85rem;
    font-size: .9rem;
    border: 1.5px solid var(--color-border-input);
    border-radius: var(--radius-input);
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}

.user-edit-container input:focus,
.user-edit-container select:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.field-hint {
    font-size: .78rem;
    color: var(--color-text-muted);
    margin-top: .25rem;
}

/* =============================================
   管理画面: 編集
   ============================================= */

.edit-container {
    max-width: 640px;
    margin: 0 auto;
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.edit-container h2 {
    font-size: 1.2rem;
    margin-bottom: .5rem;
    color: var(--color-navy);
}

.edit-info {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-size: .9rem;
}

.edit-container label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    margin-top: 1rem;
    margin-bottom: .3rem;
    color: var(--color-text-secondary);
}

.edit-container input,
.edit-container select,
.edit-container textarea {
    width: 100%;
    padding: .6rem .85rem;
    font-size: .9rem;
    border: 1.5px solid var(--color-border-input);
    border-radius: var(--radius-input);
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}

.edit-container input:focus,
.edit-container select:focus,
.edit-container textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.edit-container dl {
    margin: 1.25rem 0;
}

.edit-container dt {
    color: var(--color-text-muted);
    font-size: .85rem;
    margin-top: .75rem;
}

.edit-container dd,
.edit-container details {
    overflow-wrap: anywhere;
}

.edit-container details {
    padding: .75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.edit-container .edit-form > button {
    margin: .4rem .4rem .4rem 0;
}

.campaign-page h2 {
    margin: 1.75rem 0 .75rem;
    font-size: 1.15rem;
    color: var(--color-navy);
}

.campaign-page label {
    display: inline-block;
    font-weight: 600;
    margin: .6rem .4rem .4rem 0;
}

.campaign-page input:not([type="hidden"]):not([type="checkbox"]),
.campaign-page select,
.campaign-page textarea {
    max-width: 100%;
    padding: .6rem .75rem;
    font: inherit;
    border: 1.5px solid var(--color-border-input);
    border-radius: var(--radius-input);
}

#campaign-subject,
#campaign-body {
    width: 100%;
}

.campaign-page button {
    padding: .5rem .85rem;
    margin: .3rem .3rem .3rem 0;
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-btn);
    cursor: pointer;
    font: inherit;
}

.campaign-page button[name="action"][value="preview"],
.campaign-page button[name="action"][value="start"],
#campaign-continue button {
    background: var(--color-blue);
    color: #fff;
}

.campaign-page .table-scroll {
    width: 100%;
    overflow-x: auto;
    margin: 1rem 0;
}

.campaign-page .table-scroll table {
    min-width: 760px;
}

.campaign-page ul {
    padding-left: 1.5rem;
    overflow-wrap: anywhere;
}

.campaign-page input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
}

.btn-save {
    padding: .6rem 1.5rem;
    background: var(--color-green);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: background .2s;
}

.btn-save:hover {
    background: var(--color-green-dark);
}

.btn-back {
    padding: .6rem 1.5rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    color: var(--color-text-secondary);
    font-size: .9rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}

.btn-back:hover {
    background: #f1f5f9;
    text-decoration: none;
}

/* =============================================
   管理画面: スケジュール表
   ============================================= */

.schedule-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1rem;
}

.schedule-toolbar .btn-print {
    margin: 0;
}

.schedule-legend {
    display: flex;
    flex: 1 1 25rem;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .85rem;
    font-size: .85rem;
    color: var(--color-text-secondary);
}

.schedule-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}

.schedule-legend-swatch {
    display: inline-block;
    width: 1.25rem;
    height: .85rem;
    border-radius: 3px;
}

.schedule-legend-note {
    flex-basis: 100%;
    font-size: .75rem;
}

.schedule-sort {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
    font-size: .85rem;
    font-weight: 600;
}

.schedule-sort select {
    padding: .45rem .65rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    background: #fff;
    color: var(--color-text);
    font: inherit;
    cursor: pointer;
}

.schedule-sort select:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

.schedule-container {
    max-width: 100%;
    overflow-x: auto;
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.schedule-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.schedule-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-navy);
}

.date-jump {
    display: flex;
    gap: 6px;
    align-items: center;
}

.date-jump input[type="date"] {
    padding: .35rem .6rem;
    border: 1.5px solid var(--color-border-input);
    border-radius: 6px;
    font-family: inherit;
}

.btn-print {
    padding: .5rem 1rem;
    background: var(--color-text-secondary);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    font-size: .85rem;
    cursor: pointer;
    margin-bottom: .75rem;
    transition: background .2s;
}

.btn-print:hover {
    background: #374151;
}

.print-only-title {
    display: none;
}

.print-timestamp {
    display: none;
}

.schedule-table {
    border-collapse: collapse;
    table-layout: fixed;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #cbd5e1;
    padding: 1px;
    text-align: center;
    font-size: .65rem;
}

.slot-header {
    width: 25px;
    background: #f1f5f9;
}

.info-header {
    background: #f1f5f9;
    font-weight: 700;
    font-size: .65rem;
    white-space: nowrap;
}

.info-cell {
    font-size: .65rem;
    text-align: left;
    padding: 1px 4px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-cell:nth-child(2) {
    width: 140px;
    text-align: left;
}

.info-cell:nth-child(3) {
    width: 4em;
    text-align: center;
}

.hour-header {
    background: #f1f5f9;
    font-weight: 700;
    font-size: .6rem;
    height: 3em;
}

.end-col {
    width: 6px;
}

.sub-header td {
    background: var(--color-bg-section);
    font-size: .5rem;
    color: #999;
    padding: 0;
    height: 3.0em;
}

.sub-header td:not(:first-child) {
    width: 35px;
}

.half-mark {
    border-right: 1px dashed #ddd;
}

.slot-row {
    height: 36px;
}

.slot-row.selectable-slot {
    cursor: pointer;
}

.slot-row.selectable-slot:hover {
    background: #f1f5f9;
}

.slot-row.selected {
    background: #dbeafe;
    outline: 2px solid var(--color-blue);
    outline-offset: -2px;
}

.slot-number {
    background: var(--color-bg-section);
    font-weight: bold;
    width: 25px;
}

.timebar-cell {
    padding: 0 !important;
    position: relative;
}

.timebar-container {
    position: relative;
    height: 100%;
    background-size: calc(100% / 12) 100%, calc(100% / 12) 100%;
    background-image:
        linear-gradient(to right, #ccc 0, #ccc 1px, transparent 1px),
        linear-gradient(to right, transparent calc(50% - .25px), #e8e8e8 calc(50% - .25px), #e8e8e8 calc(50% + .25px), transparent calc(50% + .25px));
    min-height: 36px;
}

.grid-line {
    display: none;
}

.timebar {
    position: absolute;
    top: 2px;
    bottom: 2px;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: .7rem;
    overflow: visible;
    white-space: nowrap;
}

.timebar .bar-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 100%;
    margin-left: 4px;
    white-space: nowrap;
    z-index: 2;
    color: #333;
    pointer-events: none;
}

.timebar .bar-text.text-left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 4px;
}

.bar-tentative {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.bar-confirmed {
    background: #dcfce7;
    border: 1px solid #4ade80;
    color: #166534;
}

.bar-cancelled {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    text-decoration: line-through;
    color: #999;
}

.bar-time-changed {
    background: #ffedd5;
    border: 1px solid #f97316;
    color: #9a3412;
}

.timebar .bar-old-time {
    font-size: .9em;
    color: #b45309;
    margin-left: 4px;
}

.bar-text {
    font-weight: 600;
}

.bar-time {
    font-size: .6rem;
    color: var(--color-text-muted);
}

/* =============================================
   確認モーダル
   ============================================= */

.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.confirm-modal {
    background: var(--color-bg-card);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
    padding: 2rem 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.confirm-modal-message {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-modal-yes {
    padding: .6rem 1.5rem;
    background: var(--color-blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.confirm-modal-yes:hover {
    background: var(--color-blue-dark);
}

.confirm-modal-no {
    padding: .6rem 1.5rem;
    background: transparent;
    border: 1.5px solid #cbd5e1;
    color: var(--color-text-secondary);
    border-radius: var(--radius-btn);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.confirm-modal-no:hover {
    background: #f1f5f9;
}

.confirm-modal-no:focus {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

/* =============================================
   ユーティリティ
   ============================================= */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }

/* =============================================
   レスポンシブ
   ============================================= */

@media (max-width: 640px) {
    .booking-page { padding: 0 .75rem 2rem; }
    .booking-title { font-size: 1.3rem; }
    .calendar-card { padding: 1rem; border-radius: 12px; }
    .calendar-cell { padding: .5rem .15rem; font-size: .85rem; min-height: 42px; }
    .calendar-nav-btn { width: 36px; height: 36px; font-size: 1rem; }

    .datetime-grid { flex-direction: column; }
    .datetime-arrow-wrap {
        justify-content: center;
        padding: 0;
    }
    .datetime-arrow-icon { transform: rotate(90deg); }

    fieldset.step { padding: 1rem; border-radius: 12px; }
    .form-row { grid-template-columns: 1fr; }

    .site-header .container {
        flex-direction: column;
        text-align: center;
    }
    .site-nav { position: static; justify-content: center; }

    .btn-submit { padding: .85rem 1.5rem; font-size: 1rem; }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* iOS zoom prevention */
    }

    .form-actions {
        flex-direction: column;
    }

    .lookup-form {
        flex-direction: column;
    }

    .filter-form {
        flex-direction: column;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 10px;
    }

    /* --- Progress bar mobile --- */
    .step-progress {
        padding: .25rem 0 .75rem;
        margin-bottom: 1rem;
    }

    .step-progress-circle {
        width: 32px;
        height: 32px;
        font-size: .8rem;
    }

    .step-progress-label {
        font-size: .62rem;
    }

    .step-progress-line {
        margin-top: 15px;
        max-width: 28px;
        min-width: 8px;
    }

    .step-progress-item.active .step-progress-circle {
        transform: scale(1.08);
    }

    /* --- Date banner mobile --- */
    .date-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
    }

    .date-banner-item {
        max-width: none;
        padding: .6rem 1rem;
    }

    .date-banner-divider {
        justify-content: center;
        padding: 0;
    }

    .date-banner-divider svg {
        transform: rotate(90deg);
        width: 20px;
        height: 20px;
    }

    .dashboard-actions {
        flex-wrap: wrap;
    }

    .reservation-table {
        display: block;
        overflow-x: auto;
    }

    .schedule-table {
        min-width: 700px;
    }

    .schedule-container {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
}

/* =============================================
   印刷用
   ============================================= */

@media print {
    .no-print { display: none !important; }
    .print-only-title { display: block; font-size: 14pt; font-weight: 700; margin-bottom: 8px; }

    body { background: #fff; }
    .schedule-container { box-shadow: none; padding: 0; }

    .hour-header { height: 2em; }
    .sub-header td { height: 2em; }
    .slot-row { height: 40px !important; }
    .slot-number { padding: 0 !important; }
    .timebar-cell { height: 40px !important; }
    .timebar-container {
        min-height: 36px !important; height: 36px !important;
        background-image: none !important;
    }
    .grid-line {
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        width: 0;
        pointer-events: none;
        z-index: 0;
    }
    .grid-hour { border-left: 1px solid #999; }
    .grid-half { border-left: 1px solid #ccc; }
    .timebar { font-size: .6rem; }

    /* 印刷日時の表示 */
    .print-timestamp {
        display: block;
        font-size: 9pt;
        text-align: right;
        margin-bottom: 4px;
        color: #000;
    }

    /* 予約バーを白黒プリンタでも判別可能にする */
    .timebar .bar-text { color: #000; }
    .timebar.bar-tentative {
        background: #fff;
        border: 1.5px dashed #000;
        color: #000;
    }
    .timebar.bar-confirmed {
        background: #d9d9d9;
        border: 2px solid #000;
        color: #000;
    }
    .timebar.bar-cancelled {
        background: repeating-linear-gradient(45deg, #fff, #fff 3px, #bbb 3px, #bbb 6px);
        border: 1px solid #000;
        color: #000;
    }
    .timebar.bar-time-changed {
        background: #fff;
        border: 2px dotted #000;
        color: #000;
    }

    /* 10台超の日は2枚目に分割（10行ごとに改ページ、最終行では分割しない） */
    .schedule-table thead { display: table-header-group; }
    .schedule-table tbody tr:nth-child(10n):not(:last-child) {
        break-after: page;
        page-break-after: always;
    }
}
