/* ============================================================================
   King Władysław III · War Room console (v3)
   Cinematic dark: deep ink, brass light, ember particles, glass command deck.
   ========================================================================== */
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF; }
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-21FF; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "PlexMono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF; }
@font-face { font-family: "PlexMono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-024F; }
@font-face { font-family: "Cinzel"; font-weight: 400 900; font-display: swap; src: url(fonts/Cinzel.ttf) format("truetype"); }

:root {
  --void: #07060a; --ink-0: #0b0a0d; --ink-1: #121016; --ink-2: #19161d; --ink-3: #231f27;
  --glass: rgba(22, 19, 26, .62); --stroke: rgba(236, 222, 196, .08); --stroke-2: rgba(236, 222, 196, .14);
  --bone: #f1eadb; --bone-2: #c2b8a6; --bone-3: #a39a8b;
  --brass: #e2b862; --brass-2: #c9a35f; --brass-deep: #7a5a26; --brass-ink: #1b140a;
  --ok: #7ed39a; --warn: #f2c14e; --bad: #ff6b57; --sky: #8ec5ff; --violet: #b49cff;
  --r: 16px; --r-s: 10px; --ease: cubic-bezier(.16, 1, .3, 1);
  --sans: "Plex", system-ui, sans-serif; --mono: "PlexMono", ui-monospace, Consolas, monospace; --display: "Cinzel", Georgia, serif;
  --glow: 0 0 0 1px rgba(226, 184, 98, .28), 0 8px 40px -8px rgba(226, 184, 98, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--void); color: var(--bone); font: 400 13.5px/1.5 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; overflow-x: hidden; }
::selection { background: var(--brass); color: var(--brass-ink); }
a { color: var(--brass); text-decoration: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
svg.i { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); }
.muted { color: var(--bone-3); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #2a2530; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-track { background: transparent; }

/* ---------- cinematic backdrop ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.stage .wash { position: absolute; inset: -20%; background:
  radial-gradient(40% 35% at 78% 8%, rgba(226, 184, 98, .16), transparent 70%),
  radial-gradient(35% 40% at 8% 92%, rgba(255, 122, 61, .10), transparent 70%),
  radial-gradient(60% 60% at 50% 50%, #0f0c12 0%, var(--void) 70%); animation: breathe 18s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: translate3d(-2%, 1.5%, 0) scale(1.04); } }
.stage .crest { position: absolute; right: -10vw; top: 50%; width: min(70vh, 760px); aspect-ratio: 1; transform: translateY(-50%); opacity: .025; background: url(emblem.png) center/contain no-repeat; }
.stage .sweep { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 220, 160, .05) 50%, transparent 60%); background-size: 250% 100%; animation: sweep 14s linear infinite; mix-blend-mode: screen; }
@keyframes sweep { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .grain { position: absolute; inset: 0; opacity: .06; background-image: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.stage .vig { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .7)); }

/* ---------- shell ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 84px 1fr; min-height: 100vh; background: linear-gradient(90deg, rgba(10, 9, 12, .78) 83px, var(--stroke) 83px 84px, transparent 84px); }
.rail { position: sticky; top: 0; height: 100vh; align-self: start; min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0; border-right: 1px solid var(--stroke); background: linear-gradient(180deg, rgba(14, 12, 17, .85), rgba(10, 9, 12, .75)); backdrop-filter: blur(18px); z-index: 20; }
.rail .logo { width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px; background: url(emblem.png) center/118% no-repeat, #0e0c10; box-shadow: var(--glow); }
.rail button, .rail a { all: unset; position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: var(--bone-3); cursor: pointer; transition: color .25s, background .25s, transform .25s var(--ease); }
.rail button svg.i, .rail a svg.i { width: 21px; height: 21px; }
.rail button:hover, .rail a:hover { color: var(--bone); background: rgba(255, 255, 255, .04); transform: translateY(-1px); }
.rail button:focus-visible, .rail a:focus-visible { outline: 2px solid var(--brass); }
.rail button[aria-current="page"] { color: var(--brass); background: linear-gradient(180deg, rgba(226, 184, 98, .14), rgba(226, 184, 98, .04)); box-shadow: inset 0 0 0 1px rgba(226, 184, 98, .25); }
.rail button[aria-current="page"]::before { content: ""; position: absolute; left: -16px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--brass); box-shadow: 0 0 14px var(--brass); }
.rail .tip { position: absolute; left: 64px; top: 50%; transform: translate(-6px, -50%); white-space: nowrap; background: var(--ink-2); border: 1px solid var(--stroke-2); padding: 5px 10px; border-radius: 8px; font-size: 12px; color: var(--bone); opacity: 0; pointer-events: none; transition: opacity .15s, transform .2s var(--ease); }
.rail button:hover .tip, .rail a:hover .tip, .rail button:focus-visible .tip { opacity: 1; transform: translate(0, -50%); }
.rail .spacer { flex: 1; }
.rail .live { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); animation: ping 2.2s infinite; margin-bottom: 10px; }
.rail .live.off { background: var(--bad); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(126, 211, 154, .6); } 70% { box-shadow: 0 0 0 9px rgba(126, 211, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(126, 211, 154, 0); } }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; height: 80px; padding: 0 36px; background: linear-gradient(180deg, rgba(7, 6, 10, .92), rgba(7, 6, 10, .6) 70%, transparent); backdrop-filter: blur(10px); }
.top .ttl small { display: block; font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--brass-2); }
.top h1 { margin: 2px 0 0; font: 600 22px/1.15 var(--display); letter-spacing: .03em; }
.top .grow { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--glass); border: 1px solid var(--stroke); color: var(--bone-2); font-size: 12.5px; backdrop-filter: blur(12px); }
.pill .d { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
button.pill { all: unset; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--glass); border: 1px solid var(--stroke); color: var(--bone-2); font-size: 12.5px; cursor: pointer; transition: color .2s, border-color .2s; }
button.pill:hover { color: var(--bone); border-color: var(--stroke-2); } button.pill:focus-visible { outline: 2px solid var(--brass); }
kbd { font: 11px var(--mono); color: var(--bone-3); border: 1px solid var(--stroke-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; }
.view { padding: 8px 36px 60px; display: none; }
.view.on { display: block; }
.view.on > * { animation: rise .7s var(--ease) both; }
.view.on > *:nth-child(2) { animation-delay: .07s; } .view.on > *:nth-child(3) { animation-delay: .14s; } .view.on > *:nth-child(4) { animation-delay: .21s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- glass cards ---------- */
.card { position: relative; background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--r); backdrop-filter: blur(20px) saturate(1.2); box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 50px -30px rgba(0, 0, 0, .8); min-width: 0; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(226, 184, 98, .24), transparent 30%, transparent 70%, rgba(226, 184, 98, .08)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.card .spot { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(226, 184, 98, .09), transparent 60%); }
.card:hover .spot { opacity: 1; }
.card > header { position: relative; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px; border-bottom: 1px solid var(--stroke); }
.card > header h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.card > header .sub { color: var(--bone-3); font-size: 12px; }
.card > header .grow { flex: 1; }
.card > .body { position: relative; padding: 18px 20px; }
.eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--bone-3); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.hero-main { padding: 28px 30px; display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; min-height: 250px; }
.ring { position: relative; width: 180px; height: 180px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .tr { stroke: rgba(255, 255, 255, .06); }
.ring .pr { transition: stroke-dashoffset 1.8s var(--ease); filter: drop-shadow(0 0 10px rgba(226, 184, 98, .55)); }
.ring .in { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .in b { display: block; font: 600 42px/1 var(--sans); letter-spacing: -.03em; }
.ring .in span { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--bone-3); }
.ring .orbit { position: absolute; inset: -12px; border-radius: 50%; border: 1px dashed rgba(226, 184, 98, .2); animation: spin 50s linear infinite; }
.ring .orbit::after { content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 12px var(--brass); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-copy h2 { text-wrap: balance; margin: 8px 0 6px; font: 600 32px/1.1 var(--display); letter-spacing: .02em; }
.hero-copy h2 em { font-style: normal; background: linear-gradient(90deg, var(--brass), #fff3d6, var(--brass)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.hero-copy p { margin: 0 0 18px; color: var(--bone-2); max-width: 48ch; }
.chips-row { display: grid; grid-template-columns: repeat(2, max-content); gap: 8px; }
.stat-chip { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: rgba(255, 255, 255, .035); border: 1px solid var(--stroke); font-size: 12.5px; color: var(--bone-2); }
.stat-chip b { color: var(--bone); font-weight: 600; }
.stat-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--brass)); box-shadow: 0 0 8px var(--c, var(--brass)); }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kpi { padding: 18px 20px 14px; }
.kpi .ic { position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--k, var(--brass)); background: color-mix(in srgb, var(--k, var(--brass)) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k, var(--brass)) 25%, transparent); }
.kpi .val { margin-top: 8px; font: 600 30px/1 var(--sans); letter-spacing: -.03em; display: flex; align-items: baseline; gap: 6px; }
.kpi .val small { font-size: 13px; color: var(--bone-3); font-weight: 500; letter-spacing: 0; }
.kpi .sub { margin-top: 4px; font-size: 12px; color: var(--bone-3); min-height: 18px; }
.kpi svg.spark { width: 100%; height: 40px; margin-top: 10px; overflow: visible; display: block; }

.row { display: grid; gap: 16px; margin-top: 16px; }
.row.a { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; }
.row.a > .card { display: flex; flex-direction: column; }
.row.a > .card .stream { flex: 1 1 0; min-height: 0; max-height: none; }
.row.b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.stack { display: grid; gap: 16px; align-content: start; }

.heat { position: relative; display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; height: 52px; align-items: end; }
.heat i { display: block; border-radius: 4px 4px 2px 2px; min-height: 4px; background: linear-gradient(180deg, var(--brass), var(--brass-deep)); opacity: var(--o, .2); transform-origin: bottom; animation: grow .9s var(--ease) both; animation-delay: calc(var(--n) * 25ms); }
@keyframes grow { from { transform: scaleY(0); } }
.heat-note { position: absolute; inset: 0 0 auto 0; top: -2px; display: grid; place-items: center; font-size: 12px; color: var(--bone-3); pointer-events: none; }
.heat-axis { display: flex; justify-content: space-between; color: var(--bone-3); font: 10.5px var(--mono); margin-top: 7px; }

.stream { list-style: none; margin: 0; padding: 6px 0; overflow: auto; mask-image: linear-gradient(180deg, transparent, #000 12px, #000 calc(100% - 34px), transparent); }
.stream li { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 10px 20px; transition: background .2s; }
.stream li:hover { background: rgba(255, 255, 255, .025); }
.stream li.new { animation: slidein .8s var(--ease) both; }
@keyframes slidein { from { opacity: 0; transform: translateX(-18px); background: rgba(226, 184, 98, .14); } }
.stream .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; background: color-mix(in srgb, var(--k) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 30%, transparent); }
.stream .t { min-width: 0; }
.stream .t b { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--k); }
.stream .t span { display: block; color: var(--bone); overflow-wrap: anywhere; font-size: 13px; }
.stream .t span.warn { color: var(--warn); } .stream .t span.error { color: var(--bad); }
.stream .t em { font-style: normal; color: var(--bone-3); }
.stream .t em.rep { font: 11px var(--mono); padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.06); }
.stream time { font: 11px var(--mono); color: var(--bone-3); }

.gauge { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--stroke); }
.gauge:first-child { padding-top: 0; } .gauge:last-child { border: 0; padding-bottom: 0; }
.gauge .h { display: flex; justify-content: space-between; font-size: 12.5px; } .gauge .h span { color: var(--bone-2); } .gauge .h b { font-weight: 500; }
.bar { height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .07); overflow: hidden; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brass-deep), var(--brass)); box-shadow: 0 0 14px rgba(226, 184, 98, .45); transition: width 1.4s var(--ease); overflow: hidden; }
.bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: glint 2.8s ease-in-out infinite; }
@keyframes glint { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.bar i.hot { background: linear-gradient(90deg, #7a4f10, var(--warn)); } .bar i.crit { background: linear-gradient(90deg, #6a1d14, var(--bad)); }

.roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; padding: 16px 20px 20px; max-height: 380px; overflow: auto; }
.mem { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .025); border: 1px solid var(--stroke); transition: border-color .2s, transform .3s var(--ease); }
.mem:hover { border-color: var(--stroke-2); transform: translateY(-2px); }
.mem .av { position: relative; width: 34px; height: 34px; border-radius: 50%; background: #222 center/cover; flex: none; box-shadow: 0 0 0 2px var(--rc, rgba(255,255,255,.08)); }
.mem > div { min-width: 0; flex: 1; } .mem b { display: block; font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem small { display: block; font-size: 11px; color: var(--bone-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem .vf { color: var(--ok); flex: none; } .mem .vf.no { color: var(--bone-3); opacity: .5; }

.cmds { display: grid; gap: 13px; }
.cmds .c { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 12.5px; }
.cmds .c .bar { grid-column: 1 / -1; height: 5px; }
.donut { display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: center; }
.donut svg { width: 150px; height: 150px; transform: rotate(-90deg); overflow: visible; }
.donut circle { transition: stroke-dasharray 1.4s var(--ease); }
.legend { display: grid; gap: 8px; font-size: 12.5px; }
.legend div { display: flex; align-items: center; gap: 8px; } .legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; } .legend b { margin-left: auto; font-weight: 500; }

.chart { position: relative; }
.chart svg { width: 100%; height: 240px; display: block; }
.ctip { position: absolute; pointer-events: none; background: rgba(18, 16, 22, .95); border: 1px solid var(--stroke-2); border-radius: 10px; padding: 8px 11px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -115%); opacity: 0; transition: opacity .12s; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
.ctip span { color: var(--bone-3); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke); }
.seg button { all: unset; cursor: pointer; font-size: 12px; padding: 5px 11px; border-radius: 7px; color: var(--bone-3); transition: all .2s; }
.seg button:hover { color: var(--bone); } .seg button[aria-pressed="true"] { background: var(--bone); color: var(--ink-0); font-weight: 500; }
.seg button:focus-visible { outline: 2px solid var(--brass); }
.legend-row { display: flex; gap: 18px; font-size: 12px; color: var(--bone-3); margin-top: 6px; }
.legend-row i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: 3px; margin-right: 7px; }

/* ---------- controls ---------- */
.btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 11px; font-weight: 500; font-size: 13px; background: rgba(255, 255, 255, .05); border: 1px solid var(--stroke-2); color: var(--bone); transition: background .2s, transform .1s, box-shadow .25s; white-space: nowrap; }
.btn:hover { background: rgba(255, 255, 255, .09); } .btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.btn.gold { background: linear-gradient(180deg, #f0c873, #c99a45); border-color: #f3d38f; color: var(--brass-ink); box-shadow: 0 6px 24px -6px rgba(226, 184, 98, .6), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.gold:hover { box-shadow: 0 10px 34px -6px rgba(226, 184, 98, .85), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.danger { color: var(--bad); } .btn.danger:hover { background: rgba(255, 107, 87, .1); border-color: rgba(255, 107, 87, .35); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.field { display: grid; gap: 7px; } .field > span { font-size: 12px; color: var(--bone-2); font-weight: 500; } .field small { color: var(--bone-3); font-size: 11.5px; } .field small.r { text-align: right; }
input, select, textarea { font: inherit; color: var(--bone); background: rgba(8, 7, 10, .6); border: 1px solid var(--stroke-2); border-radius: var(--r-s); padding: 10px 12px; width: 100%; transition: border-color .2s, box-shadow .2s, background .2s; }
input:hover, select:hover, textarea:hover { border-color: rgba(236, 222, 196, .24); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(226, 184, 98, .6); box-shadow: 0 0 0 4px rgba(226, 184, 98, .12); background: rgba(8, 7, 10, .85); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f8678' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; cursor: pointer; }
select option { background: #18151c; }
textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.colorf { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 6px; border: 1px solid var(--stroke-2); border-radius: var(--r-s); background: rgba(8, 7, 10, .6); }
.colorf input[type="color"] { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }
.colorf input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; } .colorf input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; }
.colorf .hex { font: 13px var(--mono); }
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 24px; background: rgba(255, 255, 255, .08); border: 1px solid var(--stroke-2); position: relative; padding: 0; flex: none; transition: background .3s, box-shadow .3s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--bone-2); transition: transform .35s var(--ease), background .3s; }
.switch input:checked { background: linear-gradient(180deg, #f0c873, #c99a45); border-color: #f3d38f; box-shadow: 0 0 16px -2px rgba(226, 184, 98, .6); }
.switch input:checked::after { transform: translateX(18px); background: var(--brass-ink); }
.switch b { display: block; font-weight: 500; } .switch small { color: var(--bone-3); font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { all: unset; cursor: pointer; font-size: 12px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--stroke-2); color: var(--bone-2); transition: all .2s; }
.chip:hover { color: var(--bone); } .chip[aria-pressed="true"] { background: var(--bone); color: var(--ink-0); border-color: var(--bone); }
.chip:focus-visible { outline: 2px solid var(--brass); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .05); color: var(--bone-2); white-space: nowrap; }
.tag.ok { color: var(--ok); background: rgba(126, 211, 154, .1); } .tag.warn { color: var(--warn); background: rgba(242, 193, 78, .1); }

/* activity */
.toolbar { position: relative; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--stroke); }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search svg { position: absolute; left: 12px; top: 11px; color: var(--bone-3); } .search input { padding-left: 36px; height: 38px; }
.toolbar select { width: auto; height: 38px; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-3); padding: 12px 20px; border-bottom: 1px solid var(--stroke); position: sticky; top: 0; background: rgba(18, 16, 22, .97); z-index: 1; }
.t td { padding: 11px 20px; border-bottom: 1px solid var(--stroke); vertical-align: middle; }
.t tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.t td.msg { overflow-wrap: anywhere; } .t .warn { color: var(--warn); } .t .error { color: var(--bad); }
.kind { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--k, var(--bone-2)); }
.kind::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--k, var(--bone-3)); box-shadow: 0 0 8px var(--k, transparent); }
.scroll { max-height: calc(100vh - 210px); overflow: auto; mask-image: linear-gradient(180deg, #000 calc(100% - 40px), transparent); padding-bottom: 30px; }
.empty { padding: 34px 16px; text-align: center; color: var(--bone-3); font-size: 12.5px; }
.empty svg.i { width: 24px; height: 24px; display: block; margin: 0 auto 10px; opacity: .55; }

/* servers */
.guilds { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.guild { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); backdrop-filter: blur(16px); transition: border-color .25s, transform .3s var(--ease), box-shadow .3s; }
.guild:hover { transform: translateY(-2px); border-color: var(--stroke-2); }
.guild[aria-pressed="true"] { border-color: rgba(226, 184, 98, .55); box-shadow: var(--glow); }
.guild:focus-visible { outline: 2px solid var(--brass); }
.guild img, .guild .gi { width: 40px; height: 40px; border-radius: 12px; background: var(--ink-3); display: grid; place-items: center; font-weight: 600; }
.guild b { display: block; font-weight: 600; } .guild small { color: var(--bone-3); font-size: 12px; }
.srv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); gap: 16px; align-items: stretch; }
.srv > .card { display: flex; flex-direction: column; } .srv > .card .list { flex: 1; }
.list { position: relative; list-style: none; margin: 0; padding: 8px 8px 40px; max-height: 640px; overflow: auto; mask-image: linear-gradient(180deg, #000 calc(100% - 56px), transparent); }
.list li:not(.cat) > button, .list li:not(.cat) > div { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.list li:not(.cat) > button:hover { background: rgba(255, 255, 255, .05); }
.list li:not(.cat) > button:focus-visible { outline: 2px solid var(--brass); }
.list li:not(.cat) > div { cursor: default; }
.list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .cat { padding: 14px 8px 5px 11px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-3); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.list .cat > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.list svg.i { color: var(--bone-3); }
.rdot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.lock { color: var(--bone-3); font-size: 11.5px; display: inline-flex; gap: 4px; align-items: center; }
.cnt { font: 11.5px var(--mono); color: var(--bone-3); }
.settings { display: grid; gap: 20px; }

/* broadcast */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.form { display: grid; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.preview-wrap { position: sticky; top: 96px; }
.preview { background: #313338; border-radius: 12px; padding: 18px 16px 20px; color: #dbdee1; font-size: 14.5px; box-shadow: 0 30px 60px -30px #000; }
.preview .who { display: flex; gap: 14px; }
.preview .av { width: 40px; height: 40px; border-radius: 50%; background: #1e1f22 url(emblem.png) center/112% no-repeat; flex: none; }
.preview .name { color: #f2f3f5; font-weight: 500; } .preview .appt { font-size: 10px; background: #5865f2; color: #fff; padding: 1px 4px; border-radius: 3px; margin-left: 4px; vertical-align: 1px; font-weight: 600; } .preview .ts { color: #949ba4; font-size: 12px; margin-left: 6px; }
.preview .ping { color: #c9cdfb; background: #5865f24d; border-radius: 3px; padding: 0 2px; }
.embed { margin-top: 6px; border-left: 4px solid var(--ec, #ece6d9); background: #2b2d31; border-radius: 4px; padding: 10px 16px 14px 12px; max-width: 432px; width: fit-content; }
.embed h4 { margin: 2px 0 6px; color: #f2f3f5; font-size: 15.5px; font-weight: 600; } .embed p { margin: 0; white-space: pre-wrap; line-height: 1.4; font-size: 14px; }
.embed p:empty::before { content: "Your message appears here"; color: #6d6f78; } .embed footer { margin-top: 8px; font-size: 12px; color: #949ba4; }

/* overlays */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(460px, calc(100vw - 24px)); z-index: 50; background: rgba(18, 16, 22, .95); backdrop-filter: blur(24px); border: 1px solid var(--stroke-2); border-radius: 20px; transform: translateX(calc(100% + 24px)); transition: transform .5s var(--ease); display: flex; flex-direction: column; visibility: hidden; box-shadow: -30px 0 80px -20px #000; }
.drawer.on { transform: none; visibility: visible; }
.drawer > header { display: flex; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--stroke); gap: 10px; }
.drawer > header h3 { margin: 0; font: 600 17px var(--display); flex: 1; }
.drawer .body { padding: 20px; display: grid; gap: 18px; overflow: auto; align-content: start; }
.drawer > footer { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--stroke); display: flex; gap: 8px; } .drawer > footer .grow { flex: 1; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.perm-grid label { display: flex; align-items: center; gap: 9px; padding: 7px 2px; cursor: pointer; font-size: 12.5px; } .perm-grid input { width: auto; accent-color: var(--brass); }
.palette { position: fixed; left: 50%; top: 15vh; width: min(600px, 92vw); transform: translateX(-50%) scale(.96); z-index: 60; background: rgba(20, 18, 24, .96); backdrop-filter: blur(24px); border: 1px solid var(--stroke-2); border-radius: 18px; box-shadow: 0 40px 120px rgba(0, 0, 0, .8), var(--glow); opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .2s, transform .35s var(--ease); }
.palette.on { opacity: 1; pointer-events: auto; visibility: visible; transform: translateX(-50%); }
.palette input { border: 0; border-bottom: 1px solid var(--stroke); border-radius: 18px 18px 0 0; background: transparent !important; padding: 20px 22px; font-size: 16px; box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 360px; overflow: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px; cursor: pointer; color: var(--bone-2); }
.palette li[aria-selected="true"] { background: rgba(226, 184, 98, .12); color: var(--bone); box-shadow: inset 0 0 0 1px rgba(226, 184, 98, .25); }
.palette li small { margin-left: auto; color: var(--bone-3); }
.toasts { position: fixed; right: 24px; bottom: 24px; display: grid; gap: 10px; z-index: 70; }
.toast { display: flex; gap: 10px; align-items: center; padding: 13px 16px; border-radius: 14px; background: rgba(20, 18, 24, .95); backdrop-filter: blur(16px); border: 1px solid var(--stroke-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .7); animation: toastin .5s var(--ease); min-width: 260px; }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.toast.ok svg { color: var(--ok); } .toast.bad svg { color: var(--bad); }
.sk { position: relative; overflow: hidden; background: rgba(255, 255, 255, .05); border-radius: 6px; color: transparent !important; display: inline-block; min-width: 3em; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent); animation: sk 1.4s infinite; }
@keyframes sk { to { transform: translateX(100%); } }

/* intro */
.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--void); transition: opacity .9s var(--ease), visibility .9s; }
.intro.done { opacity: 0; visibility: hidden; }
.intro img { width: 150px; display: block; margin: 0 auto; animation: introImg 1.3s var(--ease) both; filter: drop-shadow(0 0 40px rgba(226, 184, 98, .4)); }
.intro b { display: block; margin-top: 18px; font: 600 14px var(--display); letter-spacing: .4em; color: var(--bone-2); text-align: center; animation: introTxt 1.3s .15s var(--ease) both; }
@keyframes introImg { from { opacity: 0; transform: scale(.85); filter: blur(8px); } }
@keyframes introTxt { from { opacity: 0; letter-spacing: .8em; } }

/* login */
.login { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.2fr 1fr; }
.login .art { position: relative; display: grid; place-items: center; overflow: hidden; }
.login .art img { width: min(470px, 68%); filter: drop-shadow(0 30px 80px rgba(0, 0, 0, .9)) drop-shadow(0 0 60px rgba(226, 184, 98, .25)); animation: introImg 1.4s var(--ease) both, float 9s 1.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.login .art .cap { position: absolute; bottom: 34px; left: 40px; right: 40px; display: flex; justify-content: space-between; color: var(--bone-3); font-size: 12px; letter-spacing: .1em; }
.login .art .cap b { font: 600 13px var(--display); color: var(--bone-2); letter-spacing: .2em; }
.login .card { align-self: center; justify-self: center; width: min(400px, 88vw); padding: 38px 34px; }
.login form { position: relative; display: grid; gap: 20px; }
.login h1 { margin: 4px 0 0; font: 600 30px/1.1 var(--display); letter-spacing: .02em; }
.login p { margin: 0; color: var(--bone-3); } .login .err { color: var(--bad); font-size: 12.5px; }
.login .btn { height: 46px; width: 100%; font-size: 14px; }

@media (max-width: 1280px) { .hero, .row.a { grid-template-columns: 1fr; } .row.b { grid-template-columns: 1fr 1fr; } .srv { grid-template-columns: 1fr 1fr; } .srv > :last-child { grid-column: 1 / -1; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; } .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 66px; flex-direction: row; justify-content: space-around; padding: 0 10px; border: 0; border-top: 1px solid var(--stroke); }
  .rail .logo, .rail .spacer, .rail .live, .rail .tip { display: none; } .rail button[aria-current="page"]::before { display: none; }
  .view, .top { padding-left: 16px; padding-right: 16px; } .view { padding-bottom: 100px; }
  .hero-main { grid-template-columns: 1fr; justify-items: center; text-align: center; } .chips-row { justify-content: center; }
  .kpi-grid, .row.b, .srv, .compose, .login, .two { grid-template-columns: 1fr; } .login .art { min-height: 38vh; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
