/* Ballzy News — PX_* warm palette, print-like reading layout.
   Fast: no external font CDN; only local Ballzy Bold for brand/titles. */

@font-face {
    font-family: "Ballzy Bold";
    src: url("/fonts/Ballzy_Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --px-dark: #2e1f14;
    --px-brown: #59402e;
    --px-orange: #bf611f;
    --px-amber: #ebad2e;
    --px-gold: #ffd94d;
    --px-cream: #faebb3;
    --px-steel: #6b7a8c;
    --px-grey: #949aa6;
    --sky-top: #3a2a1c;
    --sky-mid: #241810;
    --sky-bot: #120c08;
    --panel: rgba(46, 31, 20, 0.92);
    --panel-edge: rgba(255, 217, 77, 0.28);
    --text: var(--px-cream);
    --muted: #d2c4a0;
    --line: rgba(250, 235, 179, 0.16);
    --shadow: 0 22px 56px rgba(0, 0, 0, 0.45);
    --measure: 40rem;
    --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(ellipse at 18% 0%, rgba(235, 173, 46, 0.16), transparent 34rem),
        radial-gradient(ellipse at 88% 18%, rgba(191, 97, 31, 0.14), transparent 30rem),
        linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 48%, var(--sky-bot) 100%);
    font-family: "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.site-header {
    width: min(920px, calc(100% - 28px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(255, 217, 77, 0.28));
}

.brand span { display: grid; line-height: 1.05; }

.brand-mark {
    font-family: "Ballzy Bold", "Segoe UI", sans-serif;
    font-size: 22px;
    letter-spacing: 0.04em;
    color: var(--px-gold);
    text-transform: uppercase;
}

.brand small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.header-actions,
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-chip,
.language-switcher {
    border: 2px solid rgba(255, 217, 77, 0.28);
    background: rgba(89, 64, 46, 0.55);
    border-radius: 999px;
}

.version-chip {
    padding: 7px 12px;
    color: var(--px-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.language-switcher button {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 8px 11px;
    border-radius: 999px;
}

.language-switcher button[aria-pressed="true"] {
    background: rgba(255, 217, 77, 0.18);
    color: var(--px-gold);
}

.page-shell {
    width: min(920px, calc(100% - 28px));
    margin: 8px auto 48px;
    display: grid;
    gap: 28px;
}

.wishlist-banner {
    width: min(920px, calc(100% - 28px));
    margin: 6px auto 0;
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.wishlist-inner {
    padding: 20px 22px 22px;
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
}

.wishlist-title {
    font-family: "Ballzy Bold", "Segoe UI", sans-serif;
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--px-gold);
    margin: 0;
}

.wishlist-widget {
    width: 100%;
    max-width: 646px;
}

.wishlist-widget iframe {
    width: 100%;
    max-width: 646px;
    height: 190px;
    border: 0;
    display: block;
    margin: 0 auto;
    background: #171d25;
    border-radius: 10px;
}

.kicker {
    display: inline-block;
    font-family: "Ballzy Bold", "Segoe UI", sans-serif;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--px-amber);
    margin-bottom: 10px;
}

.story-panel {
    background: var(--panel);
    border: 3px solid var(--panel-edge);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero {
    position: relative;
    margin: 0;
    background: var(--px-dark);
}

.hero img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.hero figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 20px 14px;
    background: linear-gradient(180deg, transparent, rgba(18, 12, 8, 0.88));
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.story-body {
    padding: 28px 26px 32px;
    max-width: none;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    color: var(--px-grey);
    font-size: 13px;
    margin-bottom: 14px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--px-cream);
}

.story-title {
    font-family: "Ballzy Bold", "Segoe UI", sans-serif;
    font-size: clamp(1.7rem, 4.2vw, 2.45rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: var(--px-gold);
    margin: 0 0 14px;
    text-wrap: balance;
}

.story-lede {
    margin: 0 0 22px;
    font-size: clamp(1.12rem, 2.4vw, 1.28rem);
    line-height: 1.55;
    color: var(--px-cream);
    max-width: var(--measure);
}

.prose {
    max-width: var(--measure);
    font-size: clamp(1.05rem, 2.1vw, 1.18rem);
    line-height: 1.72;
    color: var(--px-cream);
}

.prose p { margin: 0 0 1.05em; }
.prose h2 {
    font-family: "Ballzy Bold", "Segoe UI", sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    color: var(--px-amber);
    margin: 1.5em 0 0.55em;
}
.prose ul {
    margin: 0 0 1.15em;
    padding-left: 1.2em;
}
.prose li { margin: 0.35em 0; }
.prose .story-cta { margin: 1.2em 0 1.4em; }
.prose .story-cta a {
    display: inline-block;
    padding: 11px 15px;
    border: 2px solid var(--px-amber);
    border-radius: 10px;
    background: rgba(255, 193, 92, 0.1);
    color: var(--px-gold);
    font-family: "Ballzy Bold", "Segoe UI", sans-serif;
    text-decoration: none;
}
.prose .story-cta a:hover,
.prose .story-cta a:focus-visible {
    background: rgba(255, 193, 92, 0.2);
    outline: 2px solid var(--px-cream);
    outline-offset: 2px;
}

.gallery {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.gallery figure {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--line);
    background: var(--px-dark);
}

.gallery img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    cursor: zoom-in;
}

.gallery figcaption {
    padding: 10px 12px 12px;
    font-size: 13px;
    color: var(--muted);
}

.archive {
    display: grid;
    gap: 14px;
}

.archive-head h2 {
    font-family: "Ballzy Bold", "Segoe UI", sans-serif;
    font-size: 1.35rem;
    color: var(--px-gold);
    margin: 0 0 6px;
    letter-spacing: 0.03em;
}

.archive-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 40rem;
}

.archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.archive-item a {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    text-decoration: none;
    padding: 12px;
    border-radius: 14px;
    border: 2px solid var(--line);
    background: rgba(46, 31, 20, 0.72);
    transition: border-color 0.15s ease, background 0.15s ease;
    min-height: 88px;
}

.archive-item a:hover,
.archive-item a:focus-visible {
    border-color: rgba(255, 217, 77, 0.55);
    background: rgba(89, 64, 46, 0.72);
    outline: none;
}

.archive-thumb {
    width: 96px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--px-dark);
}

.archive-copy {
    display: grid;
    align-content: center;
    gap: 4px;
    min-width: 0;
}

.archive-copy strong {
    font-size: 1.02rem;
    color: var(--px-cream);
    line-height: 1.3;
}

.archive-copy span {
    font-size: 0.82rem;
    color: var(--px-grey);
}

.archive-item.is-current a {
    border-color: rgba(255, 217, 77, 0.45);
}

.archive-badge {
    color: var(--px-amber);
    font-weight: 700;
}

.back-latest {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 2px solid rgba(255, 217, 77, 0.35);
    background: rgba(191, 97, 31, 0.22);
    color: var(--px-gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    width: fit-content;
}

.missing {
    padding: 36px 28px;
    text-align: left;
}

.site-footer {
    width: min(920px, calc(100% - 28px));
    margin: 0 auto 36px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-start {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: min(100%, 280px);
}

.footer-start p { margin: 0; }

.pixelpicked-badge {
    display: inline-block;
    line-height: 0;
    opacity: 0.94;
    transition: opacity 0.15s ease;
}

.pixelpicked-badge:hover { opacity: 1; }

.pixelpicked-badge img {
    width: min(250px, 100%);
    height: auto;
    aspect-ratio: 250 / 54;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.footer-links a { text-decoration: none; color: var(--px-amber); }
.footer-links a:hover { color: var(--px-gold); }

.image-dialog {
    border: 3px solid var(--panel-edge);
    border-radius: 16px;
    padding: 0;
    background: var(--px-dark);
    color: var(--text);
    max-width: min(960px, 94vw);
}

.image-dialog::backdrop { background: rgba(8, 5, 3, 0.78); }

.image-dialog img { width: 100%; max-height: 78vh; object-fit: contain; }

.image-dialog p {
    margin: 0;
    padding: 12px 16px 16px;
    color: var(--muted);
    font-size: 0.9rem;
}

.dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 2px solid var(--panel-edge);
    background: rgba(46, 31, 20, 0.9);
    color: var(--px-gold);
    font-size: 22px;
    line-height: 1;
}

@media (max-width: 640px) {
    body { font-size: 17px; }
    .site-header {
        align-items: flex-start;
        gap: 10px;
        min-height: 0;
        padding-top: 10px;
    }
    .brand {
        min-width: 0;
        flex: 1 1 auto;
    }
    .header-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
        /* Sit under the Ballzy wordmark row so v## never overlaps the title. */
        padding-top: 26px;
    }
    .story-body { padding: 22px 18px 26px; }
    .archive-item a {
        grid-template-columns: 72px 1fr;
        gap: 10px;
        padding: 10px;
    }
    .archive-thumb { width: 72px; height: 52px; }
    .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .archive-item a { transition: none; }
}
