:root {
  --ink: #16171a;
  --ink-2: #4b4d53;
  --ink-3: #8b8f98;
  --paper: #ffffff;
  --card: #ffffff;
  --line: #575757;
  --line-2: #c6c2b8;
  --live: #000000;
  --live-bg: #e4ece4;
  --live-line: #f7f7f7;
  --ok: #1d611b;
  --ok-bg: #ffffff;
  --ok-line: #575757;
  --best: #1d611b;
  --best-bg: #e4ece4;
  --warn: #a01800;
  --warn-bg: #f6e8e6;
  --danger: #a01800;
  --danger-bg: #f6e8e6;
  --radius: 0px;
  --team-gov: #1f5f27;
  --team-opp: #c23b3b;
  --team-free: #c99a1e;
  --dark-ink: #eceae6;
  --dark-ink-2: #b5b5b7;
  --dark-ink-3: #71757d;
  --dark-paper: #161616;
  --dark-card: #202020;
  --dark-line: #2e3138;
  --dark-line-2: #41454d;
  --dark-live: #ffffff;
  --dark-live-bg: #ffffff;
  --dark-live-line: #556d4a;
  --dark-ok: #1d611b;
  --dark-ok-bg: #ffffff;
  --dark-ok-line: #556d4a;
  --dark-best: #96cb7e;
  --dark-best-bg: #384233;
  --dark-warn: #ff8874;
  --dark-warn-bg: #48332f;
  --dark-danger: #ff8874;
  --dark-danger-bg: #48332f;
}

:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --ink: var(--dark-ink);
    --ink-2: var(--dark-ink-2);
    --ink-3: var(--dark-ink-3);
    --paper: var(--dark-paper);
    --card: var(--dark-card);
    --line: var(--dark-line);
    --line-2: var(--dark-line-2);
    --live: var(--dark-live);
    --live-bg: var(--dark-live-bg);
    --live-line: var(--dark-live-line);
    --ok: var(--dark-ok);
    --ok-bg: var(--dark-ok-bg);
    --ok-line: var(--dark-ok-line);
    --best: var(--dark-best);
    --best-bg: var(--dark-best-bg);
    --warn: var(--dark-warn);
    --warn-bg: var(--dark-warn-bg);
    --danger: var(--dark-danger);
    --danger-bg: var(--dark-danger-bg);
  }
}
:root[data-theme="dark"] {
  --ink: var(--dark-ink);
  --ink-2: var(--dark-ink-2);
  --ink-3: var(--dark-ink-3);
  --paper: var(--dark-paper);
  --card: var(--dark-card);
  --line: var(--dark-line);
  --line-2: var(--dark-line-2);
  --live: var(--dark-live);
  --live-bg: var(--dark-live-bg);
  --live-line: var(--dark-live-line);
  --ok: var(--dark-ok);
  --ok-bg: var(--dark-ok-bg);
  --ok-line: var(--dark-ok-line);
  --best: var(--dark-best);
  --best-bg: var(--dark-best-bg);
  --warn: var(--dark-warn);
  --warn-bg: var(--dark-warn-bg);
  --danger: var(--dark-danger);
  --danger-bg: var(--dark-danger-bg);
}
/* Source Serif 4 (variable, 400-700), self-hosted so it works offline -
   both files are in sw.js's SHELL. License: static/fonts/OFL.txt. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/source-serif-4-latin.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/source-serif-4-latin-ext.woff2) format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.wrap {
  max-width: 440px;
  margin: 0 auto;
}
#v-lobby {
  padding: 10px 12px 14px;
  box-sizing: border-box;
}
#main.hide {
  display: none;
}
.viewport {
  padding: 10px 12px 14px;
  box-sizing: border-box;
}
.dock {
  background: var(--paper);
  box-sizing: border-box;
}
.dock.hide {
  display: none;
}
/* No rule of its own for .dockpad's horizontal inset - it now lives inside
   .viewport, which already insets everything else in the scroll area by
   the same amount. */
.dockpad.hide {
  display: none;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0px;
  padding: 12px;
}
.card + .card {
  margin-top: 10px;
}
/* Mobile layout only (desktop sets .dashboard-mode on #app): cards drop
   their box and stacked cards are separated by a single rule instead. */
#app:not(.dashboard-mode) .card {
  background: transparent;
  border-color: transparent;
  padding: 10px 0;
}
#app:not(.dashboard-mode) .card + .card {
  border-top-color: var(--line-2);
  padding-top: 14px;
}
#app:not(.dashboard-mode) .card > h2,
#app:not(.dashboard-mode) th {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
#v-sheet .dedu {
  padding-left: 4px;
  padding-right: 4px;
  flex-direction: column;
  align-items: stretch;
}
/* Mobile Abzüge: a toggle row (current level shown on the right) that
   opens the three options below it. */
.dedtoggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  text-align: left;
  padding: 4px 0;
  cursor: pointer;
}
.dedtoggle > span:first-child {
  flex: 1;
}
.dedstate {
  color: var(--warn);
  font-weight: 500;
}
.dedchev {
  color: var(--ink-3);
  font-size: 11px;
}
.dedtoggle[aria-expanded="true"] .dedchev {
  transform: rotate(180deg);
}
.dedopts {
  display: flex;
  gap: 6px;
  padding-bottom: 4px;
}
.dedopts .dedopt {
  flex: 1;
}
#lobbyTitle {
  text-align: center;
}
.signguy {
  display: block;
  width: auto;
  height: 280px;
  margin: 10px auto 0px;
  color: var(--ink);
}

.bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
  padding: 2px 4px 8px;
}
.menubtn {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 0px;
}
/* Debate timer widget - lives in .bar (shared by the mobile top bar and the
   desktop docked header), so it costs no extra layout height of its own. */
.timerwidget {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 0px;
  cursor: pointer;
  flex: 0 0 auto;
  max-width: 46vw;
  overflow: hidden;
}
.timerwidget.idle {
  color: var(--ink-3);
}
.timerwidget.live {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}
.timerwidget.warn {
  border-color: var(--line-2);
  background: var(--warn-bg);
  color: var(--warn);
}
.timerwidget.danger {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}
.timerwidget.paused {
  opacity: 0.6;
}
.timerwidget .tabicon {
  display: none;
}
#app.dashboard-mode .timerwidget {
  align-self: stretch;
  max-width: none;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--ink) 10%, var(--paper));
  color: var(--ink-2);
  font-size: 11px;
}
#app.dashboard-mode .timerwidget:hover {
  color: var(--ink);
}
#app.dashboard-mode .timerwidget .tabicon {
  display: block;
  flex: 0 0 auto;
}
#app.dashboard-mode .timerwidget.idle {
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
#app.dashboard-mode .timerwidget.idle .timerclock {
  font-size: 11px;
  font-weight: 400;
}
#app.dashboard-mode .timerwidget:not(.idle) .timerclock {
  font-size: 15px;
  font-weight: 600;
}
#app.dashboard-mode .timerwidget.live {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}
#app.dashboard-mode .timerwidget.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
#app.dashboard-mode .timerwidget.danger {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}
.timerclock {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.timerlabel {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timernext {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
#app:not(.dashboard-mode) .timerwidget {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}
#app:not(.dashboard-mode) .timerclock {
  margin-left: auto;
}
/* Idle shows only "Timer" in the clock (label hidden), so the clock needs
   the right-hand auto margin itself to stay centred. */
#app:not(.dashboard-mode) .timerwidget.idle .timerclock {
  margin-right: auto;
}
#app:not(.dashboard-mode) .timerlabel {
  flex: 0 1 auto;
  min-width: 0;
  margin-right: auto;
}
#app:not(.dashboard-mode) .timerwidget:not(.hide) ~ .sp {
  flex: 0;
}
.timertypes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.timerbigclock {
  font-size: 46px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1.1;
  margin: 6px 0 12px;
  color: var(--ink);
}
.timerbigclock.warn {
  color: var(--warn);
}
.timerbigclock.danger {
  color: var(--danger);
}
/* Signal rail: a thin bar spanning 0 up to the end of the overdraw grace,
   with a tick at each bell instant (open window start/end, nominal end,
   grace end) so a judge can see what's coming, not just the current time. */
.timerbar {
  position: relative;
  height: 3px;
  background: var(--line);
  margin: 0 0 20px;
}
.timerbarfill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--ok);
}
.timerbarfill.warn {
  background: var(--warn);
}
.timerbarfill.danger {
  background: var(--danger);
}
.timerbarmark {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: var(--ink-3);
}
.menubtn[aria-expanded="true"] {
  background: var(--live-bg);
  color: var(--live);
}
#shortcutsBtn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menupanel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.menuwho {
  font-size: 12px;
  color: var(--ink-3);
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.menudivider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 6px;
}
.menuitem {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
}
.menuitem:hover,
.menuitem:active {
  background: var(--paper);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: 0 0 8px;
}
.dot.on {
  background: var(--ok);
}
.dot.off {
  background: var(--warn);
}
.bar .sp {
  flex: 1;
}

.hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.hd h1 {
  margin: 0;
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
#v-sheet .card .hd,
#v-team .card .hd {
  background: var(--team-accent, transparent);
  color: var(--team-on, var(--ink));
  padding: 10px;
  margin-bottom: 10px;
  border-radius: var(--radius);
}
#app:not(.dashboard-mode) #v-sheet .card .hd,
#app:not(.dashboard-mode) #v-team .card .hd {
  margin-left: -12px;
  margin-right: -12px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 0;
}
#app:not(.dashboard-mode) .crit {
  margin-left: -12px;
  margin-right: -12px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 0;
  border-left-width: 0;
  border-right-width: 0;
}
#app:not(.dashboard-mode) .sum,
#app:not(.dashboard-mode) .exclrow {
  margin-left: -12px;
  margin-right: -12px;
  padding-left: 16px;
  padding-right: 16px;
}
#app:not(.dashboard-mode) .crit:focus-visible {
  outline-offset: -2px;
}
#v-sheet .card .hd .navbtn,
#v-team .card .hd .navbtn,
.blatthead .navbtn {
  color: inherit;
  border-color: currentColor;
  border-color: color-mix(in srgb, currentColor 45%, transparent);
}
#v-sheet .card.team-gov,
#v-team .card.team-gov,
.teampointssec.team-gov,
.blatthead.team-gov,
.notescol.team-gov,
.roomtable.team-gov,
.dashnav.team-gov {
  --team-accent: var(--team-gov);
  --team-on: #ffffff;
}
#v-sheet .card.team-opp,
#v-team .card.team-opp,
.teampointssec.team-opp,
.blatthead.team-opp,
.notescol.team-opp,
.roomtable.team-opp,
.dashnav.team-opp {
  --team-accent: var(--team-opp);
  --team-on: #ffffff;
}
#v-sheet .card.team-free,
#v-team .card.team-free,
.blatthead.team-free,
.roomtable.team-free,
.dashnav.team-free {
  --team-accent: var(--team-free);
  --team-on: #ffffff;
}
/* Namen (mobile) */
.namelbl {
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
/* "Raum CODE" heading atop the Namen view (mobile and desktop) - the first
   tab most judges land on, so it doubles as the room's title screen. */
.roomtitle {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 4px 0 10px;
  text-align: center;
}
/* One card for every speech, position colored per-row instead of per-card. */
.seat .slbl.team-gov {
  color: var(--team-gov);
}
.seat .slbl.team-opp {
  color: var(--team-opp);
}
.seat .slbl.team-free {
  color: var(--team-free);
}
.navbtn {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  border-radius: 0px;
  width: 34px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  flex: 0 0 34px;
}
.navbtn:disabled {
  opacity: 0.3;
}
.navbtn.blattnav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 40px;
}
.navbtn.blattnav .navhint {
  font-size: 8px;
}
.sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.crit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 4px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
}
.crit .nm {
  font-size: 15px;
  color: var(--ink-2);
}
.crit .rt {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
}
.crit .mk {
  font-size: 12px;
  color: var(--ink-3);
  margin-right: 2px;
}
.crit .vl {
  font-size: 19px;
  font-weight: 500;
  min-width: 32px;
  text-align: right;
}
.adj {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.adj:disabled {
  opacity: 0.25;
}
.crit.empty .nm,
.crit.empty .vl {
  color: var(--ink-3);
}
.crit.empty .vl {
  font-weight: 400;
}
.crit.live {
  background: var(--live);
  border-color: var(--live);
}
.crit.live .nm,
.crit.live .vl,
.crit.live .mk,
.crit.live .adj {
  color: var(--paper);
}
.crit.live .adj {
  border-color: color-mix(in srgb, var(--paper) 50%, transparent);
}
.crit.live .nm {
  font-weight: 500;
}
.grp {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin: 10px 0 2px 4px;
}
hr.sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}
/* The rule between the score rows and the Notenskala keypad is the soft
   line colour, so the two read as one tool rather than two sections. */
.dockpad > hr.sep {
  border-top-color: var(--line-2);
}
.recentroom {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font: inherit;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.recentroom:last-child {
  border-bottom: 0;
}
.recentroom .code {
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.recentroom .info {
  flex: 1;
  min-width: 0;
}
.recentroom .info + .info {
  flex: 0 1 auto;
  text-align: right;
}
.recentroom .who {
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recentroom .meta {
  color: var(--ink-3);
  font-size: 11px;
}
.sum {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 4px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.sum > span:first-child {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sum b {
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
}
.abz {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
}
.abz .l {
  flex: 1;
  font-size: 13px;
  color: var(--ink-2);
}
.step {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 17px;
  cursor: pointer;
}
.abz .v {
  width: 34px;
  text-align: center;
  font-size: 16px;
}

.noterow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 4px;
}
.notelbl {
  width: 96px;
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.notelbl .a {
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.2;
}
.notelbl .b {
  font-size: 10px;
  color: var(--ink-3);
  line-height: 1.2;
}
.notekeys {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.notekeys.notekeys-fill {
  display: flex;
}
.notekeys-fill .key {
  flex: 1;
}
.key {
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 39px;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.key .n {
  font-size: 20px;
  line-height: 1.1;
}
.key .m {
  font-size: 10px;
  color: var(--ink-3);
}
.key:active {
  background: var(--live-bg);
  /*border-color: var(--live);*/
}
.key:active .n,
.key:active .m {
  color: var(--live);
}
.wide {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  width: 100%;
  padding: 8px 0;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 2px;
}
.undo {
  border: 0;
  background: transparent;
  color: var(--live);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 0;
  margin-left: auto;
}
input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.btn {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--live);
  background: var(--live);
  color: var(--paper);
  cursor: pointer;
  margin-top: 10px;
}
.btn.ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line-2);
}
.err {
  font-size: 13px;
  color: var(--warn);
  margin-top: 8px;
  min-height: 18px;
}
.code {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-align: center;
  padding: 8px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 10px;
  padding-bottom: 6px;
  text-align: center;
}
th.l {
  text-align: left;
}
td {
  text-align: center;
  padding: 5px 0;
}
td.l {
  text-align: left;
  color: var(--ink-2);
  font-size: 12px;
}
td.mt {
  color: var(--ink-3);
}
td.tot {
  font-weight: 500;
}
td.best,
td.l.best {
  font-weight: 700;
  color: var(--best);
}

.jrow {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.jrow .n {
  flex: 1;
  font-size: 14px;
}
.jrow .p {
  font-size: 12px;
  color: var(--ink-3);
}
.jrow .x {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.sprow {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.sprow .top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sprow .lb {
  flex: 1;
  font-size: 14px;
}
.sprow .sv {
  font-size: 12px;
  color: var(--ink-3);
}
.sprow .big {
  font-size: 16px;
  font-weight: 500;
}
.sprow.hot .big {
  color: var(--warn);
}
.sprow .det {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  display: none;
}
.sprow.open .det {
  display: block;
}
h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
}
p.note {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 12px 0 0;
}
.tabs {
  z-index: 20;
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 4px 8px calc(6px + env(safe-area-inset-bottom));
}
/* Fixed rather than in-flow/sticky, so the tab bar stays reachable even on
   views taller than one screen (e.g. the chair tab) instead of only
   appearing once scrolled all the way down. The trade-off, accepted
   deliberately: on Firefox Android this keeps the document itself
   scrolling (rather than moving that responsibility to an inner scroll
   container), so the browser's own toolbar can still auto-hide on scroll -
   at the cost of the tab bar briefly jittering into place while that
   toolbar's show/hide animates and the layout viewport resizes underneath
   it. Desktop hides .tabs entirely (see applyLayoutMode), so this is scoped
   to mobile only. syncDockSpacer() keeps .viewport's bottom padding matched
   to the bar's actual height so it doesn't cover the last row of content
   (.dockpad included, since that now lives inside .viewport too). */
#app:not(.dashboard-mode) .tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 440px;
  margin: 0 auto;
  /* Promotes the bar to its own compositor layer - without this, some
     mobile browsers (seen in the installed/standalone PWA) fail to repaint
     a fixed element after a sibling's content height changes (e.g.
     renderMatrix() rebuilding #matrix for the Übersicht tab), leaving it
     invisible-but-still-clickable until something else forces a repaint. */
  transform: translateZ(0);
}
.tabs button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 11px;
  padding: 6px 2px;
  border-radius: 0px;
  cursor: pointer;
}
.tabs button[aria-pressed="true"] {
  color: var(--live);
  font-weight: 600;
}
.tabicon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  /* Hand-drawn icons (traced from handdrawn/*.png on a 20-unit grid) - thinner
     than a typical icon set so the small heads don't fill in at 21px. */
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Parts drawn with a heavier marker in the sketch (the Team tabletop). */
.tabicon .heavy {
  stroke-width: 2.2;
}
.legalrow {
  text-align: center;
  margin-top: 14px;
}
.legallink {
  font-size: 12px;
  color: var(--ink-3);
}
.legallink + .legallink {
  margin-left: 12px;
}
.hide {
  display: none !important;
}
button:focus-visible,
.crit:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 2px;
}

.dedu {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  margin-top: 2px;
}
.dedu .l {
  flex: 1;
  font-size: 13px;
  color: var(--ink-2);
}
.dedopt {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  padding: 7px 8px;
  border-radius: var(--radius);
  cursor: pointer;
}
.dedopt.on {
  background: var(--warn-bg);
  border-color: var(--warn);
  color: var(--warn);
  font-weight: 500;
}
.exclrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 4px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.exclbtn {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 2px 0;
}
.exclbtn.on {
  color: var(--warn);
  text-decoration: none;
}
.card.excluded {
  opacity: 0.55;
}
.excltag {
  font-size: 11px;
  color: var(--warn);
  background: var(--warn-bg);
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 6px;
}
.totgrp {
  border-bottom: 1px solid var(--line);
}
.totrow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 0;
  cursor: pointer;
}
/* Spread at/above the threshold: the whole row is tinted, bleeding a little
   past the text so the tint doesn't hug the label. */
.totrow.hot {
  background: var(--warn-bg);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}
/* Tap-to-open spread detail: judges x criteria (spreadDetailTable). */
.dtbl {
  margin: 4px 0 2px;
}
.dtbl th,
.dtbl td {
  font-size: 12px;
  padding: 3px 2px;
}
.dtbl td.hi {
  color: var(--best);
  font-weight: 600;
}
.dtbl td.lo {
  color: var(--warn);
  font-weight: 600;
}
.dtbl tr.dsum td {
  border-top: 1px solid var(--line-2);
  font-weight: 600;
}
/* Chair room card: one tappable row (Raum CODE + judge count) that opens
   the share link, judge list and room buttons. */
.roomhead {
  margin: 0;
}
.roomhead button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 2px 0;
  cursor: pointer;
}
.roomhead button > span:first-child {
  flex: 1;
}
.roomsum {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0;
}
.roomhead button[aria-expanded="true"] .dedchev {
  transform: rotate(180deg);
}
#chairRoomBody {
  margin-top: 10px;
}
.totrow .lb {
  flex: 1;
  font-size: 14px;
}
.totrow .sv {
  font-size: 12px;
  color: var(--ink-3);
}
.totrow .big {
  font-size: 16px;
  font-weight: 500;
}
.totrow.hot .big {
  color: var(--warn);
}
.finalTbl {
  margin-top: 8px;
}
/* Number columns sit at the right edge, so Ø Punkte, Ø Team and Gesamt
   line up down the card. */
.finalTbl th:not(.l),
.finalTbl td:not(.l) {
  text-align: right;
}

.bkwrap {
  padding: 2px 0 8px;
}
.chip {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
}

/* Desktop chair dashboard */
html,
body {
  height: 100%;
}
#app.dashboard-mode {
  max-width: none;
  display: flex;
  flex-direction: column;
  height: 100vh;
}
#app.dashboard-mode #main:not(.hide) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
/* The mobile top bar (connection dot/state + ⋮ menu) stays visible and
   carries the desktop nav + room/judges info too, so it's a single bar. */
/* Desktop: a tinted strip with folder tabs (.dashnav) sitting on its bottom
   rule - the active tab takes the page background and covers that rule, so
   it reads as joined to the view below. No bottom padding: the tabs reach
   the rule, and everything else in the bar centres on their height. */
/* On desktop .viewport holds only the bar (the mobile views in it are
   hidden), so drop its mobile inset and let the tint run edge to edge. */
#app.dashboard-mode .viewport {
  padding: 0;
}
#app.dashboard-mode .bar {
  padding: 8px 24px 0;
  background: color-mix(in srgb, var(--ink) 5%, var(--paper));
  border-bottom: 1px solid var(--line);
}
#v-dashboard.hide {
  display: none;
}
#v-dashboard {
  background: var(--paper);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.dashnav {
  display: flex;
  align-self: flex-end;
  gap: 3px;
  margin-left: 10px;
}
/* Folder tabs: the top-row nav and the dashboard's section tabs
   (.dashtabs, see the Dashboard block further down) share one look. */
.dashnav button,
.dashtabs > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--ink) 10%, var(--paper));
  color: var(--ink-2);
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
  padding: 5px 12px;
  cursor: pointer;
}
.dashnav button:hover,
.dashtabs > button:hover {
  color: var(--ink);
}
.dashnav button[aria-pressed="true"],
.dashtabs > button[aria-pressed="true"] {
  background: var(--team-accent, var(--paper));
  color: var(--team-on, var(--ink));
  border-color: var(--team-accent, var(--line));
  font-weight: 600;
  margin-bottom: -1px;
  padding-bottom: 6px;
}
/* Dashed frame for tabs that have no hand drawing yet (see initDashNavIcons). */
.tabicon .tabiconph {
  stroke-dasharray: 1.6 1.8;
}
.navhint {
  font-size: 9px;
  line-height: 1.2;
  color: var(--ink-3);
}
.dashroom {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  margin-right: 2px;
  flex: 0 0 auto;
  cursor: pointer;
  border-bottom: 1px dotted var(--line-2);
}
.dashroom:hover {
  color: var(--ink-2);
}
.dashjury {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 40vw;
  gap: 8px;
}
.dashjurychips {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  min-width: 0;
  gap: 8px;
}
.dashjsummary {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 1px dotted var(--line-2);
}
/* Judge-list popover, opened from .dashjsummary - same look as .menupanel,
   but fixed-positioned and anchored under the summary via JS (it can't sit
   as a normal absolute-positioned sibling because .dashjurychips scrolls
   its own content, which would clip it). */
.jurypanel {
  position: fixed;
  z-index: 40;
  min-width: 220px;
  max-width: 300px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.jurypanel .jrow:last-child {
  border-bottom: 0;
}
.dashjbtn {
  margin-top: 0;
}
.dashjbtn.on {
  background: var(--live);
  color: var(--paper);
  border-color: var(--live);
}
/* Same green-when-active look as .dashjbtn.on, but without that class's
   margin-top: 0 - reusing .dashjbtn here made this button margin-less
   while its "Testton" sibling kept .btn's default 10px margin-top, so the
   two ended up different heights within their shared flex row. Must stay
   after .btn.ghost in source order - same specificity, so an earlier
   declaration here would just lose the cascade tie-break to it. */
.timermute.on {
  background: var(--live);
  color: var(--paper);
  border-color: var(--live);
}

.dashbody {
  flex: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 20px;
  padding: 20px 24px;
  min-height: 0;
  overflow: hidden;
}
.dashcol {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.dashcol-a {
  flex: 0 1 280px;
  min-width: 220px;
}
.dashcol-b {
  flex: 0 1 420px;
  min-width: 340px;
}
.dashcol-c {
  flex: 1 1 420px;
  min-width: 320px;
}
.dashpanel {
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dashpanel-grow {
  flex: 1;
}
.dashpanel-grow2 {
  flex: 2;
}
.dashpanel-grow3 {
  flex: 3;
}
.dashpanel.team-gov {
  border-top: 3px solid var(--team-gov);
}
.dashpanel.team-opp {
  border-top: 3px solid var(--team-opp);
}
.dashpanel.team-free {
  border-top: 3px solid var(--team-free);
}
.dashpanelhead {
  flex: 0 0 auto;
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--line);
}
.dashpanelhead h2 {
  margin: 0;
}
.dashpanelbody {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
}
.dashpanelbody-table {
  padding: 4px 14px 12px;
}
.dashpanelbody-table table {
  width: 100%;
}
.offlinejurywrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#offlineJudgesWrap {
  overflow-x: auto;
}
table.offlinejurytable {
  width: auto;
}
input.offlinejudgename {
  width: 95px;
  text-align: center;
  font: inherit;
  font-size: 13px;
  padding: 6px 6px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
}
.offlinejudgedel {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.schnelltable th.offlinejudgeaddcell {
  padding-left: 14px;
}
.offlinejudgeadd {
  border: 1px dashed var(--line-2);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.schnelltable-speaker th:not(.l):not(.schnellspacer) {
  overflow-wrap: break-word;
  white-space: normal;
}
.schnelltable-speaker .schnellspacer {
  width: 20%;
}

.dashgrp {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 8px 8px 3px;
}
.dashspk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.dashspk.team-gov {
  border-left-color: var(--team-gov);
}
.dashspk.team-opp {
  border-left-color: var(--team-opp);
}
.dashspk.team-free {
  border-left-color: var(--team-free);
}
.dashspk .lb {
  flex: 1;
  font-size: 13px;
}
.dashspk .vl {
  font-size: 13px;
  font-weight: 500;
}
.dashspk.sel {
  background: var(--live-bg);
}
.dashspk.sel .lb,
.dashspk.sel .vl {
  color: var(--live);
  font-weight: 500;
}

.dashbadge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 0px;
  background: var(--ok-bg);
  color: var(--ok);
}
.dashbadge.hot {
  background: var(--warn);
  color: #fff;
}
.dashrow .dashbadge {
  align-self: stretch;
  display: flex;
  align-items: center;
  background: none;
  padding: 0;
  width: 26px;
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-2);
}
.dashrow .dashbadge.hot {
  color: var(--warn);
}

.dashrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  cursor: pointer;
}
.dashrow.hot {
  background: var(--warn-bg);
}
.dashrow.sel {
  border-left-color: var(--live);
}
.dashrowlbl {
  flex: 1;
  min-width: 0;
}
.dashrowmain {
  font-size: 13px;
  color: var(--ink);
}
.dashrowsub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}
.dashchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 50%;
  justify-content: flex-end;
}

#v-dashboard tr.hot td {
  background: var(--warn-bg);
  color: var(--warn);
}
#v-dashboard tr.hot td.l {
  font-weight: 500;
}

/* Child cells only (> td): a hovered Wertung row must not tint the
   comparison table nested inside its expanded row. */
#v-dashboard .ballottable tr:hover > td {
  background: color-mix(in srgb, var(--ink) 8%, var(--card));
}
#v-dashboard .ballottable tr.hot:hover > td {
  background: color-mix(in srgb, var(--ink) 10%, var(--warn-bg));
}
.ballottable td.spreadhot {
  color: var(--warn);
  font-weight: 500;
}
.ballottable tr.tsep td,
.offlinejurytable tr.tsep td {
  padding: 0;
  border: 0;
  border-top: 2px solid var(--line-2);
}
.ballottable tr.tsep:hover td,
.offlinejurytable tr.tsep:hover td {
  background: none;
}
.ballottable tr.grandtot td {
  font-weight: 700;
}
.ballottable tr.rowbest td {
  background: var(--best-bg);
}
#v-dashboard .ballottable tr.rowbest:hover > td {
  background: color-mix(in srgb, var(--ink) 10%, var(--best-bg));
}

/* Deductions - shared by Übersicht/Schnelleingabe rows and the ballot tables. */
tr.deducted td {
  background: var(--danger-bg);
  color: var(--danger);
}
tr.deducted td.l {
  font-weight: 500;
}
#v-dashboard .ballottable tr.deducted:hover > td {
  background: color-mix(in srgb, var(--ink) 10%, var(--danger-bg));
}

/* Trainee columns in the Wertungsvergleich: shown for context, but visibly
   excluded from Ø/Spread since their scores never factor into either. */
.ballottable .trainee {
  color: var(--ink-3);
  opacity: 0.6;
  font-style: italic;
}
.dedbadge {
  color: var(--danger);
  font-weight: 500;
}

/* Dashboard: one page on the paper background - folder tabs (Wertung /
   Ballot, sharing the .dashnav button look) over one table at a time. */
/* Shared by every view built with dashTabbedSheet() in app.js (Dashboard,
   Komplette Wertung, Offline-Jurierende, OpenTab): the sheet scrolls, the
   view root around it is just a flex column. */
.dashsheet {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px 40px;
}
.dashtabs,
.dashtabbody {
  max-width: 1100px;
  margin: 0 auto;
}
/* The strip's rule runs the full width of the view (the negative margin
   cancels .dashsheet's 24px side padding), while its padding keeps the
   tabs and buttons in line with the centred, max-1100px table below:
   24px + whatever the table is inset on each side (100% = the sheet's
   content width here). */
.dashtabs {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  max-width: none;
  margin: 0 -24px;
  padding: 0 calc(24px + max(0px, (100% - 1100px) / 2));
}
.dashtabs > button {
  font-size: 13px;
  padding: 6px 18px;
}
.dashtabs > button[aria-pressed="true"] {
  padding-bottom: 7px;
}
/* The strip's right side reaches down to the line, so the Freigeben button
   can sit on it as a small folder tab; everything else there (trainee
   toggle, Ballot links, OpenTab's connection line) keeps a gap above it. */
.dashtabsaside {
  margin-left: auto;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}
.dashtabsaside > :not(.dashfrei) {
  margin-bottom: 7px;
}
.dashfrei {
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--ink) 10%, var(--paper));
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  padding: 4px 12px 5px;
  cursor: pointer;
  white-space: nowrap;
}
.dashfrei:hover {
  color: var(--ink);
}
.dashfrei.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.dashtabbody {
  padding-top: 18px;
}
/* Wertung table: team group header rows, team-coloured names, and the
   opened row's Wertungsvergleich nested right below it. */
.dashwtable tr.dashwgrp > td {
  padding: 16px 10px 4px;
  border: 0;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
}
.dashwtable tr.dashwgrp:first-child > td,
.dashwtable tr:first-child + tr.dashwgrp > td {
  padding-top: 6px;
}
.dashwtable tr.dashwgrp.team-gov > td,
.dashwrow.team-gov .dashwname {
  color: var(--team-gov);
}
.dashwtable tr.dashwgrp.team-opp > td,
.dashwrow.team-opp .dashwname {
  color: var(--team-opp);
}
.dashwtable tr.dashwgrp.team-free > td,
.dashwrow.team-free .dashwname {
  color: var(--team-free);
}
#v-dashboard .dashwtable tr.dashwgrp:hover > td {
  background: none;
}
.dashwrow {
  cursor: pointer;
}
.dashwrow > td {
  padding-top: 6px;
  padding-bottom: 6px;
  border-top: 1px solid var(--line-2);
}
.dashwrow > td.l {
  padding-left: 4px;
}
.dashcaret {
  display: inline-block;
  width: 1.1em;
  color: var(--ink-3);
}
.dashwrow.open > td {
  background: color-mix(in srgb, var(--ink) 6%, var(--card));
}
.dashwrow.open .dashwname {
  font-weight: 600;
}
.dashwtable td.dashhot {
  color: var(--warn);
  font-size: 12px;
}
/* Auffällig is a note about the row, not another score - set it apart
   from the number columns with a rule and extra room. */
.dashwtable td.dashhot,
.dashwtable th.dashhot {
  border-left: 1px solid var(--line-2);
  padding-left: 16px;
}
.dashwtable th.dashhot {
  color: var(--ink-3);
}
/* The Spread column (just before Auffällig) gets the same room on its
   right as Auffällig has on its left, so the rule sits between them. */
.dashwtable tr:first-child > th:nth-last-child(2),
.dashwrow > td:nth-last-child(2) {
  padding-right: 16px;
}
.dashwtable tr.dashwexp > td {
  padding: 4px 0 16px 28px;
  text-align: left;
  background: color-mix(in srgb, var(--ink) 3%, var(--card));
}
#v-dashboard .dashwtable tr.dashwexp:hover > td {
  background: color-mix(in srgb, var(--ink) 3%, var(--card));
}
.dashwtable tr.dashwexp table {
  width: auto;
  min-width: 60%;
}

/* Einzelergebnisse: one column per judge plus the panel's average column.
   Lines group into totals / outcome / best speech, split by a heavier rule. */
.dasheinzel th {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  padding: 4px 10px 6px;
}
.dasheinzel td {
  padding: 5px 10px;
  border-top: 1px solid var(--line-2);
}
.dasheinzel td.l {
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
}
.dasheinzel tr.dasheinzelsep > td {
  border-top: 2px solid var(--line-2);
}
.dasheinzel .dashpanelcol {
  background: color-mix(in srgb, var(--ink) 4%, var(--paper));
}
#v-dashboard .dasheinzel tr:hover > td.dashpanelcol {
  background: color-mix(in srgb, var(--ink) 10%, var(--paper));
}
.dasheinzel .tot {
  font-weight: 600;
  color: var(--ink);
}
.dashteamname.team-gov,
.dashwinner.team-gov {
  color: var(--team-gov);
}
.dashteamname.team-opp,
.dashwinner.team-opp {
  color: var(--team-opp);
}
.dashteamname.team-free {
  color: var(--team-free);
}
.dashwinner {
  font-weight: 700;
}
.dashtie {
  font-weight: 600;
  color: var(--ink-2);
}
.dashneg {
  color: var(--warn);
}
/* Best speech: "2. FFR · 70", one line per speech when several tie. */
.dashbestspeech {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.dashbestentry {
  display: block;
  white-space: nowrap;
}

/* Schnelleingabe */
/* Heading between two tables on one tabbed page (Komplette Wertung's
   Teampunkte below its Reden). */
.dashsubhead {
  margin: 28px 0 6px;
  font-size: 15px;
  font-weight: 700;
}
#v-schnell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
#v-schnell.hide {
  display: none;
}

/* Offline-Jury: same page chrome as Schnelleingabe (#v-schnell above) - a
   tabbed sheet (.dashsheet, see dashTabbedSheet) on the paper background. */
#v-offline {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
#v-offline.hide {
  display: none;
}
.schnelltable th {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
  padding: 8px 4px;
}
.schnelltable td {
  padding: 4px 2px;
}
.schnelltable td.l {
  padding: 6px 10px;
  white-space: nowrap;
}
.schnellinput {
  width: 100%;
  text-align: center;
  font: inherit;
  font-size: 14px;
  padding: 6px 6px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
}
.schnellgrp {
  padding: 8px 10px 4px;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
}
.schnellsub {
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-3);
  padding: 2px 4px 8px;
}
.schnellgstart {
  border-left: 1px solid var(--line-2);
}
.schnellab {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  padding: 2px 4px;
}
.schnellab:hover {
  color: var(--live);
}
.schnellab.on {
  color: var(--warn);
  font-weight: 500;
}
/* Komplette Wertung, compact: both tables fit on one screen with less
   scrolling. Scoped to #v-schnell - the Offline-Jurierende table shares
   these classes and keeps the roomier spacing above. */
#v-schnell .dashtabbody {
  padding-top: 10px;
}
#v-schnell .schnelltable th {
  padding: 4px 4px;
}
#v-schnell .schnelltable td {
  padding: 1px 2px;
}
#v-schnell .schnelltable td.l {
  padding: 2px 10px;
}
#v-schnell .schnellinput {
  padding: 3px 6px;
}
/* With rows this tight, the shared focus outline (2px, offset 2px) reaches
   into the next row and the field below covers its bottom edge - lift the
   focused field above its neighbours and draw the outline on its edge. */
#v-schnell .schnellinput:focus-visible {
  position: relative;
  z-index: 1;
  outline-offset: 0;
}
#v-schnell .schnelltable td.schnellgrp {
  padding: 8px 10px 1px;
}
#v-schnell .schnelltable th.schnellsub {
  padding: 1px 4px 4px;
}
#v-schnell .dashsubhead {
  margin: 16px 0 2px;
}
#v-schnell .dashsubhead:first-child {
  margin-top: 0;
}
/* Team marking in the desktop entry tables (Komplette Wertung, Offline-
   Jurierende, OpenTab's Redner:innen): the speech/team name in its team
   colour, as in Wertung, Einzelergebnisse and Namen - no side rail. */
#v-schnell td.team-gov,
#v-schnell th.team-gov,
.offlinejurytable td.team-gov,
.offlinejurytable th.team-gov,
.otspeechtable td.team-gov {
  color: var(--team-gov);
}
#v-schnell td.team-opp,
#v-schnell th.team-opp,
.offlinejurytable td.team-opp,
.offlinejurytable th.team-opp,
.otspeechtable td.team-opp {
  color: var(--team-opp);
}
#v-schnell td.team-free,
#v-schnell th.team-free,
.offlinejurytable td.team-free,
.offlinejurytable th.team-free,
.otspeechtable td.team-free {
  color: var(--team-free);
}

/* Adjudikationsblatt (Blatt) */
#v-blatt {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
#v-blatt.hide {
  display: none;
}
.blatthead {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px 12px;
  /* Solid team band, same as the mobile card headers and Teampunkte. */
  background: var(--team-accent, var(--card));
  color: var(--team-on, var(--ink));
}
.blattheadmid {
  flex: 1;
  min-width: 0;
}
.blatttitle {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
}
.blattswaphint {
  margin-left: 14px;
  font-size: 11px;
  color: var(--ink-3);
}
.blattstat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.blatttotwrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.blatttotlbl {
  font-size: 11px;
  color: var(--ink-3);
}
.blatttotval {
  font-size: 22px;
  font-weight: 500;
}

.blattbody {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}
.blattcol {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 80px;
  border-right: 1px solid var(--line);
  background: var(--card);
}
.blattcol:last-child {
  border-right: 0;
}
.blattcol-wide {
  flex: 2;
  min-width: 160px;
}
.blattresizer {
  flex: 0 0 6px;
  cursor: col-resize;
  background: transparent;
}
.blattresizer:hover,
body.blattresizing .blattresizer {
  background: var(--live);
}
body.blattresizing {
  cursor: col-resize;
  user-select: none;
}
body.blattresizing .blattcol {
  pointer-events: none;
}
.blattscores {
  flex: 0 0 auto;
  display: flex;
  gap: 14px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
  /* Notes sit before scores in the DOM (for keyboard tab order); this
     restores the usual scores-on-top-notes-below visual layout. */
  order: 1;
}
.blattscore {
  flex: 1;
  min-width: 0;
}
.blattlbl {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.blattinput {
  width: 100%;
  font-size: 26px;
  font-weight: 500;
  padding: 8px 4px;
}
.blatthintrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.blatthint {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
}
.blattnudge {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
}
.blattnudge:hover {
  color: var(--live);
}
.blattnudge:disabled {
  opacity: 0.35;
  cursor: default;
  text-decoration: none;
}
.blattnotes {
  flex: 1;
  min-height: 0;
  border: 0;
  resize: none;
  padding: 14px 18px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  background: transparent;
  outline: none;
  /* Precedes .blattscores in the DOM (see blattColumn) - order:2 keeps it
     visually below the scores. */
  order: 2;
}
/* Notes fill their column/block edge-to-edge, so the shared positive
   outline-offset (see the :focus-visible rule above) gets clipped by
   overflow:hidden or painted over by the next column - draw it inset. */
.blattnotes:focus-visible {
  outline-offset: -2px;
}
.teampointsnotewrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  order: 2;
}
.teampointsnotewrap .blattnotes {
  order: 0;
}
.notegradehint {
  flex: 0 0 auto;
  padding: 0 18px 10px;
  font-size: 11px;
  color: var(--ink-3);
}
#v-blatt .dedu {
  flex: 0 0 auto;
  padding: 10px 28px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
#v-blatt.excluded .blattbody {
  opacity: 0.55;
}

/* Teampunkte-Blatt (team-first team points entry) */
#v-teampoints {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
#v-teampoints.hide {
  display: none;
}
.teampointswrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.teampointssec {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--card);
}
.teampointssec + .teampointssec {
  border-top: 1px solid var(--line-2);
}
.teampointssechead {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 24px;
  background: var(--team-accent, transparent);
  color: var(--team-on, var(--ink));
}
.teampointssecname {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.teampointssechead .teampointstotlbl,
.teampointssechead .exclbtn,
.blatthead .sub,
.blatthead .blattswaphint,
.blatthead .navhint,
.blatthead .blatttotlbl,
.blatthead .dedbadge,
.blatthead .exclbtn {
  color: inherit;
  opacity: 0.85;
}
.teampointssechead .exclbtn.on,
.blatthead .exclbtn.on {
  opacity: 1;
  font-weight: 600;
}
.teampointssecright {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.teampointstotwrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.teampointstotlbl {
  font-size: 11px;
  color: var(--ink-3);
}
.teampointstotval {
  font-size: 16px;
  font-weight: 500;
}
.teampointsbody {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.teampointsbody .teampointscol-1 {
  flex: 1;
}
.teampointsbody .teampointscol-3 {
  flex: 3;
}
.teampointssec.excluded .teampointsbody {
  opacity: 0.55;
}

/* Allgemeine Notizen: two free-text columns, one per team - same shape as
   .blattbody's columns, but with no scores/categories to lay out around. */
#v-notes {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
#v-notes.hide {
  display: none;
}
.noteswrap {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}
.notescol {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--card);
}
.notescol:last-child {
  border-right: 0;
}
/* Solid team band, same as the Teampunkte section heads and the Blatt
   header - colours from the shared --team-accent/--team-on. */
.notescolhead {
  flex: 0 0 auto;
  padding: 10px 24px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--team-accent, transparent);
  color: var(--team-on, var(--ink));
}
.notestextarea {
  flex: 1;
  min-height: 0;
  border: 0;
  resize: none;
  padding: 18px 24px;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  background: transparent;
  outline: none;
}
.notestextarea:focus-visible {
  outline-offset: -2px;
}
.teampointscatrow {
  flex: 1;
  min-height: 0;
  display: flex;
}
.teampointscatblock {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.teampointscatblock:last-child {
  border-right: 0;
}
.teampointscatscore {
  flex: 0 0 auto;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
  /* Notes precede the score in the DOM (see teamPointsCategoryBlock); this
     keeps the score visually on top. */
  order: 1;
}

/* Namen (desktop room view) */
#v-namenroom {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--paper);
}
#v-namenroom.hide {
  display: none;
}
.roomview {
  padding: 20px 28px 40px;
  max-width: 900px;
  margin: 0 auto;
}
.roomview > .sub {
  text-align: center;
  margin-bottom: 20px;
}
.roomstage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.facingrow,
.lowerrow {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.roomtable {
  width: 240px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0px;
  padding: 12px;
}
/* Table name as a solid band across the card's top edge - same team band
   as Blatt/Teampunkte/Notizen (shared --team-accent/--team-on). The Jury
   card has no team, so it falls back to the inactive folder-tab grey. */
.roomtable .tname {
  margin: -12px -12px 10px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(
    --team-accent,
    color-mix(in srgb, var(--ink) 10%, var(--paper))
  );
  color: var(--team-on, var(--ink));
}
.seat + .seat {
  margin-top: 8px;
}
.seat .slbl {
  font-size: 10.5px;
  color: var(--ink-3);
  margin-bottom: 3px;
}
.juryrow {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.juryrow:last-child {
  border-bottom: 0;
}
.juryname {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink-2);
}
.juryab {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  flex: 0 0 auto;
}
.freectrl {
  display: block;
  margin-top: 10px;
}
.juryab:hover {
  color: var(--live);
}
.jseatname:last-child {
  border-bottom: 0;
}

#v-opentab {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
#v-opentab.hide {
  display: none;
}
#v-opentabm .dashpanel {
  border-radius: 14px;
  margin-bottom: 10px;
}
#v-opentabm .dashcol {
  gap: 10px;
}
.otstatus {
  min-height: 1.2em;
  font-size: 13px;
  color: var(--ink-2);
}
.otstatus.error {
  color: var(--warn);
}
.otintro {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0 0 6px;
}
.otform {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.otfield {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.otactions {
  display: flex;
  align-items: center;
  gap: 8px;
}
select {
  font: inherit;
  font-size: 15px;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.otspeechtable select {
  width: 100%;
  font-size: 13px;
  padding: 6px 8px;
}
.otspeechtable .otname {
  font-size: 13px;
}
#v-opentab .juryrow select {
  flex: 1;
  font-size: 13px;
  padding: 6px 8px;
}
.otsubmitbtn {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--live-line);
  border-radius: 8px;
  background: var(--live-bg);
  color: var(--live);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  cursor: pointer;
}
.otsubmitbtn:hover {
  border-color: var(--live);
}

/* Ballot export modal */
.dashpanelhead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dashtraineetoggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
}
.modalbackdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modalbox {
  background: var(--card);
  border: 1px solid var(--line-2);
  padding: 22px 26px;
  width: 420px;
  max-width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}
.modalbox h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
}
.shortcutlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shortcutrow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shortcutrow kbd {
  flex: 0 0 auto;
  min-width: 90px;
  text-align: center;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg-2, var(--card));
  font-family: inherit;
  font-size: 12px;
}
.shortcutrow span {
  color: var(--ink-3);
  font-size: 13px;
}
.shortcutsub {
  margin: 18px 0 8px !important;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.featurerow {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.featurename {
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 500;
}
.modalactions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.modalactions .btn {
  flex: 1;
  /* Without this, a flex item's minimum width defaults to its content's
     min-content size - so a much longer label (e.g. "Ton: an (Glocke)")
     wins more than its equal share and its shorter sibling ends up
     visibly smaller, even though both have flex: 1. */
  min-width: 0;
}
.modalinput {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  margin: 4px 0 10px;
}
.gradeinputrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.gradeinputrow:first-of-type {
  border-top: none;
}
.gradeinputlbl {
  font-size: 13px;
  color: var(--ink-3);
}
.gradeinputopts {
  display: flex;
  gap: 6px;
}
.gradeinputopts .btn.on {
  color: var(--warn);
  border-color: var(--warn);
  font-weight: 500;
}

/* Printable feedback sheet (built by buildPrintSheet). Hidden on screen -
   only #printSheet is shown, and everything else in #app is hidden, once
   window.print() is triggered from the ⋮ menu. */
#printSheet {
  display: none;
}
@media print {
  #app {
    display: none !important;
  }
  #printSheet {
    display: block !important;
    color: #000;
    background: #fff;
    font-family: "Georgia", "Iowan Old Style", "Times New Roman", serif;
  }
  .printtitle {
    font-size: 18px;
    margin: 0 0 14px;
  }
  .printspeaker {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 22px;
  }
  .printspeaker + .printspeaker {
    break-before: page;
    page-break-before: always;
  }
  .printspeakerlbl {
    font-size: 15px;
    border-bottom: 1px solid #000;
    padding-bottom: 4px;
    margin: 0 0 8px;
  }
  .printscores {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 8px;
  }
  .printscores th,
  .printscores td {
    border: 1px solid #999;
    padding: 3px 6px;
    text-align: right;
  }
  .printscores th.l,
  .printscores td.l {
    text-align: left;
  }
  .printscores tr.tot {
    font-weight: bold;
  }
  .printnote {
    margin: 6px 0;
  }
  .printnotelbl {
    font-size: 11px;
    font-weight: bold;
    color: #333;
  }
  .printnotetext {
    font-size: 12px;
    white-space: pre-wrap;
  }
}
