/* 8J1HAM HAMFAIR 2026 受付システム */

:root {
    --slot-empty: #e7f6e7;
    --slot-low: #e6f2ff;
    --slot-medium: #fff3b0;
    --slot-high: #f7b5b5;
    --slot-disabled: #666666;
    --slot-selected: #d8c8ff;

    --page-bg: #f5f7f9;
    --panel-bg: #ffffff;
    --border: #cfd6dc;
    --border-dark: #9ca8b2;
    --text: #1f2933;
    --muted: #68737d;
    --accent: #1f5f8b;
    --accent-dark: #184967;
    --notice-bg: #eef5fa;
    --notice-border: #b8d2e3;
    --danger-bg: #fff1f1;
    --danger-border: #d98787;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--page-bg);
}

body {
    margin: 0;
    padding: 36px 20px 60px;
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        Meiryo,
        sans-serif;
    font-size: 16px;
    line-height: 1.75;
    background: var(--page-bg);
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 34px 40px 46px;
    background: var(--panel-bg);
    border: 1px solid #e1e6ea;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

h1,
h2,
h3 {
    margin-top: 0;
    color: #18232c;
    line-height: 1.4;
}

h1 {
    margin-bottom: 26px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--accent);
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    letter-spacing: 0.02em;
}

h2 {
    margin-top: 34px;
    margin-bottom: 16px;
    font-size: 1.35rem;
}

h3 {
    margin-top: 28px;
    margin-bottom: 12px;
    font-size: 1.15rem;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-dark);
}

.notice {
    margin: 18px 0 30px;
    padding: 18px 20px;
    border: 1px solid var(--notice-border);
    border-left: 5px solid var(--accent);
    border-radius: 6px;
    background: var(--notice-bg);
}

.notice p:last-child {
    margin-bottom: 0;
}

.error {
    margin: 18px 0 28px;
    padding: 16px 18px;
    border: 1px solid var(--danger-border);
    border-left: 5px solid #b53c3c;
    border-radius: 6px;
    background: var(--danger-bg);
}

.form-row {
    margin: 18px 0;
}

.form-row > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

/* ラジオボタン・チェックボックス */
.form-row label:has(input[type="radio"]),
.form-row label:has(input[type="checkbox"]) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 18px 8px 0;
    font-weight: 500;
    cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--accent);
}

/* 入力欄 */
input[type="text"],
input[type="email"],
select {
    width: min(100%, 440px);
    padding: 10px 12px;
    border: 1px solid var(--border-dark);
    border-radius: 5px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
    outline: 3px solid rgba(31, 95, 139, 0.16);
    border-color: var(--accent);
}

/* ボタン */
button,
.button {
    display: inline-block;
    padding: 11px 20px;
    border: 1px solid var(--accent-dark);
    border-radius: 6px;
    background: var(--accent);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

button:hover,
.button:hover {
    background: var(--accent-dark);
    color: #ffffff;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

/* 希望枠グリッド */
.schedule-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0 28px;
}

.schedule-grid {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

.schedule-grid th,
.schedule-grid td {
    border: 1px solid var(--border-dark);
    padding: 7px;
    text-align: center;
    vertical-align: middle;
}

.schedule-grid th {
    background: #edf1f4;
    font-weight: 700;
}

.time-cell {
    width: 112px;
    white-space: nowrap;
    font-weight: 700;
    background: #f7f8f9 !important;
}

.slot {
    min-height: 74px;
    padding: 9px;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition:
        border-color 0.12s ease,
        transform 0.06s ease;
}

.slot:not(.slot-disabled):hover {
    border-color: rgba(31, 95, 139, 0.45);
}

.slot:not(.slot-disabled):active {
    transform: translateY(1px);
}

.slot-empty {
    background: var(--slot-empty);
}

.slot-low {
    background: var(--slot-low);
}

.slot-medium {
    background: var(--slot-medium);
}

.slot-high {
    background: var(--slot-high);
}

.slot-disabled {
    color: #ffffff;
    background: var(--slot-disabled);
    cursor: not-allowed;
}

.slot-selected {
    border-color: #5c35c8 !important;
    background: var(--slot-selected);
}

.slot-count {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.86rem;
}

.slot-disabled .slot-count {
    color: #eeeeee;
}

.slot-note {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* 選択数表示 */
.selection-status {
    position: sticky;
    bottom: 10px;
    z-index: 5;
    margin: 18px 0 26px;
    padding: 13px 16px;
    border: 1px solid #b8c1c8;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

.selection-status.limit {
    border-color: #c28a00;
    background: #fff8dd;
}

/* キャンセル領域 */
.cancel-area {
    margin-top: 54px;
    padding-top: 26px;
    border-top: 2px solid #d6dce1;
}

/* 管理側の表にも少し余裕 */
.schedule-grid td {
    line-height: 1.5;
}

/* スマホ */
@media (max-width: 700px) {
    body {
        padding: 14px 10px 30px;
        font-size: 15px;
    }

    .page {
        padding: 22px 16px 30px;
        border-radius: 4px;
    }

    h1 {
        margin-bottom: 20px;
        font-size: 1.55rem;
    }

    h2 {
        margin-top: 28px;
        font-size: 1.25rem;
    }

    .notice,
    .error {
        padding: 14px 15px;
    }

    .schedule-grid {
        min-width: 820px;
    }

    .form-row label:has(input[type="radio"]),
    .form-row label:has(input[type="checkbox"]) {
        margin-right: 12px;
    }

    button,
    .button {
        width: 100%;
        text-align: center;
    }
}

/* 印刷時は余計な装飾を落とす */
@media print {
    html,
    body {
        background: #ffffff;
    }

    body {
        padding: 0;
    }

    .page {
        max-width: none;
        padding: 0;
        border: 0;
        box-shadow: none;
    }
}


/* 1日目 / 2日目 切り替えタブ */
.event-day-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 22px;
}

.event-day-tab {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #c7cfd6;
    border-radius: 8px;
    background: #f6f8fa;
    color: #25313b;
    cursor: pointer;
    text-align: left;
}

.event-day-tab:hover {
    background: #eef3f7;
}

.event-day-tab.is-active {
    border-color: #346b92;
    background: #edf6fc;
}

.event-day-label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.9rem;
    font-weight: 700;
}

.event-day-date {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
}

.event-day-selected-count {
    display: block;
    margin-top: 5px;
    color: #68737d;
    font-size: 0.86rem;
    font-weight: 700;
}

.dow-sat {
    color: #2166b1;
    font-weight: 700;
}

.dow-sun {
    color: #c43b3b;
    font-weight: 700;
}

.dow-weekday {
    font-weight: 700;
}

.event-day-panel[hidden] {
    display: none !important;
}

.event-day-panel + .event-day-panel {
    margin-top: 30px;
}

.event-day-panel h3 {
    margin-top: 24px;
}

@media (max-width: 700px) {
    .event-day-tabs {
        gap: 7px;
    }

    .event-day-tab {
        padding: 11px 10px;
    }

    .event-day-date {
        font-size: 1rem;
    }

    .event-day-selected-count {
        font-size: 0.78rem;
    }
}


/* 設備出力・資格範囲外（体験運用）表示 */
.band-power {
    display: block;
    margin-top: 2px;
    color: #68737d;
    font-size: 0.8rem;
    font-weight: 700;
}

.slot-power {
    display: block;
    margin-top: 3px;
    color: #68737d;
    font-size: 0.78rem;
    font-weight: 700;
}

.slot-license-trial {
    display: block;
    margin-top: 5px;
    color: #c62828;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
}

.slot-selected .slot-license-trial {
    color: #b71c1c;
}
