body:has(> .sfdg-classic) { background: #000; }

.sfdg-classic {
    --line: #384940;
    --muted: #b9cbc0;
    --ink: #f7f3ea;
    --light: #17201b;
    --christmas-green: linear-gradient(152deg, #265441, #173829 59%, #10271f);
    color: var(--ink);
    color-scheme: light;
}
.sfdg-classic > main, .sfdg-classic > .sfdg-foot { position: relative; z-index: 1; }
.sfdg-classic .sfdg-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 9px 24px;
    padding: 11px max(20px, calc((100% - 1150px) / 2));
    border-top: 3px solid #245640;
    background: var(--christmas-green);
    color: #fff;
}
.sfdg-classic .sfdg-logo {
    width: 148px;
    flex: 0 0 148px;
    padding: 10px;
    background: #ffffff;
}
.sfdg-classic .sfdg-nav-row { width: auto; margin: 0; gap: 7px 18px; }
.sfdg-classic .sfdg-nav-row nav { gap: 4px; }
.sfdg-classic .sfdg-nav-row nav a { padding: 8px 12px; border-radius: 8px; font-weight: 680; }
.sfdg-classic .sfdg-nav-row a[aria-current],
.sfdg-classic .sfdg-nav-row a:hover { color: #fff; background: #ffffff30; text-decoration: none; }
.sfdg-classic .sfdg-lang-switch { gap: 4px; }
.sfdg-classic .sfdg-lang-switch a { padding: 5px; border-radius: 5px; }

.sfdg-classic > .sfdg-snow { z-index: 0; top: 70px; height: min(1350px, 100%); }
.sfdg-classic > .sfdg-snow i { background: #84a3ad; box-shadow: 0 0 5px #a0b9c1; }
@media (prefers-reduced-motion: no-preference) {
    .sfdg-classic > .sfdg-snow i { animation: sfdg-classic-snow 31s calc(var(--flake-delay) * -5) linear infinite; }
}
@keyframes sfdg-classic-snow {
    0% { transform: translate(0, 0); opacity: 0; }
    10%, 85% { opacity: .5; }
    100% { transform: translate(95px, 1320px); opacity: 0; }
}

.sfdg-classic .sfdg-advent {
    color: #f6f2e8;
    border: 0;
    border-radius: 9px;
}
.sfdg-classic .sfdg-advent-day { color: #fff9e9; }
.sfdg-classic .sfdg-advent-day[data-state="opened"] { color: #fff9e9; }
.sfdg-classic .sfdg-advent-day[data-state="today"] { color: #362418; }
.sfdg-classic .sfdg-landing-hero {
    color: #faf8ed;
    border: 0;
    border-radius: 9px;
    background: none;
    box-shadow: none;
}
.sfdg-classic .sfdg-landing-copy { background: none; }
.sfdg-classic .sfdg-button--ghost { background: #fff; color: #173f31; }
.sfdg-classic .sfdg-button--ghost:hover { background: #e7f1eb; }
.sfdg-classic .sfdg-online-note { color: #d4dfcc; }
.sfdg-classic .sfdg-landing-copy > p.sfdg-online-note { color: #e6d7b1; }
.sfdg-classic .sfdg-status-pill, .sfdg-classic .sfdg-prize-timer time { color: #f2cc83; }
.sfdg-classic .sfdg-modal { z-index: 6; }

.sfdg-sound-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #efd696;
    border: 1px solid #517e65;
    border-radius: var(--sfdg-radius);
    background: #183a2b;
    cursor: pointer;
}
.sfdg-sound-toggle:hover { background: #245540; }
.sfdg-sound-toggle[aria-pressed="false"] {
    color: #ffd0cb;
    border-color: #9a5558;
    background: #422227;
}
.sfdg-sound-toggle[aria-pressed="false"]:hover { background: #612e35; }
.sfdg-sound-toggle[hidden], .sfdg-sound-toggle[aria-pressed="true"] .sfdg-sound-mute,
.sfdg-sound-toggle[aria-pressed="false"] .sfdg-sound-waves { display: none; }
.sfdg-classic .sfdg-wheel-top { row-gap: 8px; }
.sfdg-classic .sfdg-prize-catalog {
    padding: 0;
    border: 0;
    background: transparent;
}
.sfdg-catalog-head { margin-bottom: 22px; }
.sfdg-classic .sfdg-prize-catalog .sfdg-possible-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.sfdg-classic .sfdg-prize-catalog .sfdg-possible-item { padding: 9px; }
.sfdg-classic .sfdg-prize-catalog .sfdg-possible-image img { padding: 4px; }
.sfdg-classic .sfdg-possible-image .sfdg-discount-badge { z-index: 1; }
.sfdg-classic .sfdg-possible-name { font-weight: 650; line-height: 1.35; text-decoration: none; }
.sfdg-classic a.sfdg-possible-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.sfdg-catalog-odds {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 3px 8px;
    margin-top: auto;
    padding-top: 7px;
    border-top: 1px solid #ffffff22;
}
.sfdg-classic .sfdg-prize-rarity {
    margin: 0;
    padding: 4px 6px;
    border-radius: 5px;
    background: var(--rarity-tone);
    line-height: 1.12;
}
.sfdg-catalog-chance {
    margin-inline-start: auto;
    color: var(--tile-accent);
    font-size: 1.08rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.sfdg-classic .sfdg-prize-catalog .sfdg-empty { grid-column: 1 / -1; }
@media (max-width: 900px) {
    .sfdg-classic .sfdg-prize-catalog .sfdg-possible-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .sfdg-classic .sfdg-topbar { justify-content: center; padding-inline: 10px; }
    .sfdg-classic .sfdg-nav-row { flex-wrap: wrap; justify-content: center; }
    .sfdg-classic .sfdg-nav-row nav a { padding: 6px 7px; font-size: .79rem; }
    .sfdg-catalog-head { margin-bottom: 14px; }
    .sfdg-catalog-chance { font-size: .85rem; }
    .sfdg-classic .sfdg-possible-name {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
    }
    .sfdg-classic .sfdg-prize-catalog .sfdg-possible-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .sfdg-classic .sfdg-prize-catalog .sfdg-possible-item { padding: 5px; font-size: .72rem; gap: 5px; }
    .sfdg-classic .sfdg-prize-catalog .sfdg-possible-image img { height: 76px; }
    .sfdg-classic .sfdg-prize-catalog .sfdg-possible-image .sfdg-discount-badge { font-size: .58rem; padding: 2px 3px; }
    .sfdg-classic .sfdg-prize-rarity { padding: 3px 4px; font-size: .63rem; }
}

.sfdg-classic > .sfdg-snow { height: min(1650px, 100%); }
.sfdg-classic > .sfdg-snow i {
    width: calc(var(--flake-size) * 1.35);
    height: calc(var(--flake-size) * 1.35);
    background: #fdfdf8;
    box-shadow: 0 0 4px 1px #9ab4ba96;
}
@media (prefers-reduced-motion: no-preference) {
    .sfdg-classic > .sfdg-snow i {
        animation-duration: var(--flake-time);
        animation-delay: calc(var(--flake-phase) * -1);
    }
}

.sfdg-christmas-board {
    position: relative;
    background: var(--christmas-green);
    box-shadow: none;
}
.sfdg-christmas-board .sfdg-advent-days {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-auto-rows: clamp(66px, 9vw, 108px);
}
.sfdg-christmas-board .sfdg-advent-day {
    isolation: isolate;
    align-content: end;
    justify-items: start;
    min-height: 0;
    padding: 8px;
    border: 1px solid #f8e4b267;
    border-radius: clamp(9px, 1.2vw, 17px);
    box-shadow: inset 0 -3px 0 #0005, 0 2px 5px #091c17a3;
    text-align: left;
    background: #1b503b;
}
/* Sparse placement preserves calendar order while the spans fill the December grid. */
.sfdg-advent-days--december > :is(:nth-child(10), :nth-child(24)) {
    grid-column: span 2;
    grid-row: span 2;
}
.sfdg-advent-days--december > :is(:nth-child(22), :nth-child(23)) { grid-row: span 2; }
@media (width > 620px) {
    .sfdg-advent-days--december > :is(:nth-child(18), :nth-child(19), :nth-child(21), :nth-child(22)) { grid-column: span 2; }
    .sfdg-advent-days--december > :is(:nth-child(20), :nth-child(21)) { grid-row: span 2; }
}
.sfdg-christmas-door-art {
    position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; border-radius: inherit;
    object-fit: cover;
}
.sfdg-christmas-board time {
    position: absolute;
    top: 7px;
    left: 7px;
    padding: 4px 6px;
    border-radius: 6px;
    background: #102d25d9;
    color: #fff9e7;
}
.sfdg-christmas-board .sfdg-advent-day strong { font-size: clamp(1rem, 2.25vw, 1.8rem); }
.sfdg-christmas-board .sfdg-advent-day > span {
    align-self: end;
    max-width: 100%;
    padding: 2px 4px;
    border-radius: 4px;
    background: #102d25de;
    color: #fff9e7;
    font-size: clamp(.59rem, 1vw, .73rem);
}
.sfdg-christmas-board .sfdg-advent-day[data-state="past"] img { filter: saturate(.42) brightness(.77); }
.sfdg-christmas-board .sfdg-advent-day[data-state="opened"] img { opacity: .63; }
.sfdg-christmas-board .sfdg-advent-day[data-state="opened"]::before,
.sfdg-christmas-board .sfdg-advent-day[data-state="opened"]::after { z-index: 2; }
.sfdg-christmas-board .sfdg-advent-day[data-state="today"] { border: 2px solid #ffcf7c; }
.sfdg-christmas-board .sfdg-advent-day[data-state="today"] time,
.sfdg-christmas-board .sfdg-advent-day[data-state="today"] > span { color: #30200d; background: #f6d898; }
.sfdg-christmas-board .sfdg-door-button:hover { background: #fff3ca26; }
.sfdg-christmas-board .sfdg-door-button:focus-visible { outline-offset: -3px; }
.sfdg-classic-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    gap: 9px;
    margin-top: 20px;
}
.sfdg-classic-links a {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    background: linear-gradient(147deg, #ffffff24, #ffffff0d);
    border: 0;
    color: #faf7ef;
    border-radius: 9px;
    box-shadow: 0 3px 12px #55463216;
    text-decoration: none;
}
.sfdg-classic-links a:hover { background: #253e32; }
.sfdg-classic-links a > span { color: #ffabb3; font-size: 1.15rem; }
.sfdg-classic-links small { color: #c3d3c8; }
.sfdg-friends {
    margin-top: 12px;
    border-radius: 9px;
    background: linear-gradient(115deg, #173829, #275941);
    color: #fff;
}
.sfdg-classic .sfdg-friends #sfdg-share-game {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: #fff;
    text-align: start;
    cursor: pointer;
}
.sfdg-classic .sfdg-friends #sfdg-share-game:hover { background: #ffffff12; }
.sfdg-classic .sfdg-friends #sfdg-share-game:focus-visible {
    outline: 2px solid #fff5d6;
    outline-offset: -4px;
}
#sfdg-share-game > span { font-size: 1.45rem; }
.sfdg-friends #sfdg-game-share-status:not(:empty) { display: block; padding: 0 16px 10px; }
.sfdg-friends .sfdg-game-share-url:not([hidden]) { display: block; margin: 0 16px 10px; max-width: calc(100% - 32px); }
.sfdg-game-share-url { color: #183127; background: #fff; max-width: 100%; min-width: min(320px, 100%); padding: 8px; }
.sfdg-classic .sfdg-share-dialog { max-height: calc(100dvh - 24px); }
@media (max-width: 620px) {
    .sfdg-christmas-board { padding-inline: 13px; }
    .sfdg-christmas-board .sfdg-advent-days {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: clamp(58px, 17vw, 81px);
        gap: 5px;
    }
    .sfdg-christmas-board .sfdg-advent-day { padding: 4px; }
    .sfdg-christmas-board time { top: 4px; left: 4px; padding: 2px 4px; }
    .sfdg-classic-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.sfdg-classic .sfdg-evergreen-footer {
    --footer-green: #173829;
    position: relative;
    margin-top: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #f8f5e7;
    text-align: left;
}
.sfdg-footer-trees {
    display: flex;
    align-items: end;
    justify-content: center;
    height: clamp(46px, 8vw, 94px);
    overflow: hidden;
}
.sfdg-footer-trees i {
    flex: 1 0 clamp(43px, 8.4vw, 120px);
    height: 82%;
    margin-inline: -5px;
    background: var(--footer-green);
    clip-path: polygon(50% 0, 77% 36%, 66% 36%, 88% 65%, 75% 65%, 100% 100%, 0 100%, 25% 65%, 12% 65%, 34% 36%, 23% 36%);
}
.sfdg-footer-trees i:nth-child(3n) { height: 100%; }
.sfdg-footer-trees i:nth-child(3n + 1) { height: 68%; }
@media (min-width: 621px) {
    .sfdg-footer-trees i { flex: 0 0 clamp(60px, 6vw, 86px); }
}
@media (max-width: 620px) {
    .sfdg-footer-trees i:nth-child(n + 15) { display: none; }
}
.sfdg-footer-content {
    display: grid;
    grid-template-columns: minmax(125px, max-content) minmax(0, 1fr);
    align-items: center;
    gap: 21px 30px;
    padding: 24px max(20px, calc((100% - 1150px) / 2)) 22px;
    background: var(--footer-green);
}
.sfdg-footer-logo {
    display: inline-block;
    width: 142px;
    padding: 5px 7px;
    border-radius: 5px;
    background: #fff8e9;
}
.sfdg-footer-logo img { width: 100%; height: auto; }
.sfdg-footer-content nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 20px; }
.sfdg-footer-content nav a { padding: 4px 0; color: #fff7e3; font-size: .89rem; font-weight: 650; text-decoration: none; }
.sfdg-footer-content nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sfdg-footer-note {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding-top: 14px;
    border-top: 1px solid #c1d5ca3d;
    color: #d9e5dc;
}
.sfdg-evergreen-footer .sfdg-footer-note p { margin: 0; }
.sfdg-footer-note small { font-size: .78rem; }
@media (max-width: 620px) {
    .sfdg-footer-content { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .sfdg-footer-content nav { justify-content: flex-start; }
    .sfdg-footer-note { gap: 8px; }
}


.sfdg-classic .sfdg-wheel-limit {
    width: min(calc(100% - 40px), 1150px);
    margin: 10px auto 0;
    padding: 11px 14px;
    border-inline-start: 3px solid #f5cc7e;
    border-radius: 6px;
    background: #221d13;
    color: #ffe1a4;
    font-size: .92rem;
    font-weight: 650;
}
.sfdg-classic .sfdg-wheel-limit[hidden] { display: none; }

.sfdg-classic .sfdg-prizes-page > .sfdg-hero {
    margin-bottom: clamp(24px, 4vw, 44px);
    padding-block: clamp(12px, 2.5vw, 28px) 0;
}
.sfdg-classic .sfdg-prizes-page > .sfdg-hero::before {
    display: block;
    width: 46px;
    height: 8px;
    margin-bottom: 14px;
    background: linear-gradient(#e6bc70, #e6bc70) left center / 30px 1px no-repeat;
    color: #e6bc70;
    content: '✦';
    font: 12px/8px system-ui, sans-serif;
    text-align: right;
}
.sfdg-classic .sfdg-prizes-page > .sfdg-hero h1 {
    margin: 0 0 10px;
    color: #fff;
}
.sfdg-classic .sfdg-prizes-page > .sfdg-hero .sfdg-online-note {
    max-width: 62ch;
    margin: 0;
    color: #fff;
}
