/* OGFN portal. Plain charcoal palette with one blue accent, shared with the Windows launcher. */
@font-face {
  font-family: "Inter";
  src: url("/ogfn/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  /* --ice/--gold are older names; both now mean the single accent. */
  --bg: #111214; --bg-2: #141517; --panel: #18191c; --panel-2: #1e2023; --panel-3: #26282c; --line: #26282c; --line-2: #313338;
  --text: #ececee; --muted: #9a9ca3; --faint: #7d7f86; --accent: #4c8dff; --accent-2: #7aaaff; --accent-soft: rgba(76, 141, 255, .14);
  --ice: var(--accent); --ice-2: var(--accent-2); --violet: var(--accent); --gold: var(--accent-2);
  --cta: #ffd23f; --cta-2: #ffdc66; --cta-ink: #1a1500; --green: #3ecf7a; --red: #f06262; --orange: #f0a050;
  --radius: 8px; --radius-sm: 6px; --shadow: 0 8px 24px rgba(0, 0, 0, .4);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg);
  color: var(--text); font: 15px/1.6 var(--font); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
a { color: var(--ice); text-decoration: none; }
a:hover { color: var(--ice-2); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
p { margin: 0; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

/* ---------- Masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.masthead-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; color: var(--text); font-weight: 750; font-size: 17px; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--muted); font-weight: 550; font-size: 14px; padding: 17px 12px 15px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a.selected { color: var(--text); border-bottom-color: var(--accent); }
.masthead-end { display: flex; align-items: center; gap: 14px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--green); }
.dot.warn { background: var(--orange); }
.dot.off { background: var(--red); }
.me { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 550; font-size: 14px; padding: 4px 12px 4px 4px; border-radius: 99px; }
.me:hover { color: var(--text); background: var(--panel-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; background: var(--panel-3) center/cover; display: grid; place-items: center;
  font-weight: 700; color: var(--text); font-size: 13px; overflow: hidden; }
.avatar.large { width: 80px; height: 80px; border-radius: 12px; font-size: 30px; }
.avatar.medium { width: 44px; height: 44px; font-size: 17px; }

.announcement { background: var(--panel); border-bottom: 1px solid var(--line); color: var(--text); font-size: 14px; }
.announcement span { display: block; max-width: 1120px; margin: 0 auto; padding: 10px 24px; }
.notice { position: fixed; z-index: 40; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px;
  border-radius: var(--radius); background: var(--panel-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; }
.notice.error { border-color: rgba(240, 98, 98, .5); color: #ffc4c4; }

.shell { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 24px 56px; }
.page { display: flex; flex-direction: column; gap: 24px; }
.footer { border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; padding: 20px 24px 28px; }
.footer a { color: var(--muted); }

/* ---------- Building blocks ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 13px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-head h2 { font-size: 19px; font-weight: 650; }
.section-head .eyebrow { display: block; margin-bottom: 4px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:hover { background: var(--panel-3); color: var(--text); }
.btn:disabled { opacity: .5; cursor: default; }
/* .play is the primary action; yellow .cta is kept for downloading the launcher. */
.btn.play { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.play:hover { background: #5e99ff; color: #fff; }
.btn.cta { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); font-weight: 700; }
.btn.cta:hover { background: var(--cta-2); color: var(--cta-ink); }
.btn.ice { color: var(--accent-2); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.quiet:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { background: transparent; border-color: rgba(240, 98, 98, .45); color: #ffb0b0; }
.btn.danger:hover { background: rgba(240, 98, 98, .1); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.big { min-height: 46px; padding: 0 24px; font-size: 15px; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600;
  background: var(--panel-3); color: var(--muted); white-space: nowrap; }
/* News categories and most labels stay neutral; colour marks state only. */
.tag.gold { background: var(--accent-soft); color: var(--accent-2); }
.tag.green { background: rgba(62, 207, 122, .12); color: #8fe3b2; }
.tag.red { background: rgba(240, 98, 98, .12); color: #ffb0b0; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }

/* ---------- Home ---------- */
.hero { position: relative; min-height: 320px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; align-items: flex-end;
  background: var(--panel); }
.hero-art { position: absolute; inset: 0; background-size: cover; background-position: 70% 22%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17, 18, 20, .95) 0%, rgba(17, 18, 20, .8) 40%, rgba(17, 18, 20, .15) 80%); }
.hero-body { position: relative; z-index: 1; padding: 36px; max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 750; letter-spacing: -.03em; line-height: 1.1; }
.hero h1 span { display: block; color: var(--muted); font-weight: 600; font-size: .6em; letter-spacing: -.01em; margin-top: 6px; }
.hero p { font-size: 16px; color: var(--muted); max-width: 480px; line-height: 1.6; }
.hero .row { margin-top: 6px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 16px; }
.player-card { display: flex; flex-direction: column; gap: 16px; }
.player-head { display: flex; align-items: center; gap: 14px; }
.player-head h3 { font-size: 19px; }
.pass { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); }
.pass .row { justify-content: space-between; }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-box { padding: 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); }
.stat-box b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-box span { font-size: 13px; color: var(--muted); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.step { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; }
.step::before { content: counter(step); width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--panel-3); color: var(--text); font-weight: 700; font-size: 13px; }
.step b { display: block; margin-bottom: 2px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- News ---------- */
.news-feature { display: grid; grid-template-columns: 1.35fr 1fr; min-height: 260px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.news-feature:hover { border-color: var(--line-2); color: var(--text); }
.news-feature .cover { min-height: 260px; }
.news-feature .body { padding: 26px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.news-feature h3 { font-size: 23px; font-weight: 700; }
.news-feature p { color: var(--muted); font-size: 15px; }
.cover { position: relative; container-type: inline-size; background: var(--panel-3) center/cover; }
.cover-mark { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font-weight: 800; font-size: clamp(10px, 11cqw, 32px); letter-spacing: .08em;
  color: rgba(236, 236, 238, .14); }
.cover .count { position: absolute; z-index: 1; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px;
  background: rgba(17, 18, 20, .8); font-size: 12px; font-weight: 600; color: var(--text); }
.cover .count .icon { width: 14px; height: 14px; }
.meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--faint); }
.pin { color: var(--muted); font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.pin .icon { width: 14px; height: 14px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.news-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); color: var(--text); transition: border-color .12s; }
.news-card:hover { border-color: var(--line-2); color: var(--text); }
.news-card .cover { aspect-ratio: 16 / 9; }
.news-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card h3 { font-size: 16px; font-weight: 650; }
.news-card p { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-weight: 650; font-size: 13px; cursor: pointer; }
.chip:hover { color: var(--text); background: var(--panel-2); }
.chip.selected { background: var(--panel-3); color: var(--text); border-color: var(--line-2); }

/* ---------- Post ---------- */
.post { max-width: 860px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; width: fit-content; }
.post h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 750; }
.post-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; background: var(--panel); }
.post-cover img { width: 100%; max-height: 480px; object-fit: cover; }
.prose { font-size: 16px; line-height: 1.7; color: #d2d3d7; display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-size: 24px; margin-top: 12px; color: var(--text); }
.prose h3 { font-size: 19px; margin-top: 8px; color: var(--text); }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose strong { color: var(--text); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); cursor: zoom-in; aspect-ratio: 16 / 10; }
.gallery button:hover { border-color: var(--ice); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { font-size: 13px; color: var(--muted); }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 12, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100vh - 140px); object-fit: contain; border-radius: var(--radius-sm); }
.lightbox .caption { color: var(--muted); font-size: 14px; text-align: center; }
.lightbox .controls { display: flex; gap: 10px; align-items: center; }

/* ---------- Leaderboards ---------- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.podium .panel { display: flex; align-items: center; gap: 14px; position: relative; overflow: hidden; }
.podium .place { font-size: 24px; font-weight: 700; color: var(--muted); width: 40px; }
.podium .r1 .place { color: var(--text); }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 13px; color: var(--faint); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.mine td { background: var(--accent-soft); }
.player { display: flex; align-items: center; gap: 10px; }
.rank { font-weight: 700; color: var(--muted); }
.rank.r1 { color: var(--text); }

/* ---------- Account ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); max-width: 980px; width: 100%; margin: 0 auto; }
.auth .art { position: relative; min-height: 420px; background: var(--panel-2) center/cover; display: flex; align-items: flex-end; padding: 32px; }
.auth .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(17, 18, 20, .92), rgba(17, 18, 20, .2) 70%); }
.auth .art div { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.auth .art h2 { font-size: 26px; font-weight: 700; }
.auth .art p { color: var(--muted); }
.auth form { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 8px; border: 1px solid var(--line); width: fit-content; }
.tabs button { border: 0; background: transparent; color: var(--muted); font-weight: 650; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
.tabs button.selected { background: var(--panel-3); color: var(--text); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 550; color: var(--muted); }
label .hint { font-weight: 500; color: var(--faint); }
label > span.label-row { display: flex; justify-content: space-between; gap: 8px; }
input, select, textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-message { font-size: 14px; color: var(--muted); min-height: 21px; }
.form-message.error { color: #ffb3b3; }
.profile { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile h2 { font-size: 26px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.device { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-radius: var(--radius); margin-bottom: 24px;
  background: var(--panel); border: 1px solid var(--accent); }
.device h2 { font-size: 18px; margin-bottom: 4px; }
.device p { color: var(--muted); }
.device .device-code { margin-top: 8px; color: var(--text); }
.device .device-code strong { font-size: 20px; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.device .device-warning { margin-top: 8px; color: var(--red); font-weight: 600; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; border-bottom: 1px solid var(--line); }
.admin-tabs button { flex: 0 0 auto; }
.admin-tabs button { border: 0; background: none; color: var(--muted); font-weight: 550; padding: 10px 14px; border-bottom: 2px solid transparent; cursor: pointer; font-size: 14px; }
.admin-tabs button:hover { color: var(--text); }
.admin-tabs button.selected { color: var(--text); border-bottom-color: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.kpi b { display: block; font-size: 26px; font-weight: 700; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 550; }
.kpi small { display: block; color: var(--faint); font-size: 12px; margin-top: 4px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.list { display: flex; flex-direction: column; }
.list > div { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list > div:last-child { border-bottom: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv span { color: var(--muted); }
.post-rows { display: flex; flex-direction: column; gap: 8px; }
.post-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 10px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.post-row .cover { width: 96px; aspect-ratio: 16 / 10; border-radius: var(--radius-sm); }
.post-row h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 24px; align-items: start; }
.editor form { display: flex; flex-direction: column; gap: 18px; }
.editor .preview { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 100px); overflow: auto; }
.preview .news-feature { grid-template-columns: 1fr; min-height: 0; }
.preview .news-feature .cover { min-height: 0; aspect-ratio: 16 / 9; }
.preview .news-feature h3 { font-size: 20px; }
.preview .post h1 { font-size: 26px; }
.preview .prose { font-size: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 200px; gap: 14px; }
.toggles { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle { flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font-size: 14px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--ice); margin: 0; }
.segmented { display: inline-flex; padding: 4px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; }
.segmented label { flex-direction: row; padding: 7px 14px; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 14px; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label:has(input:checked) { background: var(--panel-3); color: var(--text); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 22px; border: 2px dashed var(--line-2); border-radius: var(--radius);
  color: var(--muted); text-align: center; cursor: pointer; background: transparent; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.dropzone b { color: var(--text); }
.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.image-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line-2); }
.image-card .cover { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); }
.image-card .cover .badge { position: absolute; left: 6px; top: 6px; z-index: 1; }
.image-card input { padding: 6px 8px; font-size: 13px; }
.image-card .row { gap: 2px; justify-content: space-between; }
.image-card .btn.small { min-height: 28px; padding: 0 8px; }
.url-add { display: flex; gap: 8px; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--panel-2);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.savebar .status-line { flex: 1; color: var(--muted); font-size: 14px; }
.savebar .status-line.dirty { color: var(--orange); }
.help { font-size: 13px; color: var(--faint); }
.help code { color: var(--text); background: var(--bg-2); padding: 1px 5px; border-radius: 4px; }
.search input { width: 280px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
/* Item Shop editor: a preview laid out like the in-game shop. */
.shop-panel { gap: 18px; }
.shop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shop-head .faint { font-size: 13px; }
.shop-dates { display: flex; gap: 6px; align-items: stretch; flex-wrap: wrap; }
.shop-days { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; padding-bottom: 2px; }
.shop-day { position: relative; flex: 0 0 58px; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 4px; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); background: var(--bg-2); color: var(--muted); cursor: pointer; }
.shop-day small { font-size: 12px; font-weight: 550; }
.shop-day b { font-size: 18px; color: var(--text); line-height: 1.3; }
.shop-day:hover { border-color: var(--line-2); background: var(--panel-2); }
.shop-day.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.shop-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.shop-calendar { display: flex; align-items: center; margin-left: auto; }
.shop-calendar input { min-height: 54px; }
.shop-preview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 18px; }
.shop-preview h4 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.shop-grid { display: grid; gap: 8px; }
.shop-grid.featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-grid.daily { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shop-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; overflow: hidden; padding: 0; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text); text-align: left; cursor: pointer; }
.shop-tile.featured { aspect-ratio: 3 / 4.4; }
.shop-tile.daily { aspect-ratio: 1 / 1; }
.shop-tile img, .shop-tile .shop-missing { position: absolute; inset: 0 0 auto; width: 100%; height: 78%; object-fit: contain; object-position: center bottom; }
.shop-missing { display: grid; place-items: center; font-size: 28px; color: var(--faint); }
.shop-tile-info { position: relative; display: flex; flex-direction: column; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(17, 18, 20, .92) 40%); }
.shop-tile-info b { font-size: 13px; line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shop-tile.featured .shop-tile-info b { font-size: 15px; }
.shop-tile-info small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.shop-price { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 13px; font-weight: 700; }
.vbuck { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); }
.shop-edit { position: absolute; top: 6px; right: 6px; padding: 2px 8px; border-radius: 99px; background: rgba(17, 18, 20, .85); font-size: 11px; font-weight: 700; opacity: 0; transition: opacity .12s; }
.shop-tile:hover, .shop-tile:focus-visible { border-color: var(--accent); }
.shop-tile:hover .shop-edit, .shop-tile:focus-visible .shop-edit { opacity: 1; }
.shop-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shop-tools select { max-width: 340px; }
.shop-tools .faint { font-size: 13px; }
.btn.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.shop-picker { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 20px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.shop-picker[open] { display: flex; flex-direction: column; gap: 14px; }
.shop-picker::backdrop { background: rgba(10, 10, 12, .72); }
.shop-picker-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 12px; border-radius: var(--radius-sm); background: var(--bg-2); }
.shop-chosen { display: flex; align-items: center; gap: 12px; flex: 1 1 200px; min-width: 0; }
.shop-chosen img, .shop-chosen .shop-missing { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.shop-chosen b { display: block; }
.shop-price-edit { display: flex; flex-direction: column; gap: 6px; }
.shop-price-edit label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.shop-price-input { display: inline-flex; align-items: center; gap: 6px; }
.shop-price-input input { width: 96px; }
.shop-presets { display: flex; gap: 4px; flex-wrap: wrap; }
.shop-presets .btn.small { min-height: 28px; padding: 0 8px; }
.shop-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-picker-grid { max-height: none; min-height: 200px; flex: 1; }
.shop-more { grid-column: 1 / -1; }
.shop-picker-actions { justify-content: flex-end; }
@media (max-width: 760px) {
  .shop-preview { grid-template-columns: minmax(0, 1fr); }
  .shop-calendar { margin-left: 0; }
}
@media (max-width: 600px) {
  .shop-grid.daily { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-picker { padding: 14px; max-height: calc(100vh - 24px); }
  .shop-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-calendar, .shop-calendar input { width: 100%; min-height: 40px; }
  .shop-savebar { flex-wrap: wrap; }
  .shop-savebar .status-line { flex-basis: 100%; }
  .shop-savebar .btn { flex: 1 1 auto; min-width: 0; }
}

/* ---------- Discord ---------- */
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.discord:hover { background: #6d78f5; color: #fff; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.connection { display: flex; align-items: center; gap: 16px; }
.connection p { font-size: 14px; }
.discord-badge { background: #5865f2; color: #fff; }
.discord-badge .icon { width: 55%; height: 55%; }
.auth .discord-art { background: var(--panel-2); }
.steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.steps-list input { margin: 2px 0 6px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

/* ---------- Admin rewards ---------- */
.gift-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.gift-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.gift-recipient, .gift-history { display: flex; flex-direction: column; gap: 6px; }
.gift-history { border-top: 1px solid var(--line-2); padding-top: 14px; }
.gift-players, .gift-basket { display: flex; flex-wrap: wrap; gap: 8px; }
.gift-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 96px; gap: 8px; max-height: 360px; overflow-y: auto; }
.gift-item { display: flex; gap: 10px; align-items: center; padding: 10px; min-width: 0; min-height: 96px; overflow: hidden; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); text-align: left; cursor: pointer; }
.gift-item img { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.gift-item span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gift-item b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.3; }
.gift-item small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.gift-item:hover, .gift-item.selected { border-color: var(--accent); }
.gift-item:disabled { cursor: default; opacity: .55; }
.gift-item.owned { cursor: not-allowed; opacity: .55; border-color: var(--line-2); }
.gift-everything { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; }
.gift-everything:has(input:checked) { border-color: var(--accent); }
.gift-everything input { width: 18px; height: 18px; accent-color: var(--ice); margin: 0; flex-shrink: 0; }
.gift-everything span { display: flex; flex-direction: column; gap: 2px; }
.gift-picked { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--radius-sm); background: var(--bg-2); padding-left: 10px; font-size: 13px; }
.gift-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gift-message { padding: 12px; border-left: 2px solid var(--accent); background: var(--bg-2); overflow-wrap: anywhere; }
.gift-review { border-color: var(--accent); scroll-margin-top: 90px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 980px) {
  .home-grid, .editor, .split, .gift-layout { grid-template-columns: 1fr; }
  .editor .preview { position: static; }
  .news-feature { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .steps, .podium { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth .art { min-height: 200px; }
}
@media (max-width: 720px) {
  .masthead-inner { height: auto; flex-wrap: wrap; gap: 0 16px; padding: 10px 16px 0; }
  .masthead-end { margin-left: auto; gap: 10px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .nav a { padding: 12px 10px; }
  .status #status-text { display: none; }
  .shell { padding: 20px 16px 48px; }
  .hero-body { padding: 40px 20px 22px; }
  .hero { min-height: 280px; }
  .field-row { grid-template-columns: 1fr; }
  .gift-amounts { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 72px minmax(0, 1fr); }
  .post-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .search input { width: 100%; }
  .announcement span { padding: 10px 16px; }
  .device { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, input, select, textarea, .news-card { transition: none; }
}
