* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* スクロールバーを非表示 */
::-webkit-scrollbar {
    display: none;
}

html {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

:root {
    --bg-color: #1a1a1d;
    --panel-bg: #2d2d30;
    --text-main: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-red: #8a0000;
    --accent-red-light: #c53030;
    --accent-gold: #c5a059;
    --accent-silver: #a0a0a0;
    --border-color: #a0a0a0;
    --input-bg: #121212;
    --bg-hover: #3a3a3d;
    --gradient-maple: #c5a059; /* To match Syasta Planner's solid gold headers */
}

body {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    background-image: radial-gradient(circle at 50% 50%, #2a2a2e 0%, #1a1a1d 100%);
    background-attachment: fixed;
}

select option {
    background-color: var(--panel-bg);
    color: var(--text-main);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 1rem;
}

header h1 {
    font-size: 2rem;
    font-weight: normal;
    color: var(--accent-gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 5px;
    margin-bottom: 10px;
    display: inline-block;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Reset Info */
.reset-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.reset-item {
    background-color: var(--panel-bg);
    border: 1px solid var(--accent-silver);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Add inner dashed border to mimic Syasta Planner panel style */
.reset-item::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px dashed #444;
    border-radius: 6px;
    pointer-events: none;
}

.reset-item .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.countdown {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-gold);
}

.current-time {
    color: var(--text-main);
}

/* Settings Button */
.settings-btn {
    background: linear-gradient(to bottom, #444, #222);
    border: 1px solid var(--accent-silver);
    border-radius: 4px;
    padding: 0.5rem 0.8rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-silver);
}

.settings-btn:hover {
    background: linear-gradient(to bottom, var(--accent-red), #400);
    border-color: var(--accent-gold);
    color: white;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #222;
    border-radius: 8px;
    border: 1px solid var(--accent-gold);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(138, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--accent-gold);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    font-weight: normal;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

.modal-close:hover {
    color: var(--accent-red);
}

.modal-tabs {
    display: flex;
    padding: 0.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.modal-tab:hover {
    background: #444;
}

.modal-tab.active {
    background: var(--accent-red);
    color: white;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.modal-save-btn {
    background: var(--accent-red);
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1.25rem;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-family: serif;
    transition: all 0.2s ease;
}

.modal-save-btn:hover {
    background: var(--accent-red-light);
}

/* Settings Content */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--panel-bg);
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.settings-item input[type="text"] {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--accent-silver);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
}

.settings-item input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.settings-item-btn {
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.settings-item-btn:hover {
    background: var(--accent-red);
    color: white;
}

.settings-add-btn {
    background: rgba(88, 166, 255, 0.1);
    border: 1px dashed var(--accent-blue);
    color: var(--accent-blue);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.settings-add-btn:hover {
    background: rgba(88, 166, 255, 0.2);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-footer-left {
    display: flex;
    gap: 0.5rem;
}

.modal-action-btn {
    background: #111;
    border: 1px solid var(--accent-silver);
    color: var(--text-main);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.modal-action-btn:hover {
    background: linear-gradient(to bottom, var(--accent-red), #400);
    border-color: var(--accent-gold);
    color: white;
}

.modal-save-btn {
    background: #111;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
}

.modal-save-btn:hover {
    background: linear-gradient(to bottom, var(--accent-red), #400);
    color: white;
    border-color: var(--accent-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(138, 0, 0, 0.4);
}

.help-icon {
    cursor: help;
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    position: relative;
}

.help-icon:hover {
    opacity: 1;
}

.help-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    white-space: normal;
    width: 280px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.help-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.schedule-icon {
    position: relative;
    cursor: help;
    font-size: 0.9rem;
}

.schedule-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    border: 1px solid var(--accent-gold);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    margin-bottom: 0.3rem;
}

.schedule-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.settings-select {
    background: var(--input-bg);
    border: 1px solid var(--accent-silver);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    width: 100%;
}

.settings-select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.boss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

.boss-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--panel-bg);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.boss-check:hover {
    background: var(--bg-hover);
}

.boss-check input[type="checkbox"] {
    accent-color: var(--accent-green);
    width: 16px;
    height: 16px;
}

.boss-check label {
    cursor: pointer;
    font-size: 0.85rem;
}

/* Server Tabs */
.server-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background-color: var(--panel-bg);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--accent-silver);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.server-tab {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    background: linear-gradient(to bottom, #444, #222);
    color: var(--accent-silver);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: serif;
}

.server-tab:hover {
    background: linear-gradient(to bottom, var(--accent-red), #400);
    border-color: var(--accent-gold);
    color: white;
}

.server-tab.active {
    background: linear-gradient(to bottom, var(--accent-red), #600);
    color: white;
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(197, 48, 48, 0.5);
}

/* External Link Button */
.external-link-container {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.external-link-btn {
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ddd;
    width: auto;
    box-sizing: border-box;
}

.external-link-btn:hover {
    background: #333;
    transform: scale(1.05);
    border-color: var(--accent-gold);
    color: white;
}

.external-link-btn.gold-text {
    color: #fbbf24;
}

.external-link-btn.gold-text:hover {
    color: #fcd34d;
    border-color: #fbbf24;
}

/* Categories */
.category {
    background-color: var(--panel-bg);
    border: 1px solid var(--accent-silver);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Add inner dashed border to mimic Syasta Planner panel style */
.category::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px dashed #444;
    border-radius: 6px;
    pointer-events: none;
}

.category-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #555;
}

.category-header h2 {
    font-size: 1.25rem;
    font-weight: normal;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.section-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    vertical-align: middle;
    background: transparent;
}

/* Tracker Table */
.tracker-table {
    overflow-x: auto;
}

.tracker-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    /* 列幅を固定して全テーブルで揃える */
}

.tracker-table th,
.tracker-table td {
    padding: 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    height: 3.15rem;
    /* 全テーブルで統一 */
    vertical-align: middle;
}

/* 週間ボス固有スタイルは不要（全テーブル統一済み） */

.tracker-table th {
    background: var(--panel-bg);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.tracker-table th.item-col {
    text-align: left;
    min-width: 160px;
    width: 160px;
    /* 1cm追加して文字とチェックボックスの重なりを防止 */
}

.tracker-table th.char-col {
    min-width: 110px;
    /* 全テーブルで統一 */
    width: 110px;
}

.tracker-table .item-name {
    text-align: left;
    font-size: 0.9rem;
    white-space: nowrap;
}

.tracker-table .item-name.has-tooltip {
    cursor: help;
    position: relative;
    text-decoration: underline dotted var(--accent-blue);
    text-underline-offset: 3px;
}

.tracker-table .item-name.has-tooltip::before {
    content: '🔷';
    margin-right: 0.3rem;
    font-size: 0.75rem;
}

.tracker-table .item-name.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    bottom: 0;
    margin-left: 0.25rem;
    background: #111;
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    white-space: pre-line;
    z-index: 1000;
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    line-height: 1.6;
}

.tracker-table .item-name.has-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

.tracker-table .check-cell {
    padding: 0;
    height: 100%;
    /* 親の高さに合わせる */
    vertical-align: middle;
}

.check-cell-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

.check-cell-content .schedule-icon {
    position: absolute;
    left: calc(50% + 18px);
    /* チェックボックスの右隣に配置 */
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    cursor: help;
    line-height: 1;
}

.check-box {
    width: 28px;
    height: 28px;
    margin: 0;
    border: 2px solid var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-box:hover {
    border-color: var(--accent-gold);
    background: rgba(197, 160, 89, 0.1);
}

.check-box.checked {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

.check-box.checked::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.check-box.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--text-secondary);
}

.check-box.disabled:hover {
    border-color: var(--text-secondary);
    background: transparent;
}

.check-box.hidden {
    visibility: hidden;
}

/* Limit Reached Row (モンパEX 2キャラ完了時) */
.limit-reached {
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(248, 81, 73, 0.15) 10px,
            rgba(248, 81, 73, 0.15) 20px);
}

.limit-reached td {
    background: transparent !important;
}

.limit-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 0.5rem;
}

.limit-badge.badge-progress {
    background: var(--accent-orange);
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.check-all-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--accent-silver);
    background: linear-gradient(to bottom, #444, #222);
    color: var(--accent-silver);
    font-size: 0.8rem;
    font-weight: normal;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: serif;
}

.check-all-btn:hover {
    background: linear-gradient(to bottom, var(--accent-red), #400);
    border-color: var(--accent-gold);
    color: white;
}

.check-all-btn.header-btn {
    display: block;
    margin: 0 auto 0.3rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
}

.char-name {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--accent-gold);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #444;
}

.reset-btn {
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--accent-silver);
    background: linear-gradient(to bottom, #444, #222);
    color: var(--accent-silver);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: serif;
    margin: 0 0.5rem;
}

.reset-btn:hover {
    background: linear-gradient(to bottom, var(--accent-red), #400);
    border-color: var(--accent-gold);
    color: white;
}

.reset-btn.danger {
    color: #f87171;
    border-color: #f87171;
}

.reset-btn.danger:hover {
    background: linear-gradient(to bottom, #c53030, #600);
    color: white;
    border-color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .reset-info {
        flex-direction: column;
        gap: 1rem;
    }

    .server-tabs {
        flex-direction: column;
    }

    .tracker-table th.char-col {
        min-width: 60px;
        font-size: 0.75rem;
    }

    .check-box {
        width: 24px;
        height: 24px;
    }

    footer {
        flex-direction: column;
    }

    .reset-btn {
        width: 100%;
    }
}

/* スケジュールエリア */
.schedule-container {
    padding: 1rem;
}

/* カスタム時間ピッカー */
.time-picker-wrapper {
    position: relative;
}

.time-picker-display {
    cursor: pointer;
    user-select: none;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.time-picker-display::after {
    content: '▼';
    font-size: 0.6rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.time-picker-display.selected {
    color: var(--text-primary);
}

.time-picker-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 120px;
    max-height: 250px;
    background: var(--panel-bg);
    border: 1px solid var(--accent-silver);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 100;
    overflow: hidden;
    margin-top: 4px;
}

.time-picker-dropdown.open {
    display: block;
}

.time-picker-scroll {
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-blue) transparent;
}

.time-picker-scroll::-webkit-scrollbar {
    width: 6px;
}

.time-picker-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.time-picker-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 3px;
}

.time-picker-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
    height: 36px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.time-picker-item:hover {
    background: var(--bg-hover);
    color: white;
}

.time-picker-item.active {
    background: rgba(197, 160, 89, 0.15);
    color: var(--accent-gold);
    font-weight: 600;
}

.schedule-add {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.schedule-input {
    background: var(--input-bg);
    border: 1px solid var(--accent-silver);
    border-radius: 8px;
    padding: 0.35rem 0.7rem;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
}

.schedule-input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

/* 日付入力 - クリック領域を広げる */
#schedule-date {
    min-width: 150px;
    cursor: pointer;
    position: relative;
}

#schedule-date::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(1);
    opacity: 0.8;
}

.schedule-input[type="datetime-local"] {
    min-width: 200px;
}

#schedule-boss {
    min-width: 150px;
}

#schedule-memo {
    flex: 1;
    min-width: 200px;
}

.schedule-btn {
    background: linear-gradient(to bottom, #444, #222);
    border: 1px solid var(--accent-silver);
    border-radius: 8px;
    padding: 0.35rem 1.2rem;
    color: var(--accent-silver);
    font-weight: bold;
    cursor: pointer;
    font-family: serif;
    transition: all 0.2s ease;
}

.schedule-btn:hover {
    background: linear-gradient(to bottom, var(--accent-red), #400);
    border-color: var(--accent-gold);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(138, 0, 0, 0.4);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.schedule-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel-bg);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-silver);
    transition: transform 0.2s ease;
}

.schedule-period-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.schedule-period-badge.today {
    background-color: var(--accent-gold);
    color: #111;
}

.schedule-period-badge.this-week {
    background-color: #58a6ff;
    color: #111;
}

.schedule-period-badge.next-week {
    background-color: var(--accent-red);
    color: white;
}

.schedule-item.today {
    border-left-color: var(--accent-gold);
}

.schedule-item.this-week {
    border-left-color: #58a6ff;
}

.schedule-item.next-week {
    border-left-color: var(--accent-red);
}

.schedule-item:hover {
    transform: translateX(4px);
}

.schedule-item.past {
    opacity: 0.5;
    border-left-color: var(--text-secondary) !important;
}

.schedule-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: center;
}

.schedule-boss-name {
    font-weight: bold;
    color: var(--accent-gold);
    font-size: 1rem;
}

.schedule-date {
    color: var(--text-main);
    font-size: 0.9rem;
}

.schedule-char-name {
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: bold;
}

.schedule-memo {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.schedule-delete-btn {
    background: #111;
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-delete-btn:hover {
    background: var(--accent-red);
    color: white;
}

/* 日時編集ボタン */
.schedule-edit-btn {
    background: #111;
    border: 2px solid var(--accent-silver);
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.schedule-edit-btn:hover {
    opacity: 1;
    background: var(--accent-gold);
    color: #111;
    border-color: var(--accent-gold);
}

/* インライン編集フォーム */
.schedule-edit-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.schedule-edit-form .schedule-input {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
}

.schedule-edit-save-btn {
    background: rgba(74, 222, 128, 0.1);
    border: 2px solid #4ade80;
    color: #4ade80;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-edit-save-btn:hover {
    background: #4ade80;
    color: #111;
}

.schedule-edit-cancel-btn {
    background: rgba(248, 113, 113, 0.1);
    border: 2px solid #f87171;
    color: #f87171;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-edit-cancel-btn:hover {
    background: #f87171;
    color: white;
}

.schedule-actions {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.schedule-repeat-btn {
    background: #111;
    border: 2px solid #58a6ff;
    color: #58a6ff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-repeat-btn:hover {
    background: #58a6ff;
    color: #111;
}

.schedule-copy-btn {
    background: #111;
    border: 2px solid #22c55e;
    color: #22c55e;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.schedule-copy-btn:hover {
    background: #22c55e;
    color: #111;
}

@media (max-width: 600px) {
    .schedule-add {
        flex-direction: column;
    }

    .schedule-input,
    #schedule-memo {
        width: 100%;
    }

    .schedule-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .schedule-delete-btn {
        align-self: flex-end;
    }
}

/* ========== 免責事項モーダル ========== */
#disclaimer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.disclaimer-modal {
    background: var(--panel-bg);
    border: 1px solid var(--accent-silver);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.disclaimer-modal h2 {
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.disclaimer-modal p {
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.disclaimer-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.disclaimer-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.disclaimer-btn.agree {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.disclaimer-btn.agree:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.disclaimer-btn.decline {
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
}

.disclaimer-btn.decline:hover {
    background: var(--accent-red);
    color: white;
}

/* Removed original .external-link-container as it was moved up to keep definitions ordered nicely, but since we are modifying lines, let's just properly delete it */

/* オリジン選択ボックス */
.schedule-origin-select {
    min-width: 130px;
}

/* スケジュールアイテム内のオリジンバッジ */
.schedule-origin-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(88, 166, 255, 0.3);
}

/* 一括コピーボタン */
.schedule-copy-all-btn {
    background: rgba(63, 185, 80, 0.15);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, 0.3);
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.schedule-copy-all-btn:hover {
    background: rgba(63, 185, 80, 0.25);
    border-color: #3fb950;
}

.schedule-copy-all-btn.copied {
    background: rgba(63, 185, 80, 0.3);
    border-color: #3fb950;
}

/* スケジュールヘッダー周り */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.schedule-header h2 {
    margin: 0;
}

.schedule-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.schedule-notify-btn {
    background: #111;
    color: var(--text-main);
    border: 1px solid var(--accent-silver);
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.schedule-notify-btn:hover {
    background: linear-gradient(to bottom, var(--accent-red), #400);
    border-color: var(--accent-gold);
    color: white;
}