:root {
  font: 16px/1.35 "Segoe UI", system-ui, sans-serif;
  color: #eff4ff;
  color-scheme: dark;
  --muted: #a3adc7;
  --mint: #a5ffdc;
  --line: #303856;
  --coral: #ff647d;
  --nav-width: 94px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 245px; background: #101217; }
html:not(.broadcast) body { padding-left: var(--nav-width); }
html body.account-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.account-card { width: min(100%, 380px); display: grid; gap: 16px; }
.account-brand { color: var(--mint); font-weight: 800; }
#account-form, .owner-code { display: grid; gap: 8px; }
#account-form label:not(:first-child), #account-submit { margin-top: 4px; }
#password-hint { color: var(--muted); font-size: .85rem; }
#account-error { color: #ffacb8; font-size: .88rem; }
#account-error:empty { display: none; }
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .secondary {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 8px; padding: 10px 13px;
  min-height: 42px; font-weight: 700; cursor: pointer; text-decoration: none;
}
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
h1, h2, p { margin: 0; }
.layout {
  width: min(100%, 1480px); margin: 0 auto; padding: clamp(14px, 3vw, 38px);
}
.workspace-nav {
  position: fixed; inset: 0 auto 0 0; z-index: 5; width: var(--nav-width);
  display: flex; flex-direction: column; gap: 5px; padding: 14px 7px;
  overflow-y: auto; overscroll-behavior: contain;
  border-right: 1px solid #2a2f39; background: #171a21;
}
.nav-brand {
  display: grid; justify-items: center; gap: 6px; padding: 1px 0 12px; margin-bottom: 5px;
  border-bottom: 1px solid #2a2f39; color: #ecf4f1;
  font-size: .78rem; font-weight: 800; white-space: nowrap;
}
.nav-mark {
  display: grid; place-items: center; width: 35px; height: 35px;
  border-radius: 9px; background: #28514b; color: var(--mint); font-size: 1.15rem;
}
.workspace-nav button, .workspace-nav a {
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  flex-shrink: 0; min-height: 56px; padding: 4px 2px;
  color: #bcc5d1; background: transparent; text-decoration: none; border-radius: 8px;
  font-size: .72rem; font-weight: 650; text-align: center; white-space: nowrap;
}
.nav-icon { display: block; font-size: 1.18rem; line-height: 1; }
.workspace-nav button:hover, .workspace-nav a:hover { background: #20252e; }
.workspace-nav button[aria-current="page"] { color: #c4ffea; background: #263b39; border-color: #3b5350; }
.dashboard { min-width: 0; display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); gap: 15px; align-items: start; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dashboard-header .text-button { padding-inline: 10px; border-color: #3a404d; border-radius: 7px; }
.dashboard-header, .timer-tool, .stream-tool { grid-column: 1 / -1; }
.controls { display: grid; gap: 12px; min-width: 0; }
.setup-page { max-width: 920px; width: 100%; min-width: 0; }
.section-heading { margin-bottom: 15px; }
h1 { font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.025em; }
.tool { padding: 16px; background: #191d25; border: 1px solid #2d3340; border-radius: 10px; }
.tool h2 { margin-bottom: 12px; font-size: 1.04rem; }
.tool h2 span { color: var(--muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.duration { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
label { display: grid; gap: 5px; color: var(--muted); font-size: .875rem; }
input {
  border: 1px solid #3b4555; color: #fff; background: #141820;
  border-radius: 8px; min-width: 0; width: 100%; padding: 9px 10px; min-height: 42px;
}
input::placeholder { color: #95a2bd; }
.primary { background: var(--mint); color: #111d24; }
.primary:hover:not(:disabled) { background: #d1ffed; }
.secondary { background: #252a36; color: #edf3ff; border-color: #384152; font-size: .875rem; }
.secondary:hover:not(:disabled) { background: #303849; }
.timer-tool { display: grid; grid-template-columns: minmax(270px, 1fr) auto auto; align-items: end; gap: 10px; }
.timer-tool h2 { grid-column: 1 / -1; margin-bottom: 0; }
#timer-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
#timer-form .duration { margin: 0; }
.timer-tool button { white-space: nowrap; }
.timer-steps {
  display: grid; grid-template-columns: repeat(4, minmax(42px, 1fr)); gap: 5px;
}
.timer-steps button { padding: 4px 6px; min-height: 42px; }
.gift-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; }
#gift-selection { color: var(--mint); font-size: .84rem; font-weight: 800; }
.gift-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
.gift-tile {
  display: grid; justify-items: center; align-content: center; gap: 2px;
  min-width: 0; min-height: 80px; padding: 6px 2px; color: #e3ebfe;
  border: 1px solid #353d4b; background: #141820; font-size: .84rem; font-variant-numeric: tabular-nums;
}
.gift-tile img { display: block; width: 46px; height: 46px; object-fit: contain; }
.gift-tile span { display: grid; place-items: center; width: 46px; height: 46px; font-size: 1.65rem; line-height: 1; }
.gift-tile:hover:not(:disabled) { background: #243349; }
.gift-tile[aria-pressed="true"], .gift-custom[data-selected="true"] {
  color: var(--mint); border-color: #73dcb9; background: #1d383c;
}
.gift-custom { color: var(--mint); }
#gift-rate-form { margin-top: 12px; }
.gift-filter-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding: 7px 9px; border-radius: 7px; background: #11182a; cursor: pointer;
}
.gift-filter-row input {
  appearance: none; position: relative; flex: 0 0 36px; width: 36px; min-height: 20px;
  height: 20px; margin: 0; padding: 0; border: 1px solid #596581; border-radius: 20px; cursor: pointer;
}
.gift-filter-row input::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: #a6b2ca;
}
.gift-filter-row input:checked { border-color: #73dcb9; background: #244843; }
.gift-filter-row input:checked::before { transform: translateX(15px); background: var(--mint); }
.rate-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 5px; }
#live-status, #setup-status { margin-top: 8px; color: var(--muted); font-size: .875rem; }
#live-status[data-status="connected"] { color: var(--mint); }
#entry-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.stream-links { display: flex; gap: 8px; }
.stream-links > * { flex: 1 1 0; text-align: center; }
.stream-links { margin-top: 8px; }
.stream-links .primary { font-size: .875rem; }
.stream-tool { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px 10px; }
.stream-tool > label, .stream-tool > [role="status"] { grid-column: 1 / -1; }
.stream-tool .stream-links { margin: 0; flex-wrap: wrap; }
.stream-tool .stream-links > * { flex: 0 0 auto; }
#overlay-url { font-family: Consolas, monospace; }
#copy-status:empty, #notice:empty { display: none; }
#copy-status:not(:empty) { color: var(--mint); margin-top: 8px; font-size: .875rem; }
#roster { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow: auto; }
#roster:not(:empty) { margin-top: 11px; }
#roster li {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center;
  gap: 6px; min-height: 42px; border-top: 1px solid #292f47;
}
.roster-name { overflow-wrap: anywhere; min-width: 0; }
.roster-name:has(.roster-avatar) { display: flex; align-items: center; gap: 8px; }
.roster-name .roster-avatar { flex: 0 0 26px; aspect-ratio: 1; border-radius: 50%; font-size: .65rem; }
.roster-count { font-size: .875rem; color: var(--mint); padding: 0 6px; }
.roster-button { min-height: 30px; width: 32px; padding: 0; }
#notice { font-size: .875rem; color: var(--mint); padding: 6px 0; }
#notice[data-error="true"] { color: #ffacb8; }
.text-button { background: transparent; color: var(--muted); white-space: nowrap; padding: 4px 0; min-height: 32px; font-size: .875rem; }
.text-button:hover { color: #fff; }
#setup-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
#setup-form label { grid-column: 1 / -1; }
#setup-status:empty { display: none; }
.setup-profile .live-option { padding-top: 17px; margin-top: 18px; border-top: 1px solid var(--line); }
.setup-profile .live-option a { color: var(--mint); }
#live-bridge { max-width: 510px; display: grid; gap: 8px; margin-top: 12px; }
#live-bridge button { justify-self: start; }
.setup-gifts { margin-top: 14px; }

.preview { width: 100%; }
html:not(.broadcast) .preview { min-width: 0; padding: 16px; background: #151820; border: 1px solid #2d3340; border-radius: 10px; }
.preview-title { font-size: 1.04rem; margin-bottom: 12px; }
html:not(.broadcast) .preview > .board { max-width: 500px; margin-inline: auto; box-shadow: none; }
.board {
  container-type: inline-size; padding: clamp(12px, 3.2vw, 21px); position: relative; isolation: isolate;
  overflow: hidden; width: 100%; color: #f2f5ff; border-radius: 18px; border: 1px solid #4a587b;
  background: radial-gradient(ellipse at 50% -25%, #394b75 0%, #182039 48%, #101529 83%);
  box-shadow: 0 14px 40px #05071290, inset 0 1px #b7caff37;
}
.board::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(#afd0ff0b 1px, transparent 1px), linear-gradient(90deg, #afd0ff0b 1px, transparent 1px);
  background-size: 24px 24px; mask-image: linear-gradient(black, transparent 66%);
}
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.brand { white-space: nowrap; font-size: clamp(.68rem, 3.1cqw, .94rem); font-weight: 900; letter-spacing: .02em; }
.brand span { color: var(--mint); margin-right: 4px; font-size: 1.2em; }
.brand strong { color: #c4cfe7; }
.phase {
  display: flex; gap: .45em; align-items: center; white-space: nowrap;
  border-radius: 40px; background: #0d1727c9; border: 1px solid #546380; color: var(--mint);
  font-weight: 800; font-size: clamp(.65rem, 2.8cqw, .83rem); padding: .35em .65em;
}
.phase i { background: currentColor; height: .45em; width: .45em; border-radius: 50%; }
.clock-wrap { margin-top: 5cqw; text-align: center; }
#clock-label { color: #d2dbf1; letter-spacing: .1em; font-weight: 800; font-size: clamp(.65rem, 2.9cqw, .85rem); }
.clock {
  font: 900 clamp(2.7rem, 17cqw, 6.25rem)/1.12 "Consolas", monospace;
  color: var(--mint); text-shadow: 0 0 24px #63ffb765;
  letter-spacing: -.075em; padding-right: .075em; font-variant-numeric: tabular-nums;
}
.clock.long { font-size: clamp(2.4rem, 13cqw, 5rem); }
.track, .round-progress { overflow: hidden; border-radius: 12px; height: 4px; background: #070c19; }
.track { margin: 2cqw auto 4cqw; width: 79%; }
.track div, .round-progress div { height: 100%; background: var(--mint); transform-origin: left; }
.gift-rule {
  display: flex; justify-content: center; align-items: center; gap: 4px;
  min-width: 0; padding: 0 4px; text-align: center; color: #ffe492;
}
.gift-rule:has(.gift-cross) { gap: 9px; }
.gift-rule img, .gift-rule-symbol { flex: none; width: clamp(18px, 6.5cqw, 30px); height: auto; aspect-ratio: 1; object-fit: contain; }
.gift-rule-symbol { display: grid; place-items: center; font-size: 1rem; }
.gift-cross {
  position: relative; border: 1px solid #5b667e; border-radius: 50%;
  background: #273149; color: #d6dfef;
}
.gift-tile .gift-cross { width: 26px; height: 26px; margin-block: 10px; }
.gift-cross::before, .gift-cross::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 47%; height: 2px;
  border-radius: 2px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg);
}
.gift-cross::after { transform: translate(-50%, -50%) rotate(-45deg); }
.gift-rule strong { min-width: 0; font-size: clamp(.48rem, 2.7cqw, .9rem); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stats {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: #0d1426c9;
  border: 1px solid #3a4666; border-radius: 10px; padding: 7px 0;
}
.stat { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; text-align: center; padding: 1px; }
.stats > :not([hidden]) ~ .stat { border-left: 1px solid #39435e; }
.stat strong { color: #fff4d3; font: 800 clamp(.85rem, 6cqw, 2rem)/1.12 "Consolas", monospace; }
.stat span { color: #b8c4dd; font-size: clamp(.45rem, 2.7cqw, .8rem); font-weight: 800; overflow-wrap: anywhere; }
@container (max-width: 320px) {
  .gift-rule { flex-direction: column; gap: 2px; }
  .gift-rule:has(.gift-cross) { gap: 4px; }
  .stats:has(.gift-rule:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .85fr) minmax(0, .9fr);
  }
}
.stage {
  --slot-width: calc((100cqw - (var(--cols, 4) - 1) * var(--tile-gap, 5px)) / var(--cols, 4));
  --row-height: calc(var(--slot-width) / 1.28 + 1.83 * min(2.8cqw, var(--tile-label, 14px)) + 2px);
  --grid-height: calc(var(--rows, 1) * var(--row-height) + (var(--rows, 1) - 1) * var(--tile-gap, 5px));
  position: relative; display: flex; flex-direction: column;
  height: max(280px, 72cqw, calc(var(--grid-height) + 44px));
  margin-top: 3.3cqw;
}
.stage-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.stage-head h2 { font-size: clamp(.9rem, 4cqw, 1.2rem); }
.grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: var(--tile-gap, 5px); }
.grid[data-columns="2"] { width: 82%; margin-inline: auto; }
.tile { position: relative; min-width: 0; background: #212b46; border: 1px solid #4b5c81; border-radius: 8px; overflow: hidden; }
.avatar {
  display: grid; place-items: center; isolation: isolate; position: relative;
  background: radial-gradient(circle at 30% 18%, hsl(var(--hue) 77% 55%), hsl(var(--hue) 63% 27%) 80%);
  text-shadow: 0 2px 7px #15182ce0;
}
.avatar::before {
  position: absolute; content: ""; inset: 0; z-index: -1;
  background: repeating-linear-gradient(135deg, transparent 0 12px, #ffffff13 12px 13px, transparent 13px 22px);
}
.avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
}
.avatar { aspect-ratio: 1.28; font-size: min(6.2cqw, var(--avatar-text, 30px)); font-weight: 900; }
.grid[data-columns="2"] .avatar { aspect-ratio: 1.45; font-size: clamp(1.5rem, 10cqw, 3.1rem); }
.tile-name {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: min(3px, .24em); text-align: center; font-size: min(2.8cqw, var(--tile-label, 14px)); font-weight: 800;
}
.grid[data-columns="2"] .tile-name { font-size: clamp(.86rem, 4cqw, 1.2rem); }
.grid[data-endgame="4"], .grid[data-endgame="3"], .grid[data-endgame="2"] {
  width: 100%; flex: 1 1 0; min-height: 0; margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 7px;
}
.grid[data-endgame="2"] {
  grid-template-rows: minmax(0, 1fr); gap: 4px;
  border: 2px solid #ffc85a; border-radius: 10px; overflow: hidden;
  background: #fa516c;
}
.grid[data-endgame="3"] .tile:last-child {
  grid-column: 1 / -1; width: calc((100% - 7px) / 2); justify-self: center;
}
.grid[data-endgame]:not([data-endgame=""]) .tile {
  min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto;
}
.grid[data-endgame]:not([data-endgame=""]) .avatar {
  aspect-ratio: auto; font-size: clamp(1.65rem, 14cqw, 4.1rem);
}
.grid[data-endgame]:not([data-endgame=""]) .tile-name {
  padding: 6px; font-size: clamp(.83rem, 4cqw, 1.18rem);
}
.grid[data-endgame="2"] .tile { border-radius: 0; border: 0; }
.grid[data-endgame="2"] .tile.target::after { border-width: 5px; }
.grid[data-endgame="2"] .avatar { font-size: clamp(2.3rem, 20cqw, 5.75rem); }
.duel-intro {
  position: absolute; z-index: 2; top: calc(50% + 12px); left: 50%;
  transform: translate(-50%, -50%); display: grid; justify-items: center; align-content: center;
  white-space: nowrap; pointer-events: none;
}
.duel-intro span {
  color: #ffe3a1; font-size: clamp(1.6rem, 9cqw, 3.3rem); line-height: .9;
  text-shadow: 0 2px 5px #000, 0 0 12px #ff5978;
}
.duel-intro strong {
  color: #fff0bc; font: 900 clamp(1.35rem, 10cqw, 3.3rem)/1.05 "Segoe UI", sans-serif;
  letter-spacing: .08em; padding: .12em .48em .20em;
  background: linear-gradient(#47152a,#1b1020); border: 2px solid #ffbf57; border-radius: 7px;
  box-shadow: 0 0 0 3px #7c173f, 0 0 20px #ff567bba;
}
@media (prefers-reduced-motion: no-preference) {
  .duel-intro { animation: duel-entrance 180ms ease-out; }
  @keyframes duel-entrance {
    from { opacity: 0; transform: translate(-50%, -50%) scale(.78); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }
}
.tile.target::after {
  content: ""; position: absolute; pointer-events: none; inset: 0;
  border: 3px solid #ff3455; border-radius: inherit; box-shadow: inset 0 0 8px #ff345575;
}
.tile.vanishing { opacity: 0; transform: scale(.84); transition: opacity 180ms, transform 180ms; }
@media (prefers-reduced-motion: reduce) {
  .tile.vanishing { transform: none; transition: none; }
}
[data-phase="out"] .tile.target .avatar { filter: saturate(.5) brightness(.65); }
[data-phase="out"] .tile.target .tile-name { color: #ffc3cb; background: #471728; }
[data-phase="winner"] .grid, [data-phase="winner"] .stage-head { display: none; }
[data-duel="true"] .stage-head { justify-content: center; }
[data-duel="true"] .stage-head h2 {
  color: var(--mint); letter-spacing: .08em; font-size: clamp(1.1rem, 5.25cqw, 1.65rem); font-weight: 900;
}
.empty {
  min-height: 37cqw; display: grid; align-content: center; justify-items: center; gap: 6px;
  color: #bac7df; border: 1px dashed #465273; border-radius: 10px;
}
.empty span { font-size: clamp(1.7rem, 9cqw, 2.6rem); color: #788db8; }
.empty p { font-size: clamp(.8rem, 4cqw, 1.02rem); font-weight: 700; text-align: center; }
[data-result="true"] .grid,
[data-result="true"]:not([data-duel="true"]) .stage-head { display: none; }
.elimination { display: grid; justify-items: center; gap: 5px; }
.round-banner {
  flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center;
  padding: 12px 10px; text-align: center; border-radius: 7px;
  border: 2px solid #ff4565; color: #ffd2db;
  background: radial-gradient(ellipse at 50% 10%, #431424, #190d1a 74%);
  box-shadow: inset 0 0 20px #ff345521;
}
.elimination-title {
  color: #ff6b85; font-size: clamp(1rem, 5.5cqw, 1.55rem);
  font-weight: 900; letter-spacing: .18em; text-shadow: 0 0 14px #ff456580;
}
.elimination-portrait { width: 23cqw; max-width: 106px; position: relative; margin: 3px 0; }
#elimination-avatar {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid #a7465b;
  filter: saturate(.6) brightness(.65); font-size: clamp(1.15rem, 8cqw, 2.45rem);
}
.elimination-portrait::before, .elimination-portrait::after {
  content: ""; position: absolute; z-index: 1; width: 92%; height: 12%; left: 4%; top: 44%;
  background: #ff4264; border-radius: 4px; transform: rotate(45deg);
  box-shadow: 0 2px 0 #7d1934, 0 0 9px #ff456585;
}
.elimination-portrait::after { transform: rotate(-45deg); }
#elimination-name {
  max-width: 100%; color: #fff4f6; font-size: clamp(1rem, 5.5cqw, 1.6rem);
  font-weight: 900; overflow-wrap: anywhere; line-height: 1.15;
}
.elimination-loss, .elimination-next {
  font-size: clamp(.7rem, 3cqw, .85rem); font-weight: 850; letter-spacing: .08em;
}
#elimination-odds { font-size: clamp(.7rem, 3cqw, .88rem); color: #efc9d1; }
.elimination-next { margin-top: 4px; }
.winner-card {
  position: relative; isolation: isolate; flex: 1 0 auto;
  display: grid; justify-items: center; align-content: center; gap: 8px;
  padding: 16px 12px 18px; text-align: center; overflow: hidden;
  border: 2px solid #ffcd55; border-radius: 11px;
  background: radial-gradient(ellipse at 50% 34%, #50321d, #1a1423 72%);
  box-shadow: inset 0 0 20px #f8b83b35, 0 0 12px #ffb13226;
}
.winner-card h2 {
  color: #ffe07f; font-size: clamp(1rem, 6cqw, 1.8rem); font-weight: 900;
  letter-spacing: .13em; text-shadow: 0 2px #a96826, 0 0 15px #ffc05260;
}
.winner-portrait { width: 28cqw; max-width: 130px; position: relative; margin-top: 17px; }
#winner-avatar {
  aspect-ratio: 1; border-radius: 50%; border: 3px solid #ffcf58;
  font-size: clamp(1.35rem, 10cqw, 3rem); box-shadow: 0 0 20px #ffb73c66;
}
.winner-crown {
  position: absolute; top: -18px; left: 50%; z-index: 1; width: 34%; height: 25px;
  transform: translateX(-50%) rotate(-9deg);
  clip-path: polygon(0 15%, 24% 51%, 50% 0, 75% 51%, 100% 15%, 88% 100%, 12% 100%);
  background: linear-gradient(150deg, #fff3ad 20%, #ffda5e 46%, #e88c2b 100%);
}
#winner-name {
  max-width: 100%; color: #fff8e8; overflow-wrap: anywhere;
  font-size: clamp(1.15rem, 7cqw, 2.1rem); line-height: 1.15; font-weight: 900;
}
#winner-name.long-name { font-size: clamp(.92rem, 5cqw, 1.45rem); }
.winner-meta { display: grid; justify-items: center; gap: 9px; margin-top: 4px; max-width: 100%; }
.winner-entries, .winner-credit {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid #705029; border-radius: 20px; background: #201721;
  padding: 2px 9px; white-space: nowrap;
}
.winner-entries {
  color: #ffe08c; font-size: clamp(.7rem, 3cqw, .85rem); font-weight: 850; letter-spacing: .065em;
}
#winner-entry-count { color: #fff9e9; font-size: 1.2em; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.entry-mark {
  width: .77em; height: .64em; border: 1px solid #ffdb87; border-radius: 2px;
  box-shadow: 2px 2px #976735; transform: rotate(-10deg); margin-right: 2px;
}
.winner-credit {
  color: #fff1d5; border-color: #4d3f3b; font-size: clamp(.7rem, 2.8cqw, .88rem);
}
.winner-credit strong:last-child { color: #ffdb83; }
.winner-brand-mark { color: #a5ffdc; }
.winner-by { color: #cabbb1; }
.winner-confetti { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.winner-confetti i {
  position: absolute; width: 7px; height: 4px; border-radius: 1px;
  background: #ffe078; transform: rotate(-24deg); box-shadow: 0 0 7px #ffca5755;
}
.winner-confetti i:nth-child(1) { left: 11%; top: 17%; }
.winner-confetti i:nth-child(2) { left: 22%; top: 38%; background: #ff7fa2; transform: rotate(37deg); }
.winner-confetti i:nth-child(3) { left: 8%; top: 59%; background: #8cd7ff; }
.winner-confetti i:nth-child(4) { left: 24%; top: 74%; background: #b1f3a2; transform: rotate(68deg); }
.winner-confetti i:nth-child(5) { left: 14%; top: 87%; }
.winner-confetti i:nth-child(6) { right: 11%; top: 14%; background: #b1f3a2; transform: rotate(42deg); }
.winner-confetti i:nth-child(7) { right: 20%; top: 34%; }
.winner-confetti i:nth-child(8) { right: 9%; top: 56%; background: #b1a0ff; transform: rotate(56deg); }
.winner-confetti i:nth-child(9) { right: 25%; top: 75%; background: #8cd7ff; }
.winner-confetti i:nth-child(10) { right: 13%; top: 86%; background: #ff7fa2; }
@media (prefers-reduced-motion: no-preference) {
  .winner-crown { animation: crown-sway 2.4s ease-in-out infinite; }
  .winner-confetti i { animation: confetti-fall 3.8s linear infinite; }
  .winner-confetti i:nth-child(2n) { animation-duration: 4.3s; animation-delay: -1.5s; }
  .winner-confetti i:nth-child(3n) { animation-duration: 3.3s; animation-delay: -2.5s; }
  .winner-confetti i:nth-child(5n + 1) { animation-delay: -.8s; }
  .winner-confetti i:nth-child(5n + 4) { animation-delay: -3.1s; }
  @keyframes crown-sway {
    0%, 100% { transform: translate(-50%, 0) rotate(-9deg); }
    50% { transform: translate(-50%, -4px) rotate(8deg); }
  }
  @keyframes confetti-fall {
    0% { top: -8px; transform: translateX(-10px) rotate(-30deg); opacity: 0; }
    12%, 86% { opacity: 1; }
    55% { transform: translateX(10px) rotate(125deg); }
    100% { top: 100%; transform: translateX(-6px) rotate(315deg); opacity: 0; }
  }
}
.round-progress { width: 55%; margin: 5px auto 0; height: 3px; }
.round-progress div, .board[data-urgent="true"] .track div { background: var(--coral); }
[data-phase="draw"] .phase, [data-phase="out"] .phase,
[data-phase="draw"] .clock, [data-phase="out"] .clock, .board[data-urgent="true"] .clock {
  color: var(--coral); text-shadow: 0 0 24px #ff647d55;
}
.broadcast, .broadcast body { min-width: 0; width: 100%; height: 100%; overflow: hidden; background: transparent; }
.broadcast .layout { position: fixed; inset: 0; display: block; overflow: hidden; padding: 0; width: 100%; }
.broadcast .preview { position: absolute; left: 50%; top: 4px; width: 500px; transform: translateX(-50%) scale(var(--fit, .5)); transform-origin: top center; }
.broadcast .board { padding: 14px; }
.broadcast .clock-wrap { margin-top: 3cqw; }
.broadcast .clock { font-size: 14cqw; }
.broadcast .clock.long { font-size: 12cqw; }
.broadcast .track { margin-bottom: 2.5cqw; }
.broadcast .stage { margin-top: 2.4cqw; }
.broadcast .dashboard { display: block; }
.broadcast .controls, .broadcast .workspace-nav, .broadcast .setup-page,
.broadcast .dashboard-header, .broadcast .timer-tool, .broadcast .stream-tool, .broadcast .preview-title { display: none; }
@media (max-width: 1100px) {
  .timer-tool { grid-template-columns: minmax(0, 1fr) auto; }
  #timer-form { grid-column: 1 / -1; }
}
@media (max-width: 660px) {
  :root { --nav-width: 58px; }
  .workspace-nav { padding-inline: 5px; }
  .workspace-nav .nav-label { display: none; }
  .workspace-nav button, .workspace-nav a { min-height: 45px; }
  .dashboard-header { flex-wrap: wrap; }
  .dashboard, .stream-tool, .timer-tool { grid-template-columns: minmax(0, 1fr); }
  #timer-form { grid-template-columns: minmax(0, 1fr); }
  .stream-tool .stream-links > * { flex: 1 1 auto; padding-inline: 9px; }
  #setup-form { grid-template-columns: minmax(0, 1fr); }
  html:not(.broadcast) .preview { padding: 10px; }
}
.rehearsal-only, .rehearsal-link { display: none; }
html:not(.rehearsal) .rehearsal-link { display: flex; }
.rehearsal .rehearsal-only { display: block; }
.rehearsal .workspace-nav .rehearsal-only { display: flex; }
.rehearsal .rehearsal-link, .rehearsal #elimination-odds { display: none; }
.rehearsal .live-option { display: none; }
#rehearsal-winner {
  width: 100%; margin-top: 6px; padding: 8px;
  border: 1px solid var(--line); border-radius: 6px;
  font: inherit; color: var(--ink, #eff4ff); background: #151b2e;
}
