/*
 * Public site — gothic crimson & gold redesign (spec: dtgv2.md, Nov 2026).
 *
 * The homepage (/) and its shared chrome: tokens, header, footer, buttons, forms
 * and the Sign In dialog. Every public page loads it: the homepage on its own,
 * layouts/public.php with css/public.css, layouts/auth.php with css/auth.css.
 * Self-contained on purpose: none of them loads app.css or landing.css, so the
 * game's stylesheet can never reflow these pages after first paint, and the
 * 300 KB of game CSS is not on their critical path.
 *
 * Breakpoints (spec 4.3): mobile < 768, tablet 768-1023, desktop 1024-1439, large 1440+.
 */

:root {
    --dtg-bg: #080A0D;
    --dtg-panel: #11151A;
    --dtg-iron: #20252B;
    --dtg-steel: #343A42;
    --dtg-crimson: #8C1018;
    --dtg-crimson-hover: #B91C25;
    --dtg-crimson-text: #E0434B;
    --dtg-gold: #C5A16B;
    --dtg-gold-pale: #E4C99D;
    --dtg-text: #E9E4DC;
    --dtg-muted: #9EA4AD;

    --gold-line: rgba(197, 161, 107, 0.35);
    --gold-faint: rgba(197, 161, 107, 0.14);

    --font-display: 'Spectral SC', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    /* Reading text below the fold (card and section descriptions), the mockup's serif. Kept out of the hero so a
       late font swap can never shift anything in the first screen. */
    --font-prose: 'Spectral', Georgia, 'Times New Roman', serif;

    --container: 1360px;
    --gutter: clamp(16px, 4vw, 48px);
    --radius: 4px;
    --section-space: clamp(48px, 7vw, 88px);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    color-scheme: dark; /* native checkboxes, scrollbars and autofill in dark */
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--dtg-bg);
    color: var(--dtg-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
picture,
svg {
    display: block;
    max-width: 100%;
}

h1, h2, h3, p, ul, figure {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--dtg-gold-pale);
    outline-offset: 3px;
}

.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Android app mode: <html class="app-android"> inside the Play Store app (partials/app-shell.php). The public pages load this
   file, not app.css, so they need their own copy of app.css's rule: .hide-in-app (the Google Play badge) never shows in the app. */
html.app-android .hide-in-app {
    display: none !important;
}

.icon-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--dtg-panel);
    color: var(--dtg-gold-pale);
    border: 1px solid var(--dtg-gold);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 12px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 200ms ease, box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease, color 200ms ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(180deg, #A71922 0%, #650B11 100%);
    border: 1px solid var(--dtg-gold);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.5);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #C0202A 0%, #810E16 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 18px rgba(140, 16, 24, 0.55);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--dtg-gold-pale);
    background: linear-gradient(180deg, rgba(52, 58, 66, 0.85), rgba(32, 37, 43, 0.85));
    border: 1px solid var(--gold-line);
}

.btn-secondary:hover {
    border-color: var(--dtg-gold);
    color: #fff;
    transform: translateY(-1px);
}

.btn-lg {
    min-height: 52px;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    text-transform: none;
}

.btn .icon {
    width: 1.25em;
    height: 1.25em;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ---------- Forms (Sign In dialog; the auth pages build on these in css/auth.css) ---------- */

.form-group {
    margin-bottom: 16px;
}

/* not the checkbox labels: as a block they dropped the box onto the text's baseline, out of line with its text */
.form-group > label:not(.checkbox-label) {
    display: block;
    margin-bottom: 6px;
    color: var(--dtg-text);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-control {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    background: #0B0E12;
    border: 1px solid var(--dtg-steel);
    border-radius: var(--radius);
    color: var(--dtg-text);
    font: inherit;
    font-size: 1rem;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-control::placeholder {
    color: #6F757E;
}

.form-control:focus {
    outline: none;
    border-color: var(--dtg-gold);
    box-shadow: 0 0 0 3px rgba(197, 161, 107, 0.25);
}

/* Show / hide password: the eye button js/home.js adds inside every password field. */
.pw-field {
    position: relative;
    display: block;
}

.has-pw-toggle > .form-control {
    padding-right: 52px;
}

.pw-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: var(--radius);
    color: var(--dtg-muted);
    cursor: pointer;
}

.pw-toggle:hover {
    color: var(--dtg-gold-pale);
}

.pw-toggle:focus-visible {
    outline-offset: -4px;
}

.pw-toggle .icon {
    width: 20px;
    height: 20px;
}

/* The sign-up wizard shows its check mark at the field's right edge: the eye sits just left of it. */
.input-wrapper.has-pw-toggle > .form-control {
    padding-right: 76px;
}

.input-wrapper.has-pw-toggle > .pw-toggle {
    right: 28px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--dtg-muted);
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--dtg-crimson-hover);
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 10px;
    margin-top: 14px;
    font-size: 0.92rem;
}

.auth-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--dtg-gold-pale);
    text-decoration: underline;
    text-decoration-color: var(--gold-line);
    text-underline-offset: 3px;
}

.auth-links a:hover {
    color: #fff;
}

/* The sign-up legal note (auth/partials/signup-legal-note.php): one flowing sentence with two links, so not the
   flex row of .auth-links (which split it into pieces). Loaded by the auth layout and the homepage Sign In dialog. */
.auth-legal-note {
    margin: 14px 0 0;
    font-size: 0.85rem;
    line-height: 1.55;
    text-align: center;
    color: var(--dtg-muted);
}

.auth-legal-note a {
    color: var(--dtg-gold-pale);
    text-decoration: underline;
    text-decoration-color: var(--gold-line);
    text-underline-offset: 3px;
}

.auth-legal-note a:hover {
    color: #fff;
}

.auth-links .separator {
    color: var(--dtg-steel);
}

.oauth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px;
    color: var(--dtg-muted);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.oauth-divider::before,
.oauth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--dtg-steel);
}

.oauth-buttons {
    display: grid;
    gap: 10px;
}

/* Each provider brings its own colours (style="--oauth-bg; --oauth-text" from auth_oauth_providers). */
.btn-oauth {
    width: 100%;
    background: var(--oauth-bg, var(--dtg-iron));
    color: var(--oauth-text, var(--dtg-text));
    border: 1px solid rgba(255, 255, 255, 0.14);
    letter-spacing: 0.01em;
    text-transform: none;
}

.btn-oauth:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.oauth-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
}

.oauth-icon svg {
    width: 100%;
    height: 100%;
}

/* ---------- Header: brand bar ---------- */

.site-header {
    position: relative;
    z-index: 20;
    background:
        radial-gradient(ellipse 50% 120% at 50% 0%, rgba(140, 16, 24, 0.22), transparent 70%),
        linear-gradient(180deg, #0d1014 0%, var(--dtg-bg) 100%);
}

.brandbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    max-width: calc(1440px + 2 * var(--gutter));
    min-height: 104px;
    margin-inline: auto;
    padding: 12px var(--gutter) 10px;
}

.brandbar-claim {
    display: flex;
    flex-direction: column;
    font-family: var(--font-display);
    text-transform: uppercase;
    line-height: 1.35;
}

.claim-main {
    color: var(--dtg-text);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

.claim-sub {
    color: var(--dtg-muted);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
}

/* Header, left: live counts for the last 24h on a gold rule, with a "live" dot sitting on the rule. */
.brandbar-pulse {
    justify-self: start;
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    gap: 4px 16px;
    margin: 0;
    padding-left: 14px;
    border-left: 1px solid var(--gold-line);
    font-family: var(--font-display);
    text-transform: uppercase;
    line-height: 1.3;
}

.pulse-row {
    display: contents;
}

.brandbar-pulse dt {
    position: relative;
    color: var(--dtg-muted);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    white-space: nowrap;
}

.brandbar-pulse dd {
    margin: 0;
    color: var(--dtg-gold-pale);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}

.pulse-dot {
    position: absolute;
    top: 50%;
    left: -18px;
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--dtg-crimson-text);
    animation: pulse-ring 2.4s ease-out infinite;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(224, 67, 75, 0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(224, 67, 75, 0); }
    100% { box-shadow: 0 0 0 0 rgba(224, 67, 75, 0); }
}

.brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(420px, 100%);
    text-decoration: none;
    line-height: 1;
}

/* luK's logo film (partials/site-header.php): still + 10 s loop, same box, no layout shift. The film's near-black
   background is dropped with "lighten" and its edges fade out, so only the logo sits on the header. */
.brand-wrap {
    position: relative;
}

.brand.brand--film {
    width: 340px; /* a fixed width: the header's middle column sizes to its content, so a % width would collapse to 0 */
    max-width: 100%;
}

.brand-film {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 680 / 208;
    mix-blend-mode: lighten;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
    mask-composite: intersect;
}

.brand-film img,
.brand-film-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.brand-film-video {
    opacity: 0;
    transition: opacity 300ms ease;
}

.brand-film-video.is-playing {
    opacity: 1;
}

/* Pause / play for the loop (WCAG 2.2.2): faint beside the logo until pointed at or focused. */
.brand-film-toggle {
    position: absolute;
    top: 50%;
    left: 100%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--dtg-gold-pale);
    opacity: 0.35;
    cursor: pointer;
    transition: opacity 180ms ease, border-color 180ms ease;
}

.brand-film-toggle[hidden] {
    display: none;
}

.brand-film-toggle:hover,
.brand-film-toggle:focus-visible,
.brand-wrap:hover .brand-film-toggle {
    opacity: 1;
}

.brand-film-toggle:hover {
    border-color: var(--gold-line);
}

.brand-film-toggle .icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    stroke: none;
}

.brand-film-toggle .icon-play,
.brand-film-toggle.is-paused .icon-pause {
    display: none;
}

.brand-film-toggle.is-paused .icon-play {
    display: block;
}

.brand-crown {
    width: 44px;
    height: 22px;
    margin-bottom: 2px;
    fill: var(--dtg-crimson);
    stroke: var(--dtg-gold);
    stroke-width: 1.4;
    stroke-linejoin: round;
}

.brand-crown-band {
    fill: none;
    stroke: var(--dtg-gold);
    stroke-width: 2;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.9rem, 3vw, 2.75rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d9dde2;
    background: linear-gradient(180deg, #ffffff 0%, #c9ced5 45%, #7e858f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.8));
}

.brand-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5em;
    padding-left: 0.5em;
    text-transform: uppercase;
    color: var(--dtg-crimson-text);
}

.brand-sub::before,
.brand-sub::after {
    content: "";
    width: 44px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dtg-crimson-hover));
}

.brand-sub::after {
    transform: scaleX(-1);
}

.brandbar-era {
    justify-self: end;
    display: block;
    width: 64px;
    height: 64px;
}

.brandbar-era img {
    display: block;
    width: 100%;
    height: 100%;
}

/* ---------- Header: main navigation ---------- */

.mainnav {
    position: relative;
    background: linear-gradient(180deg, #1b1f25 0%, #12161b 100%);
    border-top: 1px solid var(--dtg-steel);
    border-bottom: 1px solid var(--dtg-steel);
    box-shadow: inset 0 1px 0 var(--gold-faint), inset 0 -1px 0 var(--gold-faint), 0 6px 18px rgba(0, 0, 0, 0.5);
}

.mainnav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    max-width: calc(1440px + 2 * var(--gutter));
    min-height: 60px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.nav-toggle {
    display: none;
}

.nav-list {
    display: flex;
    align-items: stretch;
}

.nav-list li + li {
    border-left: 1px solid rgba(52, 58, 66, 0.7);
}

.nav-list a,
.nav-signin {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    height: 100%;
    min-height: 44px;
    padding: 0 clamp(14px, 1.8vw, 26px);
    color: var(--dtg-text);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
    transition: background 180ms ease, color 180ms ease;
}

.nav-list a .icon,
.nav-signin .icon {
    color: var(--dtg-gold);
}

.nav-list a::after,
.nav-signin::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 2px;
    background: var(--dtg-crimson-hover);
    transform: scaleX(0);
    transition: transform 180ms ease;
}

.nav-list a:hover,
.nav-signin:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--dtg-gold-pale);
}

.nav-list a:hover::after,
.nav-signin:hover::after {
    transform: scaleX(1);
}

/* The page you are on (Home): marked like a permanent hover. */
.nav-list a[aria-current="page"] {
    color: var(--dtg-gold-pale);
}

.nav-list a[aria-current="page"]::after {
    transform: scaleX(1);
}

.nav-list a:focus-visible,
.nav-signin:focus-visible {
    outline-offset: -3px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-play {
    margin-block: 7px;
    font-family: var(--font-display);
    font-size: 1rem;
    text-transform: none;
    letter-spacing: 0.05em;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: clamp(440px, 38vw, 560px);
    padding-block: 48px 96px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 70% at 70% 40%, rgba(140, 16, 24, 0.18), transparent 70%),
        var(--dtg-bg);
}

.hero-art {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: -2;
    width: 78%;
}

/* Poster and film share one box and one mask; the film fades in over its own first frame once it actually plays. */
.hero-poster,
.hero-art img,
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-art img,
.hero-video {
    object-fit: cover;
    object-position: 50% 40%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 22%, #000 48%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 22%, #000 48%);
}

.hero-video {
    opacity: 0;
    transition: opacity 800ms ease;
}

.hero-video.is-playing {
    opacity: 1;
}

/* Pause / play for the film (WCAG 2.2.2: motion longer than 5 s needs a way to stop it). */
.hero-motion {
    position: absolute;
    right: var(--gutter);
    bottom: 76px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(8, 10, 13, 0.6);
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    color: var(--dtg-gold-pale);
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease;
}

.hero-motion[hidden] {
    display: none;
}

.hero-motion:hover {
    border-color: var(--dtg-gold);
    background: rgba(17, 21, 26, 0.85);
}

.hero-motion .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: none;
}

.hero-motion .icon-play,
.hero-motion.is-paused .icon-pause {
    display: none;
}

.hero-motion.is-paused .icon-play {
    display: block;
}

/* Vignette + bottom fade into the stats bar, then the slow fog layer. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(8, 10, 13, 0.55) 0%, transparent 22%, transparent 62%, var(--dtg-bg) 100%),
        linear-gradient(90deg, var(--dtg-bg) 0%, rgba(8, 10, 13, 0.75) 30%, transparent 62%);
}

.hero-fog {
    position: absolute;
    inset: -10% -30%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    background:
        radial-gradient(ellipse 30% 18% at 30% 82%, rgba(200, 205, 215, 0.10), transparent 70%),
        radial-gradient(ellipse 26% 14% at 70% 88%, rgba(200, 205, 215, 0.08), transparent 70%),
        radial-gradient(ellipse 22% 12% at 50% 76%, rgba(185, 28, 37, 0.10), transparent 70%);
    animation: fog-drift 32s ease-in-out infinite alternate;
}

@keyframes fog-drift {
    from { transform: translate3d(-6%, 0, 0); }
    to   { transform: translate3d(6%, -2%, 0); }
}

.hero-inner {
    position: relative;
}

.hero-inner > * {
    max-width: 560px;
}

.eyebrow {
    margin-bottom: 14px;
    color: var(--dtg-gold);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-title {
    display: flex;
    flex-direction: column;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 0.98;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hero-title-top {
    font-size: clamp(2.3rem, 4.6vw, 4.1rem);
    color: #e9e4dc;
    background: linear-gradient(180deg, #ffffff 0%, #d7d2ca 55%, #9c968d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.9));
}

.hero-title-accent {
    font-size: clamp(3rem, 6.4vw, 5.6rem);
    color: var(--dtg-crimson-text);
    background: linear-gradient(180deg, #f0525a 0%, #c41e28 55%, #8a0f17 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.9));
}

.hero-lead {
    margin-top: 18px;
    max-width: 440px !important;
    color: var(--dtg-text);
    font-size: clamp(1rem, 1.3vw, 1.125rem);
    line-height: 1.55;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hero-inner > .hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    max-width: 640px;
    margin-top: 28px;
}

.hero-note {
    display: none;
}

/* ---------- Realm statistics ---------- */

.realm-stats {
    position: relative;
    z-index: 2;
    margin-top: -56px;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
    margin-inline: auto;
    padding: 6px;
    background: linear-gradient(180deg, #1a1e24 0%, #0f1216 100%);
    border: 1px solid var(--dtg-steel);
    border-radius: var(--radius);
    box-shadow: inset 0 0 0 1px var(--gold-faint), 0 12px 30px rgba(0, 0, 0, 0.6);
}

.stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px 12px;
}

.stat + .stat {
    border-left: 1px solid var(--dtg-steel);
    box-shadow: inset 1px 0 0 var(--gold-faint);
}

.stat-icon {
    width: 46px;
    height: 46px;
    flex: none;
    fill: none;
    stroke: var(--dtg-gold);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.stat-value {
    color: var(--dtg-gold-pale);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    font-variant-numeric: lining-nums tabular-nums;
}

.stat-label {
    margin-top: 4px;
    color: var(--dtg-text);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* ---------- Sections ---------- */

.section {
    padding-block: var(--section-space) 0;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: var(--dtg-gold);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.45rem, 2.8vw, 2.25rem);
    letter-spacing: 0.07em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

/* Fading crimson-to-gold rule ending in a small gold diamond next to the title; mirrored on the right. */
.section-title::before,
.section-title::after {
    content: "";
    flex: 0 1 160px;
    min-width: 30px;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='10'%3E%3Cdefs%3E%3ClinearGradient id='g'%3E%3Cstop offset='0' stop-color='%23B91C25' stop-opacity='0'/%3E%3Cstop offset='.6' stop-color='%23B91C25'/%3E%3Cstop offset='1' stop-color='%23C5A16B'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect y='4.5' width='146' height='1' fill='url(%23g)'/%3E%3Cpath d='M154 .5 158.5 5 154 9.5 149.5 5Z' fill='%23C5A16B'/%3E%3C/svg%3E") right center / 160px 10px no-repeat;
}

.section-title::after {
    transform: scaleX(-1);
}

.section-desc {
    max-width: 640px;
    margin: 12px auto 0;
    color: #BDB7AD;
    font-family: var(--font-prose);
    font-size: 1.15rem;
    line-height: 1.45;
    text-align: center;
}

/* ---------- Master the Art of War ---------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    margin-top: 36px;
}

.feature-grid > li {
    display: flex;
}

.feature-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: linear-gradient(180deg, var(--dtg-iron) 0%, #14181d 100%);
    border: 1px solid var(--dtg-steel);
    border-radius: var(--radius);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 6px 16px rgba(0, 0, 0, 0.45);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

/* Corner ornaments */
.feature-card::before,
.feature-card::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--gold-line);
    border-style: solid;
    pointer-events: none;
}

.feature-card::before {
    top: 5px;
    left: 5px;
    border-width: 1px 0 0 1px;
}

.feature-card::after {
    right: 5px;
    bottom: 5px;
    border-width: 0 1px 1px 0;
}

/* The illustration fills the top of the card, as in the mockup, with a gold rule under it. */
.feature-art {
    display: block;
    aspect-ratio: 284 / 154;
    background: #0c0f12;
    border-bottom: 1px solid var(--gold-line);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.feature-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.feature-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 14px 20px;
    text-align: center;
}

.feature-icon {
    width: 26px;
    height: 26px;
    margin-bottom: 2px;
    color: var(--dtg-gold);
    stroke-width: 1.6;
}

.feature-title {
    color: var(--dtg-gold-pale);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    line-height: 1.25;
    text-transform: uppercase;
}

.feature-text {
    color: #CFC9BF;
    font-family: var(--font-prose);
    font-size: 1.02rem;
    line-height: 1.35;
}

.feature-card.is-link:hover {
    border-color: var(--dtg-gold);
    transform: translateY(-3px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 12px 26px rgba(0, 0, 0, 0.6);
}

.feature-card.is-link:hover .feature-art img {
    transform: scale(1.04);
}

.feature-card.is-link .feature-title::after {
    content: " \203A";
    color: var(--dtg-gold);
}

/* ---------- Game Preview ---------- */

.preview-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-top: 36px;
}

.preview-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 6px;
    background: linear-gradient(180deg, #1b1f25, #101317);
    border: 1px solid var(--dtg-steel);
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
    text-decoration: none;
    cursor: zoom-in;
    transition: border-color 180ms ease, transform 180ms ease;
}

.preview-shot {
    border: 1px solid #000;
    overflow: hidden;
}

.preview-shot img {
    width: 100%;
    height: auto;
    aspect-ratio: 640 / 315;
}

.preview-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 6px 6px;
    color: var(--dtg-gold-pale);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.preview-label .icon {
    color: var(--dtg-gold);
}

.preview-card:hover {
    border-color: var(--dtg-gold);
    transform: translateY(-2px);
}

/* ---------- Choose Your Path ---------- */

.paths {
    position: relative;
}

.paths-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 28px;
    margin-top: 32px;
}

.path-group--classes {
    position: relative;
    padding-left: 28px;
    border-left: 1px solid var(--dtg-steel);
}

.group-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--dtg-gold);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portrait-grid {
    display: grid;
    gap: 10px;
}

.path-group--races .portrait-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.path-group--classes .portrait-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portrait {
    --tint: 158, 164, 173;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 0 10px;
    background: linear-gradient(180deg, #171b20, #0e1114);
    border: 1px solid var(--dtg-steel);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.bonus-offense { --tint: 185, 28, 37; }
.bonus-defense { --tint: 70, 110, 160; }
.bonus-income  { --tint: 197, 161, 107; }
.bonus-spy     { --tint: 120, 90, 160; }

.portrait-frame {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 5 / 6;
    margin-bottom: 8px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(var(--tint), 0.42) 0%, rgba(var(--tint), 0.12) 45%, transparent 75%),
        linear-gradient(180deg, #1d2228, #0b0d10);
    border-bottom: 1px solid var(--dtg-steel);
    box-shadow: inset 0 0 0 1px rgba(197, 161, 107, 0.12), inset 0 -18px 24px rgba(0, 0, 0, 0.55);
}

.portrait-frame picture,
.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    transition: transform 180ms ease;
}

.portrait:hover .portrait-frame img {
    transform: scale(1.04);
}

.portrait-mono {
    color: var(--dtg-gold-pale);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    opacity: 0.9;
}

.portrait-name {
    padding-inline: 4px;
    color: var(--dtg-text);
    font-family: var(--font-prose);
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.15;
}

.portrait-bonus {
    margin-top: 3px;
    padding-inline: 4px;
    color: var(--dtg-muted);
    font-size: 0.72rem;
    line-height: 1.25;
}

.portrait:hover,
.portrait.is-active {
    border-color: rgba(var(--tint), 0.9);
    box-shadow: 0 0 0 1px rgba(var(--tint), 0.45), 0 8px 18px rgba(0, 0, 0, 0.5);
}

.portrait:hover {
    transform: translateY(-2px);
}

.path-detail {
    max-width: 760px;
    min-height: 92px;
    margin: 28px auto 0;
    padding: 16px 22px;
    background: linear-gradient(180deg, rgba(32, 37, 43, 0.7), rgba(17, 21, 26, 0.7));
    border: 1px solid var(--dtg-steel);
    border-left: 3px solid var(--dtg-crimson-hover);
    border-radius: var(--radius);
}

.path-detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
}

.path-detail-name {
    color: var(--dtg-gold-pale);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
}

.path-detail-bonus {
    color: var(--dtg-gold);
    font-weight: 600;
    font-size: 0.9rem;
}

.path-detail-desc {
    margin-top: 6px;
    color: #CFC9BF;
    font-family: var(--font-prose);
    font-size: 1.08rem;
}

/* ---------- Final call to action ---------- */

.final-cta {
    position: relative;
    isolation: isolate;
    margin-top: var(--section-space);
    padding-block: clamp(56px, 7vw, 88px) clamp(64px, 8vw, 100px);
    overflow: hidden;
    text-align: center;
    border-top: 1px solid var(--dtg-steel);
    border-bottom: 1px solid var(--dtg-steel);
    box-shadow: inset 0 1px 0 var(--gold-faint);
}

.final-cta-sky {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 70% 55% at 50% 100%, rgba(232, 104, 36, 0.55) 0%, rgba(185, 28, 37, 0.38) 35%, transparent 72%),
        radial-gradient(ellipse 40% 40% at 50% 58%, rgba(8, 10, 13, 0.7), transparent 75%),
        linear-gradient(180deg, #0b0d11 0%, #1a0d10 52%, #3b1210 78%, #120708 100%);
}

.final-cta-skyline {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    width: 100%;
    height: clamp(70px, 11vw, 160px);
    max-width: none;
    fill: #07080a;
}

.final-cta-title {
    color: var(--dtg-gold-pale);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4.6vw, 3.5rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
    background: linear-gradient(180deg, #f6e4c0 0%, #d8b57e 55%, #a07c48 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.9));
}

.final-cta .eyebrow {
    color: var(--dtg-gold-pale);
}

.final-cta .btn {
    margin-top: 26px;
}

.final-cta-note {
    margin-top: 14px;
    color: var(--dtg-text);
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ---------- "Get it on Google Play" (partials/play-badge.php) ----------
   Google's badge rules: at least 28px tall; clear space of a quarter of the badge height on every side (the padding below,
   so nothing else may sit or paint inside it: no background, no border on the link); never recoloured, so no filter or
   opacity either. The focus ring is drawn outside the clear space. */
.play-badge {
    display: inline-block;
    vertical-align: top;
    padding: 10px;
    line-height: 0;
    border-radius: 6px;
}

.play-badge img {
    display: block;
    width: auto;
    height: 40px;
}

/* A white ring between two black ones, all outside the clear space: visible on any background behind the badge. */
.play-badge:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px #000;
}

/* Homepage closing band: a little larger, under "Free to play" (12px = a quarter of 48px). */
.final-cta .play-badge {
    margin-top: 6px;
    padding: 12px;
}

.final-cta .play-badge img {
    height: 48px;
}

/* Footer: one of the social marks, as tall as their two lines of text (9px = a quarter of 36px). A block in its list item, so
   no line box adds space under it, and the row centres every mark on one line (the 54px badge next to the 44px text marks). */
.footer-badges {
    align-items: center;
}

.footer-badges .play-badge {
    display: block;
    padding: 9px;
}

.footer-badges .play-badge img {
    height: 36px;
}

/* ---------- Closing-band backdrop (partials/cta-art.php): homepage .final-cta and the public pages' .pub-cta-band ---------- */

/* The page's scene covers the band; a vignette, darkest where the text is, keeps the text readable. */
.has-art {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.cta-art {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.cta-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.has-art::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 46% 72% at 50% 50%, rgba(8, 10, 13, 0.86) 0%, rgba(8, 10, 13, 0.66) 58%, rgba(8, 10, 13, 0.2) 100%),
        linear-gradient(180deg, rgba(8, 10, 13, 0.35) 0%, rgba(8, 10, 13, 0.1) 45%, rgba(8, 10, 13, 0.6) 100%);
}

/* Phones: the text spans the whole band, so an even veil instead of a centred one. */
@media (max-width: 767px) {
    .has-art::before {
        background: linear-gradient(180deg, rgba(8, 10, 13, 0.6) 0%, rgba(8, 10, 13, 0.72) 100%);
    }

    /* The homepage title is a gold gradient whose darkest tone needs the deeper veil (measured 3.5:1 vs 2.6:1). */
    .final-cta.has-art::before {
        background: linear-gradient(180deg, rgba(8, 10, 13, 0.74) 0%, rgba(8, 10, 13, 0.8) 100%);
    }
}

/* ---------- Footer ---------- */

.site-footer {
    padding-block: 28px 32px;
    background: #06070a;
    color: var(--dtg-muted);
    font-size: 0.92rem;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 28px;
    padding-block: 14px;
}

.footer-row + .footer-row {
    border-top: 1px solid rgba(197, 161, 107, 0.16);
}

.footer-row--main {
    justify-content: space-between;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 6px;
}

.footer-links a,
.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding-inline: 10px;
    color: var(--dtg-text);
    text-decoration: none;
    transition: color 180ms ease;
}

.footer-links a:hover,
.footer-links a[aria-current="page"],
.footer-badge:hover {
    color: var(--dtg-gold-pale);
}

.icon-ext {
    width: 0.85em;
    height: 0.85em;
    color: var(--dtg-gold);
}

/* Two-line links with a gold mark: the toplist vote, Discord, Reddit. */
.footer-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 28px;
}

.footer-badge {
    gap: 10px;
    padding-inline: 0;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.footer-badge-icon {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--dtg-gold);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Brand logos are solid shapes: filled, and a little smaller so they weigh the same as the line trophy. */
.footer-badge-icon--brand {
    width: 26px;
    height: 26px;
    fill: var(--dtg-gold);
    stroke: none;
}

.footer-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.footer-badge-pre {
    color: var(--dtg-muted);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-brand {
    display: flex;
    justify-content: center;
    padding-top: 18px;
    border-top: 1px solid rgba(197, 161, 107, 0.16);
}

.footer-powered {
    display: block;
    width: min(75%, 340px);
    border-radius: var(--radius);
}

/* Dimmed so it sits back in the footer; full brightness on hover/focus. */
.footer-powered img {
    display: block;
    width: 100%;
    height: auto;
    filter: brightness(0.62);
    transition: filter 180ms ease;
}

.footer-powered:hover img,
.footer-powered:focus-visible img {
    filter: brightness(1);
}

/* ---------- Lightbox ---------- */

.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 56px 64px;
    border: 0;
    background: transparent;
    color: var(--dtg-text);
    overflow: hidden;
}

.lightbox[open] {
    display: grid;
    place-items: center;
}

.lightbox::backdrop {
    background: rgba(4, 5, 7, 0.94);
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    max-height: 100%;
}

.lightbox-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100dvh - 160px);
    border: 1px solid var(--dtg-steel);
    box-shadow: 0 0 0 1px var(--gold-faint), 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
    color: var(--dtg-gold-pale);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lightbox-btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: rgba(17, 21, 26, 0.9);
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    color: var(--dtg-gold-pale);
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease;
}

.lightbox-btn:hover {
    border-color: var(--dtg-gold);
    background: rgba(32, 37, 43, 0.95);
}

.lightbox-btn .icon {
    width: 24px;
    height: 24px;
}

.lightbox-prev  { left: 10px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-close { right: 10px; top: 10px; }

html.lightbox-open,
html.dialog-open {
    overflow: hidden;
}

/* ---------- Maintenance (partials/maintenance-dialog.php, partials/locked-cta.php) ---------- */

/* Locked sign-in / sign-up / enter-game buttons: same shape, no crimson, a gold gear; a press reopens the notice. */
.btn.is-locked,
.btn.is-locked:hover {
    color: var(--dtg-muted);
    background: linear-gradient(180deg, #2A3038 0%, #1A1E24 100%);
    border: 1px solid var(--dtg-steel);
    box-shadow: none;
    transform: none;
    cursor: help;
}

.nav-signin.is-locked {
    color: var(--dtg-muted);
    background: none;
    border: 0;
    cursor: help;
}

.nav-signin.is-locked:hover {
    color: var(--dtg-text);
}

.is-locked .icon {
    color: var(--dtg-gold);
}

.maint-dialog {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--dtg-text);
    overflow: auto;
}

/* Without JavaScript the notice is a plain open dialog: keep it centred above the page. */
.maint-dialog[open]:not(:modal) {
    position: fixed;
    inset: 0;
    z-index: 60;
    height: fit-content;
}

.maint-dialog::backdrop {
    background: rgba(4, 5, 7, 0.82);
    backdrop-filter: blur(2px);
}

.maint-card {
    position: relative;
    padding: 30px 28px 26px;
    text-align: center;
    background:
        radial-gradient(ellipse 80% 45% at 50% 0, rgba(140, 16, 24, 0.28), transparent 70%),
        linear-gradient(180deg, #171B21 0%, #0E1115 100%);
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(228, 201, 157, 0.08);
}

/* The OG gear (images/home/maintenance/emblem). The shadow sits on the frame so it stays below while the gear turns. */
.maint-art {
    display: block;
    width: min(140px, 45%);
    margin: 0 auto 12px;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6));
}

/* A slow, steady turn: one revolution every 14 s (off with reduced motion). */
.maint-art img {
    width: 100%;
    height: auto;
    animation: maint-gear 14s linear infinite;
}

@keyframes maint-gear {
    to { transform: rotate(360deg); }
}

.maint-cog {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    margin: 4px auto 14px;
    color: var(--dtg-gold);
    background: radial-gradient(circle, rgba(197, 161, 107, 0.16), rgba(14, 17, 21, 0.9) 70%);
    border: 1px solid var(--gold-line);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(197, 161, 107, 0.06);
}

.maint-cog .icon {
    width: 52px;
    height: 52px;
    stroke-width: 1.5;
    animation: maint-turn 12s linear infinite;
}

@keyframes maint-turn {
    to { transform: rotate(360deg); }
}

.maint-eyebrow {
    margin: 0 0 14px;
    color: var(--dtg-crimson-text);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* partials/maintenance-copy.php: luK's lines, one paragraph each. The notice focuses this block when it opens. */
.maint-copy {
    color: #D6D0C6;
    font-family: var(--font-prose);
    font-size: 1.12rem;
    line-height: 1.55;
}

.maint-copy:focus {
    outline: none;
}

.maint-copy p + p {
    margin-top: 10px;
}

.maint-copy .maint-throne {
    margin-top: 16px;
    color: var(--dtg-gold-pale);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.maint-copy .maint-eta {
    margin-top: 14px;
    color: var(--dtg-gold);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
}

/* The 503 page (errors/maintenance.php): the same card, alone on the page under the logo. */
.maint-page-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    min-height: 100dvh;
    padding: clamp(28px, 6vw, 64px) 16px;
    background:
        radial-gradient(ellipse 70% 360px at 50% 0, rgba(140, 16, 24, 0.22), transparent 70%),
        var(--dtg-bg);
}

.maint-page-brand {
    width: min(300px, 100%);
}

.maint-page .maint-card {
    width: min(520px, 100%);
}

.maint-page .maint-browse {
    margin-top: 22px;
}

/* ---------- Sign In dialog (partials/login-dialog.php) ---------- */

.auth-dialog {
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--dtg-text);
    overflow: auto;
}

.auth-dialog::backdrop {
    background: rgba(4, 5, 7, 0.82);
    backdrop-filter: blur(2px);
}

.auth-dialog-card {
    position: relative;
    padding: 28px 26px 18px;
    background: linear-gradient(180deg, #171B21 0%, #0E1115 100%);
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(228, 201, 157, 0.08);
}

.auth-dialog-title {
    margin: 0 0 20px;
    color: var(--dtg-gold-pale);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.auth-dialog-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: var(--radius);
    color: var(--dtg-muted);
    cursor: pointer;
}

.auth-dialog-close:hover {
    color: var(--dtg-gold-pale);
}

.auth-dialog-close .icon {
    width: 22px;
    height: 22px;
}

/* ---------- Cookie consent (partials/cookie-consent.php, restyled for this page) ---------- */

.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 14px var(--gutter);
    background: rgba(11, 13, 17, 0.97);
    border-top: 1px solid var(--dtg-steel);
    box-shadow: inset 0 1px 0 var(--gold-faint), 0 -8px 24px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    visibility: hidden;
    /* Only the slide animates (on the compositor). visibility flips without an animation: at once when the banner
       comes in, and only after the 300 ms slide when it leaves, so it is still drawn while it slides away. An animated
       visibility is a non-composited animation in Lighthouse (2026-11-16). */
    transition: transform 300ms ease, visibility 0s linear 300ms;
}

.cookie-consent.show {
    transform: translateY(0);
    visibility: visible;
    transition: transform 300ms ease, visibility 0s;
}

.cookie-consent-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    max-width: var(--container);
    margin-inline: auto;
}

.cookie-consent-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 280px;
}

.cookie-icon {
    font-size: 1.5rem;
}

.cookie-consent-text p {
    color: var(--dtg-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: var(--dtg-gold-pale);
}

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

.cookie-consent .btn {
    min-height: 44px;
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* ---------- Desktop (1024-1439) ---------- */

@media (max-width: 1279px) {
    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* Races on their own row, classes centred under them at the same portrait size. */
    .paths-grid {
        grid-template-columns: 1fr;
    }

    .path-group--classes {
        padding-left: 0;
        padding-top: 24px;
        border-left: 0;
        border-top: 1px solid var(--dtg-steel);
    }

    .path-group--classes .portrait-grid {
        max-width: calc(50% - 5px);
        margin-inline: auto;
    }

    .preview-label {
        gap: 7px;
        font-size: 0.82rem;
        letter-spacing: 0.04em;
    }

    /* The footer's top row (vote, six links, three badges) wraps below ~1250 px, so centre every line. */
    .footer-row--main {
        justify-content: center;
    }
}

@media (max-width: 1199px) {
    .nav-list a,
    .nav-signin {
        padding-inline: 12px;
        font-size: 0.9rem;
    }

    .nav-list a .icon {
        display: none;
    }
}

/* ---------- Tablet (768-1023) ---------- */

@media (max-width: 1023px) {
    .brandbar {
        min-height: 88px;
    }

    .brand {
        width: min(300px, 100%);
    }

    .brand.brand--film {
        width: 280px;
    }

    .brand-name {
        font-size: 1.85rem;
    }

    /* Six links plus Sign In and Play Free share ~720 px here. */
    .nav-list a,
    .nav-signin {
        padding-inline: 9px;
    }

    .claim-main {
        font-size: 0.8rem;
    }

    /* Next to the tablet logo the corner is ~200 px: tighter type. */
    .brandbar-pulse {
        gap: 3px 10px;
        padding-left: 12px;
    }

    .brandbar-pulse dt {
        font-size: 0.6rem;
        letter-spacing: 0.1em;
    }

    .brandbar-pulse dd {
        font-size: 0.82rem;
    }

    .pulse-dot {
        left: -16px;
    }

    .brandbar-era {
        width: 56px;
        height: 56px;
    }

    .hero-art {
        width: 64%;
    }

    .hero-art img,
    .hero-video {
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.6) 25%, #000 45%);
        mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.6) 25%, #000 45%);
    }

    .hero-lead {
        max-width: 360px !important;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Swipeable gallery instead of five shrunken thumbnails. */
    .preview-row {
        display: flex;
        gap: 14px;
        margin-inline: calc(-1 * var(--gutter));
        padding: 4px var(--gutter) 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--gutter);
        scrollbar-width: thin;
        scrollbar-color: var(--dtg-steel) transparent;
    }

    .preview-row > li {
        flex: 0 0 min(46%, 420px);
        scroll-snap-align: start;
    }

    .path-group--races .portrait-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .portrait-grid,
    .path-group--classes .portrait-grid {
        max-width: 640px;
        margin-inline: auto;
    }
}

/* ---------- Mobile (< 768) ---------- */

@media (max-width: 767px) {
    .brandbar {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 0;
        padding-block: 12px 10px;
    }

    .brandbar-claim,
    .brandbar-pulse,
    .brandbar-era {
        display: none;
    }

    .brand {
        width: min(220px, 100%);
    }

    .brand.brand--film {
        width: 200px;
    }

    .brand-crown {
        width: 36px;
        height: 18px;
    }

    .brand-name {
        font-size: 1.6rem;
    }

    .brand-sub {
        font-size: 0.68rem;
    }

    .mainnav-inner {
        align-items: center;
        min-height: 56px;
        gap: 8px;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background: transparent;
        border: 1px solid var(--dtg-steel);
        border-radius: var(--radius);
        color: var(--dtg-gold-pale);
        cursor: pointer;
    }

    .nav-toggle .icon {
        width: 22px;
        height: 22px;
    }

    .nav-toggle[aria-expanded="true"] {
        border-color: var(--dtg-gold);
        background: rgba(255, 255, 255, 0.05);
    }

    /* The themed drop-down panel. Without JavaScript the list simply shows as a row of links. */
    .js .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 30;
        flex-direction: column;
        padding: 8px var(--gutter) 14px;
        background: linear-gradient(180deg, #161a1f, #0d1013);
        border-bottom: 1px solid var(--dtg-steel);
        box-shadow: inset 0 1px 0 var(--gold-faint), 0 18px 30px rgba(0, 0, 0, 0.7);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
    }

    .js .mainnav.is-open .nav-list {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .no-js .nav-toggle {
        display: none;
    }

    .no-js .mainnav-inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    .no-js .nav-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .js .nav-list li + li {
        border-left: 0;
        border-top: 1px solid rgba(52, 58, 66, 0.7);
    }

    .js .nav-list a {
        min-height: 48px;
        padding-inline: 8px;
        font-size: 1rem;
    }

    .js .nav-list a .icon {
        display: block;
    }

    .nav-actions {
        gap: 4px;
    }

    .nav-signin {
        padding-inline: 10px;
    }

    .nav-play {
        min-height: 44px;
        padding: 8px 14px;
        font-size: 0.95rem;
    }

    /* Art on top, text below it: the copy never sits on the face or the armour. */
    .hero {
        align-items: flex-end;
        min-height: 0;
        padding-block: 262px 92px;
    }

    .hero-art {
        width: 100%;
        height: 340px;
        inset: 0 0 auto 0;
    }

    .hero-art img,
    .hero-video {
        object-position: 50% 30%;
        -webkit-mask-image: linear-gradient(180deg, #000 40%, rgba(0, 0, 0, 0.35) 78%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 40%, rgba(0, 0, 0, 0.35) 78%, transparent 100%);
    }

    .hero-motion {
        top: 12px;
        right: 12px;
        bottom: auto;
    }

    .hero::before {
        background: linear-gradient(180deg, rgba(8, 10, 13, 0.25) 0px, transparent 90px, transparent 200px, rgba(8, 10, 13, 0.8) 300px, var(--dtg-bg) 360px);
    }

    .hero .eyebrow {
        margin-bottom: 10px;
        text-shadow: 0 1px 4px #000, 0 0 12px #000;
    }

    .hero-inner {
        text-align: center;
    }

    .hero-inner > * {
        margin-inline: auto;
    }

    .hero-title {
        align-items: center;
    }

    .hero-title-top {
        font-size: clamp(1.9rem, 9vw, 2.6rem);
    }

    .hero-title-accent {
        font-size: clamp(2.6rem, 13vw, 3.6rem);
    }

    .hero-lead {
        margin-inline: auto;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-ctas .btn {
        width: 100%;
        white-space: normal;
    }

    .hero-note {
        display: block;
        margin-top: 14px;
        color: var(--dtg-muted);
        font-size: 0.85rem;
    }

    .realm-stats {
        margin-top: -44px;
    }

    .stat {
        flex-direction: column;
        gap: 6px;
        padding: 14px 4px;
        text-align: center;
    }

    .stat-icon {
        width: 30px;
        height: 30px;
    }

    .stat-text {
        align-items: center;
    }

    .stat-value {
        font-size: clamp(1.15rem, 5.4vw, 1.6rem);
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .section-title::before,
    .section-title::after {
        flex-basis: 40px;
    }

    .feature-grid {
        gap: 12px;
        margin-top: 26px;
    }

    .feature-body {
        padding: 12px 10px 16px;
    }

    .feature-title {
        font-size: 0.9rem;
    }

    .feature-text {
        font-size: 0.98rem;
    }

    .preview-row > li {
        flex-basis: 84%;
    }

    .path-group--classes .portrait-grid {
        max-width: none;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .portrait-name {
        font-size: 0.92rem;
    }

    .portrait-bonus {
        font-size: 0.68rem;
    }

    .btn-wide {
        width: 100%;
        max-width: 420px;
        white-space: normal;
    }

    .footer-row--main {
        flex-direction: column;
        justify-content: center;
    }

    .lightbox {
        padding: 56px 8px 72px;
    }

    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 12px;
        transform: none;
    }

    .lightbox-prev { left: calc(50% - 56px); }
    .lightbox-next { right: calc(50% - 56px); }
}

@media (max-width: 419px) {
    .nav-signin {
        padding-inline: 8px;
        font-size: 0.85rem;
    }

    .nav-signin .icon {
        display: none;
    }

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

    .feature-card {
        flex-direction: row;
        align-items: center;
    }

    .feature-art {
        flex: 0 0 112px;
        align-self: stretch;
        aspect-ratio: auto;
        min-height: 112px;
        border-bottom: 0;
        border-right: 1px solid var(--gold-line);
    }

    .feature-body {
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 359px) {
    .path-group--races .portrait-grid,
    .path-group--classes .portrait-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-play .icon {
        display: none;
    }

    .btn-lg {
        padding-inline: 14px;
        font-size: 0.95rem;
    }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .btn:hover,
    .feature-card.is-link:hover,
    .preview-card:hover,
    .portrait:hover {
        transform: none;
    }

    .feature-card.is-link:hover .feature-art img {
        transform: none;
    }
}
