/* ============================================================
   Moonwhisper Polls: "nocturnal war table"
   Extends the gamefin nocturnal control-room system:
   dark ink canvas · purple accent · glass cards · mono figures
   ============================================================ */

:root {
  /* surfaces */
  --ink:        #0f0d17;
  --ink-2:      #14111e;
  --surface:    #1b1828;
  --surface-2:  #221e33;
  --surface-3:  #2a2540;
  --line:        rgba(181,128,255,.13);
  --line-strong: rgba(181,128,255,.24);

  /* text */
  --text:     #ece9f6;
  --text-dim: #b4adca;
  --muted:    #8b84a3;

  /* brand */
  --purple:        #b580ff;
  --purple-2:      #9a6cf0;
  --purple-bright: #cdb2ff;
  --glow:          rgba(181,128,255,.30);

  /* roles: Tank / DPS / Healer carry real information here */
  --tank:   #73a8ff;  --tank-bg:   rgba(115,168,255,.13);
  --dps:    #ff6f86;  --dps-bg:    rgba(255,111,134,.13);
  --healer: #5fe3ad;  --healer-bg: rgba(95,227,173,.13);
  --warn:   #ffce73;  --warn-bg:   rgba(255,206,115,.12);
  --ok:     #5fe3ad;  --ok-bg:     rgba(95,227,173,.12);
  --danger: #ff6f86;  --danger-bg: rgba(255,111,134,.12);

  /* type */
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --radius:    16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -22px rgba(0,0,0,.85);
  --rail-w: 264px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bg-atmosphere {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 88% -8%, rgba(181,128,255,.16), transparent 60%),
    radial-gradient(700px 500px at -6% 12%, rgba(122,86,210,.12), transparent 55%),
    radial-gradient(1200px 800px at 50% 120%, rgba(95,70,160,.10), transparent 60%),
    var(--ink);
}
.bg-atmosphere::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(181,128,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}

a { color: var(--purple-bright); text-decoration: none; }
a:hover { color: var(--purple); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; line-height: 1.12; margin: 0; }

:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.4rem;
  background: rgba(15,13,23,.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: .65rem; }
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: radial-gradient(circle at 50% 38%, var(--surface-3), var(--ink-2));
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 22px -6px var(--glow);
}
.brand-mark img { width: 28px; height: 28px; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; color: var(--text); }
.brand-sub { font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--purple); }
.topnav { display: flex; gap: .3rem; }
.topnav a {
  padding: .45rem .85rem; border-radius: 999px;
  font-size: .88rem; font-weight: 600; color: var(--text-dim);
}
.topnav a:hover { color: var(--text); background: rgba(181,128,255,.08); }
.topnav a.active { color: var(--purple-bright); background: linear-gradient(90deg, rgba(181,128,255,.2), rgba(181,128,255,.07)); }

/* ============================================================
   Page frame: content + sticky roster rail
   ============================================================ */
.frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.2rem 1.6rem 5rem;
}
.frame.single { grid-template-columns: minmax(0, 1fr); max-width: 880px; }

/* page-load stagger, as on gamefin */
.flow > * { animation: rise .5s cubic-bezier(.2,.7,.3,1) both; }
.flow > *:nth-child(2) { animation-delay: .05s } .flow > *:nth-child(3) { animation-delay: .1s }
.flow > *:nth-child(4) { animation-delay: .15s } .flow > *:nth-child(n+5) { animation-delay: .2s }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .flow > * { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { margin-bottom: 2rem; }
.eyebrow {
  font: 600 .7rem/1 var(--font-mono);
  letter-spacing: .22em; text-transform: uppercase; color: var(--purple);
  margin: 0 0 .7rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 800; letter-spacing: -.02em;
  margin-bottom: .6rem;
}
.hero .lede { margin: 0; max-width: 46rem; color: var(--text-dim); font-size: 1.02rem; }
.hero .lede strong { color: var(--purple-bright); font-weight: 700; }

.voter-row { display: flex; align-items: flex-end; gap: .7rem; flex-wrap: wrap; margin-top: 1.3rem; }
.voter-row label { display: flex; flex-direction: column; gap: .35rem; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.voter-row input {
  width: 16rem; max-width: 70vw;
  padding: .6rem .75rem;
  font-family: var(--font-body); font-size: .98rem; color: var(--text);
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.voter-row input::placeholder { color: #5d566f; }
.voter-row input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(181,128,255,.18); }
.voter-note { font-size: .85rem; color: var(--muted); padding-bottom: .55rem; }
.voter-note.loaded { color: var(--ok); }

/* ============================================================
   Class chapters
   ============================================================ */
.class-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.class-card.drafted {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 34px -8px var(--glow), var(--shadow);
}

.class-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.class-title-wrap { min-width: 0; }
.class-kicker {
  display: flex; align-items: center; gap: .6rem;
  font: 600 .68rem/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .45rem;
}
.class-kicker .sep { color: var(--line-strong); }
.class-name { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; }
.class-tagline { color: var(--purple-bright); font-size: .92rem; font-weight: 600; margin-top: .15rem; }
.class-desc { color: var(--text-dim); font-size: .93rem; max-width: 44rem; margin: .8rem 0 0; }

.draft-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-body); font-weight: 700; font-size: .88rem;
  color: var(--purple-bright); cursor: pointer;
  background: rgba(181,128,255,.1);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: .55rem 1.05rem;
  transition: background .16s, color .16s, box-shadow .16s, border-color .16s;
}
.draft-btn:hover { background: rgba(181,128,255,.2); color: #fff; }
.draft-btn[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  border-color: transparent;
  box-shadow: 0 10px 24px -12px var(--glow);
}
.draft-btn .tick { display: none; }
.draft-btn[aria-pressed="true"] .tick { display: inline; }

.sub-count {
  display: flex; align-items: baseline; gap: .5rem;
  margin: 1.1rem 0 .7rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.sub-count b { font-family: var(--font-mono); font-size: .85rem; color: var(--purple-bright); letter-spacing: 0; }
.sub-count.full b { color: var(--ok); }
.locked-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .22rem .6rem; border-radius: 999px;
  font: 700 .68rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  color: var(--warn); background: var(--warn-bg); border: 1px solid rgba(255,206,115,.3);
}

/* subclass candidate grid */
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: .8rem; }

.sub-card {
  position: relative;
  display: flex; flex-direction: column; gap: .45rem;
  padding: .95rem 1rem 1rem;
  background: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.sub-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.sub-card input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.sub-card:has(:focus-visible) { outline: 2px solid var(--purple); outline-offset: 2px; }
.sub-card.picked {
  background: linear-gradient(180deg, rgba(181,128,255,.14), rgba(181,128,255,.05)), var(--ink-2);
  border-color: var(--purple);
  box-shadow: 0 0 20px -8px var(--glow);
}
.sub-card.locked { cursor: default; }
.sub-card.locked:hover { transform: none; }

.sub-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sub-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--text); }
.sub-seal {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); color: transparent;
  font-size: .7rem; font-weight: 800;
  transition: all .16s;
}
.sub-card.picked .sub-seal { background: var(--purple); border-color: var(--purple); color: #fff; box-shadow: 0 0 10px var(--glow); }

.sub-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center;
  padding: .14rem .5rem; border-radius: 999px;
  font: 700 .64rem/1.4 var(--font-body); letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid transparent;
}
.chip.role-tank   { color: var(--tank);   background: var(--tank-bg);   border-color: rgba(115,168,255,.28); }
.chip.role-dps    { color: var(--dps);    background: var(--dps-bg);    border-color: rgba(255,111,134,.28); }
.chip.role-healer { color: var(--healer); background: var(--healer-bg); border-color: rgba(95,227,173,.28); }
.chip.pitch { color: var(--muted); background: rgba(139,132,163,.1); border-color: rgba(139,132,163,.25); font-family: var(--font-mono); letter-spacing: .04em; }
.chip.writein { color: var(--purple-bright); background: rgba(181,128,255,.1); border-color: var(--line-strong); }

/* the write-in card */
.sub-card.other { border-style: dashed; }
.sub-card.other.picked { border-style: solid; }
.other-input {
  width: 100%; margin-top: .1rem;
  padding: .5rem .6rem;
  font-family: var(--font-body); font-size: .88rem; color: var(--text);
  background: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.other-input::placeholder { color: #5d566f; }
.other-input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(181,128,255,.18); }

.sub-desc { margin: 0; font-size: .84rem; color: var(--text-dim); }
.sub-flag { display: flex; gap: .4rem; margin-top: auto; font-size: .76rem; font-weight: 600; color: var(--warn); }
.sub-flag::before { content: "▲"; font-size: .6rem; line-height: 1.6; }

/* shake when a full limit is hit */
@keyframes nudge { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.nudge { animation: nudge .25s ease; }
@media (prefers-reduced-motion: reduce) { .nudge { animation: none; } }

/* ============================================================
   Roster rail: the war table
   ============================================================ */
.rail-wrap { position: relative; }
.rail {
  position: sticky; top: 76px;
  display: flex; flex-direction: column; gap: 1rem;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.rail-title { font: 600 .68rem/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.rail-title b { color: var(--purple-bright); letter-spacing: 0; }

.slots { display: flex; flex-direction: column; gap: .45rem; }
.slot {
  display: flex; align-items: center; gap: .6rem;
  min-height: 40px;
  padding: .4rem .7rem;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  color: var(--muted); font-size: .8rem;
  transition: border-color .2s, background .2s;
}
.slot .slot-n { font: 700 .72rem/1 var(--font-mono); color: var(--line-strong); width: 1rem; flex: none; }
.slot.filled {
  border-style: solid; border-color: var(--purple);
  background: linear-gradient(90deg, rgba(181,128,255,.16), rgba(181,128,255,.04));
  color: var(--text);
}
.slot.filled .slot-n { color: var(--purple); }
.slot .slot-name { font-family: var(--font-display); font-weight: 700; font-size: .95rem; }

/* drafts beyond the five that ship */
.slot.over.filled {
  border-color: rgba(255,206,115,.55);
  background: linear-gradient(90deg, rgba(255,206,115,.13), rgba(255,206,115,.03));
}
.slot.over.filled .slot-n { color: var(--warn); }
.rail-title b.over { color: var(--warn); }

.pip-rows { display: flex; flex-direction: column; gap: .3rem; }
.pip-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .78rem; color: var(--text-dim); }
.pip-row .pips { display: flex; gap: .25rem; }
.pip { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-strong); transition: background .18s, box-shadow .18s, border-color .18s; }
.pip.on { background: var(--purple); border-color: var(--purple); box-shadow: 0 0 7px var(--glow); }
.pip-row.done { color: var(--text); }
.pip-row.done .pip.on { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 7px rgba(95,227,173,.4); }

.rail-status { font-size: .8rem; color: var(--muted); min-height: 1.2em; }
.rail-status.err { color: var(--danger); }
.rail-status.ok { color: var(--ok); }

.cast-btn {
  font-family: var(--font-body); font-weight: 700; font-size: .95rem; color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  border: 0; border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  box-shadow: 0 10px 24px -12px var(--glow);
  transition: transform .14s, box-shadow .14s, filter .14s, opacity .14s;
}
.cast-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.cast-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ============================================================
   Results
   ============================================================ */
.count-line { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.count-line .big { font-family: var(--font-mono); font-weight: 700; font-size: 2rem; color: var(--purple-bright); }
.count-line .who { color: var(--muted); font-size: .85rem; }

.tally-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow);
}
.tally-card h2 { font-size: 1.35rem; font-weight: 800; }
.tally-card .tally-sub { color: var(--muted); font-size: .85rem; margin: .2rem 0 1.1rem; }

.bars { display: flex; flex-direction: column; gap: .55rem; }
.bar-row { display: grid; grid-template-columns: 11rem 1fr 2.2rem; align-items: center; gap: .8rem; }
.bar-label { display: flex; align-items: center; gap: .45rem; min-width: 0; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-label .chip { flex: none; }
.bar-track { display: block; height: 14px; border-radius: 7px; background: var(--ink-2); border: 1px solid var(--line); overflow: hidden; }
.bar-fill {
  display: block; height: 100%; border-radius: 2px 7px 7px 2px; /* rounded data-end, square-ish baseline */
  background: linear-gradient(90deg, var(--purple-2), var(--purple));
  box-shadow: 0 0 12px -2px var(--glow);
  transition: width .6s cubic-bezier(.2,.7,.3,1);
}
.bar-val { font: 700 .85rem/1 var(--font-mono); color: var(--text); text-align: right; }
.bar-row.below { opacity: .5; }
.bar-row.below .bar-fill { background: var(--surface-3); box-shadow: none; }

.cut-line {
  display: flex; align-items: center; gap: .7rem;
  margin: .5rem 0;
  color: var(--warn); font: 600 .68rem/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase;
}
.cut-line::before, .cut-line::after { content: ""; flex: 1; border-top: 1px dashed rgba(255,206,115,.45); }

.results-empty { color: var(--muted); text-align: center; padding: 3rem 1rem; }

/* ============================================================
   Info modal
   ============================================================ */
.info-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-body); font-weight: 600; font-size: .82rem;
  color: var(--text-dim); cursor: pointer;
  background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem .85rem;
  transition: color .15s, border-color .15s, background .15s;
}
.info-btn:hover { color: var(--purple-bright); border-color: var(--line-strong); background: rgba(181,128,255,.08); }

/* tiny round variant on subclass cards */
.info-btn.mini {
  width: 20px; height: 20px; padding: 0; justify-content: center;
  font: 700 .68rem/1 var(--font-mono); font-style: normal;
  color: var(--muted); border-radius: 50%;
}
.info-btn.mini:hover { color: var(--purple-bright); }
.sub-top .sub-tools { display: flex; align-items: center; gap: .4rem; flex: none; }

dialog.modal {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 0; max-width: 640px; width: calc(100% - 2rem);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  color: var(--text);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.9);
}
dialog.modal::backdrop { background: rgba(8,6,14,.65); backdrop-filter: blur(3px); }
.modal-body { padding: 1.6rem 1.7rem 1.5rem; }
.modal-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .6rem; }
.modal-chips { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.modal-content p { margin: 0 0 .85rem; color: var(--text-dim); font-size: .93rem; }
.modal-content p:last-child { margin-bottom: 0; }
.modal-content .modal-flag { color: var(--warn); font-weight: 600; font-size: .85rem; }
.modal-roster { list-style: none; margin: .3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.modal-roster li { display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--text); font-weight: 600; }
.modal-roster .chip { flex: none; }
.modal-roster .li-note { color: var(--muted); font-weight: 400; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-sect { margin: 1.1rem 0 .5rem; font: 600 .68rem/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 1.2rem; }
button.ghost {
  font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  background: var(--ink-2); color: var(--text-dim);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .55rem 1rem; cursor: pointer;
  transition: color .15s, border-color .15s;
}
button.ghost:hover { color: var(--text); border-color: var(--purple); }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%) translateY(8px);
  z-index: 60;
  padding: .7rem 1.1rem; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px -20px #000;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(95,227,173,.4); color: var(--ok); }
.toast.err { border-color: rgba(255,111,134,.4); color: var(--danger); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .frame { grid-template-columns: minmax(0, 1fr); padding-bottom: 9.5rem; }
  .rail-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; }
  .rail {
    position: static;
    flex-direction: row; align-items: center; flex-wrap: wrap; gap: .6rem .9rem;
    border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0;
    background: rgba(21,17,32,.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  }
  .rail-title { display: none; }
  .pip-rows { display: none; }
  .slots { flex-direction: row; gap: .35rem; flex: 1; }
  .slot { min-height: 34px; padding: .25rem .5rem; flex: 1; min-width: 0; justify-content: center; }
  .slot .slot-n { display: none; }
  .slot .slot-name { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .slot .slot-hint { display: none; }
  .rail-status { flex-basis: 100%; order: 3; text-align: center; min-height: 0; }
  .cast-btn { padding: .65rem 1.1rem; }
  .class-head { flex-direction: column; }
  .bar-row { grid-template-columns: minmax(0, 8.5rem) 1fr 2rem; }
}
