/* landing.css — Star Explorer portal, AAA neon rework. A deep-space stage with
   plasma gradients, glass panels, bold neon accents (cyan / violet / plasma-pink)
   and a living orb. Light + dark mode. Responsive: 480 / 820 / 1100. */

/* ========================= DARK MODE (default) ============================= */
:root {
    --bg: #05060e;
    --bg-2: #090a18;
    --bg-gradient: var(--bg);   /* flat deep space — the living starfield is the only backdrop */
    --card: rgba(18, 16, 40, .55);
    --card-2: rgba(12, 12, 28, .7);
    --card-solid: #0d0c1e;
    --card-border: rgba(126, 224, 232, .16);
    --card-glow: rgba(139, 123, 247, .18);
    --line: rgba(140, 160, 230, .16);
    --line-soft: rgba(140, 160, 230, .1);
    --ice: #eef6ff;
    --cyan: #5ef3ff;
    --cyan-dim: rgba(94, 243, 255, .16);
    --violet: #a78bfa;
    --violet-dim: rgba(167, 139, 250, .16);
    --plasma: #ff5cc8;
    --plasma-dim: rgba(255, 92, 200, .16);
    --green: #5ef2a8;
    --text: #cfd4ec;
    --muted: #8b90b6;
    --input-bg: rgba(6, 7, 18, .6);
    --hover-bg: rgba(94, 243, 255, .08);
    --shadow: rgba(0, 0, 0, .45);
    --star-opacity: 1;
    --grad-hot: linear-gradient(120deg, var(--cyan), var(--violet) 55%, var(--plasma));
    --r: 0px;
    --r-lg: 0px;
    --r-sm: 0px;
    --pill: 0px;              /* fully squared — no rounding on boxes, chips or inputs */
    --bevel: 11px;           /* corner cut for angular HUD buttons */
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --display: 'Space Grotesk', var(--mono);
}

/* ========================= LIGHT MODE ====================================== */
[data-theme="light"] {
    --bg: #eef1f8;
    --bg-2: #e6e9f4;
    --bg-gradient: var(--bg);
    --card: rgba(255, 255, 255, .82);
    --card-2: rgba(255, 255, 255, .9);
    --card-solid: #ffffff;
    --card-border: rgba(90, 110, 180, .16);
    --card-glow: rgba(120, 90, 220, .1);
    --line: rgba(90, 110, 180, .16);
    --line-soft: rgba(90, 110, 180, .1);
    --ice: #131a34;
    --cyan: #0c8f97;
    --cyan-dim: rgba(12, 143, 151, .12);
    --violet: #6d54d6;
    --violet-dim: rgba(109, 84, 214, .12);
    --plasma: #c93b9e;
    --plasma-dim: rgba(201, 59, 158, .12);
    --green: #159c63;
    --text: #1b2038;
    --muted: #656a8c;
    --input-bg: rgba(238, 241, 249, .85);
    --hover-bg: rgba(12, 143, 151, .07);
    --shadow: rgba(70, 60, 120, .1);
    --star-opacity: .4;
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #eef1f8; --bg-2: #e6e9f4;
        --bg-gradient: var(--bg);
        --card: rgba(255, 255, 255, .82); --card-2: rgba(255, 255, 255, .9); --card-solid: #ffffff;
        --card-border: rgba(90, 110, 180, .16); --card-glow: rgba(120, 90, 220, .1);
        --line: rgba(90, 110, 180, .16); --line-soft: rgba(90, 110, 180, .1);
        --ice: #131a34; --cyan: #0c8f97; --cyan-dim: rgba(12, 143, 151, .12);
        --violet: #6d54d6; --violet-dim: rgba(109, 84, 214, .12);
        --plasma: #c93b9e; --plasma-dim: rgba(201, 59, 158, .12); --green: #159c63;
        --text: #1b2038; --muted: #656a8c; --input-bg: rgba(238, 241, 249, .85);
        --hover-bg: rgba(12, 143, 151, .07); --shadow: rgba(70, 60, 120, .1); --star-opacity: .4;
    }
}

html[data-theme] *, html[data-theme] *::before, html[data-theme] *::after {
    transition: background-color .3s ease, color .25s ease, border-color .3s ease, box-shadow .3s ease, fill .25s ease, stroke .25s ease;
}

/* ========================= RESET & BASE ==================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-gutter: stable; scroll-behavior: smooth; }
body {
    background: var(--bg-gradient); background-attachment: fixed;
    color: var(--text); font: 400 16px/1.6 var(--font);
    min-height: 100dvh; overflow-x: hidden;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--violet-dim); color: var(--ice); }
a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ice); }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--violet-dim); }

.ico { width: 1.3em; height: 1.3em; vertical-align: -.22em; }
.flag { width: 26px; height: 18px; border-radius: 3px; display: inline-block; vertical-align: -3px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.feed-loading { text-align: center; color: var(--muted); font: 500 20px var(--mono); letter-spacing: .3em; padding: 30px 0; }
.feed-empty { color: var(--muted); font-size: 14px; padding: 12px 2px; }

#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: var(--star-opacity); }

/* ---- home parallax space scene (pure CSS) -------------------------------- */
/* nebula clouds + two star planes + a planet & moon, layered above the base
   starfield and below the content. Each plane drifts at its own rate via the
   shared --sy scroll variable (CSS calc does the math). */
.home-space { position: fixed; inset: -12% -8% -8%; z-index: 0; pointer-events: none; overflow: hidden; }
.home-space > * { position: absolute; will-change: transform; }

/* colourful nebula — clearly visible deep-space colour */
.hs-neb {
    inset: 0;
    background:
        radial-gradient(58vmax 42vmax at 20% 4%, rgba(167, 139, 250, .40), transparent 60%),
        radial-gradient(50vmax 40vmax at 84% -4%, rgba(255, 92, 200, .30), transparent 58%),
        radial-gradient(46vmax 42vmax at 64% 30%, rgba(94, 243, 255, .16), transparent 62%),
        radial-gradient(64vmax 52vmax at 8% 78%, rgba(120, 90, 220, .26), transparent 60%);
    filter: blur(8px);
    transform: translate3d(0, calc(var(--sy, 0) * -0.05px), 0);
}

/* two star planes (tiled dots) */
.hs-stars { inset: -20%; }
.hs-far {
    background-image:
        radial-gradient(1.4px 1.4px at 40px 60px, rgba(220, 235, 255, .9), transparent),
        radial-gradient(1.2px 1.2px at 130px 20px, rgba(200, 220, 255, .7), transparent),
        radial-gradient(1.6px 1.6px at 90px 150px, rgba(190, 210, 255, .8), transparent),
        radial-gradient(1.3px 1.3px at 180px 110px, rgba(255, 255, 255, .7), transparent);
    background-size: 210px 210px;
    transform: translate3d(0, calc(var(--sy, 0) * -0.09px), 0);
}
.hs-mid {
    background-image:
        radial-gradient(2px 2px at 60px 30px, rgba(190, 235, 255, 1), transparent),
        radial-gradient(1.8px 1.8px at 20px 120px, rgba(210, 210, 255, .85), transparent),
        radial-gradient(2.2px 2.2px at 160px 80px, rgba(255, 225, 250, .8), transparent);
    background-size: 300px 300px;
    transform: translate3d(0, calc(var(--sy, 0) * -0.2px), 0);
}

/* the background planet is our living orb (glowing sphere + Saturn ring),
   rendered by the same canvas painter as the hero/brand mark */
.hs-orb {
    display: block; width: 88vmin; height: 88vmin; left: -30vmin; bottom: -32vmin;
    opacity: .8; transform: translate3d(0, calc(var(--sy, 0) * -0.12px), 0);
    /* tint the shared orb painter to plasma-magenta so it isn't a clone of the
       cyan hero orb — stays inside the cyan/violet/plasma palette */
    filter: hue-rotate(85deg) saturate(1.25);
}

/* a soft floor keeps the content readable without hiding the scene */
.home-space::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 6, 14, .12) 0%, rgba(5, 6, 14, .34) 58%, rgba(5, 6, 14, .55) 100%); }
:root[data-theme="light"] .home-space { opacity: .45; }

/* ---- scroll-reveal of the board tiles ------------------------------------ */
.reveal-ready .board .card { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .75s cubic-bezier(.2, .75, .25, 1); }
.reveal-ready .board .card.rise-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal-ready .board .card { transition: none; }
}

/* ========================= BUTTONS ======================================== */
.btn-hot {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px 24px; border-radius: 2px; overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    /* a wide, continuously-drifting plasma gradient = the button feels alive */
    background: linear-gradient(120deg, var(--cyan), var(--violet) 34%, var(--plasma) 54%, var(--violet) 74%, var(--cyan));
    background-size: 260% 100%;
    color: #060410; font-weight: 700; font-size: 15px; letter-spacing: .02em;
    animation: hotflow 7s linear infinite, hotglow 3.6s ease-in-out infinite;
    transition: transform .18s ease, filter .25s ease;
}
@keyframes hotflow { to { background-position: 260% 0; } }
@keyframes hotglow {
    0%, 100% { box-shadow: 0 6px 24px rgba(139, 123, 247, .38), 0 0 18px var(--plasma-dim), inset 0 0 0 1px rgba(255, 255, 255, .07); }
    50%      { box-shadow: 0 11px 40px rgba(255, 92, 200, .5), 0 0 32px var(--cyan-dim), inset 0 0 0 1px rgba(255, 255, 255, .12); }
}
.btn-hot::after {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
    transform: translateX(-120%); animation: sheen 4.2s ease-in-out infinite;
}
@keyframes sheen { 0%, 58% { transform: translateX(-120%); } 78%, 100% { transform: translateX(120%); } }
.btn-hot:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.08) saturate(1.12); }
.btn-hot:active { transform: translateY(0) scale(.99); }
.btn-hot .ico, .btn-hot > span { position: relative; z-index: 1; }
/* the download button's icon gently bobs — a small sign of life */
#hero-dl .ico { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(2px); } }
/* the hero's secondary (ghost) button breathes a faint neon edge */
.hero-cta .btn-ghost { animation: ghostglow 5s ease-in-out infinite; }
@keyframes ghostglow { 50% { border-color: var(--cyan); box-shadow: 0 0 18px var(--cyan-dim); } }
.btn-hot.lg { padding: 16px 30px; font-size: 16.5px; }
.btn-hot.sm { padding: 9px 16px; font-size: 13.5px; gap: 6px; }
.btn-hot.sm .ico { width: 1.15em; height: 1.15em; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 18px; border-radius: 0;
    border: 1px solid var(--line); color: var(--text); background: var(--card-2);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: border-color .2s, color .2s, background .2s, box-shadow .3s, transform .18s;
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--ice); box-shadow: 0 0 22px var(--cyan-dim); transform: translateY(-1px); }
.btn-ghost.lg { padding: 15px 24px; font-size: 15px; }
.btn-primary { /* legacy alias → hot */ }

/* ========================= GATE =========================================== */
#gate {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    /* transparent stage: nothing but the living starfield behind the logo + buttons */
    background: transparent;
    opacity: 0; transition: opacity .6s ease;
}
#gate.ready { opacity: 1; }
#gate.gone { opacity: 0; pointer-events: none; }
.gate-card { text-align: center; max-width: 480px; width: 100%; }
.gate-orb { width: clamp(180px, 40vw, 260px); height: clamp(180px, 40vw, 260px); margin: 0 auto; }
.gate-orb canvas { width: 100%; height: 100%; display: block; }
.gate-title {
    margin: 6px 0 12px; color: var(--ice);
    font: 700 clamp(34px, 8vw, 54px)/1.02 var(--display);
    letter-spacing: .1em; text-shadow: 0 0 40px rgba(94, 243, 255, .45);
}
.gate-tag { color: var(--muted); font-size: 15.5px; margin-bottom: 30px; line-height: 1.6; }
.gate-langs { display: flex; gap: 16px; justify-content: center; margin-bottom: 28px; }
/* language toggle: transparent HUD chip — no fill, no glow-panel, just a crisp
   border with corner brackets so nothing reads as a floating backdrop */
.lang-opt {
    position: relative; display: flex; align-items: center; gap: 10px;
    padding: 11px 22px; border-radius: 3px;
    border: 1px solid var(--line); background: transparent; color: var(--text);
    font: 500 14px var(--mono); letter-spacing: .05em;
    transition: color .2s, border-color .2s, transform .15s, background .25s;
}
.lang-opt::before, .lang-opt::after {
    content: ''; position: absolute; width: 6px; height: 6px; pointer-events: none;
    border: 1.5px solid var(--muted); transition: border-color .25s, box-shadow .25s;
}
.lang-opt::before { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.lang-opt::after  { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.lang-opt:hover { transform: translateY(-2px); border-color: var(--violet); color: var(--ice); }
.lang-opt:hover::before, .lang-opt:hover::after { border-color: var(--violet); box-shadow: 0 0 8px var(--violet-dim); }
.lang-opt.active { border-color: var(--cyan); color: var(--ice); }
.lang-opt.active::before, .lang-opt.active::after { border-color: var(--cyan); box-shadow: 0 0 9px var(--cyan); }

/* ENTER: angular plasma slab with cut corners + a sweeping shine on hover */
.gate-enter {
    position: relative; overflow: hidden;
    width: min(340px, 100%); padding: 18px 28px; border-radius: 2px;
    background: var(--grad-hot); background-size: 200% 100%;
    color: #060410; font: 700 18px var(--mono); letter-spacing: .28em; text-indent: .28em;
    clip-path: polygon(0 0, calc(100% - var(--bevel)) 0, 100% var(--bevel), 100% 100%, var(--bevel) 100%, 0 calc(100% - var(--bevel)));
    box-shadow: 0 0 28px rgba(94, 243, 255, .22);
    transition: transform .2s, box-shadow .3s, background-position .55s, filter .25s;
}
.gate-enter::after {
    content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%);
    transform: translateX(-130%); transition: transform .6s ease;
}
.gate-enter:hover { transform: translateY(-2px); background-position: 100% 0; filter: brightness(1.07) saturate(1.1); box-shadow: 0 0 42px rgba(255, 92, 200, .34); }
.gate-enter:hover::after { transform: translateX(130%); }
.ge-arrow { text-indent: 0; }
.gate-hint { margin-top: 18px; color: var(--muted); font: 400 13px var(--mono); letter-spacing: .08em; }

/* ========================= SHELL ========================================== */
#shell { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100dvh; }

/* ---- ticker --------------------------------------------------------------- */
.ticker {
    height: 34px; overflow: hidden; white-space: nowrap;
    border-bottom: 1px solid var(--line-soft); background: rgba(8, 8, 20, .5);
    font: 400 12.5px var(--mono); color: var(--muted);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
[data-theme="light"] .ticker { background: rgba(255, 255, 255, .6); }
.tick-track { display: inline-flex; align-items: center; height: 34px; animation: tick 90s linear infinite; will-change: transform; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tick-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 26px; }
.tick-item .ico { color: var(--violet); width: 1.1em; height: 1.1em; }
.tick-item.rel { color: var(--cyan); }
.tick-item.rel .ico { color: var(--cyan); }

/* ---- topbar --------------------------------------------------------------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 22px;
    padding: 12px clamp(16px, 4vw, 40px);
    background: rgba(6, 7, 16, .72);
    backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--line);
}
[data-theme="light"] .topbar { background: rgba(238, 241, 248, .8); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ice); transition: opacity .2s; }
.brand:hover { opacity: .85; }
.brand-orb { width: 38px; height: 38px; display: block; flex: none; }
.brand-name { font: 700 14.5px var(--display); letter-spacing: .2em; }
.topnav { display: flex; gap: 6px; margin-left: 8px; }
.topnav a {
    padding: 9px 17px; border-radius: var(--pill); color: var(--muted);
    font: 600 13.5px var(--font); letter-spacing: .01em;
    border: 1px solid transparent; transition: color .2s, background .2s, border-color .2s, box-shadow .3s, transform .15s;
}
.topnav a:hover { color: var(--ice); background: var(--hover-bg); border-color: var(--cyan); box-shadow: 0 0 16px var(--cyan-dim); transform: translateY(-1px); }
/* active menu item = the same living plasma pill as the .btn-hot buttons */
.topnav a.active {
    color: #060410; border-color: transparent;
    background: linear-gradient(120deg, var(--cyan), var(--violet) 40%, var(--plasma) 60%, var(--violet) 80%, var(--cyan));
    background-size: 260% 100%;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    animation: hotflow 7s linear infinite, hotglow 3.6s ease-in-out infinite;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; position: relative; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 0; color: var(--muted);
    transition: color .2s, background .2s, transform .15s;
}
.icon-btn:hover { color: var(--cyan); background: var(--hover-bg); transform: translateY(-1px); }
#top-user { display: inline-flex; }
.top-user {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 6px 14px 6px 7px; border-radius: var(--pill);
    border: 1px solid var(--line); color: var(--text); font-size: 14px;
    transition: border-color .2s, background .2s, box-shadow .3s;
}
.top-user:hover { border-color: var(--cyan); background: var(--hover-bg); box-shadow: 0 0 20px var(--cyan-dim); }
.top-user { cursor: pointer; }
.top-user img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.top-user.on b { color: var(--ice); }
.top-user .ico { width: 1em; height: 1em; color: var(--muted); transition: transform .2s; }
.top-user.open .ico { transform: rotate(90deg); color: var(--cyan); }
.btn-hot.signin span { position: relative; z-index: 1; }
.burger { display: none; }

/* ---- account dropdown (top-right) ----------------------------------------- */
.acct-menu {
    position: absolute; top: calc(100% + 12px); right: 0; z-index: 40;
    width: 304px; max-width: calc(100vw - 28px);
    background: var(--card-solid); border: 1px solid var(--card-border); border-radius: var(--r-lg);
    box-shadow: 0 22px 64px var(--shadow), 0 0 42px var(--card-glow);
    padding: 18px; display: none;
}
.acct-menu.open { display: block; animation: acctIn .18s ease; }
@keyframes acctIn { from { opacity: 0; transform: translateY(-6px); } }
.acct-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.acct-avatar { position: relative; cursor: pointer; flex: none; }
.acct-avatar img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); display: block; box-shadow: 0 0 20px var(--violet-dim); }
.acct-av-edit { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--card-solid); border: 1px solid var(--line); color: var(--cyan); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.acct-av-edit .ico { width: 14px; height: 14px; }
.acct-avatar:hover .acct-av-edit { opacity: 1; }
.acct-id { min-width: 0; }
.acct-name-b { color: var(--ice); font: 600 17px var(--display); display: block; overflow: hidden; text-overflow: ellipsis; }
.acct-tag { font: 600 10.5px var(--mono); letter-spacing: .2em; color: var(--cyan); }
.acct-tag.admin { color: var(--plasma); }
#acct-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
#acct-form input { padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-soft); background: var(--input-bg); color: var(--ice); font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
#acct-form input:focus { border-color: var(--cyan); box-shadow: 0 0 16px var(--cyan-dim); }
.acct-actions { display: flex; align-items: center; gap: 12px; }
.acct-msg { color: var(--cyan); font-size: 12.5px; }
.acct-link { width: 100%; justify-content: center; margin-top: 8px; color: var(--muted); }
.acct-link:hover { color: var(--ice); }
#acct-logout:hover { border-color: var(--plasma); color: var(--plasma); background: var(--plasma-dim); }
.acct-danger { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.acct-del-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: var(--pill); border: 1px solid transparent; color: var(--muted); font-size: 13px; transition: color .2s, background .2s; }
.acct-del-btn:hover { color: var(--plasma); background: var(--plasma-dim); }
.acct-del-btn .ico { width: 1.05em; height: 1.05em; }
.acct-del-confirm { display: flex; flex-direction: column; gap: 10px; }
.acct-del-confirm > span { color: var(--text); font-size: 12.5px; line-height: 1.5; }
.acct-del-actions { display: flex; gap: 10px; }
.acct-del-yes { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 14px; background: linear-gradient(120deg, #ff5c8a, var(--plasma)); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); color: #180410; font-weight: 700; font-size: 13px; transition: filter .2s; }
.acct-del-yes:hover { filter: brightness(1.1); }
.acct-del-yes:disabled { opacity: .6; cursor: default; }
.acct-del-actions .btn-ghost.sm { padding: 9px 14px; font-size: 13px; }

/* ---- mobile menu ---------------------------------------------------------- */
.mobile-menu {
    display: none; position: sticky; top: 65px; z-index: 19;
    flex-direction: column; gap: 2px; padding: 0 clamp(16px, 4vw, 36px);
    background: rgba(8, 8, 20, .97); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
}
[data-theme="light"] .mobile-menu { background: rgba(238, 241, 248, .97); }
.mobile-menu.open { max-height: 520px; padding-block: 14px; }
.mobile-menu a { padding: 13px 10px; color: var(--text); font-size: 16px; border-radius: var(--r-sm); transition: background .2s, color .2s; }
.mobile-menu a:hover, .mobile-menu a.active { background: var(--hover-bg); color: var(--ice); }
.mm-row { display: flex; gap: 10px; padding: 8px; flex-wrap: wrap; }
.mm-online { margin: 4px 8px 6px; align-self: flex-start; }

/* ---- views ---------------------------------------------------------------- */
.view { flex: 1; width: 100%; max-width: 1220px; margin: 0 auto; padding: clamp(20px, 3.5vw, 40px) clamp(16px, 4vw, 40px); opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.view.in { opacity: 1; transform: none; }
.narrow { max-width: 460px; margin: 0 auto; }
.narrow-wide { max-width: 940px; margin: 0 auto; }

/* ---- footer --------------------------------------------------------------- */
.foot { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding: 22px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; }
.foot-dim { opacity: .7; }

/* ========================= CARDS & SHARED ================================= */
.card {
    position: relative; background: var(--card);
    border: 1px solid var(--card-border); border-radius: var(--r-lg);
    padding: clamp(20px, 3vw, 28px);
    backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25);
    box-shadow: 0 4px 30px var(--shadow);
    transition: box-shadow .3s, border-color .3s, transform .2s;
}
.card:hover { box-shadow: 0 8px 40px var(--shadow), 0 0 46px var(--card-glow); }
.card-head {
    display: flex; align-items: center; gap: 12px;
    font: 600 13px var(--mono); letter-spacing: .16em; text-transform: uppercase;
    color: var(--cyan); margin-bottom: 16px;
}
.card-head .ico { color: var(--violet); width: 22px; height: 22px; filter: drop-shadow(0 0 7px currentColor); }
.head-sub { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: none; margin-left: auto; }
.head-link { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11.5px; letter-spacing: .04em; text-transform: none; }
.head-link:hover { color: var(--cyan); }
.head-link .ico { width: 1em; height: 1em; color: inherit; }
.count-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--pill); border: 1px solid var(--line); color: var(--cyan); font: 600 12px var(--mono); }
.online-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: var(--pill); border: 1px solid var(--line); font: 500 13px var(--mono); letter-spacing: .08em; color: var(--text); }
.online-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: dotPulse 2.4s ease-in-out infinite; }
.online-pill.off .dot { background: var(--muted); box-shadow: none; animation: none; }
@keyframes dotPulse { 50% { opacity: .4; } }
.pf-loading { text-align: center; color: var(--muted); font: 500 22px var(--mono); letter-spacing: .3em; padding: 60px 0; }

/* ========================= HERO =========================================== */
.hero {
    display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(20px, 4vw, 48px);
    align-items: center; padding: clamp(24px, 5vw, 56px) 0 clamp(20px, 3vw, 40px);
}
.hero-copy { min-width: 0; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--card-2); color: var(--cyan); font: 600 11.5px var(--mono); letter-spacing: .18em; }
.hero-kicker .ico { color: var(--plasma); width: 1.1em; height: 1.1em; }
.hero-title { margin: 18px 0 12px; color: var(--ice); font: 700 clamp(40px, 7vw, 76px)/.98 var(--display); letter-spacing: .01em; text-shadow: 0 0 48px rgba(94, 243, 255, .35); }
.hero-tag { color: var(--muted); font-size: 16.5px; max-width: 460px; line-height: 1.6; margin-bottom: 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-sub { margin-top: 12px; color: var(--muted); font: 400 13px var(--mono); letter-spacing: .04em; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: var(--pill); border: 1px solid var(--line-soft); background: var(--input-bg); font: 500 12.5px var(--mono); color: var(--muted); }
.pill b { color: var(--ice); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: dotPulse 2.4s ease-in-out infinite; }
.pill.state .st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.state.on { color: var(--green); border-color: rgba(94, 242, 168, .3); }
.pill.state.on .st-dot { background: var(--green); box-shadow: 0 0 12px var(--green); animation: dotPulse 2.4s ease-in-out infinite; }
.pill.state.on b { color: var(--green); }
.pill.state.maint { color: var(--plasma); border-color: var(--plasma-dim); }
.pill.state.maint .st-dot { background: var(--plasma); box-shadow: 0 0 12px var(--plasma); }
.hero-orb { justify-self: center; width: 100%; max-width: 480px; aspect-ratio: 1; }
.hero-orb canvas { width: 100%; height: 100%; display: block; }

/* ========================= HOME BOARD ===================================== */
.board { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: start; }
.board-main, .board-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* live market — a fixed 3-column grid so name / price / trend line up on every row */
.market-list { display: flex; flex-direction: column; }
.mk-row { display: grid; grid-template-columns: 1fr 76px 128px; align-items: center; gap: 14px; padding: 11px 8px; border-radius: var(--r-sm); border-bottom: 1px solid var(--line-soft); transition: background .2s; }
.mk-row:last-child { border-bottom: none; }
.mk-row:hover { background: var(--hover-bg); }
.mk-row.hot { background: linear-gradient(90deg, var(--plasma-dim), transparent 70%); }
.mk-mat { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-mat b { color: var(--ice); font: 600 15px var(--mono); white-space: nowrap; }
.mk-ic { display: inline-flex; width: 30px; height: 30px; flex: none; align-items: center; justify-content: center; border-radius: 0; border: 1px solid var(--line-soft); color: var(--cyan); }
.mk-ic .ico { width: 1.1em; height: 1.1em; }
.mk-ic.m-exotic { color: var(--plasma); } .mk-ic.m-iridium, .mk-ic.m-tantalum { color: var(--violet); }
.mk-price { font: 600 14px var(--mono); color: var(--text); display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.mk-price .ico { color: var(--violet); width: 1em; height: 1em; }
.mk-trend { justify-self: end; display: inline-flex; align-items: center; gap: 4px; font: 600 11.5px var(--mono); padding: 4px 11px; border-radius: var(--pill); white-space: nowrap; }
.mk-trend .ico { width: .95em; height: .95em; }
.mk-trend.up { color: var(--plasma); background: var(--plasma-dim); }
.mk-trend.down { color: var(--cyan); background: var(--cyan-dim); }
.mk-trend.flat { color: var(--muted); border: 1px solid var(--line-soft); }

/* animated trade-route showcase */
.routes-box .route-item { display: flex; flex-direction: column; gap: 8px; animation: routeIn .5s ease; }
@keyframes routeIn { from { opacity: 0; transform: translateY(6px); } }
.route-mat { display: flex; align-items: center; gap: 10px; }
.route-mat b { color: var(--ice); font: 600 16px var(--mono); letter-spacing: .02em; }
.route-path { color: var(--text); font: 500 14px var(--mono); overflow-wrap: anywhere; }
.route-arrow { color: var(--violet); }
.route-meta { color: var(--muted); font: 500 13px var(--mono); display: inline-flex; align-items: center; gap: 6px; }
.route-meta .ico { color: var(--violet); width: 1em; height: 1em; }
.route-dot { color: var(--violet); }

/* discoveries */
.disc-list { display: flex; flex-direction: column; }
.disc-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line-soft); }
.disc-row:last-child { border-bottom: none; }
.disc-ic { flex: none; display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 0; border: 1px solid var(--line-soft); color: var(--violet); }
.disc-ic.k-anomaly { color: var(--plasma); } .disc-ic.k-star { color: var(--cyan); }
.disc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.disc-body b { color: var(--ice); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disc-sub { color: var(--muted); font: 400 12.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disc-age { flex: none; color: var(--muted); font: 400 11.5px var(--mono); }

/* top explorers */
.top-list { display: flex; flex-direction: column; gap: 3px; }
.top-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: var(--r-sm); }
.top-row:hover { background: var(--hover-bg); }
.top-rank { flex: none; width: 26px; text-align: center; font: 700 14px var(--mono); color: var(--muted); }
.top-rank .ico { width: 1.3em; height: 1.3em; vertical-align: -.2em; }
.top-rank.r1 { color: var(--cyan); } .top-rank.r2 { color: var(--violet); } .top-rank.r3 { color: var(--plasma); }
.top-name { flex: 1; min-width: 0; color: var(--ice); font: 500 14.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-val { flex: none; color: var(--text); font: 600 13.5px var(--mono); display: inline-flex; align-items: center; gap: 5px; }
.top-val .ico { color: var(--violet); width: 1em; height: 1em; }

/* news list (home + oracle + downloads) */
.news-list { display: flex; flex-direction: column; }
.news-item { display: flex; align-items: baseline; gap: 11px; padding: 9px 2px; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.news-item:last-child { border-bottom: none; }
.news-item.rel .news-msg { color: var(--ice); }
.news-chip { flex: none; padding: 2px 9px; border-radius: var(--pill); background: var(--cyan-dim); border: 1px solid var(--line); color: var(--cyan); font: 600 11px var(--mono); }
.news-chip.web { background: var(--violet-dim); border-color: var(--violet-dim); color: var(--violet); }
.news-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); opacity: .6; align-self: center; }
.news-msg { color: var(--text); overflow-wrap: anywhere; }

/* mini profile + sign-in cta */
.mini-profile .mp-body { display: flex; align-items: center; gap: 14px; }
.mp-avatar img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--line); display: block; }
.mp-meta { display: flex; flex-direction: column; min-width: 0; }
.mp-meta b { color: var(--ice); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-tag { font: 600 11px var(--mono); letter-spacing: .2em; color: var(--cyan); }
.mp-body .btn-ghost { margin-left: auto; }
.mp-lvl { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font: 500 14px var(--mono); }
.mp-lvl .ico, .mp-lvl b { color: var(--cyan); }
.signin-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.signin-cta b { color: var(--ice); font: 600 18px var(--display); }
.signin-cta span { color: var(--muted); font-size: 13.5px; }
.signin-cta .btn-hot { margin-top: 8px; }

/* ========================= ORACLE (newspaper) ============================= */
.ora-masthead { text-align: center; margin-bottom: 26px; }
.ora-mast-line { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.ora-title { color: var(--ice); font: 700 clamp(30px, 6vw, 52px) var(--display); letter-spacing: .16em; margin: 12px 0 6px; text-shadow: 0 0 34px rgba(167, 139, 250, .3); }
.ora-sub { color: var(--muted); font: 400 13.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.ora-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.ora-main     { grid-column: 1 / 3; }
.ora-havens   { grid-column: 3 / -1; }
.ora-disc-sec { grid-column: 1 / -1; }
.ora-gallery  { grid-column: 1 / -1; }
.ora-yard     { grid-column: 1 / 3; }
.ora-relics   { grid-column: 3 / -1; }
/* first-discoveries as a compact two-column list so it no longer runs down the whole page */
#ora-disc:not(.feed-loading) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
.ora-lead { padding: 4px 2px 14px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.ora-cat { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font: 600 11px var(--mono); letter-spacing: .14em; }
.ora-cat .ico { color: var(--plasma); width: 1.1em; height: 1.1em; }
.live-tag { color: var(--plasma); }
.ora-lead-h { color: var(--ice); font: 600 clamp(19px, 2.4vw, 26px)/1.2 var(--display); margin: 8px 0; }
.ora-lead-b { color: var(--text); font-size: 14.5px; line-height: 1.65; }
.ora-briefs { display: flex; flex-direction: column; gap: 2px; }
.ora-brief { display: flex; align-items: baseline; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--text); }
.ora-brief:last-child { border-bottom: none; }
.ora-brief i { color: var(--violet); flex: none; }
.ora-brief.live i { color: var(--plasma); }
/* a horizontal film-strip: one shot stays one shot, many just scroll sideways */
.gal-grid { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.gal-item { flex: 0 0 auto; width: clamp(240px, 32%, 300px); scroll-snap-align: start; position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-soft); cursor: pointer; aspect-ratio: 16/10; background: var(--input-bg); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gal-item:hover img { transform: scale(1.05); }
.gal-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 8px; padding: 16px 10px 8px; background: linear-gradient(transparent, rgba(5, 6, 14, .85)); font: 500 12px var(--mono); }
.gal-item figcaption b { color: var(--ice); } .gal-item figcaption span { color: var(--cyan); }
.gal-empty { display: flex; align-items: center; gap: 8px; }
.haven-list, .relic-list { display: flex; flex-direction: column; }
.relic-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); }
.relic-row:last-child { border-bottom: none; }
.relic-row .ico { color: var(--plasma); flex: none; }
.relic-row b { color: var(--ice); display: block; font-size: 14.5px; }
.relic-row span { color: var(--muted); font: 400 12.5px var(--mono); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(3, 4, 10, .88); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.lightbox.in { opacity: 1; }
.lightbox img { max-width: 96vw; max-height: 88vh; border-radius: var(--r); box-shadow: 0 20px 80px rgba(0, 0, 0, .6); }
.lb-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); color: var(--ice); background: var(--card-2); display: inline-flex; align-items: center; justify-content: center; }
.lb-close:hover { border-color: var(--plasma); color: var(--plasma); }

/* ---- player profile card (leaderboard row → who-is-this modal) ----------- */
.sb-row[data-name] { cursor: pointer; }
.sb-row[data-name]:focus-visible { outline: none; border-color: var(--cyan); box-shadow: 0 0 18px var(--cyan-dim); }
.pv-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(3, 4, 10, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s; }
.pv-overlay.in { opacity: 1; }
.pv-card { position: relative; width: min(560px, 96vw); max-height: 88vh; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; padding: 26px; transform: translateY(14px) scale(.98); transition: transform .24s cubic-bezier(.2, .75, .25, 1); }
.pv-overlay.in .pv-card { transform: none; }
.pv-x { top: 14px; right: 14px; width: 38px; height: 38px; }
.pv-head { display: flex; align-items: center; gap: 18px; }
.pv-orb-wrap { position: relative; width: 84px; height: 84px; flex: none; }
.pv-orb { width: 100%; height: 100%; display: block; }
.pv-av { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); box-shadow: 0 0 26px var(--violet-dim); }
.pv-name { color: var(--ice); font: 600 clamp(20px, 3vw, 26px) var(--display); letter-spacing: .02em; overflow-wrap: anywhere; }
.pv-haven { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; color: var(--muted); font: 500 13px var(--mono); }
.pv-haven:empty { display: none; }
.pv-haven .haven-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; }
.pv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pv-sub { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--cyan); font: 600 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.pv-sub .ico { width: 1.1em; height: 1.1em; }
@media (max-width: 560px) { .pv-stats { grid-template-columns: 1fr; } }

/* ========================= HELP / POWER-UPS CODEX ======================== */
.pu-page { max-width: 1160px; margin: 0 auto; }
.pu-section-h { display: flex; align-items: center; gap: 10px; margin: 34px 0 16px; color: var(--cyan); font: 600 13px var(--mono); letter-spacing: .2em; text-transform: uppercase; }
.pu-section-h .ico { color: var(--violet); width: 1.1em; height: 1.1em; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.how-row { display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-soft); background: var(--card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .2s, transform .15s; }
.how-row:hover { border-color: var(--cyan); transform: translateY(-2px); }
.how-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--cyan); border: 1px solid var(--line-soft); box-shadow: inset 0 0 14px var(--cyan-dim); }
.how-ico .ico { width: 20px; height: 20px; }
.how-txt b { display: block; color: var(--ice); font: 600 15.5px var(--display); margin-bottom: 3px; }
.how-txt span { color: var(--text); font-size: 13.5px; line-height: 1.55; }
.pu-lead { max-width: 720px; margin: 4px 0 20px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.pu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pu-card {
    position: relative; display: flex; flex-direction: column; gap: 12px; overflow: hidden;
    padding: 18px 18px 14px 22px; border: 1px solid var(--line-soft); background: var(--card);
    backdrop-filter: blur(12px) saturate(1.15); -webkit-backdrop-filter: blur(12px) saturate(1.15);
    transition: border-color .2s, transform .15s, box-shadow .3s;
}
.pu-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--pc); box-shadow: 0 0 14px var(--pc); }
.pu-card:hover { transform: translateY(-3px); border-color: var(--pc); box-shadow: 0 14px 34px -16px var(--pc); }
.pu-orb { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; color: var(--pc); border: 1px solid var(--pc); background: rgba(255, 255, 255, .03); }
.pu-orb .ico { width: 24px; height: 24px; filter: drop-shadow(0 0 8px var(--pc)); }
.pu-body b { display: block; color: var(--ice); font: 600 17px var(--display); letter-spacing: .02em; }
.pu-blurb { display: block; margin-top: 5px; color: var(--text); font-size: 13.5px; line-height: 1.55; font-style: italic; }
.pu-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line-soft); font: 500 12px var(--mono); }
.pu-dur { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.pu-dur .ico { width: 1em; height: 1em; }
.pu-ly { color: var(--pc); letter-spacing: .04em; text-transform: uppercase; }

/* ========================= DOWNLOADS PAGE ================================= */
.dlp-head { margin-bottom: 24px; }
.dlp-title { color: var(--ice); font: 700 clamp(30px, 5vw, 46px) var(--display); letter-spacing: .02em; }
.dlp-sub { color: var(--muted); font-size: 15.5px; margin-top: 6px; }
.dlp-release { margin-bottom: 22px; }
.dlp-rel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.dlp-rel-ver { display: flex; align-items: center; gap: 14px; }
.dlp-rel-ver b { color: var(--ice); font: 700 26px var(--display); }
.dlp-badge { padding: 5px 12px; border-radius: var(--pill); background: var(--grad-hot); color: #060410; font: 700 11px var(--mono); letter-spacing: .12em; }
.dlp-rel-note { color: var(--muted); font-size: 13px; }
.plat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plat-tile {
    display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
    padding: 24px 18px; border-radius: var(--r); border: 1px solid var(--line-soft); background: var(--input-bg); color: var(--text);
    transition: border-color .2s, box-shadow .3s, transform .2s, background .3s;
}
.plat-tile:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 6px 26px var(--violet-dim); }
.plat-tile.selected { border-color: var(--cyan); box-shadow: 0 0 28px var(--cyan-dim), inset 0 0 18px var(--cyan-dim); }
.plat-ic { color: var(--muted); } .plat-tile:hover .plat-ic, .plat-tile.selected .plat-ic { color: var(--cyan); }
.plat-ic .ico { width: 34px; height: 34px; }
.plat-os { color: var(--ice); font: 600 16px var(--font); margin-top: 4px; }
.plat-ext { color: var(--muted); font: 500 12px var(--mono); }
.plat-sz { color: var(--muted); font: 500 12px var(--mono); }
.plat-get { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; background: var(--grad-hot); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); color: #060410; font: 700 12.5px var(--mono); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.plat-tile:hover .plat-get, .plat-tile.selected .plat-get { opacity: 1; transform: none; }
.dlp-req { margin-top: 20px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.dlp-req .ico { color: var(--violet); } .dlp-req b { color: var(--text); }
.dlp-cols { display: grid; gap: 22px; }

/* ========================= AUTH =========================================== */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tab { flex: 1; padding: 11px; border-radius: var(--r-sm); border: 1px solid transparent; color: var(--muted); font: 500 14px var(--mono); letter-spacing: .06em; transition: color .2s, border-color .2s, background .2s; }
.auth-tab:hover { color: var(--text); }
.auth-tab.on { color: var(--ice); border-color: var(--line); background: var(--cyan-dim); }
#auth-form, #pf-form { display: flex; flex-direction: column; gap: 12px; }
#auth-form input, #pf-form input { padding: 13px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-soft); background: var(--input-bg); color: var(--ice); font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s, background .3s; }
#auth-form input:focus, #pf-form input:focus { border-color: var(--cyan); box-shadow: 0 0 18px var(--cyan-dim); }
.auth-err { color: var(--plasma); font-size: 13.5px; min-height: 20px; }
.signin-note { text-align: center; color: var(--muted); margin-bottom: 18px; font-size: 15px; }

/* ========================= PROFILE ======================================== */
.pf-grid { display: flex; flex-direction: column; gap: 24px; }
.pf-hero { display: flex; flex-direction: column; gap: 24px; }
.pf-hero-top { display: flex; align-items: center; justify-content: space-between; gap: clamp(20px, 3vw, 40px); flex-wrap: wrap; }
.pf-id { display: flex; align-items: center; gap: 20px; }
.pf-avatar { position: relative; cursor: pointer; flex: none; }
.pf-avatar img { width: clamp(80px, 10vw, 100px); height: clamp(80px, 10vw, 100px); border-radius: 50%; object-fit: cover; display: block; border: 2px solid var(--line); box-shadow: 0 0 30px var(--violet-dim); transition: box-shadow .3s; }
.pf-avatar:hover img { box-shadow: 0 0 40px var(--cyan-dim); }
.pf-avatar-edit { position: absolute; right: -2px; bottom: -2px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--card-solid); border: 1px solid var(--line); color: var(--cyan); opacity: 0; transition: opacity .2s; }
.pf-avatar:hover .pf-avatar-edit { opacity: 1; }
.pf-name { color: var(--ice); font: 600 clamp(22px, 3vw, 30px) var(--display); letter-spacing: .02em; overflow-wrap: anywhere; }
.pf-tag { font: 600 11px var(--mono); letter-spacing: .24em; color: var(--muted); }
.pf-tag.admin { color: var(--plasma); text-shadow: 0 0 14px var(--plasma-dim); }
.pf-level { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; }
.lvl-orb-wrap { position: relative; width: 148px; height: 148px; }
.lvl-orb-cv { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.lvl-center { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lvl-center::before { content: ''; position: absolute; inset: 24%; border-radius: 50%; background: radial-gradient(circle, rgba(5, 6, 14, .82) 42%, transparent 74%); z-index: -1; }
.lvl-orb { font: 600 11px var(--mono); letter-spacing: .3em; text-indent: .3em; color: var(--cyan); text-shadow: 0 1px 8px rgba(0, 0, 0, .85); }
.lvl-num { font: 700 46px var(--display); color: var(--ice); line-height: 1; text-shadow: 0 2px 16px rgba(0, 0, 0, .9), 0 0 26px rgba(0, 0, 0, .55); }
.lvl-meta { text-align: center; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.lvl-meta b { color: var(--ice); font: 700 18px var(--mono); }
.lvl-meta span { color: var(--muted); font-size: 12.5px; letter-spacing: .02em; }
.pf-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line-soft); background: var(--input-bg); transition: border-color .2s, transform .15s, box-shadow .3s; }
.stat-tile:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 4px 18px var(--cyan-dim); }
.stat-tile .ico { color: var(--violet); margin-bottom: 6px; width: 1.25em; height: 1.25em; }
.stat-tile b { color: var(--ice); font: 600 20px var(--mono); overflow-wrap: anywhere; }
.stat-tile span { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.stat-btn { cursor: pointer; text-align: left; font: inherit; width: 100%; }
.stat-btn span .ico { width: .95em; height: .95em; color: var(--cyan); margin: 0; }
.stat-btn.on { border-color: var(--cyan); box-shadow: 0 0 18px var(--cyan-dim); }
.stat-btn.on .ico, .stat-btn:hover .ico { color: var(--cyan); }
.tier-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.tier-row:last-child { border-bottom: none; padding-bottom: 2px; }
.tier-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 0; border: 1px solid var(--line-soft); color: var(--cyan); transition: border-color .2s, box-shadow .2s; }
.tier-ic:hover { border-color: var(--cyan); box-shadow: 0 0 14px var(--cyan-dim); }
.tier-ic.m-dust { color: var(--ice); } .tier-ic.m-orbited, .tier-ic.m-discovered { color: var(--violet); } .tier-ic.m-upgrades { color: var(--plasma); }
.tier-body { flex: 1; min-width: 0; }
.tier-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.tier-name { color: var(--ice); font-weight: 500; font-size: 15px; }
.tier-chip { font: 600 11px var(--mono); color: var(--violet); border: 1px solid var(--line-soft); border-radius: var(--pill); padding: 2px 10px; }
.tier-prog { margin-left: auto; font: 500 12.5px var(--mono); color: var(--muted); white-space: nowrap; }
.tier-bar { height: 7px; border-radius: 999px; background: var(--input-bg); overflow: hidden; }
.tier-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad-hot); box-shadow: 0 0 12px var(--cyan-dim); transition: width .6s ease; }
.badge-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 18px; }
.badge-item { display: flex; align-items: center; gap: 14px; min-width: 0; }
.badge-txt { min-width: 0; display: flex; flex-direction: column; }
.badge-txt b { color: var(--ice); font-size: 14.5px; }
.badge-txt span { color: var(--muted); font-size: 13px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 0; border: 1px solid var(--line-soft); color: var(--bc, var(--cyan)); background: var(--input-bg); box-shadow: inset 0 0 14px var(--cyan-dim); transition: transform .15s, box-shadow .3s, border-color .2s; }
.badge:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 4px 18px var(--cyan-dim); border-color: var(--cyan); }
.badge .ico { width: 22px; height: 22px; }
.badge.sm { width: 26px; height: 26px; border-radius: 0; } .badge.sm .ico { width: 14px; height: 14px; }
.badge.lg { flex: none; width: 60px; height: 60px; border-radius: 0; box-shadow: inset 0 0 18px var(--cyan-dim), 0 0 16px var(--violet-dim); } .badge.lg .ico { width: 30px; height: 30px; }
/* achievement badges: bare glowing icons, no framed backdrop behind them */
.badge-item .badge { width: 44px; height: 44px; background: none; border: none; box-shadow: none; filter: drop-shadow(0 0 10px currentColor); }
.badge-item .badge:hover { box-shadow: none; border-color: transparent; filter: drop-shadow(0 0 14px currentColor); }
.badge-more { font: 600 11px var(--mono); color: var(--muted); align-self: center; font-style: normal; }
.haven-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.haven-row:last-child { border-bottom: none; }
.haven-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.haven-row b { color: var(--ice); display: block; font-size: 15.5px; }
.haven-row span { color: var(--muted); font-size: 13.5px; font-style: italic; }
.pf-actions { display: flex; align-items: center; gap: 14px; }
.pf-msg { color: var(--cyan); font-size: 14px; }
.btn-ghost.logout { margin-top: 18px; width: 100%; justify-content: center; color: var(--muted); }
.btn-ghost.logout:hover { border-color: var(--plasma); color: var(--plasma); background: var(--plasma-dim); }

/* ========================= LEADERBOARD ==================================== */
.sb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sb-title { color: var(--ice); font: 600 clamp(18px, 2.6vw, 26px) var(--display); letter-spacing: .06em; }
.sb-title .ico { color: var(--cyan); }
.sb-controls { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.sb-search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-soft); background: var(--input-bg); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.sb-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 16px var(--cyan-dim); }
.sb-search .ico { width: 1.15em; height: 1.15em; }
.sb-search input { flex: 1; background: none; border: none; outline: none; color: var(--ice); font-size: 15px; }
.sb-tabs { display: flex; gap: 7px; }
.sb-tab { padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid transparent; color: var(--muted); font: 500 13px var(--mono); transition: color .2s, border-color .2s, background .2s; }
.sb-tab:hover { color: var(--text); }
.sb-tab.active { color: var(--ice); border-color: var(--line); background: var(--cyan-dim); }
.sb-list { display: flex; flex-direction: column; gap: 6px; }
.sb-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--r); border: 1px solid transparent; background: var(--input-bg); transition: background .2s, border-color .2s, transform .15s; }
.sb-row:hover { background: var(--hover-bg); transform: translateX(3px); }
.sb-row.self { border-color: var(--cyan); box-shadow: 0 0 18px var(--cyan-dim); }
.sb-row.r1 .sb-rank { color: var(--cyan); filter: drop-shadow(0 0 10px var(--cyan-dim)); }
.sb-row.r2 .sb-rank { color: var(--violet); } .sb-row.r3 .sb-rank { color: var(--plasma); }
.sb-rank { flex: none; width: 34px; text-align: center; font: 600 15px var(--mono); color: var(--muted); }
.sb-rank .ico { width: 1.4em; height: 1.4em; vertical-align: -.2em; }
.sb-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.sb-name { color: var(--ice); font: 500 15px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-badges { display: inline-flex; gap: 5px; flex: none; }
.sb-val { text-align: right; }
.sb-val b { display: block; color: var(--ice); font: 600 15px var(--mono); }
.sb-val b .ico { color: var(--violet); }
.sb-unit { color: var(--muted); font-weight: 400; }
.sb-val span { color: var(--muted); font: 400 12px var(--mono); }
.sb-none { text-align: center; padding: 34px 0; }

/* ========================= RESPONSIVE ===================================== */
@media (max-width: 1100px) {
    .pf-stats { grid-template-columns: repeat(3, 1fr); }
    .ora-grid { grid-template-columns: repeat(2, 1fr); }
    .ora-main, .ora-havens, .ora-yard, .ora-relics { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-copy { order: 2; }
    .hero-orb { order: 1; max-width: 340px; }
    .hero-kicker { justify-content: center; }
    .hero-cta, .hero-pills { justify-content: center; }
    .hero-tag { margin-left: auto; margin-right: auto; }
    .board { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .topnav, .brand-name, #lang-btn { display: none; }
    .burger { display: inline-flex; }
    .mobile-menu { display: flex; }
    .pf-hero-top { justify-content: center; text-align: center; }
    .pf-id { flex-direction: column; }
    .pf-stats { grid-template-columns: repeat(2, 1fr); width: 100%; }
    .ora-grid { grid-template-columns: 1fr; }
    .ora-main, .ora-havens, .ora-disc-sec, .ora-gallery, .ora-yard, .ora-relics { grid-column: 1; }
    #ora-disc:not(.feed-loading) { grid-template-columns: 1fr; }
    .plat-grid { grid-template-columns: 1fr; }
    .sb-controls { flex-direction: column; }
    .sb-tab { flex: 1; text-align: center; padding-inline: 8px; }
}
@media (max-width: 480px) {
    body { font-size: 15px; }
    .top-user b { display: none; }
    .stat-tile b { font-size: 16px; }
    .gal-item { width: clamp(220px, 78%, 280px); }
    .sb-row { display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 5px 10px; }
    .sb-who { display: contents; }
    .sb-name { grid-column: 2; grid-row: 1; }
    .sb-badges { grid-column: 2 / -1; grid-row: 2; flex-wrap: wrap; }
    .sb-val { grid-column: 3; grid-row: 1; }
    .sb-row .count-chip { grid-column: 4; grid-row: 1; }
    .tier-top { flex-wrap: wrap; } .tier-prog { margin-left: 0; width: 100%; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    .btn-hot::after, .online-pill .dot, .pill .dot, .pill.state.on .st-dot { animation: none !important; }
    .view, .mobile-menu { transition: none; }
    html[data-theme] * { transition: none !important; }
}
