/* Layout: one centered column. Home, host menu and join are simple stacked screens; the room screen shows the host console or the guest vote card above the tier board. Editing happens in popups opened from pencil icons. */
:root {
  color-scheme: light;
  --bg: #edf0f4;
  --panel: #ffffff;
  --panel-2: #e2e7ee;
  --line: #cdd5df;
  --fg: #121c2b;
  --muted: #566376;
  --accent: #2c56e8;
  --accent-fg: #ffffff;
  --danger: #b83232;
  --on-tier: #101820;
  --t-S: #ec5b5f;
  --t-A: #f2933a;
  --t-B: #ecc81f;
  --t-C: #68bf6b;
  --t-D: #45a6dc;
  --t-E: #9a82e0;
  --t-F: #9aa4b4;
  --font-display: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e131b;
    --panel: #161d28;
    --panel-2: #212a39;
    --line: #2d384a;
    --fg: #e6ecf5;
    --muted: #95a3b8;
    --accent: #7da0ff;
    --accent-fg: #0e131b;
    --danger: #ff8a8a;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  padding-block: max(20px, env(safe-area-inset-top, 0px)) max(48px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
[hidden] {
  display: none !important;
}
img {
  max-width: 100%;
}
.wrap {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
  line-height: 1.1;
}
h1 {
  font-size: 1.9rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 1.15rem;
  font-weight: 800;
}
a {
  color: inherit;
}
sup,
sub {
  line-height: 0;
}
.muted {
  color: var(--muted);
}
.mono {
  font-variant-numeric: tabular-nums;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.label {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  padding: 9px 14px;
  border-radius: 8px;
  min-height: 44px;
  cursor: pointer;
}
.btn:hover:not(:disabled) {
  border-color: var(--muted);
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: transparent;
}
.btn.big {
  min-height: 84px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
}
.btn.small {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.9rem;
}
.btn.danger {
  color: var(--danger);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.icon {
  width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.btn.icon svg {
  width: 18px;
  height: 18px;
}
.btn.primary.warn {
  background: var(--danger);
  color: #fff;
}
:is(.btn, .tier-btn, select, textarea, input, .rt-btn):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.pill {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}
.pill.open {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: transparent;
}
.notice {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.92rem;
}
.notice.err {
  border-color: var(--danger);
  color: var(--danger);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .split {
    grid-template-columns: 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* code entry */
/* gear menu + help tips */
.modal.wide {
  max-width: 540px;
}
.small-note {
  font-size: 0.88rem;
  color: var(--muted);
}
/* current poll */
.now {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.switch {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  position: relative;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.sw-track {
  flex: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.2s;
}
.sw-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition:
    transform 0.2s,
    background 0.2s;
}
.switch input:checked + .sw-track {
  background: var(--accent);
  border-color: transparent;
}
.switch input:checked + .sw-track::after {
  transform: translateX(18px);
  background: var(--accent-fg);
}
.switch input:focus-visible + .sw-track {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
/* queue */
.queue {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tag {
  font-weight: 800;
  min-width: 28px;
  text-align: center;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--tc);
  color: var(--on-tier);
}
select,
textarea {
  font: inherit;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  resize: vertical;
}
.text-in {
  font: inherit;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
/* popups */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(5, 8, 14, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  max-width: 460px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: auto;
}
.dlg-title {
  font-size: 1.1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.dlg-title.big {
  font-weight: 800;
  font-size: 1.25rem;
}
.ph-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.ph-prev {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  object-fit: cover;
}
.err-line {
  color: var(--danger);
  font-size: 0.92rem;
}
/* style toolbar: hidden until the text box is selected, then it slides up and the box grows to make room */
.rt {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.rt:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.rt-body {
  min-height: 44px;
  padding: 11px 12px;
  outline: none;
  overflow-wrap: anywhere;
  line-height: 1.35;
  cursor: text;
}
.rt-body:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.rt-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s ease;
}
.rt:focus-within .rt-wrap {
  grid-template-rows: 1fr;
}
.rt-clip {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0s 0.26s;
}
.rt:focus-within .rt-clip {
  visibility: visible;
  transition-delay: 0s;
}
.rt-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding: 2px 8px 8px;
  transform: translateY(14px);
  opacity: 0;
  transition:
    transform 0.26s ease,
    opacity 0.2s ease;
}
.rt:focus-within .rt-bar {
  transform: none;
  opacity: 1;
}
.rt-btn {
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--fg);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.rt-btn:hover {
  border-color: var(--muted);
}
.rt-btn[aria-pressed='true'] {
  background: var(--accent);
  color: var(--accent-fg);
}
.rt-btn svg {
  width: 18px;
  height: 18px;
}
.rt-btn sup,
.rt-btn sub {
  font-size: 0.65em;
  line-height: 0;
}
.rt-link {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.rt-link .text-in {
  flex: 1 1 180px;
  min-height: 36px;
  padding: 4px 10px;
}
.rt-hint {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}
.rt-hint.err {
  color: var(--danger);
}
@media (prefers-reduced-motion: reduce) {
  .rt,
  .rt-wrap,
  .rt-clip,
  .rt-bar,
  .sw-track,
  .sw-track::after {
    transition: none;
  }
}
/* vote card */
.vote-name {
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.vote-img {
  width: 100%;
  max-width: 360px;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (min-width: 640px) {
  .tier-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}
.tier-btn {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  min-height: 76px;
  border-radius: 12px;
  border: 3px solid transparent;
  background: var(--tc);
  color: var(--on-tier);
  cursor: pointer;
}
.tier-btn:disabled {
  cursor: not-allowed;
}
.tier-btn[aria-pressed='true'] {
  border-color: var(--fg);
  box-shadow: 0 0 0 3px var(--panel);
}
.has-pick .tier-btn[aria-pressed='false'] {
  opacity: 0.5;
}
.result-tier {
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 1;
  padding: 8px 22px;
  border-radius: 12px;
  background: var(--tc);
  color: var(--on-tier);
  align-self: flex-start;
}
/* tier board */
.board {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border-radius: 8px;
  padding: 4px 10px 4px 4px;
  font-size: 0.92rem;
  max-width: 100%;
}
.chip img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
.chip.noimg {
  padding-left: 10px;
}
.chip span {
  overflow-wrap: anywhere;
}
.empty {
  color: var(--muted);
  padding: 6px 4px;
  font-size: 0.92rem;
}
/* host board: Tier Ranker style round chips, drag to override a poll result */
.rb {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rb-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
  min-height: 72px;
}
.rb-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.7rem;
  background: var(--tc);
  color: var(--on-tier);
}
.rrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  align-items: center;
  align-content: center;
  min-width: 0;
  min-height: 72px;
  transition: background 0.12s;
}
.rrow.over {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}
.rchip {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: #b3f0ff;
  color: #17323a;
  font-weight: 800;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.rchip img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.rtx {
  position: absolute;
  inset: 18% 8%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}
.rtx > span {
  display: block;
  max-width: 100%;
  text-align: center;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.rchip.held {
  outline: 3px dashed var(--muted);
  outline-offset: -3px;
  opacity: 0.7;
}
.rchip.dragging {
  opacity: 0.25;
}
.rchip.ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  pointer-events: none;
  width: 76px;
  height: 76px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  cursor: grabbing;
  transition: none !important;
  animation: none !important;
  outline: none !important;
  transform-origin: 0 0;
  will-change: transform;
}
/* custom tiers, bonus text and trivia */
.tier-grid {
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)) !important;
}
.tier-btn.long {
  font-size: 1rem;
  padding: 6px;
}
.result-tier.long {
  font-size: 2rem;
}
.rb-row {
  grid-template-columns: 84px 1fr;
}
.rb-label {
  padding: 4px;
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.05;
}
.rb-label.long {
  font-size: 0.85rem;
  overflow-wrap: normal;
  word-break: normal;
}
.modal.scroll {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.rt-body.multi {
  white-space: pre-wrap;
  min-height: 76px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.seg.tabs {
  margin-bottom: 12px;
}
.info-ed,
.tier-ed,
.opt-ed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.q-ed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.opt-row,
.tier-ed-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.colorpick {
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: none;
  flex: none;
}
.info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 6px;
}
.bubble {
  background: var(--panel-2);
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.4;
}
.q-text {
  font-weight: 700;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}
.opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.opt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font: inherit;
  color: var(--fg);
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 46px;
  cursor: pointer;
}
.opt-btn .mk {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.opt-btn .ot {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.opt-btn:disabled {
  cursor: default;
}
.opt-btn.ok {
  border-color: #2f9e44;
  background: color-mix(in srgb, #2f9e44 18%, var(--panel));
}
.opt-btn.miss {
  border-color: var(--danger);
  opacity: 0.7;
}
.opt-btn.view {
  cursor: default;
}
.fb {
  font-weight: 700;
}
.fb.right {
  color: #2f9e44;
}
.fb.wrong {
  color: var(--danger);
}
.dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.cd {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
}
.cd.right {
  background: #2f9e44;
}
.cd.wrong {
  background: var(--danger);
}
.cd.text {
  background: var(--accent);
}
.confetti {
  position: fixed;
  left: 50%;
  top: 40%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 100;
}
.confetti span {
  position: absolute;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  animation: cf 1.1s ease-out forwards;
}
@keyframes cf {
  from {
    transform: translate(0, 0) rotate(0);
    opacity: 1;
  }
  to {
    transform: translate(var(--dx), calc(var(--dy) + 160px)) rotate(var(--r));
    opacity: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .result-tier.pop {
    animation: pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1);
  }
}
@keyframes pop {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
/* presentation layout and live trivia */
#main-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}
.tstage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.q-text.big {
  font-size: 1.45rem;
}
.tstage.host .q-text.big {
  font-size: 2.1rem;
  line-height: 1.2;
}
.tstage.host .opt-btn {
  font-size: 1.25rem;
  min-height: 56px;
}
.timer {
  display: flex;
  justify-content: flex-end;
  font-size: 1.1rem;
}
.dist {
  height: 6px;
  background: var(--panel-2);
  border-radius: 4px;
  margin-top: 4px;
  overflow: hidden;
}
.opt-btn.mine {
  border-color: var(--accent);
}
.opt-btn.mine.ok {
  border-color: #2f9e44;
}
.opt-btn:disabled {
  color: var(--fg);
}
.cnt {
  margin-left: auto;
  padding-left: 8px;
}
.hostchip {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 10px;
  vertical-align: middle;
  white-space: nowrap;
  flex: none;
  line-height: 1.3;
}
.ask {
  font-weight: 700;
}
.ask.big {
  font-size: 1.3rem;
}
.lb {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lb-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--panel-2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1.1rem;
}
.lb-row.first {
  border: 2px solid #ecc81f;
}
.lb-row.me {
  border: 2px solid var(--accent);
}
.lb-name {
  min-width: 0;
}
.num {
  width: 110px;
}
.players {
  max-height: 180px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rchip.unlocked {
  outline: 3px solid #ffd23f;
  outline-offset: 1px;
  cursor: grab;
}
.rchip {
  cursor: pointer;
}
/* ===== stage theme (host, guest, landing) ===== */
body.theme {
  --bg: #00252f;
  --panel: #004a5a;
  --panel-2: #00323f;
  --line: #0d6a7d;
  --fg: #ffffff;
  --muted: #a8cfd8;
  --accent: #00c2ff;
  --accent-fg: #00203a;
  --danger: #ff9a9a;
  --navy: #00203a;
  color-scheme: dark;
  background: #559b5a;
}
.theme .btn {
  background: var(--panel-2);
  border-color: var(--line);
  color: #fff;
}
.theme .btn:hover:not(:disabled) {
  border-color: #7fd4e6;
}
.theme .btn.primary {
  background: var(--navy);
  color: #fff;
  border: 2px solid #0b3a5a;
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.65),
    0 1px 0 rgba(255, 255, 255, 0.08);
}
.theme .btn.primary.warn {
  background: #8c1d2b;
}
.theme .notice {
  border-color: var(--line);
}
.theme .fb.right {
  color: #6ee08a;
}
.theme .opt-btn {
  background: var(--panel-2);
}
.theme .opt-btn.ok {
  background: color-mix(in srgb, #2f9e44 35%, var(--panel-2));
}
.theme .dist {
  background: var(--panel-2);
}
.theme .bubble {
  background: var(--panel-2);
}
.theme .lb-row {
  background: var(--panel-2);
}
.theme .hostchip {
  background: #00c2ff;
  color: #00203a;
}
.theme .modal {
  background: var(--panel);
  border: 1px solid var(--line);
  color: #fff;
}
.theme .overlay {
  background: rgba(0, 12, 18, 0.72);
}
.theme input,
.theme textarea,
.theme select {
  background: var(--bg);
  color: #fff;
  border: 1px solid var(--line);
}
.theme .rt {
  background: var(--bg);
  border-color: var(--line);
}
.theme :focus-visible {
  outline-color: #00c2ff;
}
.theme .rchip {
  background: #00c0ff;
  color: #000;
}
.theme .pill {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--muted);
}
.theme .pill.open {
  background: #00c2ff;
  color: #00203a;
}
/* dots arc around the rim of a tile */
.dots-arc {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.dots-arc .pip {
  position: absolute;
  width: 13%;
  aspect-ratio: 1;
  min-width: 9px;
  border-radius: 50%;
  background: #d0d0d0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.pip.right {
  background: #22a035;
}
.pip.wrong {
  background: #e02828;
}
.pip.text {
  background: #ffd23f;
}
/* flat raised buttons: solid color, darker bottom edge, soft shadow, sink on press */
.theme .btn {
  --bc: #2d7077;
  --be: #1d4b50;
  background: var(--bc);
  border: 0;
  color: #fff;
  box-shadow:
    0 4px 0 var(--be),
    0 6px 10px rgba(0, 0, 0, 0.32);
  transition:
    transform 0.08s,
    box-shadow 0.08s,
    background 0.15s;
}
.theme .btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--bc) 85%, #fff);
  filter: none;
  border: 0;
}
.theme .btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 var(--be),
    0 2px 4px rgba(0, 0, 0, 0.3);
}
.theme .btn.primary {
  --bc: #1d4579;
  --be: #0a1d38;
  background: var(--bc);
  border: 0;
  box-shadow:
    0 4px 0 var(--be),
    0 6px 10px rgba(0, 0, 0, 0.32);
}
.theme .btn.primary:active:not(:disabled) {
  box-shadow:
    0 1px 0 var(--be),
    0 2px 4px rgba(0, 0, 0, 0.3);
}
.theme .btn.primary.warn {
  --bc: #8a2b36;
  --be: #5f1b24;
  background: var(--bc);
}
.theme .btn:disabled {
  box-shadow: 0 2px 0 var(--be);
  filter: saturate(0.6);
  opacity: 0.55;
}
.theme .tier-btn {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 3px 0 rgba(0, 0, 0, 0.35),
    0 6px 10px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.08s,
    box-shadow 0.08s;
}
.theme .tier-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
}
/* choices, bars */
.theme .opt-btn {
  transition:
    background 0.8s ease,
    border-color 0.8s ease;
  border: 2px solid var(--line);
}
.theme .opt-btn.sel {
  background: color-mix(in srgb, #fff 22%, var(--panel-2));
  border-color: color-mix(in srgb, #fff 35%, var(--line));
}
.theme .opt-btn.ok {
  background: #1fae5a;
  border-color: #1fae5a;
  color: #fff;
}
.theme .opt-btn.miss {
  background: #d9364a;
  border-color: #d9364a;
  color: #fff;
  opacity: 1;
}
.theme .opt-btn.ok .mk,
.theme .opt-btn.miss .mk {
  background: rgba(0, 0, 0, 0.25);
}
.bar-opt {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  overflow: hidden;
  min-height: 48px;
  border: 2px solid var(--line);
}
.bar-opt .bf {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(255, 255, 255, 0.24);
  transition:
    width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.8s ease;
}
.bar-opt.ok .bf {
  background: #1fae5a;
}
.bar-opt.miss .bf {
  background: #d9364a;
}
.bar-opt > :not(.bf) {
  position: relative;
}
.bar-opt .mk {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.bar-opt .ot {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.bar-opt .pct {
  flex: none;
  font-weight: 700;
}
.pclock {
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}
.pclock b {
  color: #fff;
  font-size: 1.3rem;
}
/* info box and description */
.infobox {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 4px solid #00c2ff;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
}
.infobox.multi {
  cursor: pointer;
  padding-bottom: 34px;
  user-select: none;
  -webkit-user-select: none;
}
.ib-body {
  line-height: 1.45;
}
.ib-corner {
  position: absolute;
  right: 12px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}
.ib-arrow {
  color: #00c2ff;
  font-size: 0.9rem;
}
.fadeup {
  animation: fadeup 0.6s ease both;
}
@keyframes fadeup {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fadeup {
    animation: none;
  }
  .theme .opt-btn,
  .bar-opt .bf {
    transition: none;
  }
}
.desc {
  background: var(--panel-2);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.98rem;
  max-height: 34vh;
  overflow-y: auto;
  line-height: 1.4;
}
.desc p {
  margin: 0 0 6px;
}
.desc p:last-child {
  margin-bottom: 0;
}
.desc ul {
  margin: 4px 0 6px;
  padding-left: 22px;
}
.desc li {
  margin: 2px 0;
}
.bar-opt.ok {
  border-color: #1fae5a;
}
.opt-btn:disabled.sel {
  opacity: 1;
}
.sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  margin: 14px 0;
  width: 100%;
}
.actions.right {
  justify-content: flex-end;
}
/* ---------- trivia card ---------- */
.pcard.tv {
  background: none;
  box-shadow: none;
  padding: 0;
  min-height: 0;
  justify-content: flex-start;
}
.card.tv {
  background: none;
  box-shadow: none;
  padding: 0;
  overflow: auto;
  justify-content: safe center;
}
.tcard {
  background: #004857;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  width: 100%;
}
.tc-head {
  background: #00263a;
  color: #4a74b0;
  font-weight: 800;
  font-size: clamp(0.95rem, 2.2vh + 0.6vw, 1.5rem);
  padding: 16px 26px;
}
.tc-body {
  padding: 22px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.theme .tcard .q-text.big {
  color: #fff;
  font-size: clamp(1.45rem, 4.2vw, 2.2rem);
  line-height: 1.15;
  font-weight: 800;
}
.tstage.host.tcard .q-text.big {
  font-size: clamp(1.8rem, 5vh, 3.2rem);
}
.theme .tcard .opts {
  gap: 14px;
}
.theme .tcard .opt-btn {
  background: #6ea7b0;
  color: #000;
  border: 3px solid transparent;
  border-radius: 999px;
  min-height: 58px;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 1.2rem;
  transition:
    background 0.8s ease,
    border-color 0.8s ease,
    color 0.8s ease;
}
.theme .tcard .opt-btn .mk {
  display: none;
}
.theme .tcard .opt-btn:disabled {
  opacity: 1;
  color: #000;
}
.theme .tcard .opt-btn.sel {
  background: #407a82;
  border-color: #00b4c8;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.35);
}
.theme .tcard .opt-btn.ok,
.theme .tcard .opt-btn.ok:disabled {
  background: #1fae5a;
  border-color: #1fae5a;
  color: #fff;
}
.theme .tcard .opt-btn.miss,
.theme .tcard .opt-btn.miss:disabled {
  background: #d9364a;
  border-color: #d9364a;
  color: #fff;
}
.tstage.host.tcard .opt-btn {
  font-size: 1.35rem;
  min-height: 64px;
}
.pie {
  --e: 0deg;
  width: min(62vw, 44vh, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#10666f 0 var(--e), #3fa4af 0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto;
}
.pie b {
  font-size: clamp(5rem, 22vw, 9rem);
  line-height: 1;
  color: #fff;
  font-weight: 800;
}
.tstage.host .pie {
  width: min(50vh, 420px);
}
.tstage.host .pie b {
  font-size: clamp(6rem, 22vh, 12rem);
}
.get-ready {
  text-align: center;
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.5rem, 3.4vh + 1vw, 2.6rem);
}
.tbar2 {
  --w: 100%;
  position: relative;
  height: 34px;
  border-radius: 999px;
  background: #10343b;
}
.tbar2 .tf {
  height: 100%;
  border-radius: 999px;
  background: #b8b032;
  width: 100%;
}
.tbar2 .tl {
  position: absolute;
  top: 50%;
  left: clamp(28px, var(--w), calc(100% - 28px));
  transform: translate(-50%, -50%);
  font-weight: 800;
  color: #fff;
  font-size: 1.15rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.lockrow {
  display: flex;
  justify-content: flex-end;
}
.lockbtn {
  font: inherit;
  background: #8a2b36;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 14px 30px;
  font-weight: 800;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow:
    0 4px 0 #5f1b24,
    0 6px 10px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.08s,
    box-shadow 0.08s;
}
.lockbtn:hover:not(:disabled) {
  background: #9a3340;
}
.lockbtn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #5f1b24;
}
.lockbtn.locked,
.lockbtn.locked:disabled {
  background: #6e2530;
  color: #f2c9ce;
  transform: translateY(3px);
  box-shadow: 0 1px 0 #5f1b24;
  cursor: default;
}
.tcard .actions.center.col {
  align-items: center;
  justify-content: center;
}
.tcard .bar-opt {
  border-radius: 999px;
  background: #1d3a44;
  min-height: 58px;
  padding: 12px 26px;
  border: 3px solid transparent;
}
.tcard .bar-opt .bf {
  border-radius: 999px;
}
.tcard .bar-opt .ot {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}
.tcard .bar-opt .hostchip {
  margin: 0;
}
.tcard .bar-opt.ok {
  border-color: #1fae5a;
}
.tcard .bar-opt.miss {
  border-color: transparent;
}
.tcard .infobox {
  width: 100%;
}
.tcard .bar-opt {
  flex: none;
}
.infobox.titled {
  background: none;
  border: 0;
  padding: 0;
}
.infobox.titled.multi {
  padding-bottom: 0;
}
.ib-title {
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  line-height: 1.15;
  color: #fff;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.infobox.titled .ib-body {
  font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  line-height: 1.4;
  color: #fff;
}
.infobox.titled .ib-corner {
  position: static;
  margin-top: 14px;
  justify-content: flex-start;
}
.info-pop {
  max-width: 640px;
  margin: auto;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
/* correct answer when you were wrong or did not answer: green with a red outline */
.theme .tcard .opt-btn.ok.bad {
  border-color: #d9364a;
}
.tcard .bar-opt.ok.bad {
  border-color: #d9364a;
}
/* info card: a lighter card set apart on the card */
.infobox,
.infobox.titled {
  position: relative;
  background: #388b8f;
  border: 0;
  border-radius: 24px;
  padding: 18px 22px;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  color: #fff;
}
.infobox.multi,
.infobox.titled.multi {
  cursor: pointer;
  padding-bottom: 18px;
  user-select: none;
  -webkit-user-select: none;
}
.infobox .ib-body,
.infobox.titled .ib-body {
  font-size: clamp(1.1rem, 3.6vw, 1.4rem);
  line-height: 1.4;
  color: #fff;
}
.infobox .ib-title {
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  line-height: 1.15;
  color: #fff;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.infobox .ib-corner,
.infobox.titled .ib-corner {
  position: static;
  margin-top: 12px;
  justify-content: flex-end;
  color: #d8f0f1;
  font-size: 0.95rem;
}
.infobox .ib-arrow {
  color: #fff;
  font-size: 1rem;
}
/* ---- round 5 ---- */
.tbar2 .tl {
  left: 50%;
}
/* compact trivia prompt */
.tprompt {
  max-width: 520px;
  margin: auto;
}
.tprompt .tc-head {
  padding: 12px 24px;
  color: #000;
  background: #73a9b0;
  font-size: 1.5rem;
}
.tprompt .tc-body {
  padding: 14px 24px 22px;
  gap: 4px;
}
.tp-q {
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  line-height: 1.1;
  color: #fff;
}
.tp-sub {
  color: #7fb0b8;
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.tp-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
}
.tp-row .btn {
  flex: 1;
  min-width: 0;
  justify-content: center;
}
.chartic {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 26px;
}
.chartic i {
  display: block;
  width: 8px;
  border-radius: 4px;
  background: #1d5a6b;
}
.chartic i:nth-child(1) {
  height: 15px;
}
.chartic i:nth-child(2) {
  height: 26px;
}
.chartic i:nth-child(3) {
  height: 10px;
}
/* host: text bubble under the placement announcement, trivia hold */
.res-info {
  margin-top: 14px;
  max-width: 560px;
}
.res-info.fade {
  animation: cardin 0.5s ease-out both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.holdbody {
  align-items: flex-start;
}
.holdbody .qlink {
  align-self: flex-start;
  margin-top: 4px;
}
/* ---- round 6 ---- */
/* square icon buttons: Stats (yellow), Close (red), Back (teal) */
.sqb {
  --bc: #2d7077;
  --be: #1d4b50;
  flex: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--bc);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  box-shadow:
    0 4px 0 var(--be),
    0 6px 10px rgba(0, 0, 0, 0.32);
  transition:
    transform 0.08s,
    box-shadow 0.08s,
    background 0.15s;
}
.sqb:hover {
  background: color-mix(in srgb, var(--bc) 85%, #fff);
}
.sqb:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 var(--be),
    0 2px 4px rgba(0, 0, 0, 0.3);
}
.sqb svg {
  width: 26px;
  height: 26px;
}
.sqb.x {
  --bc: #c0394a;
  --be: #8a2330;
}
.sqb.stats {
  --bc: #bfc07d;
  --be: #8c8d52;
}
.sqb.stats.nodata {
  --bc: #8a9496;
  --be: #5d6769;
  opacity: 0.8;
  cursor: default;
}
.sqb.stats.nodata:active {
  transform: none;
  box-shadow:
    0 4px 0 var(--be),
    0 6px 10px rgba(0, 0, 0, 0.32);
}
.sqb.back {
  --bc: #2d7077;
  --be: #1d4b50;
}
.sqtip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  white-space: nowrap;
  background: #00202a;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  z-index: 5;
  animation: cardin 0.2s ease-out both;
  pointer-events: none;
}
.sqtip.out {
  opacity: 0;
  transition: opacity 0.3s;
}
/* host stage menu: light teal bar with the item name and the square buttons */
.hmenu {
  width: 100%;
  max-width: 520px;
  margin: auto;
  overflow: visible;
}
.hmenu.wide {
  max-width: 640px;
}
.hmenu > .tc-head {
  border-radius: 30px 30px 0 0;
}
.hmenu .tc-head {
  background: #73a9b0;
  color: #000;
  font-size: 1.5rem;
  padding: 10px 14px 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hmenu.mini > .tc-head {
  border-radius: 30px;
}
.hmenu .mb-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.hmenu .mb-title {
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hmenu .mb-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding-bottom: 4px;
}
.hmenu .mb-left .sqb {
  margin-bottom: 4px;
}
.hmenu .tc-body {
  padding: 16px 22px 24px;
}
.hmenu .tc-body .infobox {
  width: 100%;
}
.tprompt .tc-head {
  padding: 10px 14px 10px 24px;
}
.hmenu .btn.pillbtn {
  border-radius: 999px;
  font-weight: 800;
  min-height: 56px;
  padding: 10px 26px;
  font-size: 1.2rem;
}
.hmenu .showmsg {
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 600;
  color: #fff;
}
/* info cards fade and pan up */
.cardin {
  animation: cardin 0.5s ease-out both;
}
@keyframes cardin {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.latein {
  animation: cardin 0.5s ease-out both;
}
@media (prefers-reduced-motion: reduce) {
  .cardin,
  .latein,
  .sqtip {
    animation: none;
  }
}
/* trivia follow-up: the More… pill morphs into the follow-up card */
.morewrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.morepill {
  align-self: flex-end;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: #388b8f;
  border: 0;
  border-radius: 999px;
  padding: 6px 22px;
  cursor: pointer;
  box-shadow:
    0 3px 0 #27676a,
    0 4px 8px rgba(0, 0, 0, 0.3);
  animation: nudge 2.6s ease-in-out infinite;
}
.morepill:hover {
  background: #43a0a5;
}
@keyframes nudge {
  0%,
  68%,
  100% {
    transform: translateY(0);
  }
  76% {
    transform: translateY(-5px);
  }
  84% {
    transform: translateY(0);
  }
  91% {
    transform: translateY(-2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .morepill {
    animation: none;
  }
}
.morecard {
  width: 100%;
  max-height: 900px;
  overflow: hidden;
  margin: 0 auto;
  transition:
    width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    max-height 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-radius 0.45s ease;
}
.morecard.start {
  width: 110px;
  max-height: 34px;
  border-radius: 999px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.morecard .ib-body,
.morecard .ib-title {
  animation: txtin 0.6s ease-out 0.25s both;
}
@keyframes txtin {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.winline {
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.35;
  color: #fff;
  text-align: center;
}
.winline .result-tier,
.winline .lr-tier {
  display: inline-block;
  padding: 2px 14px;
  border-radius: 999px;
  background: var(--tc);
  color: var(--on-tier);
  margin: 0 4px;
}
/* tie tile, tie-broken border */
.tietile {
  background: #7d8a8c !important;
  color: #fff !important;
}
.res-win.tietile {
  font-size: 2.4rem;
}
.breaktie {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.breaktie .bt-h {
  font-weight: 800;
  font-size: 1.6rem;
  color: #fff;
}
.res-note {
  margin-top: 10px;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
}
.res-fill.instant {
  transition: none;
}
.stage .rchip.tb {
  box-shadow:
    0 0 0 2px #3fbf6b,
    0 2px 4px rgba(0, 0, 0, 0.25);
}
.stage .rchip.over.tb {
  box-shadow:
    0 0 0 2px #ffd23f,
    0 2px 4px rgba(0, 0, 0, 0.25);
}
@keyframes popin {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.popin {
  animation: popin 0.7s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@media (prefers-reduced-motion: reduce) {
  .popin {
    animation: none;
  }
}
.stats-pane .stats-back {
  display: none;
}
.stats-pane.on-names .stats-back {
  display: flex;
}
/* slot machine overlay */
.slot-ov {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 12, 18, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadein 0.25s ease both;
}
.slot-ov.out {
  opacity: 0;
  transition: opacity 0.35s;
}
@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.slot-box {
  background: #004857;
  border-radius: 34px;
  padding: 26px 40px 34px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.slot-box h3 {
  font-size: 1.6rem;
  color: #fff;
}
.slot-reel {
  position: relative;
  width: min(52vw, 230px);
  height: min(64vw, 270px);
  border-radius: 26px;
  background: #b9c2c6;
  padding: 12px;
  box-shadow:
    inset 0 0 0 4px #1a2429,
    inset 0 8px 18px rgba(0, 0, 0, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.slot-reel .win {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #1d2a30;
  perspective: 600px;
}
.slot-strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  will-change: filter;
}
.slot-tile {
  will-change: transform, opacity;
  position: absolute;
  left: 8%;
  right: 8%;
  height: var(--h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  line-height: 1;
  border-radius: 18px;
  background: var(--tc);
  color: var(--on-tier);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
}
.slot-reel .shade {
  position: absolute;
  inset: 12px;
  border-radius: 16px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.28) 22%,
    rgba(255, 255, 255, 0.12) 40%,
    rgba(255, 255, 255, 0.12) 60%,
    rgba(0, 0, 0, 0.28) 78%,
    rgba(0, 0, 0, 0.78) 100%
  );
}
.slot-box.land .slot-reel {
  animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.slot-ov {
  animation: fadein 0.45s ease both;
}
.slot-ov > .slot-box {
  animation: cardin 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.slot-ov.out > .slot-box {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.35s,
    transform 0.35s;
}
/* leaderboard scores: green base, yellow showdown bonus */
.sc-base {
  color: #6ee08a;
  font-weight: 800;
}
.sc-bonus {
  color: #ffd23f;
  font-weight: 800;
  margin-left: 4px;
}
.lb-row .lb-score {
  white-space: nowrap;
}
/* tie-breaking settings */
.gcard {
  background: #00323f;
  border-radius: 24px;
  padding: 18px 22px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gcard > h3 {
  font-size: 1.5rem;
}
.gcard .grow-row:first-of-type {
  border-top: 0;
}
.grow-row .gr-ctl {
  width: 230px;
  max-width: 46%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.grow-row.sub {
  padding-left: 26px;
}
.tiehead {
  padding: 14px 0 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.tiehead b {
  font-size: 1.25rem;
  display: block;
}
.tiehead span {
  color: var(--muted);
  font-size: 0.9rem;
}
.tieopt .gr-ctl {
  width: auto;
}
.tieopt input[type='radio'] {
  width: 24px;
  height: 24px;
  accent-color: #00c2ff;
}
/* stats popup */
.stats-tabs {
  display: flex;
  gap: 4px;
  background: #00323f;
  padding: 10px 14px 0;
}
.stats-tabs button {
  font: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 10px 22px;
  border-radius: 20px 20px 0 0;
  cursor: pointer;
}
.stats-tabs button.on {
  background: #004857;
}
.stats-tabs button:hover:not(.on) {
  background: rgba(255, 255, 255, 0.07);
}
.stats-pane {
  position: relative;
  overflow: hidden;
  height: min(520px, calc(100vh - 230px));
  background: #004857;
  border-radius: 0 0 30px 30px;
}
.stats-sl {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 18px 22px 20px;
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stats-sl.names {
  transform: translateX(100%);
  padding-left: 56px;
}
.stats-pane.on-names .stats-sl.main {
  transform: translateX(-100%);
}
.stats-pane.on-names .stats-sl.names {
  transform: none;
}
.stats-back {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  z-index: 2;
}
.stats-back:hover {
  background: rgba(255, 255, 255, 0.16);
}
.morelink {
  align-self: flex-end;
  font: inherit;
  background: none;
  border: 0;
  color: #cfe9ef;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
  margin-top: auto;
}
.sq-card {
  background: #10343b;
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sq-card.nodata {
  background: #4b5b5e;
  color: #d3dcde;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  font-weight: 700;
}
.sq-card .q-text {
  font-weight: 800;
  font-size: 1.1rem;
}
.sq-bar {
  position: relative;
  border-radius: 999px;
  background: #1d3a44;
  overflow: hidden;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 2px solid transparent;
}
.sq-bar .bf {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(255, 255, 255, 0.24);
  width: 0;
}
.sq-bar.ok .bf {
  background: #1fae5a;
}
.sq-bar.ok {
  border-color: #1fae5a;
}
.sq-bar > *:not(.bf) {
  position: relative;
}
.sq-bar .ot {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}
.sq-bar .pct {
  font-weight: 700;
}
.nm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #10343b;
  border-radius: 14px;
  padding: 8px 12px;
}
.nm-row .nn {
  flex: 1;
  min-width: 0;
  font-weight: 700;
}
.nm-tier {
  min-width: 44px;
  text-align: center;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--tc);
  color: var(--on-tier);
}
.nm-q {
  font-weight: 800;
  margin-top: 6px;
}
.nm-ans {
  color: #d9eef2;
}
.nm-ans.right {
  color: #6ee08a;
}
.nm-ans.wrong {
  color: #ff9a9a;
}
.hostchip.sm {
  font-size: 0.7rem;
  padding: 1px 8px;
  margin: 0;
}
/* round 7: smooth motion */
.overlay.stacked {
  animation: fadebg 0.35s ease both;
}
.overlay.stacked > * {
  animation: cardin 0.42s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.overlay.stacked.out {
  animation: fadebgout 0.2s ease both;
  pointer-events: none;
}
.overlay.stacked.out > * {
  animation: cardout 0.2s ease both;
}
@keyframes fadebg {
  from {
    background-color: transparent;
  }
}
@keyframes fadebgout {
  to {
    opacity: 0;
  }
}
@keyframes cardout {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}
.still,
.still .bf {
  transition: none !important;
}
.tie-note-box {
  margin-top: 10px;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.35;
}
.res-bars {
  position: relative;
}
.res-label {
  transition:
    box-shadow 0.7s ease,
    outline-color 0.7s ease;
}
.res-row .res-label,
.res-row .res-track {
  transition: box-shadow 0.5s ease;
}
.res-row.lit .res-label {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 0 20px 5px var(--glow, #fff);
}
.res-row.lit .res-track {
  box-shadow: 0 0 16px 3px var(--glow, #fff);
}
.res-row.win .res-label {
  outline: none !important;
  box-shadow:
    0 0 0 3px #fff,
    0 0 22px 7px var(--glow, #fff);
}
.res-row.win .res-track {
  box-shadow: 0 0 16px 2px var(--glow, #fff);
}
.res-track {
  transition: box-shadow 0.7s ease;
  border-radius: 999px;
}
.stage-in {
  animation: cardin 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}
.rchip {
  transition:
    transform 0.25s ease,
    box-shadow 0.35s ease,
    filter 0.25s ease;
}
.rchip.unlocked {
  animation:
    ringin 0.45s ease both,
    chippulse 1.6s ease-in-out 0.45s infinite;
}
@keyframes ringin {
  from {
    box-shadow: 0 0 0 0 rgba(255, 210, 63, 0);
  }
  to {
    box-shadow: 0 0 0 2px #ffd23f;
  }
}
@keyframes chippulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px #ffd23f;
  }
  50% {
    transform: scale(1.07);
    box-shadow: 0 0 14px 3px rgba(255, 210, 63, 0.7);
  }
}
button,
.btn,
.sqb,
.chip,
.pill,
.ipill,
.tier-btn,
.opt-btn {
  transition:
    background-color 0.25s ease,
    filter 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}
@media (prefers-reduced-motion: reduce) {
  .overlay.stacked,
  .overlay.stacked > *,
  .stage-in,
  .rchip.unlocked {
    animation: none;
  }
  .leaving {
    transition: none;
  }
}
.pl-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  font-size: 1.3rem;
  font-weight: 800;
  padding: 4px 0 8px;
}
.pl-line .pl-t {
  color: #fff;
}
.pl-line .result-tier.pl-tile {
  font-size: 1.5rem;
  padding: 5px 24px;
  border-radius: 14px;
  min-width: 64px;
  text-align: center;
}
.statchip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 5px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  color: #000;
  cursor: pointer;
  user-select: none;
}
.statchip.tie {
  background: #b8bdbf;
}
.statchip.over {
  background: #fbfb8c;
}
.stat-tip .tl {
  display: block;
}
.stat-tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  transform: translateY(-4px);
  background: #0b2330;
  color: #fff;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  width: max-content;
  max-width: min(280px, 70vw);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  z-index: 6;
  white-space: normal;
  text-align: left;
  line-height: 1.3;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.statchip.on .stat-tip {
  opacity: 1;
  transform: none;
}
@media (hover: hover) {
  .statchip:hover .stat-tip {
    opacity: 1;
    transform: none;
  }
}
.stats-play {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}
/* minimizable description */
.descbox {
  width: 100%;
  background: var(--panel-2);
  border-radius: 22px;
  overflow: hidden;
  text-align: left;
}
.descbox .desc {
  background: transparent;
  border-radius: 0;
  max-height: 24svh;
  overflow-y: auto;
}
.descbox .desc-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 32px;
  border: 0;
  background: #0b2330;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.25s ease;
}
.descbox .desc-bar:hover {
  background: #12354a;
}
.descbox.min {
  border-radius: 999px;
}
.descbox.min .desc-bar {
  height: 34px;
}
.pcard .descbox {
  width: 100%;
}
.pcard .descbox .desc {
  max-height: 24svh;
}
.nmx {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  vertical-align: middle;
  cursor: default;
  outline: none;
}
.nmx .nmt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nmx .hostchip,
.nmx .hostchip.sm {
  margin: 0;
  flex: none;
}
.nmx.open .nmt {
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: visible;
}
@media (hover: hover) {
  .nmx:hover .nmt {
    white-space: normal;
    overflow-wrap: anywhere;
    overflow: visible;
  }
}
.item-name .nmx,
.ptitle .nmx {
  display: flex;
}
.bar-opt .hostchip {
  margin-left: 10px;
}
.rtx > span {
  font-weight: 700;
}
.rtx {
  inset: 16% 12%;
}
.rtx {
  inset: 0 !important;
  overflow: visible !important;
}
.rtx > span {
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: center;
}
.tile .tt,
.qcircle .qt {
  white-space: nowrap;
  overflow-wrap: normal;
  flex: none;
}
/* the two big circles (the guest's .tile and the host's .qcircle) share one look */
.tile,
.qcircle {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  background: #00c0ff;
  color: #000;
  font-weight: 800;
  text-align: center;
  padding: 12%;
  overflow: hidden;
  border-radius: 50%;
}
.tile .tt,
.qcircle .qt {
  line-height: 1.05;
  font-weight: 800;
  position: relative;
}
.tile img + .tt,
.qcircle img + .qt {
  color: #000;
  text-shadow:
    0 0 3px #fff,
    0 0 6px #fff,
    0 0 12px #fff,
    0 0 20px rgba(255, 255, 255, 0.85);
}
.pwrow {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}
.pwrow input {
  flex: 1;
  min-width: 0;
}
.pwtoggle {
  flex: none;
}
.pwnote,
.pwhint {
  font-size: 0.86rem;
  line-height: 1.35;
  margin-top: 8px;
}
.gate .big-btn {
  margin-top: 10px;
}
.winline.choosing .wl-top {
  font-weight: 600;
}
.winline .ccount {
  display: inline-block;
  min-width: 1.2em;
  text-align: center;
}
.wl-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}
.lr-tier.pickable {
  cursor: pointer;
  font: inherit;
  border: 0;
  transition:
    transform 0.15s,
    filter 0.15s;
}
.lr-tier.pickable:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.lr-tier.pickable:disabled {
  opacity: 0.6;
  cursor: default;
}
.gstatus {
  margin-top: 16px;
  text-align: center;
}
.gs-head {
  font-weight: 600;
}
.gs-head .dots {
  display: inline-flex;
  gap: 1px;
  margin-left: 2px;
}
.gs-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}
.lb.scroll {
  max-height: min(62vh, 560px);
  overflow-y: auto;
  padding: 2px 4px 2px 0;
  overscroll-behavior: contain;
}
@property --rf {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
.wl-tiers .lr-tier.pickable {
  font-size: 1.3rem;
  padding: 10px 24px;
  min-width: 68px;
  font-weight: 800;
}
.prompt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.prompt-row .pclock {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}
.lockrow {
  margin-top: 14px;
}
.lockrow.center {
  justify-content: center;
}
.allin-curtain {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}
.allin-msg {
  background: #244a5a;
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 4rem);
  padding: 0.6em 1.4em;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.slot-ov.out {
  transition: opacity 0.8s ease;
}
.slot-ov.out > .slot-box {
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}
