:root {
    --bg: #eef2f3;
    --surface: #ffffff;
    --ink: #13201b;
    --muted: #64736d;
    --line: #dbe3df;
    --green: #116b4f;
    --green-dark: #0b4735;
    --gold: #d8a531;
    --red: #b73a3a;
    --shadow: 0 16px 40px rgba(15, 40, 31, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body.has-ad-popup {
    padding-bottom: 148px;
}

a {
    color: inherit;
    text-decoration: none;
}

.nav,
.lang-row,
.footer {
    width: min(1500px, calc(100% - 28px));
    margin: 0 auto;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.lang-row {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
}

.label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.lang-list {
    display: flex;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.lang-list .active {
    color: var(--green);
    font-weight: 800;
}

.sports-strip {
    width: min(1500px, calc(100% - 28px));
    margin: 0 auto;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    color: var(--muted);
    font-size: 13px;
}

.sports-strip a,
.sports-strip span {
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    background: #f7faf8;
}

.sports-strip .active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    font-weight: 800;
}

.nav {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-shell {
    width: min(1500px, calc(100% - 24px));
    margin: 14px auto 0;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr) 270px;
    gap: 12px;
    align-items: start;
}

.left-rail,
.right-rail,
.content {
    min-width: 0;
}

.content {
    display: grid;
    gap: 14px;
}

.rail-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 18px rgba(20, 44, 35, 0.04);
}

.rail-box + .rail-box {
    margin-top: 12px;
}

.rail-box h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.rail-box a,
.rail-box span {
    display: block;
    padding: 5px 0;
    color: var(--muted);
    font-size: 13px;
}

.rail-box a:hover,
.rail-action {
    color: var(--green);
    font-weight: 800;
}

.rail-box a.active {
    margin: 2px -6px;
    padding: 6px;
    border-radius: 6px;
    background: #e8f4ef;
    color: var(--green);
    font-weight: 900;
}

.muted {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.mini-list {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 13px;
}

.brand {
    font-weight: 800;
    color: var(--green-dark);
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
}

.nav-links a {
    white-space: nowrap;
}

.mobile-bottom-nav {
    display: none;
}

.nav-links a:hover,
.section-head a:hover,
.back-link:hover {
    color: var(--green);
}

.ad-popup {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: 100%;
    animation: adSlideUp .24s ease-out;
}

.ad-popup-card {
    min-height: 112px;
    overflow: hidden;
    background: var(--green-dark);
    color: #fff;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 60px rgba(4, 20, 14, 0.26);
}

.ad-popup-card img {
    width: 100%;
    height: 112px;
    object-fit: cover;
}

.ad-popup-close {
    position: absolute;
    top: -14px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--green-dark);
    box-shadow: 0 8px 22px rgba(4, 20, 14, 0.2);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
}

.ad-popup-close:hover {
    color: var(--red);
}

.ad-copy {
    padding: 20px;
    display: grid;
    gap: 4px;
}

.ad-copy strong {
    font-size: 22px;
}

.ad-copy small {
    color: rgba(255, 255, 255, 0.82);
}

@keyframes adSlideUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    min-height: 360px;
    margin-top: 28px;
    padding: 48px;
    color: #fff;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(7, 38, 28, 0.9), rgba(7, 38, 28, 0.56)),
        url("https://images.unsplash.com/photo-1431324155629-1a6deb1dec8d?auto=format&fit=crop&w=1800&q=80") center/cover;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
}

.score-hero {
    margin-top: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(7, 38, 28, 0.92), rgba(10, 75, 55, 0.82)),
        url("https://images.unsplash.com/photo-1522778119026-d647f0596c20?auto=format&fit=crop&w=1800&q=80") center/cover;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.score-hero.compact {
    margin-bottom: 18px;
}

.score-hero h1 {
    margin: 5px 0 6px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
}

.score-hero p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
}

.score-summary {
    min-width: 132px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
}

.score-summary strong {
    display: block;
    font-size: 38px;
    line-height: 1;
}

.score-summary span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
}

.score-summary em {
    display: inline-flex;
    width: max-content;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(231, 68, 50, 0.16);
    color: #ffd8d2;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.hero h1,
.page-title h1,
.admin-title h1,
.article-detail h1 {
    margin: 8px 0 12px;
    line-height: 1.16;
}

.hero h1 {
    max-width: 680px;
    font-size: clamp(32px, 5vw, 56px);
}

.hero p {
    max-width: 660px;
}

.eyebrow {
    margin: 0;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #f1c85d;
}

.hero-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-btn,
.secondary-btn,
button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
}

.primary-btn {
    background: var(--green);
    color: #fff;
}

.secondary-btn {
    background: #edf3f0;
    color: var(--green-dark);
}

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

.section-head h2 {
    margin: 4px 0 0;
}

.score-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.score-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(20, 44, 35, 0.06);
    overflow: hidden;
}

.panel-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-head h2 {
    margin: 3px 0 0;
    font-size: 20px;
}

.panel-head a {
    color: var(--green);
    font-size: 13px;
    font-weight: 800;
}

.match-list {
    display: grid;
}

.league-group {
    border-bottom: 1px solid var(--line);
}

.league-group:last-child {
    border-bottom: 0;
}

.league-head {
    min-height: 42px;
    padding: 10px 16px;
    background: #f2f6f4;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.league-head strong {
    color: var(--green-dark);
}

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

.match-row {
    min-height: 94px;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 176px;
    gap: 14px;
    align-items: center;
    padding: 13px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    color: inherit;
}

.match-row:last-child {
    border-bottom: 0;
}

.match-row:hover {
    background: #f8fbf9;
}

.match-row.is-live {
    background: #fff8f5;
    border-left: 3px solid #e74432;
}

.match-row.is-live:hover {
    background: #fff3ef;
}

.match-time {
    display: grid;
    gap: 3px;
    color: var(--muted);
}

.match-time strong {
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
}

.match-time span {
    font-size: 12px;
}

.match-main {
    min-width: 0;
}

.match-teams-row {
    margin-top: 6px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    font-size: 16px;
    font-weight: 800;
}

.match-teams-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-teams-row span:last-child {
    text-align: right;
}

.match-teams-row b {
    border-radius: 6px;
    padding: 5px 6px;
    background: #edf3f0;
    text-align: center;
}

.match-subline {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.match-market {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.match-market span {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f7faf8;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.match-detail-hero {
    margin-top: 22px;
    padding: 24px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(7, 38, 28, 0.95), rgba(12, 82, 62, 0.82)),
        url("https://images.unsplash.com/photo-1579952363873-27f3bade9f55?auto=format&fit=crop&w=1800&q=80") center/cover;
    color: #fff;
}

.match-detail-hero .back-link {
    color: rgba(255, 255, 255, 0.82);
}

.detail-scoreboard {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
}

.detail-team {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.detail-team img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    padding: 10px;
}

.detail-team strong {
    font-size: clamp(20px, 3vw, 32px);
    line-height: 1.2;
}

.detail-score {
    min-height: 140px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    padding: 16px;
    text-align: center;
}

.detail-score span,
.detail-score small {
    color: rgba(255, 255, 255, 0.78);
}

.detail-score b {
    font-size: 44px;
    line-height: 1;
}

.match-detail-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) 300px;
    gap: 16px;
    align-items: start;
}

.detail-list {
    margin: 0;
    display: grid;
}

.detail-list div {
    min-height: 46px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-list dd {
    margin: 0;
    text-align: right;
}

.detail-actions {
    padding: 16px;
    display: grid;
    gap: 10px;
}

.detail-note {
    margin: 0;
    padding: 0 16px 16px;
    color: var(--muted);
    font-size: 13px;
}

.match-detail-empty {
    margin-top: 24px;
    padding: 28px;
}

.compact-article-list {
    display: grid;
}

.compact-article {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 4px;
}

.compact-article:last-child {
    border-bottom: 0;
}

.compact-article span {
    color: var(--muted);
    font-size: 12px;
}

.compact-article strong {
    line-height: 1.4;
}

.match-grid,
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.match-card,
.article-card,
.login-card,
.admin-form,
.table-wrap,
.stats-grid a {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(20, 44, 35, 0.06);
}

.match-card,
.article-card {
    padding: 18px;
}

.match-top,
.meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.match-top strong {
    color: var(--green);
}

.status-pill {
    border-radius: 999px;
    padding: 3px 8px;
    background: #edf3f0;
    color: var(--green);
    white-space: nowrap;
}

.status-pill.is-live,
.live-dot {
    background: #e74432;
    color: #fff;
}

.status-pill.is-stopped {
    background: #f2e5dc;
    color: #9a4a2f;
}

.live-block {
    border-bottom: 1px solid var(--line);
}

.live-panel {
    margin-bottom: 16px;
}

.live-dot {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.teams {
    min-height: 76px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 800;
}

.teams span:last-child {
    text-align: right;
}

.teams b {
    min-width: 48px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #edf3f0;
    text-align: center;
}

.match-info {
    margin: 0;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.match-info div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.match-info dt {
    font-weight: 700;
}

.match-info dd {
    margin: 0;
    text-align: right;
}

.match-card small {
    display: block;
    color: var(--muted);
}

.article-card h3 {
    min-height: 58px;
    margin: 8px 0;
    font-size: 20px;
    line-height: 1.35;
}

.article-card h3 a:hover {
    color: var(--green);
}

.page-title {
    padding: 38px 0 18px;
}

.filter-bar {
    padding: 14px 16px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}

select,
input,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 11px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

.filter-bar select {
    width: 220px;
}

.article-detail {
    width: min(860px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.article-detail .summary {
    color: var(--green-dark);
    font-weight: 700;
}

.article-body {
    color: #20312b;
    font-size: 16px;
    line-height: 1.95;
}

.article-body p {
    margin: 0 0 18px;
}

.trend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.trend-card,
.news-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(20, 44, 35, 0.06);
}

.trend-card {
    padding: 18px;
}

.trend-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.trend-card-head strong {
    min-width: 64px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #e8f4ef;
    color: var(--green);
    text-align: center;
}

.trend-card h2,
.news-item h2 {
    margin: 8px 0 12px;
    font-size: 22px;
    line-height: 1.3;
}

.trend-meta {
    margin: 0 0 12px;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.trend-meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.trend-meta dt {
    font-weight: 800;
}

.trend-meta dd {
    margin: 0;
    text-align: right;
}

.trend-detail {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.news-list {
    display: grid;
    gap: 14px;
}

.news-item {
    padding: 18px;
}

.news-item h2 a:hover,
.text-link:hover {
    color: var(--green);
}

.text-link {
    display: inline-flex;
    margin-top: 8px;
    color: var(--green);
    font-weight: 800;
}

.article-body p {
    margin: 18px 0;
}

.back-link {
    color: var(--muted);
    font-size: 14px;
}

.flash-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 14px auto 0;
}

.flash {
    padding: 10px 14px;
    border-radius: 8px;
    background: #eaf5ef;
    color: var(--green-dark);
}

.flash.error {
    background: #ffecec;
    color: var(--red);
}

.empty {
    grid-column: 1 / -1;
    color: var(--muted);
}

.footer {
    margin-top: 48px;
    padding: 26px 0 34px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(420px, 100%);
    padding: 30px;
    display: grid;
    gap: 14px;
}

.admin-body {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
    background: #f3f7f5;
}

.admin-sidebar {
    background: var(--green-dark);
    color: #fff;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-sidebar .brand {
    color: #fff;
    margin-bottom: 6px;
    display: grid;
    gap: 4px;
}

.admin-sidebar .brand small {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    font-weight: 600;
}

.admin-nav-group {
    display: grid;
    gap: 6px;
}

.admin-nav-group strong {
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    letter-spacing: 0;
}

.admin-sidebar a:not(.brand) {
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
}

.admin-sidebar a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.admin-title {
    margin-bottom: 20px;
}

.admin-hero-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(20, 44, 35, 0.06);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stats-grid a {
    padding: 24px;
    display: grid;
    gap: 4px;
}

.stats-grid strong {
    font-size: 42px;
    color: var(--green);
}

.automation-grid,
.admin-workbench {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.admin-workbench {
    grid-template-columns: 1.4fr 1fr;
}

.automation-card,
.admin-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(20, 44, 35, 0.06);
}

.automation-card {
    padding: 20px;
    display: grid;
    gap: 12px;
}

.automation-card span {
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.automation-card h2 {
    margin: 0;
    font-size: 22px;
}

.automation-card p {
    margin: 0;
    color: var(--muted);
}

.automation-card.featured {
    background: var(--green-dark);
    color: #fff;
}

.automation-card.featured span,
.automation-card.featured p {
    color: rgba(255, 255, 255, 0.76);
}

.admin-panel {
    overflow: hidden;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-stats a {
    padding: 18px;
    border-right: 1px solid var(--line);
    display: grid;
    gap: 4px;
}

.quick-stats a:last-child {
    border-right: 0;
}

.quick-stats strong {
    color: var(--green);
    font-size: 30px;
}

.quick-stats span,
.workflow-list span,
.admin-feed small {
    color: var(--muted);
    font-size: 13px;
}

.workflow-list,
.admin-feed {
    display: grid;
}

.workflow-list a,
.admin-feed a,
.admin-feed span {
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 4px;
}

.workflow-list a {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
}

.workflow-list strong {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e8f4ef;
    color: var(--green);
    display: grid;
    place-items: center;
}

.admin-feed.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-feed em {
    width: max-content;
    border-radius: 999px;
    padding: 3px 8px;
    background: #e8f4ef;
    color: var(--green);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.automation-settings {
    display: grid;
}

.switch-row {
    padding: 16px 18px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.switch-row span {
    display: grid;
    gap: 4px;
}

.switch-row small,
.automation-status dd {
    color: var(--muted);
    font-weight: 500;
}

.switch-row input {
    width: 46px;
    min-height: 26px;
    appearance: none;
    border-radius: 999px;
    background: #d8e2dd;
    border: 0;
    padding: 3px;
    cursor: pointer;
}

.switch-row input::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.18s ease;
}

.switch-row input:checked {
    background: var(--green);
}

.switch-row input:checked::before {
    transform: translateX(20px);
}

.compact-actions,
.inline-run-form {
    padding: 16px 18px;
}

.automation-status {
    margin: 0;
    display: grid;
}

.automation-status div {
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.automation-status dt {
    font-weight: 900;
}

.automation-status dd {
    margin: 0;
    text-align: right;
}

.admin-form {
    padding: 20px;
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.narrow-form {
    max-width: 560px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.check-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-line input {
    width: 18px;
    min-height: 18px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-actions a,
.table-actions button {
    min-height: 0;
    padding: 0;
    background: transparent;
    color: var(--green);
    font: inherit;
    font-weight: 700;
}

.table-actions button {
    color: var(--red);
}

.admin-flash {
    width: 100%;
}

@media (max-width: 920px) {
    body {
        background: #f4f7f6;
    }

    .site-shell {
        grid-template-columns: 1fr;
        width: min(100% - 20px, 900px);
        margin-top: 10px;
    }

    .left-rail,
    .right-rail {
        display: none;
    }

    .hero {
        align-items: start;
        flex-direction: column;
        padding: 34px;
    }

    .match-grid,
    .article-grid,
    .trend-grid,
    .stats-grid,
    .automation-grid,
    .admin-workbench,
    .admin-feed.three-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .score-layout {
        grid-template-columns: 1fr;
    }

    .match-row {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .match-market {
        grid-column: 1 / -1;
    }

    .match-detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-scoreboard {
        grid-template-columns: 1fr;
    }

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

    .admin-body {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    html,
    body,
    .front-body {
        --mobile-pad: 12px;
        --mobile-card: 10px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .front-body * {
        min-width: 0;
    }

    .front-body {
        font-size: 14px;
        background: #f1f5f4;
    }

    .front-body.has-ad-popup {
        padding-bottom: 150px;
    }

    .nav,
    .lang-row,
    .footer {
        width: 100%;
    }

    .site-header {
        position: static;
        box-shadow: 0 8px 24px rgba(11, 71, 53, 0.06);
        overflow: hidden;
    }

    .lang-row {
        min-height: 30px;
        padding: 0 var(--mobile-pad);
        gap: 8px;
        background: #f8fbfa;
        font-size: 12px;
    }

    .nav,
    .footer,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        min-height: 0;
        gap: 9px;
        padding: 9px var(--mobile-pad) 8px;
    }

    .brand {
        font-size: 18px;
        line-height: 1.2;
    }

    .nav-links {
        display: none;
    }

    .nav-links::-webkit-scrollbar,
    .sports-strip::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        flex: 0 0 auto;
        font-size: 13px;
    }

    .sports-strip {
        width: 100%;
        max-width: 100vw;
        min-height: 40px;
        gap: 7px;
        padding: 0 var(--mobile-pad) 9px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .sports-strip a,
    .sports-strip span {
        padding: 5px 11px;
        font-size: 12px;
    }

    .site-shell {
        width: 100%;
        margin-top: 0;
        gap: 0;
    }

    .content {
        gap: 12px;
        padding: 12px var(--mobile-pad) 82px;
        max-width: 100%;
        overflow: hidden;
    }

    .content > *,
    .score-layout,
    .score-panel,
    .match-list,
    .league-group,
    .match-row,
    .match-main,
    .match-time,
    .match-top,
    .match-teams-row,
    .match-market,
    .compact-article,
    .article-detail,
    .match-detail-hero,
    .match-detail-grid {
        min-width: 0;
        max-width: 100%;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 55;
        display: flex;
        width: 100%;
        max-width: 100%;
        min-height: 64px;
        padding: 7px 8px 8px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--line);
        box-shadow: 0 -12px 28px rgba(10, 36, 28, 0.1);
        backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav a {
        min-width: 0;
        flex: 1 1 0;
        width: auto;
        display: grid;
        place-items: center;
        gap: 3px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
    }

    .mobile-bottom-nav small {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-nav span {
        width: 28px;
        height: 28px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: #edf3f0;
        color: var(--green-dark);
        font-size: 13px;
    }

    .ad-popup {
        left: 0;
        right: 0;
        bottom: 64px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .ad-popup-card.has-image {
        min-height: 76px;
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .ad-popup-card.no-image {
        min-height: 70px;
        grid-template-columns: 1fr;
    }

    .ad-popup-card.has-image img {
        height: 78px;
    }

    .ad-copy {
        padding: 10px 12px;
    }

    .ad-copy strong {
        font-size: 15px;
        line-height: 1.35;
    }

    .ad-copy small {
        font-size: 12px;
        line-height: 1.4;
    }

    .ad-popup-close {
        top: 8px;
        right: 10px;
        width: 28px;
        height: 28px;
        font-size: 20px;
        z-index: 2;
    }

    .hero {
        min-height: 280px;
        padding: 22px;
    }

    .score-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        margin-top: 0;
        padding: 18px;
        border-radius: var(--mobile-card);
        background-position: center;
        overflow: hidden;
    }

    .score-hero h1 {
        margin: 4px 0 8px;
        font-size: 25px;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .score-hero p {
        font-size: 14px;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .score-summary {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 12px 14px;
        text-align: left;
    }

    .score-summary strong {
        font-size: 34px;
    }

    .score-summary span {
        text-align: left;
        overflow-wrap: anywhere;
    }

    .score-summary em {
        margin-top: 0;
    }

    .match-row {
        min-height: 0;
        display: block;
        gap: 9px;
        padding: 14px 12px;
        max-width: 100%;
        overflow: hidden;
    }

    .match-time {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }

    .match-time strong {
        font-size: 20px;
    }

    .match-main {
        display: grid;
        gap: 8px;
        min-width: 0;
    }

    .match-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .match-teams-row {
        margin-top: 0;
        display: grid;
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 6px;
        font-size: 16px;
        width: 100%;
        min-width: 0;
    }

    .match-teams-row b {
        min-width: 48px;
        width: max-content;
        padding: 5px;
    }

    .match-teams-row span,
    .match-teams-row span:last-child {
        max-width: 100%;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        text-align: left;
    }

    .match-subline {
        margin-top: 0;
    }

    .match-market {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        margin-top: 12px;
        width: 100%;
    }

    .match-market span {
        min-height: 36px;
        border-radius: 8px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .panel-head,
    .league-head {
        padding: 11px 12px;
        min-width: 0;
        flex-wrap: wrap;
        overflow: hidden;
    }

    .panel-head > *,
    .league-head > * {
        min-width: 0;
    }

    .panel-head a,
    .league-head span {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .league-head span {
        display: none;
    }

    .panel-head a {
        font-size: 12px;
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .score-panel {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .panel-head h2 {
        font-size: 18px;
    }

    .match-grid,
    .article-grid,
    .trend-grid,
    .stats-grid,
    .automation-grid,
    .admin-workbench,
    .admin-feed.three-cols,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .article-card,
    .trend-card,
    .news-item {
        padding: 14px;
        border-radius: var(--mobile-card);
    }

    .article-card h3 {
        min-height: 0;
        font-size: 18px;
    }

    .compact-article {
        padding: 12px;
    }

    .page-title {
        padding: 22px 0 12px;
    }

    .page-title h1,
    .article-detail h1 {
        font-size: 25px;
    }

    .article-detail {
        width: 100%;
        padding: 18px;
        border-radius: var(--mobile-card);
    }

    .article-detail .meta {
        flex-direction: column;
        gap: 4px;
    }

    .article-detail .summary {
        font-size: 14px;
        line-height: 1.75;
    }

    .article-body {
        font-size: 16px;
        line-height: 1.9;
    }

    .article-body p {
        margin-bottom: 16px;
    }

    .match-detail-hero {
        margin-top: 0;
        padding: 18px;
        border-radius: var(--mobile-card);
    }

    .detail-scoreboard {
        margin-top: 14px;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .detail-team {
        grid-template-columns: 44px minmax(0, 1fr);
        justify-items: start;
        text-align: left;
    }

    .detail-team.away {
        direction: ltr;
    }

    .detail-team img {
        width: 44px;
        height: 44px;
        padding: 6px;
    }

    .detail-team strong {
        font-size: 20px;
    }

    .detail-score {
        min-height: 96px;
        order: -1;
    }

    .detail-score b {
        font-size: 38px;
    }

    .match-detail-grid {
        gap: 10px;
    }

    .detail-list div {
        min-height: 42px;
        padding: 10px 12px;
        gap: 12px;
    }

    .detail-list dd {
        overflow-wrap: anywhere;
    }

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

    .teams span:last-child {
        text-align: left;
    }

    .filter-bar {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px;
    }

    .filter-bar select {
        width: 100%;
    }

    .footer {
        padding: 20px var(--mobile-pad) 150px;
    }
}
