:root {
    color-scheme: dark;
    --ink: #f5f1e8;
    --muted: #aaa49a;
    --bg: #121311;
    --panel: #1c1e1a;
    --panel-soft: #171915;
    --line: #35382f;
    --gold: #d4a64a;
    --gold-light: #f1cc7b;
    --danger: #d86b68;
    --radius: 14px;
    --shadow: 0 22px 60px #0009;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 85% 0, #2b2518 0, transparent 30rem),
        radial-gradient(circle at 5% 55%, #1b2018 0, transparent 28rem),
        var(--bg);
    font: 16px/1.6 system-ui, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: .16;
    background-image: radial-gradient(#f1cc7b 0.55px, transparent 0.7px);
    background-size: 18px 18px;
    content: "";
    pointer-events: none;
    mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

a { color: inherit; }

.shell {
    width: min(1100px, calc(100% - 32px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 20;
    padding: 10px 14px;
    border-radius: 8px;
    color: #17140d;
    background: var(--gold-light);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

.hero {
    position: relative;
    overflow: hidden;
    padding: 70px 0 48px;
    border-bottom: 1px solid var(--line);
}

.hero::after {
    position: absolute;
    right: -8rem;
    bottom: -14rem;
    width: 33rem;
    height: 33rem;
    border: 1px solid #d4a64a24;
    border-radius: 50%;
    box-shadow: 0 0 0 45px #d4a64a0b, 0 0 0 90px #d4a64a07;
    content: "";
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.eyebrow, .category {
    margin: 0;
    color: var(--gold);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: .12em 0 .18em;
    font: clamp(3rem, 8vw, 5.7rem)/.94 Georgia, serif;
    letter-spacing: -.04em;
}

.hero__copy {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.12rem);
}

.hero__mark {
    position: relative;
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border: 1px solid #d4a64a66;
    border-radius: 50%;
}

.hero__mark::before,
.hero__mark::after,
.hero__mark span::before,
.hero__mark span::after {
    position: absolute;
    background: var(--gold-light);
    content: "";
}

.hero__mark::before { width: 36px; height: 2px; }
.hero__mark::after { width: 2px; height: 36px; }
.hero__mark span::before { width: 8px; height: 8px; border-radius: 50%; transform: translate(-24px, -24px); }
.hero__mark span::after { width: 5px; height: 5px; border-radius: 50%; transform: translate(28px, 26px); }

main { padding: 48px 0 10px; }

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

.section-head h2 {
    margin: .12em 0 0;
    font: 700 clamp(2rem, 5vw, 3rem)/1 Georgia, serif;
}

.game-count {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.games { display: grid; gap: 22px; }

.game-card {
    display: grid;
    grid-template-columns: minmax(220px, 31%) 1fr;
    overflow: clip;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(130deg, #20221e, var(--panel));
    box-shadow: 0 12px 36px #0003;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.game-card:hover {
    border-color: #766336;
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.game-card__visual {
    min-height: 330px;
    overflow: hidden;
    background: #0c0d0b;
}

.game-card__visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .5s ease;
}

.game-card:hover .game-card__visual img { transform: scale(1.025); }

.game-card__visual--empty {
    position: relative;
    display: grid;
    place-items: center;
    background:
        linear-gradient(145deg, transparent 48%, #d4a64a1a 49%, #d4a64a1a 51%, transparent 52%),
        radial-gradient(circle at 35% 25%, #353525, transparent 55%),
        #11130f;
}

.game-card__visual--empty::before {
    position: absolute;
    width: 130px;
    height: 130px;
    border: 1px solid #d4a64a4f;
    border-radius: 50%;
    box-shadow: 0 0 0 16px #d4a64a0b;
    content: "";
}

.game-card__visual--empty span {
    position: relative;
    z-index: 1;
    color: var(--gold-light);
    font: 700 4.5rem/1 Georgia, serif;
}

.game-card__body {
    min-width: 0;
    padding: clamp(24px, 4vw, 38px);
}

.game-card__topline,
.game-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: .76rem;
}

.status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7faa70;
    box-shadow: 0 0 0 4px #7faa7018;
}

.game-card__heading { margin: 16px 0 18px; }

.game-card h3 {
    margin: 0;
    font: 700 clamp(1.9rem, 4vw, 3rem)/1.04 Georgia, serif;
    letter-spacing: -.025em;
}

.button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border: 0;
    border-radius: 9px;
    color: #17140d;
    background: var(--gold);
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.button:hover { background: var(--gold-light); transform: translateY(-2px); }
.button:focus-visible, summary:focus-visible { outline: 3px solid #f1cc7b55; outline-offset: 4px; }
.button[aria-disabled="true"] { pointer-events: none; opacity: .45; }

.description {
    max-width: 720px;
    margin: 0 0 26px;
    color: #cfcbc2;
}

.scoreboard {
    overflow: hidden;
    margin-top: 2px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #10110f99;
}

.scoreboard summary {
    position: relative;
    min-height: 76px;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto auto 18px;
    gap: 20px;
    align-items: center;
    padding: 13px 16px;
    cursor: pointer;
    list-style: none;
}

.scoreboard summary::-webkit-details-marker { display: none; }

.scoreboard__label { display: grid; gap: 2px; min-width: 0; }
.scoreboard__label small { color: var(--gold); font-size: .64rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.scoreboard__label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scoreboard__label i { display: inline-grid; width: 22px; height: 22px; margin-right: 7px; place-items: center; border-radius: 50%; color: #17140d; background: var(--gold); font-size: .72rem; font-style: normal; }
.scoreboard__score { color: var(--gold-light); font: 700 1.08rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.scoreboard__action { color: var(--muted); font-size: .76rem; font-weight: 700; }
.scoreboard__chevron { width: 9px; height: 9px; border-right: 2px solid var(--gold-light); border-bottom: 2px solid var(--gold-light); transform: rotate(45deg) translateY(-3px); transition: transform .2s ease; }
.scoreboard[open] .scoreboard__chevron { transform: rotate(225deg) translate(-2px, -2px); }
.scoreboard[open] summary { border-bottom: 1px solid var(--line); }

.ranking {
    margin: 0;
    padding: 5px 16px 12px;
    list-style: none;
}

.ranking li {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: 42px;
    border-bottom: 1px solid #35382f99;
    color: var(--muted);
    font-size: .88rem;
}

.ranking li:last-child { border-bottom: 0; }
.ranking__winner { color: var(--ink) !important; }
.ranking__place { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-align: center; }
.ranking__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking strong { color: var(--gold-light); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.scoreboard--empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    color: var(--muted);
}

.scoreboard--empty small { color: #77766f; }

.notice {
    display: grid;
    gap: 5px;
    padding: 45px 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

.notice strong { color: var(--ink); font: 700 1.35rem/1.2 Georgia, serif; }
.notice--error { border-color: #d86b687a; }
.notice--error strong { color: #ffc0be; }

.reveal {
    opacity: 0;
    translate: 0 18px;
}

.reveal.is-visible {
    opacity: 1;
    translate: 0 0;
    transition: opacity .55s ease, translate .55s ease, border-color .25s ease, box-shadow .25s ease;
}

footer {
    margin-top: 70px;
    padding: 26px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .8rem;
}

.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.footer__links a,
.back-link,
.legal-content a {
    color: var(--gold-light);
    text-underline-offset: 3px;
}

.footer__links a:hover,
.back-link:hover,
.legal-content a:hover { color: var(--ink); }

.legal-hero {
    padding: 46px 0 34px;
    border-bottom: 1px solid var(--line);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
}

.legal-hero h1 {
    max-width: 850px;
    margin: .15em 0 0;
    font: clamp(2.7rem, 7vw, 5rem)/.96 Georgia, serif;
    letter-spacing: -.035em;
}

.legal-content {
    width: min(780px, calc(100% - 32px));
    margin-inline: auto;
    padding: 44px 0 10px;
}

.legal-content section {
    padding: 0 0 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--line);
}

.legal-content section:last-child { border-bottom: 0; }

.legal-content h2 {
    margin: 0 0 12px;
    font: 700 clamp(1.3rem, 3vw, 1.7rem)/1.2 Georgia, serif;
}

.legal-content h3 {
    margin: 22px 0 8px;
    font-size: 1rem;
}

.legal-content p,
.legal-content li { color: #cfcbc2; }

.legal-content ul { padding-left: 1.2rem; }
.legal-content li + li { margin-top: 7px; }

.legal-content address {
    color: #cfcbc2;
    font-style: normal;
}

.legal-content .legal-note {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: .9rem;
}

@media (max-width: 760px) {
    .hero { padding: 52px 0 35px; }
    .hero__mark { display: none; }
    main { padding-top: 36px; }
    .game-card { grid-template-columns: 1fr; }
    .game-card__visual { min-height: 0; aspect-ratio: 16 / 8.5; }
    .game-card__heading { align-items: flex-start; }
    .scoreboard summary { grid-template-columns: minmax(100px, 1fr) auto 18px; gap: 12px; }
    .scoreboard__action { display: none; }
}

@media (max-width: 500px) {
    .shell { width: min(100% - 20px, 1100px); }
    .section-head { align-items: flex-start; }
    .game-card__body { padding: 21px 17px; }
    .game-card__topline { gap: 12px; }
    .game-card__heading { display: grid; gap: 18px; }
    .button { justify-self: start; }
    .description { font-size: .94rem; }
    .scoreboard summary { grid-template-columns: minmax(0, 1fr) auto 14px; padding: 12px; }
    .scoreboard__score { font-size: .92rem; }
    .ranking { padding-inline: 12px; }
    .scoreboard--empty { align-items: flex-start; flex-direction: column; }
    .footer__inner { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; translate: none; }
}
