/* Shared UI for every page except Broadcast View (which owns a fully separate designed
   canvas/theme system — see broadcast-view.php's own <style> block, deliberately not this
   file). Visual polish only: nothing here is relied on by page JS for behaviour — JS always
   targets element #ids, never these classes — so this file is safe to restyle freely without
   touching markup or scripts. CPC-inspired dark navy/cyan/yellow palette throughout, same as
   before, just with real spacing, contrast and control styling instead of unstyled defaults. */

@font-face {
    font-family: 'CPC464';
    src: url('/assets/fonts/cpc464.woff2') format('woff2'),
         url('/assets/fonts/cpc464.woff') format('woff'),
         url('/assets/fonts/cpc464.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Always reserve scrollbar space, even on pages short enough not to need one — otherwise the
   centered `main` box shifts a few pixels left on any page whose content is tall enough to
   trigger a real scrollbar, compared to short pages like the homepage. */
html {
    scrollbar-gutter: stable;
}

:root {
    --bg: #000010;
    --panel: #000090;
    --panel-border: #4d4dff;
    --accent: #00ffff;
    --highlight: #ffff00;
    --text: #e8e8ff;
    --text-muted: #b0b0ff;
    --danger: #ff6b6b;
    --radius: 6px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 0 1.5rem 3rem;
}

.crt-header {
    position: relative;
    padding: 1.5rem 0 1rem;
    border-bottom: 2px solid var(--accent);
}

/* Every non-home page had its own "Home" link buried at the very bottom of <main>, easy to
   miss/scroll past (owner's ask: move it up to the title bar instead, wherever it fits best).
   Anchored to the header itself (not .header-row, which only home.php's dashboard header uses)
   so it works the same way across every page's header, regardless of that page's own layout.
   Stacks the Home link above the account bar -- both live top-right, so they no longer collide
   now every non-live-game page also shows the signed-in account bar (see .account-bar below).
   Bottom-anchored (not top) so the last item always sits right against the header's own
   bottom edge/divider line regardless of how tall the h1+tagline block is -- matches where
   home.php's own .header-row (flex, align-items:flex-end) naturally lands its account-bar,
   so the position reads the same on every page instead of drifting with tagline length.
   Every page with a crt-header wraps its home-link (and, where shown, its account-bar) in
   this div -- including host-room.php/live-room.php, which get the wrapper with no account-bar
   inside, so the lone Home link still gets positioned instead of falling back into normal
   text flow the way a bare .home-link with no positioning of its own would. */
.header-actions {
    position: absolute;
    bottom: 1rem;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.home-link {
    font-size: 0.9rem;
}

/* Sub-pages: "← Parent" beside Home, top right, instead of a "Back to…" link at the bottom. */
.nav-links {
    display: flex;
    gap: 1.25rem;
    font-size: 0.9rem;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

/* Signed-in identity + account actions, top right of the header — like a normal site's
   navbar, instead of buried as a line of body text. */
.account-bar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.9rem;
}

.account-bar form {
    display: inline;
}

.account-name {
    color: var(--text);
    font-weight: bold;
}

/* Pixel font for the header title/tagline on every page — the rest of the page stays normal
   readable text, but the "AmstradStuff" brand + tagline at the top should look the same
   everywhere, admin/host screens included. */
.crt-header h1 {
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--highlight);
    letter-spacing: 0.1em;
    margin: 0;
    font-size: 2rem;
    -webkit-font-smoothing: none;
    font-smooth: never;
}

.tagline {
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--accent);
    margin: 0.3rem 0 0;
    font-size: 1.1rem;
    -webkit-font-smoothing: none;
    font-smooth: never;
}

main {
    max-width: 72rem;
    margin: 1.5rem auto 0;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

h2 {
    color: var(--highlight);
    font-size: 1.15rem;
    margin: 1.75rem 0 0.85rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--panel-border);
}

h2:first-child {
    margin-top: 0;
}

h3 {
    color: var(--accent);
    font-size: 1rem;
    margin: 1.25rem 0 0.5rem;
}

p {
    margin: 0 0 0.85rem;
}

strong {
    color: #fff;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--highlight);
}

/* --- Forms --- */

label {
    color: var(--text-muted);
}

/* Checkbox/radio labels read better inline with their text than as a block caption. */
label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="search"],
select,
textarea {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font: inherit;
    font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

textarea {
    font-family: inherit;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent);
    width: 1rem;
    height: 1rem;
}

input[type="file"] {
    color: var(--text-muted);
}

fieldset {
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem 0.4rem;
    margin: 0 0 1.1rem;
}

legend {
    color: var(--highlight);
    padding: 0 0.4rem;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Side-by-side round-count columns (Knowledge/Image/Sound) instead of one long stacked list --
   shared here (rather than duplicated per-page) so dev-test.php's "Spawn Test Room" tool and
   host-live.php's real "Create Room" form can never drift back out of sync with each other the
   way they did before: the dev tool got this compact layout at some point but the real host
   form never did, leaving it ~20 rows tall requiring a scroll just to reach Create Room, even
   though the dev tool exists specifically to represent the real hosting workflow. */
.rounds-grid { display: flex; flex-wrap: wrap; gap: 2rem; }
.rounds-column { flex: 1 1 220px; }
.rounds-column p { margin: 0.25rem 0; }
.rounds-column label { display: flex; justify-content: space-between; gap: 0.75rem; }
.rounds-column input { width: 3.5rem; }
.rounds-column input:disabled { opacity: 0.4; }

.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

button,
input[type="submit"] {
    background: var(--highlight);
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

button:hover,
input[type="submit"]:hover {
    filter: brightness(1.12);
}

button:active,
input[type="submit"]:active {
    filter: brightness(0.95);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: none;
}

/* A button that should read as a plain link (e.g. "Sign out" sitting next to real <a> links
   in the account bar) rather than a loud yellow CTA. */
.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    padding: 0;
    font-weight: normal;
    font-size: inherit;
    text-decoration: underline;
}

.link-btn:hover {
    color: var(--highlight);
    filter: none;
}

.error {
    color: var(--danger);
    font-weight: bold;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid var(--danger);
    border-radius: 4px;
    padding: 0.6rem 0.85rem;
    margin: 0 0 0.85rem;
}

/* --- Tables --- */

/* Wraps every admin data table: scrolls internally on narrow viewports instead of blowing
   out the whole page's width (a wide table used to drag a horizontal scrollbar under the
   entire site, filters and all, off screen with it). */
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    margin: 0 0 1rem;
}

.table-scroll table {
    margin: 0;
    border: none;
    border-radius: 0;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 0 0 1rem;
}

th, td {
    border: 1px solid var(--panel-border);
    padding: 0.45rem 0.6rem;
    text-align: left;
    vertical-align: middle;
    font-size: 0.9rem;
}

th {
    background: rgba(0, 255, 255, 0.08);
    color: var(--accent);
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

tbody tr:hover {
    background: rgba(0, 255, 255, 0.07);
}

/* Compact action buttons for table rows, where several actions sit side by side — the
   default full-size button (styled for standalone "Save"/"Filter" etc.) is too heavy when
   there are 2-3 of them crammed into one cell. */
.row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.row-actions form {
    display: inline;
    margin: 0;
}

.btn-sm {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    font-weight: normal;
}

.btn-sm:hover {
    background: var(--panel-border);
    color: var(--text);
    filter: none;
}

.btn-sm.btn-danger {
    color: var(--danger);
    border-color: var(--danger);
}

.btn-sm.btn-danger:hover {
    background: var(--danger);
    color: #000;
}

/* Full-size danger button — for a standalone destructive action (e.g. restoring the question
   bank from backup), not one of several compact row actions. Deliberately its own class, not
   another combination with .btn-danger: that collided with .btn-sm.btn-danger above (same
   .btn-danger class, two different property sets fighting over background/color) and made
   every row's Delete button render as a solid red rectangle with invisible red-on-red text. */
.btn-danger-full {
    background: var(--danger);
    color: #000;
}

.btn-danger-full:hover {
    filter: brightness(1.12);
}

/* --- Misc --- */

.dev-user-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 1rem;
    margin: 0 0 1rem;
}

.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
}

/* A checkbox sits beside its label (not stacked above it like a text field's label). */
.filter-bar label:has(> input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
    padding-bottom: 0.45rem;
}

/* --- Home dashboard: main content + a nav sidebar on the right, instead of one long list
   of pipe-separated links --- */

main.dashboard {
    display: grid;
    grid-template-columns: 1fr 230px;
    gap: 2rem;
}

@media (max-width: 720px) {
    main.dashboard {
        grid-template-columns: 1fr;
    }
}

.dashboard-main section {
    margin: 0 0 2rem;
}

.dashboard-main section:last-child {
    margin-bottom: 0;
}

.highlight-card {
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    background: rgba(0, 255, 255, 0.06);
}

.highlight-card h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.cta {
    display: inline-block;
    background: var(--highlight);
    color: #000;
    font-weight: bold;
    padding: 0.55rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
}

.cta:hover {
    /* Shade and text both change, like Discord's. Brightening can't lift full yellow, and
       a:hover's yellow text would vanish on it. */
    filter: brightness(0.85);
    color: var(--panel);
}

.quiz-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
}

.quiz-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--panel-border);
}

.quiz-list li:last-child {
    border-bottom: none;
}

.dashboard-sidebar {
    border-left: 1px solid var(--panel-border);
    padding-left: 1.5rem;
}

@media (max-width: 720px) {
    .dashboard-sidebar {
        border-left: none;
        border-top: 1px solid var(--panel-border);
        padding-left: 0;
        padding-top: 1.5rem;
    }
}

.nav-group {
    margin: 0 0 1.5rem;
}

.nav-group h3 {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    margin: 0 0 0.6rem;
}

.nav-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --- Signed-out home: "Home of the" + the show logo + sign-in buttons --- */

main.signin {
    max-width: 44rem;
    text-align: center;
    padding: 1.75rem 1.75rem 1.5rem;
}

.home-of {
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--accent);
    font-size: 1.15rem;
    letter-spacing: 0.15em;
    margin: 0 0 0.9rem;
    -webkit-font-smoothing: none;
}

.signin-logo {
    margin: 0 auto;
    box-shadow: 0 0 28px rgba(255, 60, 200, 0.35);
    border-radius: 10px;
}

.featured-line {
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--highlight);
    font-size: 0.95rem;
    margin: 1rem 0 0;
    -webkit-font-smoothing: none;
}

.signin-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.6rem 0 0.6rem;
}

.signin-buttons .cta {
    min-width: 13rem;
    padding: 0.75rem 1.4rem;
    font-size: 1rem;
}

.cta-discord {
    background: #5865f2;
    color: #fff;
}

.cta-discord:hover {
    filter: brightness(1.12);
    color: var(--highlight);
}

.signin-note {
    margin: 0 0 1.4rem;
}

.signin-features {
    list-style: none;
    padding: 1.2rem 0 0;
    margin: 0;
    border-top: 1px solid var(--panel-border);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.signin-features li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.9rem;
}

.signin-features span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .signin-features { grid-template-columns: 1fr; }
    .signin-buttons .cta { width: 100%; }
}

/* First sign-in name page (welcome.php) reuses the sign-in look. */
.welcome-heading {
    border-bottom: none;
    margin: 1.5rem 0 0.4rem;
}

.welcome-form {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.welcome-form input[type="text"] {
    font-size: 1.1rem;
    padding: 0.55rem 0.8rem;
    width: min(20rem, 100%);
}

/* --- Leaderboards --- */

.rank-banner {
    border: 1px solid var(--highlight);
    background: rgba(255, 255, 0, 0.08);
    border-radius: var(--radius);
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
}

.rank-banner-muted {
    border-color: var(--panel-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

tbody tr.leaderboard-me {
    background: rgba(255, 255, 0, 0.16);
    outline: 1px solid var(--highlight);
    outline-offset: -1px;
    font-weight: bold;
}

tbody tr.leaderboard-me:hover {
    background: rgba(255, 255, 0, 0.22);
}

.you-tag {
    display: inline-block;
    background: var(--highlight);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}

tr.leaderboard-ellipsis td {
    text-align: center;
    color: var(--text-muted);
    background: transparent;
}

.leaderboard-full summary {
    cursor: pointer;
    color: var(--accent);
    margin: 0 0 0.6rem;
}

.demo-banner {
    border: 1px dashed var(--danger);
    color: var(--danger);
    border-radius: var(--radius);
    padding: 0.5rem 0.85rem;
    font-weight: bold;
    margin: 0 0 1rem;
}

/* --- Phones ---
   Player-facing pages must work on a phone (owner's decision, 2026-09-27); admin, host and
   Broadcast pages stay desktop-only, but share this sheet, so everything here is limited to
   small screens / touch and changes nothing on a desktop. Found by a phone-width audit: the
   pixel-font title alone was 422px wide, dragging almost every page sideways on a 375px
   phone. */
@media (max-width: 600px) {
    body { padding: 0 0.75rem 2rem; }
    main { padding: 1rem 0.9rem; margin-top: 1rem; }
    .crt-header { padding-top: 1rem; }
    /* Scales with the screen instead of a fixed 2rem (~422px wide at 375px). */
    .crt-header h1 { font-size: clamp(1.1rem, 7vw, 2rem); letter-spacing: 0.05em; }
    .tagline { font-size: clamp(0.8rem, 4.2vw, 1.1rem); }
    /* Home link / account bar drop below the title instead of floating over the tagline. */
    .header-actions { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; margin-top: 0.6rem; gap: 0.4rem 1rem; }
    .account-bar { flex-wrap: wrap; gap: 0.4rem 0.9rem; }
    /* 16px stops iOS zooming the page in whenever a field is tapped. */
    input[type="text"], input[type="number"], input[type="password"], input[type="email"], input[type="search"], select, textarea { font-size: 16px; }
    /* A wide table scrolls inside its own box instead of pushing the page sideways. */
    main table { display: block; overflow-x: auto; max-width: 100%; }
    th, td { padding: 0.4rem 0.5rem; }
}

/* Touch screens: finger-sized buttons and nav links (at least ~44px, Apple's guideline). */
@media (pointer: coarse) {
    button, .btn-sm, input[type="submit"] { min-height: 44px; }
    .nav-group a { display: inline-block; padding: 0.4rem 0; }
}

/* --- Error pages (app/views/error.php) --- */

main.error-page {
    max-width: 36rem;
    text-align: center;
}

.error-code {
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--danger);
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    -webkit-font-smoothing: none;
}

/* --- On this day (Home, signed in) --- */

.otd-card {
    border: 1px solid var(--highlight);
    border-radius: var(--radius);
    padding: 0.9rem 1.25rem 0.6rem;
    background: rgba(255, 255, 0, 0.05);
}

.otd-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.otd-card h2 {
    margin: 0 0 0.6rem;
    border-bottom: none;
    padding-bottom: 0;
}

.otd-date {
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--accent);
    font-size: 0.95rem;
    margin-left: 0.4rem;
    -webkit-font-smoothing: none;
}

.otd-nav {
    display: flex;
    gap: 0.4rem;
}

.otd-nav a, .otd-nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    font-size: 1.3rem;
    line-height: 1;
    text-decoration: none;
}

.otd-nav span {
    opacity: 0.3;
}

.otd-nav a.otd-today {
    width: auto;
    padding: 0 0.6rem;
    font-size: 0.85rem;
}

.otd-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.otd-entry {
    display: grid;
    grid-template-columns: 4.4rem 1fr;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--panel-border);
}

.otd-year {
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--highlight);
    font-size: 1.05rem;
    padding-top: 0.1rem;
    -webkit-font-smoothing: none;
}

.otd-title {
    font-weight: bold;
    color: #fff;
    margin: 0 0 0.15rem;
}

.otd-text {
    margin: 0;
    font-size: 0.92rem;
}

.otd-label {
    font-size: 0.72rem;
    font-weight: normal;
    color: var(--text-muted);
    border: 1px solid var(--panel-border);
    border-radius: 3px;
    padding: 0 0.3rem;
    margin-left: 0.35rem;
    white-space: nowrap;
    vertical-align: middle;
}

.otd-source {
    font-size: 0.78rem;
    margin-left: 0.3rem;
}

/* Tributes: quieter, no bright year. */
.otd-remembrance .otd-year { color: var(--text-muted); }
.otd-remembrance .otd-title { color: var(--text); }
.otd-remembrance .otd-text { color: var(--text-muted); font-style: italic; }

/* --- Game Reviews (public) --- */

.featured-game {
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.9rem 1.25rem 0.7rem;
    margin-bottom: 1.2rem;
    background: rgba(0, 255, 255, 0.05);
}

.featured-game h2 {
    margin: 0 0 0.4rem;
    border-bottom: none;
    padding-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.featured-score {
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--highlight);
    font-size: 0.95rem;
    -webkit-font-smoothing: none;
}

.featured-title { margin: 0; font-size: 1.15rem; font-weight: bold; }
.featured-title a { color: #fff; }
.featured-facts { margin: 0.1rem 0 0.4rem; font-size: 0.85rem; color: var(--text-muted); }
.featured-text { margin: 0 0 0.5rem; font-size: 0.92rem; }
.featured-links { margin: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: 0.9rem; }

.signin-reviews { margin: 1.4rem 0 0; }
.signin-reviews .text-muted { font-size: 0.8rem; margin-left: 0.4rem; }

.pager { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: baseline; margin: 0.5rem 0; }
.nowrap { white-space: nowrap; }
.small-note { font-size: 0.8rem; }

.game-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--panel-border);
    margin-bottom: 0.8rem;
}

.game-head h2 { border-bottom: none; margin: 0; padding-bottom: 0.3rem; }

.game-average {
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--highlight);
    font-size: 1.15rem;
    margin: 0;
    -webkit-font-smoothing: none;
}

.game-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.6rem;
    margin: 0 0 0.9rem;
}

.game-facts dt { font-size: 0.75rem; color: var(--text-muted); }
.game-facts dd { margin: 0; }

.game-description { max-width: 46rem; }

/* Cover art (portrait, narrower) then the two screenshots, side by side; stacked on phones. */
.game-screens {
    display: grid;
    grid-template-columns: 0.75fr 1fr 1fr;
    gap: 1rem;
    align-items: start;
    margin: 1rem 0 1.4rem;
    max-width: 60rem;
}

@media (max-width: 640px) {
    .game-screens { grid-template-columns: 1fr 1fr; }
    .game-screens .game-cover { grid-column: 1 / -1; max-width: 14rem; }
}

.game-screens figure { margin: 0; }
/* Screenshots: the capture tool's 1140x800 shape; anything slightly off is letterboxed, so a
   placeholder and the real capture are the same size. Covers vary, so they keep their own shape. */
.game-screens img {
    display: block;
    width: 100%;
    aspect-ratio: 1140 / 800;
    object-fit: contain;
    background: #000;
    image-rendering: pixelated;
    border: 1px solid var(--panel-border);
}

.game-cover img { aspect-ratio: auto; height: auto; image-rendering: auto; background: none; }
.game-cover .screen-placeholder { aspect-ratio: 622 / 800; background: #000040; }

.game-screens figcaption { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Until Gavin's captures are uploaded: a blank CPC screen, same shape as a capture. */
.screen-placeholder {
    aspect-ratio: 1140 / 800;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000080;
    border: 1px solid var(--panel-border);
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--highlight);
    text-align: center;
    font-size: 0.9rem;
    -webkit-font-smoothing: none;
}

.review-card {
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 0.7rem 1rem;
    margin-bottom: 0.8rem;
    max-width: 50rem;
}

.review-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.review-mag { margin: 0; font-weight: bold; color: #fff; }
.review-date { margin: 0; font-size: 0.82rem; }

.review-score { text-align: right; }
.review-score strong {
    display: block;
    font-family: 'CPC464', 'Courier New', monospace;
    color: var(--highlight);
    font-size: 1.5rem;
    -webkit-font-smoothing: none;
}

.review-score span { font-size: 0.8rem; color: var(--text-muted); }

.review-subscores {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1.4rem;
    margin: 0.5rem 0 0.2rem;
}

.review-subscores dt { font-size: 0.75rem; color: var(--text-muted); }
.review-subscores dd { margin: 0; font-weight: bold; }

.review-note { margin: 0.3rem 0 0; font-size: 0.85rem; }
.review-source { margin: 0.4rem 0 0; font-size: 0.85rem; }
.game-links a { margin-left: 0.6rem; }
