/* css/style.css - 追記分（既存のスタイルに追加） */

/* ===== 共通 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100%;
}

    body:has(.respond-fixed-header) {
        overflow: hidden;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }


#app {
    min-height: 100vh;
}

/* ===== 作成ページ専用 ===== */
.create-page {
    min-height: 100vh;
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.page-header {
    background: #1a73e8;
    color: white;
    padding: 16px;
    text-align: center;
}

.page-header h1 {
    font-size: 1.2rem;
}

/* フォーム */
.create-form {
    padding: 20px 16px;
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #333;
}

.required {
    color: #e53935;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #1a73e8;
}

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

.form-hint {
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
}

.form-hint.error {
    color: #e53935;
}

/* 日付・時間レンジ */
.date-range,
.time-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 時間帯セクション（平日/休日） ===== */

.time-range-section {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

    .time-range-section:last-child {
        margin-bottom: 0;
    }

.time-range-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
}

.time-range-icon {
    font-size: 1.1rem;
}

.time-range-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

    .time-range-row .drum-picker {
        flex: 1;
        max-width: 150px;
    }

    .time-range-row .range-separator {
        color: #666;
        font-weight: bold;
    }



.date-input,
.time-select {
    flex: 1;
    min-width: 0;
}

.range-separator {
    color: #666;
    font-weight: bold;
    flex-shrink: 0;
}

/* ===== ネイティブ日付入力（LINEブラウザ用） ===== */

.date-range-native {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.date-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px;
}

    .date-input-row .date-label {
        flex: 0 0 60px;
        font-size: 0.85rem;
        color: #666;
    }

    .date-input-row input[type="date"] {
        flex: 1;
        padding: 12px 14px;
        font-size: 1rem;
        border: 2px solid #e0e0e0;
        border-radius: 10px;
        background: #fff;
        color: #333;
    }

        .date-input-row input[type="date"]:focus {
            border-color: #1a73e8;
            outline: none;
        }

/* チェックボックス */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ボタン */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: bold;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #1557b0;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: bold;
    background: white;
    color: #1a73e8;
    border: 2px solid #1a73e8;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e3f2fd;
}

.btn-text {
    background: none;
    border: none;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px;
}

.btn-text:hover {
    color: #333;
}

/* ===== 作成完了セクション ===== */
.create-result {
    flex: 1;
    padding: 20px 16px; 
}

.result-fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== 結果ページ情報バー ===== */

.result-info-bar {
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.responder-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #1a73e8;
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

.result-info-bar .event-description {
    flex: 1;
    margin: 0;
    font-size: 0.8rem;
    color: #666;
    min-width: 0;
}

    .result-info-bar .event-description:empty {
        display: none;
    }

/* ===== 回答者フィルタ ===== */

.filter-bar {
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
}

.filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

    .filter-scroll::-webkit-scrollbar {
        display: none;
    }

.filter-chip {
    flex-shrink: 0;
    padding: 6px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

    .filter-chip:hover {
        border-color: #1a73e8;
        color: #1a73e8;
    }

    .filter-chip.active {
        background: #1a73e8;
        border-color: #1a73e8;
        color: #fff;
    }


/* ===== 結果ページ凡例 ===== */

.result-legend {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #666;
}

.dot-mini {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

    .dot-mini.heat-4 {
        background: #2e7d32;
    }

    .dot-mini.heat-3 {
        background: #66bb6a;
    }

    .dot-mini.heat-2 {
        background: #a5d6a7;
    }

    .dot-mini.heat-1 {
        background: #c8e6c9;
    }

.result-scroll-area {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

/* ===== 結果ページ固定フッター ===== */

.result-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

    .result-footer .footer-content {
        max-width: 800px;
        margin: 0 auto;
        display: flex;
        gap: 10px;
    }

.btn-primary-full {
    flex: 1;
    display: block;
    padding: 14px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background: #1a73e8;
    border: none;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-primary-full:hover {
        background: #1557b0;
    }

.btn-secondary-full {
    flex: 1;
    display: block;
    padding: 14px;
    font-size: 1rem;
    font-weight: bold;
    color: #1a73e8;
    background: #e8f0fe;
    border: none;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-secondary-full:hover {
        background: #d2e3fc;
    }

.result-header {
    text-align: center;
    margin-bottom: 20px;
}

.result-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.result-header h2 {
    font-size: 1.2rem;
    color: #333;
}

.result-event-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.result-event-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.result-event-info p {
    font-size: 0.85rem;
    color: #666;
}

/* ===== 濃淡表示 ===== */

/* OK濃淡（緑系）- 薄め */
.time-slot.heat-ok-1 {
    background: rgba(129, 199, 132, 0.10) !important;
}

.time-slot.heat-ok-2 {
    background: rgba(129, 199, 132, 0.18) !important;
}

.time-slot.heat-ok-3 {
    background: rgba(129, 199, 132, 0.26) !important;
}

.time-slot.heat-ok-4 {
    background: rgba(129, 199, 132, 0.35) !important;
}

/* 微妙濃淡（オレンジ系）- 薄め */
.time-slot.heat-maybe-1 {
    background: rgba(255, 183, 77, 0.10) !important;
}

.time-slot.heat-maybe-2 {
    background: rgba(255, 183, 77, 0.18) !important;
}

.time-slot.heat-maybe-3 {
    background: rgba(255, 183, 77, 0.26) !important;
}

.time-slot.heat-maybe-4 {
    background: rgba(255, 183, 77, 0.35) !important;
}
/* 両方ある場合 */
.time-slot.heat-ok-1.heat-maybe-1,
.time-slot.heat-ok-2.heat-maybe-1,
.time-slot.heat-ok-1.heat-maybe-2,
.time-slot.heat-ok-2.heat-maybe-2 {
    background: linear-gradient(135deg, rgba(129, 199, 132, 0.2) 50%, rgba(255, 183, 77, 0.2) 50%) !important;
}

/* ===== 結果ページ ヒートマップ（濃いめ） ===== */

.result-slot.heat-ok-4 {
    background: #2e7d32 !important;
}

.result-slot.heat-ok-3 {
    background: #43a047 !important;
}

.result-slot.heat-ok-2 {
    background: #66bb6a !important;
}

.result-slot.heat-ok-1 {
    background: #a5d6a7 !important;
}

.result-slot.heat-maybe-4 {
    background: #ef6c00 !important;
}

.result-slot.heat-maybe-3 {
    background: #fb8c00 !important;
}

.result-slot.heat-maybe-2 {
    background: #ffa726 !important;
}

.result-slot.heat-maybe-1 {
    background: #ffcc80 !important;
}

/* 個別表示モード */
.result-slot.ok {
    background: #2e7d32 !important;
}

.result-slot.maybe {
    background: #ef6c00 !important;
}

/* 結果ページのセルクリック可能 */
.result-slot:not(.disabled) {
    cursor: pointer;
    transition: transform 0.1s, opacity 0.1s;
}

    .result-slot:not(.disabled):active {
        transform: scale(0.95);
        opacity: 0.8;
    }

/* スロット内のカウント表示 */
.slot-count {
    font-size: 0.65rem;
    font-weight: bold;
    color: #FFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* URL表示 */
.url-section {
    margin-bottom: 16px;
}

.url-label {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 6px;
    color: #555;
}

.url-box {
    display: flex;
    gap: 8px;
}

.url-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.8rem;
    background: #f8f9fa;
    color: #333;
    min-width: 0;
}

.btn-copy {
    padding: 10px 16px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #43a047;
}

.btn-copy:active {
    transform: scale(0.95);
}

.btn-copy.copied {
    background: #666;
}

/* アクション */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
}

/* ===== 回答ページ専用 ===== */
.respond-page {
    min-height: 100vh;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

.respond-page .header {
    background: #1a73e8;
    color: white;
    padding: 8px 10px;
    flex-shrink: 0;
}

.respond-page .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.respond-page .header h1 {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: auto;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.respond-page .event-description {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: auto;
}

.respond-page .event-description:empty {
    display: none;
}

.respond-page .name-input input {
    width: 100px;
    padding: 6px 10px;
    border: none;
    border-radius: 15px;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.9);
    flex-shrink: 0;
}

.respond-page .name-input input:focus {
    outline: none;
    background: white;
}

.respond-fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== スクロール可能エリア ===== */
.respond-scroll-area {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}


/* ===== 固定フッター ===== */

.respond-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

    .respond-footer .footer-content {
        max-width: 600px;
        margin: 0 auto;
    }

    .respond-footer .legend {
        display: flex;
        justify-content: center;
        gap: 16px;
        margin-bottom: 10px;
        font-size: 0.75rem;
    }

    .respond-footer .legend-item {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .respond-footer .legend-color {
        width: 14px;
        height: 14px;
        border-radius: 3px;
    }

        .respond-footer .legend-color.ok {
            background: #81c784;
        }

        .respond-footer .legend-color.maybe {
            background: #ffb74d;
        }

    .respond-footer .btn-submit {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
        font-weight: bold;
        color: #fff;
        background: #1a73e8;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s;
    }

        .respond-footer .btn-submit:hover {
            background: #1557b0;
        }

        .respond-footer .btn-submit:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

/* カレンダー下部に余白（フッター分） */
.respond-page .calendar-section {
    padding-bottom: 140px;
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

    .top-header .site-logo {
        padding: 0;
        border-bottom: none;
        background: transparent;
    }

        .top-header .site-logo img {
            height: 24px;
            width: auto;
        }

.event-title-header {
    margin: 0;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    text-align: right;
    flex: 1;
    padding-left: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== イベント情報バー ===== */

.event-info-bar {
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

    .event-info-bar .event-description {
        margin: 0 0 8px 0;
        font-size: 0.8rem;
        color: #666;
    }

        .event-info-bar .event-description:empty {
            display: none;
            margin: 0;
        }

            .event-info-bar .event-description:empty + .name-input-group {
                margin-top: 0;
            }

    .event-info-bar .name-input-group {
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .event-info-bar .name-input-group input[type="text"] {
            flex: 1;
            padding: 10px 14px;
            font-size: 0.9rem;
            border: 2px solid #e0e0e0;
            border-radius: 25px;
            background: #fff;
            color: #333;
            outline: none;
            transition: all 0.2s;
        }

            .event-info-bar .name-input-group input[type="text"]:focus {
                border-color: #1a73e8;
                box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
            }

    .event-info-bar .btn-existing {
        width: 40px;
        height: 40px;
        border: 2px solid #e0e0e0;
        border-radius: 50%;
        background: #fff;
        color: #666;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

/* ===== イベントタイトルリンク ===== */

.event-title-link {
    flex: 1;
    text-decoration: none;
    padding-left: 12px;
    min-width: 0;
}

    .event-title-link:hover .event-title-header {
        color: #1a73e8;
    }

    .event-title-link:active .event-title-header {
        opacity: 0.7;
    }

.event-title-header {
    margin: 0;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

/* ===== Not Found ページ ===== */

.not-found-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    z-index: 200;
}

.not-found-content {
    text-align: center;
    padding: 20px;
}

    .not-found-content h2 {
        font-size: 1.3rem;
        color: #333;
        margin-bottom: 12px;
    }

    .not-found-content p {
        color: #666;
        margin-bottom: 20px;
    }

    .not-found-content .btn-primary {
        display: inline-block;
        padding: 12px 24px;
        background: #1a73e8;
        color: #fff;
        text-decoration: none;
        border-radius: 8px;
        font-weight: bold;
    }

/* ===== モード選択ボタン ===== */

.mode-selector {
    display: flex;
    gap: 8px;
}

.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

    .mode-btn:active {
        transform: scale(0.95);
    }

    .mode-btn.active {
        border-color: #1a73e8;
        background: #e8f0fe;
    }

    .mode-btn[data-mode="ok"].active {
        border-color: #34a853;
        background: #e6f4ea;
    }

    .mode-btn[data-mode="maybe"].active {
        border-color: #fbbc04;
        background: #fef7e0;
    }

    .mode-btn[data-mode="eraser"].active {
        border-color: #ea4335;
        background: #fce8e6;
    }

    .mode-btn[data-mode="scroll"].active {
        border-color: #1a73e8;
        background: #e8f0fe;
    }

.mode-icon {
    font-size: 1.3rem;
    line-height: 1;
    color: #333;
    display: block;
    text-align: center;
}

/* ボタン内のテキストをリセット */
.mode-btn * {
    color: inherit;
    margin: 0;
    padding: 0;
}

/* ===== コントロールバー ===== */

.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    gap: 8px;
}

/* ===== スマホ対応 ===== */

@media (max-width: 480px) {
    .mode-btn {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .mode-icon {
        font-size: 1.2rem;
    }

    .mode-selector {
        gap: 6px;
    }
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

    .nav-btn:active {
        background: #1557b0;
    }

    .nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        pointer-events: none;
    }

.week-label {
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 100px;
    text-align: center;
}

/* ===== カレンダー（既存） ===== */
.calendar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
}

/* ===== カレンダーヘッダー（曜日） ===== */

.calendar-header {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.header-cell {
    padding: 8px 4px;
    text-align: center;
    font-size: 0.75rem;
}

    .header-cell.time-col {
        font-size: 0.65rem;
        color: #888;
    }

    .header-cell .day-name {
        font-weight: bold;
        color: #333;
    }

    .header-cell .day-date {
        font-size: 1rem;
        font-weight: bold;
        color: #333;
        margin-top: 2px;
    }

    .header-cell.today {
        background: #e8f0fe;
    }

        .header-cell.today .day-date {
            color: #1a73e8;
        }

    .header-cell.weekend .day-name {
        color: #ea4335;
    }

    /* ===== 祝日スタイル ===== */

    .header-cell.holiday {
        color: #c62828;
    }

        .header-cell.holiday .day-name {
            color: #c62828;
        }

        .header-cell.holiday .day-date {
            color: #c62828;
        }

.calendar-header-row {
    display: grid;
    grid-template-columns: 38px repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    flex-shrink: 0;
}

.calendar-header-row .header-cell {
    padding: 6px 2px;
    text-align: center;
    font-weight: bold;
}

.calendar-header-row .header-cell.time-col {
    background: #f0f0f0;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-header-row .header-cell .day-name {
    font-size: 0.7rem;
    color: #666;
}

.calendar-header-row .header-cell .day-date {
    font-size: 0.8rem;
}

.calendar-header-row .header-cell.today {
    background: #e3f2fd;
}

.calendar-header-row .header-cell.today .day-date {
    background: #1a73e8;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.calendar-header-row .header-cell.weekend {
    background: #fff8e1;
}

.calendar-header-row .header-cell.weekend.today {
    background: #e3f2fd;
}

.calendar-body {
    background: #fff;
    padding-top: 2px;
}

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

/* ===== 時間ラベル（見やすい版） ===== */

.time-label {
    padding: 2px 4px 0 4px; 
    font-size: 0.65rem;
    color: #888;
    text-align: right;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    border-right: 1px solid #e0e0e0;
    background: #fafafa;
    min-height: 28px;
}

    /* 正時（:00） */
    .time-label:not(.half-hour) {
        border-top: 2px solid #ccc;
    }

        .time-label:not(.half-hour) span {
            color: #444;
            font-weight: 600;
        }

/*        .time-label:not(.half-hour)::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 3px;
            height: 100%;
            background: #1a73e8;
        }*/

    /* 30分 */
    .time-label.half-hour {
        border-top: 1px dashed #ddd;
    }

        .time-label.half-hour span {
            visibility: hidden;
        }

/*        .time-label.half-hour::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 3px;
            height: 100%;
            background: #bbdefb;
        }*/

/* スロット側 */

.time-slot {
    min-height: 28px;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    transition: background 0.1s;
}



    .time-slot:not(.half-hour-slot) {
        border-top: 2px solid #ccc;
    }

    .time-slot.half-hour-slot {
        border-top: 1px dashed #ddd;
    }

    .time-slot:hover {
        background: #f0f7ff;
    }

    .time-slot.ok {
        background: #81c784 !important;
    }

    .time-slot.maybe {
        background: #ffb74d !important;
    }

    .time-slot.preview-ok {
        background: #81c784 !important;
        opacity: 0.6;
        animation: pulse 0.8s ease-in-out infinite;
    }

    .time-slot.preview-maybe {
        background: #ffb74d !important;
        opacity: 0.6;
        animation: pulse 0.8s ease-in-out infinite;
    }

    .time-slot.preview-eraser {
        background: #ef5350 !important;
        opacity: 0.5;
        animation: pulse 0.8s ease-in-out infinite;
    }

    @keyframes pulse {
        0%, 100% { opacity: 0.5; }
        50% { opacity: 0.8; }
    }

    .time-slot.selection-start::before {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 6px;
        height: 6px;
        background: #1a73e8;
        border-radius: 50%;
        z-index: 1;
    }

    .time-slot.disabled {
        background: #f5f5f5;
        cursor: not-allowed;
        pointer-events: none;
    }

/*.time-slot.disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.03) 3px,
        rgba(0,0,0,0.03) 6px
    );
}*/

/* 30分区切りを点線に */
/*.time-slot.half-hour-slot {
    border-top: 1px dashed #d0d0d0;
}*/

/* 正時（:00）は実線 */
/*.time-slot:not(.half-hour-slot) {
    border-top: 1px solid #e0e0e0;
}*/

/* ===== フッター（既存） ===== */
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    gap: 10px;
}

.legend {
    display: flex;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.dot.ok {
    background: #81c784;
    border-color: #66bb6a;
}

.dot.maybe {
    background: #ffb74d;
    border-color: #ffa726;
}

.dot.empty {
    background: white;
}

.submit-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: bold;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.submit-btn:active {
    background: #1557b0;
}

/* ===== スクロールバー ===== */
.calendar-body::-webkit-scrollbar {
    width: 4px;
}

.calendar-body::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.calendar-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}


/* ===== 追記: 編集バナー ===== */
.editing-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff3e0;
    color: #e65100;
    font-size: 0.85rem;
    font-weight: bold;
}

.btn-cancel-edit {
    padding: 4px 10px;
    background: #e65100;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
}

.edit-mode-buttons {
    display: flex;
    gap: 10px;
}

.btn-cancel {
    flex: 1;
    padding: 14px;
    font-size: 1rem;
    font-weight: bold;
    color: #666;
    background: #f0f0f0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.edit-mode-hint {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin: 8px 0 0 0;
}

/* ===== 名前入力（ヘッダー内） ===== */

.name-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0px;
}

    .name-input-group input[type="text"] {
        flex: 1;
        padding: 12px 16px;
        font-size: 0.95rem;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 25px;
        background: rgba(255, 255, 255, 0.95);
        color: #333;
        outline: none;
        transition: all 0.2s;
        min-width: 0;
    }

        .name-input-group input[type="text"]:focus {
            border-color: #fff;
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
        }

        .name-input-group input[type="text"]::placeholder {
            color: #999;
        }

.btn-existing {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .btn-existing:hover {
        background: #fff;
        border-color: #fff;
        transform: scale(1.05);
    }

    .btn-existing:active {
        transform: scale(0.95);
    }



.responders-list {
    display: flex;
/*    flex-direction: column;*/
    gap: 8px;
}

.responder-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    margin: 2px;
}

    .responder-item:hover {
        background: #e8f0fe;
        border-color: #1a73e8;
    }

.responder-name {
    font-size: 0.95rem;
    color: #333;
}

.no-responders {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    padding: 20px 0;
}

/* ===== 追記: 結果ページ ===== */
.result-page {
    min-height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.result-page .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


.btn-secondary-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: white;
    color: #1a73e8;
    border: 2px solid #1a73e8;
    border-radius: 20px;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.btn-primary-small:active,
.btn-secondary-small:active {
    transform: scale(0.95);
}


/* ===== ドラム式ピッカー ===== */

.time-picker-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
}

.time-picker-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.picker-label {
    font-size: 0.7rem;
    color: #666;
    font-weight: bold;
}

.time-picker-separator {
    font-size: 1rem;
    font-weight: bold;
    color: #666;
    padding-top: 16px;
}

.drum-picker {
    position: relative;
    width: 130px; /* 幅を広げて折り返し防止 */
    height: 105px; /* 高さを小さく（35px × 3） */
    overflow: auto;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.drum-picker-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: transform 0.1s ease-out;
}

.drum-picker-item {
    height: 35px; /* アイテム高さを小さく */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem; /* フォント小さく */
    color: #999;
    transition: all 0.15s;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap; /* 折り返し防止 */
}

    .drum-picker-item.selected {
        font-size: 1.05rem; /* 選択中は少し大きく */
        font-weight: bold;
        color: #1a73e8;
    }

    .drum-picker-item.near {
        font-size: 0.9rem;
        color: #666;
    }

/* 上下のフェードオーバーレイ */
.drum-picker-overlay {
    position: absolute;
    left: 0;
    right: 0;
    height: 35px; /* アイテム高さに合わせる */
    pointer-events: none;
    z-index: 2;
}

    .drum-picker-overlay.top {
        top: 0;
        background: linear-gradient(to bottom, rgba(248,249,250,1) 0%, rgba(248,249,250,0) 100%);
    }

    .drum-picker-overlay.bottom {
        bottom: 0;
        background: linear-gradient(to top, rgba(248,249,250,1) 0%, rgba(248,249,250,0) 100%);
    }

/* 中央のハイライト */
.drum-picker-highlight {
    position: absolute;
    top: 35px; /* アイテム高さに合わせる */
    left: 4px;
    right: 4px;
    height: 35px; /* アイテム高さに合わせる */
    background: rgba(26, 115, 232, 0.1);
    border-radius: 6px;
    border: 2px solid rgba(26, 115, 232, 0.3);
    pointer-events: none;
    z-index: 1;
}

/* アクティブ状態 */
.drum-picker.active {
    border-color: #1a73e8;
}

    .drum-picker.active .drum-picker-highlight {
        background: rgba(26, 115, 232, 0.15);
        border-color: rgba(26, 115, 232, 0.5);
    }


/* ===== フッター ===== */

.site-footer {
    margin-top: auto;
    padding: 20px 16px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    flex-shrink: 0;
}

.footer-notice {
    font-size: 0.7rem;
    color: #888;
    line-height: 1.6;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.footer-link {
    background: none;
    border: none;
    color: #666;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 8px;
}

    .footer-link:hover {
        color: #1a73e8;
    }

    .footer-link:active {
        opacity: 0.7;
    }

.footer-separator {
    color: #ccc;
    font-size: 0.7rem;
}

.footer-copyright {
    font-size: 0.65rem;
    color: #aaa;
    margin: 0;
}





/* スクロールモード時のカレンダー */
.calendar-body.scroll-mode .time-slot {
    pointer-events: none;
}

.calendar-body.scroll-mode {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* スクロールモードのヒント表示 */
.scroll-mode-hint {
    display: none;
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 100;
    animation: fadeInOut 2s ease-in-out;
}

    .scroll-mode-hint.show {
        display: block;
    }

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* ===== モーダル共通 ===== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}


.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

    .modal-overlay .modal {
        background: #fff;
        border-radius: 16px;
        max-width: 400px;
        width: 90%;
        max-height: 80vh;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        position: relative;
        z-index: 1200;
    }

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 16px 16px 0 0;
}

    .modal-header h3 {
        margin: 0;
        font-size: 1rem;
        color: #333;
    }

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

    .modal-close:hover {
        background: #e0e0e0;
        color: #333;
    }

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-hint {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 16px 0;
}

/* ===== スロット詳細モーダル ===== */

.slot-detail-modal {
    max-width: 400px;
}

.slot-detail-section {
    margin-bottom: 16px;
}

    .slot-detail-section:last-child {
        margin-bottom: 0;
    }

.slot-detail-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #666;
    margin-bottom: 8px;
}

.slot-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.slot-detail-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
}

    .slot-detail-chip.ok {
        background: #e6f4ea;
        color: #1e7e34;
        border: 1px solid #a8dab5;
    }

    .slot-detail-chip.maybe {
        background: #fef7e0;
        color: #b8860b;
        border: 1px solid #fdd835;
    }

    .slot-detail-chip.no-answer {
        background: #f5f5f5;
        color: #888;
        border: 1px solid #e0e0e0;
    }

.slot-detail-empty {
    color: #aaa;
    font-size: 0.85rem;
    font-style: italic;
}

/* ===== 利用規約・プライバシーモーダル ===== */

.modal-large {
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

    .modal-large .modal-body {
        flex: 1;
        overflow-y: auto;
        font-size: 0.85rem;
        line-height: 1.7;
        color: #444;
    }

.modal-body h4 {
    margin: 20px 0 8px 0;
    font-size: 0.95rem;
    color: #333;
}

    .modal-body h4:first-child {
        margin-top: 0;
    }

.modal-body p {
    margin: 0 0 12px 0;
}

.modal-body ul {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 4px;
}


/* ===== サイトロゴ ===== */

.site-logo {
    display: block;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

    .site-logo a {
        display: inline-block;
        text-decoration: none;
    }

    .site-logo img {
        height: 28px;
        width: auto;
        display: block;
    }

/* スマホ */
@media (max-width: 480px) {
    .site-logo {
        padding: 10px 12px;
    }

        .site-logo img {
            height: 24px;
        }
}

/* ===== 日付範囲ピッカー ===== */

.date-range-picker {
    position: relative;
}

.date-range-input {
    padding-right: 40px !important;
    cursor: pointer;
    background: #fff !important;
}

.date-range-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

/* Flatpickr カスタマイズ */
.flatpickr-calendar {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
}

.flatpickr-day.inRange {
    background: #e8f0fe !important;
    border-color: #e8f0fe !important;
    box-shadow: -5px 0 0 #e8f0fe, 5px 0 0 #e8f0fe;
}

.flatpickr-day.today {
    border-color: #1a73e8;
}

.flatpickr-months .flatpickr-month {
    background: #1a73e8;
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: #fff;
    font-weight: bold;
}

.flatpickr-weekdays {
    background: #f8f9fa;
}

.flatpickr-weekday {
    color: #666;
    font-weight: bold;
}

/* ===== PC表示時の横幅制限 ===== */

@media (min-width: 501px) {
    /* 回答ページ */
    .respond-fixed-header,
    .respond-scroll-area,
    .respond-footer {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%);
    }

    .respond-footer {
        border-radius: 16px 16px 0 0;
    }

    /* 結果ページ */
    .result-fixed-header,
    .result-scroll-area,
    .result-footer {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%);
    }

    .result-footer {
        border-radius: 16px 16px 0 0;
    }

    /* 背景色を設定（コンテンツ外の部分） */
    body:has(.respond-fixed-header),
    body:has(.result-fixed-header) {
        background: #e8e8e8;
    }

    /* 影を追加してカード感を出す */
    .respond-fixed-header,
    .result-fixed-header {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .respond-scroll-area,
    .result-scroll-area {
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
    }

    .respond-footer,
    .result-footer {
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* ===== テキスト選択を無効化 ===== */

.calendar-header,
.calendar-grid,
.time-label,
.header-cell,
.time-slot,
.control-bar,
.mode-selector,
.week-nav,
.filter-bar,
.result-legend,
.legend {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 回答・結果ページ全体で無効化する場合 */
.respond-fixed-header,
.respond-scroll-area,
.respond-footer,
.result-fixed-header,
.result-scroll-area,
.result-footer {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 入力欄は選択可能にする */
input[type="text"],
input[type="date"],
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}


/* ===== 任意ラベル ===== */

.optional {
    font-size: 0.75rem;
    color: #888;
    font-weight: normal;
}

/* ===== 除外日ピッカー ===== */

.excluded-dates-picker {
    position: relative;
}

    .excluded-dates-picker input {
        padding-right: 40px !important;
        cursor: pointer;
        background: #fff !important;
    }

    .excluded-dates-picker .date-range-icon {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.2rem;
        pointer-events: none;
    }

/* ===== 除外日ネイティブ入力 ===== */

.excluded-dates-native {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.excluded-date-add {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .excluded-date-add input[type="date"] {
        flex: 1;
    }

.btn-add-date {
    padding: 12px 16px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

    .btn-add-date:hover {
        background: #1557b0;
    }

    .btn-add-date:active {
        background: #0d47a1;
    }

/* ===== 除外日リスト ===== */

.excluded-dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

    .excluded-dates-list:empty {
        display: none;
    }

.excluded-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 12px;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #c62828;
}

    .excluded-date-chip .remove-date {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        background: #ef9a9a;
        color: #fff;
        border: none;
        border-radius: 50%;
        font-size: 0.75rem;
        cursor: pointer;
        line-height: 1;
        padding: 0;
        transition: background 0.2s;
    }

        .excluded-date-chip .remove-date:hover {
            background: #e57373;
        }

/* ===== Flatpickr 除外日選択モード ===== */

.flatpickr-calendar.excluded-mode .flatpickr-day.selected {
    background: #ef5350 !important;
    border-color: #ef5350 !important;
}

    .flatpickr-calendar.excluded-mode .flatpickr-day.selected:hover {
        background: #e53935 !important;
    }

