/* TEAM NATO · HOOLIGANS — single dark theme drawn from the guild crest:
   night ground, bone text, antler bronze, crest red, banner blue. */
/* Fonts: Cinzel, Barlow and Barlow Condensed, self-hosted in public/fonts/ (SIL Open Font License, see fonts/LICENSE.txt).
   Same files, subsets and font-display as Google Fonts served, without the request to Google. */
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/barlow-400-italic-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/barlow-400-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/barlow-400-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-400-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-500-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-600-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-500-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cinzel-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cinzel-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/cinzel-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/cinzel-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/cinzel-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/cinzel-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Inter (variable weight, latin subset) for the organizer dashboard's raid planner; only downloaded when that view renders. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-var-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --ground: #0a090b;
  --ground-2: #110f12;
  --panel: #161317;
  --panel-2: #1d191e;
  --line: #2b2529;
  --line-strong: #40363b;
  --bone: #ede5d8;
  --muted: #b3aa9d;
  --dim: #8d857a;
  --antler: #c49d67;
  --antler-deep: #8a6a42;
  --blood: #c3161f;
  --blood-hi: #e0232d;
  --blood-text: #f0555c;
  --nato: #2b58c9;
  --nato-text: #86a6ff;
  --ok: #7fcf8a;
  --gold: #ffd100;
  --rim: #6e5530;
  --rim-dim: #5b4a33;

  --f-display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --f-body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-label: "Barlow Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px;
  --r-sm: 3px; --r-md: 6px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--bone);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--antler); outline-offset: 3px; }

.page {
  min-height: 100%;
  background:
    radial-gradient(900px 520px at 78% 120px, rgba(43, 88, 201, 0.13), transparent 70%),
    radial-gradient(700px 480px at 12% 40px, rgba(195, 22, 31, 0.09), transparent 70%),
    var(--ground);
}
main, .topbar { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- labels ---------- */
.kicker, .nav, .btn, .hint, .filter button, .tag {
  font-family: var(--f-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker { color: var(--antler); font-weight: 600; font-size: 14px; margin-bottom: var(--s-2); }
.section-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; letter-spacing: 0.02em; }
.lead { color: var(--muted); font-size: 18px; max-width: 62ch; margin-top: var(--s-3); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding-block: var(--s-3);
  background: rgba(10, 9, 11, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  max-width: none;
}
.topbar > * { max-width: var(--max); }
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; min-width: 0; }
.brand-mark { width: 72px; height: auto; mix-blend-mode: lighten; }

.nav { display: flex; align-items: center; gap: var(--s-2); font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; padding: 6px 10px; border-radius: var(--r-sm); color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--bone); }
.nav .nav-cta { color: #fff4dc; background: linear-gradient(180deg, #e3272d, #bd1118 46%, #960a10 54%, #a90e14); border: 1px solid #b08d52; font-family: var(--f-display); text-transform: none; letter-spacing: .02em; font-weight: 700; }
.nav .nav-cta:hover { border-color: #e1bf7a; }

@media (max-width: 560px) {
  .nav a:not(.nav-cta) { display: none; }
  .brand-mark { width: 60px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  font-weight: 700; font-size: 16px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; color: var(--bone); background: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  font-family: var(--f-display); text-transform: none; letter-spacing: .03em; font-weight: 700;
  color: #fff4dc; text-shadow: 0 1px 1px rgba(0,0,0,.6);
  background: linear-gradient(180deg, #e3272d 0%, #bd1118 46%, #960a10 54%, #a90e14 100%);
  border: 2px solid #b08d52; border-radius: 4px;
  box-shadow: 0 0 0 1px #1a0c05, inset 0 1px 0 rgba(255,255,255,.28), inset 0 -3px 6px rgba(0,0,0,.3), 0 8px 22px -12px rgba(195, 22, 31, .9);
}
.btn-primary:hover { background: linear-gradient(180deg, #f0373d 0%, #cf1a21 46%, #a80f15 54%, #bb141a 100%); border-color: #e1bf7a; }
.btn-primary:disabled { opacity: .55; cursor: progress; }
.btn-ghost { border-color: var(--line-strong); color: var(--bone); }
.btn-ghost:hover { border-color: var(--antler); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { color: var(--bone); }

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

@keyframes rise { from { transform: translateY(10px); } to { transform: none; } }

/* ---------- manifesto ---------- */

.manifesto-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); margin-top: var(--s-7); }
.tenet { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-4); border-top: 2px solid var(--antler-deep); }
.tenet h3 { font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: .03em; }
.tenet p { color: var(--muted); }
.tenet-expect { border-top-color: var(--nato); }
.tenet-recruit { border-top-color: var(--blood); }
.tenet-recruit .btn { align-self: flex-start; margin-top: var(--s-2); }
.expect { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.expect li { color: var(--muted); padding-left: 22px; position: relative; }
.expect li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px;
  background: var(--nato-text); transform: rotate(45deg);
}
.expect strong { color: var(--bone); font-weight: 600; }
.recruit-status { display: flex; align-items: center; gap: 10px; font-family: var(--f-label); font-weight: 700; font-size: 20px; letter-spacing: .08em; text-transform: uppercase; color: var(--bone) !important; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(127, 207, 138, .16); }
@media (max-width: 900px) { .manifesto-grid { grid-template-columns: 1fr; gap: var(--s-5); } }

/* ---------- character creator ---------- */
.join { padding-block: var(--s-8) var(--s-7); border-top: 1px solid var(--line); }
.creator {
  margin-top: var(--s-6);
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 250px;
  gap: var(--s-5);
  align-items: start;
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: grid; gap: var(--s-2); min-width: 0; }
.hint { font-weight: 500; font-size: 13px; color: var(--dim); letter-spacing: .05em; text-transform: none; font-family: var(--f-body); }

/* framed controls in the spirit of the in-game UI: dark inset, bronze rim, gold when chosen */
.frame {
  background: linear-gradient(180deg, #221a13, #120d0a);
  border: 2px solid var(--rim);
  border-radius: 4px;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,230,170,.08);
}

/* left: the Horde banner with races */
.banner {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-3) 56px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.28), transparent 18%, transparent 82%, rgba(0,0,0,.28)),
    linear-gradient(180deg, #6a2124, #8a2729 45%, #7c2427);
  border: 2px solid #3f1214;
  border-top: 0;
  box-shadow: inset 0 0 0 1px rgba(255,160,120,.12), 0 18px 40px -20px rgba(0,0,0,.8);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 50% 100%, 0 calc(100% - 40px));
}
.banner-mark { width: 70px; }
.banner-title { font-family: var(--f-display); font-weight: 800; font-size: 18px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: -4px; }
.race-list { display: grid; gap: var(--s-3); width: 100%; justify-items: center; }
.race-btn {
  display: grid; justify-items: center; gap: 4px;
  padding: 0; background: none; border: 0; cursor: pointer;
  font: 700 13px/1.1 var(--f-display); letter-spacing: .03em; color: var(--gold);
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.portrait { --rim: #7a5f36; display: block; width: 92px; height: 92px; overflow: hidden; padding: 0; transition: border-color .12s, box-shadow .12s; }
.portrait img, .slot img, .stage-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.race-btn:hover:not([aria-disabled="true"]) .portrait { --rim: #c9a664; }
.race-btn[aria-checked="true"] .portrait { --rim: #fff0c0; box-shadow: 0 0 0 1px #000, 0 0 0 3px #f3c65a, 0 0 18px 4px rgba(255, 200, 80, .6); }
.race-btn[aria-disabled="true"] { color: #b39b93; cursor: not-allowed; }
.race-btn[aria-disabled="true"] .portrait img { filter: grayscale(1) brightness(.55); }

/* center: the stage (no model, just the choice) */
.stage {
  display: grid; gap: var(--s-5);
  padding: clamp(16px, 2.6vw, 28px);
  background: radial-gradient(120% 80% at 50% 0%, #1b1519, var(--panel) 60%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  min-width: 0;
}
.stage-head { position: relative; text-align: center; padding-block: var(--s-3) var(--s-2); overflow: hidden; }
.stage-icons { display: flex; justify-content: center; gap: 10px; min-height: 0; margin-bottom: var(--s-3); }
.stage-icons:empty { display: none; }
.stage-pic { --rim: #b8955a; display: block; width: 64px; height: 64px; overflow: hidden; }
.stage-race { position: relative; font-family: var(--f-label); font-weight: 600; font-size: 16px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.stage-class { position: relative; font-family: var(--f-display); font-weight: 900; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: .04em; color: var(--ct, var(--bone)); }
.stage-hint { position: relative; color: var(--dim); font-size: 14px; margin-top: var(--s-2); }

.class-bar {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px;
  padding: 10px;
  background: linear-gradient(180deg, #2a1f15, #17110c);
  border: 2px solid #5b4527; border-radius: 4px;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(0,0,0,.7);
}
.class-btn {
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 6px; min-width: 0;
  padding: 0; background: none; border: 0; cursor: pointer;
  font: 700 13px/1.1 var(--f-display); letter-spacing: .02em; color: var(--gold);
}
.class-btn .slot {
  --rim: #6e5530;
  display: block; overflow: hidden; width: 100%; max-width: 62px; aspect-ratio: 1;
  transition: border-color .12s, box-shadow .12s;
}
.class-btn:hover:not([aria-disabled="true"]) .slot { --rim: #b8955a; }
.class-btn[aria-checked="true"] .slot { --rim: #fff0c0; box-shadow: 0 0 0 1px #000, 0 0 0 3px #f3c65a, 0 0 16px 3px rgba(255, 200, 80, .55); }
.class-btn[aria-disabled="true"] { color: #8d857a; cursor: not-allowed; }
.class-btn[aria-disabled="true"] .slot img { filter: grayscale(1) brightness(.5); }
/* a name may run wider than its picture (Cinzel is wide): it stays centered under it and never widens the column.
   Nine in a row leave ~56px per class, so the names are smaller there to keep neighbours apart */
.class-btn .cname { white-space: nowrap; font-size: 11px; letter-spacing: 0; }

.stage-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-family: var(--f-label); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--bone); margin-bottom: var(--s-2); padding: 0; }
.spec-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.spec-btn {
  --rim: #5e4a2c;
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 14px;
  cursor: pointer; color: var(--bone); font: 600 15px var(--f-body);
}
.spec-btn .spec-icon { width: 26px; height: 26px; border: 1px solid #000; border-radius: 2px; box-shadow: 0 0 0 1px #6e5530; }
.spec-btn small { display: inline-flex; align-items: center; gap: 4px; font: 600 12px var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.role-icon { width: 16px; height: 16px; flex: none; }

.spec-btn:hover { --rim: #b8955a; }
.spec-btn[aria-checked="true"] { --rim: #ffd97a; color: var(--gold); box-shadow: 0 0 0 1px #000, 0 0 10px rgba(255, 196, 70, .45); }
.placeholder { color: var(--dim); font-size: 15px; min-height: 42px; display: flex; align-items: center; }

.stage-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .stage-details { grid-template-columns: 1fr; } }

input[type="text"], input[type="password"] {
  width: 100%; min-height: 44px; padding: 0 14px;
  font: 500 16px var(--f-body); color: var(--bone);
  background: #0e0b0c; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
input[type="text"]::placeholder, input[type="password"]::placeholder { color: var(--dim); opacity: 1; }
input[type="text"]:focus, input[type="password"]:focus { border-color: var(--antler); outline: none; box-shadow: 0 0 0 3px rgba(196, 157, 103, .2); }
input[aria-invalid="true"] { border-color: var(--blood-text); }

.stage-foot { display: grid; justify-items: center; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.name-input.name-input {
  max-width: 340px; text-align: center; min-height: 50px;
  font: 700 24px var(--f-display); letter-spacing: .03em; color: var(--gold);
  background: transparent; border: 0; border-bottom: 1px solid var(--rim-dim);
  border-radius: 0; box-shadow: none;
}
.name-input::placeholder { color: #6f6557 !important; font-weight: 600; }
.name-input:focus { border-bottom-color: var(--gold) !important; box-shadow: none !important; }
.btn-create { min-width: 240px; min-height: 50px; font-size: 18px; }
.form-msg { font-size: 15px; color: var(--muted); text-align: center; min-height: 1.4em; }
.form-msg.error { color: var(--blood-text); }
.form-msg.ok { color: var(--ok); }
.creator.editing .stage { border-color: var(--antler-deep); }

/* right: your characters, like the character-select list */
.charlist {
  display: grid; gap: var(--s-3);
  padding: var(--s-4) var(--s-3);
  background: linear-gradient(180deg, #1f1712, #140f0c);
  border: 2px solid #4d3a22; border-radius: 4px;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(0,0,0,.6);
}
.charlist-title { font-family: var(--f-label); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-inline: 4px; }
.mylist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.mychar { --rim: #5e4a2c; position: relative; padding: 10px 12px; }
.mychar.active { --rim: #ffd97a; box-shadow: 0 0 0 1px #000, 0 0 12px rgba(255, 196, 70, .4); }

.mychar-pic { grid-row: 1 / span 3; width: 40px; height: 40px; border: 1px solid #7a5f36; border-radius: 3px; }

.mychar-name { font: 700 17px/1.2 var(--f-display); color: var(--gold); overflow-wrap: anywhere; padding-right: 26px; }

.mychar-confirm { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 14px; color: var(--blood-text); }

.charlist-new { width: 100%; }

@media (max-width: 1060px) {
  .creator { grid-template-columns: 180px minmax(0, 1fr); }
  .charlist { grid-column: 1 / -1; }
}
/* nine in a row fit only the full-width sign-up window (1180px, from a 1212px screen); narrower, five per row with full-size names */
@media (max-width: 1211px) {
  .class-bar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .class-btn .cname { font-size: inherit; letter-spacing: inherit; }
}
@media (max-width: 720px) {
  .creator { grid-template-columns: 1fr; }
  .banner { clip-path: none; padding-bottom: var(--s-4); border: 2px solid #4a0a0d; border-radius: 4px; }
  .banner-mark { display: block; width: 44px; }
  .race-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .portrait { width: 100%; height: auto; aspect-ratio: 1; }
  .race-btn { width: 100%; font-size: 11px; }
  .class-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .btn-create { min-width: 0; width: 100%; }
}

/* ---------- interest pool ---------- */
.roster { padding-block: var(--s-8); border-top: 1px solid var(--line); }

.icon-btn { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; background: rgba(0,0,0,.25); border: 1px solid transparent; border-radius: 3px; color: #d9cdb8; cursor: pointer; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { border-color: #a8864c; color: #fff; }
.icon-btn.danger { color: #f08a8f; }
.icon-btn.danger:hover { border-color: #c3161f; background: #5a0b10; }

.tag { font-family: var(--f-label); font-weight: 700; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 0 5px; line-height: 16px; border-radius: 2px; border: 1px solid rgba(255,255,255,.25); color: #e6dccb; text-shadow: none; flex: none; }
.tag.main { border-color: #a8864c; color: #ffd98a; }
.empty-col { padding: 16px 14px; color: var(--dim); font-size: 14px; text-align: center; }
.empty { margin-top: var(--s-4); color: var(--muted); }

/* ---------- footer ---------- */

.officer { display: grid; gap: var(--s-2); justify-items: end; font-size: 14px; color: var(--muted); }

@media (max-width: 760px) {  .officer { justify-items: start; }  }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 50; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: var(--r-sm);
  background: var(--bone); color: var(--ground); font-weight: 600; font-size: 15px;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}

/* ================= firm + crews ================= */
/* header tabs */
.tabs { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; position: relative; padding: 10px 14px; text-decoration: none; white-space: nowrap;
  font: 700 15px/1 var(--f-display); letter-spacing: .03em; color: var(--muted);
  border-radius: 3px; transition: color .12s, background-color .12s;
}
.tab:hover { color: var(--bone); background: rgba(255,255,255,.04); }
.tab[aria-current="page"] { color: var(--gold); }
.tab[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: linear-gradient(90deg, transparent, #f3c65a, transparent); }
.tab-home { text-transform: uppercase; letter-spacing: .08em; }
.nav-cta {
  flex: none; min-height: 38px; padding: 0 14px; cursor: pointer; border-radius: 4px;
  color: #fff4dc; font: 700 14px var(--f-display); letter-spacing: .02em; white-space: nowrap;
  background: linear-gradient(180deg, #e3272d, #bd1118 46%, #960a10 54%, #a90e14); border: 1px solid #b08d52;
  box-shadow: 0 0 0 1px #1a0c05, inset 0 1px 0 rgba(255,255,255,.25);
}
.nav-cta:hover { border-color: #e1bf7a; }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .tabs { order: 3; flex-basis: 100%; justify-content: flex-start; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .tab { padding: 8px 10px; font-size: 14px; }
}

/* home sections */
.firm, .crews, .structure, .policy, .organize { padding-block: var(--s-8) var(--s-7); border-top: 1px solid var(--line); }
.firm .section-title { max-width: 22ch; }
.crew-grid { margin-top: var(--s-6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 760px) { .crew-grid { grid-template-columns: 1fr; } }
.crew-card {
  display: grid; gap: var(--s-3); padding: var(--s-5); text-decoration: none; color: inherit;
  background: linear-gradient(180deg, #1c171a, #141013);
  border: 2px solid #3d2e1c; border-radius: 4px;
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,230,170,.05);
  transition: border-color .15s, transform .15s;
}
.crew-card:hover { border-color: #a8864c; transform: translateY(-2px); }
.crew-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.crew-card-name { font: 800 26px/1.1 var(--f-display); letter-spacing: .02em; color: var(--gold); }

.crew-card-focus { color: var(--blood-text); font: 700 16px var(--f-display); letter-spacing: .02em; }
.crew-card-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.cf { display: grid; gap: 1px; }
.cf-k { font: 600 12px var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.cf-v { font-size: 15px; color: var(--bone); }
.crew-card-go { font: 700 14px var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--antler); }

.size-grid { margin-top: var(--s-6); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 760px) { .size-grid { grid-template-columns: 1fr; } }
.size-tile { display: grid; gap: 6px; padding: var(--s-5); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.size-num { font: 900 56px/1 var(--f-display); color: var(--nato-text); }
.size-tile h3 { font: 800 20px var(--f-display); letter-spacing: .02em; }
.size-tile p:last-child { color: var(--muted); }

.policy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s-6); align-items: start; }
@media (max-width: 760px) { .policy { grid-template-columns: 1fr; } }
.policy-list { gap: var(--s-4); }
.policy-list li { font-size: 18px; }

.organize-card {
  padding: clamp(20px, 4vw, 44px);
  background: radial-gradient(120% 120% at 0% 0%, rgba(195,22,31,.16), transparent 60%), linear-gradient(180deg, #1c171a, #141013);
  border: 2px solid #5b4527; border-radius: 4px; box-shadow: 0 0 0 1px #000;
}
.contact { margin-top: var(--s-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); color: var(--muted); font-size: 17px; }
.contact-name { font: 700 22px var(--f-display); color: var(--gold); background: #0e0b0c; border: 1px solid var(--line-strong); padding: 4px 12px; border-radius: 3px; user-select: all; }

/* crew hero */

/* squad picker in the creator */
.squad-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-2); }
.squad-btn { --rim: #5e4a2c; display: grid; gap: 3px; text-align: left; padding: 10px 14px; cursor: pointer; color: var(--bone); }
.squad-name { font: 700 17px var(--f-display); color: var(--gold); }
.squad-btn small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.squad-btn:hover { --rim: #b8955a; }
.squad-btn[aria-checked="true"] { --rim: #ffd97a; box-shadow: 0 0 0 1px #000, 0 0 12px rgba(255, 196, 70, .45); }

.alt-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  padding: 10px 14px; border: 1px solid #a8864c; border-radius: 3px;
  background: rgba(255, 209, 0, .06); color: var(--gold); font: 700 16px var(--f-display);
}

/* pool: squad tabs + alts nested under mains */

/* your characters with alts */
.mychar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 8px 8px 8px 10px; }

.mychar-pic { grid-row: 1 / span 2; width: 36px; height: 36px; }
.mychar-name { padding-right: 0; font-size: 16px; }

.mychar-confirm { grid-column: 1 / -1; }

#homeTitle { font-size: clamp(44px, 6.4vw, 88px); }

/* organizer tools: a quiet line at the very bottom (the footer is gone) */

/* ================= landing (firm home) ================= */
.landing {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, 86vh, 920px);
  display: grid; place-items: center;
  padding: clamp(40px, 7vh, 88px) var(--gutter) clamp(56px, 9vh, 110px);
  text-align: center;
}
.landing-bg {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 42%; will-change: transform; backface-visibility: hidden;
  animation: landing-drift 28s ease-in-out infinite alternate;
}
@keyframes landing-drift { from { transform: scale(1); } to { transform: scale(1.035); } }
.landing::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 40% 46% at 50% 60%, rgba(8, 6, 8, .62), rgba(8, 6, 8, .22) 62%, transparent 100%),
    linear-gradient(180deg, rgba(10, 9, 11, .55) 0%, rgba(10, 9, 11, .05) 20%, rgba(10, 9, 11, 0) 55%, rgba(10, 9, 11, .8) 90%, #0a090b 100%),
    linear-gradient(90deg, rgba(10, 9, 11, .4), transparent 18%, transparent 82%, rgba(10, 9, 11, .4));
}
.landing-inner { display: grid; justify-items: center; gap: var(--s-3); max-width: 760px; }
.landing-crest { width: clamp(210px, 26vw, 340px); filter: drop-shadow(0 18px 38px rgba(0,0,0,.75)) drop-shadow(0 0 1px rgba(0,0,0,.9)); animation: rise .9s ease-out both; }
.landing-realm {
  display: inline-flex; align-items: center; gap: 12px; margin-top: var(--s-2);
  font: 700 14px var(--f-label); letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}
.landing-realm::before, .landing-realm::after { content: ""; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, #d9b25a); }
.landing-realm::after { transform: scaleX(-1); }
.landing-title {
  font: 900 clamp(32px, 5.2vw, 62px)/1.05 var(--f-display); letter-spacing: .03em; color: #f6eee0;
  text-shadow: 0 2px 4px rgba(0,0,0,.85), 0 0 30px rgba(0,0,0,.6);
}
.landing-lede { max-width: 56ch; font-size: clamp(16px, 1.6vw, 19px); color: #eadfcd; text-shadow: 0 1px 3px rgba(0,0,0,.95); }
.landing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin-top: var(--s-3); }
.landing-actions .btn-ghost { background: rgba(10, 8, 9, .55); border-color: #a8864c; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

@media (max-width: 560px) { .landing-realm { letter-spacing: .12em; font-size: 12px; } .landing-realm::before, .landing-realm::after { width: 18px; } }

@media (max-width: 560px) { .wide-only { display: none; } }

/* crew emblems */
.badge { display: inline-grid; flex: none; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.7)); transition: transform .15s; }
.badge svg { display: block; width: 100%; height: auto; }
.badge-sm { width: 21px; }
.badge-lg { width: 30px; }

.tab { display: inline-flex; align-items: center; gap: 9px; }
.tab:hover .badge { transform: translateY(-1px); }
.tab[aria-current="page"] .badge { filter: drop-shadow(0 0 5px rgba(255, 206, 90, .55)) drop-shadow(0 1px 1.5px rgba(0,0,0,.7)); }
.tab-crest { width: 30px; height: auto; mix-blend-mode: lighten; margin: -4px 0; }
.crew-card-top { align-items: center; }
.crew-card-top .crew-card-name { flex: 1; min-width: 0; }

@media (max-width: 760px) { .tab { gap: 7px; } .badge-sm { width: 17px; } .tab-crest { width: 26px; } }

/* ================= crew page: card + sidebar ================= */
.crew-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-5); align-items: start;
  padding-block: clamp(24px, 5vw, 56px) var(--s-8);
}
@media (max-width: 960px) { .crew-layout { grid-template-columns: minmax(0, 1fr); } .crew-side { order: -1; } }
.crew-main, .side-card {
  background: linear-gradient(180deg, #19151a, #131014);
  border: 1px solid #3a2d1d; border-radius: 6px;
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,230,170,.04), 0 24px 60px -30px rgba(0,0,0,.9);
}
.crew-main { padding: clamp(20px, 3.4vw, 36px); display: grid; gap: var(--s-6); }
.crew-head { display: flex; align-items: center; gap: var(--s-5); }
.crew-emblem { flex: none; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #2a2218, #120e0b 70%); border: 2px solid #6d5430; box-shadow: 0 0 0 1px #000, inset 0 0 18px rgba(0,0,0,.8); }
.badge-crew { width: 50px; }
.crew-name { font: 900 clamp(28px, 4vw, 42px)/1.05 var(--f-display); letter-spacing: .04em; text-transform: uppercase; color: #f6eee0; }
.crew-sub { margin-top: 6px; color: var(--muted); font-size: 18px; }

.crew-block { display: grid; gap: var(--s-3); }
.crew-h { font: 800 21px var(--f-display); letter-spacing: .03em; color: var(--gold); }
.crew-lede, .crew-p { color: #d6ccbc; max-width: 70ch; }
.crew-bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.crew-bullets li { position: relative; padding-left: 20px; color: #d6ccbc; max-width: 70ch; }
.crew-bullets li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 6px; height: 6px; background: var(--antler); transform: rotate(45deg); }
.crew-bullets strong { color: var(--bone); font-weight: 600; }

.crew-side { display: grid; gap: var(--s-4); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px); }
@media (max-width: 960px) { .crew-side { position: static; } }
.side-title { padding: 14px 18px; font: 700 15px var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--bone);
  border-bottom: 1px solid #3a2d1d; background: linear-gradient(180deg, rgba(179,20,27,.22), rgba(179,20,27,.06)); border-radius: 6px 6px 0 0; }
.side-body { padding: 16px 18px 18px; display: grid; gap: 12px; color: #d6ccbc; font-size: 15px; }
.side-body .recruit-status { font-size: 17px; }
.side-cta { width: 100%; }

/* pool as chips grouped by role */
#viewCrew .roster { padding: 0; border: 0; }

/* ================= sign-up window ================= */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 3, 5, .78); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.modal-panel {
  position: relative; width: min(1180px, 100%); max-height: 100%; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #19151a, #110e11); border: 1px solid #5b4527; border-radius: 8px;
  box-shadow: 0 0 0 1px #000, 0 40px 120px -20px rgba(0,0,0,.9);
  opacity: 0; transform: translateY(10px) scale(.99); transition: opacity .18s, transform .18s;
}
.modal.is-open .modal-backdrop, .modal.is-open .modal-panel { opacity: 1; transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); padding: 20px clamp(16px, 3vw, 28px) 16px; border-bottom: 1px solid #3a2d1d; }
.modal-title { font: 800 clamp(20px, 2.6vw, 26px) var(--f-display); letter-spacing: .02em; color: var(--bone); }
.modal-sub { margin-top: 4px; color: var(--muted); font-size: 15px; max-width: 80ch; }
.modal-close { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 26px; line-height: 1; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.modal-close:hover { color: var(--bone); border-color: #5b4527; }
.modal-body { overflow-y: auto; overscroll-behavior: contain; padding: clamp(14px, 2.4vw, 24px); }
.modal-body .creator { margin-top: 0; }
html.modal-open { overflow: hidden; }
.danger-link { color: var(--blood-text) !important; }
.remove-edit { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; font-size: 14px; }
.remove-edit .confirm { color: var(--blood-text); }
.modal-panel { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); min-height: 0; }
.modal-body { min-height: 0; flex: 1 1 auto; }
.modal .stage-class { font-size: clamp(28px, 3.6vw, 44px); }
#crewSections { display: grid; gap: var(--s-6); }
#crewSections:empty { display: none; }
@media (max-width: 960px) { .crew-side { order: 0; } }
@media (max-width: 560px) {
  .modal { padding: 0; }
  .modal-panel { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; border-left: 0; border-right: 0; }
  .modal-sub { display: none; }
  .modal-head { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
}

/* image emblems (e.g. the PuG Community pug) */
.badge-img { border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px #000, 0 0 0 2px #a8864c; }
.badge-img img { display: block; width: 100%; height: auto; }
.tab .badge-img.badge-sm { width: 21px; }
.crew-card-top .badge-img.badge-lg { width: 32px; }
.crew-emblem:has(.badge-img) { background: none; border: 0; box-shadow: none; }
.crew-emblem .badge-img.badge-crew { width: 92px; box-shadow: 0 0 0 2px #000, 0 0 0 4px #6d5430, 0 10px 24px rgba(0,0,0,.6); }

/* sidebar box with an icon header (Gear Check) */
.side-title-rich { display: flex; align-items: center; gap: 14px; }
.side-title-rich .side-title-text { font: inherit; letter-spacing: inherit; }
.side-title-rich.has-icon { text-transform: none; letter-spacing: 0; padding: 16px 18px; }
.side-title-rich.has-icon .side-title-text { font: 800 20px var(--f-display); letter-spacing: .02em; color: var(--bone); text-transform: none; }
.side-title-sub { margin-top: 2px; font: 500 14px var(--f-body); color: var(--muted); text-transform: none; letter-spacing: 0; }
.side-icon { width: 60px; height: 60px; flex: none; border-radius: 4px; border: 1px solid #000; box-shadow: 0 0 0 1px #6d5430; }
.crew-grid > .crew-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ================= header: dashboard link ================= */
.head-actions { display: flex; align-items: center; gap: 10px; flex: none; }
/* bronze like the crest rims: clearly a button and easy to find, without shouting; brighter on hover and while the dashboard is open */
.nav-dash {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 4px;
  font: 800 13px var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: #1a1206; text-decoration: none; text-shadow: 0 1px 0 rgba(255, 255, 255, .28);
  background: linear-gradient(180deg, #e6c9a2 0%, #c9a26e 46%, #ad8a55 54%, #bd9862 100%); border: 1px solid #6e5530;
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 4px rgba(0, 0, 0, .2), 0 6px 16px -8px rgba(196, 157, 103, .6);
  transition: filter .15s, box-shadow .15s, transform .15s;
}
.nav-dash svg { width: 16px; height: 16px; stroke-width: 2.2; }
.nav-dash:hover, .nav-dash[aria-current="page"] { color: #1a1206; border-color: #e1bf7a; filter: brightness(1.07);
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 4px rgba(0, 0, 0, .2), 0 0 18px rgba(196, 157, 103, .45); }
.nav-dash:active { transform: translateY(1px); }
@media (max-width: 760px) { .nav-dash span { display: none; } .nav-dash { padding: 0 10px; } }
html.in-dash .landing, html.in-dash #viewHome { display: none; }

/* ================= dashboard ================= */
#viewDash { padding-block: clamp(20px, 3vw, 36px) var(--s-8); }
.dash-login { display: grid; place-items: center; min-height: 60vh; }
.dash-login-card {
  width: min(440px, 100%); display: grid; justify-items: center; gap: 12px; text-align: center;
  padding: clamp(24px, 5vw, 40px); background: linear-gradient(180deg, #19151a, #131014);
  border: 1px solid #5b4527; border-radius: 8px; box-shadow: 0 0 0 1px #000, 0 30px 80px -30px rgba(0,0,0,.9);
}
.dash-login-crest { width: 110px; mix-blend-mode: lighten; }
.dash-login-title { font: 800 26px var(--f-display); color: var(--bone); }
.dash-login-text { color: var(--muted); font-size: 15px; }
.dash-login-form { display: flex; gap: 8px; width: 100%; margin-top: 6px; }
.dash-login-form input { flex: 1; min-width: 0; }
.dash-login-msg { min-height: 1.4em; font-size: 14px; color: var(--blood-text); }

.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s-5); align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: minmax(0, 1fr); } }
.dash-side {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 92px);
  display: grid; gap: 4px; padding: 12px; background: linear-gradient(180deg, #19151a, #131014);
  border: 1px solid #3a2d1d; border-radius: 6px; box-shadow: 0 0 0 1px #000;
}
@media (max-width: 900px) { .dash-side { position: static; } }
.dash-home {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; margin-bottom: 8px; border-radius: 4px; text-decoration: none;
  font: 700 15px var(--f-display); color: #fff4dc; background: linear-gradient(180deg, #e3272d, #bd1118 46%, #960a10 54%, #a90e14); border: 1px solid #b08d52;
}
.dash-home svg, .dash-link svg { width: 17px; height: 17px; flex: none; }
.dash-link {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 4px; text-decoration: none;
  color: #d6ccbc; font-weight: 600; font-size: 15px; border: 1px solid transparent;
}
.dash-link:hover { background: rgba(255,255,255,.04); color: var(--bone); }
.dash-link[aria-current="page"] { background: rgba(255, 209, 0, .08); border-color: rgba(168, 134, 76, .6); color: var(--gold); }
.dash-link-name { flex: 1; min-width: 0; }
.dash-count { min-width: 26px; padding: 1px 7px; border-radius: 10px; text-align: center; font: 700 13px var(--f-label); color: #fff; background: #b3141b; font-variant-numeric: tabular-nums; }
.dash-sec { margin: 12px 10px 4px; font: 700 12px var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

.dash-main { display: grid; gap: var(--s-4); min-width: 0; }
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); }
.dash-head-title { display: flex; align-items: center; gap: 14px; }
.dash-title { font: 800 clamp(24px, 3vw, 32px) var(--f-display); color: var(--bone); letter-spacing: .02em; }
.dash-sub { color: var(--muted); font-size: 15px; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-actions .btn-primary { font-size: 15px; }

.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); }
.dash-card, .dash-panel {
  background: linear-gradient(180deg, #19151a, #131014); border: 1px solid #3a2d1d; border-radius: 6px; box-shadow: 0 0 0 1px #000;
}
.dash-card { display: grid; gap: 14px; padding: 18px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.dash-card:hover { border-color: #a8864c; transform: translateY(-2px); }
.dash-card-head { display: flex; align-items: center; gap: 10px; }
.dash-card-name { flex: 1; font: 800 19px var(--f-display); color: var(--gold); }
.dash-card-count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.dash-card-count b { font: 700 22px var(--f-label); color: var(--bone); font-variant-numeric: tabular-nums; }

.role-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.role-stat { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 4px; background: rgba(255,255,255,.03); border: 1px solid #2e2528; font-size: 12px; color: var(--muted); }
.role-stat b { font: 700 20px var(--f-label); color: var(--bone); font-variant-numeric: tabular-nums; line-height: 1; }
.role-stat-icon { width: 22px; height: 22px; }
.role-strip.big { gap: var(--s-3); }
.role-strip.big .role-stat { grid-template-columns: auto auto; grid-template-rows: auto auto; justify-content: start; align-items: center; column-gap: 12px; padding: 14px 16px; font-size: 14px; background: linear-gradient(180deg, #19151a, #131014); border-color: #3a2d1d; }
.role-strip.big .role-stat-icon { width: 34px; height: 34px; grid-row: 1 / span 2; }
.role-strip.big .role-stat b { font-size: 26px; }
@media (max-width: 640px) { .role-strip.big { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.dash-panel { padding: 16px; display: grid; gap: 14px; min-width: 0; }
.dash-panel-title { font: 800 18px var(--f-display); color: var(--gold); }

/* dashboard filters + table sizing */
.filter { display: flex; flex-wrap: wrap; gap: 4px; }
.filter button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 4px; cursor: pointer;
  background: none; border: 1px solid #3a2d1d; color: var(--muted); font: 700 13px var(--f-label); letter-spacing: .08em; text-transform: uppercase;
}
.filter button img { display: inline-block; }
.filter button:hover { color: var(--bone); border-color: #5b4527; }
.filter button[aria-pressed="true"] { color: #fff4dc; background: linear-gradient(180deg, #b3141b, #8d0b11 50%, #74080d); border-color: #a8864c; }

.dash-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ================= dashboard: pool + raid planner ================= */
html.in-dash main { max-width: 1680px; }
.planner { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-items: start; }   /* the raid planner on top, the interest pools under it, both full width */
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px 12px; }
.panel-hint { font-size: 13px; color: var(--dim); max-width: 46ch; }
.pool-panel.drop-over { border-color: #a8864c; }

.pool-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .pool-cols { grid-template-columns: minmax(0, 1fr); } }
.pool-col { border: 1px solid #2e2528; border-radius: 4px; overflow: hidden; background: rgba(0,0,0,.18); }
.pool-col-head { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; font: 700 15px var(--f-display); color: #fff4dc;
  background: linear-gradient(180deg, #b3141b, #8d0b11 50%, #74080d); border-bottom: 1px solid #a8864c; }
.pool-col-list { display: grid; gap: 5px; padding: 6px; }

@media (max-width: 480px) { .pool-panel, .raid-panel { padding: 10px; } }

/* ===== compact pools: 1st choice, then 2nd and 3rd below ===== */
.pool-panel { display: grid; gap: 14px; }
.pool-block { display: grid; gap: 8px; }
.pool-block.secondary { padding-top: 12px; border-top: 1px solid #2e2528; }
.pool-block.secondary .dash-panel-title { font-size: 15px; color: var(--antler); }
.pool-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 700px) { .pool-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pool-col { border-color: #2a2226; background: rgba(0,0,0,.25); }
.pool-col-head { justify-content: flex-start; gap: 6px; padding: 5px 8px; font: 700 12px var(--f-label); letter-spacing: .1em; text-transform: uppercase; }
.pool-col-head .role-icon { width: 16px; height: 16px; }
.pool-col-head span { margin-left: auto; color: #ffd98a; font-variant-numeric: tabular-nums; }

.pool-col-list { gap: 3px; padding: 4px; }
.pool-col .empty-col { padding: 4px; font-size: 12px; text-align: center; }

.pc {
  position: relative; display: flex; align-items: center; gap: 5px; min-height: 26px; padding: 1px 3px 1px 1px;
  border-radius: 2px; cursor: grab; user-select: none;
  background: color-mix(in srgb, var(--c) 16%, #1b1619); border: 1px solid color-mix(in srgb, var(--c) 34%, #2a2226);
}
.pc:hover { border-color: color-mix(in srgb, var(--c) 75%, #000); }
.pc.in-raid { opacity: .42; }
.pc.picked { box-shadow: 0 0 0 2px #ffd97a, 0 0 12px rgba(255, 200, 80, .5); opacity: 1; }
.pc-icon { width: 20px; height: 20px; border-radius: 2px; border: 1px solid #000; flex: none; }
.pc-name { flex: 1; min-width: 0; font: 700 12px var(--f-display); color: var(--ct); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pc-tools { position: absolute; right: 1px; top: 50%; transform: translateY(-50%); display: none; gap: 1px; padding-left: 10px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c) 16%, #1b1619) 10px); }
.pc:hover .pc-tools, .pc:focus-within .pc-tools { display: inline-flex; }
@media (hover: none) { .pc.picked .pc-tools { display: inline-flex; } }
.pc-tools .icon-btn { width: 20px; height: 20px; background: rgba(0,0,0,.35); }
.pc-tools .icon-btn svg { width: 12px; height: 12px; }
.pc.confirming { flex-wrap: wrap; }
.pc-confirm { display: flex; gap: 6px; align-items: center; width: 100%; padding: 2px 3px; font-size: 11.5px; color: var(--blood-text); }
.pc-confirm .linklike { font-size: 11.5px; }

/* ===== your characters: ranked choices ===== */
.myhow { margin: 0; padding: 0 4px 0 22px; display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.myhow li::marker { color: var(--gold); font-weight: 700; }
.myhow b { color: var(--bone); font-weight: 600; }
.myhelp { font-size: 12.5px; color: var(--dim); padding-inline: 4px; line-height: 1.4; }
.mylist { gap: 10px; }
.mychar { display: grid; gap: 6px; padding: 8px; grid-template-columns: none; }
.mychar-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px; }
.mychar-head .mychar-name { font: 800 17px var(--f-display); color: var(--gold); padding: 0; }
.mychar-head .icon-btn { width: 24px; height: 24px; }
.mychoices { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mychoice { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 4px 4px 2px;
  border-radius: 3px; background: color-mix(in srgb, var(--c) 10%, #151114); border: 1px solid color-mix(in srgb, var(--c) 28%, #2a2226); }
.mychoice.active { box-shadow: 0 0 0 1px #ffd97a; }
.mychoice-rank { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 700 11px var(--f-label); color: #1a1206; background: #ffd97a; }
.mychoice:not(:first-child) .mychoice-rank { background: #6d5430; color: #f3e5c8; }
.mychoice-open { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; }
.mychoice-open .mychar-pic { width: 30px; height: 30px; grid-row: auto; }
.mychoice-text { display: grid; min-width: 0; line-height: 1.2; }
.mychoice-label { font: 700 10.5px var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.mychoice-spec { font: 700 13.5px var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mychoice-tools { display: inline-flex; gap: 1px; }
.mychoice-tools .icon-btn { width: 22px; height: 22px; }
.mychoice-tools .icon-btn svg { width: 13px; height: 13px; }
.mychoice-tools .icon-btn:disabled { opacity: .25; cursor: default; }
.mychoice .mychar-confirm { grid-column: 1 / -1; }
.mychar-add { min-height: 30px; border: 1px dashed #6d5430; border-radius: 3px; background: none; color: var(--gold); font: 700 13px var(--f-label); letter-spacing: .06em; cursor: pointer; }
.mychar-add:hover { border-style: solid; background: rgba(255, 209, 0, .05); }
.charlist-new { width: 100%; }
.creator { grid-template-columns: 190px minmax(0, 1fr) 300px; }
@media (max-width: 1060px) { .creator { grid-template-columns: 180px minmax(0, 1fr); } }
@media (max-width: 720px) { .creator { grid-template-columns: 1fr; } }
.mychoice-spec { white-space: normal; }
.mychoice-label { letter-spacing: .08em; }
.discord-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 4px; text-decoration: none;
  font: 700 16px var(--f-display); color: #fff; background: #5865f2; border: 1px solid #8891f7;
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.2); transition: background-color .15s;
}
.discord-btn:hover { background: #4752c4; }
.discord-btn img, .discord-btn svg { width: 26px; height: 26px; flex: none; }
/* note as a roomy text area; Discord name as the big name field */
.stage-details textarea {
  width: 100%; min-height: 84px; padding: 10px 14px; resize: vertical;
  font: 500 16px/1.45 var(--f-body); color: var(--bone);
  background: #0e0b0c; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
.stage-details textarea::placeholder { color: var(--dim); opacity: 1; }
.stage-details textarea:focus { border-color: var(--antler); outline: none; box-shadow: 0 0 0 3px rgba(196, 157, 103, .2); }
.stage-details { grid-template-columns: minmax(0, 1fr); }
.name-field { display: grid; justify-items: center; gap: 4px; width: 100%; }
.name-field .name-input { width: 100%; }
.name-help { font-size: 13px; color: var(--dim); text-align: center; }
.modal-sub { display: grid; gap: 2px; } .modal-sub span { display: block; }
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.contact-line { font-size: 18px; color: var(--muted); }
.contact-line .contact-name { font: 800 22px var(--f-display); color: var(--gold); letter-spacing: .02em; background: none; border: 0; padding: 0; text-shadow: 0 0 18px rgba(255, 209, 0, .25); }
.contact-discord { min-width: 220px; }
.crew-lede { display: grid; gap: 12px; }
.rec-text { display: grid; gap: 10px; }
.landing-lede { display: grid; gap: 8px; }
.contact { flex-direction: column; align-items: flex-start; gap: 14px; }
.lead-stack { display: grid; gap: 10px; }
.firm .section-title.firm-title { max-width: none; font-size: clamp(22px, 3.2vw, 38px); }
.firm-title span { display: block; }

/* ===== ranked choices: stronger numbers and labels ===== */
.mychoice { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; padding: 6px 6px 6px 6px; }
.mychoice-rank {
  width: 28px; height: 28px; font: 900 15px/1 var(--f-display); letter-spacing: 0;
  color: #2a1a05; text-shadow: 0 1px 0 rgba(255,255,255,.45);
  background: radial-gradient(circle at 35% 30%, #fff3b8, #ffd24a 45%, #c98e1c 100%);
  border: 1px solid #000; box-shadow: 0 0 0 1px #8a6a2a, 0 0 10px rgba(255, 196, 70, .45), inset 0 -2px 3px rgba(0,0,0,.25);
}
.mychoice:nth-child(2) .mychoice-rank {
  color: #1c1f24; text-shadow: 0 1px 0 rgba(255,255,255,.55);
  background: radial-gradient(circle at 35% 30%, #ffffff, #d7dde6 45%, #8e97a3 100%);
  box-shadow: 0 0 0 1px #6e7682, 0 0 8px rgba(200, 210, 225, .35), inset 0 -2px 3px rgba(0,0,0,.25);
}
.mychoice:nth-child(3) .mychoice-rank {
  color: #2a1408; text-shadow: 0 1px 0 rgba(255,255,255,.35);
  background: radial-gradient(circle at 35% 30%, #ffd3ad, #d98a4e 45%, #8c4d22 100%);
  box-shadow: 0 0 0 1px #7a4521, 0 0 8px rgba(217, 138, 78, .35), inset 0 -2px 3px rgba(0,0,0,.25);
}
.mychoice-label { font: 800 11.5px var(--f-label); letter-spacing: .14em; color: #ffd98a; text-shadow: 0 1px 1px rgba(0,0,0,.8); }
.mychoice:nth-child(2) .mychoice-label { color: #dfe5ee; }
.mychoice:nth-child(3) .mychoice-label { color: #f0b98a; }
.mychoice-spec { font-size: 15px; text-shadow: 0 1px 2px rgba(0,0,0,.85); }
.mychoice:first-child { border-color: color-mix(in srgb, var(--c) 45%, #8a6a2a); box-shadow: inset 0 0 0 1px rgba(255, 209, 0, .08); }
.mychoice-label { white-space: nowrap; letter-spacing: .08em; font-size: 11px; }
.mychoice-tools { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 2px; }
.mychoice-tools .icon-btn { width: 22px; height: 20px; }
.mychoice-tools .icon-btn[title="Move up"] { grid-column: 1; grid-row: 1; }
.mychoice-tools .icon-btn[title="Move down"] { grid-column: 1; grid-row: 2; }
.mychoice-tools .icon-btn.danger { grid-column: 2; grid-row: 1 / span 2; height: 42px; }
/* "Not decided yet" spec option */
.spec-undecided { border-style: dashed; }
.spec-q { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 2px; border: 1px solid #000; box-shadow: 0 0 0 1px #6e5530;
  background: #1b1619; color: var(--gold); font: 800 16px var(--f-display); }
.mychoice-note { font-size: 11.5px; color: var(--dim); font-style: italic; }
.pc-undecided { flex: none; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; font: 800 10px var(--f-label); color: #1a1206; background: #ffd97a; }
.pool-flex { display: grid; gap: 4px; padding: 6px; border: 1px dashed #3a2d1d; border-radius: 4px; }
.pool-flex-head { font: 700 12px var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pool-flex-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
@media (max-width: 700px) { .pool-flex-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* social links in the header */
.social { display: flex; align-items: center; gap: 6px; flex: none; }
.social-link { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; transition: background-color .15s, transform .15s; }
.social-link img { width: 25px; height: 26px; mix-blend-mode: lighten; }
.social-link:hover { background: rgba(255,255,255,.06); transform: translateY(-1px); }
@media (max-width: 1100px) { .social { gap: 2px; } .social-link { width: 30px; } .social-link img { width: 21px; height: 22px; } }
@media (max-width: 760px) { .social { order: 2; } }
.discord-btn img { mix-blend-mode: normal; border-radius: 50%; }
@media (max-width: 760px) { .social { order: 0; margin-left: auto; } .head-actions { order: 1; } }
@media (max-width: 420px) { .social-link { width: 28px; } .social-link img { width: 19px; height: 20px; } .brand-mark { width: 52px; } }
/* medium screens: crew tabs get their own row so nothing is cut off */
@media (max-width: 1320px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .tabs { order: 3; flex-basis: 100%; justify-content: center; }
  .social { order: 0; margin-left: auto; }
  .head-actions { order: 1; }
}
@media (max-width: 900px) { .tabs { justify-content: flex-start; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); } }
/* crew page emblem: flag fills the circle */
.crew-emblem { overflow: hidden; background: #120e0b; border: 0; box-shadow: 0 0 0 2px #000, 0 0 0 4px #a8864c, 0 0 0 5px #000, 0 10px 24px rgba(0,0,0,.6); }
.badge-round { display: block; width: 100%; height: 100%; }
.badge-round svg { display: block; width: 100%; height: 100%; }

.organize-text .lead { margin: 0 0 var(--s-3); }
.organize-text { margin: var(--s-4) 0 var(--s-5); }

/* placeholder crews: example crews that aren't real yet */
.ph-mark { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #f0b429; color: #1a1206; font: 900 14px/1 var(--f-label); }
.ph-pill { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 4px 11px 4px 5px; border: 1px solid rgba(240,180,41,.55); border-radius: 999px; background: rgba(240,180,41,.12); color: #f5c451; font: 700 12px var(--f-label); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.ph-note { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 var(--s-5); padding: 12px 16px; border: 1px solid rgba(240,180,41,.5); border-radius: 8px; background: rgba(240,180,41,.08); color: var(--bone); line-height: 1.5; }
.ph-note[hidden] { display: none; }
.ph-note .ph-mark { margin-top: 1px; }
.ph-note strong { color: #f5c451; }
@media (max-width: 600px) { .crew-card-top { flex-wrap: wrap; row-gap: 10px; } .crew-card-top .crew-card-name { min-width: max-content; } }

/* crew leadership: sidebar card under Recruitment (minimal list) */
.crew-side.has-leaders { position: static; }
@media (max-width: 960px) { .crew-side { display: contents; } .crew-side > .side-card:first-child { order: -1; } .lead-card { order: 1; } }
.lead-body { gap: 12px; }
.lead-sub { color: var(--muted); font-size: 14px; line-height: 1.45; }
.lead-list { list-style: none; margin: 0; padding: 0; display: grid; }
.lead-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); }
.lead-row:first-child { border-top: 0; padding-top: 4px; }
.lead-row-text { display: grid; gap: 2px; min-width: 0; }
.lead-row-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lead-name { font: 800 16px/1.2 var(--f-display); letter-spacing: .02em; color: var(--bone); }
.lead-title { font: 700 11px var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.lead-roles { font-size: 13px; line-height: 1.45; color: var(--muted); }
.is-lead .lead-name { font-size: 19px; color: var(--gold); }
.is-lead .lead-title { color: #f0a41a; }
.lead-pic { position: relative; display: grid; place-items: center; flex: none; border-radius: 50%; font-family: var(--f-display); font-weight: 900; color: #f6eee0;
  background: radial-gradient(circle at 50% 35%, #3a2c1e, #151012 75%); border: 1px solid var(--rim); }
.lead-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lead-pic-lg { width: 48px; height: 48px; font-size: 21px; border: 2px solid #c58a1f; }
.lead-pic-sm { width: 36px; height: 36px; font-size: 15px; }
.lead-crown { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #f0a41a; color: #2a1a04; box-shadow: 0 0 0 2px #17131a; }
.lead-crown svg { width: 12px; height: 12px; }
.lead-note { font-size: 12px; color: var(--dim); line-height: 1.45; }
.lead-card .side-title-text { font: inherit; letter-spacing: inherit; }
.ph-text { display: grid; gap: 2px; }
.lead-row .lead-pic { margin-top: 2px; }
.lead-row { align-items: center; }
.lead-row .lead-pic { margin-top: 0; }
.lead-row:first-child { padding-top: 8px; }
.lead-row-head { align-items: center; }
.panel-hint > span { display: block; }

/* dashboard crew cards: role categories styled like the pool headers */
.role-stat { display: grid; justify-items: stretch; gap: 0; padding: 0; overflow: hidden; border: 1px solid #6e5530; border-radius: 4px; background: #120f12; }
.role-stat-head { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 4px; background: linear-gradient(180deg, #b3141b, #8d0b11 50%, #74080d); border-bottom: 1px solid #a8864c;
  font: 700 12px var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: #fff4dc; white-space: nowrap; }
.role-stat-head .role-stat-icon { width: 16px; height: 16px; }
.role-stat > b { display: block; padding: 8px 4px 9px; text-align: center; font: 800 24px/1 var(--f-label); color: var(--gold); font-variant-numeric: tabular-nums; }
.role-stat.zero > b { color: var(--dim); }
.role-stat-head { flex-direction: column; gap: 3px; font-size: 11px; letter-spacing: .06em; }

/* =====================================================================
   Production audit fixes (responsive, touch, a11y). Keep at the end: these override earlier rules.
   ===================================================================== */

/* notched phones: keep content clear of the notch in landscape; header pads under the status area */
:root { --gutter: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
.topbar { top: 0; padding-top: calc(var(--s-3) + env(safe-area-inset-top, 0px)); }

/* long words (names, Discord handles) never push the page sideways */
h1, h2, h3, p, li, dd, .crew-card-name, .lead-name { overflow-wrap: break-word; }

/* landing: small-viewport units so it doesn't jump when phone toolbars show/hide */
.landing { min-height: clamp(560px, 86svh, 920px); }

/* keyboard focus never lands under the sticky header (Shift+Tab scrolls up to the focused element) */
html { scroll-padding-top: calc(var(--hdr, 80px) + 8px); }
/* in-page jumps ("Find your crew", "Become an organizer") land 40px higher than that, as they always did */
#crews, #organize, #landing { scroll-margin-top: -48px; }

/* skip link: hidden until focused */
.skip-link { position: fixed; left: 12px; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 100; padding: 10px 16px; border-radius: 4px;
  background: var(--bone); color: var(--ground); font-weight: 700; text-decoration: none; transform: translateY(-160%); transition: transform .15s; }
.skip-link:focus { transform: none; }
[data-focus-target]:focus { outline: none; }

/* header crew tabs: centred when they fit, scrollable from the first tab when they don't */
.tabs { justify-content: flex-start; }
.tabs > :first-child { margin-left: auto; }
.tabs > :last-child { margin-right: auto; }
@media (max-width: 760px) { .tabs > :first-child { margin-left: 0; } }
/* when the tabs don't fit next to the logo on a wide screen, give them their own row (set by app.js) */
.topbar.tabs-own-row { flex-wrap: wrap; row-gap: 6px; }
.topbar.tabs-own-row .tabs { order: 3; flex-basis: 100%; }
.topbar.tabs-own-row .social { order: 0; margin-left: auto; }
.topbar.tabs-own-row .head-actions { order: 1; }
@media all {
  .tabs.fade-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .tabs.fade-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
  .tabs.fade-left.fade-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
}

/* crew page title: stack the emblem above the name on small phones so long names fit */
@media (max-width: 480px) {
  .crew-head { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
}

/* crew cards: the placeholder pill drops under the name only when it doesn't fit */
.crew-card-top { flex-wrap: wrap; row-gap: 10px; }
.crew-card-top .crew-card-name { flex: 1 1 auto; min-width: 0; }

/* dashboard planner: the raid column never grows wider than the screen */
.raid-panel, .pool-panel { grid-template-columns: minmax(0, 1fr); }

/* bigger hit areas without changing how things look */
.social-link, .nav-cta, .modal-close, .seat-x, .mychar-head .icon-btn { position: relative; }
.social-link::before, .nav-cta::before, .seat-x::before, .mychar-head .icon-btn::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
.seat-x::before { width: 30px; height: 30px; }
.modal-close { width: 44px; height: 44px; margin: -3px -3px 0 0; }

/* no double-tap zoom delay on controls (pinch zoom still works) */
a, button, [role="button"], [role="radio"], .seat, .pc { touch-action: manipulation; }

/* touch screens: full-size tap targets */
@media (pointer: coarse) {
  .tab { padding-block: 13px; }
  .nav-dash { min-height: 44px; min-width: 44px; justify-content: center; }
  .nav-cta { min-height: 44px; }
  .btn-sm { min-height: 44px; }
  .raid-tabs button, .raid-tool { min-height: 40px; }
  .dash-link, .dash-home { min-height: 44px; }
  .mychoice-open { min-height: 44px; }
  .mychoice-tools { gap: 4px; }
  .mychoice-tools .icon-btn { width: 36px; height: 30px; }
  .mychoice-tools .icon-btn.danger { height: 64px; }
  .mychar-head .icon-btn { width: 32px; height: 32px; }
  .seat-x { width: 28px; height: 28px; }
  .seat-x::before { width: 36px; height: 36px; }
}

/* sign-up window on phones: the intro scrolls away with the form, the close button stays put */
@media (max-width: 560px) {
  .modal-panel { display: block; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .modal-body { overflow: visible; }
  .modal-head { padding-right: 68px; }
  .modal-close { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); margin: 0; z-index: 3;
    background: rgba(17, 14, 17, .9); border-color: #5b4527; color: var(--bone); }
}

/* readable small labels (min 12px) */
.race-name, .mychoice-label, .role-stat-head, .lead-title { font-size: 12px; }

/* Discord name field: a clearer focus state */
.name-input.name-input:focus-visible { box-shadow: 0 2px 0 0 var(--gold) !important; }
@media (min-width: 761px) and (max-width: 1100px) { .tab { padding-inline: 10px; } }

/* =====================================================================
   Scenic section backgrounds (start page bands + dashboard).
   Each band paints a full-width image behind its sections, darkened for readable text and
   faded in and out at the edges so sections blend into each other. Images load when a band is near
   the viewport (app.js adds .is-near).
   ===================================================================== */
.page { overflow-x: clip; }
.band { position: relative; isolation: isolate; }
.band::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  pointer-events: none; opacity: 0; transition: opacity .8s ease;
  background:
    linear-gradient(180deg, rgba(10, 9, 11, var(--tint-head, .45)) 0, rgba(10, 9, 11, 0) 320px),
    linear-gradient(90deg, rgba(10, 9, 11, .55), rgba(10, 9, 11, 0) 20%, rgba(10, 9, 11, 0) 80%, rgba(10, 9, 11, .55)),
    linear-gradient(180deg, rgba(10, 9, 11, var(--tint-top, .74)), rgba(10, 9, 11, var(--tint-bot, .84))),
    var(--band-img-on, none) var(--band-pos, 50% 50%) / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 var(--fade-top, 180px), #000 calc(100% - var(--fade-bot, 200px)), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 var(--fade-top, 180px), #000 calc(100% - var(--fade-bot, 200px)), transparent 100%);
}
.band.is-near { --band-img-on: var(--band-img); }
.band.is-near::before { opacity: 1; }
.band > section:first-child { border-top-color: transparent; }
#viewHome > .band:first-child > .firm { border-top: 0; }

/* start page: Orgrimmar picks up the warm light of the landing, Mulgore opens up the crews, Duskwood's mist closes the page */
.band-orgrimmar { --band-img: url("img/bg/orgrimmar-1920.webp"); --band-pos: 50% 40%; --tint-top: .66; --tint-bot: .72; --fade-top: 120px; --fade-bot: 160px; }
.band-mulgore   { --band-img: url("img/bg/mulgore-1920.webp");   --band-pos: 50% 60%; --tint-top: .6;  --tint-bot: .74; --fade-top: 160px; }
.band-duskwood  { --band-img: url("img/bg/duskwood-1920.webp");  --band-pos: 50% 55%; --tint-top: .64; --tint-bot: .7; --tint-head: .6; --fade-top: 160px; }
/* dashboard: the painted Horde party behind the whole view */
.band-dashboard { --band-img: url("img/bg/dashboard-1920.webp"); --band-pos: 50% 35%; --tint-top: .52; --tint-bot: .74; --tint-head: .42; --fade-top: 90px; --fade-bot: 260px; }
.band-dashboard::before { top: calc(var(--s-5) * -1); }

/* tall bands: never stretch the image past its sharp size; it covers the top of the band and fades out */
.band::before { max-height: max(75vw, 900px); }
@media (max-width: 760px) {
  .band::before { max-height: min(100%, 165vw); --fade-top: 70px; }
  .band { --tint-head: .62; }
  .band-orgrimmar { --tint-top: .64; --tint-bot: .74; }
  .band-mulgore { --tint-top: .66; --tint-bot: .76; }
  .band-duskwood { --tint-top: .6; --tint-bot: .7; }
  .band { --fade-bot: 45%; }
  .band-orgrimmar { --band-pos: 50% 78%; }
  .band-duskwood { --band-pos: 40% 60%; }
}
@media (max-width: 760px) and (max-resolution: 1.5dppx) {
  .band-orgrimmar { --band-img: url("img/bg/orgrimmar-1024.webp"); }
  .band-mulgore   { --band-img: url("img/bg/mulgore-1024.webp"); }
  .band-duskwood  { --band-img: url("img/bg/duskwood-1024.webp"); }
  .band-dashboard { --band-img: url("img/bg/dashboard-1024.webp"); }
}
@media (prefers-reduced-motion: reduce) { .band::before { transition: none; } }
/* text over the scenes gets a soft dark halo for legibility */
#viewHome .band :is(.kicker, .section-title, .lead, .tenet p, .tenet h3, .policy-list li) { text-shadow: 0 1px 3px rgba(0, 0, 0, .85), 0 0 14px rgba(0, 0, 0, .45); }
.band-dashboard :is(.dash-title, .dash-sub, .panel-hint) { text-shadow: 0 1px 3px rgba(0, 0, 0, .85), 0 0 14px rgba(0, 0, 0, .45); }

/* =====================================================================
   Crew page background (crews.js "background", e.g. Team NATO) + glass cards so it shows through
   ===================================================================== */
.band-crew { --tint-top: .22; --tint-bot: .5; --tint-head: 0; --fade-top: 40px; --fade-bot: 220px; --band-pos: 50% 26%; }
.band-crew:not(.has-bg)::before { display: none; }
.band.band-crew::before { max-height: none; top: calc(var(--s-5) * -1); }
#viewCrew.has-bg .crew-main, #viewCrew.has-bg .side-card {
  background: linear-gradient(180deg, rgba(22, 19, 24, .74), rgba(15, 13, 17, .8));
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
@media (max-width: 760px) {
  .band.band-crew::before { max-height: min(100%, 250vw); }
  .band-crew { --fade-bot: 30%; }
}
@media (max-width: 760px) and (max-resolution: 1.5dppx) { .band-crew.is-near { --band-img-on: var(--band-img-sm, var(--band-img)); } }

/* =====================================================================
   Track record: tier ranks + a screenshot that opens full size
   ===================================================================== */

.track-shot { position: relative; display: block; width: 100%; padding: 0; margin-top: 4px; cursor: zoom-in; overflow: hidden;
  border: 1px solid #2c3a5c; border-radius: 6px; background: #020a18; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .9); }
.track-shot img { width: 100%; height: auto; transition: transform .35s ease, filter .35s ease; filter: saturate(.95) brightness(.92); }
.track-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(2, 6, 16, .75)); pointer-events: none; }
.track-shot:hover img, .track-shot:focus-visible img { transform: scale(1.02); filter: none; }
.track-open { position: absolute; z-index: 1; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-radius: 999px; background: rgba(8, 10, 20, .85); border: 1px solid rgba(160, 180, 255, .35); color: #e8ecff; font: 700 13px var(--f-label); letter-spacing: .08em; text-transform: uppercase; }
.track-open svg { width: 14px; height: 14px; }
.track-shot:hover .track-open { border-color: rgba(190, 205, 255, .7); }

/* lightbox (native <dialog>) */
.lightbox { width: min(1700px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #2c3a5c; border-radius: 8px;
  background: #050a16; color: var(--bone); box-shadow: 0 40px 120px rgba(0, 0, 0, .9); overflow: hidden;
  opacity: 0; transform: scale(.97); transition: opacity .2s ease, transform .2s ease; }
.lightbox.is-open { opacity: 1; transform: none; }
.lightbox::backdrop { background: rgba(3, 3, 6, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-bottom: 1px solid #1c2640; }
.lightbox-title { font: 800 18px var(--f-display); letter-spacing: .02em; color: var(--bone); }
.lightbox-close { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 28px; line-height: 1; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.lightbox-close:hover { color: var(--bone); border-color: #2c3a5c; }
.lightbox-scroll { overflow: auto; max-height: calc(100dvh - 32px - 66px); overscroll-behavior: contain; }
.lightbox-scroll img { width: 100%; min-width: 900px; height: auto; }
.lightbox-hint { display: none; padding: 8px 18px 12px; font-size: 13px; color: var(--dim); }
@media (max-width: 932px) { .lightbox-hint { display: block; } .lightbox-scroll { max-height: calc(100dvh - 32px - 100px); } }
@media (max-width: 560px) { .lightbox { width: 100vw; max-height: 100dvh; border-radius: 0; border-left: 0; border-right: 0; } }
@media (prefers-reduced-motion: reduce) { .lightbox, .track-shot img { transition: none; } }
@media (max-width: 520px) {
  
  
  
  
  
  
  .track-open { right: 8px; bottom: 8px; padding: 6px 11px; font-size: 12px; }
}

/* =====================================================================
   Phone header + menu (≤760px): logo, the page's main action and a menu button.
   Crew tabs, the dashboard link and the social links move into the menu.
   ===================================================================== */
.dash-sub:empty { display: none; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .topbar { flex-wrap: nowrap; }
  .topbar .tabs, .topbar .social, .topbar .nav-dash { display: none; }
  .head-actions { margin-left: auto; gap: 8px; }
  .menu-btn {
    display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; cursor: pointer;
    border: 1px solid #3a2d1d; border-radius: 6px; background: rgba(255, 255, 255, .03); color: var(--bone);
  }
  .menu-btn:hover, .menu-btn[aria-expanded="true"] { border-color: #a8864c; color: var(--gold); }
  .menu-bars { position: relative; display: block; width: 20px; height: 14px; }
  .menu-bars span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .22s ease, opacity .15s ease, top .22s ease; }
  .menu-bars span:nth-child(1) { top: 0; }
  .menu-bars span:nth-child(2) { top: 6px; }
  .menu-bars span:nth-child(3) { top: 12px; }
  .menu-btn[aria-expanded="true"] .menu-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-bars span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] .menu-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }
}
/* the header's "Register your interest" only when it fits next to the menu button */
@media (max-width: 379px) { .topbar .nav-cta { display: none; } }

/* full-screen sheet with its own logo row and close button, independent of where the page is scrolled */
.mnav { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; height: 100vh; height: 100dvh;
  background: linear-gradient(180deg, #17131a, #0c0a0d); opacity: 0; transition: opacity .18s ease; }
.mnav.is-open { opacity: 1; }
.mnav-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--s-3) + env(safe-area-inset-top, 0px)) var(--gutter) var(--s-3); border-bottom: 1px solid var(--line); }
.mnav-brand .brand-mark { width: 52px; }
.mnav-close { display: grid; }
.mnav-panel {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 4px; padding: 14px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateY(-8px); transition: transform .22s ease;
}
.mnav.is-open .mnav-panel { transform: none; }
html.menu-open { overflow: hidden; }
.mnav-cta { width: 100%; margin-bottom: 6px; }
.mnav-sec { margin: 10px 0 4px; font: 700 12px var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.mnav-list { display: grid; gap: 2px; }
.mnav-link {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px; border-radius: 6px; text-decoration: none;
  font: 700 17px var(--f-display); letter-spacing: .02em; color: var(--bone); border: 1px solid transparent;
}
.mnav-link:hover, .mnav-link:focus-visible { background: rgba(255, 255, 255, .04); }
.mnav-link[aria-current="page"] { color: var(--gold); background: rgba(255, 209, 0, .06); border-color: rgba(168, 134, 76, .55); }
.mnav-link .badge-sm { width: 24px; flex: none; }
.mnav-link .badge-img.badge-sm { width: 26px; }
.mnav-crest { width: 36px; height: auto; flex: none; mix-blend-mode: lighten; }
.mnav-home .mnav-name { text-transform: uppercase; letter-spacing: .08em; }
.mnav-name { flex: 1; min-width: 0; }
.mnav-tag { flex: none; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(240, 180, 41, .45); color: #f5c451; font: 700 11px var(--f-label); letter-spacing: .08em; text-transform: uppercase; }
.mnav-ico { width: 22px; height: 22px; flex: none; color: var(--antler); }
.mnav-social { display: flex; gap: 8px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.mnav-soc { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .03); }
.mnav-soc:hover { border-color: #a8864c; }
.mnav-soc img { width: 25px; height: 26px; mix-blend-mode: lighten; }
@media (min-width: 761px) { .mnav { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .mnav, .mnav-panel, .menu-bars span { transition: none; } }
html.menu-open .topbar .nav-cta { visibility: hidden; }

/* =====================================================================
   Design pass 2: phone crew order, time ranges, browser note, dashboard chips + pick bar, notes
   ===================================================================== */
.nowrap { white-space: nowrap; }

/* crew pages on phones/tablets: the crew's own card first, then Recruitment, then Leadership */
@media (max-width: 960px) {
  .crew-side > .side-card:first-child { order: 1; }
  .lead-card { order: 2; }
}
/* phones: the header keeps "Register your interest" next to the menu button, compact on the narrowest screens */
@media (max-width: 379px) {
  .topbar .nav-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 12.5px; letter-spacing: 0; }
  .topbar .head-actions { gap: 6px; }
  .brand-mark { width: 46px; }
}

/* phones: equal-width landing buttons, tighter section rhythm */
@media (max-width: 520px) { .landing-actions .btn { width: min(100%, 300px); } }
@media (max-width: 760px) { .firm, .crews, .structure, .policy, .organize { padding-block: 56px 40px; } }

/* "Your characters": where the edit keys live */
.mysaved { margin-top: 10px; font-size: 12.5px; line-height: 1.45; color: var(--dim); }

/* dashboard sidebar: Homepage is a plain link like the rest; on phones/tablets it all becomes one row of chips */
.dash-home { justify-content: flex-start; min-height: 40px; margin-bottom: 0; padding: 0 10px; gap: 10px;
  font: 600 15px var(--f-body); color: #d6ccbc; background: none; border: 1px solid transparent; }
.dash-home:hover { background: rgba(255, 255, 255, .04); color: var(--bone); }
@media (max-width: 900px) {
  .dash-side { display: flex; align-items: center; gap: 6px; padding: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .dash-side::-webkit-scrollbar { display: none; }
  .dash-sec { display: none; }
  .dash-crews { display: flex; gap: 6px; }
  .dash-side .dash-link, .dash-side .dash-home { flex: none; min-height: 44px; padding: 0 14px; white-space: nowrap; border: 1px solid var(--line-strong); border-radius: 999px; }
  .dash-side .dash-link[aria-current="page"] { border-color: rgba(168, 134, 76, .8); }
}

/* raid planner: jumping to the raid lands 12px below the sticky header (html's scroll-padding covers the header) */
.raid-panel { scroll-margin-top: 4px; }

/* player notes: a small marker on pool cards that have one */
.pc-note { flex: none; display: grid; place-items: center; width: 14px; height: 14px; color: #ffd98a; opacity: .85; }
.pc-note svg { width: 13px; height: 13px; }

/* "player selected" bar */
.pick-bar { position: fixed; z-index: 30; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(620px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px;
  background: linear-gradient(180deg, #221b20, #151116); border: 1px solid #a8864c; border-radius: 10px;
  box-shadow: 0 0 0 1px #000, 0 18px 50px rgba(0, 0, 0, .75); }
.pick-icon { width: 34px; height: 34px; flex: none; border-radius: 4px; border: 1px solid #000; }
.pick-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.pick-name { font-size: 15px; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-name b { color: var(--gold); font-family: var(--f-display); }
.pick-hint { color: var(--muted); }
.pick-meta { font-size: 13px; color: var(--muted); }
.pick-note { font-size: 13px; color: #e8dcc6; font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pick-actions .btn { min-height: 38px; }
@media (min-width: 1281px) { .pick-jump { display: none; } .pick-actions { flex-direction: row; } }
@media (pointer: coarse) { .pick-actions .btn { min-height: 44px; } }
html.has-pick .dash { padding-bottom: 140px; }
@media (max-width: 420px) { .pick-hint { display: none; } }
@media (max-width: 900px) {
  .dash-side.fade-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .dash-side.fade-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
  .dash-side.fade-left.fade-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
}
.pick-tools { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.pick-tool { padding: 0; min-height: 28px; background: none; border: 0; cursor: pointer; font: 700 13px var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--antler); text-decoration: underline; text-underline-offset: 3px; }
.pick-tool:hover { color: var(--gold); }
@media (pointer: coarse) { .pick-tool { min-height: 40px; } }
/* touch screens: a picked player's Edit / Add choice live in the bar, not in tiny buttons on the card */
@media (hover: none) { .pc.picked .pc-tools { display: none; } }

/* ===== The first paint matches the finished page =====
   The browser can paint before app.js has run (slow first visits). These rules make that first frame look like
   the finished page, so nothing jumps when the script arrives. */

/* route.js marks the page in <head>: a crew or dashboard link never shows the start page first */
html[data-view="crew"] #landing, html[data-view="crew"] #viewHome,
html[data-view="dash"] #landing, html[data-view="dash"] #viewHome { display: none; }
/* the header's "Register your interest" only belongs on crew pages */
html:not([data-view="crew"]) #headerCta { display: none; }

/* app.js fills in the crew tabs: keep their row's height until then, so the header doesn't grow */
@media (min-width: 761px) and (max-width: 1320px) { #tabs:empty { min-height: 44px; } }
@media (min-width: 761px) and (max-width: 1320px) and (pointer: coarse) { #tabs:empty { min-height: 50px; } }
/* up to 1462px the tabs don't fit next to the logo, so app.js gives them their own row (tabs-own-row): start that way.
   If the crews change, re-measure the width where the tabs start to fit and update this breakpoint. */
@media (min-width: 1321px) and (max-width: 1462px) {
  .topbar:has(> #tabs:empty) { flex-wrap: wrap; row-gap: 6px; }
  .topbar:has(> #tabs:empty) > .tabs { order: 3; flex-basis: 100%; min-height: 44px; }
  .topbar:has(> #tabs:empty) > .social { order: 0; margin-left: auto; }
  .topbar:has(> #tabs:empty) > .head-actions { order: 1; }
}
@media (min-width: 1321px) and (max-width: 1462px) and (pointer: coarse) { .topbar:has(> #tabs:empty) > .tabs { min-height: 50px; } }


/* =====================================================================
   Raid comp planner (organizer dashboard). Modelled on the OXM.GG comp planner: Inter, neutral dark cards,
   40px seat bars where the spec art fades into a class-coloured name, a quick-add row of placeholder specs,
   a foldable bench. Self-contained: the interest pool next to it keeps the site's own look.
   ===================================================================== */
.raid-panel, .ox {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff;
  --ox-blue: #2f95dc; --ox-p3: #e8be8f; --ox-p4: #dc9d5d; --ox-d2: #ccc; --ox-d3: #a3a3a3; --ox-d5: #525252;
  --ox-card: linear-gradient(165deg, rgba(29, 29, 31, .98) 0%, rgba(19, 19, 21, .99) 48%, #0d0d0f 100%);
  --ox-card-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), inset 0 -1px 0 rgba(0, 0, 0, .32), 0 2px 10px rgba(0, 0, 0, .3);
}
.raid-panel {
  container: raid / inline-size;
  display: grid; gap: 12px; padding: 14px; min-width: 0;
  background: #0b0b0d; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; box-shadow: 0 0 0 1px #000;
}
@media (max-width: 480px) { .raid-panel { padding: 10px; } }

/* head: title, raid tabs, tools */
.raid-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.raid-head-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.raid-title { font: 700 18px/1.2 "Inter", system-ui, sans-serif; color: #fff; letter-spacing: 0; }
.raid-tabs { display: inline-flex; flex-wrap: wrap; align-items: stretch; gap: 2px; width: auto; max-width: 100%; padding: 2px; background: none; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; }
.raid-tabs button { min-height: 34px; min-width: 40px; padding: 0 12px; border: 0; border-radius: 6px; background: none; cursor: pointer;
  color: var(--ox-d3); font: 600 12px/1 "Inter", system-ui, sans-serif; letter-spacing: 0; box-shadow: none; transition: background-color .15s, color .15s; }
.raid-tabs button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.raid-tabs button[aria-selected="true"] { background: rgba(205, 127, 50, .12); color: var(--ox-p3); }
.raid-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.raid-tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; min-width: 34px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px;
  background: none; color: var(--ox-d2); font: 600 12px/1 "Inter", system-ui, sans-serif; white-space: nowrap; cursor: pointer; transition: background-color .15s; }
.raid-tool:hover { background: rgba(255, 255, 255, .06); }
.raid-tool[data-confirm] { border-color: rgba(220, 157, 93, .6); color: var(--ox-p3); }
.raid-tool-icon { display: inline-grid; width: 14px; height: 14px; }
.raid-tool-icon svg { width: 14px; height: 14px; }
@container raid (max-width: 900px) {
  .raid-tool { padding: 0 9px; }
  .raid-tool:not([data-confirm]) .raid-tool-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* role counts */
.raid-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font: 500 12px "Inter", system-ui, sans-serif; color: var(--ox-d3); white-space: normal; }
/* role counters: same look, just easier to read */
.raid-role { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 8px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); box-shadow: none; }
.raid-role-icon { width: 26px; height: 26px; border-radius: 4px; }
.raid-role b { font: 800 19px/1 "Inter", system-ui, sans-serif; color: #fff; font-variant-numeric: tabular-nums; min-width: 1ch; }
.raid-role-name { font: 700 11px "Inter", system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; color: var(--ox-d2); }
.raid-role.zero { opacity: .7; }
.raid-msg { margin-left: auto; font-style: normal; color: var(--ox-d5); }
@container raid (max-width: 640px) { .raid-role-name { display: none; } .raid-role { padding-right: 8px; } }

/* quick-add row: one pill per class, its specs as icons; a click seats a placeholder, a drag puts it on a seat */
.quick-add { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-class { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c) 33%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.quick-spec { display: grid; place-items: center; padding: 2px; border: 0; border-radius: 6px; background: none; cursor: grab; }
.quick-spec:focus-visible { outline: 2px solid var(--ox-p4); outline-offset: -2px; }
.quick-img { display: block; width: 28px; height: 28px; border-radius: 6px; transition: box-shadow .15s; }
.quick-spec:hover .quick-img, .quick-spec:focus-visible .quick-img { box-shadow: 0 0 0 2px var(--c); }
.quick-spec[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }
.quick-spec[aria-disabled="true"]:hover .quick-img { box-shadow: none; }
@container raid (min-width: 1100px) { .quick-img { width: 32px; height: 32px; } }

/* groups: 4 across, each a card of 5 seats */
.raid-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.raid-groups.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raid-group { min-width: 0; }
.raid-group-title { display: flex; align-items: center; min-height: 18px; margin: 0 0 4px; padding: 0 2px; text-align: left;
  font: 600 10px/15px "Inter", system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--ox-blue); }
.raid-group-card { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 10px; background: var(--ox-card); border: 1px solid rgba(255, 255, 255, .067); box-shadow: var(--ox-card-shadow); }
@container raid (max-width: 760px) { .raid-groups, .raid-groups.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container raid (max-width: 400px) { .raid-groups, .raid-groups.g2 { grid-template-columns: minmax(0, 1fr); } }

/* seats */
.seat, .bench-drop { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; min-width: 0; padding: 0 8px 0 60px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .06); background: rgba(0, 0, 0, .1); cursor: pointer; user-select: none; transition: background-color .15s, border-color .15s; }
.seat.filled { border-left: 2px solid color-mix(in srgb, var(--c) 70%, transparent); cursor: grab; }
.seat.filled:hover { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .2); border-left-color: color-mix(in srgb, var(--c) 70%, transparent); }
.seat.ph { border-left-style: dashed; }
.seat.vacant, .bench-drop { justify-content: center; padding-left: 8px; border: 1px dashed rgba(255, 255, 255, .1); background: none; }
.seat.can-place, .bench-drop.can-place { border-color: var(--ox-p4); }
.seat.drop-over, .raid-bench.drop-over { background: rgba(205, 127, 50, .12); box-shadow: 0 0 0 1px var(--ox-p4); }
.seat.picked { box-shadow: 0 0 0 2px var(--ox-p4), 0 0 14px rgba(220, 157, 93, .45); }
.seat:focus-visible { outline: 2px solid var(--ox-p4); outline-offset: 1px; }
.seat-art { position: absolute; left: 0; top: 0; bottom: 0; width: 56px; overflow: hidden; border-radius: 7px 0 0 7px; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent 100%); mask-image: linear-gradient(to right, #000 45%, transparent 100%); }
.seat-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left; }
.seat-tint { position: absolute; left: 56px; right: 0; top: 0; bottom: 0; border-radius: 0 7px 7px 0; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, transparent) 0%, transparent 70%); }
.seat-name { position: relative; flex: 1; min-width: 0; font: 600 13px/16px "Inter", system-ui, sans-serif; color: var(--ct); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .85); }
.seat.ph .seat-name { font-style: italic; opacity: .85; }
.seat-empty { font: 500 11px "Inter", system-ui, sans-serif; color: var(--ox-d5); }
.seat.can-place .seat-empty, .bench-drop.can-place .seat-empty { color: var(--ox-p3); }
.seat-rank { position: relative; flex: none; padding: 0 3px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 3px; font: 600 9.5px/13px "Inter", system-ui, sans-serif; color: var(--ox-d3); }
.seat-x { position: relative; flex: none; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: none;
  color: var(--ox-d3); font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.seat:hover .seat-x, .seat-x:focus-visible, .seat.picked .seat-x { opacity: 1; }
.seat-x:hover { color: #fff; background: rgba(255, 255, 255, .1); }
@media (hover: none) { .seat-x { opacity: 1; } }

/* bench: a fold line under the groups, then the benched players as seats */
.raid-bench { display: grid; gap: 0; border-radius: 10px; }
.bench-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 0; border: 0; background: none; color: var(--ox-d5); cursor: pointer; transition: color .15s; }
.bench-toggle:hover { color: var(--ox-d3); }
.bench-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(205, 127, 50, .2), transparent); }
.bench-label { display: inline-flex; align-items: center; gap: 6px; font: 600 10px/1 "Inter", system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; white-space: nowrap; }
.bench-chev { display: inline-grid; width: 12px; height: 12px; transition: transform .15s; }
.bench-chev svg { width: 12px; height: 12px; }
.bench-toggle[aria-expanded="true"] .bench-chev { transform: rotate(180deg); }
.raid-bench.can-place .bench-toggle { color: var(--ox-p4); }
.bench-seats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 8px; border-radius: 10px; background: var(--ox-card); border: 1px solid rgba(255, 255, 255, .067); box-shadow: var(--ox-card-shadow); }
@container raid (max-width: 760px) { .bench-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container raid (max-width: 400px) { .bench-seats { grid-template-columns: minmax(0, 1fr); } }

@media (min-width: 1281px) { .pick-jump { display: inline-flex; } }

/* touch and motion */
@media (pointer: coarse) { .quick-img { width: 32px; height: 32px; } }
@media (prefers-reduced-motion: reduce) { .seat, .bench-drop, .raid-tool, .raid-tabs button, .bench-toggle, .bench-chev, .quick-img { transition: none; } }

/* a 40-man in a narrow panel (next to the pool): 4 compact columns so all 8 groups stay in view; 2 on phones */
@container raid (max-width: 760px) {
  .raid-groups.g8 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .raid-groups.g8 .raid-group-card { padding: 6px; gap: 3px; }
  .raid-groups.g8 .seat { height: 34px; gap: 4px; padding: 0 6px 0 46px; }
  .raid-groups.g8 .seat.vacant { padding-left: 6px; }
  .raid-groups.g8 .seat-art { width: 42px; }
  .raid-groups.g8 .seat-tint { left: 42px; }
  .raid-groups.g8 .seat-name { font-size: 12px; }
  .raid-groups.g8 .seat-rank { display: none; }
  .raid-groups.g8 .seat-x { width: 18px; height: 18px; }
}
@container raid (max-width: 400px) { .raid-groups.g8 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* "add a 2nd/3rd choice?" prompt after registering: a native <dialog> above the sign-up window */
.prompt { width: min(440px, calc(100vw - 32px)); margin: auto; padding: 26px 26px 22px; border: 1px solid #5b4527; border-radius: 8px; text-align: center;
  background: linear-gradient(180deg, #19151a, #110e11); color: var(--bone); box-shadow: 0 0 0 1px #000, 0 40px 120px -20px rgba(0, 0, 0, .9);
  opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .18s ease, transform .18s ease; }
.prompt.is-open { opacity: 1; transform: none; }
.prompt::backdrop { background: rgba(4, 3, 5, .6); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.prompt-title { margin: 0; font: 800 22px var(--f-display); letter-spacing: .02em; color: var(--gold); overflow-wrap: anywhere; }
.prompt-text { margin: 8px 0 0; font-size: 17px; color: var(--bone); }
.prompt-sub { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.prompt-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.prompt-actions .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .prompt { transition: none; } }

/* =====================================================================
   Crew applications, dashboard side (the OXM look, like the raid planner): the Applications page with the
   Recruitment switch, the form builder and its live preview. The form itself (.af-*) is in the site's own style
   and is shared with the crew page.
   ===================================================================== */
.dash-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; width: max-content; max-width: 100%; margin-bottom: 12px; padding: 2px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; }
.dash-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 6px; color: var(--ox-d3); font: 600 12px/1 "Inter", system-ui, sans-serif; text-decoration: none; transition: background-color .15s, color .15s; }
.dash-tab:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.dash-tab[aria-current="page"] { background: rgba(205, 127, 50, .12); color: var(--ox-p3); }
.dash-count.apps { background: #2f95dc; color: #fff; }
.dash-card-apps { font: 600 13px var(--f-body); color: #6fb6ea; }

.apps-panel { container: apps / inline-size; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; min-width: 0; background: #0b0b0d; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; box-shadow: 0 0 0 1px #000; }
@media (max-width: 480px) { .apps-panel { padding: 10px; } }
.apps-loading { font: 500 13px "Inter", system-ui, sans-serif; color: var(--ox-d3); }
.ox-card, .apps-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; min-width: 0; border-radius: 10px; background: var(--ox-card); border: 1px solid rgba(255, 255, 255, .067); box-shadow: var(--ox-card-shadow); }
.apps-settings { gap: 10px; }
.apps-settings-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.apps-title { font: 700 16px/1.2 "Inter", system-ui, sans-serif; color: #fff; }
.apps-kicker { display: flex; align-items: center; gap: 6px; font: 600 10px/15px "Inter", system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--ox-blue); }
.apps-kicker-icon { display: inline-grid; width: 14px; height: 14px; }
.apps-kicker-icon svg { width: 14px; height: 14px; }
.apps-hint { font: 400 12.5px/1.45 "Inter", system-ui, sans-serif; color: var(--ox-d3); }
.apps-label { display: block; margin-bottom: 4px; font: 600 12px "Inter", system-ui, sans-serif; color: var(--ox-d2); }
.apps-hint-inline { font-weight: 400; color: var(--ox-d3); }
.fe-field { display: grid; gap: 0; }

/* the Accept-applications switch */
.switch { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; font: 600 12px "Inter", system-ui, sans-serif; color: var(--ox-d3); }
.switch-track { position: relative; flex: none; width: 40px; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .1); transition: background-color .15s; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] .switch-track { background: #2ea043; border-color: #2ea043; }
.switch[aria-checked="true"] .switch-track::after { transform: translateX(18px); }
.switch[aria-checked="true"] .switch-label { color: #7ee2a0; }
.switch:focus-visible { outline: 2px solid var(--ox-p4); outline-offset: 2px; border-radius: 6px; }
.copy-field { display: flex; gap: 6px; }
.copy-field .ox-input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* inputs in the OXM look */
.ox-input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .25); color: #fff; font: 400 13px/1.4 "Inter", system-ui, sans-serif; box-sizing: border-box; }
textarea.ox-input { resize: vertical; min-height: 60px; }
.ox-input:focus-visible { outline: 2px solid var(--ox-p4); outline-offset: 1px; border-color: var(--ox-p4); }
.ox-input::placeholder { color: var(--ox-d5); }

/* builder next to its preview */
.apps-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@container apps (max-width: 1100px) { .apps-grid { grid-template-columns: minmax(0, 1fr); } }
.fld-list { display: grid; gap: 6px; }
/* every nested grid gets a real column, or a long label makes the whole column as wide as its unwrapped text */
.fld-list, .fld-editor, .fe-field, .af-form, .af-field, .af-multi, .af-heading, .cs-picker, .af-actions { grid-template-columns: minmax(0, 1fr); }
.fld-row { border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; background: rgba(0, 0, 0, .18); }
.fld-row.open { border-color: rgba(220, 157, 93, .5); }
.fld-head { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 4px 6px 4px 10px; }
.fld-icon { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; color: var(--ox-d3); }
.fld-icon svg { width: 16px; height: 16px; }
.fld-title { flex: 1; min-width: 0; font: 600 13px "Inter", system-ui, sans-serif; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld-tags { display: flex; flex: none; gap: 4px; }
.fld-tag { padding: 2px 7px; border-radius: 4px; background: rgba(255, 255, 255, .06); font: 500 10.5px "Inter", system-ui, sans-serif; color: var(--ox-d3); white-space: nowrap; }
.fld-tag.req { background: rgba(220, 38, 38, .18); color: #f28b8b; }
.fld-tools { display: flex; flex: none; gap: 2px; }
.fld-tools .icon-btn { width: 26px; height: 26px; color: var(--ox-d3); background: none; border-color: transparent; }
.fld-tools .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.fld-tools .icon-btn.danger:hover { color: #f28b8b; }
.fld-tools .icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.fld-tools .icon-btn svg { width: 14px; height: 14px; }
@container apps (max-width: 640px) { .fld-tags { display: none; } .fld-head { padding-left: 8px; } }
.fld-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 0 10px 8px; font: 500 12px "Inter", system-ui, sans-serif; color: #f28b8b; }
.fld-confirm .linklike { font: 600 12px "Inter", system-ui, sans-serif; }
.fld-editor { display: grid; gap: 10px; padding: 6px 10px 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.fe-check { display: inline-flex; align-items: center; gap: 8px; font: 500 13px "Inter", system-ui, sans-serif; color: var(--ox-d2); cursor: pointer; }
.fe-check input { width: 16px; height: 16px; margin: 0; accent-color: #cd7f32; }
.add-field-wrap { position: relative; }
.add-field { width: 100%; min-height: 40px; border: 1px dashed rgba(220, 157, 93, .5); border-radius: 8px; background: rgba(205, 127, 50, .06); color: var(--ox-p3); font: 600 13px "Inter", system-ui, sans-serif; cursor: pointer; }
.add-field:hover { background: rgba(205, 127, 50, .12); }
.add-field:disabled { opacity: .5; cursor: not-allowed; }
.type-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 5; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 6px; border-radius: 10px; background: #161616; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
@container apps (max-width: 480px) { .type-menu { grid-template-columns: minmax(0, 1fr); } }
.type-item { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: #fff; font: 500 13px "Inter", system-ui, sans-serif; text-align: left; cursor: pointer; }
.type-item:hover { background: rgba(255, 255, 255, .06); }
.type-item:disabled { color: var(--ox-d5); cursor: default; background: none; }
.type-added { margin-left: auto; font-size: 11px; color: var(--ox-d5); }
.apps-save { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.apps-status { font: 500 12px "Inter", system-ui, sans-serif; color: var(--ox-d3); }
.apps-preview-body { min-width: 0; }

/* ===== the application form (crew page and the dashboard preview): the site's own look ===== */
.af-form { display: grid; gap: 18px; font-family: var(--f-body); color: var(--bone); }
.af-desc { display: grid; gap: 10px; font-size: 15.5px; line-height: 1.55; color: #e8dcc6; }
.af-field { display: grid; gap: 5px; min-width: 0; }
.af-label { font: 700 13px var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--bone); }
.af-req { color: var(--blood-text); }
.af-help { font-size: 13px; line-height: 1.4; color: var(--muted); }
.af-heading { display: grid; gap: 4px; padding-top: 6px; }
.af-h { font: 800 20px var(--f-display); letter-spacing: .02em; color: var(--gold); }
.af-sub { font-size: 14px; color: var(--muted); }
.af-hr { height: 1px; margin: 4px 0; border: 0; background: linear-gradient(90deg, transparent, #5b4527, transparent); }
.af-input { width: 100%; min-height: 0; padding: 10px 12px; border-radius: 4px; border: 1px solid #3a2d1d; background: #0e0b0c; color: var(--bone); font: 400 15px var(--f-body); box-sizing: border-box; }
.af-input:focus, .af-input:focus-visible { outline: none; border-color: #a8864c; box-shadow: 0 0 0 2px rgba(255, 209, 0, .25); }
.af-input::placeholder { color: var(--dim); opacity: 1; }
.af-textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.af-select { color-scheme: dark; cursor: pointer; }
.af-input[aria-invalid="true"] { border-color: var(--blood-hi); }
.af-err { font-size: 13px; color: var(--blood-text); }
.af-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; color: var(--bone); }
.af-check-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.af-box { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 3px; }
.af-box::after { content: ""; width: 12px; height: 12px; border-radius: 2px; background: var(--gold); opacity: 0; transform: scale(.5); transition: opacity .12s, transform .12s; }
.af-check-input:checked + .af-box::after { opacity: 1; transform: none; }
.af-check-input:focus-visible + .af-box { box-shadow: 0 0 0 2px rgba(255, 209, 0, .45); }
.af-multi { display: grid; gap: 8px; }
.af-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.af-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 6px; color: var(--bone); font: 700 13px var(--f-label); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.af-chip[aria-checked="true"] { --rim: var(--gold); color: var(--gold); }
.af-chip-icon { width: 24px; height: 24px; }
.cs-picker { display: grid; gap: 8px; }
.cs-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cs-list:empty { display: none; }
.cs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 3px; border-radius: 4px; background: color-mix(in srgb, var(--c) 22%, #1b1619); border: 1px solid color-mix(in srgb, var(--c) 45%, #2e2528); color: var(--ct); font: 700 13px var(--f-display); }
.cs-chip-icon { width: 22px; height: 22px; border-radius: 2px; border: 1px solid #000; }
.cs-x { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 2px; background: none; color: var(--dim); font-size: 15px; line-height: 1; cursor: pointer; }
.cs-x:hover { color: #fff; background: #5a0b10; }
.cs-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; }
@media (max-width: 560px) { .cs-row { grid-template-columns: minmax(0, 1fr); } }
.cs-add { min-height: 42px; }
.af-actions { display: grid; justify-items: center; gap: 8px; padding-top: 6px; }
@media (pointer: coarse) { .fld-tools .icon-btn { width: 36px; height: 36px; } .type-item { min-height: 44px; } .dash-tab, .switch { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .dash-tab, .switch-track, .switch-track::after, .af-box::after { transition: none; } }

/* ===== crew applications, the player's side: the Apply button in the Recruitment box and the application page ===== */
.rec-app { margin-top: 10px; font-size: 14px; color: var(--muted); }
.rec-app b { color: var(--bone); }
.rec-app a { color: var(--antler); }
#recApply + #recButton { margin-top: 8px; }
.apply-main .crew-head { align-items: center; }
.apply-kicker { font: 700 12px var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--antler); }
.apply-card, .apply-closed, .apply-done, .apply-status { padding: clamp(16px, 3vw, 28px); background: linear-gradient(180deg, #19151a, #131014); border: 1px solid #3a2d1d; border-radius: 6px; box-shadow: 0 0 0 1px #000; }
.apply-loading { color: var(--muted); }
.apply-back { margin-top: 16px; font-size: 14px; }
.apply-back a { color: var(--antler); text-decoration: none; }
.apply-back a:hover { color: var(--gold); text-decoration: underline; }
.apply-closed { display: grid; justify-items: center; gap: 10px; padding-block: 36px; text-align: center; }
.apply-shield { display: inline-grid; width: 44px; height: 44px; color: var(--dim); }
.apply-shield svg { width: 44px; height: 44px; }
.apply-closed-title { font: 800 22px var(--f-display); color: var(--bone); }
.apply-closed p { max-width: 46ch; color: var(--muted); }
.apply-closed .btn { margin-top: 6px; }
.apply-banner { padding: 10px 12px; border: 1px dashed #a8864c; border-radius: 4px; font-size: 14px; color: var(--gold); }
.apply-done { display: grid; justify-items: center; gap: 8px; margin-bottom: 16px; text-align: center; }
.apply-done-title { font: 800 26px var(--f-display); color: var(--gold); outline: none; }
.apply-done p { color: var(--muted); max-width: 46ch; }
.apply-status { display: grid; gap: 8px; margin-bottom: 16px; }
.apply-status-title { font: 800 22px var(--f-display); color: var(--bone); }
.apply-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.apply-status-hint { color: var(--muted); font-size: 15px; }
.app-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 700 11px var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: #3b4a6b; }
.app-pill.new { background: #2f95dc; }
.app-pill.review { background: #b8860b; }
.app-pill.accepted { background: #2ea043; }
.app-pill.trial { background: #7c5cd6; }
.app-pill.declined { background: #b3141b; }
.apply-answers { display: grid; gap: 10px; margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.apply-answers dt { font: 700 12px var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.apply-answers dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--bone); }
.apply-answers a { color: var(--antler); }
.ans-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.apply-withdraw { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; font-size: 14px; color: var(--muted); }
@media (max-width: 960px) { .apply-main { order: 0; } }

/* ===== crew applications, the organizer's inbox (OXM look): the board and the application dialog ===== */
.apps-tabs { margin: 0; }
.inbox-empty { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 18px; border-radius: 10px; background: var(--ox-card); border: 1px solid rgba(255, 255, 255, .067); box-shadow: var(--ox-card-shadow); }
.inbox-empty-title { font: 600 14px "Inter", system-ui, sans-serif; color: #fff; }
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: start; }
@container apps (max-width: 1100px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container apps (max-width: 760px) { .board { grid-template-columns: minmax(0, 1fr); } }
.board-col { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; min-height: 260px; padding: 10px; border-radius: 10px; background: var(--ox-card); border: 1px solid rgba(255, 255, 255, .067); box-shadow: var(--ox-card-shadow); }
@container apps (max-width: 760px) { .board-col { min-height: 0; } }
.board-head { display: flex; align-items: center; gap: 8px; font: 600 13px "Inter", system-ui, sans-serif; color: #fff; }
.board-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2f95dc; }
.board-dot.review { background: #e0b000; }
.board-dot.accepted { background: #2ea043; }
.board-dot.trial { background: #9b7bff; }
.board-dot.declined { background: #e5484d; }
.board-count { margin-left: auto; font: 600 12px "Inter", system-ui, sans-serif; color: var(--ox-d3); }
.board-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.board-empty { padding: 28px 0; text-align: center; font: 500 12px "Inter", system-ui, sans-serif; color: var(--ox-d5); }
.board-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; width: 100%; padding: 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .2); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.board-card:hover { border-color: rgba(220, 157, 93, .6); background: rgba(255, 255, 255, .04); }
.board-card:focus-visible { outline: 2px solid var(--ox-p4); outline-offset: 1px; }
.board-name { font: 600 13px "Inter", system-ui, sans-serif; overflow-wrap: anywhere; }
.board-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cs-chip.mini { padding: 2px 5px 2px 2px; font: 700 11px var(--f-display); }
.cs-chip.mini .cs-chip-icon { width: 18px; height: 18px; }
.board-roles { display: flex; gap: 4px; }
.board-role { width: 18px; height: 18px; border-radius: 3px; }
.board-date { font: 500 11px "Inter", system-ui, sans-serif; color: var(--ox-d5); }

.apps-detail { width: min(720px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 18px 20px 16px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; background: #161616; color: #fff; box-shadow: 0 40px 120px rgba(0, 0, 0, .8); overflow: auto; }
.apps-detail::backdrop { background: rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-title { min-width: 0; }
.detail-name { font: 700 20px/1.2 "Inter", system-ui, sans-serif; color: #fff; overflow-wrap: anywhere; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font: 500 12px "Inter", system-ui, sans-serif; color: var(--ox-d3); }
.ox .app-pill { font: 600 10px "Inter", system-ui, sans-serif; letter-spacing: .12em; }
.detail-close { flex: none; width: 34px; padding: 0; font-size: 20px; line-height: 1; }
.detail-status { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.detail-st { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12); background: none; color: var(--ox-d2); font: 600 12px "Inter", system-ui, sans-serif; cursor: pointer; transition: background-color .15s, border-color .15s; }
.detail-st:hover { background: rgba(255, 255, 255, .06); }
.detail-st.on { background: rgba(205, 127, 50, .16); border-color: var(--ox-p4); color: var(--ox-p3); }
.detail-st:focus-visible { outline: 2px solid var(--ox-p4); outline-offset: 2px; }
.app-dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.app-dl dt { font: 600 10px "Inter", system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; color: var(--ox-d3); }
.app-dl dd { margin: 2px 0 0; font: 400 14px/1.5 "Inter", system-ui, sans-serif; color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-dl a { color: var(--ox-p3); }
.app-dl .cs-chip { font: 700 12px var(--f-display); }
.detail-notes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.detail-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.detail-remove { color: #f28b8b; }
@media (pointer: coarse) { .detail-st { min-height: 44px; } .board-card { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .board-card, .detail-st { transition: none; } }
