/* ==========================================================
   SUNNY CHRONICLE — Main Stylesheet
   Palette = the game's UI palette (Endesga 32).
   Pixel frames = the game's own 9-slice UI skin (assets/ui/),
   always drawn at an integer scale so pixels stay square.
   ========================================================== */

/* ── 0. FONTS ───────────────────────────────────────────── */
@font-face {
    font-family: 'PixeloidSans';
    src: url('../fonts/PixeloidSans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ── 1. TOKENS ─────────────────────────────────────────── */
:root {
    /* game palette */
    --ink:        #181425;
    --ink-2:      #262b44;
    --ink-3:      #3a4466;
    --slate:      #5a6988;
    --mist:       #8b9bb4;
    --cloud:      #c0cbdc;
    --almond:     #ead4aa;
    --almond-2:   #e4a672;
    --caramel:    #c28569;
    --brown:      #945542;
    --brown-2:    #b86f50;
    --bark:       #733e39;
    --gold:       #feae34;
    --gold-lt:    #fee761;
    --gold-hi:    #fbdf6b;
    --gold-dk:    #c47e10;
    --orange:     #f77622;
    --red:        #e43b44;
    --grass:      #63c74d;
    --grass-2:    #5fc14c;
    --leaf:       #3e8948;
    --forest:     #265c42;
    --deep:       #193c3e;
    --sky:        #0099db;
    --plum:       #68386c;
    --rose:       #b55088;

    /* roles */
    --text:       var(--ink);
    --text-muted: #6b4a3a;
    --on-dark:    #f4ecdc;
    --on-dark-2:  #b9c2d6;

    --font-pixel: 'PixeloidSans', ui-monospace, monospace;
    --font-body:  'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --nav-h: 76px;
    --px: 3px;                      /* one game pixel on panels */

    /* aliases used by the admin panel's inline styles */
    --panel:     var(--almond);
    --ink-muted: var(--text-muted);
    --brown-bd:  var(--caramel);
    --brown-sh:  rgba(24, 20, 37, .22);
    --forest-bd: var(--leaf);
}

/* ── 2. BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--ink);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-pixel); font-weight: normal; }

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

a { color: inherit; }

.pixelated, .px-img { image-rendering: pixelated; image-rendering: crisp-edges; }
@supports (image-rendering: pixelated) { .pixelated, .px-img { image-rendering: pixelated; } }

::selection { background: var(--gold); color: var(--ink); }

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

/* ── 3. PIXEL FRAMES (9-slice from the game UI skin) ───── */
.px-panel {
    position: relative;
    border: calc(var(--px) * 4) solid transparent;
    border-image: url('../ui/nine_p_almond.png') 4 fill / calc(var(--px) * 4) stretch;
    image-rendering: pixelated;
    background: none;
    color: var(--text);
    filter: drop-shadow(0 var(--px) 0 rgba(24, 20, 37, .35));
}

.px-frame {
    border: calc(var(--px) * 4) solid transparent;
    border-image: url('../ui/nine_p_caramel.png') 4 fill / calc(var(--px) * 4) stretch;
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 0 rgba(24, 20, 37, .35));
}


/* ── 4. BUTTONS ────────────────────────────────────────── */
.btn-px {
    --bw: 8px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: var(--font-pixel);
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: .02em;
    padding: .45rem 1.1rem .5rem;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: var(--bw) solid transparent;
    border-image: url('../ui/nine_p_yellow.png') 4 fill / var(--bw) stretch;
    image-rendering: pixelated;
    background: none;
    filter: drop-shadow(0 4px 0 rgba(24, 20, 37, .45));
    transition: transform .12s ease, filter .12s ease;
}
.btn-px:hover { color: var(--ink); transform: translateY(-2px); filter: drop-shadow(0 6px 0 rgba(24, 20, 37, .45)) brightness(1.06); }
.btn-px:active { transform: translateY(2px); filter: drop-shadow(0 1px 0 rgba(24, 20, 37, .45)); }
.btn-px i { font-size: 1.1em; }

.btn-px-gold   { border-image-source: url('../ui/nine_p_yellow.png'); color: var(--ink); }
.btn-px-almond { border-image-source: url('../ui/nine_p_almond.png'); color: var(--ink); }
.btn-px-brown  { border-image-source: url('../ui/btn_normal.png');    color: var(--almond); }
.btn-px-brown:hover { color: #fff; }
.btn-px-brown:active { border-image-source: url('../ui/btn_pressed.png'); }
.btn-px-green  { border-image-source: url('../ui/nine_p_green.png');  color: #fff; }
.btn-px-green:hover { color: #fff; }

.btn-px-lg { --bw: 12px; font-size: 1.15rem; padding: .5rem 1.4rem .6rem; }
.btn-px-sm { --bw: 8px; font-size: .9rem; padding: .2rem .8rem .3rem; }

/* legacy buttons (admin panel, old markup) */
.btn-sc, .btn-sc-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-pixel); font-size: .95rem; line-height: 1.3;
    padding: .35rem 1rem; color: var(--ink); text-decoration: none; white-space: nowrap; cursor: pointer;
    border: 8px solid transparent;
    border-image: url('../ui/nine_p_yellow.png') 4 fill / 8px stretch;
    image-rendering: pixelated; background: none;
    filter: drop-shadow(0 3px 0 rgba(24, 20, 37, .4));
    transition: transform .12s;
}
.btn-sc:hover, .btn-sc-ghost:hover { transform: translateY(-2px); color: var(--ink); }
.btn-sc-ghost { border-image-source: url('../ui/nine_p_almond.png'); }
.btn-sc-green { border-image-source: url('../ui/nine_p_green.png'); color: #fff; }
.btn-sc-green:hover { color: #fff; }
.btn-sc-lg { font-size: 1.1rem; padding: .5rem 1.4rem; }
.btn-sc.is-disabled { opacity: .55; pointer-events: none; }

/* ── 5. NAVBAR ─────────────────────────────────────────── */
.site-nav, #navbar {
    min-height: var(--nav-h);
    padding: .5rem 0;
    background: rgba(25, 60, 62, .97);
    border-bottom: 3px solid var(--ink);
    box-shadow: inset 0 -3px 0 var(--forest);
    transition: background .3s, box-shadow .3s, border-color .3s, backdrop-filter .3s;
    z-index: 1030;
}
.site-nav .navbar-brand img, #navbar .navbar-brand img {
    height: 48px; width: auto;
    image-rendering: auto;
    filter: drop-shadow(2px 0 0 #fff8e8) drop-shadow(-2px 0 0 #fff8e8) drop-shadow(0 2px 0 #fff8e8)
            drop-shadow(0 -2px 0 #fff8e8) drop-shadow(0 3px 0 var(--ink));
}
.site-nav .nav-link, #navbar .nav-link {
    font-family: var(--font-pixel);
    font-size: .95rem;
    color: var(--on-dark) !important;
    padding: .45rem .8rem !important;
    text-shadow: 0 2px 0 rgba(24, 20, 37, .6);
    transition: color .15s;
}
.site-nav .nav-link:hover, #navbar .nav-link:hover { color: var(--gold) !important; }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.nav-account { display: inline-flex !important; align-items: center; gap: .4rem; }
.nav-account i { font-size: 1.1rem; }
#navbar .navbar-toggler { border: 2px solid rgba(244, 236, 220, .4); border-radius: 0; }
#navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
@media (max-width: 991.98px) {
    #navbar .navbar-collapse {
        background: var(--deep);
        margin: .5rem -.75rem -.5rem;
        padding: .75rem 1rem 1rem;
        border-top: 3px solid var(--ink);
    }
    .nav-actions { padding-top: .5rem; }
}

/* ── 6. SECTION SCAFFOLDING ────────────────────────────── */
.sc-section { position: relative; padding: clamp(64px, 9vw, 112px) 0; }

.section-intro { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-intro-row {
    max-width: none; display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1rem; text-align: left; margin-bottom: 2rem;
}
.eyebrow {
    display: inline-block;
    font-family: var(--font-pixel);
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--gold);
    padding: .2rem .6rem .25rem;
    box-shadow: 0 0 0 3px var(--ink);
    margin-bottom: 1.1rem;
}
.eyebrow-dark { background: var(--ink); color: var(--gold); box-shadow: none; }
.eyebrow-gold { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 3px var(--ink); }

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 3px 0 var(--ink);
    margin: 0 0 .9rem;
}
.title-dark { color: var(--ink); text-shadow: 0 3px 0 rgba(24, 20, 37, .12); }
.section-lead {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, .92);
    text-shadow: 0 1px 0 rgba(24, 20, 37, .35);
    margin: 0;
}
.lead-dark { color: var(--text-muted); text-shadow: none; }


/* Bands */
.band-grass {
    background-color: var(--grass);
    background-image:
        linear-gradient(45deg,  var(--grass-2) 25%, transparent 25%),
        linear-gradient(-45deg, var(--grass-2) 25%, transparent 25%),
        linear-gradient(45deg,  transparent 75%, var(--grass-2) 75%),
        linear-gradient(-45deg, transparent 75%, var(--grass-2) 75%);
    background-size: 96px 96px;
    background-position: 0 0, 0 48px, 48px -48px, -48px 0;
}
.band-parchment {
    background-color: var(--almond);
    background-image: radial-gradient(rgba(148, 85, 66, .10) 2px, transparent 2px);
    background-size: 24px 24px;
    border-top: 6px solid var(--ink);
    border-bottom: 6px solid var(--ink);
    box-shadow: inset 0 6px 0 var(--caramel), inset 0 -6px 0 var(--caramel);
}
.band-night {
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 40%, #2d3558 100%);
    color: var(--on-dark);
    overflow: hidden;
}
.band-dark {
    background: var(--deep);
    border-top: 6px solid var(--ink);
    box-shadow: inset 0 6px 0 var(--forest);
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── 7. STATUS STRIP (first thing under the nav) ───────── */
.status-strip {
    background: var(--ink);
    color: var(--on-dark);
    border-bottom: 3px solid var(--ink-3);
    padding: .75rem 0;
}
.status-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem 2.4rem;
}
.status-list li { display: flex; align-items: center; gap: .6rem; }
.st-k { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--mist); }
.st-v { font-family: var(--font-pixel); font-size: .95rem; display: inline-flex; align-items: center; gap: .45rem; }
.st-v .live-dot { width: 8px; height: 8px; }

.live-dot {
    display: inline-block; width: 10px; height: 10px; flex: 0 0 auto;
    background: var(--grass);
    box-shadow: 0 0 0 2px var(--ink);
    animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--ink), 0 0 0 2px rgba(99, 199, 77, 0); }
    50%      { box-shadow: 0 0 0 2px var(--ink), 0 0 0 7px rgba(99, 199, 77, .35); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ── 8. ALPHA TEST (the opening section) ───────────────── */
.join { padding-top: clamp(56px, 7vw, 88px); }
.join-intro { max-width: 640px; margin: 0 auto 3rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.alpha-pill {
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: var(--font-pixel); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--gold-lt);
    background: var(--ink);
    padding: .3rem .8rem .35rem;
    box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 2px rgba(254, 174, 52, .5);
    margin-bottom: 1.6rem;
}
.join-logo {
    width: 512px; max-width: 86vw; height: auto;
    image-rendering: pixelated;
    /* light "sticker" outline keeps the lettering crisp on the grass */
    filter: drop-shadow(4px 0 0 #fff8e8) drop-shadow(-4px 0 0 #fff8e8) drop-shadow(0 4px 0 #fff8e8)
            drop-shadow(0 -4px 0 #fff8e8) drop-shadow(0 5px 0 var(--ink));
    margin-bottom: 1.4rem;
}
.join-tagline {
    font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-weight: 800; line-height: 1.45;
    color: #fff; text-shadow: 0 2px 0 var(--ink);
    margin: 0 0 .5rem;
}
.join-note { margin: 0; font-size: .95rem; font-weight: 700; color: rgba(255, 255, 255, .9); text-shadow: 0 2px 0 var(--ink); }

.path-card { height: 100%; padding: 1.4rem 1.5rem 1.5rem; display: flex; flex-direction: column; }
.path-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.3rem; }
.path-head h2 { font-size: 1.5rem; margin: 0 0 .2rem; }
.path-head p { margin: 0; color: var(--text-muted); font-weight: 600; }
.path-icon {
    flex: 0 0 auto;
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; color: var(--ink);
    border: 8px solid transparent;
    border-image: url('../ui/nine_p_yellow.png') 4 fill / 8px stretch;
    image-rendering: pixelated;
}
.path-icon-green { border-image-source: url('../ui/nine_p_green.png'); color: #fff; }

.steps { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .85rem; }
.steps li { display: flex; gap: .9rem; align-items: flex-start; }
.steps strong { display: block; font-weight: 800; font-size: 1.02rem; }
.steps span { display: block; color: var(--text-muted); font-size: .95rem; line-height: 1.45; }
.step-n {
    flex: 0 0 auto;
    width: 34px; height: 34px;
    display: flex !important; align-items: center; justify-content: center;
    font-family: var(--font-pixel); font-size: 1rem; color: var(--almond) !important;
    background: var(--brown);
    box-shadow: 0 0 0 3px var(--ink), inset 0 -3px 0 var(--bark), inset 0 3px 0 var(--brown-2);
    margin-top: 2px;
}
.step-link {
    display: inline-flex; align-items: center; gap: .3rem;
    margin-top: .25rem;
    font-weight: 800; font-size: .92rem;
    color: var(--leaf); text-decoration: none;
    border-bottom: 2px solid currentColor;
}
.step-link:hover { color: var(--forest); }
.path-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: auto; }

/* What to expect: one quiet line, not another row of boxes */
.expect-list {
    list-style: none; margin: 2.6rem 0 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2rem;
}
.expect-list li {
    display: inline-flex; align-items: center; gap: .45rem;
    font-weight: 800; font-size: .95rem; color: #fff; text-shadow: 0 2px 0 var(--ink);
}
.expect-list i { color: var(--gold-lt); font-size: 1.1rem; }

/* ── 9. FEATURES ──────────────────────────────────────── */
.feature {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(1.8rem, 4vw, 4rem);
    align-items: center;
}
.feature + .feature { margin-top: clamp(4rem, 8vw, 6.5rem); }
.feature-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature-flip .feature-media { order: 2; }

.feature-media {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: zoom-in;
    transform: rotate(-.6deg);
    transition: transform .3s ease;
}
.feature-flip .feature-media { transform: rotate(.6deg); }
.feature-media:hover { transform: rotate(0) scale(1.015); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }

.feature-kicker {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-pixel); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--brown);
    margin-bottom: .7rem;
}
.feature-text h3 { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.2; margin-bottom: .9rem; }
.feature-text p { font-size: 1.05rem; line-height: 1.7; color: #4b3328; }
.feature-points { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .45rem; }
.feature-points li {
    position: relative; padding-left: 1.5rem; font-weight: 700; color: var(--ink);
}
.feature-points li::before {
    content: ''; position: absolute; left: 0; top: .45em;
    width: 10px; height: 10px; background: var(--grass);
    box-shadow: 0 0 0 2px var(--ink);
}

.feat-icon { display: inline-flex; align-items: center; justify-content: center; }
.feat-icon img { width: 26px; height: 26px; image-rendering: pixelated; }
.feat-icon i { font-size: 1.2rem; }
.feat-icon-lg {
    width: 64px; height: 64px; margin-bottom: 1rem;
    background: var(--ink-2);
    box-shadow: 0 0 0 3px var(--ink), inset 0 -4px 0 rgba(0, 0, 0, .3);
}
.feat-icon-lg img { width: 38px; height: 38px; }
.feat-icon-lg i { font-size: 1.8rem; color: var(--gold); }
.feat-card { height: 100%; padding: 1.3rem 1.3rem 1.4rem; }
.feat-card h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.feat-card p { color: #4b3328; line-height: 1.65; margin: 0; }
.feat-card .feature-points { margin-top: 1rem; }
.feature-kicker .feat-icon img { width: 26px; height: 26px; }

@media (max-width: 991.98px) {
    .feature, .feature-flip { grid-template-columns: 1fr; }
    .feature-flip .feature-media { order: 0; }
}

/* ── 10. DEVELOPMENT PROGRESS ──────────────────────────── */
.stars {
    position: absolute; inset: 0; pointer-events: none; opacity: .7;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 140px 80px, var(--gold-lt) 50%, transparent 51%),
        radial-gradient(2px 2px at 260px 20px, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 330px 150px, var(--cloud) 50%, transparent 51%),
        radial-gradient(2px 2px at 80px 200px, var(--cloud) 50%, transparent 51%),
        radial-gradient(3px 3px at 200px 240px, #fff 50%, transparent 51%);
    background-size: 360px 280px;
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .15) 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .15) 70%, transparent 100%);
}
.band-night .section-lead { color: var(--on-dark-2); }

.rm-summary {
    display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem;
    margin-bottom: 3rem;
}
.rm-overall, .rm-counter {
    background: rgba(24, 20, 37, .6);
    box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 3px var(--ink-3);
}
.rm-overall { padding: 1.4rem 1.6rem; }
.rm-overall-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .9rem; }
.rm-overall-label { font-family: var(--font-pixel); font-size: 1.05rem; }
.rm-overall-pct { font-family: var(--font-pixel); font-size: 2.4rem; line-height: 1; color: var(--gold); text-shadow: 0 3px 0 var(--ink); }
.rm-overall-meta { margin: .8rem 0 0; font-size: .85rem; color: var(--mist); font-weight: 700; }
.rm-counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.rm-counter { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1rem .5rem; }
.rm-counter strong { font-family: var(--font-pixel); font-weight: normal; font-size: 2.2rem; line-height: 1; }
.rm-counter span { font-size: .82rem; font-weight: 700; color: var(--on-dark-2); margin-top: .35rem; }
.rm-counter.is-live strong     { color: var(--grass); }
.rm-counter.is-progress strong { color: var(--gold); }
.rm-counter.is-planned strong  { color: var(--mist); }

/* Pixel progress bar, fills when the section scrolls in */
.px-bar {
    position: relative; height: 14px;
    background: var(--ink-3);
    box-shadow: 0 0 0 3px var(--ink);
    overflow: hidden;
}
.px-bar-lg { height: 22px; }
.px-bar > span {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    background:
        repeating-linear-gradient(90deg, transparent 0 12px, rgba(24, 20, 37, .18) 12px 15px),
        linear-gradient(180deg, #8fe07a 0 30%, var(--grass) 30% 75%, var(--leaf) 75%);
    transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}
.rm-in .px-bar > span { width: var(--p); }
@media (prefers-reduced-motion: reduce) { .px-bar > span { transition: none; } }

/* Sub-headings inside the progress section */
.rm-sub {
    display: flex; align-items: center; gap: .6rem;
    font-size: 1.25rem; color: var(--on-dark); margin: 0 0 1.2rem;
}
.rm-sub-horizon { margin-top: 4rem; }

/* Now building: systems in parallel */
.rm-now { margin-bottom: 3.2rem; }
.rm-now-dot {
    width: 12px; height: 12px; background: var(--gold); box-shadow: 0 0 0 2px var(--ink);
    animation: live-glow-dot 1.6s ease-in-out infinite;
}
@keyframes live-glow-dot { 50% { box-shadow: 0 0 0 2px var(--ink), 0 0 0 7px rgba(254, 174, 52, .3); } }
.rm-now-list {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem;
}
.rm-now-item {
    position: relative; overflow: hidden;
    display: flex; align-items: flex-start; gap: .8rem;
    padding: 1rem 1.1rem;
    background: rgba(24, 20, 37, .6);
    box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 3px rgba(254, 174, 52, .45);
}
.rm-now-icon {
    flex: 0 0 auto; width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: var(--ink); background: var(--gold);
    box-shadow: 0 0 0 3px var(--ink), inset 0 -4px 0 var(--gold-dk);
}
.rm-now-text { display: flex; flex-direction: column; gap: .15rem; }
.rm-now-text strong { font-family: var(--font-pixel); font-weight: normal; font-size: 1.02rem; }
.rm-now-text span { font-size: .88rem; color: var(--on-dark-2); line-height: 1.45; }
.rm-now-pulse {                    /* a "work in progress" shimmer sweeping across the card */
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 30%, rgba(254, 231, 97, .10) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: sweep 3.6s ease-in-out infinite;
}
@keyframes sweep { 60%, 100% { transform: translateX(100%); } }

/* On the horizon: open directions, no dates */
.rm-hz {
    height: 100%;
    display: flex; flex-direction: column; gap: .4rem;
    padding: 1.2rem 1.2rem 1.3rem;
    background: rgba(58, 68, 102, .35);
    box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 2px rgba(192, 203, 220, .15);
}
.rm-hz i { font-size: 1.6rem; color: var(--cloud); }
.rm-hz strong { font-family: var(--font-pixel); font-weight: normal; font-size: 1.08rem; color: var(--on-dark); }
.rm-hz span { font-size: .9rem; color: var(--on-dark-2); line-height: 1.5; }
.rm-hz-mystery {
    background: repeating-linear-gradient(135deg, rgba(254, 174, 52, .07) 0 10px, transparent 10px 20px), rgba(24, 20, 37, .5);
    box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 2px rgba(254, 174, 52, .35);
}
.rm-hz-mystery i { color: var(--gold); }

/* Filters */
.rm-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-bottom: 2rem; }
.rm-filters button {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-pixel); font-size: .9rem;
    color: var(--on-dark); background: var(--ink-2);
    border: 0; padding: .45rem .9rem;
    box-shadow: 0 0 0 3px var(--ink), inset 0 -3px 0 rgba(0, 0, 0, .25);
    cursor: pointer; transition: background .15s, color .15s, transform .12s;
}
.rm-filters button:hover { background: var(--ink-3); transform: translateY(-1px); }
.rm-filters button[aria-pressed="true"] { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 3px var(--ink), inset 0 -3px 0 var(--gold-dk); }

/* Category cards */
.rm-card {
    height: 100%;
    padding: 1.1rem 1.2rem 1.2rem;
    border: 12px solid transparent;
    border-image: url('../ui/nine_p_night.png') 4 fill / 12px stretch;
    image-rendering: pixelated;
    color: var(--on-dark);
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35));
}
.rm-card-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.rm-card-head i { font-size: 1.4rem; color: var(--gold); }
.rm-card-head h3 { font-size: 1.2rem; margin: 0; flex: 1; }
.rm-card-pct { font-family: var(--font-pixel); color: var(--gold); font-size: 1.05rem; }
.rm-items { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: .7rem; }
.rm-item { display: flex; gap: .7rem; align-items: flex-start; }
.rm-item-text { display: flex; flex-direction: column; }
.rm-item-name { font-weight: 800; font-size: .98rem; line-height: 1.35; }
.rm-item-note { font-size: .85rem; color: var(--on-dark-2); line-height: 1.4; }
.rm-status {
    flex: 0 0 auto; display: inline-block;
    width: 12px; height: 12px; margin-top: .3em;
    box-shadow: 0 0 0 2px var(--ink);
}
.s-live        { background: var(--grass); }
.s-in-progress { background: var(--gold); animation: blink-soft 1.6s steps(2, jump-none) infinite; }
.s-planned     { background: transparent; box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--mist); }
.s-more        { background: transparent; box-shadow: none; border: 2px dashed var(--slate); width: 12px; height: 12px; }
.rm-more .rm-item-name { color: var(--mist); font-style: italic; font-weight: 700; }
@keyframes blink-soft { 50% { background: var(--gold-dk); } }
.rm-item[data-status="planned"] .rm-item-name { color: var(--on-dark-2); }

.rm-grid[data-filter="live"]        .rm-item:not([data-status="live"]),
.rm-grid[data-filter="in-progress"] .rm-item:not([data-status="in-progress"]),
.rm-grid[data-filter="planned"]     .rm-item:not([data-status="planned"]) { display: none; }
.rm-grid[data-filter="live"]        > div:not(:has([data-status="live"])),
.rm-grid[data-filter="in-progress"] > div:not(:has([data-status="in-progress"])),
.rm-grid[data-filter="planned"]     > div:not(:has([data-status="planned"])) { display: none; }
.rm-grid .state-loading, .rm-grid .state-error { color: var(--on-dark-2); width: 100%; }

@media (max-width: 991.98px) {
    .rm-summary { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .rm-counter strong { font-size: 1.8rem; }
}

/* ── 11. FOOTER ────────────────────────────────────────── */
footer, .site-footer {
    background: var(--ink);
    color: var(--on-dark);
    border-top: 6px solid var(--ink-3);
    padding: 3.2rem 0 1.6rem;
    margin-top: auto;
    width: 100%;
}
.footer-logo    { height: 44px; width: auto; margin-bottom: .9rem; }
.footer-tagline { font-size: .95rem; color: var(--on-dark-2); line-height: 1.6; }
.footer-head {
    font-family: var(--font-pixel); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--gold); margin-bottom: .9rem;
}
.footer-links a {
    display: block; margin-bottom: .45rem;
    color: var(--on-dark-2); font-size: .95rem; font-weight: 600; text-decoration: none;
    transition: color .15s;
}
.footer-links a:hover { color: var(--gold); }
.footer-soon { display: block; font-size: .9rem; color: var(--mist); line-height: 1.55; }
.footer-hr   { border: 0; height: 3px; background: var(--ink-2); opacity: 1; margin: 2.2rem 0 1.2rem; }
.footer-copy { font-size: .85rem; color: var(--slate); text-align: center; margin: 0; }

/* ── 12. LOADING / ERROR STATES ───────────────────────── */
.state-loading, .state-error, .state-empty {
    text-align: center; padding: 3rem 1rem; font-weight: 700; color: var(--text-muted);
}
.state-error { color: var(--red); }

/* ── 13. ADMIN ─────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--nav-h)); }
.admin-sidebar {
    background: var(--deep); border-right: 4px solid var(--ink);
    padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: .25rem;
}
.admin-nav-link {
    font-family: var(--font-pixel); font-size: .95rem;
    color: var(--on-dark-2); text-decoration: none;
    padding: .55rem .9rem; display: flex; align-items: center; gap: .5rem;
    transition: background .15s, color .15s;
}
.admin-nav-link:hover, .admin-nav-link.active { background: rgba(255, 255, 255, .1); color: var(--gold); }
.admin-main { padding: 2rem; background: #f4ecdc; color: var(--ink); }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th {
    font-family: var(--font-pixel); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-muted); padding: .6rem .8rem; border-bottom: 3px solid var(--caramel);
    text-align: left; background: rgba(194, 133, 105, .12);
}
.admin-table td { padding: .6rem .8rem; border-bottom: 1px solid #ddc9a4; vertical-align: middle; }
.admin-table tr:hover td { background: rgba(254, 174, 52, .08); }
.admin-form label { font-family: var(--font-pixel); font-size: .88rem; display: block; margin-bottom: .3rem; }
.admin-form input[type="text"],
.admin-form input[type="date"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
    width: 100%; background: #fff; color: var(--ink);
    border: 2px solid var(--caramel); border-radius: 0;
    padding: .5rem .7rem; font-family: var(--font-body); font-size: .95rem; outline: none;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
    border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(62, 137, 72, .2);
}
.admin-form textarea { resize: vertical; min-height: 180px; font-family: 'Courier New', monospace; font-size: .85rem; }
.admin-preview {
    background: #fff; border: 2px solid var(--caramel);
    padding: 1rem 1.2rem; min-height: 120px; font-size: .95rem; line-height: 1.7;
}
.admin-preview h2 { font-size: 1.25rem; color: var(--forest); }
.admin-preview h3 { font-size: 1.05rem; }
.btn-admin-sm {
    font-family: var(--font-pixel); font-size: .78rem;
    padding: .25rem .65rem; border: 0; cursor: pointer; text-decoration: none; display: inline-block;
    box-shadow: 0 0 0 2px var(--ink);
    transition: filter .15s;
}
.btn-edit   { background: var(--gold); color: var(--ink); }
.btn-delete { background: var(--red);  color: #fff; }
.btn-edit:hover, .btn-delete:hover { filter: brightness(1.08); }
.import-zone {
    border: 3px dashed var(--caramel); padding: 1.5rem; text-align: center;
    color: var(--text-muted); font-size: .92rem; cursor: pointer; transition: border-color .2s, background .2s;
}
.import-zone:hover { border-color: var(--leaf); background: rgba(62, 137, 72, .06); }
@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { flex-direction: row; flex-wrap: wrap; padding: .75rem; }
}
