/* RINGOUT. The LINX midnight palette (linx/src/templates/design.js): purple
   and gold on deep navy; Russo One for words that shout, Chakra Petch for the
   interface, Oxanium for every number. Flat surfaces; the arena carries the
   show. No blur, no glow, no gradients in the interface. */

:root {
  --bg: #0d0d20;
  --bg-2: #111128;
  --surface: #17162f;
  --surface2: #1e1d35;
  --surface3: #272640;
  --surface-hi: #32304f;
  --border: rgba(167, 139, 250, 0.1);
  --border-strong: rgba(167, 139, 250, 0.18);
  --text-strong: #f8fafc;
  --text: #e2e8f0;
  --muted2: #a3a1c2;
  --muted: #8e8cb0;
  --brand: #8b5cf6;
  --brand-bright: #a78bfa;
  --brand-fill: #7c3aed;
  --brand-deep: #251b4f;
  --cta: #fbbf24;
  --cta-bright: #fcd34d;
  --cta-edge: #b7791f;
  --cta-ink: #1a1206;
  --pos: #22c55e;
  --pos-bright: #4ade80;
  --red: #f43f5e;
  --red-hot: #fb7185;
  --font-display: "Russo One", "Chakra Petch", system-ui, sans-serif;
  --font-num: "Oxanium", "Chakra Petch", system-ui, sans-serif;
  --font-sans: "Chakra Petch", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side: 392px;
  --top: 52px;
  --r: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

button:disabled {
  cursor: default;
}

a {
  color: var(--brand-bright);
}

:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.num.up {
  color: var(--pos-bright);
}

.num.down {
  color: var(--red-hot);
}

.dim {
  color: var(--muted);
}

.ic {
  display: block;
  flex: none;
}

.linkish {
  color: var(--brand-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-align: left;
}

/* ------------------------------------------------------------ layout */
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side);
  grid-template-rows: var(--top) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

.top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.mark {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-strong);
  text-decoration: none;
  flex: none;
}

.round {
  color: var(--muted2);
  font-size: 14px;
  flex: none;
}

.hist-top {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.tright {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: none;
}

.bal {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--r);
  background: var(--surface2);
  font-size: 16px;
}

.bal small {
  color: var(--muted2);
  font-size: 12px;
}

.bal.hidden {
  color: var(--muted);
  font-size: 13px;
}

.name-btn {
  padding: 6px 10px;
  border-radius: var(--r);
  color: var(--muted2);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-btn:hover {
  background: var(--surface2);
  color: var(--text);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  color: var(--muted2);
}

.icon-btn:hover,
.icon-btn.on {
  background: var(--surface2);
  color: var(--text-strong);
}

.icon-btn.on {
  color: var(--cta);
}

/* ------------------------------------------------------------ the stage */
.stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0b0a1c;
  min-height: 0;
}

.arena {
  position: absolute;
  inset: 0;
}

.arena-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
}

.tags {
  position: absolute;
  inset: 0;
  z-index: 0;
  isolation: isolate;
  pointer-events: none;
  overflow: hidden;
}

.tag {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 3px 8px 3px 7px;
  border-left: 3px solid var(--c);
  border-radius: 4px;
  background: rgba(13, 13, 32, 0.84);
  color: var(--text-strong);
  font-size: 12px;
  white-space: nowrap;
  will-change: transform;
}

.tag b {
  font-weight: 600;
}

.tag span {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--cta);
}

.tag.on {
  background: var(--brand-deep);
}

/* the knock clock */
.clock {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, calc(100% - 300px));
  min-width: 300px;
  pointer-events: none;
}

.track {
  position: relative;
  height: 26px;
  border-radius: 6px;
  background: rgba(13, 13, 32, 0.86);
  border: 1px solid var(--border-strong);
}

.lobby-seg {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 6px 0 0 6px;
  background: var(--brand-deep);
}

.notch {
  position: absolute;
  top: 2px;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--surface3);
  color: var(--muted2);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
}

.notch.done {
  background: var(--c);
  color: #0d0d20;
}

.notch.next {
  box-shadow: inset 0 0 0 2px var(--cta);
  color: var(--text-strong);
}

.cut {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(244, 63, 94, 0.55);
}

.head {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: var(--cta);
}

.status {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  text-shadow: 0 1px 2px #000;
}

.status .word {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
}

.status .big {
  font-size: 24px;
  color: var(--cta);
  min-width: 3.2ch;
}

.clock.final .status .big {
  font-size: 34px;
}

/* kill feed */
.kills {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.kills li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 6px;
  background: rgba(13, 13, 32, 0.86);
  font-size: 13px;
  animation: slidein 0.25s ease-out;
}

.kills .n {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--c);
  color: #0d0d20;
  font-size: 11px;
}

.kills .who {
  font-weight: 700;
  color: var(--text-strong);
}

.kills .what {
  color: var(--muted2);
}

@keyframes slidein {
  from {
    transform: translateX(-16px);
    opacity: 0;
  }
}

/* call-outs */
.callout {
  position: absolute;
  left: 50%;
  top: 27%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  animation: callout 1.5s ease-out both;
}

.callout .what {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 44px);
  color: var(--text-strong);
  padding: 2px 14px;
  background: rgba(13, 13, 32, 0.78);
  border-bottom: 5px solid var(--c);
  border-radius: 6px;
  white-space: nowrap;
}

.callout.win .what {
  border-bottom-color: var(--cta);
}

.callout .sub {
  font-size: 16px;
  font-weight: 600;
  color: var(--cta);
  padding: 2px 10px;
  background: rgba(13, 13, 32, 0.78);
  border-radius: 4px;
}

@keyframes callout {
  0% {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
  }
  10% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -54%) scale(1);
  }
}

/* room toasts */
.toasts {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-width: 320px;
}

.toasts li {
  padding: 5px 10px;
  border-radius: 6px;
  border-left: 3px solid var(--c, var(--brand));
  background: rgba(13, 13, 32, 0.88);
  font-size: 13px;
  animation: slidein-r 0.25s ease-out;
}

.toasts li.sell {
  border-left-color: var(--cta);
}

.toasts li.near {
  border-left-color: var(--red);
  font-weight: 600;
}

.toasts .linkish {
  color: inherit;
  text-decoration: none;
}

.toasts .linkish:hover {
  text-decoration: underline;
}

@keyframes slidein-r {
  from {
    transform: translateX(16px);
    opacity: 0;
  }
}

/* reactions */
.floats {
  position: absolute;
  right: 22px;
  bottom: 64px;
  width: 120px;
  height: 220px;
  pointer-events: none;
}

.float {
  position: absolute;
  right: var(--x);
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--cta);
  animation: rise 3.2s ease-out both;
}

.float small {
  font-size: 10px;
  color: var(--muted2);
}

@keyframes rise {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  10% {
    transform: translateY(-14px) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translateY(-190px) scale(1);
    opacity: 0;
  }
}

.reacts {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r);
  background: rgba(13, 13, 32, 0.86);
}

.react {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--muted2);
}

.react:hover {
  background: var(--surface3);
  color: var(--cta);
}

.react:active {
  transform: scale(0.9);
}

/* recap */
.recap {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  max-height: calc(100% - 120px);
  overflow-y: auto;
  padding: 16px 18px 14px;
  border-radius: 10px;
  background: var(--surface);
  border-top: 5px solid var(--c);
  animation: recapin 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.2) both;
}

@keyframes recapin {
  from {
    transform: translate(-50%, 24px);
    opacity: 0;
  }
}

.recap .x {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--muted);
}

.recap .who {
  display: flex;
  gap: 14px;
  align-items: center;
}

.recap .round {
  margin: 0;
  color: var(--muted2);
  font-size: 13px;
}

.recap h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 34px;
  color: var(--text-strong);
}

.recap .price {
  margin: 0;
  color: var(--muted2);
}

.recap .price .num {
  color: var(--cta);
  font-size: 18px;
}

.recap dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 12px 0 8px;
}

.recap dl div {
  min-width: 0;
}

.recap dt {
  font-size: 12px;
  color: var(--muted);
}

.recap dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.recap .you {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface2);
}

.recap .you.up {
  box-shadow: inset 3px 0 0 var(--pos);
}

.recap .you.down {
  box-shadow: inset 3px 0 0 var(--surface-hi);
}

.recap .near {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  color: var(--red-hot);
}

.recap .row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--r);
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.ghost:hover {
  background: var(--surface3);
}

.cta {
  padding: 10px 18px;
  border-radius: var(--r);
  background: var(--cta);
  color: var(--cta-ink);
  font-weight: 700;
}

.cta:hover {
  background: var(--cta-bright);
}

.spectate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 14px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--brand-deep);
  border: 1px solid var(--border-strong);
}

.spectate p {
  margin: 0;
  font-size: 14px;
}

.err {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 8px 14px;
  border-radius: var(--r);
  background: #3a0d1a;
  border: 1px solid var(--red);
  color: #ffe4e6;
  font-size: 14px;
  cursor: pointer;
}

.offline {
  position: absolute;
  left: 50%;
  top: 70px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: var(--r);
  background: var(--surface3);
  font-size: 13px;
}

/* ------------------------------------------------------------ the side */
.side {
  overflow-y: auto;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  padding: 10px 12px 16px;
  min-height: 0;
}

.side h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
}

.side section {
  margin-bottom: 12px;
}

.stake {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.stake .lbl {
  font-size: 13px;
  color: var(--muted2);
  flex: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 13px;
}

.chip:hover {
  background: var(--surface3);
}

.chip.on {
  background: var(--brand-fill);
  color: #fff;
}

.custom {
  display: flex;
  gap: 4px;
}

.custom input {
  width: 92px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--brand);
  background: var(--surface);
  font-family: var(--font-num);
  font-weight: 700;
}

.topup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: var(--r);
  background: var(--brand-deep);
  font-size: 14px;
}

/* market */
.side {
  container-type: inline-size;
}

.market ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mhead {
  display: grid;
  grid-template-columns: 1fr 56px 74px 98px;
  gap: 6px;
  padding: 0 4px 4px 54px;
  font-size: 11px;
  color: var(--muted);
}

.mhead .r {
  text-align: right;
}

.brow {
  display: grid;
  grid-template-columns: 42px 1fr 56px 74px 98px;
  gap: 6px;
  align-items: center;
  padding: 5px 4px;
  border-radius: var(--r);
  border-left: 3px solid var(--c);
  margin-bottom: 3px;
  background: var(--surface);
  transition: opacity 0.4s;
}

.brow.focus {
  background: var(--surface2);
}

.brow.out {
  opacity: 0.42;
}

.brow.won {
  box-shadow: inset 0 0 0 2px var(--cta);
}

.bname {
  min-width: 0;
}

.bname strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  color: var(--text-strong);
}

.bname small {
  display: block;
  font-size: 11px;
  color: var(--muted2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bname small.two {
  white-space: normal;
  line-height: 1.25;
}

.form {
  font-weight: 700;
}

.form.f8 {
  color: var(--pos-bright);
}

.form.f9 {
  color: #a7f3d0;
}

.form.f10 {
  color: var(--muted2);
}

.form.f11 {
  color: #fdba74;
}

.form.f12 {
  color: var(--red-hot);
}

.mine {
  color: var(--cta);
  font-weight: 600;
}

.chance {
  font-size: 14px;
  color: var(--text);
}

.room {
  position: relative;
  font-size: 12px;
  color: var(--muted2);
  padding-bottom: 5px;
}

.room .bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--c);
  transition: width 0.4s;
}

.back {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  height: 42px;
  padding: 2px 10px;
  border-radius: var(--r);
  background: var(--cta);
  color: var(--cta-ink);
  line-height: 1.1;
}

.back:hover:not(:disabled) {
  background: var(--cta-bright);
}

.back:active:not(:disabled) {
  transform: translateY(1px);
}

.back .lbl {
  font-size: 11px;
  font-weight: 700;
}

.back .num {
  font-size: 17px;
}

.back .num.up,
.back .num.down {
  color: inherit;
}

.back:disabled {
  background: var(--surface3);
  color: var(--muted);
}

.gone {
  text-align: right;
  font-weight: 700;
  color: var(--muted);
  padding-right: 10px;
}

.brow.won .gone {
  color: var(--cta);
}

/* tickets */
.tickets ul,
.following ul,
.room-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tickets.empty p {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted2);
  font-size: 13px;
}

.tickets .sum {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted2);
}

.tickets .sum .num {
  color: var(--text-strong);
  font-size: 14px;
}

.tk {
  display: grid;
  grid-template-columns: 34px 1fr auto 64px;
  gap: 8px;
  align-items: center;
  padding: 5px 6px;
  border-radius: var(--r);
  background: var(--surface);
  border-left: 3px solid var(--c);
  margin-bottom: 3px;
}

.tk .tinfo strong {
  font-size: 14px;
  color: var(--text-strong);
}

.tk .tinfo small {
  display: block;
  font-size: 11px;
  color: var(--muted2);
}

.tk .val .num {
  font-size: 18px;
}

.tk .val.up .num {
  color: var(--pos-bright);
}

.tk .val.down .num {
  color: var(--red-hot);
}

.sell {
  height: 36px;
  border-radius: var(--r);
  background: var(--brand-fill);
  color: #fff;
  font-weight: 700;
}

.sell:hover:not(:disabled) {
  background: var(--brand);
}

.sell:disabled {
  background: var(--surface3);
  color: var(--muted);
}

.tk .closed {
  grid-column: 3 / 5;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted2);
}

.tk.won .closed {
  color: var(--cta);
}

.tk.sold .closed {
  color: var(--pos-bright);
}

.tk.lost {
  opacity: 0.55;
}

.following li,
.room-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 6px;
  border-left: 3px solid var(--c);
  font-size: 13px;
}

.room-list li .linkish {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-list h3 .dim {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* history */
.history {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

.history a {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
  border-bottom: 3px solid var(--c);
  color: var(--text);
  text-decoration: none;
  font-size: 11px;
  line-height: 1.15;
}

.history a:hover {
  background: var(--surface2);
}

.history .hn {
  font-weight: 700;
}

.history .num {
  font-size: 11px;
  color: var(--muted2);
}

.hist-side {
  display: none;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* faces */
.face {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c);
  flex: none;
}

.face img {
  display: block;
  width: 100%;
  height: 100%;
}

.face.out img {
  filter: grayscale(1) brightness(0.7);
}

/* modals */
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 5, 15, 0.72);
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.modal header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: var(--surface);
}

.modal h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--text-strong);
}

.modal .x {
  color: var(--muted);
}

.mbody {
  padding: 0 16px 16px;
}

.mbody h3 {
  margin: 14px 0 4px;
  font-size: 15px;
  color: var(--text-strong);
}

.mbody p {
  margin: 0 0 8px;
  color: var(--text);
}

.weights {
  border-collapse: collapse;
  margin: 6px 0;
  font-size: 13px;
}

.weights th,
.weights td {
  padding: 3px 12px 3px 0;
  text-align: left;
}

.weights th {
  color: var(--muted);
  font-weight: 500;
}

.records {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 12px;
}

.records div {
  padding: 10px;
  border-radius: var(--r);
  background: var(--surface2);
}

.records dt {
  font-size: 12px;
  color: var(--muted2);
}

.records dd {
  margin: 2px 0 0;
  font-size: 20px;
  color: var(--text-strong);
}

.namef {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.namef input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--r);
  border: 1px solid var(--border-strong);
  background: var(--surface2);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-list > button,
.menu-list > a {
  display: block;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.menu-list > button:hover,
.menu-list > a:hover {
  background: var(--surface3);
}

.menu-list small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted2);
}

/* ------------------------------------------------------------ verify page */
.verify {
  min-height: 100vh;
}

.verify .top {
  height: var(--top);
}

.verify main {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.vform {
  display: flex;
  align-items: end;
  gap: 8px;
}

.vform label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted2);
}

.vform input {
  width: 140px;
  padding: 8px 10px;
  border-radius: var(--r);
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  font-family: var(--font-num);
  font-weight: 700;
}

.recent a {
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  border-bottom: 2px solid var(--c);
  text-decoration: none;
  font-family: var(--font-num);
}

.verify h2 {
  font-family: var(--font-display);
  font-weight: 400;
}

.verify h2.ok {
  color: var(--pos-bright);
}

.verify h2.bad {
  color: var(--red-hot);
}

.checks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: var(--r);
  background: var(--surface);
  border-left: 3px solid var(--pos);
}

.checks li.bad {
  border-left-color: var(--red);
}

.checks code,
.verify code {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted2);
  word-break: break-all;
}

.steps-wrap {
  overflow-x: auto;
}

.steps,
.vt {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}

.steps th,
.steps td,
.vt th,
.vt td {
  padding: 4px 8px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.steps thead th {
  border-bottom: 2px solid var(--c, var(--border));
}

.steps tbody th,
.vt td:first-child,
.vt th:first-child {
  text-align: left;
}

.err-inline {
  color: var(--red-hot);
}

.how {
  margin-top: 28px;
  color: var(--muted2);
}

/* ------------------------------------------------------------ streamer mode */
.streamer .clock {
  width: min(720px, calc(100% - 300px));
}

.streamer .status .word {
  font-size: 19px;
}

.streamer .status .big {
  font-size: 32px;
}

.streamer .clock.final .status .big {
  font-size: 46px;
}

.streamer .kills li {
  font-size: 16px;
  padding: 6px 12px 6px 6px;
}

.streamer .kills .n {
  width: 24px;
  height: 24px;
  font-size: 13px;
}

.streamer .toasts li {
  font-size: 15px;
}

.streamer .tag {
  font-size: 14px;
}

/* the bottom left of the arena stays clear for a camera */
.streamer .recap {
  left: auto;
  right: 16px;
  transform: none;
  animation: none;
}

.streamer .err {
  left: auto;
  right: 12px;
  transform: none;
}

/* ------------------------------------------------------------ phones */
@media (max-width: 760px) {
  :root {
    --top: 48px;
  }

  .app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
  }

  .top {
    flex: none;
    height: var(--top);
    gap: 8px;
    padding: 0 8px;
  }

  .mark {
    font-size: 18px;
  }

  .round,
  .hist-top,
  .name-btn {
    display: none;
  }

  .bal {
    font-size: 14px;
    padding: 5px 8px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .stage {
    flex: none;
    height: 45vh;
    height: 45dvh;
    min-height: 250px;
    max-height: 520px;
  }

  .clock {
    top: 8px;
    width: calc(100% - 16px);
    min-width: 0;
  }

  .track {
    height: 22px;
  }

  .notch {
    width: 17px;
    height: 17px;
    margin-left: -8.5px;
    font-size: 10px;
  }

  .status .word {
    font-size: 13px;
  }

  .status .big {
    font-size: 19px;
  }

  .clock.final .status .big {
    font-size: 26px;
  }

  .kills {
    top: 66px;
    left: 8px;
  }

  .kills li {
    font-size: 12px;
    padding: 3px 8px 3px 3px;
  }

  .kills li:nth-last-child(n + 4) {
    display: none;
  }

  .toasts {
    top: auto;
    bottom: 54px;
    right: 8px;
    left: 8px;
    align-items: flex-start;
    max-width: none;
  }

  .toasts li {
    font-size: 12px;
  }

  .toasts li:nth-last-child(n + 3) {
    display: none;
  }

  .floats {
    bottom: 56px;
    right: 8px;
  }

  .reacts {
    right: 8px;
    bottom: 8px;
  }

  .react {
    width: 34px;
    height: 34px;
  }

  .recap {
    bottom: 8px;
    max-height: calc(100% - 76px);
    padding: 12px 12px 10px;
  }

  .recap h2 {
    font-size: 22px;
  }

  .recap .who {
    gap: 10px;
  }

  .recap .who .face {
    width: 48px !important;
    height: 48px !important;
  }

  .recap .price .num {
    font-size: 15px;
  }

  .recap dl {
    gap: 4px 10px;
    margin: 8px 0 4px;
  }

  .recap dt {
    font-size: 11px;
  }

  .recap dd {
    font-size: 12px;
  }

  .recap .you {
    margin: 4px 0;
    padding: 6px 8px;
    font-size: 13px;
  }

  .recap .row {
    margin-top: 4px;
  }

  .recap .ghost {
    padding: 6px 10px;
    font-size: 13px;
  }

  .tags.compact .tag {
    font-size: 11px;
    padding: 2px 6px 2px 5px;
  }


  .side {
    flex: 1;
    min-height: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 8px 8px 24px;
  }

  .mhead {
    grid-template-columns: 1fr 50px 58px 92px;
    padding-left: 50px;
  }

  .brow {
    grid-template-columns: 38px 1fr 50px 58px 92px;
    gap: 5px;
  }

  .brow .face {
    width: 38px !important;
    height: 38px !important;
  }

  .back {
    height: 44px;
  }

  .hist-side {
    display: block;
    margin-bottom: 8px;
  }

  .hist-side .history {
    flex-wrap: wrap;
  }

  .streamer .clock {
    width: calc(100% - 16px);
  }
}

@container (max-width: 380px) {
  .bname small.two .st {
    display: none;
  }
}

@container (max-width: 330px) {
  .mhead span:nth-child(3),
  .brow .room {
    display: none;
  }

  .mhead {
    grid-template-columns: 1fr 50px 90px;
    padding-left: 48px;
  }

  .brow {
    grid-template-columns: 36px 1fr 50px 90px;
  }

  .brow .face {
    width: 36px !important;
    height: 36px !important;
  }

  .chip {
    padding: 5px 7px;
  }
}

.tags.compact .tag b {
  display: none;
}

/* phones on their side: arena left, market right */
@media (max-height: 520px) and (orientation: landscape) and (min-width: 560px) {
  :root {
    --top: 40px;
    --side: 340px;
  }

  .app {
    display: grid;
    height: 100dvh;
  }

  .top {
    position: static;
  }

  .round,
  .hist-top,
  .name-btn {
    display: none;
  }

  .stage {
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .clock {
    width: calc(100% - 16px);
    min-width: 0;
    top: 6px;
  }

  .kills {
    top: 58px;
  }

  .kills li:nth-last-child(n + 4) {
    display: none;
  }

  .toasts {
    top: auto;
    bottom: 50px;
  }

  .toasts li:nth-last-child(n + 3) {
    display: none;
  }

  .callout .what {
    font-size: 24px;
  }

  .recap {
    max-height: calc(100% - 60px);
    bottom: 6px;
    padding: 10px 12px;
  }

  .recap h2 {
    font-size: 22px;
  }

  .recap dl {
    display: none;
  }

  .side {
    padding: 8px;
  }

  .hist-side {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .callout,
  .kills li,
  .toasts li,
  .recap,
  .float {
    animation-duration: 0.01s !important;
  }
}
