/* Shared look for every public page (website refresh, Nov 2026).
   Loaded after each page's own <style>, so it sets the common look - colours,
   nav, buttons, panels, tables, footer - and each page keeps only its own
   layout. A deliberate single dark look: colours are set explicitly. */
:root {
  color-scheme: dark;
  --ground: #0b1410; --ground-2: #111d17; --panel: #172820; --panel-glass: rgba(23,40,32,.78);
  --line: #2a3f33; --line-soft: rgba(111,181,140,.14); --hover: #1b2f25;
  --paper: #e6e8d6; --paper-dim: #aab39f; --muted: #7c8977;
  --ink: #3f7d5c; --ink-bright: #6fb58c; --brass: #d9ad3c; --brass-deep: #8a6a1c; --rust: #c8573f; --amber: #e0a100;
  --display: "Big Shoulders Stencil Display", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
html { background: var(--ground); }
body { background: transparent; color: var(--paper); }
/* Backdrop (Ryan, 8 Nov): one picture from our own world, pinned to the window
   and filling it at any size, darkened so text stays readable; the page scrolls
   over it. A fixed layer (not background-attachment: fixed, which phones ignore).
   Pages use the calm picture; the home page picks one of two at random
   (index.html sets --backdrop). Swap a picture by replacing its file. */
:root { --backdrop: url("/img/backdrop-calm.jpg"); --backdrop-pos: left top; }
html::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(11,20,16,.45) 0%, transparent 55%),
              linear-gradient(180deg, rgba(11,20,16,.32) 0%, rgba(11,20,16,.72) 50%, rgba(11,20,16,.88) 100%),
              var(--backdrop) var(--backdrop-pos) / cover no-repeat, var(--ground); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--ground); }
.wrap { max-width: 1160px; padding-inline: 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 700px) { .wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }

/* nav */
nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(11,20,16,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
/* Phones (Ryan, 8 Nov): the menu bar scrolls away with the page to free up the screen. */
@media (max-width: 860px) { nav { position: relative; } }
nav .wrap { gap: 10px 20px; }
nav ul { gap: 4px; }
nav ul a { display: block; padding: 6px 10px; border-radius: 5px; }
nav ul a:hover, nav ul a[aria-current] { color: var(--paper); background: var(--line-soft); }
@media (max-width: 860px) { nav ul { order: 3; flex-basis: 100%; gap: 2px; margin-inline: -10px; } }

/* buttons */
.btn { border-radius: 5px; letter-spacing: .02em; }
.btn.solid { box-shadow: 0 6px 22px rgba(217,173,60,.22); }
.btn:hover { filter: brightness(1.12); }
.btn.ghost { border-color: var(--line); color: var(--paper-dim); }

/* page ground: plain dark with a very faint film grain (Ryan, 8 Nov: the
   soft glows looked machine-made). The grain is a tiny inline SVG, no download. */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40; background-image: var(--grain); opacity: .035; }
main, .page { background: transparent; }
.eyebrow { color: var(--ink-bright); }

/* panels: the existing card-like blocks on each page get the same glass look */
.table-scroll, section.card, .how div, .ware, .crates, .staff, .panel {
  background: var(--panel-glass); border: 1px solid var(--line); border-radius: 10px; }
.table-scroll { overflow-x: auto; }
td { background: transparent; }
tr.player:hover td, tr.details td, tr.player.open td { background: var(--hover); }
th { background: rgba(17,29,23,.6); }
input[type=search] { border-radius: 6px; background: var(--ground-2); }
.ware.special { border-color: var(--brass); background: linear-gradient(180deg, rgba(217,173,60,.12), var(--panel-glass) 70%); }

/* status pill (online / seen today / older) */
.pill { display: inline-flex; align-items: center; gap: 8px; font: 600 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(111,181,140,.5); color: var(--ink-bright); background: rgba(63,125,92,.12); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.live i { animation: r2r-blink 1.6s ease-in-out infinite; }
.pill.off { border-color: var(--line); color: var(--muted); background: transparent; }
.pill.warm { border-color: rgba(217,173,60,.4); color: var(--brass); background: rgba(217,173,60,.08); }
.pill.bad { border-color: rgba(200,87,63,.5); color: var(--rust); background: rgba(200,87,63,.08); }
@keyframes r2r-blink { 50% { opacity: .25; } }

footer { border-top: 1px solid var(--line); }
footer a { color: var(--paper-dim); }
@media (prefers-reduced-motion: reduce) { .pill.live i { animation: none; } }
#rules > li, #gameplay > li { background: var(--panel-glass); border-radius: 10px; }

/* Top three cards (home page and leaderboard). */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pod { padding: 18px; display: grid; gap: 14px; text-decoration: none; color: inherit; transition: transform .2s ease, border-color .2s ease; }
.pod:hover { transform: translateY(-3px); border-color: var(--brass-deep); }
.pod-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.medal { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 900 1.4rem/1 var(--display); flex: none; border: 2px solid var(--line); color: var(--muted); background: var(--ground-2); }
.pod:nth-child(1) .medal { border-color: var(--brass); color: var(--brass); box-shadow: 0 0 22px rgba(217,173,60,.3); }
.pod:nth-child(2) .medal { border-color: #b9c0b0; color: #c9cfc0; }
.pod:nth-child(3) .medal { border-color: #a8704a; color: #c88a5f; }
.pod-name { font: 800 1.6rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em; overflow-wrap: anywhere; }
.pod-sub { margin-top: 6px; }
.pod-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pod-stats div { background: var(--ground-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.pod-stats b { display: block; font: 600 1.05rem var(--mono); }
.pod-stats span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 920px) { .podium { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .pod { transition: none; } }

/* Yellow bars under the menu (/pinbar.js): the maintenance lock bar (11 Nov) and
   the pinned announcement bar: the post pinned in our Discord's
   #announcements. Home fills its own; every other page gets it from /pinbar.js
   (Ryan, 9 Nov: so a bookmarked page still shows important news). */
.pinbar { display: block; background: linear-gradient(90deg, rgba(217,173,60,.22), rgba(217,173,60,.08)); border-bottom: 1px solid rgba(217,173,60,.45); color: var(--paper); text-decoration: none; }
.pinbar .wrap { line-height: 1.6; display: flex; align-items: center; gap: 10px 14px; padding-block: 12px; flex-wrap: wrap; }
.pinbar .tag { font: 600 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); white-space: nowrap; }
.pinbar b { font: 800 1.15rem/1.2 var(--display); letter-spacing: .03em; text-transform: uppercase; flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.pinbar .go { color: var(--brass); font-weight: 600; white-space: nowrap; text-decoration: underline; }
.pinbar:hover { background: linear-gradient(90deg, rgba(217,173,60,.3), rgba(217,173,60,.12)); }
.pinbar[hidden] { display: none; }
