@font-face {
  font-family: "Twemoji Flags";
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url("https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2") format("woff2");
}

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f1f3f5;
  --surface-muted: #e9ecef;
  --text: #111827;
  --muted: #6b7280;
  --line: #d8dee6;
  --line-strong: #c2cad6;
  --brand: #003399;
  --brand-soft: #eef2ff;
  --blue: #003399;
  --green: #15803d;
  --red: #dc2626;
  --amber: #d97706;
  --teal: #0f766e;
  --purple: #6d28d9;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -3px 0 var(--blue);
  backdrop-filter: blur(14px);
}

.top h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.top p {
  margin: 6px 0 0;
  max-width: 920px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wrap {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 38px;
}

.status-line {
  position: sticky;
  top: 68px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px;
  background: rgba(246, 247, 249, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  font-size: 13px;
  color: var(--muted);
}

#status {
  margin-left: auto;
  min-width: 220px;
  text-align: right;
  color: var(--muted);
}

.top-break-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.top-break-controls span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.top-break-controls input {
  width: 54px;
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 13px;
}

.top-break-controls button {
  min-height: 32px;
  padding: 8px 10px;
}

.top-break-status {
  max-width: 260px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-break-status.active {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #14532d;
}

.card {
  margin-bottom: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.card p {
  margin: 6px 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.card.new { border-left: 5px solid var(--purple); }
.card.approved { border-left: 5px solid var(--red); }
.card.introduced { border-left: 5px solid var(--green); background: linear-gradient(0deg, rgba(21, 128, 61, .045), rgba(21, 128, 61, .045)), var(--surface); }
.card.rejected { border-left: 5px solid #64748b; opacity: .78; }
.speaker-panel { border-left: 5px solid var(--brand); }
.break-panel { border-left: 5px solid var(--teal); }
.voting-current { border-left: 5px solid var(--brand); }
.debate-panel { border-left: 5px solid var(--blue); }
.danger-zone { border-left: 5px solid var(--red); }

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin: 10px 0;
  font-size: 13px;
}

.meta.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.meta div {
  min-height: 48px;
  padding: 8px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.meta strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.label {
  display: block;
  margin: 13px 0 6px;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .045em;
}

textarea,
input,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.original {
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #374151;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.55;
}

.actions,
.break-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
}

button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.reload,
.vote-button {
  background: var(--brand);
  color: #fff;
}

.reload.active {
  background: var(--blue);
}

.save {
  background: #fff;
  color: var(--text);
  border-color: var(--line-strong);
}

.approve,
.optical-against {
  background: var(--red);
  color: #fff;
}

.reject {
  background: #64748b;
  color: #fff;
}

.present,
.optical-for {
  background: var(--green);
  color: #fff;
}

.caucus-button {
  background: var(--teal);
  color: #fff;
}

.coffee-button {
  background: var(--amber);
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}

.empty {
  padding: 18px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.warning {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #facc15;
  border-radius: var(--radius);
  background: #fef9c3;
  color: #713f12;
  font-weight: 700;
}

.vote-summary,
.break-status,
.voting-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: #374151;
  line-height: 1.6;
  font-size: 14px;
}

.voting-admin-layout {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.25fr);
  gap: 12px;
  align-items: stretch;
}

.voting-admin-layout.no-schema {
  grid-template-columns: minmax(520px, 900px);
}

.voting-command,
.voting-stage-card {
  border-left-color: var(--blue);
}

.voting-command {
  background:
    linear-gradient(135deg, rgba(0, 51, 153, .08), rgba(255, 255, 255, 0) 44%),
    var(--surface);
}

.voting-command-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.voting-command-head h2 {
  margin: 6px 0 4px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.voting-command-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.voting-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.voting-state-pill.open {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #14532d;
}

.voting-state-pill.closed {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.voting-mode-box {
  min-width: 150px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  text-align: right;
}

.voting-mode-box strong,
.voting-mode-box span {
  display: block;
}

.voting-mode-box strong {
  color: var(--blue);
  font-size: 18px;
}

.voting-mode-box span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.admin-vote-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.admin-vote-count,
.admin-vote-result {
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.admin-vote-count span,
.admin-vote-result span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.admin-vote-count strong,
.admin-vote-result strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.admin-vote-count.for {
  border-left: 6px solid #22c55e;
  background: #ecfdf5;
}

.admin-vote-count.against {
  border-left: 6px solid #ef4444;
  background: #fef2f2;
}

.admin-vote-count.abstain {
  border-left: 6px solid #f59e0b;
  background: #fffbeb;
}

.admin-vote-result {
  border-left: 6px solid var(--blue);
  background: #eef2ff;
}

.admin-vote-result.failed {
  border-left-color: #64748b;
  background: #f1f5f9;
}

.admin-vote-result strong {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.voting-hotkeys {
  background: #f8fafc;
}

.voting-actions {
  padding-top: 2px;
}

.voting-stage-card .stage-wrap {
  margin-top: 0;
}

.voting-stage-card .unified-voting-stage .stage {
  height: min(58vh, 560px);
}

.break-status:not(.inactive) {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #14532d;
}

.stage-wrap {
  margin-top: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
}

.stage {
  position: relative;
  width: 100%;
  height: 820px;
  overflow: hidden;
  touch-action: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(circle, rgba(15, 23, 42, .085) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.stage-caption {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.unified-voting-stage .stage {
  height: 430px;
}

html.flag-emoji-polyfill,
html.flag-emoji-polyfill body {
  font-family: "Twemoji Flags", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.chair-marker {
  position: absolute;
  left: 50%;
  top: 2.2%;
  z-index: 2;
  width: min(240px, 24%);
  min-height: 54px;
  padding: 9px 12px;
  transform: translateX(-50%);
  border: 2px solid #111827;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
  cursor: default;
  pointer-events: auto;
}

.chair-marker[data-chair-seat] {
  cursor: grab;
}

.chair-marker[data-chair-seat]:active {
  cursor: grabbing;
}

.chair-label {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  opacity: .72;
}

.chair-desk {
  margin-top: 3px;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: .04em;
}

.speaker-stage {
  height: 560px;
}

.compact-stage {
  height: 320px;
}

.debate-stage {
  height: 340px;
}

.seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7px;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
  text-align: center;
  user-select: none;
  cursor: pointer;
  transform-origin: center center;
}

.seat-inner {
  transform-origin: center center;
}

.seat-flag {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 2px;
}

.seat-code {
  font-weight: 850;
  font-size: 16px;
  letter-spacing: .04em;
}

.seat-name {
  margin-top: 2px;
  color: #334155;
  font-weight: 700;
  font-size: 12px;
}

.seat-vote,
.seat-attendance {
  margin-top: 5px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.speaker-seat:hover {
  border-color: var(--blue);
  background: #eff6ff;
}

.overview-seat {
  padding: 5px;
  border-radius: 12px;
}

.overview-seat .seat-flag {
  font-size: 20px;
  margin-bottom: 1px;
}

.overview-seat .seat-code {
  font-size: 15px;
}

.overview-seat .seat-name {
  display: none;
}

.overview-seat .seat-vote {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.debate-seat {
  cursor: default;
}

.debate-selectable {
  cursor: pointer;
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(0, 51, 153, .14), 0 6px 18px rgba(15, 23, 42, .12);
}

.debate-selectable:hover {
  border-color: #00246e;
  background: #dbeafe;
}

.debate-supporter {
  border-color: #22c55e;
  background: #ecfdf5;
}

.debate-opponent {
  border-color: #ef4444;
  background: #fef2f2;
}

.vote-for,
.attendance-present {
  border-color: #22c55e;
  background: #ecfdf5;
}

.vote-against {
  border-color: #ef4444;
  background: #fef2f2;
}

.vote-abstain {
  border-color: #f59e0b;
  background: #fffbeb;
}

.attendance-absent {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #64748b;
  opacity: .72;
}

.speaker-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 1.35fr);
  gap: 14px;
  align-items: start;
}

.settings-extra-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.settings-extra-controls > div,
.settings-extra-controls .toggle-line {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.speaker-box {
  min-height: 122px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.current-speaker {
  min-height: 32px;
  font-size: 22px;
  font-weight: 850;
}

.reaction-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.reaction-slot {
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

.reaction-slot.active {
  border-color: var(--blue);
  background: var(--brand-soft);
}

.reaction-slot.finished {
  border-color: #cbd5e1;
  background: #e5e7eb;
  color: #64748b;
  opacity: .82;
}

.queue-list {
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
}

.queue-list li {
  cursor: pointer;
  border-radius: 8px;
  padding: 2px 4px;
}

.item {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 12px;
}

.compact-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.dashboard-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.dashboard-strip div {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow);
}

.dashboard-strip strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.dashboard-strip span {
  font-weight: 850;
}

.card.compact-card {
  box-shadow: var(--shadow);
}

.compact-card .speaker-grid {
  grid-template-columns: 1fr;
}

.compact-card .speaker-box,
.compact-card .break-status,
.compact-card .vote-summary {
  min-height: 0;
  padding: 10px;
}

.agenda-overview .agenda-row,
.agenda-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agenda-overview .agenda-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.agenda-overview .agenda-row:last-child {
  border-bottom: 0;
}

.agenda-item .actions {
  margin-top: 0;
  flex-shrink: 0;
}

.agenda-quick-add .section-head {
  align-items: center;
}

.agenda-add-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(130px, .8fr) 110px 90px 90px minmax(180px, 1.2fr);
  gap: 8px;
}

.agenda-add-grid input,
.agenda-add-grid select {
  min-height: 38px;
}

.agenda-inline-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.agenda-inline-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.agenda-inline-table th,
.agenda-inline-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.agenda-inline-table th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.agenda-inline-table tr:last-child td {
  border-bottom: 0;
}

.agenda-inline-table input,
.agenda-inline-table select,
.agenda-inline-table textarea {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 13px;
}

.agenda-inline-table textarea {
  width: 100%;
  min-width: 240px;
  min-height: 76px;
  resize: vertical;
  line-height: 1.35;
}

.agenda-inline-table td:nth-child(2) input,
.agenda-inline-table td:nth-child(3) input,
.agenda-inline-table td:nth-child(7) input {
  width: 90px;
}

.drag-handle {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--muted);
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

.agenda-inline-table tr.dragging {
  opacity: .55;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
}

.agenda-summary {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.agenda-summary strong {
  color: var(--text);
}

.agenda-timeline {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 16px;
}

.agenda-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 2px;
  border-radius: 999px;
  background: #dbe4f0;
}

.agenda-timeline-item {
  --agenda-color: var(--blue);
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0 12px 0;
  border: 0;
  background: transparent;
}

.agenda-time {
  min-width: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.agenda-dot {
  position: absolute;
  top: 13px;
  left: -15px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 2px var(--blue);
}

.agenda-copy {
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.agenda-copy strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
}

.agenda-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.agenda-break,
.agenda-caucus {
  --agenda-color: var(--teal);
}

.agenda-voting {
  --agenda-color: var(--amber);
}

.agenda-timeline-item .agenda-dot {
  background: var(--agenda-color);
  box-shadow: 0 0 0 2px var(--agenda-color);
}

.agenda-timeline-item .agenda-time {
  color: var(--agenda-color);
}

.stage [data-layout-seat].attendance-present,
.stage [data-layout-seat].attendance-absent {
  cursor: grab;
}

.stage [data-layout-seat].attendance-present:active,
.stage [data-layout-seat].attendance-absent:active {
  cursor: grabbing;
}

.seat-tools {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 5;
  display: flex;
  gap: 4px;
}

.seat-tool {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .18);
}

.seat-hidden-manual {
  opacity: .42;
  border-style: dashed;
  filter: grayscale(.55);
}

.seat-hidden-manual .seat-attendance {
  color: var(--red);
}

.attendance-table-wrap {
  overflow: auto;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

.attendance-table th,
.attendance-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-management {
  display: grid;
  gap: 16px;
}

.data-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.data-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.data-delete-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.data-delete-card {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.data-delete-card strong {
  color: var(--red);
  font-size: 14px;
}

.data-delete-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.section-head.tight {
  align-items: flex-start;
}

.section-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.data-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.data-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table input,
.data-table select,
.data-table textarea {
  min-width: 120px;
  padding: 8px 9px;
  border-radius: 10px;
  font-size: 13px;
}

.data-table textarea {
  width: 280px;
  min-height: 78px;
  resize: vertical;
}

.data-table .check-cell {
  text-align: center;
}

.data-table .check-cell input {
  min-width: 0;
  width: 20px;
  height: 20px;
}

.amendments-data-table {
  min-width: 1380px;
}

.runtime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.runtime-grid div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.runtime-grid strong,
.runtime-grid span {
  display: block;
}

.runtime-grid strong {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.runtime-grid span {
  font-weight: 800;
}

.attendance-code {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 900;
  letter-spacing: .08em;
}

.compact-button {
  padding: 7px 10px;
  min-height: 0;
}

.link-token {
  display: inline-block;
  margin-top: 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

#toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 200;
  max-width: min(720px, calc(100vw - 32px));
  padding: 13px 16px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .16s ease, transform .16s ease;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-card {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.login-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.login-card button {
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  background: var(--brand);
  color: #fff;
}

.error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--red);
  font-weight: 700;
  line-height: 1.35;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(15, 23, 42, .22);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0 0 4px;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 20px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.details-grid label,
.full-label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.toggle-line {
  align-content: center;
  grid-template-columns: auto 1fr;
  text-transform: none;
  letter-spacing: 0;
}

.toggle-line input {
  width: auto;
  margin: 0;
}

.full-label {
  margin-top: 12px;
}

@media (max-width: 980px) {
  .voting-admin-layout {
    grid-template-columns: 1fr;
  }

  .voting-command-head {
    grid-template-columns: 1fr;
  }

  .voting-mode-box {
    text-align: left;
  }

  .admin-vote-counts {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .speaker-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  #status {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .top-break-controls {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .agenda-add-grid {
    grid-template-columns: 1fr 1fr;
  }

  .status-line {
    top: 96px;
  }

  .stage {
    height: 620px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
