/*
 * Digital Gallop Online common themes
 * classic は既存デザインをそのまま使い、それ以外だけを上書きします。
 */

body.dgo-theme:not(.dgo-theme-classic) {
    --dgo-bg: #071d18;
    --dgo-surface: rgba(15, 67, 52, .94);
    --dgo-surface-strong: #123f35;
    --dgo-surface-soft: rgba(54, 121, 91, .92);
    --dgo-surface-row: rgba(102, 154, 128, .72);
    --dgo-surface-row-alt: rgba(51, 105, 85, .8);
    --dgo-text: #f5fbf7;
    --dgo-muted: #c8ded3;
    --dgo-border: rgba(205, 235, 219, .48);
    --dgo-accent: #91df70;
    --dgo-accent-2: #51d1ad;
    --dgo-warm: #ffc75b;
    --dgo-danger: #ff726f;
    --dgo-input: rgba(6, 42, 34, .88);
    --dgo-shadow: 0 18px 42px rgba(0, 18, 13, .32), 0 3px 9px rgba(0, 0, 0, .28);
    --dgo-shadow-small: 0 8px 20px rgba(0, 18, 13, .25);
    --dgo-radius: 15px;
    --dgo-radius-small: 9px;
    position: relative;
    isolation: isolate;
    color: var(--dgo-text);
    font-family: "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    cursor: default;
    letter-spacing: .015em;
}

body.dgo-theme.dgo-theme-modern {
    --dgo-bg: #041f25;
    --dgo-surface: rgba(6, 72, 75, .94);
    --dgo-surface-strong: #063640;
    --dgo-surface-soft: rgba(12, 126, 113, .93);
    --dgo-surface-row: rgba(54, 136, 127, .78);
    --dgo-surface-row-alt: rgba(19, 82, 89, .86);
    --dgo-border: rgba(103, 235, 218, .58);
    --dgo-accent: #72f1b8;
    --dgo-accent-2: #55d9ff;
    --dgo-warm: #ffbf69;
    --dgo-input: rgba(3, 43, 51, .92);
    --dgo-shadow: 0 18px 42px rgba(0, 37, 43, .35), 0 3px 9px rgba(0, 0, 0, .24);
    --dgo-shadow-small: 0 8px 22px rgba(0, 45, 48, .3);
    --dgo-radius: 18px;
    --dgo-radius-small: 11px;
}

body.dgo-theme.dgo-theme-jra {
    --dgo-bg: #eff2ec;
    --dgo-surface: rgba(0, 78, 54, .97);
    --dgo-surface-strong: #003727;
    --dgo-surface-soft: rgba(4, 102, 70, .97);
    --dgo-surface-row: rgba(70, 125, 91, .94);
    --dgo-surface-row-alt: rgba(0, 72, 50, .94);
    --dgo-text: #fffef8;
    --dgo-muted: #dcebe3;
    --dgo-border: rgba(255, 220, 105, .78);
    --dgo-accent: #ffd23f;
    --dgo-accent-2: #fff0a6;
    --dgo-warm: #ffca28;
    --dgo-danger: #ff7b70;
    --dgo-input: rgba(0, 54, 39, .94);
    --dgo-shadow: 0 15px 35px rgba(0, 54, 39, .28), 0 3px 8px rgba(0, 0, 0, .25);
    --dgo-radius: 3px;
    --dgo-radius-small: 2px;
}

body.dgo-theme.dgo-theme-night {
    --dgo-bg: #070b1d;
    --dgo-surface: rgba(18, 25, 60, .97);
    --dgo-surface-strong: #0a102b;
    --dgo-surface-soft: rgba(48, 59, 126, .95);
    --dgo-surface-row: rgba(55, 72, 133, .88);
    --dgo-surface-row-alt: rgba(25, 36, 82, .94);
    --dgo-text: #f4f8ff;
    --dgo-muted: #c2d2e7;
    --dgo-border: rgba(87, 218, 255, .62);
    --dgo-accent: #4ce6ff;
    --dgo-accent-2: #b18cff;
    --dgo-warm: #ffcc66;
    --dgo-danger: #ff6fae;
    --dgo-input: rgba(6, 12, 38, .96);
    --dgo-shadow: 0 18px 45px rgba(0, 5, 22, .5), 0 3px 9px rgba(0, 0, 0, .38);
    --dgo-shadow-small: 0 8px 22px rgba(0, 5, 22, .42);
    --dgo-radius: 13px;
    --dgo-radius-small: 8px;
}

body.dgo-theme:not(.dgo-theme-classic)::before {
    z-index: -2;
    filter: none;
}

body.dgo-theme:not(.dgo-theme-classic)::after {
    display: none;
}

body.dgo-theme.dgo-theme-jra::before {
    filter: none;
}

body.dgo-theme.dgo-theme-night::before {
    filter: none;
}

body.dgo-theme:not(.dgo-theme-classic).body-transparent::after {
    display: none;
}

body.dgo-theme:not(.dgo-theme-classic),
body.dgo-theme:not(.dgo-theme-classic) :where(tr, td, th, a, input, select, textarea, button) {
    font-family: "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif !important;
}

body.dgo-theme:not(.dgo-theme-classic) :where(a:link, a:visited) {
    color: inherit;
    transition: color .18s ease, opacity .18s ease, transform .18s ease;
}

body.dgo-theme:not(.dgo-theme-classic) :where(a:hover, a:focus-visible) {
    color: var(--dgo-accent) !important;
}

body.dgo-theme:not(.dgo-theme-classic) :where(input[type="text"], input[type="password"], input[type="number"], input[type="search"], select, textarea) {
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid var(--dgo-border) !important;
    border-radius: var(--dgo-radius-small) !important;
    outline: none;
    background: var(--dgo-input) !important;
    color: var(--dgo-text) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
}

body.dgo-theme:not(.dgo-theme-classic) select option {
    background: var(--dgo-surface-strong);
    color: var(--dgo-text);
}

body.dgo-theme:not(.dgo-theme-classic) :where(input, select, textarea, button, a):focus-visible {
    outline: 3px solid var(--dgo-accent) !important;
    outline: 3px solid color-mix(in srgb, var(--dgo-accent) 62%, transparent) !important;
    outline-offset: 2px;
}

body.dgo-theme:not(.dgo-theme-classic) :where(.button, .button2, button, input[type="submit"], input[type="button"]) {
    min-height: 34px;
    padding: 7px 14px !important;
    border: 1px solid var(--dgo-accent) !important;
    border: 1px solid color-mix(in srgb, var(--dgo-accent) 54%, var(--dgo-border)) !important;
    border-radius: var(--dgo-radius-small) !important;
    background: var(--dgo-surface-strong) !important;
    background: linear-gradient(180deg, color-mix(in srgb, var(--dgo-surface-soft) 88%, white), var(--dgo-surface-strong)) !important;
    color: var(--dgo-text) !important;
    font-weight: 750;
    box-shadow: 0 3px 0 #04120e, 0 7px 13px rgba(0, 0, 0, .14);
    box-shadow: 0 3px 0 color-mix(in srgb, var(--dgo-bg) 78%, black), 0 7px 13px rgba(0, 0, 0, .14);
    cursor: pointer;
    transition: transform .13s ease, filter .13s ease, box-shadow .13s ease;
}

body.dgo-theme:not(.dgo-theme-classic) :where(.button, .button2, button, input[type="submit"], input[type="button"]):hover:not(:disabled) {
    filter: brightness(1.13) saturate(1.08);
    transform: translateY(-1px);
}

body.dgo-theme:not(.dgo-theme-classic) :where(.button, .button2, button, input[type="submit"], input[type="button"]):active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #04120e;
    box-shadow: 0 1px 0 color-mix(in srgb, var(--dgo-bg) 78%, black);
}

body.dgo-theme:not(.dgo-theme-classic) :where(button, input):disabled {
    opacity: .52;
    cursor: not-allowed;
}

body.dgo-theme:not(.dgo-theme-classic) .table-set-frame {
    overflow: hidden;
    border: 1px solid var(--dgo-border) !important;
    border-radius: var(--dgo-radius) !important;
    box-shadow: var(--dgo-shadow-small) !important;
}

body.dgo-theme:not(.dgo-theme-classic) .table-set-box-cell {
    padding: 7px 9px !important;
    border: 0 !important;
    background: linear-gradient(145deg, var(--dgo-surface), var(--dgo-surface-soft)) !important;
    color: var(--dgo-text) !important;
}

body.dgo-theme.dgo-theme-jra .table-set-frame {
    border: 1px solid rgba(255, 232, 151, .72) !important;
    border-top: 5px solid var(--dgo-accent) !important;
    box-shadow: 5px 5px 0 rgba(0, 43, 29, .48), 0 12px 26px rgba(0, 43, 29, .2) !important;
}

body.dgo-theme.dgo-theme-night .table-set-frame {
    border-color: rgba(76, 230, 255, .64) !important;
    box-shadow: 0 0 0 1px rgba(177, 140, 255, .18), 0 0 18px rgba(76, 230, 255, .18), var(--dgo-shadow-small) !important;
}

body.dgo-theme.dgo-theme-modern .table-set-frame {
    border-color: rgba(114, 241, 184, .62) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), var(--dgo-shadow-small) !important;
}

body.dgo-theme.dgo-theme-modern .table-set-box-cell {
    background: linear-gradient(145deg, rgba(5, 60, 69, .96), rgba(11, 128, 113, .91)) !important;
}

body.dgo-theme.dgo-theme-jra .table-set-box-cell {
    background: linear-gradient(180deg, #006747, #003d2b) !important;
}

body.dgo-theme.dgo-theme-night .table-set-box-cell {
    background: linear-gradient(145deg, rgba(10, 16, 43, .98), rgba(48, 59, 126, .95)) !important;
}

body.dgo-theme:not(.dgo-theme-classic) .dotted {
    border-color: var(--dgo-border) !important;
}

body.dgo-theme:not(.dgo-theme-classic) :where(h1, h2, h3) {
    text-wrap: balance;
    letter-spacing: .045em;
}

body.dgo-theme:not(.dgo-theme-classic) :where(
    .race-calendar-head,
    .top-side-box,
    .main-popup,
    .else-panel,
    .gdisp-panel,
    .gdisp-popup,
    .rank-card,
    .baken-history-head,
    .baken-history-box,
    .baken-odds-title,
    .baken-odds-section,
    .racedisp-panel,
    .racedisp-result,
    .breed-horse-detail,
    .breed-card-item,
    .mating-analysis,
    .foal-result-analysis
) {
    border-color: var(--dgo-border) !important;
    border-radius: var(--dgo-radius) !important;
    background: linear-gradient(145deg, var(--dgo-surface), var(--dgo-surface-soft)) !important;
    color: var(--dgo-text) !important;
    box-shadow: var(--dgo-shadow) !important;
}

body.dgo-theme:not(.dgo-theme-classic) :where(
    .race-calendar-head,
    .gdisp-title,
    .rank-title,
    .breed-title,
    .baken-history-head,
    .baken-odds-title
) {
    position: relative;
    overflow: hidden;
}

body.dgo-theme:not(.dgo-theme-classic) :where(
    .race-calendar-head,
    .gdisp-title,
    .rank-title,
    .breed-title,
    .baken-history-head,
    .baken-odds-title
)::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--dgo-accent), var(--dgo-accent-2), transparent);
}

body.dgo-theme.dgo-theme-jra :where(
    .race-calendar-head,
    .gdisp-title,
    .rank-title,
    .breed-title,
    .baken-history-head,
    .baken-odds-title
)::after {
    height: 5px;
    background: linear-gradient(90deg, var(--dgo-accent), #fff3be, var(--dgo-accent));
}

body.dgo-theme:not(.dgo-theme-classic) :where(
    .top-race-table,
    .rank-table,
    .gdisp-table,
    .gdisp-detail-table,
    .main-popup-table,
    .else-form-table,
    .else-summary-table,
    .else-data-table,
    .baken-history-table,
    .baken-odds-full,
    .baken-odds-matrix,
    .racedisp-entry,
    .racedisp-result-table
) {
    overflow: hidden;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: var(--dgo-radius-small);
    background: var(--dgo-surface-strong) !important;
}

body.dgo-theme:not(.dgo-theme-classic) :where(
    .top-race-table,
    .rank-table,
    .gdisp-table,
    .gdisp-detail-table,
    .main-popup-table,
    .else-form-table,
    .else-summary-table,
    .else-data-table,
    .baken-history-table,
    .baken-odds-full,
    .baken-odds-matrix,
    .racedisp-entry,
    .racedisp-result-table
) :where(th, td) {
    border-color: color-mix(in srgb, var(--dgo-border) 66%, transparent) !important;
}

body.dgo-theme:not(.dgo-theme-classic) :where(
    .top-race-table,
    .rank-table,
    .gdisp-table,
    .gdisp-detail-table,
    .main-popup-table,
    .else-form-table,
    .else-summary-table,
    .else-data-table,
    .baken-history-table,
    .baken-odds-full,
    .baken-odds-matrix,
    .racedisp-entry,
    .racedisp-result-table
) thead th {
    background: var(--dgo-surface-strong) !important;
    color: var(--dgo-text) !important;
    font-weight: 800;
}

body.dgo-theme:not(.dgo-theme-classic) :where(
    .rank-table,
    .gdisp-table,
    .baken-history-table,
    .baken-odds-full,
    .racedisp-entry,
    .racedisp-result-table
) tbody tr:nth-child(odd) {
    background-color: var(--dgo-surface-row-alt);
}

body.dgo-theme:not(.dgo-theme-classic) :where(
    .rank-table,
    .gdisp-table,
    .baken-history-table,
    .baken-odds-full,
    .racedisp-entry,
    .racedisp-result-table
) tbody tr:nth-child(even) {
    background-color: var(--dgo-surface-row);
}

body.dgo-theme:not(.dgo-theme-classic) :where(
    .main-popup-head,
    .main-horse-head,
    .gdisp-card-head,
    .gdisp-horse-head,
    .gdisp-history-heading,
    .main-popup-table th,
    .main-popup-two h3,
    .main-stat-label,
    .gdisp-stat-label,
    .else-form-table th,
    .else-summary-table th,
    .else-data-table th,
    .racedisp-heading,
    .racedisp-comment-box
) {
    background: var(--dgo-surface-strong) !important;
    color: var(--dgo-text) !important;
    border-color: var(--dgo-border) !important;
}

body.dgo-theme:not(.dgo-theme-classic) :where(.main-popup, .gdisp-popup) {
    backdrop-filter: blur(12px);
}

body.dgo-theme:not(.dgo-theme-classic) :where(.main-popup-overlay, .gdisp-overlay) {
    background: rgba(2, 12, 10, .72) !important;
    backdrop-filter: blur(5px);
}

body.dgo-theme:not(.dgo-theme-classic) :where(.main-bar, .gdisp-bar) {
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16) !important;
}

body.dgo-theme:not(.dgo-theme-classic) :where(.main-bar span, .gdisp-bar span) {
    border-radius: inherit;
    background: linear-gradient(90deg, var(--dgo-accent-2), var(--dgo-accent)) !important;
}

/* メイン画面の所有馬メニューを、成長表示と同じ押しやすい縦ボタンへそろえます。 */
body.dgo-theme:not(.dgo-theme-classic) .main-side-menu {
    width: 200px;
    max-width: 100%;
}

body.dgo-theme:not(.dgo-theme-classic) .main-side-menu > .table-set-frame,
body.dgo-theme:not(.dgo-theme-classic) .main-side-menu .table-set-content {
    width: 100% !important;
}

body.dgo-theme:not(.dgo-theme-classic) .main-side-menu .table-set-content {
    border-collapse: separate !important;
    border-spacing: 0 2px !important;
}

body.dgo-theme:not(.dgo-theme-classic) .main-menu-heading > td {
    padding: 6px 7px !important;
    border-radius: var(--dgo-radius-small);
    background: var(--dgo-surface-strong) !important;
    font-size: 16px;
}

body.dgo-theme:not(.dgo-theme-classic) .main-menu-item > td {
    padding: 0 !important;
}

body.dgo-theme:not(.dgo-theme-classic) .main-menu-item b {
    display: flex;
    width: 100%;
    min-height: 27px;
    padding: 3px 7px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dgo-accent);
    border-radius: var(--dgo-radius-small);
    background: linear-gradient(180deg, var(--dgo-surface-soft), var(--dgo-surface-strong));
    color: var(--dgo-text) !important;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .72), 0 4px 8px rgba(0, 0, 0, .13);
    cursor: pointer;
    transition: filter .13s ease, transform .13s ease, box-shadow .13s ease;
}

body.dgo-theme.dgo-theme-jra .main-menu-item b {
    border-width: 2px;
    border-color: #ffd23f;
    border-radius: 2px;
    background: linear-gradient(180deg, #08734f, #003d2b);
    box-shadow: 0 3px 0 #1c291f, 0 5px 8px rgba(0, 0, 0, .18);
}

body.dgo-theme.dgo-theme-night .main-menu-item b {
    border-color: #4ce6ff;
    background: linear-gradient(180deg, #344585, #0a102b);
    box-shadow: 0 2px 0 #030617, 0 0 11px rgba(76, 230, 255, .24);
}

body.dgo-theme:not(.dgo-theme-classic) .main-menu-item b:hover,
body.dgo-theme:not(.dgo-theme-classic) .main-menu-item b:focus-visible {
    filter: brightness(1.15) saturate(1.08);
    transform: translateY(-1px);
}

body.dgo-theme:not(.dgo-theme-classic) .main-menu-item--empty b {
    color: var(--dgo-muted) !important;
    opacity: .72;
}

body.dgo-theme:not(.dgo-theme-classic) .main-menu-separator td {
    padding: 3px 4px 2px !important;
}

body.dgo-theme:not(.dgo-theme-classic) .main-menu-separator hr {
    height: 3px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent 0%, #ff9f43 12%, #ffbd59 50%, #ff9f43 88%, transparent 100%);
    box-shadow: 0 0 7px rgba(255, 159, 67, .58);
}

body.dgo-theme:not(.dgo-theme-classic) :where(.top-surface-divider th, .rank-record-section-turf) {
    background: #668f35 !important;
}

body.dgo-theme:not(.dgo-theme-classic) :where(.rank-record-section-dirt) {
    background: #9b6339 !important;
}

body.dgo-theme:not(.dgo-theme-classic) .racedisp-stage {
    overflow: hidden;
    border-radius: var(--dgo-radius-small);
    border-color: var(--dgo-border) !important;
}

body.dgo-theme:not(.dgo-theme-classic) .racedisp-comment-input {
    background: var(--dgo-input) !important;
}

/*
 * 種付けデモ結果は、マウス操作のPCだけ右側を
 * 「配合効果 → 操作ボタン」の縦並びにします。
 * スマホはhover:none / pointer:coarseなので従来配置のままです。
 */
@media (hover: hover) and (pointer: fine) {
    .horse-demo .horse-demo-inner:has(> .horse-demo-result) {
        display: grid;
        grid-template-columns: minmax(600px, 680px) minmax(300px, 360px);
        grid-template-rows: auto auto auto;
        column-gap: 16px;
        row-gap: 16px;
        align-items: start;
        justify-content: center;
        max-width: calc(100vw - 24px);
    }

    .horse-demo .horse-demo-inner:has(> .horse-demo-result) > .horse-demo-note {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
    }

    .horse-demo .horse-demo-inner:has(> .horse-demo-result) > .horse-demo-result {
        display: contents;
    }

    .horse-demo .horse-demo-inner:has(> .horse-demo-result) > .horse-demo-result > .horse-demo-result-main {
        grid-column: 1;
        grid-row: 2 / span 2;
    }

    .horse-demo .horse-demo-inner:has(> .horse-demo-result) > .horse-demo-result > section:not(.horse-demo-result-main) {
        grid-column: 2;
        grid-row: 2;
    }

    .horse-demo .horse-demo-inner:has(> .horse-demo-result) > .horse-demo-actions {
        grid-column: 2;
        grid-row: 3;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        justify-self: stretch;
        margin: 0;
        padding: 0;
    }
}

body.dgo-theme:not(.dgo-theme-classic) :where(.drop, .drop2) {
    text-shadow: 0 2px 7px rgba(0, 0, 0, .48);
}

body.dgo-theme:not(.dgo-theme-classic) .marquee-text {
    color: var(--dgo-accent-2) !important;
    font-weight: 700;
}

body.dgo-theme-classic .marquee-text,
body.dgo-theme-classic .marquee-text :where(a, b, strong, span) {
    color: #ff9f43 !important;
}

/* 背景画像は元の明るさで見せ、上部のニュース帯だけを読みやすく暗くします。 */
body.dgo-theme .marquee-container[aria-label="最新ニュース"] {
    background: rgba(4, 24, 19, .76);
    box-shadow: inset 0 0 0 1px rgba(208, 235, 220, .22), 0 4px 12px rgba(0, 0, 0, .16);
}

body.dgo-theme.dgo-theme-modern .marquee-container[aria-label="最新ニュース"] {
    border-bottom: 2px solid #55d9ff;
}

body.dgo-theme.dgo-theme-jra .marquee-container[aria-label="最新ニュース"] {
    border-bottom: 3px solid #ffd23f;
}

body.dgo-theme.dgo-theme-night .marquee-container[aria-label="最新ニュース"] {
    border-bottom: 2px solid #b18cff;
    background: rgba(5, 8, 29, .86);
    box-shadow: inset 0 0 0 1px rgba(76, 230, 255, .34), 0 0 14px rgba(76, 230, 255, .22);
}

body.dgo-theme .main-guide-link {
    color: #ff9f43 !important;
}

/* 全画面共通の表示タイプ選択。選択値はブラウザへ保存します。 */
.dgo-theme-picker {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 10050;
    color: var(--dgo-text, #fff);
    font-family: "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
    font-size: 13px;
}

.dgo-theme-picker > summary {
    display: block;
    padding: 7px 11px;
    border: 1px solid var(--dgo-border, rgba(255, 255, 255, .58));
    border-radius: var(--dgo-radius-small, 6px);
    background: var(--dgo-surface-strong, rgba(47, 79, 79, .94));
    box-shadow: 0 4px 12px rgba(0, 0, 0, .24);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.dgo-theme-picker > summary::-webkit-details-marker {
    display: none;
}

.dgo-theme-picker[open] > summary {
    border-radius: var(--dgo-radius-small, 6px) var(--dgo-radius-small, 6px) 0 0;
}

.dgo-theme-picker-panel {
    display: grid;
    gap: 5px;
    min-width: 210px;
    padding: 10px;
    border: 1px solid var(--dgo-border, rgba(255, 255, 255, .58));
    border-top: 0;
    border-radius: 0 0 var(--dgo-radius-small, 6px) var(--dgo-radius-small, 6px);
    background: var(--dgo-surface, rgba(47, 79, 79, .97));
    box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}

.dgo-theme-picker-panel label {
    color: var(--dgo-muted, #fff);
    font-size: 12px;
    font-weight: 700;
}

.dgo-theme-picker-panel select {
    width: 100%;
    min-height: 34px;
}

body.body-transparent .dgo-theme-picker {
    display: none;
}

body.dgo-theme:not(.dgo-theme-classic) .dgo-footer-menu {
    margin: 20px auto 6px;
    border-spacing: 7px 0;
}

body.dgo-theme:not(.dgo-theme-classic) .dgo-footer-links td[width="15"] {
    width: 5px;
}

body.dgo-theme:not(.dgo-theme-classic) .dgo-footer-links a {
    display: inline-block;
    padding: 6px 4px;
    color: var(--dgo-text) !important;
    font-weight: 750;
    letter-spacing: .025em;
}

body.dgo-theme:not(.dgo-theme-classic) .dgo-footer-links a:hover {
    color: var(--dgo-accent) !important;
}

body.dgo-theme.dgo-theme-jra .dgo-footer-links a::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: .8em;
    margin-right: 5px;
    border-radius: 2px;
    background: var(--dgo-accent);
    vertical-align: -.04em;
}

body.dgo-theme:not(.dgo-theme-classic) footer hr {
    border-top-color: var(--dgo-border) !important;
}

body.dgo-theme:not(.dgo-theme-classic) footer :where(a, small) {
    color: var(--dgo-muted) !important;
}

body.dgo-theme:not(.dgo-theme-classic) ::-webkit-scrollbar-track {
    background: var(--dgo-bg);
}

body.dgo-theme:not(.dgo-theme-classic) ::-webkit-scrollbar-thumb {
    border: 3px solid var(--dgo-bg);
    background: var(--dgo-surface-soft);
}

@media (max-width: 760px) {
    body.dgo-theme:not(.dgo-theme-classic) {
        letter-spacing: 0;
    }

    body.dgo-theme:not(.dgo-theme-classic) :where(.table-set-frame, .race-calendar-head, .gdisp-panel, .gdisp-popup, .rank-card, .racedisp-panel) {
        border-radius: 9px !important;
    }

    body.dgo-theme:not(.dgo-theme-classic) :where(.button, .button2, button, input[type="submit"], input[type="button"]) {
        min-height: 40px;
        padding: 8px 12px !important;
    }

    body.dgo-theme:not(.dgo-theme-classic) > table:last-of-type {
        max-width: 100vw;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.dgo-theme:not(.dgo-theme-classic) .dgo-footer-menu {
        margin-top: 12px;
        border-spacing: 4px 0;
    }

    body.dgo-theme:not(.dgo-theme-classic) .dgo-footer-links a {
        padding-top: 9px;
        padding-bottom: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.dgo-theme:not(.dgo-theme-classic) *,
    body.dgo-theme:not(.dgo-theme-classic) *::before,
    body.dgo-theme:not(.dgo-theme-classic) *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
