:root {
    --bg: #07070a;
    --ink: #10090b;
    --glass: rgba(19, 16, 22, 0.74);
    --glass-strong: rgba(30, 20, 24, 0.9);
    --gold: #d9ad4f;
    --gold-bright: #ffe09a;
    --red: #d22935;
    --red-deep: #85111b;
    --text: #fff4dc;
    --muted: #b9a98d;
    --line: rgba(217, 173, 79, 0.34);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.activity-page {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, "Microsoft JhengHei", sans-serif;
    color: var(--text);
    background:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
        radial-gradient(circle at 14% 8%, rgba(210, 41, 53, .24), transparent 28%),
        radial-gradient(circle at 86% 2%, rgba(217, 173, 79, .18), transparent 30%),
        linear-gradient(135deg, #050508, #170b10 52%, #060609);
    background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

body.activity-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 120px), radial-gradient(circle at center, transparent 35%, rgba(0,0,0,.52));
    z-index: -1;
}

.activity-shell {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 48px;
}

.removed-section {
    display: none !important;
}

.site-footer {
    margin-top: 34px;
    padding: 22px 0 4px;
    border-top: 1px solid rgba(217, 173, 79, .18);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-align: center;
}

.site-brandbar {
    min-height: 52px;
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    padding: 0 8px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.site-brand img {
    width: 58px;
    height: 46px;
    flex: 0 0 auto;
    display: block;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, .48));
}

.site-brand strong {
    display: block;
}

.site-brand strong {
    color: var(--gold-bright);
    font-size: 16px;
}

h1, h2, h3, p {
    margin-top: 0;
    letter-spacing: 0;
}

.error-page { display: grid; place-items: center; padding: 20px; }
.error-card { width: min(560px, 100%); padding: 42px; text-align: center; border: 1px solid var(--line); background: var(--glass-strong); box-shadow: var(--shadow); }
.error-card img { width: 110px; height: 92px; object-fit: contain; mix-blend-mode: screen; }
.error-card > strong { display: block; color: var(--gold-bright); font-size: clamp(64px, 14vw, 120px); line-height: 1; }
.error-card h1 { margin: 14px 0 8px; }
.error-card > p:not(.section-kicker) { color: var(--muted); }

.eyebrow,
.section-kicker {
    margin: 0 0 8px;
    color: var(--gold-bright);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.hero-banner {
    position: relative;
    min-height: clamp(360px, 48vw, 560px);
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(217, 173, 79, .5);
    background: linear-gradient(135deg, #21161b, #5e111c 50%, #10090c);
    box-shadow: var(--shadow);
}

.promo-banner {
    width: 100%;
    min-height: 0;
    aspect-ratio: var(--promo-aspect-ratio, 16 / 9);
    margin-top: 18px;
    border-color: rgba(217, 173, 79, .34);
    background: linear-gradient(135deg, rgba(28, 10, 14, .72), rgba(0, 0, 0, .9));
    box-shadow: none;
}

.promo-banner::after {
    display: none;
}

.promo-banner .banner-slide {
    align-items: center;
    padding: 0;
    background:
        var(--slide-image, linear-gradient(135deg, #21161b, #5e111c 50%, #10090c));
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.promo-banner .banner-content {
    max-width: 560px;
}

.promo-banner h1 {
    font-size: clamp(30px, 4vw, 54px);
}

.hero-banner.hidden,
.category-dock.hidden {
    display: none;
}

.hero-banner::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 224, 154, .2);
    pointer-events: none;
    z-index: 4;
}

.banner-stage {
    position: absolute;
    inset: 0;
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: end;
    padding: clamp(24px, 5vw, 56px);
    background:
        linear-gradient(110deg, rgba(8, 7, 10, .94), rgba(92, 11, 20, .58) 54%, rgba(217, 173, 79, .12)),
        var(--slide-image, linear-gradient(135deg, #21161b, #5e111c 50%, #10090c));
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.025);
    pointer-events: none;
    transition: opacity .55s ease, transform 1.2s ease, visibility .55s ease;
}

.banner-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
    z-index: 1;
}

.banner-slide.clickable {
    cursor: pointer;
}

.banner-content {
    position: relative;
    max-width: 760px;
    z-index: 2;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 46px;
    height: 54px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,224,154,.38);
    background: rgba(5,5,8,.58);
    color: var(--gold-bright);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
    transition: background .18s ease, border-color .18s ease;
}

.banner-arrow:hover {
    border-color: var(--gold-bright);
    background: rgba(108,18,27,.78);
}

.banner-arrow.previous { left: 18px; }
.banner-arrow.next { right: 18px; }

.banner-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 6;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.banner-dots button {
    width: 28px;
    height: 4px;
    padding: 0;
    border: 0;
    background: rgba(255,255,255,.34);
    cursor: pointer;
    transition: width .18s ease, background .18s ease;
}

.banner-dots button.active {
    width: 46px;
    background: var(--gold-bright);
    box-shadow: 0 0 12px rgba(217,173,79,.6);
}

.hero-banner h1 {
    margin-bottom: 12px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    text-shadow: 0 10px 34px rgba(0, 0, 0, .6);
}

.hero-banner p:not(.eyebrow) {
    max-width: 620px;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.65;
}

.gold-button,
.red-button,
.back-link {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 0;
    font-weight: 900;
    text-decoration: none;
}

.gold-button {
    border: 1px solid var(--gold-bright);
    background: linear-gradient(180deg, #ffe7a8, #bf8422);
    color: #1c0c07;
    box-shadow: 0 10px 28px rgba(217, 173, 79, .24);
}

.red-button {
    width: 100%;
    border: 1px solid #ff6770;
    background: linear-gradient(180deg, var(--red), var(--red-deep));
    color: #fff;
    box-shadow: 0 12px 30px rgba(210, 41, 53, .3);
}

.back-link {
    width: max-content;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .28);
    color: var(--gold-bright);
}

.category-dock {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 30px;
}

.category-dock a,
.category-dock button {
    min-height: 88px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(0,0,0,.28));
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 14px 36px rgba(0,0,0,.24);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.category-dock a:hover,
.category-dock button:hover,
.category-dock button.active {
    transform: translateY(-3px);
    border-color: var(--gold-bright);
    background: linear-gradient(180deg, rgba(217,173,79,.18), rgba(0,0,0,.36));
}

.category-dock span {
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
}

.category-dock strong {
    font-size: 20px;
}

.activity-section {
    margin-top: 34px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-head h2 {
    margin-bottom: 0;
    font-size: clamp(24px, 3vw, 34px);
}

.section-head > span,
.room-meta,
.card-meta {
    color: var(--muted);
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.activity-grid-featured {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.activity-card {
    position: relative;
    min-height: 292px;
    overflow: hidden;
    display: flex;
    align-items: end;
    padding: 18px;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.82)),
        var(--cover, linear-gradient(135deg, #22161d, #68131e 58%, #12090d));
    background-size: cover;
    background-position: center;
    box-shadow: 0 18px 44px rgba(0,0,0,.32);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.activity-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(217,173,79,.12));
    opacity: 0;
    transition: opacity .2s ease;
}

.activity-card:hover {
    transform: translateY(-6px) scale(1.018);
    border-color: var(--gold-bright);
    box-shadow: 0 0 0 1px rgba(217,173,79,.24), 0 22px 60px rgba(0,0,0,.48), 0 0 30px rgba(217,173,79,.2);
}

.activity-card:hover::before {
    opacity: 1;
}

.activity-card > div {
    position: relative;
    z-index: 1;
}

.activity-card h3 {
    margin-bottom: 8px;
    font-size: 22px;
}

.card-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(210, 41, 53, .94);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.activity-grid-featured .card-badge {
    box-shadow: 0 0 0 0 rgba(210, 41, 53, .55);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    70% { box-shadow: 0 0 0 9px rgba(210, 41, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(210, 41, 53, 0); }
}

.card-enter {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-top: 14px;
    padding: 0 12px;
    border: 1px solid var(--line);
    color: var(--gold-bright);
    font-weight: 900;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease;
}

.activity-card:hover .card-enter {
    opacity: 1;
    transform: translateY(0);
}

.empty-card {
    padding: 24px;
    border: 1px dashed var(--line);
    background: rgba(0,0,0,.2);
    color: var(--muted);
}

.room-header {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding: 28px;
    margin-bottom: 18px;
    border: 1px solid rgba(217, 173, 79, .48);
    background:
        linear-gradient(110deg, rgba(8,7,10,.92), rgba(83,10,17,.56), rgba(217,173,79,.1)),
        var(--room-banner, linear-gradient(135deg, #21161b, #4a1018));
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.room-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.room-type {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid rgba(217, 173, 79, .22);
    background: rgba(0, 0, 0, .2);
    color: var(--gold-bright);
    font-size: 12px;
    font-weight: 900;
}

.room-heading {
    min-width: 0;
}

.room-header h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.05;
}

.room-match-info {
    display: inline-grid;
    gap: 5px;
    margin: 0 0 14px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 224, 154, .34);
    background: rgba(0, 0, 0, .34);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .24);
}

.room-match-info.hidden {
    display: none;
}

.room-match-info strong {
    color: var(--gold-bright);
    font-size: clamp(18px, 2.4vw, 30px);
    line-height: 1.15;
}

.room-match-info span {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.room-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.room-meta span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.3);
}

#roomStatus[data-status="live"] {
    border-color: rgba(255, 103, 112, .42);
    background: rgba(210, 41, 53, .2);
    color: #ffd8da;
}

.room-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 398px;
    gap: 18px;
    align-items: start;
}

.room-main,
.room-side {
    display: grid;
    gap: 14px;
}

.module {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--glass), rgba(8,8,12,.95));
    box-shadow: 0 18px 46px rgba(0,0,0,.34);
    backdrop-filter: blur(10px);
    padding: 16px;
}

.module.hidden {
    display: none;
}

.module-title h2,
.chat-head h2 {
    margin-bottom: 0;
    font-size: 20px;
}

.player-module {
    padding: 12px;
}

.today-matches-module {
    overflow: hidden;
}

.home-matches-section {
    margin-top: 18px;
}

.home-matches-list {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.today-matches-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.today-matches-head > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.today-matches-list {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(217, 173, 79, .28);
    background: rgba(0, 0, 0, .26);
}

.today-match-card,
.today-match-empty {
    min-height: 66px;
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    border-top: 1px solid rgba(217, 173, 79, .16);
    background: linear-gradient(90deg, rgba(255,255,255,.025), rgba(0,0,0,.18));
    color: var(--text);
    text-decoration: none;
}

.today-match-card {
    grid-template-columns: 82px minmax(0, 1fr) 42px minmax(0, 1fr) 118px;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.today-match-card .match-timebox,
.today-match-card .today-match-foot {
    grid-column: 1;
    grid-row: 1;
}

.today-match-card .team.home {
    grid-column: 2;
    grid-row: 1;
}

.today-match-card .match-versus,
.today-match-card .today-match-teams > b {
    grid-column: 3;
    grid-row: 1;
}

.today-match-card .team.away {
    grid-column: 4;
    grid-row: 1;
}

.today-match-card .today-match-action {
    grid-column: 5;
    grid-row: 1;
}

.today-match-card:not(.disabled):hover {
    transform: none;
    background: linear-gradient(90deg, rgba(217,173,79,.1), rgba(105,18,28,.24));
}

.today-match-card.featured {
    box-shadow: inset 3px 0 0 rgba(255, 224, 154, .72);
}

.today-match-card.disabled {
    opacity: .84;
    cursor: default;
}

.today-match-row.is-hidden,
.today-match-empty.is-hidden {
    display: none;
}

.today-match-empty {
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.today-matches-list > .today-match-empty {
    margin-top: 0;
}

.match-date-tabs {
    display: flex;
    gap: 6px;
    padding: 0 0 10px;
    border: 0;
    background: transparent;
    overflow-x: auto;
    scrollbar-width: thin;
    white-space: nowrap;
}

.match-date-tabs button {
    flex: 0 0 auto;
    min-width: 74px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(217, 173, 79, .28);
    background: rgba(0,0,0,.34);
    color: var(--muted);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
    white-space: nowrap;
}

.today-matches-list > .match-date-tabs {
    margin: -1px -1px 0;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(217, 173, 79, .18);
    background: var(--bg);
}

.match-row-list {
    display: grid;
    gap: 0;
    min-height: 360px;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-color: rgba(217, 173, 79, .6) rgba(255,255,255,.04);
    scrollbar-width: thin;
}

.match-row-list::-webkit-scrollbar {
    width: 6px;
}

.match-row-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,.04);
}

.match-row-list::-webkit-scrollbar-thumb {
    background: rgba(217, 173, 79, .58);
}

.match-date-tabs button.active {
    border-color: var(--gold-bright);
    color: var(--gold-bright);
    background: linear-gradient(180deg, rgba(217,173,79,.2), rgba(0,0,0,.35));
}

.match-timebox {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.match-timebox strong {
    color: var(--muted);
    font-size: 15px;
}

.match-timebox span {
    color: var(--gold-bright);
    font-size: 12px;
}

.today-match-meta,
.today-match-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.today-match-card .today-match-meta {
    display: none;
}

.today-match-card .today-match-teams {
    display: contents;
}

.today-match-card .today-match-foot {
    display: grid;
    justify-content: start;
    gap: 2px;
}

.today-match-meta strong {
    color: var(--gold-bright);
}

.match-versus,
.today-match-teams b {
    color: var(--gold-bright);
    font-size: 12px;
    text-align: center;
}

.today-match-card .team,
.today-match-teams .team {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 7px;
    text-align: left;
    font-weight: 900;
}

.today-match-card .team img,
.today-match-teams img {
    width: 38px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,.38));
}

.today-match-card .team span,
.today-match-teams span {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.today-match-foot em {
    color: var(--gold-bright);
    font-style: normal;
    font-weight: 900;
}

.today-match-card.disabled .today-match-foot em {
    color: var(--muted);
}

.today-match-action {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--gold-bright);
    font-size: 12px;
    font-weight: 900;
    text-align: right;
}

.today-match-action span {
    min-width: 108px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(255, 224, 154, .72);
    color: var(--gold-bright);
    background: rgba(0,0,0,.2);
}

.today-match-card.disabled .today-match-action span {
    display: none;
}

.today-match-card.preparing .today-match-action span {
    display: inline-flex;
    border-color: rgba(255, 224, 154, .34);
    color: rgba(255, 224, 154, .72);
    background: rgba(255, 224, 154, .08);
}

.home-match-showcase {
    display: grid;
    gap: 12px;
    overflow: visible;
    border: 0;
    background: transparent;
    padding: 0;
    grid-template-columns: 1fr;
}

.home-match-showcase .match-date-tabs {
    width: 100%;
    max-width: 100%;
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-bottom: 2px;
    margin-bottom: 0;
}

.home-match-showcase.today-matches-list > .match-date-tabs {
    margin: 0;
    border-bottom: 0;
    background: transparent;
    padding-bottom: 8px;
}

.home-match-showcase .match-row-list {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
}

.home-match-showcase .today-match-card,
.home-match-showcase .today-match-empty {
    min-height: 86px;
    grid-template-columns: 70px minmax(0, 1fr) 22px minmax(0, 1fr) 110px;
    grid-template-rows: 1fr;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(217, 173, 79, .28);
    background:
        radial-gradient(circle at 50% 0%, rgba(217,173,79,.12), transparent 42%),
        linear-gradient(145deg, rgba(255,255,255,.04), rgba(0,0,0,.32));
}

.home-match-showcase .today-match-empty {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    text-align: center;
    white-space: nowrap;
    min-height: 92px;
}

.home-match-showcase .today-match-card[hidden] {
    display: none;
}

.home-match-showcase .today-match-row.is-hidden,
.home-match-showcase .today-match-empty.is-hidden {
    display: none;
}

.home-match-showcase .match-timebox,
.home-match-showcase .today-match-foot {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    justify-content: start;
    align-items: center;
}

.home-match-showcase .team.home {
    grid-column: 2;
    grid-row: 1;
}

.home-match-showcase .match-versus,
.home-match-showcase .today-match-teams > b {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
}

.home-match-showcase .team.away {
    grid-column: 4;
    grid-row: 1;
}

.home-match-showcase .today-match-card .team {
    grid-template-columns: 42px minmax(0, 1fr);
    justify-items: start;
    text-align: left;
}

.home-match-showcase .today-match-card .team img {
    width: 38px;
    height: 28px;
}

.home-match-showcase .today-match-action {
    grid-column: 5;
    grid-row: 1;
    justify-content: flex-end;
}

.home-match-showcase .today-match-action span {
    min-width: 104px;
    background: linear-gradient(180deg, rgba(255,224,154,.16), rgba(0,0,0,.22));
}

.home-matches-section .home-match-showcase .today-match-card {
    min-height: 68px;
    grid-template-columns: 74px minmax(160px, 1fr) 34px minmax(160px, 1fr) 112px;
    grid-template-rows: 1fr;
    align-items: center;
    column-gap: 14px;
    row-gap: 0;
    padding: 11px 16px;
    background:
        linear-gradient(90deg, rgba(105, 18, 28, .24), rgba(217, 173, 79, .08) 48%, rgba(0, 0, 0, .28));
}

.home-matches-section .home-match-showcase .today-match-card .match-timebox {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
}

.home-matches-section .home-match-showcase .today-match-card .team.home {
    grid-column: 2;
    grid-row: 1;
}

.home-matches-section .home-match-showcase .today-match-card .match-versus {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: center;
}

.home-matches-section .home-match-showcase .today-match-card .team.away {
    grid-column: 4;
    grid-row: 1;
}

.home-matches-section .home-match-showcase .today-match-card .today-match-action {
    grid-column: 5;
    grid-row: 1;
    align-self: center;
    justify-self: end;
}

.home-matches-section .home-match-showcase .today-match-card .team {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 8px;
    min-width: 0;
    text-align: left;
}

.home-matches-section .home-match-showcase .today-match-card .team img {
    width: 34px;
    height: 24px;
}

.home-matches-section .home-match-showcase .today-match-card .team span {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.today-match-empty {
    min-height: 92px;
    place-items: center;
    color: var(--muted);
    border-style: dashed;
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(217,173,79,.64);
    background: #000;
}

video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.sound-prompt {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 230px;
    padding: 11px 16px;
    border: 1px solid rgba(255, 221, 142, .78);
    color: #fff6df;
    background: rgba(12, 9, 12, .88);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .46), 0 0 22px rgba(217, 173, 79, .14);
    backdrop-filter: blur(10px);
    transform: translateX(-50%);
    cursor: pointer;
}

.sound-prompt.hidden {
    display: none;
}

.sound-prompt svg {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    fill: var(--gold-bright);
}

.sound-prompt span {
    display: grid;
    gap: 2px;
    text-align: left;
}

.sound-prompt strong {
    font-size: 14px;
}

.sound-prompt small {
    color: var(--muted);
    font-size: 11px;
}

.sound-prompt:hover {
    border-color: var(--gold-bright);
    background: rgba(35, 20, 22, .94);
}

.pip-button {
    position: absolute;
    z-index: 4;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 221, 142, .62);
    color: #fff6df;
    background: rgba(12, 9, 12, .8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .36);
    backdrop-filter: blur(9px);
    cursor: pointer;
}

.pip-button.hidden {
    display: none;
}

.pip-button:hover,
.pip-button.active {
    border-color: var(--gold-bright);
    background: rgba(61, 33, 27, .92);
}

.pip-button svg {
    width: 20px;
    height: 20px;
    fill: var(--gold-bright);
}

.pip-button span {
    font-weight: 800;
    font-size: 12px;
}

.standby {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(10,8,12,.9), rgba(95,12,20,.76)),
        repeating-linear-gradient(90deg, rgba(217,173,79,.05) 0 1px, transparent 1px 18px);
}

.standby.hidden {
    display: none;
}

.standby h2 {
    margin-bottom: 0;
    font-size: clamp(24px, 3vw, 40px);
}

.standby p,
.text-module p {
    color: var(--muted);
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: 0;
}

.pulse-ring {
    width: 76px;
    height: 76px;
    border: 2px solid var(--gold-bright);
    border-radius: 50%;
    box-shadow: 0 0 0 12px rgba(217,173,79,.12), 0 0 34px rgba(217,173,79,.3);
}

.score-title {
    color: var(--gold-bright);
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 14px;
}

.teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.teams div:not(.versus) {
    min-height: 116px;
    display: grid;
    align-content: center;
    justify-items: center;
    border: 1px solid rgba(217,173,79,.22);
    background: rgba(0,0,0,.24);
}

.teams span {
    max-width: 100%;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.teams strong {
    font-size: 48px;
    line-height: 1;
}

.versus,
.match-clock {
    color: var(--gold-bright);
    font-weight: 900;
    text-align: center;
}

.match-clock {
    margin-top: 10px;
    border: 1px solid var(--line);
    padding: 10px;
    background: rgba(0,0,0,.22);
}

.bet-module {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.chat-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.chat-head span {
    color: var(--muted);
    font-size: 13px;
}

.chat-card.player-aligned {
    height: var(--player-height);
    min-height: 0;
    display: flex;
    flex-direction: column;
    order: -1;
}

.promotion-card {
    padding: 12px;
    overflow: hidden;
    order: -1;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

.promotion-card:not(.has-image) {
    min-height: 220px;
}

.promotion-link {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, .28);
}

.promotion-empty {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: .08em;
    background: linear-gradient(135deg, rgba(60, 16, 25, .72), rgba(12, 11, 15, .96));
}

.promotion-empty[hidden],
.promotion-link img[hidden] {
    display: none;
}

.promotion-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #08070a;
}

.promotion-card.has-image .promotion-link,
.promotion-card.has-image .promotion-link img {
    height: auto;
}

.chat-card.player-aligned .chat-list {
    height: auto;
    min-height: 0;
    flex: 1;
}

.chat-list {
    height: 320px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.26);
}

.chat-message {
    padding: 9px 0;
    border-bottom: 1px solid rgba(217,173,79,.13);
}

.chat-message strong {
    color: var(--gold-bright);
}

.chat-message time {
    color: var(--muted);
    margin-left: 8px;
    font-size: 12px;
}

.chat-message p {
    margin: 5px 0 0;
    line-height: 1.5;
}

.chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 8px;
    margin-top: 10px;
}

.chat-form input {
    min-height: 44px;
    min-width: 0;
    border: 1px solid var(--line);
    background: #0b0a0e;
    color: var(--text);
    padding: 0 12px;
    font: inherit;
}

.chat-form button {
    border: 1px solid #ff6770;
    background: var(--red);
    color: white;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 1080px) {
    .room-layout {
        grid-template-columns: 1fr;
    }

    .chat-card.player-aligned {
        height: auto;
        order: initial;
    }

    .promotion-card {
        min-height: 220px;
    }

    .promotion-card.has-image {
        min-height: 0;
    }

}

@media (max-width: 820px) {
    .today-matches-list {
        display: grid;
        overflow: hidden;
        padding-bottom: 0;
    }

    .today-match-card,
    .today-match-empty {
        min-width: 0;
    }

    .today-match-card {
        grid-template-columns: 56px minmax(0, 1fr) 16px minmax(0, 1fr) 78px;
        grid-template-rows: auto auto;
        column-gap: 6px;
        row-gap: 8px;
        padding: 12px 9px;
    }

    .today-match-card .match-timebox {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .today-match-card .team.home {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .today-match-card .match-versus {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .today-match-card .team.away {
        grid-column: 4;
        grid-row: 1 / span 2;
    }

    .today-match-action {
        justify-content: flex-end;
        min-height: 28px;
    }

    .today-match-card .today-match-action {
        grid-column: 5;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .today-match-action span {
        min-width: 70px;
        min-height: 28px;
        padding: 0 6px;
        font-size: 10px;
        white-space: nowrap;
    }

    .today-match-card .team {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 5px;
        font-size: 13px;
        line-height: 1.2;
    }

    .today-match-card .team img {
        width: 30px;
        height: 22px;
    }

    .today-match-card .team span {
        display: -webkit-box;
        white-space: normal;
        overflow: hidden;
        text-overflow: clip;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: keep-all;
    }

    .match-timebox {
        font-size: 11px;
    }

    .match-timebox strong {
        font-size: 15px;
    }

    .match-timebox span {
        font-size: 11px;
    }

    .match-versus {
        font-size: 11px;
    }

    .match-date-tabs {
        overflow-x: auto;
    }

    .match-date-tabs button {
        min-width: 78px;
        padding: 0 10px;
    }

    .home-match-showcase .match-row-list {
        display: grid;
        gap: 8px;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        padding-bottom: 0;
    }

    .home-match-showcase .today-match-card,
    .home-match-showcase .today-match-empty {
        flex-basis: auto;
        min-height: 72px;
        grid-template-columns: 54px minmax(0, 1fr) 14px minmax(0, 1fr) 70px;
        grid-template-rows: auto auto;
        padding: 11px 8px;
        gap: 8px;
    }

    .home-match-showcase .match-timebox,
    .home-match-showcase .today-match-foot {
        grid-column: 1;
        grid-row: 1 / span 2;
        display: grid;
        justify-content: start;
        align-items: center;
    }

    .home-match-showcase .team.home {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .home-match-showcase .match-versus {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .home-match-showcase .team.away {
        grid-column: 4;
        grid-row: 1 / span 2;
    }

    .home-match-showcase .today-match-action {
        grid-column: 5;
        grid-row: 1 / span 2;
    }

    .today-match-action span {
        min-width: 70px;
        min-height: 34px;
        padding: 0 7px;
        font-size: 11px;
        letter-spacing: 0;
    }

    .home-match-showcase .today-match-card .team {
        grid-template-columns: 32px minmax(0, 1fr);
        justify-items: start;
        text-align: left;
    }

    .home-match-showcase .today-match-card .team img {
        width: 30px;
        height: 22px;
    }

    .home-matches-section .home-match-showcase .today-match-card {
        min-height: 70px;
        grid-template-columns: 50px minmax(0, 1fr) 12px minmax(0, 1fr) 58px;
        grid-template-rows: auto auto;
        column-gap: 5px;
        row-gap: 8px;
        padding: 10px 7px;
    }

    .home-matches-section .home-match-showcase .today-match-card .match-timebox {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .home-matches-section .home-match-showcase .today-match-card .team.home {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .home-matches-section .home-match-showcase .today-match-card .match-versus {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .home-matches-section .home-match-showcase .today-match-card .team.away {
        grid-column: 4;
        grid-row: 1 / span 2;
    }

    .home-matches-section .home-match-showcase .today-match-card .today-match-action {
        grid-column: 5;
        grid-row: 1 / span 2;
    }

    .home-matches-section .home-match-showcase .today-match-card .team {
        grid-template-columns: 27px minmax(0, 1fr);
        gap: 4px;
        font-size: 12px;
    }

    .home-matches-section .home-match-showcase .today-match-card .team img {
        width: 25px;
        height: 18px;
    }

    .home-matches-section .home-match-showcase .match-timebox strong {
        font-size: 14px;
    }

    .home-matches-section .home-match-showcase .match-timebox span,
    .home-matches-section .home-match-showcase .match-versus {
        font-size: 10px;
    }

    .home-matches-section .home-match-showcase .today-match-action span {
        min-width: 56px;
        min-height: 30px;
        padding: 0 4px;
        font-size: 10px;
    }

    .promo-banner {
        min-height: 0;
        aspect-ratio: var(--promo-aspect-ratio, 1 / 1);
        margin-top: 14px;
        border-color: rgba(217, 173, 79, .42);
        background: linear-gradient(135deg, rgba(28, 10, 14, .72), rgba(0, 0, 0, .9));
    }

    .promo-banner::after {
        display: none;
    }

    .promo-banner .banner-slide {
        align-items: center;
        padding: 0;
        background:
            var(--slide-image, linear-gradient(135deg, #21161b, #5e111c 50%, #10090c));
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    .promo-banner .banner-content {
        max-width: 82%;
    }

    .promo-banner .eyebrow {
        font-size: 11px;
    }

    .promo-banner h1 {
        max-width: 100%;
        font-size: clamp(24px, 8vw, 34px);
    }

    .promo-banner p:not(.eyebrow) {
        display: none;
    }

    .promo-banner .gold-button {
        min-height: 38px;
        padding: 0 18px;
    }

    .pip-button {
        top: 8px;
        right: 8px;
        min-width: 38px;
        min-height: 38px;
        justify-content: center;
        padding: 0;
    }

    .pip-button span {
        display: none;
    }

    .sound-prompt {
        bottom: 48px;
        min-width: 0;
        width: max-content;
        max-width: calc(100% - 24px);
        padding: 9px 12px;
    }

    .sound-prompt small {
        display: none;
    }

    .category-dock {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .room-header {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

@media (max-width: 680px) {
    body.activity-page {
        background-size: 30px 30px, 30px 30px, auto, auto, auto;
    }

    .activity-shell {
        width: 100%;
        padding: 8px 10px 34px;
    }

    .site-brandbar {
        min-height: 54px;
        margin-bottom: 8px;
        padding: 0 8px;
    }

    .site-brand img {
        width: 54px;
        height: 46px;
    }

    .site-brand strong {
        font-size: 14px;
    }

    .hero-banner {
        min-height: 286px;
        box-shadow: 0 16px 42px rgba(0, 0, 0, .42);
    }

    .hero-banner::after {
        inset: 9px;
    }

    .banner-slide {
        padding: 18px 20px 52px;
        background-position: center;
    }

    .hero-banner h1 {
        max-width: 92%;
        margin-bottom: 8px;
        font-size: clamp(30px, 9vw, 38px);
        line-height: 1.08;
    }

    .hero-banner p:not(.eyebrow) {
        margin-bottom: 14px;
        font-size: 15px;
        line-height: 1.45;
    }

    .hero-banner .gold-button {
        min-height: 42px;
        padding: 0 18px;
    }

    .banner-arrow {
        top: auto;
        bottom: 12px;
        width: 38px;
        height: 38px;
        font-size: 25px;
        transform: none;
    }

    .banner-arrow.previous { left: auto; right: 56px; }
    .banner-arrow.next { right: 12px; }

    .banner-dots {
        left: 20px;
        bottom: 16px;
        transform: none;
    }

    .banner-dots button { width: 18px; }
    .banner-dots button.active { width: 30px; }

    .category-dock {
        display: flex;
        gap: 8px;
        margin: 12px -10px 24px;
        padding: 0 10px 4px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .category-dock::-webkit-scrollbar {
        display: none;
    }

    .category-dock a,
    .category-dock button {
        flex: 0 0 112px;
        min-height: 66px;
        padding: 11px 13px;
        scroll-snap-align: start;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
    }

    .category-dock strong {
        font-size: 17px;
    }

    .activity-section {
        margin-top: 26px;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 12px;
    }

    .section-head h2 {
        font-size: 25px;
    }

    .section-head > span {
        font-size: 14px;
    }

    .activity-grid,
    .activity-grid-featured {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .activity-card {
        min-height: 220px;
        padding: 15px;
    }

    .activity-card h3 {
        font-size: 20px;
    }

    .card-enter {
        opacity: 1;
        transform: none;
    }

    .room-header {
        min-height: 0;
        padding: 12px 14px 14px;
        margin-bottom: 10px;
        background-position: center;
    }

    .room-toolbar {
        width: 100%;
        gap: 7px;
        margin-bottom: 7px;
    }

    .room-header h1 {
        margin: 0 0 9px;
        font-size: 29px;
    }

    .back-link {
        min-height: 32px;
        padding: 0 10px;
        border-color: rgba(217, 173, 79, .24);
        font-size: 13px;
    }

    .room-type {
        min-height: 32px;
        padding: 0 10px;
        font-size: 11px;
    }

    .room-meta {
        gap: 6px;
    }

    .room-meta span {
        min-height: 30px;
        padding: 0 9px;
        font-size: 13px;
    }

    #roomViewer::before {
        content: "•";
        margin-right: 6px;
        color: var(--gold);
    }

    .room-layout,
    .room-main,
    .room-side {
        gap: 10px;
    }

    .module {
        padding: 12px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
    }

    .player-module {
        padding: 8px;
    }

    .standby {
        gap: 7px;
        padding: 14px;
    }

    .standby h2 {
        font-size: 23px;
    }

    .standby p {
        font-size: 14px;
        line-height: 1.45;
    }

    .pulse-ring {
        width: 52px;
        height: 52px;
        box-shadow: 0 0 0 8px rgba(217,173,79,.12), 0 0 24px rgba(217,173,79,.3);
    }

    .chat-list {
        height: 240px;
    }

    .chat-form {
        grid-template-columns: minmax(0, 1fr) 68px;
    }

    .teams {
        grid-template-columns: 1fr;
    }

    .versus {
        min-height: 30px;
        display: grid;
        place-items: center;
    }
}
