.home-schedule-section,
.all-schedule-main {
    width: 100%;
    box-sizing: border-box;
}

.home-schedule-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 20px 0;
    scroll-margin-top: 24px;
}

.home-page .hero-header {
    margin-bottom: 9px;
}

.home-schedule-kicker {
    margin: 0 0 10px;
    color: #d9c16a;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 3px;
    line-height: 1.4;
    text-align: center;
}

.home-page .page-wrapper {
    width: 100%;
    min-height: 100svh;
}

.home-last-updated {
    width: 100%;
    margin-top: auto;
    padding: clamp(44px, 9vh, 110px) 20px 0;
    box-sizing: border-box;
    color: #6f6f6f;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-align: center;
}

.home-page .footer {
    margin-top: 0;
    padding: 9px 20px 18px;
}

.home-schedule-heading,
.all-schedule-controls {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.home-schedule-heading {
    margin-bottom: 14px;
}

.home-schedule-status-row {
    justify-content: flex-end;
}

.home-schedule-heading h2 {
    margin: 0;
    color: #f4f4f4;
    font-size: 17px;
    letter-spacing: 1px;
}

.home-schedule-heading small,
.schedule-last-updated {
    color: #676767;
    font-size: 11px;
}

.cross-schedule-panel {
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.27);
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(24, 24, 26, 0.98), rgba(9, 9, 11, 0.98));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 28px rgba(255, 215, 0, 0.035);
}

.cross-schedule-notice {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 165, 0, 0.28);
    border-radius: 12px;
    color: #ffc45c;
    background: rgba(255, 149, 0, 0.07);
    font-size: 12px;
    line-height: 1.55;
}

.cross-schedule-day + .cross-schedule-day {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cross-schedule-day-header {
    display: flex;
    min-height: 44px;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #e5e5e5;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.075), rgba(255, 255, 255, 0.018));
    border-bottom: 1px solid rgba(255, 215, 0, 0.08);
}

.cross-schedule-day-header strong {
    color: #ffd700;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.cross-schedule-day-header span {
    color: #8b8b8b;
    font-size: 12px;
    font-weight: 700;
}

.cross-schedule-day.overdue .cross-schedule-day-header {
    background: rgba(255, 136, 0, 0.08);
}

.cross-schedule-day.overdue .cross-schedule-day-header strong {
    color: #ffbd52;
}

.cross-schedule-match {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) minmax(120px, 0.65fr);
    min-height: 76px;
    padding: 15px 17px;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
    transition: background 150ms ease, border-color 150ms ease;
}

.cross-schedule-match:hover,
.cross-schedule-match:focus-visible {
    background: rgba(255, 215, 0, 0.045);
}

.cross-schedule-match:focus-visible {
    z-index: 1;
    outline: 2px solid #ffd700;
    outline-offset: -2px;
}

.cross-schedule-time {
    color: #ffd700;
    font-family: 'Rajdhani', 'Noto Sans TC', sans-serif;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.22);
}

.cross-schedule-matchup {
    min-width: 0;
}

.cross-schedule-players {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f3f3f3;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
}

.cross-schedule-player {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cross-schedule-player.winner {
    color: #ffd700;
}

.cross-schedule-player.loser {
    color: #777;
}

.cross-schedule-vs {
    flex: 0 0 auto;
    color: #575757;
    font-size: 11px;
    font-weight: 800;
}

.cross-schedule-meta {
    display: flex;
    min-width: 0;
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
    text-align: right;
}

.cross-schedule-tournament {
    max-width: 100%;
    overflow: hidden;
    color: #c3c3c3;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cross-schedule-category {
    display: inline-flex;
    max-width: 100%;
    min-height: 26px;
    padding: 4px 10px;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.34);
    border-radius: 999px;
    color: #ffe064;
    background: rgba(255, 215, 0, 0.09);
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Homepage match cards: each match day is a distinct card. */
.home-page .cross-schedule-panel:not(.cross-schedule-empty) {
    display: grid;
    overflow: visible;
    gap: 18px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.home-page .cross-schedule-day {
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.32);
    border-radius: 15px;
    background: linear-gradient(155deg, rgba(24, 24, 26, 0.98), rgba(9, 9, 11, 0.98));
    box-shadow: 0 13px 28px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.035);
}

.home-page .cross-schedule-day + .cross-schedule-day {
    border-top: 1px solid rgba(255, 215, 0, 0.32);
}

.home-page .cross-schedule-day-header {
    min-height: 38px;
    padding: 8px 13px 8px 11px;
    border-left: 4px solid #ffd700;
    border-bottom-color: rgba(255, 215, 0, 0.2);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.16), rgba(255, 215, 0, 0.025));
}

.home-page .cross-schedule-day-header strong {
    font-size: 15px;
}

.home-page .cross-schedule-day-header span {
    font-size: 10px;
}

.home-page .cross-schedule-match {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 62px;
    padding: 10px 13px;
    column-gap: 12px;
    row-gap: 4px;
}

.home-page .cross-schedule-time {
    grid-row: 1 / span 2;
    align-self: center;
}

.home-page .cross-schedule-matchup,
.home-page .cross-schedule-meta {
    grid-column: 2;
}

.home-page .cross-schedule-matchup,
.home-page .cross-schedule-players {
    width: 100%;
}

.home-page .cross-schedule-players {
    justify-content: center;
    column-gap: 30px;
}

.home-page .cross-schedule-player {
    flex: 1 1 0;
}

.home-page .cross-schedule-player:first-child {
    text-align: right;
}

.home-page .cross-schedule-player:last-child {
    text-align: left;
}

.home-page .cross-schedule-meta {
    display: grid;
    width: 100%;
    min-height: 20px;
    padding-top: 5px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    border-top: 1px solid rgba(255, 215, 0, 0.13);
}

.home-page .cross-schedule-meta::before {
    content: '\25C6';
    grid-column: 2;
    grid-row: 1;
    color: #ffd700;
    font-size: 6px;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.35));
}

.home-page .cross-schedule-tournament,
.home-page .cross-schedule-category {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: calc(11px + 2pt);
    font-weight: 900;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-page .cross-schedule-tournament {
    grid-column: 1;
    grid-row: 1;
    color: #eadb9b;
    text-align: right;
}

.home-page .cross-schedule-category {
    grid-column: 3;
    grid-row: 1;
    color: #ffd700;
    text-align: left;
    text-shadow: 0 0 9px rgba(255, 215, 0, 0.2);
}

.cross-schedule-score {
    color: #fff;
    font-family: 'Rajdhani', 'Noto Sans TC', sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.cross-schedule-empty,
.cross-schedule-error {
    padding: 34px 18px;
    color: #777;
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
}

.cross-schedule-error {
    color: #d4a2a2;
}

.cross-schedule-retry,
.all-schedule-link {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.cross-schedule-retry {
    margin-top: 12px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    background: rgba(255, 215, 0, 0.06);
}

.all-schedule-link {
    width: 100%;
    margin-top: 14px;
    padding: 11px 18px;
    box-sizing: border-box;
    color: #111;
    background: linear-gradient(135deg, #ffe963, #ffd700 58%, #caa300);
    text-decoration: none;
    box-shadow: 0 9px 26px rgba(255, 215, 0, 0.12);
}

.all-schedule-link:hover,
.all-schedule-link:focus-visible {
    filter: brightness(1.06);
}

.all-schedule-link:focus-visible,
.cross-schedule-retry:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.cross-schedule-skeleton {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.cross-schedule-skeleton span {
    display: block;
    height: 68px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.025) 30%, rgba(255, 255, 255, 0.07) 50%, rgba(255, 255, 255, 0.025) 70%);
    background-size: 220% 100%;
    animation: scheduleShimmer 1.3s linear infinite;
}

@keyframes scheduleShimmer {
    to { background-position-x: -220%; }
}

.all-schedule-page .page-wrapper {
    min-height: 100vh;
}

.all-schedule-page .hero-header {
    margin-bottom: 26px;
}

.all-schedule-wordmark {
    display: inline-block;
    margin: 16px auto 14px;
    color: #f5f5f5;
    font-family: 'Orbitron', 'Noto Sans TC', sans-serif;
    font-size: clamp(19px, 4vw, 28px);
    font-weight: 900;
    letter-spacing: 1.5px;
    text-decoration: none;
}

.all-schedule-wordmark span {
    color: #ffd700;
}

.all-schedule-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.all-schedule-controls {
    margin-bottom: 18px;
    align-items: center;
}

.schedule-tabs {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.schedule-tab {
    min-height: 44px;
    padding: 9px 20px;
    border: 0;
    color: #818181;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.schedule-tab + .schedule-tab {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.schedule-tab.active {
    color: #111;
    background: #ffd700;
}

.schedule-tab:focus-visible,
.schedule-filter select:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 3px;
}

.schedule-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #777;
    font-size: 12px;
    font-weight: 700;
}

.schedule-filter select {
    min-height: 44px;
    max-width: 260px;
    padding: 8px 34px 8px 12px;
    border: 1px solid rgba(255, 215, 0, 0.22);
    border-radius: 10px;
    color: #e5e5e5;
    background: #111;
    font-family: inherit;
    font-size: 13px;
}

.all-schedule-status {
    min-height: 20px;
    margin-bottom: 12px;
    color: #666;
    font-size: 11px;
    text-align: right;
}

@media (max-width: 1023px) {
    .home-page .page-wrapper {
        min-height: calc(100svh - var(--public-nav-mobile-height, 68px) - env(safe-area-inset-bottom));
        padding-bottom: 10px;
    }
}

@media (max-width: 680px) {
    .home-schedule-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .cross-schedule-match {
        grid-template-columns: 68px minmax(0, 1fr);
        padding: 16px 14px;
        gap: 12px;
    }

    .home-page .cross-schedule-match {
        grid-template-columns: 68px minmax(0, 1fr);
        min-height: 60px;
        padding: 9px 12px;
        column-gap: 12px;
        row-gap: 4px;
    }

    .cross-schedule-time {
        font-size: 22px;
    }

    .cross-schedule-players {
        font-size: 17px;
    }

    .cross-schedule-meta {
        grid-column: 2;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
    }

    .cross-schedule-tournament {
        font-size: 12px;
    }

    .home-page .cross-schedule-tournament,
    .home-page .cross-schedule-category {
        min-height: 0;
        padding: 0;
        font-size: calc(11px + 2pt);
    }

    .cross-schedule-score {
        font-size: 16px;
    }

    .all-schedule-page .page-wrapper {
        padding-top: max(24px, env(safe-area-inset-top));
    }

    .all-schedule-page .hero-header {
        margin-bottom: 20px;
    }

    .all-schedule-page .back-btn {
        position: static;
        display: inline-flex;
        margin-right: auto;
        transform: none;
    }

    .all-schedule-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .schedule-tabs,
    .schedule-filter,
    .schedule-filter select {
        width: 100%;
        max-width: none;
    }

    .schedule-tab {
        flex: 1;
    }

    .schedule-filter {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cross-schedule-match,
    .cross-schedule-skeleton span {
        transition: none;
        animation: none;
    }
}
