/* 全てのテーブルとその中身をブラウザ標準に戻す */
table,
table * {
    all: revert !important;
}


#memo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#memo {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 20px;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 1rem 1.5rem;
    /* グラスモーフィズム */
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ==========================================================
       フィルター (日付、アーティスト選択ボタンなど)
       ========================================================== */
.filter {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    max-width: 450px;
    margin: 0 auto 1.5em;
    justify-content: center;
    align-items: center;
}

/* モダンなInput類 */
.filter input[type="date"],
.filter button {
    padding: 10px 16px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    color-scheme: dark;
    /* Datepickerをダークに */
    transition: all 0.3s ease;
}

.filter button {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.2));
    cursor: pointer;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.filter button:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.artist-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.artist-list label {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.9em;
    cursor: pointer;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: background 0.2s;
}

.artist-list label:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================
       タブ (USEN / Daiso等切り替え)
       ========================================================== */
#tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-button {
    padding: 10px 24px;
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
    background: rgba(0, 229, 255, 0.15);
    color: #fff;
    font-weight: bold;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4), inset 0 0 5px rgba(0, 229, 255, 0.2);
    transform: scale(1.05);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* ==========================================================
       スケジュールテーブル (Glassmorphism調)
       ========================================================== */
div#schedule {
    margin: 0 auto;
    overflow-x: auto;
    /* SPでの横スクロール担保 */
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-light);
}

table#schedule-table {
    width: 100% !important;
    border-collapse: collapse !important;
    text-align: left !important;
}

table#schedule-table th,
table#schedule-table td {
    padding: 12px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    font-size: clamp(12px, 2vw, 15px) !important;
    color: var(--text-primary);
    white-space: nowrap !important;
    background: transparent !important;
}

#main table#schedule-table tbody tr,
table#schedule-table tbody tr,
table#schedule-table tbody tr:nth-of-type(odd),
table#schedule-table tbody tr:nth-of-type(even) {
    background-color: transparent !important;
}

table#schedule-table th {
    background: rgba(15, 23, 42, 0.8) !important;
    /* color: var(--accent-cyan) !important; */
    font-weight: 600 !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

table#schedule-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03) !important;
}

.schedule-caption {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    background: linear-gradient(135deg, rgba(254, 93, 233, 0.5), rgba(0, 229, 255, 0.5)) !important;
    color: #fff !important;
    padding: 16px !important;
    border-bottom: 1px solid var(--glass-border) !important;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5) !important;
}

/* 装飾ハイライト用 クラス */
.schedule-item.highlight {
    /* 現在再生中の曲 */
    background-color: darkorange !important;
    color: #0f1220 !important;
    border-left: 4px solid var(--accent-pink);
    font-weight: bold !important;
}

.schedule-item.matsuya {
    /* 松屋時間帯 */
    border-left: 4px solid #facc15 !important;
}

/* ==========================================================
       Cardレイアウト (モバイル等幅が狭い場合)
       ========================================================== */
.card-container {
    display: none;
    padding: 10px 0;
}

#card-caption {
    margin-bottom: 15px;
    border-radius: 12px;
}

.card-container .schedule-item {
    padding: 15px;
    margin-bottom: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-primary);
}

.card-container .schedule-item div:first-child {
    /* 時刻 */
    font-weight: bold;
    color: var(--accent-cyan);
}

.card-container .schedule-item div:nth-child(2) {
    /* 曲名 */
    font-size: 1.1rem;
    font-weight: 600;
}

.card-container .schedule-item div:nth-child(3) {
    /* アーティスト */
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card-container .schedule-item.highlight {
    background: rgba(254, 93, 233, 0.15) !important;
    border-color: var(--accent-pink);
}

/* ==========================================================
       ローディング画面
       ========================================================== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 18, 32, 0.85);
    /* ダーク半透明 */
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: all;
}

#loading-overlay .loading-message {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* レスポンシブ用の補正 */
@media screen and (max-width: 600px) {
    .filter {
        width: 100%;
    }

    .filter input[type="date"],
    .filter button {
        width: 100%;
        text-align: center;
    }

    #memo {
        font-size: 0.85rem;
        padding: 1rem;
    }
}