/* ============================================================
   Fantasy Wrestling Tracker — dark theme
   ============================================================ */

/* ------------------------------------------------------------
   Sharp edges, hard contrast, white buttons — the game's own
   language rather than a rounded web dashboard. Nothing is
   softened: corners are square, surfaces are flat, and the only
   thing that glows is a championship.
------------------------------------------------------------ */
:root {
  --bg:        #08080a;
  --bg-soft:   #0d0d10;
  --surface:   #121216;
  --surface-2: #191920;
  --surface-3: #23232c;
  --border:    #24242e;
  --border-2:  #34343f;
  --text:      #ffffff;
  --text-2:    #a8a8b6;
  --muted:     #6e6e80;
  --accent:    #e01c26;
  --accent-dim:#2c0d10;
  --gold:      #e5b13c;
  --gold-dim:  #2e2410;
  --green:     #2fd07a;
  --green-dim: #0d2b1b;
  --blue:      #3d84ff;
  --blue-dim:  #101f3c;
  --purple:    #a06cf5;

  /* square, throughout */
  --r-sm: 0px;
  --r:    0px;
  --r-lg: 0px;

  --sidebar-w: 244px;
  --shadow: 0 14px 40px rgba(0,0,0,.7);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

h1,h2,h3,h4 { margin: 0; font-weight: 750; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2c2c33; border-radius: 0; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3c3c45; }

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; background: var(--bg); z-index: 999;
}
.boot-mark {
  width: 56px; height: 56px; border-radius: 0; background: var(--accent);
  display: grid; place-items: center; font-weight: 800; letter-spacing: -.02em; color: #fff;
  animation: pulse 1.4s ease-in-out infinite;
}
.boot-text { color: var(--muted); font-size: 14px; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--bg-soft); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh;
}
.brandmark { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; }
.brandmark-badge {
  width: 34px; height: 34px; border-radius: 0; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 12.5px; letter-spacing: -.02em; flex: none;
}
.brandmark-text { display: flex; flex-direction: column; min-width: 0; }
.brandmark-text strong { font-size: 14px; }
.brandmark-text span {
  font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav { flex: 1; overflow-y: auto; padding: 6px 10px 16px; display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted);
  padding: 16px 10px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--text-2); cursor: pointer; font-size: 14px; font-weight: 500; border: none; background: none;
  width: 100%; text-align: left;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: var(--surface-3); color: var(--text); font-weight: 620;
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-item.active svg { color: var(--accent); opacity: 1; }
.nav-count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.save-state { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.save-state.saving { color: var(--gold); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; background: rgba(8,8,10,.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); padding-top: max(14px, env(safe-area-inset-top));
  /* keep the actions above the right edge of the content column
     rather than stranded at the window edge on a wide screen */
  padding-right: max(24px, calc(100% - 1156px));
}
.topbar-title { min-width: 0; flex: 1; }
.topbar-title h1 { font-size: 20px; text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title p { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex: none; }

.content { padding: 24px; max-width: 1180px; width: 100%; }

.tabbar { display: none; }
.only-mobile { display: none; }
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 90; }

/* ---------- buttons ----------
   The primary action is a white slab with black text, the way the
   game does it. Everything else is an outline that fills on hover. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 17px; border: 1px solid var(--border-2);
  background: transparent; color: var(--text);
  font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, opacity .12s;
}
.btn:hover { background: var(--surface-3); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: #fff; border-color: #fff; color: #000; font-weight: 750;
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-ghost {
  background: transparent; border-color: transparent; color: var(--text-2);
  text-transform: none; letter-spacing: 0; font-weight: 550;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-danger { color: var(--accent); border-color: var(--accent); background: transparent; }
.btn-danger:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 11.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.icon-btn {
  width: 34px; height: 34px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

/* ---------- cards & surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
}
.card-pad { padding: 18px; }
.card-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.card-head .btn { margin-left: auto; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-8{margin-top:8px}.mt-14{margin-top:14px}.mt-24{margin-top:24px}

.section-title {
  text-transform: uppercase; letter-spacing: .08em; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  font-weight: 650; margin-bottom: 10px; }

/* ---------- stat tiles ---------- */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 15px 16px; }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- avatars / media ---------- */
.avatar {
  border-radius: 0; object-fit: cover; background: var(--surface-3); flex: none;
  display: grid; place-items: center; color: var(--muted); font-weight: 650; overflow: hidden;
  /* a belt and braces default, so an avatar can never grow to fill
     its container if it somehow arrives without a size */
  width: 40px; height: 40px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-sq { border-radius: var(--r-sm); }
.av-24 { width: 24px; height: 24px; font-size: 10px; }
.av-32 { width: 32px; height: 32px; font-size: 11px; }
.av-40 { width: 40px; height: 40px; font-size: 13px; }
.av-56 { width: 56px; height: 56px; font-size: 16px; }
.av-80 { width: 80px; height: 80px; font-size: 22px; }
.av-120 { width: 120px; height: 120px; font-size: 30px; }

.thumb {
  width: 100%; aspect-ratio: 16/9; background: var(--surface-2); object-fit: cover; display: block;
}
.thumb-tall { aspect-ratio: 3/4; }

/* ---------- entity cards ---------- */
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; cursor: pointer; transition: border-color .12s, transform .12s;
  display: flex; flex-direction: column;
}
.tile:hover { border-color: var(--border-2); }
.tile-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tile-title { font-weight: 620; font-size: 14.5px; }
.tile-sub { font-size: 12.5px; color: var(--muted); }
.tile-foot { padding: 9px 14px; border-top: 1px solid var(--border); display: flex; gap: 12px;
  font-size: 12px; color: var(--muted); }

.person-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.person-row:last-child { border-bottom: none; }
.person-row:hover { background: var(--surface-2); }

/* A row wearing its own brand: a colour spine down the left and the
   faintest wash behind it. Two brands blend down the spine, which is
   how a cross-brand superstar reads as cross-brand in a flat list. */
.person-row.brand-row {
  position: relative; padding-left: 18px;
  background: var(--brand-wash), transparent;
}
.person-row.brand-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--brand-edge);
}
.person-row.brand-row:hover { background: var(--brand-wash), var(--surface-2); }
.person-row.brand-row.no-brand { background: none; }
.person-row.brand-row.no-brand::before { background: var(--border-2); }
.person-row.brand-row.no-brand:hover { background: var(--surface-2); }
.person-main { min-width: 0; flex: 1; }
.person-name { font-weight: 570; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-stat { font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--text-2); text-align: right; flex: none; }
.person-stat b { display: block; color: var(--text); font-size: 15px; }

/* every member of a team or stable, side by side and full size */
.pairfaces { display: inline-flex; gap: 4px; flex: none; align-items: center; flex-wrap: nowrap; }

/* the divisions list */
.divrow { align-items: flex-start; padding-left: 16px; position: relative; }
.divrow::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--brand-edge);
}
.divrow .grip { margin-top: 2px; }
.divfaces { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }
.divrow[draggable] { cursor: grab; }
.divrow.dragging { opacity: .45; }
.divrow.drop-target { box-shadow: inset 0 2px 0 var(--accent); }

/* ---------- badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 0;
  font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2);
  border: 1px solid var(--border); white-space: nowrap;
}
.badge-gold { background: var(--gold-dim); color: var(--gold); border-color: #4a3a1d; }
.badge-red { background: var(--accent-dim); color: #ff7b7f; border-color: #4d2427; }
.badge-green { background: var(--green-dim); color: #57d69c; border-color: #1d4630; }
.badge-blue { background: var(--blue-dim); color: #7fa9ff; border-color: #22375c; }
.badge-purple { background: #241a3a; color: #b492f0; border-color: #3b2d5c; }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* One straight line, always. Groups of filters sit side by side with a
   divider between them and the row scrolls sideways rather than
   stacking, so a filter never pushes the content down the page. */
.pillbar {
  display: flex; gap: 6px; align-items: center;
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.pillbar::-webkit-scrollbar { display: none; }
.pillbar > * { flex: none; }
/* beats .row's display:flex, so a hidden group really goes away */
.pillbar > [hidden] { display: none !important; }

/* the rule between one group of pills and the next */
.pill-sep {
  width: 1px; align-self: stretch; margin: 3px 5px;
  background: var(--border-2); flex: none;
}

.pill {
  padding: 7px 13px; border-radius: 0; background: transparent; border: 1px solid var(--border-2);
  color: var(--text-2); font-size: 12.5px; cursor: pointer; white-space: nowrap; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.pill:hover { color: var(--text); }
.pill.active { background: #fff; color: #000; border-color: #fff; font-weight: 700; }
.pill[hidden] { display: none; }

/* ---------- tables ----------
   Roomy rows, names in caps, and the numbers banded in alternating
   columns so the eye can track across a wide row without a ruler. */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  font-weight: 650; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td {
  padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--surface-2); }

/* numbers sit centred under their heading, with a faint band on every
   other column — straight out of the look you sent over */
.tbl .num { text-align: center; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: center; }
.tbl th.num:nth-of-type(odd),
.tbl td.num:nth-of-type(odd) { background: rgba(255, 255, 255, .022); }
.tbl tbody tr:hover td.num:nth-of-type(odd) { background: rgba(255, 255, 255, .04); }

.tbl .rank {
  color: var(--accent); font-variant-numeric: tabular-nums; width: 40px;
  font-weight: 650; font-size: 13px;
}
/* the competitor's own name reads as a label, not prose */
.tbl .person-name {
  text-transform: uppercase; letter-spacing: .028em; font-size: 13px; font-weight: 620;
}
.tbl .person-sub { text-transform: none; letter-spacing: 0; }
.tbl-click tbody tr { cursor: pointer; }

/* a coloured, uppercase heading sitting over its table */
.table-title {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .075em; font-weight: 700;
  color: var(--brand, var(--accent)); margin: 0;
}
.card-head.table-head {
  background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 11px 16px;
}

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--text-2); font-weight: 560; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border-radius: 0; background: var(--bg-soft);
  border: 1px solid var(--border-2); color: var(--text); outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: #fff; box-shadow: inset 0 0 0 1px #fff;
}
.textarea { resize: vertical; min-height: 90px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2382828e' stroke-width='2' stroke-linecap='round'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

input[type=range] {
  -webkit-appearance: none; appearance: none; height: 3px; border-radius: 0;
  background: var(--surface-3); outline: none; padding: 0;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: none;
}
input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none;
}

.switch { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch-track {
  width: 38px; height: 22px; border-radius: 0; background: var(--surface-3); border: 1px solid var(--border-2);
  position: relative; transition: background .15s; flex: none;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transition: transform .15s, background .15s;
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: #fff; }

.img-picker { display: flex; align-items: center; gap: 12px; }
.img-picker .drop {
  width: 84px; height: 84px; border-radius: var(--r-sm); border: 1px dashed var(--border-2);
  display: grid; place-items: center; cursor: pointer; overflow: hidden; background: var(--bg-soft);
  color: var(--muted); font-size: 11px; text-align: center; flex: none; padding: 6px;
}
.img-picker .drop img { width: 100%; height: 100%; object-fit: cover; }
.img-picker .drop { position: relative; }

/* ---------- image framing ---------- */
/* The modal already eats 20px of padding either side and the modal
   body its own, so sizing against the viewport overflowed on a phone.
   min() keeps it square and inside whatever room there is. */
.framer {
  width: min(260px, 62vw); height: min(260px, 62vw); position: relative;
  border-radius: var(--r); overflow: hidden; background: var(--bg-soft);
  cursor: grab; user-select: none; border: 1px solid var(--border-2);
  /* the browser must not steal the drag for scrolling or pinch-zoom */
  touch-action: none; -ms-touch-action: none;
  -webkit-user-select: none; -webkit-touch-callout: none;
}
.framer.grabbing { cursor: grabbing; }
.framer img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  display: block; pointer-events: none; -webkit-user-drag: none;
}
.framer-ring {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(8,8,10,.6);
  border: 1px solid rgba(255,255,255,.45);
}
.img-picker input[type=file] { display: none; }

/* ---------- modal ---------- */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100; display: flex;
  align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
  animation: fade .12s ease;
}
@keyframes fade { from { opacity: 0 } }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  width: 100%; max-width: 620px; box-shadow: var(--shadow); margin: auto; animation: rise .16s ease;
  display: flex; flex-direction: column; max-height: calc(100dvh - 40px);
}
.modal-wide { max-width: 860px; }
@keyframes rise { from { transform: translateY(10px); opacity: 0 } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
  display: flex; gap: 9px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.modal-foot .left { margin-right: auto; }

/* ---------- toast ---------- */
.toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--surface-3); border: 1px solid var(--border-2); color: var(--text);
  padding: 10px 16px; border-radius: 0; font-size: 13.5px; box-shadow: var(--shadow);
  animation: rise .16s ease;
}
.toast.good { border-color: #1d4630; }
.toast.bad { border-color: #4d2427; }

/* ---------- empty state ---------- */
.empty {
  text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--border-2);
  border-radius: var(--r); background: var(--bg-soft);
}
.empty h3 { color: var(--text-2); font-size: 15px; margin-bottom: 6px; }
.empty p { font-size: 13.5px; max-width: 380px; margin: 0 auto 14px; }

/* ---------- match card ---------- */
.match {
  border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden;
}
.match + .match { margin-top: 10px; }
.match-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--bg-soft);
  border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); flex-wrap: wrap;
}
.match-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.side {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: var(--r-sm);
  background: var(--bg-soft); border: 1px solid transparent;
}
.side.win { background: var(--green-dim); border-color: #1d4630; }
.side-names { flex: 1; min-width: 0; font-size: 14px; font-weight: 540; }
.side-avs { display: flex; }
.side-avs .avatar + .avatar { margin-left: -8px; border: 2px solid var(--surface); }
.vs { text-align: center; font-size: 11px; color: var(--muted); letter-spacing: .12em; font-weight: 650; }
.match-foot { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- side builder ---------- */
.builder-side {
  border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 10px; background: var(--bg-soft);
}
.builder-side + .builder-side { margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 0;
  background: var(--surface-3); border: 1px solid var(--border-2); font-size: 13px; margin: 3px 3px 0 0;
}
.chip button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0 3px; font-size: 15px; line-height: 1; }
.chip button:hover { color: var(--accent); }

.picker-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r-sm); }
.picker-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; cursor: pointer;
  border-bottom: 1px solid var(--border); }
.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: var(--surface-2); }
.picker-item.sel { background: var(--accent-dim); }

/* ---------- news ---------- */
.news-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); margin-top: 7px; flex: none; }
.news-dot.auto { background: var(--blue); }
.news-dot.pinned { background: var(--gold); }
.news-main { flex: 1; min-width: 0; }
.news-title { font-weight: 600; font-size: 14.5px; }
.news-body { font-size: 13.5px; color: var(--text-2); margin-top: 3px; white-space: pre-wrap; }
.news-meta { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.news-actions { display: flex; gap: 4px; flex: none; }

/* ---------- brand theming ----------
   .themed elements read --brand / --brand-soft / --brand-line,
   which are set inline per brand or show. Free agents get grey. */
.hero.themed {
  position: relative;
  background: var(--brand-wash), var(--surface);
  padding-left: 23px;
}
.hero.themed::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand-edge);
}
.hero.themed .hero-title { color: var(--text); }
.hero.themed .avatar { box-shadow: 0 0 0 2px var(--brand-line); }
.hero.themed .recordline b { color: var(--text); }

.match.themed { position: relative; padding-left: 3px; }
.match.themed::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand-edge); z-index: 1;
}
.match.themed .match-head { background: var(--brand-wash), var(--bg-soft); }

/* ---------- multi-brand picker ---------- */
.brandpick { display: flex; flex-wrap: wrap; gap: 7px; }
.brandchip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 0;
  background: var(--bg-soft); border: 1px solid var(--border-2); color: var(--text-2);
  font-size: 13.5px; font-weight: 520; cursor: pointer;
}
.brandchip:hover { color: var(--text); border-color: var(--muted); }
.brandchip.on {
  border-color: var(--c); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--c);
  background: var(--surface-2);
}

.card-head.themed h3 { color: var(--text); }

/* A whole card wearing its brand: a colour spine down the left and the
   faintest wash behind the heading, so a roster reads brand by brand
   without shouting. */
.card.themed {
  position: relative;
  border-color: var(--brand-line);
  overflow: hidden;
}
.card.themed::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand-edge); z-index: 2;
}
.card.themed > .card-head {
  background: var(--brand-wash), var(--surface);
  padding-left: 19px;
}
.card.themed > .card-head h3 { color: var(--text); }

/* ---------- tournaments ----------
   Rounds are columns that scroll sideways on a phone, which beats
   trying to squeeze a sixteen-person bracket onto a narrow screen. */
.bracket {
  display: flex; gap: 14px; padding: 14px 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.bround { flex: none; width: 232px; display: flex; flex-direction: column; gap: 10px; }
.bround-head {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; padding-left: 2px;
}
.btie {
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface-2); overflow: hidden;
}
.btie.is-done { border-color: var(--border-2); }
.btie.is-waiting { opacity: .55; }
.btie.is-bye { opacity: .6; }
.bslot {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  font-size: 13.5px; color: var(--text-2); border-bottom: 1px solid var(--border);
}
.bslot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bslot.won { color: var(--text); font-weight: 600; background: rgba(53, 180, 124, .09); }
.bslot.out { color: var(--muted); }
.bslot.empty { color: var(--muted); font-style: italic; }
.btie-foot {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 10px; font-size: 12px; color: var(--text-2); background: var(--surface);
}
.linkbtn.danger:hover { color: var(--accent); }

/* the field picker in the tournament editor */
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.pick-row:last-child { border-bottom: none; }
.pick-row:hover { background: var(--surface-2); }
.pick-row.on { background: var(--accent-dim); }
.pick-tick { color: var(--green); font-weight: 700; width: 14px; text-align: center; }
.pick-row.is-off { opacity: .45; cursor: not-allowed; }
.pick-divider {
  padding: 7px 11px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border);
}

/* ---------- injuries ---------- */
.injury-mark {
  display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 0;
  background: var(--accent-dim); color: var(--accent); font-size: 11px; font-weight: 800;
  margin-left: 5px; vertical-align: middle; cursor: help; flex: none;
}
.card.is-hurt { border-color: var(--accent); }

/* ---------- the card ---------- */
.slot { position: relative; }
.slotbar {
  display: flex; align-items: center; gap: 8px; padding: 0 2px 5px;
  font-size: 12px; color: var(--muted);
}
.slotnum {
  width: 21px; height: 21px; border-radius: 0; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); font-weight: 700; font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.segment-card .match-head { background: var(--brand-wash), var(--bg-soft); }
.segment-body { margin-top: 9px; font-size: 14px; line-height: 1.6; color: var(--text-2); }

/* a beat worth recreating when you play it */
.beat { color: var(--text); font-weight: 700; }
.badge-teal { background: #10262a; color: #6fd4d4; border-color: #1d434a; }

/* ---------- the next step ----------
   One instruction, one button, so running a tournament is a sequence
   rather than a wall of controls. */
.nextstep {
  border-color: var(--accent);
  background: linear-gradient(90deg, rgba(229,72,77,.10), transparent 60%), var(--surface);
}
.nextstep.is-done {
  border-color: var(--border);
  background: linear-gradient(90deg, rgba(53,180,124,.09), transparent 60%), var(--surface);
}
.nextstep-body { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.nextstep-mark {
  width: 30px; height: 30px; border-radius: 0; display: grid; place-items: center; flex: none;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 15px;
}
.nextstep.is-done .nextstep-mark { background: var(--green); }
.nextstep-title { font-size: 16px; font-weight: 650; }
.nextstep-note { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.nextstep-body .btn { flex: none; }
@media (max-width: 560px) {
  .nextstep-body .btn { width: 100%; }
}

/* ---------- rivalry booking plan ---------- */
.beats { padding: 2px 0; }
.beat {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}
.beat:last-child { border-bottom: 0; }
.beat.done { border-left-color: var(--gold); background: rgba(217, 164, 65, .04); }
.beat-when {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2);
}
.beat-when b { color: var(--text); font-weight: 600; }
.beat-when span { color: var(--muted); }
.beat-text { margin: 7px 0 9px; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.beat-acts { opacity: .85; }
.beat:hover .beat-acts { opacity: 1; }

/* ---------- social posts ---------- */
.posts { padding: 4px 0; }
.post {
  display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.post:last-child { border-bottom: none; }
.post:hover { background: var(--surface-2); }
.post .avatar { flex: none; }
.post-main { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.post-name { font-weight: 620; font-size: 14px; }
.post-handle { font-size: 13px; color: var(--muted); }
.tick {
  display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 0;
  background: var(--blue); color: #fff; font-size: 9px; font-weight: 800;
}
.post-text { font-size: 14.5px; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-foot { display: flex; align-items: center; gap: 14px; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.linkbtn {
  background: none; border: none; color: var(--muted); cursor: pointer; padding: 0; font-size: 12.5px;
}
.linkbtn:hover { color: var(--accent); text-decoration: underline; }

/* ---------- reorderable tiles ---------- */
.tile[draggable] { cursor: grab; }
.tile.dragging { opacity: .45; }
.tile.drop-target { outline: 2px dashed var(--accent); outline-offset: 2px; }
.reorder { display: flex; gap: 2px; margin-left: auto; }
.reorder button {
  width: 24px; height: 24px; border-radius: 0; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text-2); cursor: pointer; font-size: 12px; line-height: 1;
  display: grid; place-items: center; padding: 0;
}
.reorder button:hover { background: var(--surface-3); color: var(--text); }
.grip { color: var(--muted); cursor: grab; font-size: 13px; letter-spacing: -2px; }

/* ---------- rivalries ---------- */
.feud { cursor: pointer; }
.feud:hover { border-color: var(--border-2); }
.feud.is-done { opacity: .72; }
.feud-sides { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.feud-side {
  flex: 1; min-width: 150px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 12px; display: flex; flex-direction: column; gap: 6px;
}
.feud-side.leads { border-color: var(--gold); }
.feud-avs { display: flex; }
.feud-avs .avatar + .avatar { margin-left: -9px; border: 2px solid var(--bg-soft); }
.feud-side-name { font-weight: 600; font-size: 14px; }
.feud-score { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.feud-vs {
  align-self: center; font-size: 11px; letter-spacing: .12em; color: var(--muted); font-weight: 700;
}
.intensity { color: var(--accent); font-size: 11px; letter-spacing: 2px; }
.intensity .dim { color: var(--border-2); }

/* ---------- champion markers ---------- */
.belt {
  display: inline-flex; align-items: center; gap: 2px; color: var(--gold);
  vertical-align: -3px; margin-left: 5px;
}
.belt svg { width: 15px; height: 15px; }
.belt-n { font-size: 10.5px; font-weight: 700; }

.champ-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1px;
  background: var(--border); }
.champ {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--surface);
  cursor: pointer;
}
.champ:hover { background: var(--surface-2); }
.champ-body { flex: 1; min-width: 0; }
.champ-title { font-size: 12px; color: var(--gold); font-weight: 650; text-transform: uppercase;
  letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.champ-holder { font-size: 14.5px; font-weight: 570; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.champ-meta { font-size: 12px; color: var(--muted); }

.brand-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------- calendar ----------
   Bigger cells, and a show is its logo rather than a line of text.
   On a phone the names drop away and the logos carry it — tapping a
   day opens the detail panel underneath. */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.cal-dow {
  padding: 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 650; text-align: center; border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.cal-cell {
  min-height: 132px; padding: 8px 8px 10px; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border); cursor: pointer; display: flex; flex-direction: column; gap: 6px;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.is-picked { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-blank { background: var(--bg-soft); cursor: default; }
.cal-blank:hover { background: var(--bg-soft); }
.cal-num { font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 560; }
.cal-cell.is-today .cal-num {
  color: #fff; background: var(--accent); width: 25px; height: 25px; border-radius: 0;
  display: grid; place-items: center; font-weight: 700;
}
.cal-evs { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cal-ev {
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--evc, var(--border-2));
  border-radius: 0; padding: 5px 7px; font-size: 12px; display: flex; gap: 7px; align-items: center;
  overflow: hidden; min-width: 0;
}
.cal-ev:hover { background: var(--surface-3); }
.cal-logo {
  width: 26px; height: 26px; border-radius: 0; object-fit: cover; flex: none;
  background: var(--surface-3);
}
.cal-logo-fallback {
  display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 12px;
}
.cal-ev-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-count { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; font-size: 11px; }

@media (max-width: 860px) {
  .cal-cell { min-height: 84px; padding: 5px 4px 7px; gap: 4px; }
  .cal-num { font-size: 12px; }
  .cal-cell.is-today .cal-num { width: 20px; height: 20px; font-size: 11px; }
  /* logos only — a name has nowhere to go in 45px */
  .cal-ev {
    padding: 0; border: none; background: none; border-left: none;
    justify-content: center;
  }
  .cal-ev:hover { background: none; }
  .cal-ev-name, .cal-ev-count { display: none; }
  .cal-logo { width: 30px; height: 30px; border-radius: 0; box-shadow: 0 0 0 1.5px var(--evc, var(--border-2)); }
  .cal-evs { gap: 4px; align-items: center; }
}

/* ---------- timeline ---------- */
.timeline { padding: 6px 18px 16px; }
.tl-item { display: flex; gap: 12px; padding: 9px 0; position: relative; }
.tl-item[data-ev] { cursor: pointer; }
.tl-item[data-ev]:hover .tl-title { color: var(--accent); }
.tl-item::before {
  content: ""; position: absolute; left: 4px; top: 22px; bottom: -9px; width: 1px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--border-2); margin-top: 6px; flex: none; z-index: 1;
  box-shadow: 0 0 0 3px var(--surface);
}
.tl-dot.gold { background: var(--gold); }
.tl-dot.green { background: var(--green); }
.tl-dot.red { background: var(--accent); }
.tl-body { min-width: 0; }
.tl-title { font-size: 14px; font-weight: 570; }
.tl-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- news extras ---------- */
.news-img {
  width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r-sm);
  margin-bottom: 9px; display: block; border: 1px solid var(--border);
}
.news-sub { font-size: 13.5px; color: var(--text-2); margin-top: 2px; font-weight: 500; }

/* ---------- misc ---------- */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.clickable { cursor: pointer; }
.hero {
  display: flex; gap: 18px; align-items: center; padding: 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r); flex-wrap: wrap;
}
.hero-main { flex: 1; min-width: 200px; }
.hero-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.hero-sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.recordline { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.recordline div { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.recordline b { display: block; font-size: 21px; color: var(--text); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; }

.help h2 { font-size: 17px; margin: 26px 0 8px; }
.help h3 { font-size: 14.5px; margin: 18px 0 6px; color: var(--text-2); }
.help p, .help li { color: var(--text-2); font-size: 14px; }
.help ol, .help ul { padding-left: 20px; margin: 6px 0; }
.help li { margin: 4px 0; }
.help code { background: var(--surface-3); padding: 1px 6px; border-radius: 0; font-size: 13px; }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 860px) {
  .only-mobile { display: flex; }

  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 95; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: none; }

  .content { padding: 16px 14px 96px; }
  .topbar { padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); }
  .topbar-title h1 { font-size: 17px; }

  .tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: flex;
    background: rgba(20,20,23,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px;
    background: none; border: none; color: var(--muted); font-size: 10.5px; cursor: pointer; font-weight: 550;
  }
  .tab svg { width: 21px; height: 21px; }
  .tab.active { color: var(--accent); }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-auto { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .modal-scrim { padding: 0; align-items: flex-end; }
  .modal { max-width: none; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92dvh; border-bottom: none; }
  .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .hero-title { font-size: 20px; }
  .toast-root { bottom: 84px; }
  .stat-value { font-size: 22px; }
}

@media (max-width: 460px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tab { font-size: 10px; }
}

@media print {
  .sidebar, .tabbar, .topbar-actions { display: none !important; }
}


/* ============================================================
   Compact standings
   Tight rows that still breathe: smaller type, less padding,
   numbers held in tabular figures so columns line up.
   ============================================================ */
.tbl-compact { font-size: 13px; }
.tbl-compact th {
  padding: 6px 8px; font-size: 10.5px; letter-spacing: .07em;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.tbl-compact td { padding: 4px 8px; }
.tbl-compact .rank { width: 28px; font-size: 12px; }
.tbl-compact .person-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.tbl-compact .person-sub {
  font-size: 11px; line-height: 1.25; max-width: 320px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tbl-compact .num { font-variant-numeric: tabular-nums; }
.tbl-compact .avatar { flex: none; }
.tbl-compact tbody tr { transition: background .12s; }

/* the Recent column is the first thing to go when space is tight */
@media (max-width: 900px) {
  .tbl-compact th:nth-last-child(1), .tbl-compact td:nth-last-child(1) { display: none; }
}
@media (max-width: 640px) {
  .tbl-compact th:nth-child(3), .tbl-compact td:nth-child(3),
  .tbl-compact th:nth-child(7), .tbl-compact td:nth-child(7) { display: none; }
  .tbl-compact .person-sub { max-width: 140px; }
}

/* ============================================================
   Champions in the standings
   A gold wash across the row and a slow breathing outline.
   ============================================================ */
.champ-row td {
  background: linear-gradient(90deg,
    rgba(217,164,65,.16) 0%,
    rgba(217,164,65,.07) 38%,
    rgba(217,164,65,0) 78%);
}
.champ-row td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.champ-row td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.champ-row .person-name { color: #f4dfae; }
.champ-row .rank { color: var(--gold); font-weight: 700; }
.champ-row .avatar { box-shadow: 0 0 0 2px rgba(217,164,65,.65); }

.champ-row {
  animation: champGlow 3.2s ease-in-out infinite;
  border-radius: 0;
}
@keyframes champGlow {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(217,164,65,.38), 0 0 0 rgba(217,164,65,0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(217,164,65,.95), 0 0 14px rgba(217,164,65,.28);
  }
}

.tbl-compact tbody tr.champ-row:hover td { background: rgba(217,164,65,.2); }

/* a still, clear highlight for anyone who would rather not have movement */
@media (prefers-reduced-motion: reduce) {
  .champ-row { animation: none; box-shadow: inset 0 0 0 1px rgba(217,164,65,.7); }
}


/* ---------- alignment marker ---------- */
.align {
  display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 0;
  font-size: 9.5px; font-weight: 800; margin-right: 6px; vertical-align: 1px;
  border: 1px solid currentColor;
}
.align-face   { color: #57d69c; background: rgba(53,180,124,.14); }
.align-heel   { color: #ff7b7f; background: rgba(229,72,77,.14); }
.align-tweener{ color: #b9a3e8; background: rgba(155,108,240,.14); }

/* ---------- remove-from-division button ---------- */
.rowx {
  width: 20px; height: 20px; border-radius: 0; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1;
  opacity: 0; transition: opacity .12s, background .12s, color .12s;
}
tr:hover .rowx { opacity: 1; }
.rowx:hover { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
@media (hover: none) { .rowx { opacity: .6; } }

/* ---------- the story so far ---------- */
.story-block + .story-block { border-top: 1px solid var(--border); padding-top: 14px; }
.story-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.story-list li { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.story-list b { color: var(--text); font-weight: 620; }

/* ---------- the tournament wizard ---------- */
.wizrail { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.wizrail::-webkit-scrollbar { display: none; }
.wizstep {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border); flex: none; font-size: 13px;
  color: var(--muted);
}
.wizstep.now { border-color: var(--accent); color: var(--text); }
.wizstep.done { color: var(--text-2); }
.wizdot {
  width: 20px; height: 20px; border-radius: 0; display: grid; place-items: center;
  background: var(--surface-3); font-size: 11px; font-weight: 700; flex: none;
}
.wizstep.now .wizdot { background: var(--accent); color: #fff; }
.wizstep.done .wizdot { background: var(--green); color: #fff; }
.wizfoot { display: flex; align-items: center; gap: 9px; padding-top: 4px; }

/* a big readable option you tap */
.choice {
  padding: 13px 16px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface-2); cursor: pointer;
}
.choice:hover { border-color: var(--border-2); }
.choice.on { border-color: var(--accent); background: var(--accent-dim); }
.choice-name { font-weight: 620; font-size: 14.5px; }
.choice-hint { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }

/* the eight roles, readable rather than a dropdown */
.rolegrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rolecard {
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface-2); cursor: pointer;
}
.rolecard:hover { border-color: var(--border-2); }
.rolecard.on { border-color: var(--accent); background: var(--accent-dim); }
.rolename { font-weight: 650; font-size: 14px; }
.rolebooks { font-size: 12.5px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.roleends { font-size: 12px; color: var(--muted); margin-top: 5px; font-style: italic; }

/* the night you are currently looking at */
.person-row.is-here { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
