/*
 * Cosmos 3D UI (layouts/cosmos.blade.php). Ported from the inline CSS of
 * 'New Website UI To Copy/cosmos-website/site/*.html'. The palette is derived
 * from the server's theme (--accent, --accent-2, --bg-color, set by
 * ThemeComposer from Branding & Theme), so every server keeps its own colours;
 * the fallbacks reproduce the original Cosmos violet.
 */
:root {
    --c-bg: var(--bg-color, #090614);
    --c-accent: var(--accent, #a66bff);
    --c-accent2: var(--accent-2, #8a3ffb);
    --c-bright: color-mix(in srgb, var(--c-accent) 72%, #fff);
    --c-pale: color-mix(in srgb, var(--c-accent) 16%, #fff);
    --c-link: color-mix(in srgb, var(--c-accent) 50%, #fff);
    --c-line: color-mix(in srgb, var(--c-bright) 22%, transparent);
    --c-line-strong: color-mix(in srgb, var(--c-bright) 45%, transparent);
    --c-tint: color-mix(in srgb, var(--c-accent) 18%, transparent);
    --c-tint-strong: color-mix(in srgb, var(--c-accent) 30%, transparent);
    --c-glass: color-mix(in srgb, var(--c-bg) 70%, transparent);
    --c-txt: #d6cbe8;
    --c-muted: #b8acd0;
    --c-dim: #a99dbf;
    --c-ink: #12051f;
    --c-ok: #6ff2b3;
    --c-grad: linear-gradient(135deg, var(--c-pale), var(--c-bright) 40%, var(--c-accent2));
    --c-wrap: 1320px;
}

* { box-sizing: border-box; }
html, body.cosmos { margin: 0; background: var(--c-bg); color: var(--c-txt); font-family: var(--c-body-font, Outfit, system-ui, sans-serif); }
body.cosmos a { color: var(--c-link); text-decoration: none; }
body.cosmos a:hover { color: #fff; }
body.cosmos h1, body.cosmos h2, body.cosmos h3 { font-family: var(--c-heading-font, Sora, sans-serif); color: #fff; }
/* store.js and home-map.js toggle the hidden attribute on flex elements. */
body.cosmos [hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- background ---------- */
.sky {
    min-height: 100vh;
    background-color: var(--c-bg);
    background-image:
        radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 82% 12%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 58% 24%, #e9ddff 50%, transparent 51%),
        radial-gradient(1px 1px at 90% 40%, #fff 50%, transparent 51%),
        radial-gradient(ellipse 55% 40% at 50% 10%, color-mix(in srgb, var(--c-accent2) 35%, transparent), transparent 70%);
}

/* ---------- buttons ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; font-weight: 700; border: 0; font-family: inherit; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.pill:hover { transform: translateY(-2px); }
.pill:disabled, .pill[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.glow, body.cosmos a.glow { color: var(--c-ink) !important; background: var(--c-grad); box-shadow: 0 0 0 1px rgba(255,255,255,.4) inset, 0 10px 40px color-mix(in srgb, var(--c-accent2) 55%, transparent); }
.glow:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset, 0 14px 50px color-mix(in srgb, var(--c-accent2) 80%, transparent); }
.glass, body.cosmos a.glass { color: var(--c-pale) !important; background: rgba(255,255,255,.06); box-shadow: 0 0 0 1px var(--c-line-strong) inset; backdrop-filter: blur(8px); }
.glass:hover { background: var(--c-tint); }
.pill.lg { padding: 18px 34px; font-size: 17px; }
.pill.md { padding: 13px 24px; font-size: 15px; }
.pill.sm { padding: 10px 18px; font-size: 14px; }
.chip { padding: 11px 22px; font-size: 15px; color: var(--c-pale); background: rgba(255,255,255,.06); box-shadow: 0 0 0 1px var(--c-line-strong) inset; }
.chip[aria-pressed="true"] { color: var(--c-ink); background: var(--c-bright); box-shadow: none; }

/* ---------- header / footer ---------- */
.site-h { max-width: var(--c-wrap); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 36px; }
.site-h img { height: 46px; display: block; }
.site-h nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.04); box-shadow: 0 0 0 1px var(--c-line) inset; font-size: 15px; font-weight: 600; }
.site-h nav a { padding: 10px 16px; border-radius: 999px; color: var(--c-link); }
.site-h nav a:hover { color: #fff; }
.site-h nav a[aria-current="page"] { color: #fff; background: var(--c-tint); }
body.cosmos .site-h .nav-play { margin-left: 4px; padding: 11px 22px; font-weight: 700; color: var(--c-ink) !important; background: var(--c-grad); box-shadow: 0 0 0 1px rgba(255,255,255,.4) inset, 0 10px 40px color-mix(in srgb, var(--c-accent2) 55%, transparent); }
.site-f { color: #8f83a6; max-width: var(--c-wrap); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 28px 36px; border-top: 1px solid var(--c-line); font-size: 14px; }
.site-f nav { display: flex; flex-wrap: wrap; gap: 22px; }

/* ---------- page building blocks ---------- */
.c-section { max-width: var(--c-wrap); margin: 0 auto; padding: 0 36px 70px; }
.c-section.narrow { max-width: 1100px; }
.c-hero { padding-top: 60px; padding-bottom: 40px; }
.c-hero.center { text-align: center; }
.c-hero.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 30px; }
.c-eyebrow { margin: 0 0 18px; font-size: 13px; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: var(--c-bright); }
.c-kicker { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--c-pale); }
body.cosmos .c-h1 { margin: 0 0 12px; font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -.035em; }
body.cosmos .c-h1.xl { font-size: 72px; max-width: 820px; margin: 0 auto 18px; }
body.cosmos .c-h2 { margin: 0 0 20px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
body.cosmos .c-h3 { margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.c-lead { margin: 0; max-width: 560px; font-size: 19px; line-height: 1.6; color: var(--c-muted); }
.c-hero.center .c-lead { margin: 0 auto; }
.c-muted { color: var(--c-dim); }
.c-small { font-size: 13px; color: var(--c-dim); }
.c-row { display: flex; flex-wrap: wrap; gap: 20px; }
.c-row > * { flex: 1 1 280px; min-width: 0; }
.c-row.wide > * { flex-basis: 380px; }
.c-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tile { border-radius: 24px; background: rgba(255,255,255,.035); box-shadow: 0 0 0 1px var(--c-line) inset; padding: 28px; }
.tile.feature { background: linear-gradient(160deg, var(--c-tint-strong), rgba(40,20,70,.6)); box-shadow: 0 0 0 1px var(--c-line-strong) inset, 0 20px 60px color-mix(in srgb, var(--c-accent2) 25%, transparent); }
.tile.flat { padding: 12px; }
.c-badge { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; background: var(--c-tint); color: var(--c-pale); }
.c-badge.ok { background: color-mix(in srgb, var(--c-ok) 15%, transparent); color: var(--c-ok); }
.c-badge.solid { background: var(--c-accent); color: var(--c-ink); }
.c-badge.muted { background: rgba(255,255,255,.08); color: #c9bde0; }
.c-step { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-tint); font-family: var(--c-heading-font); font-weight: 800; color: #fff; }
.c-dl { margin: 0; font-size: 15px; }
.c-dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.c-dl > div:last-child { border-bottom: 0; }
.c-dl dt { color: var(--c-dim); }
.c-dl dd { margin: 0; color: #fff; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.c-empty { padding: 28px; text-align: center; color: var(--c-dim); }

/* ---------- forms ---------- */
.c-field { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 24px; border-radius: 999px; background: rgba(255,255,255,.06); box-shadow: 0 0 0 1px var(--c-line-strong) inset; }
.c-field input { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: none; background: transparent; color: #fff; font: inherit; font-size: 17px; }
.c-field.compact input { font-size: 15px; padding: 9px 0; }
.c-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--c-muted); }
.c-check input { margin-top: 4px; accent-color: var(--c-accent); }
.c-qty { width: 76px; padding: 10px 12px; border-radius: 12px; border: 0; background: rgba(255,255,255,.06); box-shadow: 0 0 0 1px var(--c-line-strong) inset; color: #fff; font: inherit; }

/* ---------- lists (updates, guides, voters) ---------- */
.c-list { display: flex; flex-direction: column; gap: 6px; }
.c-list-row { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: 16px; color: var(--c-txt); }
body.cosmos a.c-list-row:hover { background: rgba(255,255,255,.04); color: var(--c-txt); }
.c-list-row .num { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--c-tint); font-family: var(--c-heading-font); font-weight: 800; color: var(--c-pale); }
.c-list-row .body { flex: 1; min-width: 0; }
.c-list-row strong { display: block; font-size: 17px; color: #fff; }
.c-list-row .arrow { color: var(--c-accent); font-size: 20px; }
.c-post { display: flex; flex-direction: column; gap: 10px; color: var(--c-txt); }
body.cosmos a.c-post:hover { color: var(--c-txt); box-shadow: 0 0 0 1px var(--c-line-strong) inset; }
.c-post h3 { margin: 4px 0 0; font-size: 22px; font-weight: 700; }
.c-post p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--c-muted); }
.c-post .more { margin-top: auto; font-weight: 700; color: var(--c-link); }
.c-feature-post { position: relative; display: flex; align-items: flex-end; min-height: 380px; padding: 0; overflow: hidden; color: var(--c-txt); }
.c-feature-post .bg { position: absolute; inset: 0; background-size: cover; background-position: 50% 35%; }
.c-feature-post .over { position: relative; width: 100%; padding: 40px; background: linear-gradient(0deg, rgba(9,6,20,.97), rgba(9,6,20,.6) 60%, rgba(9,6,20,0)); }
.c-feature-post h2 { margin: 14px 0 8px; font-size: 44px; font-weight: 800; letter-spacing: -.02em; }
.c-feature-post p { margin: 0; max-width: 680px; font-size: 17px; line-height: 1.6; }
.c-rank { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 16px; }
.c-rank .pos { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--c-dim); font-weight: 800; }
.c-rank .who { flex: 1; font-size: 17px; font-weight: 600; color: var(--c-txt); }
.c-rank .n { color: var(--c-dim); }
.c-rank.top { background: rgba(255,255,255,.04); }
.c-rank.top .pos { background: color-mix(in srgb, var(--c-bright) 30%, transparent); color: #fff; }
.c-rank.top .who { color: #fff; font-weight: 700; }
.c-rank.first { background: var(--c-tint); }
.c-rank.first .pos { background: var(--c-pale); color: var(--c-ink); }
.c-rank.first .n, .c-rank.top .n { color: var(--c-pale); font-weight: 700; }
.c-pagination { margin-top: 26px; }
.c-pagination nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.c-pagination svg { width: 18px; height: 18px; }

/* ---------- vote ---------- */
body.cosmos .vbtn, .vbtn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 24px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; color: var(--c-ink); background: var(--c-grad); box-shadow: 0 8px 26px color-mix(in srgb, var(--c-accent2) 45%, transparent); cursor: pointer; }
.vbtn[disabled] { color: #c9bde0; background: rgba(255,255,255,.06); box-shadow: 0 0 0 1px var(--c-line) inset; cursor: not-allowed; }
.vote-site-card { display: flex; flex-direction: column; gap: 14px; }
.vote-site-card .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vote-site-card .name { font-family: var(--c-heading-font); font-size: 20px; font-weight: 700; color: #fff; }
.vote-site-card .timer { font-size: 12px; font-weight: 800; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: #c9bde0; }
.c-big-number { margin: 6px 0 2px; font-family: var(--c-heading-font); font-size: 56px; font-weight: 800; color: #fff; }

/* ---------- store ---------- */
.c-item { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.c-item .art { aspect-ratio: 4 / 3; width: 100%; height: auto; position: relative; border-radius: 16px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c-bright) 40%, transparent), rgba(20,10,35,.9) 70%); box-shadow: 0 0 0 1px var(--c-line) inset; }
/* Inset box: pixel-art icons scale crisply and never touch the rounded corners, at any card width. */
.c-item .art img { position: absolute; inset: 10%; width: 80%; height: 80%; object-fit: contain; image-rendering: pixelated; }
.c-item .art .ph { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: #c9bde0; padding: 0 12px; text-align: center; }
/* Product grid: cards never squash below 240px; two columns on phones, one below 420px (see responsive). */
.c-row.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.c-row.store-grid > * { min-width: 0; }
.product-card[data-product-id] { cursor: pointer; transition: box-shadow .2s; }
.product-card[data-product-id]:hover { box-shadow: 0 0 0 1px var(--c-line-strong) inset; }
.product-card[data-product-id]:focus-visible { outline: 2px solid var(--c-bright); outline-offset: 3px; }
.c-item .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.c-item h3 { margin: 0; font-size: 19px; font-weight: 700; }
.c-item .price { font-size: 18px; font-weight: 800; color: var(--c-pale); white-space: nowrap; }
.c-item .price del { color: var(--c-dim); font-weight: 600; font-size: 14px; margin-right: 4px; }
.c-item p { margin: 0; font-size: 14px; color: var(--c-dim); }
.c-item .buy { margin-top: auto; display: flex; gap: 10px; align-items: center; }
.c-item .buy .pill { flex: 1; }
/* Quantity stepper [−][n][+] on the cards and in the product pop-out (replaces the native number spinner). */
.c-stepper { display: inline-flex; align-items: stretch; flex: none; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: 0 0 0 1px var(--c-line-strong) inset; overflow: hidden; }
.c-stepper button { width: 34px; border: 0; background: none; color: var(--c-pale); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.c-stepper button:hover { background: var(--c-tint); color: #fff; }
.c-stepper button:focus-visible { outline: 2px solid var(--c-bright); outline-offset: -2px; }
.c-stepper input { width: 46px; padding: 10px 0; border: 0; background: transparent; color: #fff; font: inherit; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.c-stepper input::-webkit-outer-spin-button, .c-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@keyframes c-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.35); color: #fff; } 100% { transform: scale(1); } }
.store-cart-count.pulse { display: inline-block; animation: c-pulse .6s ease-out; }

/* ---------- store: product pop-out (<dialog id="storeProductModal">) ---------- */
.store-modal { position: relative; width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto; padding: 0; border: 0; color: var(--c-txt); background: color-mix(in srgb, var(--c-bg) 92%, #2a1a48); box-shadow: 0 0 0 1px var(--c-line-strong) inset, 0 30px 90px rgba(0,0,0,.6); overflow: auto; }
.store-modal::backdrop { background: rgba(5,3,12,.72); backdrop-filter: blur(4px); }
.store-modal-inner { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 28px; }
.store-modal .art { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 18px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c-bright) 40%, transparent), rgba(20,10,35,.9) 70%); box-shadow: 0 0 0 1px var(--c-line) inset; }
.store-modal .art img { position: absolute; inset: 10%; width: 80%; height: 80%; object-fit: contain; image-rendering: pixelated; }
.store-modal .art .ph { font-size: 15px; font-weight: 700; letter-spacing: .14em; color: #c9bde0; padding: 0 16px; text-align: center; }
.store-modal-details { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
body.cosmos .store-modal h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; padding-right: 40px; }
.store-modal .price { font-size: 24px; font-weight: 800; color: var(--c-pale); }
.store-modal .price del { color: var(--c-dim); font-weight: 600; font-size: 17px; margin-right: 8px; }
.store-modal-desc { font-size: 15px; }
.store-modal-desc:empty { display: none; }
.store-modal .buy { margin-top: auto; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-modal .buy .pill { flex: 1 1 160px; }
.store-modal-close { position: absolute; top: 14px; right: 14px; z-index: 1; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 18px; cursor: pointer; }
.store-modal-close:hover { background: var(--c-tint-strong); }
.store-modal-close:focus-visible { outline: 2px solid var(--c-bright); outline-offset: 2px; }
@media (min-width: 760px) {
    .store-modal-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 32px; }
}
@media (max-width: 599px) {
    .store-modal { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; border-radius: 0; }
    .store-modal-inner { padding: 64px 18px 24px; }
}

/* ---------- guides hub cards ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
body.cosmos a.guide-card, .guide-card { display: flex; flex-direction: column; gap: 10px; padding: 0; overflow: hidden; color: var(--c-txt); transition: transform .2s, box-shadow .2s; }
body.cosmos a.guide-card:hover { color: var(--c-txt); transform: translateY(-4px); box-shadow: 0 0 0 1px var(--c-line-strong) inset, 0 18px 50px color-mix(in srgb, var(--c-accent2) 30%, transparent); }
body.cosmos a.guide-card:focus-visible { outline: 2px solid var(--c-bright); outline-offset: 3px; }
.guide-card .thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c-bright) 40%, transparent), rgba(20,10,35,.9) 70%); }
.guide-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.guide-card .thumb .ph { font-family: var(--c-heading-font); font-size: 40px; font-weight: 800; letter-spacing: .06em; color: var(--c-pale); }
.guide-card .body { display: flex; flex-direction: column; gap: 8px; padding: 6px 22px 24px; }
.guide-card h3 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.3; }
.guide-card .meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--c-dim); }
.guide-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--c-muted); }
/* Featured (newest) guide: two columns wide, thumbnail beside the text. */
@media (min-width: 900px) {
    body.cosmos a.guide-card.featured, .guide-card.featured { grid-column: span 2; flex-direction: row; align-items: stretch; gap: 0; }
    .guide-card.featured .thumb { flex: 0 0 55%; }
    .guide-card.featured .body { justify-content: center; padding: 24px 28px; }
    .guide-card.featured h3 { font-size: 28px; }
}
.guide-article-banner { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 24px; display: block; margin: 0 0 24px; }
.c-item.promo { box-shadow: 0 0 0 1px var(--c-bright) inset; }
.store-cart { display: flex; flex-direction: column; gap: 14px; }
.store-cart-title { margin: 0; font-size: 22px; }
.store-cart-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.store-cart-line { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); }
.store-cart-thumb { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--c-tint); flex: none; }
.store-cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.store-cart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.store-cart-name { color: #fff; font-weight: 600; }
.store-cart-unit { font-size: 13px; color: var(--c-dim); }
.store-cart-line .cartQty { width: 70px; padding: 8px 10px; border-radius: 10px; border: 0; background: rgba(255,255,255,.06); color: #fff; font: inherit; }
.store-cart-line-total { font-weight: 700; color: var(--c-pale); min-width: 70px; text-align: right; }
.store-cart-line .cartRemove, .store-cart-clear { border: 0; background: none; color: var(--c-dim); font: inherit; font-size: 18px; cursor: pointer; }
.store-cart-clear { font-size: 14px; }
.store-cart-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.store-cart-total { font-size: 18px; font-weight: 800; color: #fff; }
.store-cart-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- rich text (update threads, guides, custom pages) ---------- */
.c-prose { font-size: 16px; line-height: 1.7; color: var(--c-txt); overflow-wrap: anywhere; }
.c-prose h1, .c-prose h2, .c-prose h3, .c-prose h4 { color: #fff; line-height: 1.25; }
.c-prose img { max-width: 100%; height: auto; border-radius: 14px; }
.c-prose a { text-decoration: underline; }
.c-prose blockquote { margin: 0; padding: 10px 18px; border-left: 3px solid var(--c-accent); background: rgba(255,255,255,.03); border-radius: 0 12px 12px 0; }
.c-prose table { border-collapse: collapse; width: 100%; }
.c-prose td, .c-prose th { border: 1px solid var(--c-line); padding: 8px; }
.c-prose ul { list-style: disc; padding-left: 1.4em; }
.c-prose ol { list-style: decimal; padding-left: 1.4em; }
.c-prose li { margin: .25em 0; }
.c-prose img { max-width: 100%; height: auto; }

/* ---------- home: 3D map ---------- */
body.cosmos-home { height: 100%; overflow: hidden; }
.cosmos-bare { min-height: 100vh; }
body.cosmos-home .site-h { position: fixed; top: 0; left: 0; right: 0; z-index: 5; }
body.cosmos-home .site-h nav { background: color-mix(in srgb, var(--c-bg) 72%, transparent); box-shadow: 0 0 0 1px var(--c-line-strong) inset; backdrop-filter: blur(8px); }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#scene.dragging { cursor: grabbing; }
.shade { position: fixed; inset: 0; pointer-events: none; background:
    linear-gradient(90deg, rgba(9,6,20,.92) 0%, rgba(9,6,20,.55) 30%, rgba(9,6,20,0) 55%),
    linear-gradient(180deg, rgba(9,6,20,.75) 0%, rgba(9,6,20,0) 18%, rgba(9,6,20,0) 75%, rgba(9,6,20,.85) 100%); }
.home-fallback-bg { position: fixed; inset: 0; background-color: var(--c-bg); background-image: var(--header-bg); background-position: var(--header-bg-position, 50% 50%); background-size: var(--header-bg-size, cover); background-repeat: no-repeat; }
.hero { position: fixed; left: max(36px, calc((100vw - 1320px) / 2 + 36px)); top: 50%; transform: translateY(-46%); z-index: 4; max-width: 470px; pointer-events: none; }
.hero > * { pointer-events: auto; }
.online { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: color-mix(in srgb, var(--c-accent) 16%, transparent); font-size: 14px; font-weight: 700; color: var(--c-pale); }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-ok); box-shadow: 0 0 10px var(--c-ok); }
body.cosmos .hero h1 { margin: 20px 0 18px; font-size: clamp(44px, 5.4vw, 74px); line-height: 1; font-weight: 800; letter-spacing: -.035em; text-shadow: 0 4px 40px rgba(9,6,20,.8); }
.hero .lead { margin: 0 0 30px; font-size: 19px; line-height: 1.6; color: #cfc4e2; text-shadow: 0 2px 20px rgba(9,6,20,.9); }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.card { display: none; margin-top: 30px; padding: 22px 24px; border-radius: 22px; background: rgba(24,13,44,.78); box-shadow: 0 0 0 1px var(--c-line-strong) inset, 0 20px 60px rgba(0,0,0,.45); backdrop-filter: blur(10px); transition: opacity .35s, transform .35s; }
body.picked .card { display: block; }
.card.swap { opacity: 0; transform: translateY(8px); }
.card .k { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--c-bright); }
body.cosmos .card h2 { margin: 6px 0; font-size: 26px; font-weight: 800; }
.card p { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: #c9bfdd; }
.card .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.card .row [hidden] { display: none; }
#markers { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.mk { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 6px; cursor: pointer; font: inherit; transform: translate(-50%, -14px); transition: opacity .3s; }
.mk .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--c-bright); box-shadow: 0 0 12px var(--c-accent), 0 0 30px color-mix(in srgb, var(--c-accent) 60%, transparent); transition: transform .2s; }
.mk:hover .dot { transform: scale(1.3); }
.mk.on .dot { width: 22px; height: 22px; background: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c-bright) 28%, transparent), 0 0 18px #fff, 0 0 50px var(--c-bright); }
.mk .lb { padding: 6px 12px; border-radius: 999px; background: rgba(9,6,20,.84); box-shadow: 0 0 0 1px var(--c-line-strong) inset; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; }
.mk.on .lb { background: var(--c-grad); color: var(--c-ink); }
.mk.hidden { opacity: 0; pointer-events: none; }
.mk .ring { position: absolute; top: 6px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--c-pale); animation: ping 2.4s infinite; pointer-events: none; }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3); opacity: 0; } }
.tools { position: fixed; right: max(36px, calc((100vw - 1320px) / 2 + 36px)); bottom: 28px; z-index: 5; display: flex; gap: 10px; }
.tools button { padding: 11px 18px; font-size: 14px; }
#loading { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; background: var(--c-bg); transition: opacity .8s; }
#loading.done { opacity: 0; pointer-events: none; }
#loading div { display: flex; flex-direction: column; align-items: center; gap: 16px; font-weight: 700; letter-spacing: .2em; font-size: 12px; color: var(--c-bright); text-transform: uppercase; }
#loading b { width: 220px; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--c-bright) 20%, transparent); overflow: hidden; position: relative; }
#loading b::after { content: ""; position: absolute; inset: 0; width: var(--p, 10%); background: linear-gradient(90deg, var(--c-bright), var(--c-accent2)); transition: width .3s; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
    .site-h { padding: 16px 18px; }
    .site-h nav a:not(.nav-play) { display: none; }
    body.cosmos .c-h1, body.cosmos .c-h1.xl { font-size: 44px; }
    .c-section { padding-left: 18px; padding-right: 18px; }
    .hero { left: 18px; right: 18px; top: auto; bottom: 18px; transform: none; max-width: none; }
    body.cosmos .hero h1 { font-size: 34px; margin: 12px 0; }
    .hero .lead { display: none; }
    .card { margin-top: 14px; display: none; }
    body.picked .card { display: block; }
    body.picked .hero h1, body.picked .online { display: none; }
    .ctas .glass { display: none; }
    .shade { background: linear-gradient(0deg, rgba(9,6,20,.95) 0%, rgba(9,6,20,.6) 40%, rgba(9,6,20,0) 65%), linear-gradient(180deg, rgba(9,6,20,.7), rgba(9,6,20,0) 16%); }
    .tools { top: 86px; bottom: auto; right: 18px; }
    #motionBtn { display: none; }
    .tools button { padding: 9px 16px; font-size: 13px; }
    body.cosmos-home.no-map .hero { bottom: 28px; }
    .c-row.store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .c-row.store-grid .c-item { padding: 14px; }
    .c-row.store-grid .buy { flex-wrap: wrap; }
    .c-row.store-grid .buy .pill { flex: 1 1 100%; }
}
@media (max-width: 420px) {
    .c-row.store-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .mk .ring { animation: none; display: none; } }
