:root {
    color-scheme: light;
    color: #242328;
    background: #f7f6f2;
    font: 16px/1.6 system-ui, sans-serif;
    --ink: #242328;
    --muted: #56555d;
    --surface: #fff;
    --stroke: #e0dfe5;
    --accent: #33216e;
    --accent-dark: #21114e;
    --tint: #ede7fb;
    --hero: #e8e4f6;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-dark); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 2 * clamp(16px,5vw,56px))); margin-inline: auto; }
header, footer { padding-block: 1.05rem; }
header { display: flex; justify-content: space-between; gap: .75rem; align-items: center; border-bottom: 1px solid var(--stroke); }
.brand { font-weight: 780; text-decoration: none; }
.age { font-size: .83rem; color: var(--muted); }
.skip { position: absolute; transform: translateY(-160%); padding: .5rem; }
.skip:focus { transform: none; background: white; z-index: 1; }
.hero { margin: clamp(20px,4vw,47px) 0 1.2rem; }
.hero.has-cover, .hero-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(252px, .75fr);
    gap: clamp(15px,4vw,48px);
    align-items: center;
}
.hero.has-cover {
    padding: clamp(17px,4vw,38px);
    align-items: center;
    border-radius: 22px;
    background: var(--hero);
}
h1, h2, h3, p { margin: 0 0 .65em; }
h1 {
    font-size: clamp(2.05rem,5.3vw,3.8rem);
    line-height: 1.04;
    letter-spacing: -.042em;
    text-wrap: balance;
    overflow-wrap: anywhere;
    max-width: 22ch;
    margin-bottom: .35em;
}
h2 { font-size: clamp(1.2rem,2.4vw,1.7rem); line-height: 1.19; letter-spacing: -.018em; margin-bottom: .72em; }
h3 { line-height: 1.23; font-size: 1.06rem; }
.lead { font-size: clamp(1.025rem,2vw,1.2rem); max-width: 62ch; }
p { max-width: 72ch; }
p:last-child { margin-bottom: 0; }
.hero-text { padding-block: .9rem; }
.hero-stage {
    padding: clamp(18px,4vw,45px);
    background: var(--hero);
    border-radius: 22px;
}
.body-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(233px, .75fr); align-items: start; gap: 1rem; }
.body-grid > * { min-width: 0; }
.subject, .related {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: clamp(15px,3vw,26px);
    margin-block: .85rem;
}
.button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 46px; padding: .56rem 1.26rem;
    color: #fff; background: var(--accent); border: 1px solid var(--accent);
    border-radius: .65rem; font-weight: 740; text-decoration: none;
}
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.offer {
    display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center;
    justify-content: space-between; margin-block: .85rem; padding: clamp(15px,2.5vw,24px);
    color: var(--ink); background: var(--tint); border: 1px solid var(--stroke); border-radius: 16px;
}
.offer strong { display: block; font-size: clamp(1.22rem,2.3vw,1.75rem); line-height: 1.18; letter-spacing: -.035em; }
.offer span { display: block; margin-top: .2rem; color: var(--muted); font-size: .87rem; }
.offer code { font: 680 .91rem ui-monospace, monospace; color: var(--ink); }
.closing { margin-block: 1.3rem; text-align: center; }
.closing .button { min-width: 144px; }
.related ul { padding-left: 1.05rem; margin: 0; }
.related li + li { margin-top: .35rem; }
.comparison { overflow-wrap: anywhere; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; vertical-align: top; padding: .77rem .7rem; }
th { width: 27%; min-width: 98px; }
tr + tr { border-top: 1px solid var(--stroke); }
.comparison tr:first-child { background: var(--tint); }
.sequence ol { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.sequence li { position: relative; counter-increment: step; padding: .05rem 0 1.1rem 2.8rem; }
.sequence li::before {
    content: counter(step);
    position: absolute; left: 0; top: 0; width: 1.75rem; height: 1.75rem; display: grid; place-items: center;
    border-radius: 50%; background: var(--tint); border: 1px solid var(--stroke); color: var(--accent); font-weight: 760;
}
.sequence li + li { border-top: 1px solid var(--stroke); padding-top: .8rem; }
.sequence li + li::before { top: .8rem; }
.checks details { border: 1px solid var(--stroke); padding: .65rem .8rem; border-radius: .65rem; }
.checks details + details { margin-top: .65rem; }
.checks summary { cursor: pointer; color: var(--accent); font-weight: 750; }
.checks details p { margin: .55rem 0 0; }
.attributes dl { margin: 0; }
.attributes dt { font-weight: 760; }
.attributes dd { margin: .22rem 0 0; }
.attributes dl > div + div { border-top: 1px solid var(--stroke); padding-top: .82rem; margin-top: .82rem; }
.cards > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); gap: .8rem; }
.cards section { border-radius: .75rem; background: var(--tint); padding: .85rem 1rem; }
.game-art, .art-catalog figure { margin: 0; }
.game-art img, .art-catalog img { display: block; height: auto; width: 100%; border-radius: 12px; }
.game-art figcaption, .art-catalog figcaption { margin-top: .35rem; font-size: .82rem; color: var(--muted); }
.art-catalog { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
.art-catalog figure:first-child { grid-column: 1 / -1; }
.art-catalog figure:first-child img { max-height: 168px; object-fit: cover; }
footer { margin-top: 2rem; border-top: 1px solid var(--stroke); color: var(--muted); font-size: .85rem; }

body[data-layout="catalog"] { --accent:#164749; --accent-dark:#102b3b; --tint:#e0f0ed; --hero:#e2eee8; }
body[data-layout="catalog"] .related { border-left: 4px solid var(--accent); }
body[data-layout="rank"] { --accent:#624609; --accent-dark:#402900; --tint:#fff0c9; }
body[data-layout="rank"] .cards section { border-top: 4px solid #986d21; }
body[data-layout="compare"] { --accent:#234b89; --accent-dark:#142a4f; --tint:#e7effb; }
body[data-layout="compare"] .comparison th { background: var(--tint); }
body[data-layout="table"] { --accent:#224c44; --accent-dark:#153129; --tint:#e8f4ec; }
body[data-layout="table"] table th { border-right: 1px solid var(--stroke); }
body[data-layout="check"] { --accent:#643466; --accent-dark:#432147; --tint:#f5e8f5; }
body[data-layout="check"] .hero-text { border-left: 5px solid var(--accent); padding-inline: 1rem; }
body[data-layout="timeline"] { --accent:#774812; --accent-dark:#522d08; --tint:#faeedb; }
body[data-layout="timeline"] .sequence li::before { border-radius: .38rem; }
body[data-layout="diagram"] { --accent:#21445a; --accent-dark:#122735; --tint:#e3f0f8; }
body[data-layout="diagram"] .sequence ol { border-left: 2px solid #bed5e7; margin-left: .95rem; }
body[data-layout="diagram"] .sequence li::before { left: -.92rem; }
body[data-layout="desk"] { --accent:#185a49; --accent-dark:#103d32; --tint:#ddf0e5; }
body[data-layout="desk"] .hero-text { border-radius: 18px; padding: 1.25rem 1.45rem; color: #fff; background: #174c40; }
body[data-layout="live"] { --accent:#7e2b26; --accent-dark:#521612; --tint:#fbe9e6; --hero:#f5dcd9; }
body[data-layout="live"] .cards section:first-child { border-bottom: 3px solid #a34a3b; }
body[data-layout="devices"] { --accent:#16557c; --accent-dark:#083650; --tint:#e3f2f8; --hero:#d9eef8; }
body[data-layout="devices"] .hero-stage { border-radius: 26px 26px 7px 7px; border-bottom: 4px solid #4587a6; }
body[data-layout="coupon"] { --accent:#304f22; --accent-dark:#1b3115; --tint:#e9f4d8; }
body[data-layout="coupon"] .offer { border: 2px dashed #7e9a70; }
body[data-layout="ticket"] { --accent:#80364a; --accent-dark:#4c1829; --tint:#f7e6eb; }
body[data-layout="ticket"] .offer { border: 2px dashed #b77c8a; border-radius: 5px 15px 15px 5px; }
body[data-layout="focus"] { --accent:#592a75; --accent-dark:#351744; --tint:#f3e7fb; }
body[data-layout="focus"] .hero-feature { align-items: stretch; grid-template-columns: minmax(0, 1.35fr) minmax(235px, .65fr); }
body[data-layout="focus"] .hero-feature .headline { border-bottom: 3px solid #9d71ae; padding-block: .7rem; }
body[data-layout="focus"] .offer { margin-block: 0; }
body[data-route="sugar-megarush"] { --accent:#772b53; --accent-dark:#4e1434; --tint:#fbe6ef; }
body[data-route="sugar-megarush"] .hero-feature { border-radius: 24px; padding: clamp(19px,4vw,36px); background: radial-gradient(ellipse at top right,#f9dce8,#fff9f3 66%); }
body[data-layout="game"] { --accent:#263a84; --accent-dark:#192456; --tint:#e8eefc; --hero:#e5e9f7; }
body[data-layout="game"] .game-art { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
body[data-layout="variant"] { --accent:#533578; --accent-dark:#35224e; --tint:#eee8fa; --hero:#ebe4f5; }
body[data-layout="variant"] .hero.has-cover { border: 1px solid #c9b9db; }
body[data-route^="sweet-"] { --accent:#7b3627; --accent-dark:#4e2015; --tint:#f9ebe4; --hero:#f8e6d9; }
body[data-route^="gates-"] { --accent:#52447c; --accent-dark:#32264e; --tint:#efebf5; --hero:#e7ddf6; }
body[data-route^="big-bass-"] { --accent:#205064; --accent-dark:#133646; --tint:#e4f0f4; --hero:#dceef2; }

@media (max-width: 690px) {
    .hero.has-cover, .hero-feature, .body-grid, body[data-layout="focus"] .hero-feature { grid-template-columns: 1fr; }
    .body-grid { gap: 0; }
    .body-grid .offer { align-self: initial; }
    .hero-feature .offer { margin-top: 0; }
    .art-catalog figure:first-child img { max-height: 132px; }
}

.format-picks > div {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,152px),1fr));
    gap: .6rem;
}
.format-picks a {
    display: block; min-height: 84px; border: 1px solid var(--stroke);
    border-radius: .6rem; padding: .65rem .75rem; background: var(--tint);
    color: var(--ink); text-decoration: none;
}
.format-picks a:hover { border-color: var(--accent); }
.format-picks span { display: block; color: var(--muted); font-size: .86rem; }
.calculator { border-left: 4px solid var(--accent); }
.calc-fields { display: flex; flex-wrap: wrap; gap: .55rem 1rem; margin-bottom: .65rem; }
.calc-fields label { display: grid; gap: .25rem; width: min(100%,145px); font-weight: 720; }
.calc-fields input { font: inherit; max-width: 100%; padding: .3rem .5rem; border: 1px solid #9299a8; border-radius: .4rem; }
.calculator output { font-weight: 770; color: var(--accent); }
.note { color: var(--muted); font-size: .89rem; }
.directory { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: .85rem; align-items: start; }
.directory .related { margin: 0; }
