:root {
  --bg: #12100d;
  --bg2: #1b1814;
  --panel: #221e18;
  --line: #3a342a;
  --text: #e7e0d4;
  --muted: #9a907f;
  --gold: #c4a35a;
  --gold2: #8a7038;
  --ok: #6e9b6a;
  --bad: #b45a4c;
  --danger: #9c3d32;
  --side: 240px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%; color: var(--text);
  font: 15px/1.45 "Segoe UI", "Candara", sans-serif;
  background: #070604 url("../img/register-bg.png") center/cover no-repeat fixed;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(18,12,6,0.18) 0%, rgba(8,6,4,0.62) 58%, rgba(4,3,2,0.88) 100%),
    linear-gradient(180deg, rgba(12,8,4,0.2), rgba(8,6,4,0.5));
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; color: #d8c89a; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 2;
  background: rgba(14, 11, 8, 0.86); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px;
  backdrop-filter: saturate(1.05) blur(8px);
}
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; }
.brand .mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--gold2); color: #1a150e; font-weight: 700; letter-spacing: 0.04em;
}
.brand small { display: block; color: var(--muted); font-size: 12px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { color: var(--text); padding: 8px 10px; border-left: 3px solid transparent; }
.side nav a:hover { background: var(--panel); text-decoration: none; }
.side nav a.on { border-left-color: var(--gold); background: var(--panel); color: var(--gold); }
.logout { margin-top: auto; }
.logout button, .btn {
  background: transparent; border: 1px solid var(--line); color: var(--text);
  padding: 7px 12px; cursor: pointer; font: inherit;
}
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn.gold { background: var(--gold2); border-color: var(--gold2); color: #1a150e; font-weight: 600; }
.btn.gold:hover { background: var(--gold); }
.btn.danger { border-color: var(--danger); color: #e7b8b2; }
.btn.tiny { padding: 4px 8px; font-size: 12px; }
main.with-side { margin-left: var(--side); padding: 28px 32px 48px; }
main { position: relative; z-index: 1; padding: 24px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.head-account { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
h1 { font-size: 28px; font-weight: 600; margin: 0 0 8px; letter-spacing: 0.01em; }
h2 { font-size: 16px; margin: 0 0 12px; color: var(--gold); font-weight: 600; }
.muted, .kicker { color: var(--muted); }
.kicker { letter-spacing: 0.14em; text-transform: uppercase; font-size: 11px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.cards.compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.stat { background: rgba(34, 30, 24, 0.9); border: 1px solid var(--line); padding: 14px 16px; }
.stat span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.12em; }
.stat strong { display: block; font-size: 22px; margin: 6px 0 2px; }
.stat small { color: var(--muted); }
.stat.ok strong { color: var(--ok); }
.stat.bad strong { color: var(--bad); }
.stat-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 10px; }
.stat-actions form { margin: 0; }
.stat-actions .btn { padding: 3px 8px; font-size: 11px; }
.panel { background: rgba(34, 30, 24, 0.9); border: 1px solid var(--line); padding: 18px; margin: 16px 0; }
.split { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.grow { min-width: 0; }
.grid-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.level80-list { margin: 8px 0 12px; padding-left: 1.2rem; font-size: 13px; }
.level80-list li { margin: 4px 0; }
.profession-table input[type="number"] { width: 5.5rem; }
.profession-table select { min-width: 10.5rem; }
.profession-table td { vertical-align: middle; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.small { font-size: 12px; color: var(--muted); max-width: 280px; word-break: break-word; }
.row-actions, .inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
input, select, textarea {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  padding: 7px 8px; font: inherit;
}
textarea { width: 100%; min-height: 5.5rem; resize: vertical; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.item-import-sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.item-import-result { font-size: 13px; margin: 10px 0 0; white-space: pre-wrap; }
.item-import-result.ok { color: var(--ok); }
.item-import-result.bad { color: var(--bad); }
.panel h3 { font-size: 14px; margin: 0 0 10px; color: var(--gold); font-weight: 600; }
select[name="name"] { min-width: 18rem; }
label.chk {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  white-space: nowrap;
  font-size: 13px;
}
label.chk input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  padding: 0;
  accent-color: var(--gold, #c9a227);
}
.stack label { margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.kv div { display: grid; gap: 2px; }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 0; }
.list { padding-left: 18px; color: var(--muted); }
.toasts { position: sticky; top: 8px; z-index: 5; display: grid; gap: 8px; margin-bottom: 12px; }
.toast { padding: 10px 12px; border: 1px solid var(--line); background: var(--bg2); }
.toast.ok { border-color: var(--ok); }
.toast.error { border-color: var(--bad); }
.friend-tree .owner { font-weight: 600; color: var(--gold); margin-bottom: 8px; }
.friend-tree ul { list-style: none; margin: 0 0 0 12px; padding: 0 0 0 14px; border-left: 1px solid var(--line); }
.friend-tree li { padding: 4px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.friend-tree .role { min-width: 4.5rem; color: var(--gold); }
.assist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.assist-grid h3 { margin: 0 0 8px; font-size: 14px; color: var(--gold); }
.cmd-row { display: flex; gap: 8px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
.cmd-row .cmd-input {
  flex: 1;
  min-width: 12rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  color: #d8c89a;
  user-select: all;
  cursor: text;
}
.warn-note { color: var(--muted); margin: 0 0 12px; }
.assist-slot { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.assist-one { border: 1px solid var(--line); padding: 8px; background: var(--bg); }
tr.slot-actions td { background: var(--bg2); border-bottom-width: 2px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(420px, 92vw); background: rgba(34, 30, 24, 0.92); border: 1px solid var(--line); padding: 36px 32px; }
.login-card h1 { margin-bottom: 4px; }
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; padding-right: 40px; }
.pw-toggle {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 30px; padding: 0; margin: 0;
  display: grid; place-items: center;
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--gold); outline: none; }
.pw-toggle svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.pw-toggle .pw-icon-hide { display: none; }
.pw-toggle[aria-pressed="true"] .pw-icon-show { display: none; }
.pw-toggle[aria-pressed="true"] .pw-icon-hide { display: block; }
@media (max-width: 900px) {
  .side { position: static; width: auto; flex-direction: row; flex-wrap: wrap; }
  main.with-side { margin-left: 0; padding: 16px; }
  .split { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
}
.side nav .nav-group { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; }
.side nav .nav-label {
  color: var(--muted); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 10px 2px;
}
.side nav a.sub { padding-left: 18px; font-size: 14px; }
.q0 { color: #9d9d9d; }
.q1 { color: #f4efe6; }
.q2 { color: #1eff00; }
.q3 { color: #4ea3ff; }
.q4 { color: #c86bff; }
.q5 { color: #ff8000; }
.q6, .q7 { color: #e6cc80; }
.bz-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.bz-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.bz-filters h2 { margin-top: 0; }
.bz-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bz-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.bz-card {
  background: var(--panel); border: 1px solid var(--line); padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.bz-card h3 { margin: 0; font-size: 14px; line-height: 1.3; min-height: 2.5em; }
a.bz-wowhead { color: inherit; text-decoration: none; }
a.bz-wowhead:hover { text-decoration: underline; }
.bz-meta { margin: 0; font-size: 12px; color: var(--muted); }
.bz-icon {
  width: 56px; height: 56px; border: 1px solid var(--gold2); background: #0e0c0a;
  object-fit: contain; image-rendering: pixelated;
}
.bz-icon.lg { width: 64px; height: 64px; }
.bz-hidden { display: none !important; }
.bz-mog { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.bz-mog-slot { border: 1px solid var(--line); background: var(--bg); padding: 12px; }
.bz-mog-slot h3 { margin: 0 0 8px; font-size: 13px; color: var(--gold); }
.bz-mog-body { display: flex; gap: 10px; align-items: center; min-height: 48px; margin-bottom: 8px; }
.bz-modal-bg {
  position: fixed; inset: 0; background: rgba(8, 6, 4, 0.72); z-index: 20;
  display: grid; place-items: center; padding: 24px;
}
.bz-modal { width: min(720px, 96vw); max-height: 88vh; overflow: auto; position: relative; }
.bz-close { position: absolute; top: 12px; right: 12px; }
.bz-ss-wrap { margin-top: 16px; }
.bz-ss-main {
  background: #0e0c0a; border: 1px solid var(--line); display: grid; place-items: center;
  min-height: 220px; margin: 8px 0;
}
.bz-ss-main img { max-width: 100%; max-height: 52vh; object-fit: contain; }
.bz-ss-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.bz-ss-thumb {
  padding: 0; border: 2px solid var(--line); background: #0e0c0a; cursor: pointer; line-height: 0;
}
.bz-ss-thumb.on, .bz-ss-thumb:hover { border-color: var(--gold); }
.bz-ss-thumb img { width: 72px; height: 72px; object-fit: cover; display: block; }
.bz-ss-note { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .bz-layout { grid-template-columns: 1fr; }
}

body.page-register { min-height: 100vh; }
body.page-register .side { display: none; }
.page-register .register-main,
.page-register main.with-side.register-main {
  position: relative; z-index: 1;
  margin: 0; padding: 0; min-height: 100vh;
  display: grid; place-items: center;
}
.page-register .toasts {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  width: min(520px, 92vw); z-index: 6;
}
.reg-hero { width: min(460px, 94vw); padding: 28px 12px; }
.reg-frame {
  position: relative;
  background: linear-gradient(180deg, rgba(32,24,14,0.94), rgba(14,10,6,0.96));
  border: 1px solid #c4a35a;
  box-shadow:
    0 0 0 4px rgba(26, 18, 8, 0.92),
    0 0 0 5px #8a7038,
    0 22px 60px rgba(0,0,0,0.62),
    inset 0 1px 0 rgba(243, 230, 200, 0.22);
  padding: 32px 30px 18px;
  text-align: center;
}
.reg-ornament {
  height: 10px; margin: 0 auto 16px; width: 72%;
  background:
    linear-gradient(90deg, transparent, #8a7038 18%, #e7d7a8 50%, #8a7038 82%, transparent);
  clip-path: polygon(0 50%, 8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%);
  opacity: 0.85;
}
.reg-head { margin-bottom: 18px; }
.reg-emblem {
  width: 108px; height: 108px; object-fit: cover; border-radius: 50%;
  border: 2px solid #e7d7a8; box-shadow: 0 0 24px rgba(196,163,90,0.42), 0 0 0 4px #3a2c16;
  margin: 0 auto 14px; display: block; background: #1a140c;
}
.reg-kicker {
  letter-spacing: 0.2em; text-transform: uppercase; font-size: 11px;
  color: #c4a35a; margin: 0 0 8px;
}
.reg-frame h1 {
  font-family: Palatino Linotype, Palatino, "Book Antiqua", Georgia, serif;
  font-size: 34px; font-weight: 600; margin: 0 0 6px; color: #f3e6c8;
  text-shadow: 0 2px 0 #1a140c, 0 0 18px rgba(196,163,90,0.25);
}
.reg-sub { margin: 0; color: #9a907f; font-size: 14px; }
.reg-sub strong { color: #c4a35a; font-weight: 600; }
.reg-form { text-align: left; }
.reg-form label { color: #c4b99a; }
.reg-form .opt { color: #7a7164; font-size: 12px; }
.reg-form input {
  background: #120e0a; border-color: #5a4a2e;
}
.reg-form input:focus { outline: 1px solid #c4a35a; border-color: #c4a35a; }
.reg-submit {
  width: 100%; margin-top: 8px; padding: 11px 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.reg-hint { font-size: 12px; color: #8a8070; margin: 12px 0 0; text-align: center; }
.reg-success { text-align: center; }
.reg-ok-title { color: #c4a35a; font-size: 18px; margin: 0 0 10px; }
.reg-realm {
  display: block; margin: 12px 0; padding: 10px 12px;
  background: #120e0a; border: 1px solid #5a4a2e; color: #e7d7a8;
  user-select: all;
}
.reg-realmbox {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid #3a2c16;
  display: grid; gap: 12px; text-align: left;
}
.reg-realmrow span {
  display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #8a7038; margin-bottom: 6px;
}
.reg-realmrow code {
  display: block; padding: 8px 10px; background: #120e0a; border: 1px solid #5a4a2e;
  color: #e7d7a8; user-select: all;
}
.reg-foot { margin-top: 14px; color: #6e675c; font-size: 11px; letter-spacing: 0.08em; }
.armory { display: grid; grid-template-columns: min-content 1fr; gap: 16px; align-items: start; margin: 16px 0; }
.armory-view { min-width: 0; width: max-content; max-width: 100%; }
.armory-frame { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.armory-stage-wrap { position: relative; width: fit-content; max-width: 100%; }
.armory-stage {
  width: 420px; max-width: 100%; aspect-ratio: 420 / 520; height: auto;
  background: #0b0a08; border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.armory-stage canvas,
.armory-stage iframe,
.armory-stage > div {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.armory-resize {
  position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; padding: 0;
  border: 0; z-index: 3; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 55%, var(--gold2) 55%, var(--gold2) 70%, transparent 70%, transparent 78%, var(--gold) 78%);
}
.armory-resize:hover { filter: brightness(1.2); }
.armory-tools { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.armory-mode {
  display: inline-flex; border: 1px solid var(--line); background: var(--bg);
}
.armory-mode-btn {
  background: transparent; border: 0; color: var(--muted);
  padding: 6px 12px; cursor: pointer; font: inherit; letter-spacing: 0.04em;
}
.armory-mode-btn:hover { color: var(--gold); }
.armory-mode-btn.on {
  background: var(--gold2); color: #1a150e; font-weight: 600;
}
.armory-mode-btn:disabled { opacity: 0.55; cursor: wait; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); color: var(--gold);
  cursor: pointer; padding: 0;
}
.icon-btn:hover { border-color: var(--gold); background: var(--bg); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.armory-resizing { user-select: none; cursor: nwse-resize; }
.page-head .inline input[type="search"],
.page-head .inline input[type="text"] { min-width: 180px; }
.armory-gear td:nth-child(3) { color: var(--muted); width: 4rem; }
.armory-loadout { grid-column: 1 / -1; }
.armory-loadout-columns {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 280px) minmax(0, 1fr);
  gap: 24px; align-items: start;
}
.armory-items { display: grid; gap: 4px; }
.armory-item-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 5px 8px; border-bottom: 1px solid var(--line);
}
.armory-items-left .armory-item-row { text-align: left; }
.armory-items-right .armory-item-row { text-align: right; }
.armory-item-row strong { display: block; color: #54c9f3; font-size: 13px; }
.armory-item-row small { display: block; color: var(--muted); font-size: 11px; }
.armory-item-level { color: var(--muted); font-size: 11px; white-space: nowrap; }
.armory-summary {
  border: 1px solid var(--line); background: rgba(15, 13, 11, 0.72); padding: 14px;
}
.armory-summary dl { margin: 0; display: grid; gap: 8px; }
.armory-summary dl div { display: flex; justify-content: space-between; gap: 12px; }
.armory-summary dt { color: var(--muted); font-size: 12px; }
.armory-summary dd { margin: 0; text-align: right; font-weight: 600; }
.armory-info-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.armory-profession-list { display: grid; gap: 10px; }
.armory-profession-list > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 12px; }
.armory-profession-list span { color: var(--muted); text-align: right; }
.armory-profession-list i { grid-column: 1 / -1; height: 4px; background: var(--line); display: block; }
.armory-profession-list i b { display: block; height: 100%; background: var(--gold); }
@media (max-width: 980px) {
  .armory { grid-template-columns: 1fr; }
  .armory-view { width: auto; }
  .armory-stage { width: min(420px, 100%); }
  .armory-loadout { grid-column: auto; }
  .armory-loadout-columns { grid-template-columns: 1fr; gap: 12px; }
  .armory-items-right .armory-item-row { text-align: left; }
  .armory-info-grid { grid-template-columns: 1fr; }
}
body.armory-public main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 48px; }
.armory-subtitle { margin: -2px 0 0; color: var(--muted); }
.home-actions { display: grid; gap: 0.75rem; justify-items: center; margin-bottom: 1.5rem; }
.home-action-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin: 0; }
.mt-toolbar {
  display: flex; align-items: end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.mt-toolbar label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.mt-card { align-items: center; text-align: center; }
.mt-card .bz-icon.lg {
  width: 96px; height: 96px; border-radius: 8px;
}
.mt-icon-btn {
  appearance: none; border: 0; padding: 0; margin: 0;
  background: transparent; cursor: pointer; line-height: 0;
  border-radius: 8px;
}
.mt-icon-btn:hover .bz-icon,
.mt-icon-btn:focus-visible .bz-icon {
  outline: 2px solid var(--gold, #c9a227);
  outline-offset: 2px;
}
.mt-card h3 { min-height: 2.6em; }
.mt-card .inline { justify-content: center; }
.mt-3d-modal { width: min(720px, 96vw); }
.mt-3d-stage {
  width: 100%; height: 380px; margin: 12px 0;
  background: #0b0a08; border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.mt-3d-stage canvas,
.mt-3d-stage iframe,
.mt-3d-stage > div {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.public-nav {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
}
.public-nav a { color: var(--muted); text-decoration: none; }
.public-nav a:hover, .public-nav a.on { color: var(--gold); }
.public-nav-form { margin: 0; }
.public-nav-form button {
  border: 0; padding: 0; background: transparent; color: var(--muted);
  font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
}
.public-nav-form button:hover { color: var(--gold); }
.public-nav-account { margin-left: auto; color: var(--gold); }
.armory-item-search-name { min-width: 22rem; }
.armory-item-search-id { width: 8rem; }
.page-register .public-nav {
  justify-content: center; border-color: #3a2c16; margin-bottom: 18px;
}
body.page-crew main { max-width: 1280px; }
body.page-crew-dash main.with-side { max-width: none; }
/* Same inner width as public /pvp-crew and /pve-crew (1280px main minus 24px padding). */
.crew-dash-body { max-width: 1232px; width: 100%; }
.crew-head { margin-bottom: 8px; }
.crew-sub { margin: 0; color: var(--muted); max-width: 36rem; }
.crew-tabs {
  display: inline-flex; margin: 8px 0 20px; border: 1px solid var(--line); background: var(--bg);
}
.crew-tab {
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  font: inherit; letter-spacing: 0.12em; padding: 8px 18px;
}
.crew-tab:hover { color: var(--gold); }
.crew-tab.on { background: var(--gold2); color: #1a150e; font-weight: 600; }
.crew-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px;
}
.crew-grid[hidden] { display: none !important; }
.crew-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.crew-card:hover { text-decoration: none; border-color: var(--gold); transform: translateY(-2px); }
.crew-card.alliance { border-color: #3a4660; }
.crew-card.alliance:hover { border-color: #7a8cb0; }
.crew-card.horde { border-color: #5a3a34; }
.crew-card.horde:hover { border-color: #b07870; }
.crew-card.core { border-color: #4a3d22; }
.crew-card.core:hover { border-color: var(--gold); }
.crew-card .crew-stage {
  width: 100%; aspect-ratio: 420 / 520; height: auto; border: 0; border-bottom: 1px solid var(--line);
}
.crew-stage-empty { background: #0b0a08; }
.crew-portrait {
  display: flex; align-items: center; justify-content: center; padding: 22px 18px;
  background: radial-gradient(ellipse at 50% 42%, var(--class-glow, #3a3220) 0%, #0b0a08 72%);
}
.crew-portrait img {
  width: 72%; height: auto; aspect-ratio: 1; object-fit: contain; display: block;
  image-rendering: pixelated;
  border: 2px solid #c4a35a; border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
  background: #1a150e;
}
.crew-portrait.c1 { --class-glow: #6b5538; }
.crew-portrait.c2 { --class-glow: #7a4a62; }
.crew-portrait.c3 { --class-glow: #4a5c32; }
.crew-portrait.c4 { --class-glow: #6b6328; }
.crew-portrait.c5 { --class-glow: #5a5a58; }
.crew-portrait.c6 { --class-glow: #6a2428; }
.crew-portrait.c7 { --class-glow: #1e4a78; }
.crew-portrait.c8 { --class-glow: #2a5a6e; }
.crew-portrait.c9 { --class-glow: #4a3e68; }
.crew-portrait.c11 { --class-glow: #6a3a18; }
.crew-meta { padding: 12px 14px 16px; }
.crew-meta h2 {
  margin: 0 0 6px; color: var(--text); font-size: 18px; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.crew-meta p { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.crew-spec { color: #d8c89a !important; }
.crew-ilvl { margin-top: 8px !important; color: var(--gold) !important; letter-spacing: 0.04em; }
.crew-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.crew-badge {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 7px; border: 1px solid var(--line); color: var(--muted);
}
.crew-badge.pvp { color: #c4a35a; border-color: #8a7038; }
.crew-badge.core { color: #c4a35a; border-color: #8a7038; }
.crew-badge.online { color: var(--ok); border-color: #3d5a3a; }
.crew-badge.offline { color: var(--muted); }
@media (max-width: 1100px) {
  .crew-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .crew-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .crew-grid { grid-template-columns: 1fr; }
}

body.page-client main { max-width: 820px; }
.ci-flow {
  list-style: none; margin: 0 0 24px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 0; align-items: center;
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.ci-flow li { display: flex; align-items: center; gap: 8px; color: var(--gold); }
.ci-flow li:not(:last-child)::after {
  content: "↓"; color: var(--gold2); margin: 0 10px 0 8px; font-size: 14px;
}
.ci-card {
  background: var(--panel); border: 1px solid var(--line); padding: 20px 22px; margin: 0 0 14px;
}
.ci-card h2 {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px; font-size: 18px;
}
.ci-num {
  display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--gold2); color: #1a150e; font-size: 13px; font-weight: 700;
}
.ci-notes { margin: 8px 0 14px; padding-left: 1.2rem; color: var(--muted); }
.ci-notes li { margin: 4px 0; }
.ci-label { color: var(--gold); font-weight: 600; margin: 0 0 10px; }
.ci-badge {
  display: inline-block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 2px 7px; border: 1px solid var(--line); color: var(--muted); font-weight: 700;
}
.ci-badge.required { color: #1a150e; background: var(--gold); border-color: var(--gold); }
.ci-badge.optional { color: var(--muted); }
.ci-hint { color: var(--gold2); font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.ci-check {
  display: flex; align-items: flex-start; gap: 10px; margin: 8px 0;
  color: var(--text); font-size: 14px; cursor: pointer;
}
.ci-check input { margin-top: 3px; accent-color: var(--gold); }
.ci-warn, .ci-info {
  margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); font-size: 14px;
}
.ci-warn { border-left: 3px solid var(--bad); background: rgba(180, 90, 76, 0.08); }
.ci-info { border-left: 3px solid var(--gold2); background: rgba(138, 112, 56, 0.12); }
.ci-connect .reg-realmrow { margin: 12px 0 16px; }
.ci-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.ci-launch {
  display: inline-block; cursor: default; opacity: 0.85;
}
.ci-launch:hover { text-decoration: none; }
.ci-sources { margin: 28px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.ci-sources h2 { font-size: 14px; margin: 0 0 8px; }
.ci-card .btn { display: inline-block; margin: 8px 8px 0 0; }
@media (max-width: 640px) {
  .ci-flow li:not(:last-child)::after { content: "→"; }
}
.brain-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.brain-check { flex-direction: row; align-items: center; gap: 6px; margin: 0; color: var(--text); }
.brain-config { gap: 14px; font-size: 13px; color: var(--muted); }
.brain-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.brain-table-wrap { overflow: auto; max-height: 340px; }
#brain-canvas { width: 100%; max-width: 520px; height: auto; border: 1px solid var(--line); background: #1b1814; }
.brain-log {
  max-height: 320px; overflow: auto; background: var(--bg); border: 1px solid var(--line);
  padding: 10px 12px; font: 12px/1.4 Consolas, "Courier New", monospace; white-space: pre-wrap;
}
.brain-row-on td { background: rgba(196, 163, 90, 0.12); }
.brain-diag { margin: 0; padding-left: 1.1rem; font-size: 13px; color: var(--muted); }
.brain-diag li { margin: 6px 0; }
@media (max-width: 1100px) {
  .brain-layout { grid-template-columns: 1fr; }
}
