/* ==========================================================================================
   PHD Clan – "War Room" design system
   Gunmetal + brass (shell casings in firelight). Chamfered HUD panels, condensed display type.
   ========================================================================================== */

@font-face { font-family: 'Big Shoulders Display'; src: url('fonts/big-shoulders-display.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-400i.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('fonts/barlow-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('fonts/barlow-condensed-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('fonts/barlow-condensed-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;

  /* palette */
  --ink: #0b0f10;
  --gunmetal: #131a1c;
  --gunmetal-2: #182124;
  --steel: #1f2a2d;
  --steel-2: #2a3639;
  --steel-3: #3a4749;
  --brass: #d6a547;
  --brass-hi: #f1ca78;
  --brass-lo: #8c6a2b;
  --ember: #e36a2e;
  --bone: #ece5d3;
  --bone-2: #cfc7b3;
  --smoke: #9ba4a6;
  --smoke-2: #838d90;
  --signal: #8dbf6b;
  --danger: #d8604e;
  --vip: #b99cf0;
  --mod: #6fb7d6;

  --line: rgba(214, 165, 71, 0.16);
  --line-strong: rgba(214, 165, 71, 0.42);
  --line-steel: rgba(155, 164, 166, 0.14);
  --glass: rgba(14, 19, 21, 0.78);

  /* type */
  --font-display: 'Big Shoulders Display', 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --font-hud: 'Barlow Condensed', 'Barlow', 'Arial Narrow', sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: clamp(2.4rem, 4vw + 1rem, 3.6rem);

  /* spacing / shape */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --cut: 14px;
  --cut-sm: 8px;
  --radius: 4px;
  --shell-max: 1480px;
  --gutter: clamp(1rem, 2.4vw, 2rem);
  --topbar-h: 68px;
  --rail-w: 340px;

  /* motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 140ms;
  --t-med: 260ms;
  --t-slow: 620ms;

  --shadow-deep: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --focus: 0 0 0 2px var(--ink), 0 0 0 4px var(--brass-hi);
}

/* ------------------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(214, 165, 71, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(80, 110, 115, 0.08), transparent 60%),
    var(--ink);
  color: var(--bone);
  font: 400 var(--fs-md)/1.55 var(--font-body);
  font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  /* topographic contour texture + grain, fixed and very quiet */
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%23d6a547' stroke-opacity='.045' stroke-width='1'%3E%3Cpath d='M-20 120c90-40 160 30 260 0s160-90 260-40 120 60 160 40'/%3E%3Cpath d='M-20 160c90-40 160 30 260 0s160-90 260-40 120 60 160 40'/%3E%3Cpath d='M-20 210c80-30 170 40 250 10s170-100 270-50 110 50 150 30'/%3E%3Cpath d='M-20 400c100 30 150-50 250-20s180 80 260 30 100-40 160-20'/%3E%3Cpath d='M-20 440c100 30 150-50 250-20s180 80 260 30 100-40 160-20'/%3E%3Cpath d='M-20 490c110 40 140-40 240-10s190 90 270 40 110-50 170-30'/%3E%3Ccircle cx='420' cy='300' r='40'/%3E%3Ccircle cx='420' cy='300' r='70'/%3E%3Ccircle cx='420' cy='300' r='105'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 600px 600px;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brass-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bone); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 2px; }
::selection { background: rgba(214, 165, 71, 0.35); color: var(--bone); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }

h1, h2, h3, h4 { margin: 0; line-height: 1.08; color: var(--bone); }
h1, h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; }
h1 { font-size: var(--fs-4xl); }
h2 { font-size: clamp(1.6rem, 1.2vw + 1.2rem, 2.2rem); }
h3 { font-size: var(--fs-lg); font-weight: 600; line-height: 1.25; }
h4 { font-size: var(--fs-md); font-weight: 600; }
p { margin: 0 0 var(--sp-3); }
p:last-child { margin-bottom: 0; }
small { font-size: var(--fs-xs); }

.icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--brass); color: var(--ink); font-weight: 700; transition: top var(--t-fast); }
.skip-link:focus { top: 12px; }
.muted { color: var(--smoke); }
.hud { font-family: var(--font-hud); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: var(--fs-xs); color: var(--smoke); }
.num { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* ------------------------------------------------------------------------------ chamfered panels */

.panel, .chamfer {
  --pc: var(--cut);
  --panel-bg: linear-gradient(180deg, rgba(31, 42, 45, 0.72), rgba(19, 26, 28, 0.92));
  --panel-border: linear-gradient(145deg, rgba(214, 165, 71, 0.45), rgba(58, 71, 73, 0.55) 35%, rgba(58, 71, 73, 0.3) 70%, rgba(214, 165, 71, 0.3));
  position: relative;
  isolation: isolate;
  clip-path: polygon(var(--pc) 0, 100% 0, 100% calc(100% - var(--pc)), calc(100% - var(--pc)) 100%, 0 100%, 0 var(--pc));
  background: var(--panel-border);
  padding: var(--sp-5);
}
.panel::before, .chamfer::before {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  clip-path: polygon(calc(var(--pc) - 0.4px) 0, 100% 0, 100% calc(100% - var(--pc) + 0.4px), calc(100% - var(--pc) + 0.4px) 100%, 0 100%, 0 calc(var(--pc) - 0.4px));
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
}
.panel { min-width: 0; }
.admin-editor > *, .view-panel > *, .home-board > *, .profile-layout > *, .profile-content-grid > * { min-width: 0; }
.panel.flat { --panel-bg: var(--gunmetal); }
.panel.tight { padding: var(--sp-4); }
.panel.bare { padding: 0; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.panel-head h2 { font-size: clamp(1.35rem, 0.8vw + 1.1rem, 1.75rem); }
.panel-head h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-xl); text-transform: uppercase; letter-spacing: 0.02em; }
.panel-head .hud { display: block; margin-bottom: 4px; color: var(--brass); }
.panel-head .link-more, .calendar-head .link-more { flex: none; font-size: var(--fs-sm); color: var(--smoke); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.panel-head .link-more:hover { color: var(--brass-hi); }

/* HUD corner ticks for featured panels */
.ticks::after {
  content: '';
  position: absolute;
  inset: 8px;
  pointer-events: none;
  background:
    linear-gradient(var(--brass), var(--brass)) top right / 14px 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) top right / 1px 14px no-repeat,
    linear-gradient(var(--brass), var(--brass)) bottom left / 14px 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) bottom left / 1px 14px no-repeat;
  opacity: 0.7;
}

/* ------------------------------------------------------------------------------ buttons & form controls */

.btn, .action {
  --b-cut: 8px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  clip-path: polygon(var(--b-cut) 0, 100% 0, 100% calc(100% - var(--b-cut)), calc(100% - var(--b-cut)) 100%, 0 100%, 0 var(--b-cut));
  background: var(--steel-2);
  color: var(--bone);
  font-family: var(--font-hud);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  overflow: hidden;
}
.btn:hover, .action:hover { background: var(--steel-3); color: var(--bone); }
.btn:active, .action:active { transform: translateY(1px); }
.btn:disabled, .action:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .icon, .action .icon { width: 18px; height: 18px; }
.btn.primary, .action.primary {
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #b98a35);
  color: #1a1307;
}
.btn.primary::after, .action.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.45) 45%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 700ms var(--ease-out);
}
.btn.primary:hover, .action.primary:hover { background: linear-gradient(180deg, #ffe0a0, var(--brass-hi) 55%, var(--brass)); color: #1a1307; }
.btn.primary:hover::after, .action.primary:hover::after { transform: translateX(120%); }
.btn.ghost, .action.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover, .action.ghost:hover { background: rgba(214, 165, 71, 0.1); }
.btn.danger, .action.danger { background: rgba(216, 96, 78, 0.18); color: #ffb3a6; box-shadow: inset 0 0 0 1px rgba(216, 96, 78, 0.5); }
.btn.danger:hover, .action.danger:hover { background: rgba(216, 96, 78, 0.32); }
.btn.small, .action.tiny { min-height: 34px; padding: 0 12px; font-size: 0.88rem; --b-cut: 6px; }
.btn.block { width: 100%; }
.btn:focus-visible, .action:focus-visible { box-shadow: none; outline: 2px solid var(--brass-hi); outline-offset: 2px; }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--bone-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.icon-button:hover { background: rgba(214, 165, 71, 0.12); color: var(--brass-hi); }
.icon-button.danger:hover { background: rgba(216, 96, 78, 0.18); color: #ffb3a6; }
.icon-button.small { width: 32px; height: 32px; }
.icon-button .icon { width: 20px; height: 20px; }

input[type='text'], input[type='search'], input[type='email'], input[type='password'], input[type='url'], input[type='number'], input[type='datetime-local'], input[type='date'], input:not([type]), select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--steel-3);
  border-radius: var(--radius);
  background: rgba(8, 11, 12, 0.7);
  color: var(--bone);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6a547' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
input::placeholder, textarea::placeholder { color: var(--smoke-2); }
input:hover, select:hover, textarea:hover { border-color: #4a585b; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(214, 165, 71, 0.18); background: rgba(8, 11, 12, 0.9); }
input[type='checkbox'], input[type='radio'] { accent-color: var(--brass); width: 18px; height: 18px; }
input[type='file'] { font-size: var(--fs-sm); color: var(--smoke); }
input[type='file']::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--line-strong); background: var(--steel); color: var(--bone); cursor: pointer; }

.field { display: grid; gap: 6px; }
.field > span { font-size: var(--fs-sm); color: var(--bone-2); font-weight: 500; }
.field small { color: var(--smoke); }
.field.wide { grid-column: 1 / -1; }
.check, .checkline { display: inline-flex; align-items: center; gap: 10px; color: var(--bone-2); font-size: var(--fs-sm); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-4); }
.form-grid .field:has(textarea) { grid-column: 1 / -1; }
.form-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-end; }
.form-row > .field { flex: 1 1 200px; }
.form-error, .login-error { padding: 10px 14px; border-left: 3px solid var(--danger); background: rgba(216, 96, 78, 0.12); color: #ffc5bb; font-size: var(--fs-sm); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

/* ------------------------------------------------------------------------------ badges, chips, avatars */

.role-badge, .chip, .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border: 1px solid var(--line-steel);
  border-radius: 2px;
  font-family: var(--font-hud);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--smoke);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}
.role-badge.status-admin { color: var(--brass-hi); border-color: rgba(214, 165, 71, 0.5); background: rgba(214, 165, 71, 0.1); }
.role-badge.status-mod { color: var(--mod); border-color: rgba(111, 183, 214, 0.45); }
.role-badge.status-vip { color: var(--vip); border-color: rgba(185, 156, 240, 0.45); }
.role-badge.status-member { color: var(--signal); border-color: rgba(141, 191, 107, 0.4); }
.role-badge.status-ban { color: var(--danger); border-color: rgba(216, 96, 78, 0.45); }
.chip.brass { color: var(--brass-hi); border-color: var(--line-strong); }
.chip.live { color: #ffd2bd; border-color: rgba(227, 106, 46, 0.5); background: rgba(227, 106, 46, 0.12); }
.chip.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 0 rgba(227, 106, 46, 0.7); animation: live-pulse 1.8s infinite; }
.chip.ok { color: var(--signal); border-color: rgba(141, 191, 107, 0.4); }
.chip.warn { color: #f0b36b; border-color: rgba(240, 179, 107, 0.4); }
.chip.bad { color: var(--danger); border-color: rgba(216, 96, 78, 0.45); }

.user-link { display: inline-flex; align-items: center; gap: 6px; color: var(--bone); font-weight: 600; text-decoration: none; }
a.user-link:hover { color: var(--brass-hi); }
.user-link.status-admin { color: var(--brass-hi); }
.user-link.status-mod { color: #9fd3ea; }
.user-link.status-vip { color: #cfbaf7; }

.avatar {
  --size: 40px;
  width: var(--size);
  height: var(--size);
  flex: 0 0 var(--size);
  object-fit: cover;
  border-radius: 3px;
  background: var(--steel);
  box-shadow: 0 0 0 1px rgba(214, 165, 71, 0.25);
}
.avatar-sm { --size: 28px; }
.avatar-lg { --size: 64px; }
.avatar-xl { --size: 112px; }
.avatar-placeholder {
  display: inline-grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--size) * 0.42);
  letter-spacing: 0.02em;
  color: var(--ink);
  background: linear-gradient(145deg, var(--brass-hi), var(--brass-lo));
}
.avatar-placeholder[data-tone='1'] { background: linear-gradient(145deg, #a9b7b9, #4f5d60); }
.avatar-placeholder[data-tone='2'] { background: linear-gradient(145deg, #e9a06c, #8a4a24); }
.avatar-placeholder[data-tone='3'] { background: linear-gradient(145deg, #c9c19e, #6d6546); }
.avatar-placeholder[data-tone='4'] { background: linear-gradient(145deg, #9fbf93, #486041); }
.is-hidden { display: none !important; }

/* ------------------------------------------------------------------------------ app shell */

phd-shell { display: block; min-height: 100vh; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(11, 15, 16, 0.94), rgba(11, 15, 16, 0.82));
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass) 20%, var(--brass-hi) 50%, var(--brass) 80%, transparent);
  opacity: 0.55;
  transform-origin: left;
  animation: draw-line 1.2s var(--ease-out) both 0.2s;
}
.topbar-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bone);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark { width: 44px; height: 44px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); transition: transform var(--t-med) var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.brand-word { display: grid; line-height: 1; }
.brand-word strong { font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; letter-spacing: 0.08em; }
.brand-word small { font-family: var(--font-hud); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin-top: 3px; }

.mainnav { display: flex; align-items: center; gap: 2px; margin-left: var(--sp-4); flex: 1 1 auto; min-width: 0; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--bone-2);
  font-family: var(--font-hud);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link .icon { width: 17px; height: 17px; opacity: 0.8; }
.mainnav .nav-link > .icon:not(.chev) { display: none; }
.nav-link:hover, .nav-group:focus-within > .nav-link { color: var(--bone); background: rgba(255, 255, 255, 0.04); }
.nav-link[aria-current='page'], .nav-link.is-active { color: var(--brass-hi); }
.nav-link[aria-current='page']::after, .nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -14px;
  height: 2px;
  background: var(--brass);
  box-shadow: 0 0 12px rgba(214, 165, 71, 0.8);
}
.nav-link .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); animation: live-pulse 1.8s infinite; }
.nav-group { position: relative; }
.nav-group > .nav-link .chev { width: 14px; height: 14px; transition: transform var(--t-fast); }
.nav-group[data-open='true'] > .nav-link .chev { transform: rotate(180deg); }
.nav-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: -8px;
  min-width: 290px;
  padding: 8px;
  display: grid;
  gap: 2px;
  background: rgba(15, 20, 22, 0.97);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-deep);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-out), visibility var(--t-fast);
}
.nav-group[data-open='true'] > .nav-menu { opacity: 1; visibility: visible; transform: none; }
.menu-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 2px 10px;
  align-items: center;
  padding: 9px 10px;
  border: 0;
  background: none;
  text-align: left;
  color: var(--bone);
  text-decoration: none;
  border-radius: 3px;
}
.menu-item .icon { grid-row: span 2; width: 36px; height: 36px; padding: 8px; color: var(--brass); background: rgba(214, 165, 71, 0.08); border-radius: 3px; }
.menu-item strong { font-weight: 600; }
.menu-item small { color: var(--smoke); }
.menu-item:hover, .menu-item[aria-current='page'] { background: rgba(214, 165, 71, 0.09); color: var(--bone); }

.topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  min-width: 200px;
  padding: 0 12px;
  border: 1px solid var(--steel-3);
  border-radius: var(--radius);
  background: rgba(8, 11, 12, 0.6);
  color: var(--smoke);
  font-size: var(--fs-sm);
}
.search-trigger:hover { border-color: var(--line-strong); color: var(--bone-2); }
.search-trigger kbd { margin-left: auto; padding: 1px 6px; border: 1px solid var(--steel-3); border-radius: 3px; font: 600 0.72rem var(--font-hud); color: var(--smoke-2); }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px 0 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(214, 165, 71, 0.05);
  color: var(--bone);
  text-decoration: none;
  font-weight: 600;
  max-width: 220px;
}
.user-chip .avatar { --size: 34px; }
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip:hover { border-color: var(--line-strong); background: rgba(214, 165, 71, 0.1); }
.login-chip { composes: btn; }
.voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(141, 191, 107, 0.45);
  background: rgba(141, 191, 107, 0.1);
  color: #cfeab9;
  font: 600 0.85rem var(--font-hud);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.voice-pill .icon { width: 16px; height: 16px; }
.voice-pill.speaking { box-shadow: 0 0 0 3px rgba(141, 191, 107, 0.25); }
.app-shell[data-view='voice'] .voice-pill { display: none; }
@media (max-width: 1600px) { .voice-pill span { display: none; } .voice-pill { padding: 0 10px; } }
.menu-toggle { display: none; }

.breadcrumbs {
  max-width: var(--shell-max);
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-3) var(--gutter) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--smoke);
}
.breadcrumbs button, .breadcrumbs a { padding: 0; border: 0; background: none; color: var(--smoke); text-decoration: none; }
.breadcrumbs button:hover, .breadcrumbs a:hover { color: var(--brass-hi); }
.breadcrumbs i { font-style: normal; color: var(--steel-3); }
.breadcrumbs [aria-current='page'] { color: var(--bone-2); max-width: 50ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell[data-view='home'] .breadcrumbs { display: none; }

.stage:empty { display: none; }

.layout {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--sp-5) var(--gutter) var(--sp-8);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: var(--sp-5);
  align-items: start;
}
.app-shell[data-rail='closed'] .layout, .app-shell[data-view='home'] .layout, .app-shell[data-view='voice'] .layout, .app-shell[data-view='admin'] .layout, .app-shell[data-view='messages'] .layout { grid-template-columns: minmax(0, 1fr); }
.app-shell[data-rail='closed'] .shout-rail, .app-shell[data-view='home'] .shout-rail, .app-shell[data-view='voice'] .shout-rail, .app-shell[data-view='admin'] .shout-rail, .app-shell[data-view='messages'] .shout-rail { display: none; }
.content { min-width: 0; }
.view-panel { min-width: 0; }
.view-panel > * + * { margin-top: var(--sp-5); }

/* rail: Laberbox dock */
.shout-rail {
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  max-height: calc(100vh - var(--topbar-h) - 32px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.shout-rail > .panel { display: flex; flex-direction: column; gap: var(--sp-3); min-height: 0; max-height: 100%; padding: var(--sp-4); }
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-head h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.rail-form { display: grid; gap: 8px; }
.rail-form textarea { min-height: 70px; }
.rail-form-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.rail-form-row small { color: var(--smoke-2); }
.rail-messages { display: grid; gap: 2px; overflow-y: auto; min-height: 0; padding-right: 4px; margin-right: -4px; scrollbar-width: thin; scrollbar-color: var(--steel-3) transparent; }

.shout-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 6px;
  border-radius: 3px;
  position: relative;
}
.shout-item .avatar { --size: 32px; }
.shout-item:hover { background: rgba(255, 255, 255, 0.03); }
.shout-item.is-new { animation: shout-in 700ms var(--ease-out) both; }
.shout-meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: var(--fs-sm); }
.shout-meta .user-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shout-meta time { color: var(--smoke-2); font-size: var(--fs-xs); white-space: nowrap; }
.shout-text { font-size: 0.95rem; color: var(--bone-2); overflow-wrap: anywhere; }
.shout-text img.smiley { display: inline; vertical-align: -3px; }
.shout-item .shout-actions { position: absolute; top: 4px; right: 4px; display: none; gap: 2px; }
.shout-item:hover .shout-actions, .shout-item:focus-within .shout-actions { display: flex; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(11, 15, 16, 0), rgba(0, 0, 0, 0.4)); }
.footer-inner { max-width: var(--shell-max); margin: 0 auto; padding: var(--sp-6) var(--gutter) calc(var(--sp-6) + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: var(--sp-5); align-items: center; justify-content: space-between; color: var(--smoke); font-size: var(--fs-sm); }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 56px; height: 56px; opacity: 0.9; }
.footer-brand strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--bone); letter-spacing: 0.06em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a, .footer-links button { color: var(--smoke); text-decoration: none; background: none; border: 0; padding: 0; }
.footer-links a:hover, .footer-links button:hover { color: var(--brass-hi); }

/* mobile tab bar + drawer */
.tabbar { display: none; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); opacity: 0; transition: opacity var(--t-med); }
.drawer-backdrop.is-open { opacity: 1; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 81;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #121a1c, #0b0f10);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-deep);
  transform: translateX(104%);
  transition: transform var(--t-med) var(--ease-out);
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-body { overflow-y: auto; padding: 8px 12px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 18px; align-content: start; }
.drawer-section h3 { margin: 12px 8px 6px; }
.drawer .shout-sheet { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.drawer .rail-messages { max-height: none; }

/* ------------------------------------------------------------------------------ stage (page heroes) */

.stage { position: relative; }
.page-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(200px, 24vw, 300px);
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  background: var(--gunmetal);
}
.page-hero-media { position: absolute; inset: 0; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; filter: saturate(0.95) contrast(1.05); animation: hero-zoom 14s var(--ease-out) both; }
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 15, 16, 0.97) 0%, rgba(11, 15, 16, 0.86) 34%, rgba(11, 15, 16, 0.25) 70%, rgba(11, 15, 16, 0.5)),
    linear-gradient(0deg, var(--ink) 0%, transparent 45%);
}
.page-hero-inner { position: relative; z-index: 1; width: 100%; max-width: var(--shell-max); margin: 0 auto; padding: var(--sp-7) var(--gutter) var(--sp-5); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); }
.page-hero-copy { max-width: 62ch; animation: rise-in var(--t-slow) var(--ease-out) both; }
.page-hero .hud { color: var(--brass); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.page-hero .hud .icon { width: 16px; height: 16px; }
.page-hero h1 { font-size: clamp(2.2rem, 3.4vw + 1rem, 4rem); line-height: 0.95; }
.page-hero p { margin-top: var(--sp-3); color: var(--bone-2); font-size: var(--fs-lg); max-width: 56ch; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); animation: rise-in var(--t-slow) var(--ease-out) both 120ms; }
.page-hero.compact { min-height: 0; }
.page-hero.compact .page-hero-inner { padding-top: var(--sp-6); }

/* ------------------------------------------------------------------------------ home hero */

.hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.hero-media { position: absolute; inset: -6% 0 0 0; z-index: -3; will-change: transform; }
.hero-media img { width: 100%; height: 106%; object-fit: cover; object-position: 72% 40%; animation: hero-zoom 18s var(--ease-out) both; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(11, 15, 16, 0.96) 0%, rgba(11, 15, 16, 0.82) 30%, rgba(11, 15, 16, 0.18) 62%, rgba(11, 15, 16, 0.35) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(11, 15, 16, 0) 30%),
    linear-gradient(180deg, rgba(11, 15, 16, 0.7) 0%, transparent 18%);
}
.hero-embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-scan { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.hero-inner { width: 100%; max-width: var(--shell-max); margin: 0 auto; padding: var(--sp-8) var(--gutter); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: var(--sp-6); align-items: end; }
.hero-copy { max-width: 780px; }
.hero-stamp { display: inline-flex; align-items: center; gap: 12px; margin-bottom: var(--sp-5); color: var(--brass); }
.hero-stamp img { width: 64px; height: 64px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7)); animation: stamp-in 900ms var(--ease-out) both 150ms; }
.hero-stamp span { font-family: var(--font-hud); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.85rem; animation: fade-in 800ms both 700ms; }
.hero-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(3.6rem, 8.6vw, 8.8rem); line-height: 0.84; letter-spacing: 0.005em; text-transform: uppercase; margin: 0; }
.hero-title .word { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero-title .word > span { display: inline-block; transform: translateY(105%); animation: word-up 900ms var(--ease-out) forwards; }
.hero-title .word:nth-child(1) > span { animation-delay: 250ms; }
.hero-title .word:nth-child(2) > span { animation-delay: 420ms; }
.hero-title .word:nth-child(3) > span { animation-delay: 590ms; }
.hero-title .word:nth-child(2) { -webkit-text-stroke: 1.5px var(--brass); color: transparent; }
.hero-title .word:nth-child(3) > span { background: linear-gradient(180deg, var(--bone) 30%, #b7ad96); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-rule { width: 180px; height: 3px; margin: var(--sp-5) 0; background: linear-gradient(90deg, var(--brass-hi), var(--brass) 60%, transparent); transform-origin: left; animation: draw-line 900ms var(--ease-out) both 900ms; }
.hero-lead { max-width: 54ch; font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.3rem); color: var(--bone-2); animation: rise-in 800ms var(--ease-out) both 1000ms; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); animation: rise-in 800ms var(--ease-out) both 1150ms; }
.hero-actions .btn { min-height: 50px; padding: 0 24px; font-size: 1.05rem; }

.hero-hud { display: grid; gap: var(--sp-3); animation: rise-in 900ms var(--ease-out) both 1300ms; }
.hero-hud .panel { --panel-bg: linear-gradient(180deg, rgba(14, 20, 22, 0.8), rgba(11, 15, 16, 0.9)); padding: var(--sp-4) var(--sp-5); }
.hud-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 10px 0; border-bottom: 1px dashed rgba(155, 164, 166, 0.16); text-decoration: none; color: var(--bone); }
.hud-row:last-child { border-bottom: 0; }
a.hud-row:hover .hud-value { color: var(--brass-hi); }
.hud-label { display: flex; align-items: center; gap: 10px; color: var(--smoke); font-size: var(--fs-sm); }
.hud-label .icon { color: var(--brass); }
.hud-value { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; transition: color var(--t-fast); text-align: right; }
.hud-value small { font-family: var(--font-body); font-weight: 500; font-size: var(--fs-xs); color: var(--smoke); display: block; }
.countdown { display: flex; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.countdown span { display: grid; justify-items: center; line-height: 1; }
.countdown small { font-family: var(--font-hud); font-size: 0.66rem; letter-spacing: 0.12em; color: var(--smoke); margin-top: 3px; }
.hero-scroll { position: absolute; left: 50%; bottom: 18px; width: 22px; height: 36px; margin-left: -11px; border: 1.5px solid rgba(236, 229, 211, 0.4); border-radius: 12px; }
.hero-scroll::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; background: var(--brass); border-radius: 2px; animation: scroll-hint 1.8s infinite; }

/* stat ticker */
.ticker { border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(214, 165, 71, 0.08), rgba(214, 165, 71, 0.02) 40%, rgba(214, 165, 71, 0.06)); }
.ticker-inner { max-width: var(--shell-max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ticker-item { padding: var(--sp-4) var(--sp-3); display: grid; gap: 2px; border-left: 1px solid var(--line); }
.ticker-item:first-child { border-left: 0; }
.ticker-item strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 2vw + 0.8rem, 2.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.ticker-item span { color: var(--smoke); font-size: var(--fs-sm); }

/* home board */
.home-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 0.95fr); gap: var(--sp-5); }
.home-board > .span-3 { grid-column: span 3; }
.home-board > .span-2 { grid-column: span 2; }
.home-board > .span-4 { grid-column: 1 / -1; }
.home-board > .side { grid-column: 4; grid-row: span 2; display: grid; gap: var(--sp-5); align-content: start; }

/* Home voice: actual room presence; speaking accents only from the connected room. */
.panel.home-voice { --panel-bg: radial-gradient(ellipse at 6% 35%, rgba(214, 165, 71, .11), transparent 46%), var(--gunmetal); display: grid; grid-template-columns: minmax(250px, .85fr) minmax(0, 2fr); padding: 0; overflow: hidden; }
.home-voice-intro { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(22px, 3vw, 40px); border-right: 1px solid var(--line); }
.home-voice-eyebrow { display: flex; align-items: center; gap: 9px; width: 100%; }
.home-voice-live { margin-left: auto; padding: 3px 9px; border: 1px solid var(--line-steel); border-radius: 20px; color: var(--smoke); font-size: .75rem; }
.home-voice-live.is-live { border-color: var(--line-strong); color: var(--brass-hi); }
.home-voice-live.is-live::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-right: 6px; }
.home-voice-intro h2 { font-size: clamp(1.9rem, 2.3vw, 2.9rem); line-height: 1.03; margin: 22px 0 9px; max-width: 9em; }
.home-voice-intro > p { margin: 0; color: var(--smoke); font-size: .95rem; }
.home-voice-orbit { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: center; width: 212px; height: 212px; margin: 24px 0; border-radius: 50%; border: 1px solid var(--line-steel); background: radial-gradient(circle, rgba(214, 165, 71, .07), transparent 65%); }
.home-voice-orbit-lines { position: absolute; inset: 12px; border: 1px dashed var(--line-strong); border-radius: 50%; z-index: -1; }
.home-voice-orbit-lines::before { content: ''; position: absolute; inset: 13px; border-radius: 50%; border: 3px solid var(--line-steel); border-top-color: var(--brass-lo); border-bottom-color: var(--brass-lo); transform: rotate(-32deg); }
.home-voice-orbit.is-active { box-shadow: 0 0 55px rgba(214, 165, 71, .07); }
.home-voice-orbit.is-active .home-voice-orbit-lines::before { border-top-color: var(--brass-hi); border-bottom-color: var(--brass); }
.home-voice-orbit-icon { color: var(--brass); }
.home-voice-orbit-icon .icon { width: 28px; height: 28px; }
.home-voice-orbit > strong { font: 800 4.3rem/.95 var(--font-display); color: var(--bone); font-variant-numeric: tabular-nums; margin: 5px 0; }
.home-voice-orbit > span:not([aria-hidden]) { font: 500 .85rem var(--font-hud); color: var(--smoke); }
.home-voice-orbit-node { position: absolute; width: 9px; height: 9px; background: var(--steel-3); border: 2px solid var(--gunmetal); border-radius: 50%; }
.home-voice-orbit-node.is-active { background: var(--brass-hi); box-shadow: 0 0 0 4px rgba(214, 165, 71, .12); }
.home-voice-orbit-node.node-one { top: 17px; left: 39px; }
.home-voice-orbit-node.node-two { top: 93px; right: -5px; }
.home-voice-orbit-node.node-three { bottom: 12px; left: 43px; }
.home-voice-summary { display: flex; justify-content: center; gap: 24px; align-self: stretch; margin: 0 0 24px; color: var(--smoke); font-size: .875rem; }
.home-voice-summary b { color: var(--bone); font-variant-numeric: tabular-nums; }
.home-voice-cta { margin-top: auto; width: 100%; justify-content: center; }
.home-voice-board { padding: clamp(20px, 2.4vw, 32px); min-width: 0; background: linear-gradient(120deg, transparent, rgba(0, 0, 0, .12)); }
.home-voice-board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.home-voice-board-head > span:last-child { color: var(--smoke); font-size: .875rem; }
.home-voice-rooms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-voice-room { display: flex; flex-direction: column; min-width: 0; padding: 15px; border: 1px solid var(--line-steel); border-radius: 12px; background: rgba(11, 15, 16, .56); color: var(--bone); text-decoration: none; transition: border-color var(--t-fast), background var(--t-fast); }
.home-voice-room:hover, .home-voice-room:focus-visible { border-color: var(--brass); background: var(--gunmetal-2); }
.home-voice-room:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }
.home-voice-room.is-occupied { border-color: var(--line-strong); background: linear-gradient(135deg, rgba(214, 165, 71, .085), rgba(11, 15, 16, .7)); }
.home-voice-room-head { display: flex; align-items: center; gap: 9px; }
.home-voice-room-icon { display: grid; place-items: center; color: var(--smoke); }
.home-voice-room.is-occupied .home-voice-room-icon { color: var(--brass-hi); }
.home-voice-room-head h3 { min-width: 0; margin: 0; font: 600 1.2rem var(--font-hud); overflow-wrap: anywhere; }
.home-voice-room-count { margin-left: auto; display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 5px; border-radius: 6px; color: var(--smoke); background: var(--steel); font: 600 .9rem var(--font-hud); }
.home-voice-room.is-occupied .home-voice-room-count { color: var(--brass-hi); background: rgba(214, 165, 71, .12); }
.home-voice-room-access { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 11px 0; color: var(--smoke); font-size: .75rem; }
.home-voice-room-access > span:first-child { border: 1px solid var(--line-steel); border-radius: 4px; padding: 2px 6px; }
.home-voice-current { color: var(--brass-hi); }
.home-voice-people { display: grid; align-content: start; gap: 8px; flex: 1; }
.home-voice-person { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .875rem; }
.home-voice-person .avatar { flex: 0 0 28px; width: 28px; height: 28px; }
.home-voice-person > span:not(.avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-voice-person.is-speaking .avatar { outline: 2px solid var(--brass-hi); outline-offset: 2px; box-shadow: 0 0 16px rgba(214, 165, 71, .25); }
.home-voice-person small { display: flex; align-items: center; gap: 3px; margin-left: auto; color: var(--brass-hi); font-size: .7rem; white-space: nowrap; }
.home-voice-person small .icon { width: 12px; height: 12px; }
.home-voice-more, .home-voice-vacant { color: var(--smoke); font-size: .8rem; padding: 3px 0 8px; }
.home-voice-room-action { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font: 500 .75rem var(--font-hud); color: var(--smoke); margin-top: 12px; }
.home-voice-room-action .icon { width: 13px; height: 13px; }
.home-voice-footnote { display: flex; align-items: center; gap: 7px; font-size: .75rem; color: var(--smoke); margin: 16px 0 0; }
.home-voice-footnote .icon { width: 12px; height: 12px; flex-shrink: 0; }
.home-voice-unavailable { grid-column: 1 / -1; color: var(--smoke); padding: 24px; border: 1px dashed var(--line-steel); border-radius: 12px; }
@media (max-width: 1000px) {
  .panel.home-voice { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.5fr); }
  .home-voice-rooms { grid-template-columns: 1fr; }
  .home-voice-orbit { width: 190px; height: 190px; }
}
@media (max-width: 620px) {
  .panel.home-voice { grid-template-columns: 1fr; }
  .home-voice-intro { border-right: 0; border-bottom: 1px solid var(--line); }
  .home-voice-intro h2 { max-width: none; }
  .home-voice-orbit { width: 180px; height: 180px; margin: 20px 0; }
  .home-voice-orbit > strong { font-size: 3.8rem; }
  .home-voice-board-head > span:last-child { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .home-voice *, .home-voice *::before, .home-voice *::after { animation: none !important; transition: none !important; }
}

.feed { display: grid; }
.feed-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 10px;
  margin: 0 -10px;
  border-bottom: 1px solid var(--line-steel);
  color: var(--bone);
  text-decoration: none;
  transition: background var(--t-fast);
  position: relative;
}
.feed-row:last-child { border-bottom: 0; }
.feed-row::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--brass); transform: scaleY(0); transition: transform var(--t-fast) var(--ease-out); }
.feed-row:hover { background: rgba(214, 165, 71, 0.05); color: var(--bone); }
.feed-row:hover::before { transform: scaleY(1); }
.feed-row .avatar { --size: 44px; }
.feed-title { display: block; font-weight: 600; font-size: 1.02rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; font-size: var(--fs-sm); color: var(--smoke); }
.feed-meta .chip { padding: 0 6px; font-size: 0.72rem; }
.feed-count { display: grid; justify-items: end; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1; color: var(--bone-2); }
.feed-count small { font-family: var(--font-hud); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--smoke-2); margin-top: 3px; }

.news-feature { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--sp-5); }
.news-lead {
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-5);
  overflow: hidden;
  color: var(--bone);
  text-decoration: none;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  background: var(--gunmetal);
}
.news-lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform 1.2s var(--ease-out); opacity: 0.75; }
.news-lead::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11, 15, 16, 0.98) 5%, rgba(11, 15, 16, 0.6) 55%, rgba(11, 15, 16, 0.15)); }
.news-lead > *:not(img) { position: relative; z-index: 1; }
.news-lead:hover img { transform: scale(1.05); }
.news-lead h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 1.5vw + 1rem, 2.4rem); line-height: 1; margin: 8px 0; }
.news-lead p { color: var(--bone-2); max-width: 60ch; }
.news-list { display: grid; align-content: start; }
.news-item { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-steel); color: var(--bone); text-decoration: none; }
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: 0; }
.news-item strong { display: block; font-size: 1.05rem; line-height: 1.3; transition: color var(--t-fast); }
.news-item:hover strong { color: var(--brass-hi); }
.news-item span { display: block; margin-top: 4px; font-size: var(--fs-sm); color: var(--smoke); }

/* scoreboard */
.scoreboard { display: grid; gap: 6px; }
.score-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--steel-3);
  color: var(--bone);
  text-decoration: none;
  transition: background var(--t-fast), transform var(--t-fast);
}
.score-row:hover { background: rgba(214, 165, 71, 0.06); transform: translateX(2px); }
.score-row.outcome-win { border-left-color: var(--signal); }
.score-row.outcome-loss { border-left-color: var(--danger); }
.score-row.outcome-draw { border-left-color: var(--smoke); }
.score-row.outcome-open { border-left-color: var(--brass); }
.score-date { font-family: var(--font-hud); font-weight: 600; font-size: 0.8rem; color: var(--smoke); line-height: 1.1; text-transform: uppercase; }
.score-date b { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--bone); }
.score-team strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-team small { color: var(--smoke); }
.score-result { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.outcome { font-family: var(--font-hud); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border: 1px solid currentColor; }
.outcome-win .outcome { color: var(--signal); }
.outcome-loss .outcome { color: var(--danger); }
.outcome-draw .outcome { color: var(--smoke); }
.outcome-open .outcome { color: var(--brass-hi); }

/* mini calendar */
.calendar { display: grid; gap: var(--sp-3); }
.calendar-head { display: flex; align-items: center; justify-content: space-between; }
.calendar-head strong { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.calendar-grid .dow { font: 600 0.72rem var(--font-hud); color: var(--smoke-2); letter-spacing: 0.08em; padding-bottom: 4px; }
.calendar-grid .day { position: relative; aspect-ratio: 1; min-height: 30px; display: grid; place-items: center; font-size: 0.86rem; color: var(--bone-2); border-radius: 3px; background: rgba(255, 255, 255, 0.02); border: 0; padding: 0; }
.calendar-grid .day.muted { color: var(--steel-3); background: none; }
.calendar-grid .day.today { box-shadow: inset 0 0 0 1px var(--brass); color: var(--brass-hi); font-weight: 700; }
.calendar-grid .day.has-event { background: rgba(214, 165, 71, 0.16); color: var(--bone); font-weight: 600; cursor: pointer; }
.calendar-grid .day.has-event::after { content: ''; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--brass-hi); }
.calendar-grid .day.has-war::after { background: var(--ember); }
.event-list { display: grid; gap: 8px; }
.events-calendar .calendar-grid .day { aspect-ratio: auto; height: clamp(38px, 5vw, 64px); align-content: start; padding-top: 6px; }
.event-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; color: var(--bone); text-decoration: none; }
.event-date { display: grid; place-items: center; height: 48px; background: rgba(214, 165, 71, 0.1); border: 1px solid var(--line); line-height: 1; }
.event-date b { font-family: var(--font-display); font-size: 1.35rem; }
.event-date small { font: 600 0.66rem var(--font-hud); letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); }
.event-item strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-item span { font-size: var(--fs-sm); color: var(--smoke); }
.event-item.kind-war .event-date { background: rgba(227, 106, 46, 0.12); border-color: rgba(227, 106, 46, 0.4); }

/* voice mini + online */
.voice-mini { display: grid; gap: 6px; }
.voice-mini-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: rgba(255, 255, 255, 0.025); color: var(--bone); text-decoration: none; border-left: 2px solid transparent; }
.voice-mini-row:hover { border-left-color: var(--brass); background: rgba(214, 165, 71, 0.05); }
.voice-mini-row.has-people { border-left-color: var(--signal); }
.voice-mini-row strong { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.voice-mini-row .icon { color: var(--smoke); width: 16px; height: 16px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { --size: 24px; margin-left: -6px; box-shadow: 0 0 0 2px var(--gunmetal); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.online-list { display: flex; flex-wrap: wrap; gap: 6px; }
.online-list a { position: relative; display: inline-flex; }
.online-list a::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--gunmetal); }

.gallery-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--steel-3) transparent; }
.gallery-strip > * { scroll-snap-align: start; }
.gallery-strip.home-gallery { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
@media (max-width: 760px) { .gallery-strip.home-gallery { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 70%; overflow-x: auto; } }

/* ------------------------------------------------------------------------------ generic content blocks */

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); }
.section-head h2 { font-size: clamp(1.6rem, 1.2vw + 1.2rem, 2.2rem); }
.section-head .meta, .meta { color: var(--smoke); font-size: var(--fs-sm); }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--smoke); font-size: var(--fs-sm); }
.meta-line > span { display: inline-flex; align-items: center; gap: 5px; }
.meta-line .icon { width: 15px; height: 15px; color: var(--brass-lo); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.toolbar .grow { flex: 1 1 240px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-4); }
.card {
  position: relative;
  display: block;
  padding: var(--sp-4);
  border: 1px solid var(--line-steel);
  background: linear-gradient(180deg, rgba(31, 42, 45, 0.55), rgba(19, 26, 28, 0.85));
  color: var(--bone);
  text-decoration: none;
  text-align: left;
  transition: border-color var(--t-fast), transform var(--t-med) var(--ease-out), background var(--t-fast);
}
button.card { width: 100%; font: inherit; }
a.card:hover, button.card:hover { border-color: var(--line-strong); transform: translateY(-2px); color: var(--bone); }
.card h3 { margin: 6px 0; }
.card p { color: var(--bone-2); font-size: 0.95rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.tab { position: relative; padding: 10px 14px; border: 0; background: none; color: var(--smoke); font: 600 0.95rem var(--font-hud); letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { color: var(--bone); }
.tab[aria-selected='true'] { color: var(--brass-hi); }
.tab[aria-selected='true']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--brass); }
.tab .count { font-size: 0.75rem; color: var(--smoke-2); }

.pager { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); padding-top: var(--sp-3); color: var(--smoke); font-size: var(--fs-sm); }

.empty-state, .error-state, .empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  color: var(--smoke);
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.empty.compact, .empty-state.compact { padding: var(--sp-4); }
.empty-state .icon, .error-state .icon { width: 34px; height: 34px; color: var(--brass-lo); }
.empty-state strong, .error-state strong { color: var(--bone); font-size: var(--fs-lg); }
.error-state { border-color: rgba(216, 96, 78, 0.4); }
.error-state .icon { color: var(--danger); }
.error { padding: var(--sp-4); border-left: 3px solid var(--danger); background: rgba(216, 96, 78, 0.1); color: #ffc5bb; }
.success { padding: 10px 14px; border-left: 3px solid var(--signal); background: rgba(141, 191, 107, 0.1); color: #d3ecbf; }

.skeleton { display: grid; gap: 12px; padding: var(--sp-3) 0; }
.skeleton span { display: block; height: 16px; width: var(--w, 80%); background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(214, 165, 71, 0.1), rgba(255, 255, 255, 0.03)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 2px; }
.loader { padding: var(--sp-5); color: var(--smoke); }

/* ------------------------------------------------------------------------------ forum */

.forum-board { display: grid; gap: var(--sp-5); }
.forum-section .panel-head { margin-bottom: var(--sp-2); }
.forum-section .panel-head p { color: var(--smoke); font-size: var(--fs-sm); margin-top: 4px; }
.forum-section-stats { text-align: right; font-size: var(--fs-sm); color: var(--smoke); white-space: nowrap; }
.forum-section-stats b { font-family: var(--font-display); font-size: 1.4rem; color: var(--bone); }
.channel-list { display: grid; }
.forum-channel {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px 10px;
  border: 0;
  border-top: 1px solid var(--line-steel);
  background: none;
  color: var(--bone);
  text-align: left;
  text-decoration: none;
  transition: background var(--t-fast);
}
.forum-channel:hover { background: rgba(214, 165, 71, 0.05); color: var(--bone); }
.channel-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--brass); background: rgba(214, 165, 71, 0.08); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.channel-icon .icon { width: 20px; height: 20px; }
.forum-channel.is-locked .channel-icon { color: var(--smoke); background: rgba(255, 255, 255, 0.04); }
.forum-channel strong { display: block; font-size: 1.05rem; font-weight: 600; }
.forum-channel small { display: block; color: var(--smoke); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.channel-stats { display: grid; justify-items: end; font-size: var(--fs-sm); color: var(--smoke); white-space: nowrap; }
.channel-last:empty { display: none; }
.channel-stats b { font-family: var(--font-display); font-size: 1.25rem; color: var(--bone); line-height: 1; }
.channel-last { font-size: var(--fs-sm); color: var(--smoke); min-width: 0; }
.channel-last strong { font-size: var(--fs-sm); color: var(--bone-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.forum-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.leader-list { display: grid; gap: 2px; counter-reset: rank; }
.leader-row { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 6px; color: var(--bone); text-decoration: none; counter-increment: rank; }
.leader-row::before { content: counter(rank); font-family: var(--font-display); font-weight: 800; color: var(--smoke-2); text-align: right; }
.leader-row:nth-child(1)::before { color: var(--brass-hi); }
.leader-row:nth-child(2)::before, .leader-row:nth-child(3)::before { color: var(--brass); }
.leader-row .avatar { --size: 30px; }
.leader-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-row b { font-family: var(--font-display); font-size: 1.1rem; }
.leader-row:hover { background: rgba(214, 165, 71, 0.05); }

.thread-list { display: grid; }
.thread-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line-steel);
  cursor: pointer;
  transition: background var(--t-fast);
}
.thread-row:hover, .thread-row:focus-within { background: rgba(214, 165, 71, 0.05); }
.thread-row .thread-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--smoke); background: rgba(255, 255, 255, 0.04); }
.thread-row.is-pinned .thread-icon { color: var(--brass-hi); background: rgba(214, 165, 71, 0.12); }
.thread-row h3 { font-size: 1.02rem; margin: 0; }
.thread-row h3 a { color: var(--bone); text-decoration: none; }
.thread-row h3 a:hover { color: var(--brass-hi); }
.thread-metrics { display: flex; gap: 18px; font-size: var(--fs-sm); color: var(--smoke); }
.thread-metrics b { font-family: var(--font-display); font-size: 1.15rem; color: var(--bone); margin-right: 4px; }
.thread-last { font-size: var(--fs-sm); color: var(--smoke); text-align: right; min-width: 120px; }

.thread-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.thread-head h1 { font-size: clamp(1.8rem, 2vw + 1rem, 2.8rem); line-height: 1; }
.mod-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed rgba(111, 183, 214, 0.35); background: rgba(111, 183, 214, 0.05); font-size: var(--fs-sm); }
.mod-bar .hud { color: var(--mod); }
.mod-bar select { width: auto; min-width: 180px; min-height: 36px; padding-top: 5px; padding-bottom: 5px; }

.post-conversation { display: grid; gap: var(--sp-4); }
.post {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  border: 1px solid var(--line-steel);
  background: linear-gradient(180deg, rgba(24, 33, 36, 0.8), rgba(17, 23, 25, 0.9));
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}
.post-author { display: grid; justify-items: center; align-content: start; gap: 8px; padding: var(--sp-4); text-align: center; border-right: 1px solid var(--line-steel); background: rgba(0, 0, 0, 0.18); }
.post-author .avatar { --size: 72px; }
.post-author .user-link { justify-content: center; font-size: 1.02rem; overflow-wrap: anywhere; }
.post-author small { color: var(--smoke); }
.post-main { min-width: 0; display: flex; flex-direction: column; }
.post-header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 10px var(--sp-4); border-bottom: 1px solid var(--line-steel); font-size: var(--fs-sm); color: var(--smoke); }
.post-header a { color: var(--smoke); text-decoration: none; }
.post-header a:hover { color: var(--brass-hi); }
.post-header h3 { font-size: 1rem; color: var(--bone-2); }
.forum-post-body { padding: var(--sp-4); flex: 1 1 auto; }
.signature { margin: 0 var(--sp-4) var(--sp-4); padding-top: var(--sp-3); border-top: 1px dashed var(--line-steel); color: var(--smoke); font-size: var(--fs-sm); }
.post-actions { display: flex; justify-content: flex-end; gap: 4px; padding: 0 var(--sp-3) var(--sp-3); }
.post.is-deleted { opacity: 0.6; }
.post-highlight { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass), 0 0 40px -10px rgba(214, 165, 71, 0.6); animation: highlight-pulse 2.4s var(--ease-out) 2; }
.inline-editor { display: grid; gap: var(--sp-3); padding: var(--sp-4); border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); }

.poll-card { display: grid; gap: 10px; }
.poll-choice, .poll-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line-steel);
  background: rgba(255, 255, 255, 0.02);
  color: var(--bone);
  text-align: left;
  overflow: hidden;
  width: 100%;
}
button.poll-choice:hover:not(:disabled) { border-color: var(--line-strong); }
.poll-choice > span, .poll-bar > span.fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(214, 165, 71, 0.28), rgba(214, 165, 71, 0.12)); transition: width 1s var(--ease-out); }
.poll-choice b, .poll-choice em, .poll-bar b, .poll-bar em { position: relative; font-style: normal; }
.poll-choice em, .poll-bar em { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.poll-choice.is-mine, .poll-bar.is-mine { border-color: var(--brass); }
.poll-choice.is-mine b::after, .poll-bar.is-mine b::after { content: ' ✓'; color: var(--brass-hi); }

/* editor */
.bb-editor { display: grid; border: 1px solid var(--steel-3); background: rgba(8, 11, 12, 0.7); }
.bb-editor:focus-within { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(214, 165, 71, 0.15); }
.bb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--steel-2); background: rgba(255, 255, 255, 0.02); }
.bb-toolbar button { min-width: 32px; height: 32px; padding: 0 8px; border: 0; background: none; color: var(--bone-2); font-weight: 700; border-radius: 3px; }
.bb-toolbar button:hover { background: rgba(214, 165, 71, 0.12); color: var(--brass-hi); }
.bb-toolbar select { width: auto; min-height: 32px; padding: 3px 30px 3px 8px; font-size: var(--fs-sm); }
.smiley-strip { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.smiley-strip button { min-width: 30px; padding: 0 4px; }
.smiley-strip img { width: 20px; height: 20px; object-fit: contain; }
.bb-editor textarea { border: 0; border-radius: 0; background: transparent; min-height: 150px; }
.bb-editor textarea:focus { box-shadow: none; }

/* ------------------------------------------------------------------------------ gallery */

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-3); }
.media-card { position: relative; display: block; padding: 0; border: 0; background: var(--gunmetal); color: var(--bone); text-align: left; overflow: hidden; cursor: zoom-in; }
.media-frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: repeating-linear-gradient(45deg, #151c1e 0 10px, #11181a 10px 20px); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out), filter var(--t-med); filter: saturate(0.9); }
.media-frame.is-missing::after { content: 'Bild fehlt'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--smoke-2); font: 600 0.8rem var(--font-hud); letter-spacing: 0.1em; text-transform: uppercase; }
.media-card:hover .media-frame img { transform: scale(1.06); filter: saturate(1.05); }
.media-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; background: linear-gradient(0deg, rgba(8, 11, 12, 0.95), transparent); }
.media-caption h3 { font-size: 0.95rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-caption .meta-line { font-size: 0.78rem; gap: 2px 10px; }
.media-card::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--line-steel); transition: box-shadow var(--t-fast); pointer-events: none; }
.media-card:hover::after { box-shadow: inset 0 0 0 1px var(--brass); }

.lightbox .modal-frame { max-width: min(1200px, 96vw); }
.lightbox-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-5); }
.lightbox-image { display: grid; place-items: center; background: #050708; min-height: 300px; }
.lightbox-image img { max-height: 72vh; width: auto; object-fit: contain; }
.lightbox-side { display: grid; align-content: start; gap: var(--sp-4); min-width: 0; }
.rating-stars { display: flex; gap: 2px; }
.rating-stars button { width: 28px; height: 28px; padding: 0; border: 0; background: none; color: var(--steel-3); }
.rating-stars button .icon { width: 22px; height: 22px; }
.rating-stars button.is-on, .rating-stars button:hover, .rating-stars button:hover ~ button { color: var(--brass-hi); }
.rating-stars:hover button { color: var(--brass-hi); }
.rating-stars button:hover ~ button { color: var(--steel-3); }
.rating-stars button.is-on .icon, .rating-stars:hover button .icon { fill: currentColor; }
.rating-stars button:hover ~ button .icon { fill: none; }

/* ------------------------------------------------------------------------------ comments, guestbook, shoutbox archive */

.comment-list { display: grid; gap: var(--sp-3); }
.comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: var(--sp-3); border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.015); }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-sm); color: var(--smoke); }
.comment-body { margin-top: 4px; color: var(--bone-2); overflow-wrap: anywhere; }
.comment-actions { margin-left: auto; display: flex; gap: 2px; }
.comment-form { display: grid; gap: var(--sp-3); }

.guestbook-stream { display: grid; gap: var(--sp-4); }
.guestbook-entry { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-4); border: 1px solid var(--line-steel); background: linear-gradient(180deg, rgba(24, 33, 36, 0.7), rgba(17, 23, 25, 0.85)); }
.guestbook-entry .avatar { --size: 56px; }
.guestbook-author-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-sm); color: var(--smoke); }
.guestbook-content h3 { margin: 6px 0; }
.guestbook-content .legacy-text { color: var(--bone-2); }
.entry-actions { display: flex; justify-content: flex-end; gap: 2px; margin-top: 8px; }

.shout-stream { display: grid; gap: 2px; }
.shout-stream .shout-item { grid-template-columns: 44px minmax(0, 1fr); padding: 12px; border-bottom: 1px solid var(--line-steel); }
.shout-stream .shout-item .avatar { --size: 44px; }
.composer { display: grid; gap: var(--sp-3); }

/* ------------------------------------------------------------------------------ news / article */

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-4); }
.article-card { display: grid; gap: 6px; align-content: start; }
.article-card h3 { font-size: 1.15rem; }
.article-detail { max-width: 78ch; }
.article-body { font-size: 1.06rem; line-height: 1.7; color: var(--bone-2); }
.rating-box { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }

/* ------------------------------------------------------------------------------ wars, faq, polls, toplist, stats, downloads, archive */

.war-timeline { display: grid; gap: 6px; }
.war-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); }
.war-versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sp-4); text-align: center; }
.war-versus strong { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.6rem, 2vw + 1rem, 2.6rem); line-height: 1; }
.war-versus .score { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.6rem, 4vw + 1rem, 4.4rem); color: var(--brass-hi); font-variant-numeric: tabular-nums; }
.map-results { display: grid; gap: 6px; }
.map-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 12px; background: rgba(255, 255, 255, 0.03); border-left: 3px solid var(--steel-3); }
.map-result.win { border-left-color: var(--signal); }
.map-result.loss { border-left-color: var(--danger); }
.map-result b { font-family: var(--font-display); font-size: 1.2rem; }

.faq-list { display: grid; gap: var(--sp-2); }
.faq-item { border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4); cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--brass); transition: transform var(--t-fast); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item[open] { border-color: var(--line); }
.faq-item .faq-answer { padding: 0 var(--sp-4) var(--sp-4); color: var(--bone-2); }

.toplist { display: grid; gap: 6px; }
.toplist-row { display: grid; grid-template-columns: 40px 180px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-steel); color: var(--bone); text-decoration: none; }
.toplist-row:hover { border-color: var(--line-strong); color: var(--bone); }
.toplist-row > b { font-family: var(--font-display); font-size: 1.4rem; color: var(--brass); text-align: center; }
.toplist-banner { display: grid; place-items: center; height: 40px; overflow: hidden; background: rgba(255, 255, 255, 0.04); color: var(--smoke-2); font-family: var(--font-display); font-weight: 800; }
.toplist-banner img { max-height: 40px; width: 100%; object-fit: contain; }
.toplist-row small { display: block; color: var(--smoke); }
.toplist-row em { font-style: normal; color: var(--smoke); font-size: var(--fs-sm); white-space: nowrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-3); }
.stat-tile { padding: var(--sp-4); border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); }
.stat-tile strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1; }
.stat-tile span { color: var(--smoke); font-size: var(--fs-sm); }
.timeline-chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 3px; height: 180px; padding-top: 10px; }
.timeline-chart .bar { position: relative; height: var(--bar); min-height: 3px; background: linear-gradient(180deg, var(--brass-hi), var(--brass-lo)); transform-origin: bottom; animation: bar-grow 900ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 18ms); }
.timeline-chart .bar:hover { background: var(--brass-hi); }
.timeline-chart .bar .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 7px; background: var(--ink); border: 1px solid var(--line); font-size: 0.75rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--t-fast); z-index: 2; }
.timeline-chart .bar:hover .tip { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--fs-xs); color: var(--smoke-2); }
.top-bars { display: grid; gap: 8px; }
.top-bar { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; overflow: hidden; }
.top-bar::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--bar); background: rgba(214, 165, 71, 0.12); border-right: 2px solid var(--brass); }
.top-bar > * { position: relative; }
.top-bar span { font: 600 0.75rem var(--font-hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--smoke); }
.top-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.top-bar b { font-family: var(--font-display); font-size: 1.15rem; }
.activity-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-steel); font-size: var(--fs-sm); }
.activity-row span { font: 600 0.75rem var(--font-hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }
.activity-row small { color: var(--smoke); }

.download-list { display: grid; gap: var(--sp-3); }
.download-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--sp-4); align-items: center; padding: var(--sp-4); border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); }
.download-row:hover { border-color: var(--line); }
.download-icon { display: grid; place-items: center; width: 52px; height: 52px; color: var(--brass); background: rgba(214, 165, 71, 0.08); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.download-icon .icon { width: 24px; height: 24px; }
.download-row h3 a { color: var(--bone); text-decoration: none; }
.download-row h3 a:hover { color: var(--brass-hi); }
.download-row p { color: var(--smoke); font-size: var(--fs-sm); margin: 4px 0 0; }

.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3); }
.archive-tile { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: var(--sp-4); border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); color: var(--bone); text-align: left; text-decoration: none; transition: border-color var(--t-fast), background var(--t-fast); }
.archive-tile .icon { grid-row: span 2; width: 44px; height: 44px; padding: 10px; color: var(--brass); background: rgba(214, 165, 71, 0.08); }
.archive-tile strong { font-size: 1.05rem; }
.archive-tile span { color: var(--smoke); font-size: var(--fs-sm); }
.archive-tile:hover { border-color: var(--line-strong); background: rgba(214, 165, 71, 0.05); color: var(--bone); }

/* ------------------------------------------------------------------------------ users / profile / games */

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-3); }
.member-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); color: var(--bone); text-decoration: none; transition: border-color var(--t-fast), transform var(--t-med) var(--ease-out); }
.member-card:hover { border-color: var(--line-strong); transform: translateY(-2px); color: var(--bone); }
.member-card .avatar { --size: 52px; }
.member-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-card small { color: var(--smoke); }
.member-card.status-admin { border-left: 2px solid var(--brass); }
.member-card.status-mod { border-left: 2px solid var(--mod); }
.member-card.status-vip { border-left: 2px solid var(--vip); }
.member-card.status-member { border-left: 2px solid rgba(141, 191, 107, 0.6); }

.profile-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-5); align-items: center; }
.profile-hero .avatar { --size: 120px; box-shadow: 0 0 0 2px var(--brass), 0 20px 40px -12px rgba(0, 0, 0, 0.8); }
.profile-hero h1 { font-size: clamp(2rem, 3vw + 1rem, 3.4rem); line-height: 1; }
.profile-hero blockquote { margin: 10px 0 0; color: var(--bone-2); font-style: italic; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.profile-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
.profile-stat { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); }
.profile-stat strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1; }
.profile-stat span { display: block; color: var(--bone-2); font-size: var(--fs-sm); margin-top: 4px; }
.profile-stat small { color: var(--smoke-2); }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: var(--sp-5); }
.profile-content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.profile-side dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: var(--fs-sm); }
.profile-side dt { color: var(--smoke); }
.profile-side dd { margin: 0; overflow-wrap: anywhere; }
.profile-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.profile-section-list, .profile-gallery-strip, .profile-game-strip { display: grid; gap: 6px; }
.profile-section-list.is-scrollable { max-height: 460px; overflow-y: auto; }
.profile-gallery-strip { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.profile-game-strip { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.profile-row { display: grid; gap: 2px; padding: 9px 10px; border-left: 2px solid var(--steel-3); background: rgba(255, 255, 255, 0.02); color: var(--bone); text-decoration: none; }
.profile-row:hover { border-left-color: var(--brass); color: var(--bone); }
.profile-row span { color: var(--bone-2); font-size: var(--fs-sm); }
.profile-row small { color: var(--smoke-2); }
.profile-shot, .profile-game { display: grid; gap: 4px; color: var(--bone); text-decoration: none; font-size: var(--fs-sm); }
.profile-shot > div, .profile-game > div { aspect-ratio: 4 / 3; overflow: hidden; background: var(--steel); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: var(--smoke); }
.profile-shot img, .profile-game img { width: 100%; height: 100%; object-fit: cover; }
.profile-game.favorite > div { box-shadow: inset 0 0 0 2px var(--brass); }
.activity-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-steel); }
.activity-item > span { font: 600 0.75rem var(--font-hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); padding-top: 3px; }
.activity-link { color: var(--bone); text-decoration: none; min-width: 0; }
.activity-link strong { display: block; }
.activity-link p { color: var(--bone-2); font-size: var(--fs-sm); margin: 2px 0; }
.activity-link small { color: var(--smoke-2); }
.activity-item > b { font-family: var(--font-display); }
.signal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.social-links { display: grid; gap: 6px; }
.social-links a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; background: rgba(255, 255, 255, 0.03); color: var(--bone); text-decoration: none; font-size: var(--fs-sm); }
.social-links a span { color: var(--brass); text-transform: capitalize; }
.social-links a strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

.profile-editor { display: grid; gap: var(--sp-5); }
.avatar-editor { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }
.avatar-editor .avatar { --size: 96px; }
.social-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-3); }
.social-editor .field > div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px; }
.game-picker { display: flex; gap: var(--sp-2); align-items: flex-end; }
.game-picker .field { flex: 1; }
.game-suggestions { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.game-suggestion { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 8px; border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); color: var(--bone); text-align: left; }
.game-suggestion > span { grid-row: span 2; width: 40px; height: 40px; overflow: hidden; display: grid; place-items: center; background: var(--steel); }
.game-suggestion img { width: 100%; height: 100%; object-fit: cover; }
.game-suggestion small { color: var(--smoke); }
.game-suggestion:hover { border-color: var(--brass); }
.game-create { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: end; }
.profile-game-list { display: grid; gap: 6px; }
.profile-game-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 170px auto auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); }
.profile-game-thumb { width: 48px; height: 48px; overflow: hidden; display: grid; place-items: center; background: var(--steel); font-family: var(--font-display); font-weight: 800; }
.profile-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.profile-game-row a { color: var(--bone); text-decoration: none; }
.profile-game-row span { display: block; color: var(--smoke); font-size: var(--fs-sm); }

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-3); }
.game-card { position: relative; display: grid; border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); transition: border-color var(--t-fast); }
.game-card:hover, .game-card:has(input:checked) { border-color: var(--brass); }
.game-card-main { display: grid; gap: 4px; padding: 10px; color: var(--bone); text-decoration: none; }
.game-cover { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(145deg, var(--steel), var(--gunmetal)); font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; color: var(--brass-lo); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-cover.big { width: 220px; aspect-ratio: 16 / 10; }
.game-card-main strong { font-size: 0.98rem; line-height: 1.2; }
.game-card-main small { color: var(--smoke); }
.game-card .check { padding: 0 10px 10px; }
/* Game discovery and instant profile selection. */
.games-review-prompt { display: flex; align-items: center; gap: var(--sp-4); max-width: calc(var(--shell-max) - 2 * var(--gutter)); margin: 0 auto var(--sp-4); padding: var(--sp-4) var(--sp-5); border: 1px solid var(--line-strong); border-radius: 12px; background: linear-gradient(110deg, rgba(214, 165, 71, .1), var(--gunmetal)); }
.games-review-icon { color: var(--brass-hi); display: grid; place-items: center; }
.games-review-icon .icon { width: 30px; height: 30px; }
.games-review-prompt > div { flex: 1; min-width: 0; }
.games-review-prompt p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--bone-2); }
.games-review-prompt strong { color: var(--bone); font-size: var(--fs-lg); }
.game-editor { scroll-margin-top: calc(var(--topbar-h) + var(--sp-4)); border-color: var(--line-strong); border-radius: 12px; }
.game-editor > .muted { margin-top: 0; }
.game-editor .game-picker { align-items: flex-end; gap: var(--sp-3); }
.game-editor .game-search-field { flex: 1 1 240px; }
.game-editor .game-add-status { flex: 0 1 190px; }
.game-editor .game-suggestions { display: grid; grid-template-columns: 1fr; gap: 4px; margin-top: var(--sp-2); max-height: 340px; overflow-y: auto; padding: var(--sp-2); background: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; }
.game-editor .game-suggestions[hidden] { display: none; }
.game-editor .game-suggestion { min-height: 58px; grid-template-columns: 76px minmax(0, 1fr); padding: var(--sp-2); border-radius: 6px; }
.game-editor .game-suggestion > span { width: 76px; height: 40px; border-radius: var(--radius); }
.game-editor .game-suggestion[aria-selected='true'], .game-editor .game-suggestion:focus-visible { border-color: var(--brass-hi); background: rgba(214, 165, 71, .14); outline: none; }
.game-editor .game-suggestion:disabled { opacity: .55; cursor: default; }
.game-picker-feedback { min-height: 1.5em; margin: var(--sp-2) 0 var(--sp-4); color: var(--brass-hi); font-size: var(--fs-sm); }
.game-editor .profile-game-row { border-radius: 8px; grid-template-columns: 62px minmax(110px, 1fr) minmax(140px, 175px) auto 32px; gap: var(--sp-3); padding: var(--sp-3); }
.game-editor .profile-game-thumb { width: 62px; height: 44px; border-radius: var(--radius); }
.profile-game-copy { display: grid; gap: 2px; min-width: 0; }
.profile-game-copy strong { overflow-wrap: anywhere; }
.profile-game-copy small { color: var(--smoke); }
.profile-game-copy [data-game-save-state] { color: var(--brass-hi); font-size: .75rem; }
.game-editor-footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); font-size: var(--fs-sm); }
.game-create-details { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line-steel); }
.game-create-details summary { cursor: pointer; color: var(--smoke); font-size: var(--fs-sm); }
.game-create-details .game-create { margin-top: var(--sp-3); }
.games-discovery { border-radius: 12px; background: linear-gradient(120deg, rgba(214, 165, 71, .07), var(--gunmetal)); }
.games-catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.games-catalog-heading h2 { margin: var(--sp-1) 0 0; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.games-top-count { font: 800 3rem/1 var(--font-display); color: var(--brass-hi); text-align: right; }
.games-top-count small { display: block; font: 500 .8rem/1.4 var(--font-body); color: var(--smoke); }
.games-discovery [data-steam-snapshot] { margin: var(--sp-2) 0 var(--sp-5); font-size: var(--fs-sm); }
.games-discovery [data-steam-snapshot] a { color: var(--bone-2); text-underline-offset: 3px; }
.games-catalog-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.games-catalog-tools > .field { flex: 1 1 200px; max-width: 340px; }
.games-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.games-filters [aria-pressed='true'] { color: var(--brass-hi); border-color: var(--brass); background: rgba(214, 165, 71, .12); }
.games-result-count { margin-bottom: 0; font-size: var(--fs-sm); }
.games-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: var(--sp-4); }
.game-card { border-radius: 10px; overflow: hidden; grid-template-rows: 1fr auto; min-width: 0; background: var(--gunmetal); }
.game-card[hidden] { display: none; }
.game-card-main { padding: var(--sp-3); gap: var(--sp-2); align-content: start; }
.game-card-main .game-cover { position: relative; aspect-ratio: 460 / 215; border-radius: 6px; }
.game-card-main strong { line-height: 1.3; overflow-wrap: anywhere; }
.game-card-main small { font-size: .78rem; }
.game-card-main .steam-players { color: var(--brass-hi); }
.steam-rank { position: absolute; left: 7px; top: 7px; padding: 3px 7px; background: rgba(11, 15, 16, .92); border: 1px solid var(--line-strong); border-radius: var(--radius); font: 700 .85rem/1.2 var(--font-hud); color: var(--brass-hi); }
.game-card-actions { display: grid; gap: var(--sp-3); padding: 0 var(--sp-3) var(--sp-3); }
.game-card-actions .check { padding: 0; font-size: .8rem; }
.game-card-actions .btn { width: 100%; justify-content: center; font-size: .8rem; }
.game-card[data-owned='true'] { border-color: var(--line-strong); }
.games-match-panel { border-radius: 10px; }
.games-match-panel .match-results > p { margin: 0; font-size: var(--fs-sm); }
.game-hero { display: flex; flex-wrap: wrap; gap: var(--sp-5); align-items: center; }
.game-hero .admin-actions { margin-top: var(--sp-4); }
@media (max-width: 900px) {
  .games-review-prompt { margin-left: var(--gutter); margin-right: var(--gutter); flex-wrap: wrap; }
  .games-review-prompt > div { flex-basis: calc(100% - 70px); }
  .game-editor .profile-game-row { grid-template-columns: 50px minmax(0, 1fr) 32px; }
  .game-editor .profile-game-thumb { width: 50px; height: 40px; }
  .game-editor [data-game-remove] { grid-column: 3; grid-row: 1; }
  .game-editor [data-game-play-status] { grid-column: 2 / -1; }
  .game-editor .profile-game-row .check { grid-column: 2 / -1; }
  .game-editor .game-create { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .game-card-main { padding: var(--sp-2); }
  .game-card-actions { padding: 0 var(--sp-2) var(--sp-3); }
  .game-card-actions .btn { padding-left: 6px; padding-right: 6px; }
  .game-editor .game-picker { flex-wrap: wrap; }
  .game-editor .game-search-field { flex-basis: 100%; }
  .game-editor .game-add-status { flex: 1; }
  .game-editor .panel-head { align-items: flex-start; flex-direction: column; gap: var(--sp-3); }
  .game-editor .game-create { grid-template-columns: 1fr; }
  .games-catalog-tools > .field { max-width: none; flex-basis: 100%; }
  .games-review-prompt { padding: var(--sp-3); gap: var(--sp-3); }
}
.match-panel { display: grid; gap: var(--sp-3); }
.match-user-list { display: grid; gap: 6px; }
.match-user { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; background: rgba(255, 255, 255, 0.025); color: var(--bone); text-decoration: none; }
.match-user:hover { background: rgba(214, 165, 71, 0.06); color: var(--bone); }
.match-user small { display: block; color: var(--smoke); }

/* ------------------------------------------------------------------------------ voice */

.voice-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.voice-channels { display: grid; gap: var(--sp-3); position: sticky; top: calc(var(--topbar-h) + 16px); }
.voice-channel {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line-steel);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.voice-channel.is-current { border-color: var(--signal); background: rgba(141, 191, 107, 0.06); }
.voice-channel-head { display: flex; align-items: center; gap: 10px; }
.voice-channel-head .icon { color: var(--brass); width: 18px; height: 18px; }
.voice-channel-head button.join { flex: 1; display: grid; text-align: left; padding: 0; border: 0; background: none; color: var(--bone); min-width: 0; }
.voice-channel-head button.join strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-channel-head button.join small { color: var(--smoke); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-channel-head button.join:hover strong { color: var(--brass-hi); }
.voice-channel .count { font: 600 0.8rem var(--font-hud); color: var(--smoke); white-space: nowrap; }
.voice-members { display: grid; gap: 2px; padding-left: 28px; }
.voice-member { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--bone-2); }
.voice-member .avatar { --size: 22px; }
.voice-member .icon { width: 14px; height: 14px; color: var(--danger); }

.voice-room { display: grid; gap: var(--sp-5); }
.voice-stage {
  position: relative;
  min-height: 360px;
  padding: var(--sp-6) var(--sp-5);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-5);
  align-content: center;
  justify-items: center;
}
.voice-stage.is-empty { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.voice-tile { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; width: 150px; }
.voice-tile .avatar { --size: 104px; border-radius: 50%; box-shadow: 0 0 0 3px var(--steel-2); transition: box-shadow var(--t-fast), transform var(--t-fast); }
.voice-tile .ring { position: absolute; top: -8px; left: 50%; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%; border: 3px solid var(--signal); opacity: 0; transform: scale(0.9); transition: opacity var(--t-fast), transform var(--t-fast); pointer-events: none; }
.voice-tile.is-speaking .ring { opacity: 1; transform: scale(1); animation: speak-ring 1.1s var(--ease-out) infinite; }
.voice-tile.is-speaking .avatar { box-shadow: 0 0 0 3px var(--signal), 0 0 40px -6px rgba(141, 191, 107, 0.8); }
.voice-tile strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-tile .voice-flags { display: flex; gap: 6px; min-height: 18px; color: var(--danger); }
.voice-tile .voice-flags .icon { width: 18px; height: 18px; }
.voice-tile .voice-state { font: 600 0.72rem var(--font-hud); letter-spacing: 0.08em; text-transform: uppercase; color: var(--smoke-2); }
.voice-tile.is-connecting .avatar { opacity: 0.55; }
.voice-tile input[type='range'] { width: 110px; accent-color: var(--brass); }
.voice-controls { position: sticky; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); padding: var(--sp-3); background: rgba(11, 15, 16, 0.9); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.voice-controls .btn.is-off { background: rgba(216, 96, 78, 0.25); color: #ffc5bb; }
.voice-meter { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--smoke); }
.voice-meter .level { width: 120px; height: 6px; background: var(--steel-2); overflow: hidden; }
.voice-meter .level i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--signal), var(--brass-hi)); transition: width 80ms linear; }
.voice-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3); }
.voice-hint { display: grid; gap: 8px; max-width: 60ch; }
.voice-hint h2 { font-size: 2rem; }

.voice-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  background: rgba(11, 15, 16, 0.94);
  border: 1px solid rgba(141, 191, 107, 0.45);
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(10px);
  animation: rise-in var(--t-med) var(--ease-out) both;
}
.voice-dock a { color: var(--bone); text-decoration: none; display: grid; line-height: 1.15; }
.voice-dock a small { color: var(--signal); font: 600 0.72rem var(--font-hud); letter-spacing: 0.08em; text-transform: uppercase; }
.voice-dock .icon-button.is-off { color: var(--danger); }

/* ------------------------------------------------------------------------------ admin */

.admin-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-3); }
.admin-kpi { padding: var(--sp-4); border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); }
.admin-kpi span { display: flex; align-items: center; gap: 6px; color: var(--smoke); font-size: var(--fs-sm); }
.admin-kpi span .icon { color: var(--brass); width: 16px; height: 16px; }
.admin-kpi strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; line-height: 1.1; }
.admin-kpi small { color: var(--smoke-2); }
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.admin-nav { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: 2px; padding: var(--sp-3); }
.admin-nav button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; color: var(--bone-2); text-align: left; border-radius: 3px; font-weight: 500; }
.admin-nav button .icon { width: 18px; height: 18px; color: var(--smoke); }
.admin-nav button:hover { background: rgba(255, 255, 255, 0.04); color: var(--bone); }
.admin-nav button[aria-selected='true'] { background: rgba(214, 165, 71, 0.12); color: var(--brass-hi); }
.admin-nav button[aria-selected='true'] .icon { color: var(--brass-hi); }
.admin-nav .badge { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 10px; background: var(--ember); color: #fff; font: 700 0.75rem var(--font-hud); text-align: center; }
.admin-nav hr { margin: 6px 0; }
.admin-editor { display: grid; gap: var(--sp-4); min-width: 0; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line-steel); }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.admin-table th { position: sticky; top: 0; padding: 10px 12px; background: var(--gunmetal-2); color: var(--smoke); font: 600 0.78rem var(--font-hud); letter-spacing: 0.08em; text-transform: uppercase; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-steel); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(214, 165, 71, 0.03); }
.admin-table td.actions { text-align: right; white-space: nowrap; }
.admin-table .cell-user { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.admin-table .cell-user .avatar { --size: 30px; }
.admin-table .cell-user small { display: block; color: var(--smoke-2); }
.admin-table select, .admin-table input { min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: var(--fs-sm); }
.admin-table tr.saved td { animation: saved-flash 1.2s var(--ease-out); }
.admin-edit-list { display: grid; gap: var(--sp-3); }
.admin-edit-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; align-items: center; padding: var(--sp-3); border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); }
.admin-edit-row textarea { grid-column: 1 / -1; }
.admin-edit-row.saved { animation: saved-flash 1.2s var(--ease-out); }
.admin-edit-row.warning { border-color: rgba(240, 179, 107, 0.4); }
.admin-edit-row.is-marked { opacity: 0.6; border-style: dashed; }
.admin-row-title { grid-column: 1 / -1; font-weight: 600; }
.audit-list { display: grid; gap: 2px; }
.audit-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; background: rgba(255, 255, 255, 0.02); font-size: var(--fs-sm); border: 0; color: var(--bone); text-align: left; width: 100%; }
.audit-row span { color: var(--smoke); }
.mail-admin { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-5); }
.mail-controls { display: grid; gap: var(--sp-3); }
.mail-preview { display: grid; gap: var(--sp-3); align-content: start; padding: var(--sp-4); border: 1px solid var(--line-steel); background: rgba(0, 0, 0, 0.2); font-size: var(--fs-sm); }
.toplist-status.state-ok { color: var(--signal); }
.toplist-status.state-down { color: var(--danger); }
.toplist-status.state-unknown { color: var(--smoke); }

/* ------------------------------------------------------------------------------ dialogs, toasts */

dialog { padding: 0; border: 0; background: transparent; color: var(--bone); max-width: 100vw; max-height: 100vh; }
dialog::backdrop { background: rgba(3, 5, 6, 0.72); backdrop-filter: blur(4px); }
dialog[open] { animation: dialog-in var(--t-med) var(--ease-out); }
.modal-frame, .compose-panel, .login-panel {
  --pc: 16px;
  position: relative;
  width: min(560px, 94vw);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #172023, #0f1517);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-deep);
  clip-path: polygon(var(--pc) 0, 100% 0, 100% calc(100% - var(--pc)), calc(100% - var(--pc)) 100%, 0 100%, 0 var(--pc));
}
.modal-small .modal-frame { width: min(420px, 94vw); }
.modal-medium .modal-frame { width: min(720px, 94vw); }
.modal-large .modal-frame { width: min(1040px, 96vw); }
.modal-head, .compose-panel > header, .login-panel > header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); }
.modal-head h2, .compose-panel > header strong, .login-panel > header strong { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; }
.modal-body { padding: var(--sp-5); overflow-y: auto; display: grid; gap: var(--sp-4); }
.modal-intro { color: var(--bone-2); }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line); }
.compose-panel, .login-panel { margin: 0; }
.compose-panel { width: min(820px, 96vw); }
.compose-panel > :not(header) { margin: 0 var(--sp-5); }
.compose-panel > :nth-child(2) { margin-top: var(--sp-5); }
.compose-panel > :last-child { margin-bottom: var(--sp-5); }
.compose-panel { gap: var(--sp-3); overflow-y: auto; }
.login-panel { gap: var(--sp-4); overflow-y: auto; }
.login-panel > :not(header) { margin: 0 var(--sp-5); }
.login-panel > :last-child { margin-bottom: var(--sp-5); }
.login-panel label { display: grid; gap: 6px; }
.login-panel label > span:first-child { font-size: var(--fs-sm); color: var(--bone-2); }
.login-panel p { color: var(--smoke); font-size: var(--fs-sm); }
.login-hero { display: flex; align-items: center; gap: var(--sp-4); }
.login-hero img { width: 72px; height: 72px; }
.password-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.password-control button { padding: 0 12px; border: 1px solid var(--steel-3); background: var(--steel); color: var(--bone-2); border-radius: var(--radius); font-size: var(--fs-sm); }
.poll-composer summary { cursor: pointer; color: var(--brass-hi); padding: 6px 0; }
.poll-composer { display: grid; gap: 8px; }

.toast-host { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 300; display: grid; gap: 8px; transform: translateX(-50%); width: min(460px, 92vw); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; background: rgba(15, 21, 23, 0.97); border: 1px solid var(--line); border-left: 3px solid var(--brass); box-shadow: var(--shadow-deep); pointer-events: auto; cursor: pointer; opacity: 0; transform: translateY(12px); transition: opacity var(--t-med), transform var(--t-med) var(--ease-out); }
.toast.is-in { opacity: 1; transform: none; }
.toast .icon { color: var(--brass); margin-top: 2px; }
.toast-success { border-left-color: var(--signal); }
.toast-success .icon { color: var(--signal); }
.toast-error { border-left-color: var(--danger); }
.toast-error .icon { color: var(--danger); }

/* command palette */
.palette .modal-frame { width: min(680px, 94vw); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 4px 4px 12px; border-bottom: 1px solid var(--line); }
.palette-input .icon { color: var(--brass); width: 22px; height: 22px; }
.palette-input input { border: 0; background: transparent; font-size: 1.2rem; min-height: 44px; }
.palette-input input:focus { box-shadow: none; background: transparent; }
.palette-results { display: grid; gap: 2px; max-height: 56vh; overflow-y: auto; }
.palette-group { font: 600 0.75rem var(--font-hud); letter-spacing: 0.1em; text-transform: uppercase; color: var(--smoke-2); padding: 10px 8px 4px; }
.palette-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 8px; border: 0; background: none; color: var(--bone); text-align: left; border-radius: 3px; width: 100%; text-decoration: none; }
.palette-item .icon { color: var(--brass); }
.palette-item small { color: var(--smoke); font-size: var(--fs-xs); }
.palette-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item:hover, .palette-item.is-active { background: rgba(214, 165, 71, 0.1); color: var(--bone); }

/* ------------------------------------------------------------------------------ legacy content */

.legacy-text, .signature, .comment-body, .message-text, .forum-post-body, .shout-text, .guestbook-content, .article-body, .faq-answer, .report-target { overflow-wrap: anywhere; min-width: 0; }
.signature a, .legacy-text a, .comment-body a, .message-text a { overflow-wrap: anywhere; word-break: break-word; }
.legacy-text img, .signature img { max-width: 100%; height: auto; }
.legacy-text a { word-break: break-word; }
.legacy-text blockquote, .forum-post-body blockquote { margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--brass-lo); background: rgba(255, 255, 255, 0.03); color: var(--bone-2); }
.legacy-text blockquote cite { display: block; font-style: normal; font-weight: 600; color: var(--brass); margin-bottom: 4px; }
.legacy-text pre { overflow-x: auto; padding: 12px; background: #06090a; border: 1px solid var(--steel-2); }
.legacy-text code { font-family: ui-monospace, 'Cascadia Code', monospace; font-size: 0.9em; }
.legacy-inline-image { display: inline-block; max-width: min(100%, 640px); max-height: 520px; width: auto; vertical-align: middle; margin: 6px 0; border: 1px solid var(--steel-2); }
.smiley { display: inline-block !important; vertical-align: -4px; max-height: 32px; width: auto; }
.legacy-media { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 4px 8px; border: 1px dashed var(--steel-3); background: rgba(255, 255, 255, 0.02); font-size: var(--fs-sm); max-width: 100%; }
.legacy-media-label { color: var(--smoke); }
.legacy-media-link { color: var(--smoke-2); overflow-wrap: anywhere; }
.bb-video { display: block; max-width: 640px; aspect-ratio: 16 / 9; margin: 10px 0; }
.bb-video iframe { width: 100%; height: 100%; border: 0; }
.bb-klapp { margin: 8px 0; border: 1px solid var(--steel-2); }
.bb-klapp summary { padding: 8px 12px; cursor: pointer; color: var(--brass-hi); background: rgba(255, 255, 255, 0.02); }
.bb-klapp > div { padding: 10px 12px; }
.bb-list { margin: 6px 0; padding-left: 1.4em; }
.bb-hr { margin: 12px 0; }
.bb-h { display: block; margin: 1.2em 0 .45em; font-family: var(--font-display); line-height: 1.25; text-transform: uppercase; }
.legacy-text > .bb-h:first-child { margin-top: 0; }
.legacy-text p { margin: 0 0 1em; }
.legacy-text .bb-list { margin-bottom: 1em; }
.legacy-text .bb-list li + li { margin-top: .35em; }
.bb-h1 { font-size: 1.8rem; }
.bb-h2 { font-size: 1.55rem; }
.bb-h3 { font-size: 1.3rem; }
.bb-h4, .bb-h5, .bb-h6 { font-size: 1.1rem; }
.bb-big { font-size: 1.3em; }
.bb-colored { color: var(--bb-color); }
.bb-color.bb-red { color: #ff8a7a; }
.bb-color.bb-green { color: #a6d88a; }
.bb-color.bb-blue { color: #8fc2ea; }
.bb-color.bb-yellow { color: #f4dc7a; }
.bb-color.bb-orange { color: #f3a56a; }
.bb-color.bb-purple { color: #c9a8f2; }
.bb-color.bb-gray { color: var(--smoke); }
.align-center { display: block; text-align: center; }
.align-right { display: block; text-align: right; }
.align-left { display: block; text-align: left; }
.align-justify { display: block; text-align: justify; }

/* ------------------------------------------------------------------------------ motion */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes word-up { to { transform: translateY(0); } }
@keyframes draw-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes stamp-in { 0% { opacity: 0; transform: scale(1.8) rotate(-12deg); } 60% { opacity: 1; transform: scale(0.94) rotate(2deg); } 100% { transform: none; } }
@keyframes hero-zoom { from { transform: scale(1.1); } to { transform: scale(1); } }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(227, 106, 46, 0.7); } 70% { box-shadow: 0 0 0 8px rgba(227, 106, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(227, 106, 46, 0); } }
@keyframes scroll-hint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes speak-ring { 0% { box-shadow: 0 0 0 0 rgba(141, 191, 107, 0.6); } 100% { box-shadow: 0 0 0 16px rgba(141, 191, 107, 0); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes shout-in { from { opacity: 0; transform: translateX(-10px); background: rgba(214, 165, 71, 0.18); } to { opacity: 1; transform: none; } }
@keyframes saved-flash { 0% { background: rgba(141, 191, 107, 0.25); } 100% { background: transparent; } }
@keyframes highlight-pulse { 0%, 100% { box-shadow: 0 0 0 1px var(--brass), 0 0 40px -10px rgba(214, 165, 71, 0.6); } 50% { box-shadow: 0 0 0 1px var(--brass-hi), 0 0 60px -6px rgba(214, 165, 71, 0.9); } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; }
::view-transition-old(main-view) { animation: 180ms var(--ease-in-out) both vt-out; }
::view-transition-new(main-view) { animation: 320ms var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
.content { view-transition-name: main-view; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .word > span { transform: none; }
  .hero-embers { display: none; }
}

/* ------------------------------------------------------------------------------ responsive */

@media (max-width: 1480px) {
  .search-trigger { min-width: 0; width: 40px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .topbar .user-chip { max-width: 170px; }
}

@media (max-width: 1360px) {
  .nav-link { padding: 0 9px; }
  .brand-word small { display: none; }
  .home-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 0.9fr); }
  .home-board > .span-3 { grid-column: span 2; }
  .home-board > .side { grid-column: 3; }
}

@media (max-width: 1200px) {
  :root { --rail-w: 300px; }
  .admin-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .forum-channel .channel-last { display: none; }
}

@media (max-width: 1080px) {
  :root { --topbar-h: 60px; }
  .mainnav, .search-trigger, .topbar .user-chip > span:not(.avatar) { display: none; }
  .topbar .user-chip { padding: 0 4px; border-color: transparent; background: none; }
  .voice-layout:has(.voice-controls) .voice-room { order: -1; }
  .menu-toggle { display: inline-grid; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .shout-rail { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-hud { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .home-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .home-board > .span-3, .home-board > .span-2, .home-board > .span-4 { grid-column: 1 / -1; }
  .home-board > .side { grid-column: 1 / -1; grid-row: auto; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .news-feature, .profile-layout, .war-detail-grid, .mail-admin, .lightbox-body { grid-template-columns: minmax(0, 1fr); }
  .voice-layout, .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .voice-channels, .admin-nav { position: static; }
  .admin-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .admin-nav hr { display: none; }
  .forum-stats-grid { grid-template-columns: minmax(0, 1fr); }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 65;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(11, 15, 16, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }
  .tabbar button, .tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 9px 4px 8px; border: 0; background: none; color: var(--smoke); font: 600 0.72rem var(--font-hud); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar [aria-current='page'] { color: var(--brass-hi); }
  .tabbar [aria-current='page']::before { content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: var(--brass); box-shadow: 0 0 10px var(--brass); }
  .tabbar .tab-dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--ink); }
  .app-shell { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .voice-dock { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .toast-host { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .voice-controls { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

@media (max-width: 760px) {
  :root { --cut: 10px; }
  body { font-size: 0.98rem; }
  .brand-word small { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .hero { min-height: 0; }
  .hero-inner { padding-top: var(--sp-7); padding-bottom: var(--sp-6); }
  .hero-title { font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero-scroll { display: none; }
  .ticker-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ticker-item:nth-child(4), .ticker-item:nth-child(5) { display: none; }
  .ticker-item { padding: var(--sp-3) var(--sp-2); }
  .home-board { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: var(--sp-4); }
  .feed-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; }
  .feed-row .avatar { --size: 36px; }
  .feed-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .score-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .score-row .outcome { display: none; }
  .forum-channel { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 12px 4px; }
  .channel-icon { width: 36px; height: 36px; }
  .thread-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .thread-row .thread-icon, .thread-row .thread-last { display: none; }
  .thread-metrics { gap: 10px; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .post-author { grid-template-columns: 44px minmax(0, 1fr) auto; justify-items: start; text-align: left; align-items: center; border-right: 0; border-bottom: 1px solid var(--line-steel); padding: 10px var(--sp-3); }
  .post-author .avatar { --size: 44px; }
  .post-author .user-link { justify-content: flex-start; }
  .post-author .author-stats { display: none; }
  .forum-post-body { padding: var(--sp-3); }
  .guestbook-entry { grid-template-columns: minmax(0, 1fr); }
  .guestbook-entry .avatar { display: none; }
  .profile-hero { grid-template-columns: auto minmax(0, 1fr); }
  .profile-hero .avatar { --size: 80px; }
  .profile-hero > :last-child { grid-column: 1 / -1; }
  .profile-stat-grid, .admin-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-content-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-game-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .profile-game-row select, .profile-game-row .check { grid-column: 2 / -1; }
  .game-create { grid-template-columns: minmax(0, 1fr); }
  .toplist-row { grid-template-columns: 32px minmax(0, 1fr); }
  .toplist-row .toplist-banner, .toplist-row em { display: none; }
  .download-row { grid-template-columns: 44px minmax(0, 1fr); }
  .download-row > :last-child { grid-column: 1 / -1; }
  .download-icon { width: 44px; height: 44px; }
  .activity-item { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .activity-row { grid-template-columns: minmax(0, 1fr) auto; }
  .activity-row span { display: none; }
  .war-versus strong { font-size: 1.4rem; }
  .voice-stage { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); padding: var(--sp-5) var(--sp-3); gap: var(--sp-4); min-height: 260px; }
  .voice-tile { width: 110px; }
  .voice-tile .avatar { --size: 78px; }
  .voice-tile .ring { width: 94px; height: 94px; margin-left: -47px; }
  .voice-controls .btn span { display: none; }
  .voice-controls .btn { padding: 0 14px; }
  .modal-frame, .compose-panel, .login-panel { width: 100vw; max-height: 92vh; }
  .modal-body { padding: var(--sp-4); }
  .page-hero-inner { padding-top: var(--sp-6); }
  .page-hero-media img { object-position: 78% 50%; opacity: 0.6; }
  .admin-edit-row { grid-template-columns: minmax(0, 1fr); }
  .section-head > .btn, .section-head > .admin-actions { width: 100%; }
  .section-head > .admin-actions .btn { flex: 1; }
  .bb-toolbar .smiley-strip { display: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs .tab { flex: none; }
}

@media (max-width: 420px) {
  .topbar-inner { gap: var(--sp-2); }
  .brand-word strong { font-size: 1.4rem; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .media-caption .meta-line { display: none; }
  .member-grid { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .topbar, .tabbar, .shout-rail, .site-footer, .voice-dock, .hero-embers { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ------------------------------------------------------------------------------ social: badges, notifications, messages, reports */

.has-badge { position: relative; }
.has-badge .badge {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--ember);
  color: #fff;
  font: 700 0.68rem/17px var(--font-hud);
  text-align: center;
  box-shadow: 0 0 0 2px var(--ink);
  animation: badge-pop 400ms var(--ease-out);
}
@keyframes badge-pop { from { transform: scale(0.4); } to { transform: scale(1); } }

.notification-panel .modal-frame { width: min(520px, 96vw); }
.notification-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notification-list { display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; margin: 0 -8px; }
.notification-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 3px; color: var(--bone-2); text-decoration: none; }
.notification-item:hover { background: rgba(214, 165, 71, 0.07); color: var(--bone); }
.notification-item strong { display: block; font-weight: 600; }
.notification-item small { display: block; color: var(--smoke); }
.notification-item.is-unread { background: rgba(214, 165, 71, 0.06); color: var(--bone); }
.notification-item.is-unread strong::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--ember); vertical-align: 2px; }
.notification-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--brass); background: rgba(214, 165, 71, 0.08); border-radius: 3px; }
.notification-icon .avatar { --size: 36px; }
.notification-item .icon-button { opacity: 0; transition: opacity var(--t-fast); }
.notification-item:hover .icon-button, .notification-item:focus-within .icon-button { opacity: 1; }

.messages-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.conversation-list-panel { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: var(--sp-3); }
.conversation-list { display: grid; gap: 2px; max-height: calc(100vh - 260px); overflow-y: auto; }
.conversation-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 8px; border-left: 2px solid transparent; color: var(--bone-2); text-decoration: none; }
.conversation-row:hover { background: rgba(255, 255, 255, 0.03); color: var(--bone); }
.conversation-row.is-active { border-left-color: var(--brass); background: rgba(214, 165, 71, 0.08); color: var(--bone); }
.conversation-row.is-unread strong { color: var(--bone); }
.conversation-row strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-row small { display: block; color: var(--smoke); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-meta { display: grid; justify-items: end; gap: 4px; font-size: var(--fs-xs); color: var(--smoke-2); }
.conversation-meta .unread-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--ember); color: #fff; font: 700 0.72rem/20px var(--font-hud); text-align: center; }
.conversation { display: flex; flex-direction: column; gap: var(--sp-3); min-height: min(70vh, 720px); padding: var(--sp-4); }
.conversation-head { display: flex; align-items: center; gap: 12px; padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); }
.conversation-head > div:nth-child(3) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.conversation-head a { color: var(--bone); text-decoration: none; }
.conversation-head .role-badge { justify-self: start; }
.conversation-back { display: none; }
.message-stream { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: min(58vh, 620px); padding: 4px; }
.message { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; }
.message.mine { align-self: flex-end; flex-direction: row-reverse; }
.message-bubble { padding: 9px 12px 6px; background: var(--steel); border-radius: 12px 12px 12px 3px; color: var(--bone); animation: rise-in 260ms var(--ease-out); }
.message.mine .message-bubble { background: linear-gradient(180deg, rgba(214, 165, 71, 0.28), rgba(214, 165, 71, 0.18)); border-radius: 12px 12px 3px 12px; }
.message.is-deleted .message-bubble { opacity: 0.55; font-style: italic; }
.message-bubble footer { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 2px; font-size: var(--fs-xs); color: var(--smoke); }
.message-bubble footer .icon-button { width: 24px; height: 24px; opacity: 0; }
.message:hover .message-bubble footer .icon-button, .message:focus-within .icon-button { opacity: 1; }
.message-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.message-composer textarea { min-height: 46px; max-height: 180px; }
.recipient-field { position: relative; }
.recipient-results { display: grid; gap: 2px; margin-top: 4px; }
.recipient-option, .recipient-chip { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid var(--line-steel); background: rgba(255, 255, 255, 0.02); color: var(--bone); text-align: left; }
.recipient-option small { display: block; color: var(--smoke); }
.recipient-option:hover { border-color: var(--brass); }
.recipient-chip { border-color: var(--line-strong); }

.report-list { display: grid; gap: var(--sp-3); }
.report-card { display: grid; gap: 10px; padding: var(--sp-4); border: 1px solid var(--line-steel); border-left: 3px solid #f0b36b; background: rgba(255, 255, 255, 0.02); }
.report-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--fs-sm); }
.report-target strong { display: block; }
.report-target blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--steel-3); background: rgba(0, 0, 0, 0.2); color: var(--bone-2); }

@media (max-width: 1080px) {
  .messages-layout { grid-template-columns: minmax(0, 1fr); }
  .messages-layout.has-open .conversation-list-panel { display: none; }
  .messages-layout:not(.has-open) .conversation-panel { display: none; }
  .conversation-list-panel { position: static; }
  .conversation-list { max-height: none; }
  .conversation-back { display: inline-grid; }
  .message { max-width: 92%; }
}

@media (max-width: 760px) {
  .topbar [data-toggle-shout] { display: none; }
  .message-composer .btn span { display: none; }
  .conversation { min-height: 0; }
  .message-stream { max-height: 62vh; }
}
