:root {
  --navy-950: #07162b;
  --navy-900: #0b1f3a;
  --navy-800: #13345b;
  --navy-700: #1d4977;
  --blue-500: #2b71d8;
  --blue-100: #eaf2ff;
  --green-500: #24a66a;
  --gold-500: #f5b941;
  --red-500: #e0595b;
  --ink: #182536;
  --muted: #67758a;
  --line: #dfe5ed;
  --surface: #ffffff;
  --canvas: #edf1f5;
  --widget-accent: #2b71d8;
  --header-accent: #f5b941;
  --shadow: 0 10px 26px rgba(25, 45, 70, 0.09);
  --radius: 14px;
  --sidebar-width: clamp(260px, 21vw, 330px);
  --calculator-width: clamp(328px, 21vw, 344px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(43, 113, 216, 0.3);
  outline-offset: 2px;
}

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

.topbar {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(470px, 1.35fr) auto;
  align-items: center;
  gap: clamp(14px, 1.7vw, 26px);
  padding: 10px 20px;
  background: var(--navy-900);
  color: white;
  border-bottom: 4px solid var(--header-accent);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand,
.topbar-actions,
.widget-title-wrap,
.widget-actions,
.camera-status,
.logo-setting {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 11px;
  background: var(--gold-500);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.18),
    0 5px 14px rgba(0, 10, 28, 0.24);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.brand h1 {
  font: 800 19px/1.1 "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.02em;
}

.brand p {
  margin-top: 5px;
  color: #b9c8db;
  font-size: 11px;
}

.lesson-context {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(275px, 1.2fr);
  align-items: center;
  gap: 12px;
}

.context-summary {
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.context-summary span,
.context-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-mode {
  color: var(--header-accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.context-summary strong {
  margin: 2px 0;
  font: 800 16px/1.2 "Plus Jakarta Sans", sans-serif;
}

.context-summary span:last-child {
  color: #bdcad9;
  font-size: 10px;
  font-weight: 600;
}

.context-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 5px;
}

.context-controls label > span {
  display: block;
  margin: 0 0 3px 3px;
  color: #aebed1;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context-controls select,
.header-reset-button {
  min-width: 0;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  color: white;
  font-size: 10px;
  font-weight: 700;
}

.context-controls select {
  width: 100%;
  padding: 0 22px 0 7px;
}

.context-controls select option {
  color: var(--ink);
}

.header-reset-button {
  padding: 0 8px;
}

.topbar-date {
  width: 180px;
  flex: 0 0 180px;
  padding: 5px 14px 5px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  text-align: right;
}

.topbar-date span {
  display: block;
  color: #c5d3e4;
  font-size: 13px;
  font-weight: 700;
}

.topbar-date strong {
  display: block;
  margin-top: 1px;
  font: 800 30px/1.05 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.topbar-actions {
  width: 327px;
  flex: 0 0 327px;
  justify-content: flex-end;
  gap: 7px;
}

.topbar-actions .topbar-date {
  width: 180px;
  min-width: 180px;
}

.topbar-actions .topbar-date span {
  font-size: 13px;
}

.topbar-actions .topbar-date strong {
  font-size: 30px;
}

.data-status-banner {
  position: fixed;
  top: 100px;
  right: 18px;
  z-index: 35;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(430px, calc(100vw - 36px));
  padding: 8px 12px;
  border: 1px solid #d8e0e9;
  border-radius: 9px;
  background: #f4f7fb;
  color: var(--ink);
  font-size: 10px;
  box-shadow: 0 8px 24px rgba(7, 22, 43, 0.16);
}

.data-status-banner[hidden] {
  display: none;
}

.data-status-banner[data-status="error"] {
  position: static;
  max-width: none;
  border-width: 0 0 1px;
  border-radius: 0;
  background: #fff0ef;
  color: #8d2d2d;
  box-shadow: none;
}

.data-status-banner[data-status="success"] {
  background: #eaf8f1;
  color: #176a47;
}

.data-status-banner button {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 9px;
  font-weight: 800;
}

.header-action-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.header-action-button svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#browserToolbarButton svg {
  transform: translateY(1px);
}

.header-action-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header-action-button.is-active {
  border-color: var(--header-accent);
  background: var(--header-accent);
  color: var(--navy-950);
}

.icon-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.icon-button:hover {
  background: #eef2f7;
  color: var(--navy-800);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard {
  --left-track: var(--sidebar-width);
  --right-track: var(--sidebar-width);
  --calculator-track: var(--calculator-width);
  flex: 1;
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: var(--left-track) minmax(390px, 1fr) var(--calculator-track) var(--right-track);
  position: relative;
  transition: grid-template-columns 220ms ease;
}

.dashboard.left-collapsed {
  --left-track: 0px;
}

.dashboard.right-collapsed {
  --right-track: 0px;
}

.dashboard.calculator-collapsed {
  --calculator-track: 0px;
}

.dashboard.calculator-disabled {
  --calculator-track: 0px;
}

.sidebar {
  min-width: 0;
  padding: 16px 13px 24px;
  background: #f7f9fb;
  overflow: auto;
  transition: opacity 150ms ease, padding 220ms ease;
}

.sidebar-left {
  border-right: 1px solid var(--line);
}

.sidebar-right {
  border-left: 1px solid var(--line);
}

.sidebar-calculator {
  display: flex;
  flex-direction: column;
  padding: 16px 13px 12px;
  border-left: 1px solid #cbd5e1;
  background: #f7f9fb;
  overflow: hidden;
}

.sidebar-calculator .widget-card {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  box-shadow: 0 7px 18px rgba(25, 45, 70, 0.1);
}

.sidebar-calculator .widget-header {
  display: none;
}

.sidebar-calculator .widget-body {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 3px 0 0;
}

.sidebar-calculator .widget-stack {
  min-height: 0;
  flex: 1;
}

.left-collapsed .sidebar-left,
.right-collapsed .sidebar-right,
.calculator-collapsed .sidebar-calculator {
  visibility: hidden;
  opacity: 0;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}

.calculator-disabled .sidebar-calculator,
.calculator-disabled .sidebar-restore-calculator {
  display: none !important;
}

.document-camera-disabled .camera-frame,
.document-camera-disabled .stage-tip {
  display: none;
}

.document-camera-disabled .stage-toolbar h2::after {
  content: " hidden by widget settings";
  color: var(--muted);
  font: 600 11px "DM Sans", sans-serif;
}

.sidebar-heading {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 6;
  margin-bottom: 9px;
  padding: 0 4px 0 8px;
  background: #f7f9fb;
  color: #7a8798;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.sidebar-right .sidebar-heading {
  padding: 0 8px 0 4px;
}

.sidebar-left .sidebar-heading,
.sidebar-right .sidebar-heading,
.sidebar-calculator .sidebar-heading {
  top: -16px;
  margin-right: -13px;
  margin-left: -13px;
  padding-right: 17px;
  padding-left: 17px;
  border-bottom: 1px solid var(--line);
}

.sidebar-calculator .sidebar-heading {
  min-height: 34px;
  margin-bottom: 9px;
  background: #f7f9fb;
}

.collapse-sidebar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #aebdcd;
  border-radius: 7px;
  background: white;
  color: var(--blue-500);
  box-shadow: 0 1px 3px rgba(25, 45, 70, 0.14);
}

.collapse-sidebar svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.8;
}

.collapse-sidebar:hover {
  border-color: var(--blue-500);
  background: #eaf3ff;
  color: var(--navy-900);
  box-shadow: 0 2px 5px rgba(43, 113, 216, 0.2);
}

.collapse-sidebar:focus-visible {
  outline: 2px solid var(--header-accent);
  outline-offset: 1px;
}

.sidebar-calculator .move-widget,
.sidebar-calculator .drag-handle {
  display: none;
}

.sidebar-calculator .widget-title-wrap {
  padding-left: 3px;
}

.widget-stack {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-stack.drag-over {
  outline: 2px dashed var(--blue-500);
  outline-offset: 5px;
  border-radius: 12px;
}

.widget-card {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--widget-body-bg, var(--surface));
  border: 1px solid var(--widget-card-border, var(--line));
  border-top: 3px solid var(--widget-card-border, var(--widget-accent));
  border-radius: var(--radius);
  box-shadow: 0 3px 10px rgba(25, 45, 70, 0.05);
}

.widget-card.dragging {
  opacity: 0.45;
}

.widget-card.drop-before::before,
.widget-card.drop-after::after {
  content: "";
  position: absolute;
  right: 4px;
  left: 4px;
  z-index: 8;
  height: 4px;
  border-radius: 999px;
  background: var(--widget-accent);
  box-shadow: 0 0 0 3px rgba(43, 113, 216, 0.16);
  pointer-events: none;
}

.widget-card.drop-before::before {
  top: -2px;
}

.widget-card.drop-after::after {
  bottom: -2px;
}

.widget-card.is-minimized .widget-body {
  display: none;
}

.widget-card.is-minimized .widget-watermark {
  display: none;
}

.widget-watermark {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 112px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: var(--navy-800);
  font: 800 34px "Plus Jakarta Sans", sans-serif;
  opacity: 0.16;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

.widget-body > * {
  position: relative;
  z-index: 1;
}

.widget-header {
  min-height: 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 1px 4px 1px 7px;
  border-bottom: 1px solid var(--widget-card-border, #dfe4ea);
  background: var(--widget-header-bg, #f3f5f7);
  position: relative;
  z-index: 1;
}

.widget-card.is-minimized .widget-header {
  border-bottom: 0;
}

.widget-title-wrap {
  min-width: 0;
  gap: 3px;
}

.widget-title-toggle {
  min-width: 0;
  min-height: 25px;
  padding: 1px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.widget-title-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

.widget-title-toggle:focus-visible {
  outline: 2px solid rgba(43, 113, 216, 0.35);
  outline-offset: 1px;
}

.drag-handle {
  color: color-mix(in srgb, var(--widget-heading-ink, #a6b1bf) 70%, transparent);
  font-size: 11px;
  letter-spacing: -6px;
  transform: translateX(-2px);
  cursor: grab;
}

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

.widget-kicker {
  display: none !important;
  color: var(--blue-500);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.widget-title {
  overflow: hidden;
  color: var(--widget-heading-ink, var(--navy-900));
  font: 700 12px/1.2 "Plus Jakarta Sans", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-actions {
  gap: 0;
  color: var(--widget-heading-ink, var(--navy-900));
}

.widget-custom-actions {
  display: contents;
}

.widget-actions .icon-button {
  width: 24px;
  height: 24px;
  color: inherit;
  font-size: 15px;
}

.widget-actions .icon-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.widget-more-actions {
  flex: 0 0 auto;
  font-size: 18px !important;
  font-weight: 800;
  line-height: 1;
}

.widget-secondary-action {
  display: none;
}

.widget-card.show-widget-actions .widget-secondary-action {
  display: inline-flex;
}

.widget-card.show-widget-actions .widget-more-actions {
  display: none;
}

.widget-close-action {
  order: 10;
}

.widget-header-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.widget-body {
  position: relative;
  z-index: 1;
  padding: 12px;
  background: transparent;
}

.widget-header-panel {
  position: relative;
  z-index: 5;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--widget-card-border, var(--line));
  background: var(--widget-body-bg, white);
  color: var(--ink);
  font-size: 10px;
}

.widget-header-panel[hidden] {
  display: none;
}

.widget-header-panel > strong {
  margin-right: auto;
  font-size: 10px;
}

.widget-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.widget-color-swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid white;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--swatch-header) 0 50%, var(--swatch-body) 50% 100%);
  box-shadow: 0 0 0 1px #b9c4d0;
}

.widget-color-swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--blue-500);
}

.mini-button.danger {
  border-color: #cf7777;
  background: #fff1f1;
  color: #a52f34;
}

.editable-display {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.display-text {
  color: #2a3747;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.48;
  white-space: pre-wrap;
}

.display-text.is-placeholder {
  color: #9aa6b5;
  font-style: italic;
  font-weight: 400;
}

.display-text.large {
  font: 700 17px/1.4 "Plus Jakarta Sans", sans-serif;
  color: var(--navy-900);
}

.edit-button,
.text-button {
  width: max-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue-500);
  font-size: 11px;
  font-weight: 700;
}

.edit-button:hover,
.text-button:hover {
  text-decoration: underline;
}

.edit-area {
  width: 100%;
  min-height: 94px;
  resize: vertical;
  padding: 10px;
  border: 1px solid #cdd6e1;
  border-radius: 8px;
  color: var(--ink);
  line-height: 1.45;
}

.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 8px;
}

.mini-button {
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid #ccd5e0;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.mini-button.save {
  border-color: var(--blue-500);
  background: var(--blue-500);
  color: white;
}

.agenda-empty {
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

.agenda-empty strong,
.agenda-empty span {
  display: block;
}

.agenda-empty strong {
  color: var(--navy-900);
  font-size: 12px;
}

.agenda-empty span {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.35;
}

.daily-agenda-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.daily-agenda-item {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 13px 18px minmax(0, 1fr) 25px 25px;
  align-items: center;
  gap: 5px;
  padding: 3px 4px;
  border: 1px solid #e0e6ed;
  border-radius: 7px;
  background: #f8fafc;
  transition: border-color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.daily-agenda-item.is-dragging {
  opacity: 0.45;
}

.daily-agenda-item.agenda-drop-target {
  border-color: var(--blue-500);
  transform: translateY(2px);
}

.agenda-drag-handle {
  overflow: hidden;
  color: #98a5b4;
  font-size: 11px;
  letter-spacing: -5px;
  cursor: grab;
}

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

.daily-agenda-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue-500);
}

.agenda-item-text {
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.daily-agenda-item.is-complete .agenda-item-text {
  color: #8793a1;
  text-decoration: line-through;
}

.agenda-item-action {
  width: 25px !important;
  height: 25px !important;
}

.agenda-item-action:last-child {
  color: #a04747;
}

.agenda-item-editor {
  display: grid;
}

.agenda-item-input {
  min-height: 66px;
}

.wicor-section {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #edf0f4;
}

.wicor-widget-section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

[data-widget-id="wicorStrategies"] .widget-body {
  padding: 8px 10px 9px;
}

.wicor-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.wicor-wheel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
}

.wicor-toggle {
  width: 100%;
  max-width: 48px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: #c8cdd4;
  color: #f5f6f7;
  font: 900 clamp(18px, 1.8vw, 24px)/1 "Plus Jakarta Sans", sans-serif;
  text-shadow: 0 1px 2px rgba(20, 31, 43, 0.22);
  box-shadow:
    0 3px 7px rgba(20, 39, 62, 0.14),
    inset 0 10px 18px rgba(255, 255, 255, 0.16),
    inset 0 -8px 15px rgba(65, 76, 88, 0.12);
  transition:
    background-color 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.wicor-toggle:hover {
  transform: scale(1.055);
}

.wicor-toggle:active {
  transform: scale(0.97);
}

.wicor-toggle[data-strategy="W"].active {
  background: #4c963d;
}

.wicor-toggle[data-strategy="I"].active {
  background: #20a9d5;
}

.wicor-toggle[data-strategy="C"].active {
  background: #a93693;
}

.wicor-toggle[data-strategy="O"].active {
  background: #c61f42;
}

.wicor-toggle[data-strategy="R"].active {
  background: #f39a1f;
}

.wicor-toggle.active {
  color: white;
  filter: saturate(1.05);
}

.wicor-toggle:not(.active) {
  filter: grayscale(1);
}

.weather-widget-body {
  padding: 12px 11px 10px;
}

.weather-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.weather-current > div > span,
.weather-current strong {
  display: block;
}

.weather-location {
  max-width: 175px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.weather-current strong {
  margin: 2px 0;
  color: var(--navy-900);
  font: 800 32px/1 "Plus Jakarta Sans", sans-serif;
}

.weather-current > div > span:last-child {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.weather-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--widget-accent);
  font-style: normal;
  font-size: 25px;
  line-height: 1;
}

.weather-icon::before {
  content: "\2601";
}

.weather-sun::before {
  content: "\2600";
  color: #e6a91f;
}

.weather-partly::before {
  content: "\26C5";
}

.weather-rain::before {
  content: "\2614";
  color: #337fc4;
}

.weather-snow::before {
  content: "\2744";
  color: #63a9d7;
}

.weather-storm::before {
  content: "\26A1";
  color: #a674d5;
}

.weather-fog::before {
  content: "\224B";
  color: #8793a1;
}

.weather-ice::before {
  content: "\2744";
  color: #438ab7;
}

.weather-details {
  display: flex;
  gap: 12px;
  margin: 9px 0;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf0f4;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}

.weather-day {
  min-width: 0;
  padding: 4px 1px;
  text-align: center;
}

.weather-day span,
.weather-day strong,
.weather-day small,
.weather-day em {
  display: block;
}

.weather-day span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.weather-day .weather-icon {
  width: 100%;
  height: 24px;
  font-size: 18px;
}

.weather-day strong {
  color: var(--navy-900);
  font-size: 11px;
}

.weather-day small {
  color: var(--muted);
  font-size: 9px;
}

.weather-day em {
  margin-top: 2px;
  color: #337fc4;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.weather-credit {
  display: block;
  margin-top: 6px;
  color: #8793a1;
  font-size: 7px;
  text-align: right;
  text-decoration: none;
}

.weather-empty,
.weather-loading {
  padding: 13px 4px;
  text-align: center;
}

.weather-empty strong {
  color: var(--navy-900);
  font-size: 12px;
}

.weather-empty p,
.weather-loading {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.compact-date-clock {
  padding: 5px 0;
  text-align: center;
}

.compact-date-clock span,
.compact-date-clock strong {
  display: block;
}

.compact-date-clock span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.compact-date-clock strong {
  margin-top: 4px;
  color: var(--navy-900);
  font: 800 24px "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}

.random-student-display {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  background: #f7f9fc;
  text-align: center;
}

.random-student-display span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.random-student-display strong {
  margin: 3px 0;
  color: var(--navy-900);
  font: 800 20px/1.2 "Plus Jakarta Sans", sans-serif;
}

.random-student-display.is-spinning {
  border-color: rgba(43, 113, 216, 0.45);
  background: linear-gradient(135deg, #f7f9fc, #eaf3ff, #f7f9fc);
  background-size: 220% 220%;
  animation: student-wheel-sweep 700ms linear infinite;
}

.random-student-display.is-spinning strong {
  color: var(--blue-500);
  animation: student-wheel-name 160ms ease-in-out infinite alternate;
}

.random-student-display.has-selected {
  border-color: #e6b643;
  background: #fff8df;
  animation: student-wheel-stop 500ms ease-out;
}

@keyframes student-wheel-sweep {
  to {
    background-position: 100% 100%;
  }
}

@keyframes student-wheel-name {
  from {
    transform: translateY(-2px) scale(0.98);
    opacity: 0.72;
  }
  to {
    transform: translateY(2px) scale(1.03);
    opacity: 1;
  }
}

@keyframes student-wheel-stop {
  45% {
    transform: scale(1.04);
  }
}

.random-student-actions {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.student-skip-toggle {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.student-skip-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.student-skip-track {
  position: relative;
  width: 31px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #cbd4df;
  transition: background 160ms ease;
}

.student-skip-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(25, 45, 70, 0.25);
  transition: transform 160ms ease;
}

.student-skip-toggle input:checked + .student-skip-track {
  background: var(--blue-500);
}

.student-skip-toggle input:checked + .student-skip-track::after {
  transform: translateX(13px);
}

.student-skip-toggle input:focus-visible + .student-skip-track {
  outline: 2px solid rgba(43, 113, 216, 0.35);
  outline-offset: 2px;
}

.student-skip-toggle input:disabled ~ span {
  opacity: 0.55;
  cursor: default;
}

.random-student-actions .text-button {
  justify-self: center;
}

.randomizer-widget {
  display: grid;
  gap: 9px;
}

.randomizer-type-label,
.randomizer-options label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.randomizer-type-label select,
.randomizer-options select,
.randomizer-options input {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #ccd6e1;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.randomizer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.randomizer-options > label:only-child {
  grid-column: 1 / -1;
}

.randomizer-color-legend {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  background: #f7f9fc;
}

.randomizer-color-legend > strong {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.randomizer-color-legend > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.randomizer-color-choice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #445368;
  font-size: 9px;
  font-weight: 700;
}

.randomizer-color-choice i {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid white;
  border-radius: 4px;
  background: var(--choice-color);
  box-shadow: 0 0 0 1px #aeb9c6;
}

.randomizer-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #ae3338;
  font-size: 9px;
  font-weight: 700;
}

.randomizer-result {
  min-height: 132px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  overflow: hidden;
  padding: 12px 8px;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 35%, rgba(43, 113, 216, 0.1), transparent 58%),
    #f7f9fc;
  color: var(--navy-900);
  text-align: center;
}

.randomizer-ready {
  color: #8996a6;
  font-size: 11px;
  font-weight: 700;
}

.randomizer-action {
  min-height: 42px;
  border: 1px solid var(--blue-500);
  border-radius: 9px;
  background: var(--blue-500);
  color: white;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(43, 113, 216, 0.2);
}

.randomizer-action:disabled {
  opacity: 0.6;
}

.randomizer-dice {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.randomizer-die {
  width: clamp(48px, 5vw, 62px);
  aspect-ratio: 1;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  gap: 3px;
  padding: 8px;
  border-radius: 11px;
  background: var(--die-color);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    0 6px 12px rgba(23, 42, 67, 0.2);
}

.randomizer-die i {
  width: 8px;
  height: 8px;
  place-self: center;
  border-radius: 50%;
  background: white;
  opacity: 0;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.16);
}

.randomizer-die i.show {
  opacity: 1;
}

.randomizer-total {
  font: 800 16px "Plus Jakarta Sans", sans-serif;
}

.number-die-label {
  color: var(--blue-500);
  font-size: 12px;
  font-weight: 800;
}

.randomizer-big-value,
.randomizer-letter {
  font: 800 68px/0.9 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}

.randomizer-symbol-die {
  width: 108px;
  min-height: 108px;
  display: grid;
  place-content: center;
  gap: 3px;
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(145deg, #3478d4, #1f5fae);
  color: white;
  box-shadow:
    inset 0 -8px 14px rgba(0, 31, 85, 0.18),
    0 8px 18px rgba(23, 42, 67, 0.24);
  text-align: center;
}

.randomizer-symbol-die::before,
.randomizer-symbol-die::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.randomizer-symbol-die::before {
  top: 10px;
  left: 10px;
}

.randomizer-symbol-die::after {
  right: 10px;
  bottom: 10px;
}

.randomizer-symbol-die span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.randomizer-symbol-die strong {
  font: 800 54px/0.9 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}

.randomizer-symbol-die.alphabet-die {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(145deg, #865bc2, #654198);
}

.color-result-swatch {
  width: 76px;
  height: 76px;
  border: 6px solid white;
  border-radius: 18px;
  background: var(--result-color);
  box-shadow: 0 0 0 1px #cad5e1, 0 8px 18px rgba(23, 42, 67, 0.18);
}

.result-colorDice > strong,
.result-coin > strong,
.result-rps > strong {
  font: 800 20px "Plus Jakarta Sans", sans-serif;
}

.lotto-ball {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 7px solid #f5b941;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, white, #eaf0f7 68%);
  box-shadow: 0 10px 20px rgba(23, 42, 67, 0.22);
}

.lotto-ball strong {
  font: 800 32px "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}

.randomizer-coin {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 6px double #8d99a7;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #ffffff, #b8c2cd 72%);
  color: #536173;
  box-shadow: 0 8px 18px rgba(23, 42, 67, 0.22);
}

.randomizer-coin span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(83, 97, 115, 0.4);
  border-radius: 50%;
  font: 800 34px "Plus Jakarta Sans", sans-serif;
}

.rps-icon {
  font-size: 66px;
  line-height: 1;
}

.randomizer-animation-text {
  font: 800 24px "Plus Jakarta Sans", sans-serif;
}

.randomizer-result.is-animating {
  animation: randomizer-pulse 300ms ease-in-out infinite alternate;
}

.randomizer-result.animation-shake {
  animation-name: randomizer-shake;
}

.randomizer-result.animation-flip {
  animation-name: randomizer-flip;
}

@keyframes randomizer-pulse {
  to { transform: scale(1.02); }
}

@keyframes randomizer-shake {
  25% { transform: translateX(-3px) rotate(-1deg); }
  75% { transform: translateX(3px) rotate(1deg); }
}

@keyframes randomizer-flip {
  to { transform: rotateY(180deg); }
}

.randomizer-history-wrap {
  display: grid;
  gap: 4px;
}

.randomizer-history-wrap.is-empty {
  display: none;
}

.randomizer-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.randomizer-history-heading button {
  border: 0;
  background: transparent;
  color: var(--blue-500);
  font-size: 9px;
  font-weight: 800;
}

.randomizer-history {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.randomizer-history li {
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf2f7;
  color: #526174;
  font-size: 9px;
  font-weight: 700;
}

.randomizer-settings-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 12px;
}

.randomizer-settings-toggles label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.randomizer-settings-toggles input {
  accent-color: var(--blue-500);
}

.stopwatch-display {
  padding: 7px 0 9px;
  text-align: center;
  color: var(--navy-900);
  font: 800 clamp(34px, 3vw, 46px)/0.95 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}

.timer-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 10px;
  padding: 3px;
  border-radius: 9px;
  background: #edf1f5;
}

.timer-mode-button {
  min-height: 29px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.timer-mode-button.active {
  background: white;
  color: var(--navy-900);
  box-shadow: 0 2px 6px rgba(25, 45, 70, 0.12);
}

.countdown-setup {
  display: grid;
  grid-template-columns: minmax(70px, 1.3fr) repeat(2, minmax(42px, 0.72fr)) minmax(44px, 0.8fr);
  align-items: end;
  gap: 5px;
}

.countdown-preset {
  display: grid;
  gap: 3px;
}

.countdown-preset > span,
.countdown-stepper-label {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.countdown-preset select {
  width: 100%;
  min-height: 58px;
  padding: 0 5px;
  border: 1px solid #ced7e2;
  border-radius: 7px;
  background: #f8fafc;
  color: var(--navy-900);
  font-size: 10px;
  font-weight: 800;
}

.countdown-stepper {
  display: grid;
  grid-template-rows: auto 18px 23px 18px;
  gap: 1px;
  text-align: center;
}

.countdown-step-button {
  min-width: 0;
  min-height: 18px;
  padding: 0;
  border: 1px solid #ced7e2;
  border-radius: 5px;
  background: #f8fafc;
  color: var(--blue-500);
  font-size: 8px;
  line-height: 1;
}

.countdown-step-button:hover:not(:disabled),
.countdown-step-button:focus-visible {
  border-color: var(--blue-500);
  background: #edf5ff;
}

.countdown-step-value {
  width: 100%;
  min-width: 0;
  padding: 0 2px;
  display: grid;
  place-items: center;
  border: 1px solid #ced7e2;
  border-radius: 5px;
  background: white;
  color: var(--navy-900);
  font: 800 14px/1 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.countdown-step-value::-webkit-outer-spin-button,
.countdown-step-value::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.countdown-step-value[type="number"] {
  appearance: textfield;
}

.countdown-step-value:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 1px;
}

.countdown-compact-toggles {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid #ced7e2;
  border-radius: 7px;
  background: #f8fafc;
}

.countdown-final-setting {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  min-height: 18px;
}

.countdown-final-setting .countdown-switch {
  grid-template-columns: 20px auto;
}

.countdown-final-setting .countdown-switch-text {
  font-size: 8px;
}

.countdown-switch {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.countdown-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.countdown-switch-track {
  width: 20px;
  height: 12px;
  position: relative;
  border-radius: 999px;
  background: #bac4d0;
  transition: background 160ms ease;
}

.countdown-switch-track::after {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(11, 31, 58, 0.28);
  transition: transform 160ms ease;
}

.countdown-switch input:checked + .countdown-switch-track {
  background: var(--green-500);
}

.countdown-switch input:checked + .countdown-switch-track::after {
  transform: translateX(8px);
}

.countdown-switch input:focus-visible + .countdown-switch-track {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.countdown-switch-text {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.countdown-display {
  padding-top: 12px;
  transition: color 180ms ease, transform 180ms ease;
}

.countdown-display.alarm-active {
  color: var(--red-500);
  animation: alarm-pulse 700ms ease-in-out infinite alternate;
}

.countdown-display.final-countdown {
  color: var(--red-500);
  transform: scale(1.12);
  animation: final-number-pop 780ms ease-in-out infinite;
}

.countdown-progress {
  height: 8px;
  overflow: hidden;
  margin: 0 0 9px;
  border-radius: 999px;
  background: #e5eaf0;
}

.countdown-progress > span {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green-500);
  transition: width 120ms linear, background 180ms ease;
}

.countdown-progress.warning > span {
  background: #e0ad24;
}

.countdown-progress.critical > span {
  background: var(--red-500);
}

.countdown-progress.final-countdown {
  animation: final-progress-pulse 700ms ease-in-out infinite alternate;
}

@keyframes alarm-pulse {
  to {
    transform: scale(1.04);
  }
}

@keyframes final-number-pop {
  50% { transform: scale(1.18); }
}

@keyframes final-progress-pulse {
  to { box-shadow: 0 0 0 4px rgba(189, 75, 79, 0.2); }
}

.stopwatch-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.timer-button {
  min-height: 32px;
  border: 1px solid #d5dde7;
  border-radius: 7px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.timer-button.start {
  border-color: var(--green-500);
  background: var(--green-500);
  color: white;
}

.laps {
  max-height: 76px;
  margin: 9px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  color: var(--muted);
  font-size: 10px;
}

.laps li {
  display: flex;
  justify-content: space-between;
  padding: 4px 3px;
  border-top: 1px solid #edf0f4;
  font-variant-numeric: tabular-nums;
}

.event-countdown {
  text-align: center;
}

.event-name {
  overflow: hidden;
  margin-bottom: 10px;
  color: var(--navy-900);
  font: 800 15px/1.25 "Plus Jakarta Sans", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-countdown-image {
  width: 100%;
  max-height: 120px;
  display: block;
  margin: 0 0 9px;
  border-radius: 8px;
  object-fit: cover;
}

.event-time-units {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.event-time-units div {
  padding: 8px 2px 6px;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #f7f9fb;
}

.event-time-units strong,
.event-time-units span {
  display: block;
}

.event-time-units strong {
  color: var(--blue-500);
  font: 800 18px/1 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}

.event-time-units span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-target-date {
  margin: 9px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.event-days-countdown {
  padding: 12px 8px;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  background: #f7f9fb;
}

.event-days-countdown strong,
.event-days-countdown span {
  display: block;
}

.event-days-countdown strong {
  color: var(--blue-500);
  font: 800 48px/0.95 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}

.event-days-countdown span {
  margin-top: 8px;
  color: var(--navy-900);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-countdown-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.event-progress {
  padding: 12px 10px;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  background: #f7f9fb;
}

.event-progress-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--navy-900);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-progress-heading strong {
  color: var(--blue-500);
  font: 800 22px/1 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}

.event-progress-track {
  height: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe6ee;
  box-shadow: inset 0 1px 2px rgba(25, 45, 70, 0.12);
}

.event-progress-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-500), var(--widget-accent));
  transition: width 300ms ease;
}

.event-empty {
  margin: 3px 0 11px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.event-arrived {
  margin: 5px 0 12px;
  color: var(--green-500);
  font: 800 27px "Plus Jakarta Sans", sans-serif;
}

.event-countdown-form {
  display: grid;
  gap: 9px;
}

.event-countdown-form label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-countdown-form input,
.event-countdown-form select {
  width: 100%;
  min-height: 36px;
  display: block;
  margin-top: 4px;
  padding: 0 8px;
  border: 1px solid #ced7e2;
  border-radius: 7px;
  color: var(--ink);
  font-size: 11px;
  text-transform: none;
}

.event-countdown-form select {
  background: white;
}

.event-mode-fields {
  display: grid;
  gap: 9px;
  padding: 9px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: #f8fafc;
}

.event-mode-fields[hidden] {
  display: none;
}

.event-countdown-form .event-checkbox-label {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.event-countdown-form .event-checkbox-label input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--blue-500);
}

.event-field-help {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.image-widget-figure {
  margin: 0;
}

.image-widget-figure img {
  width: 100%;
  max-height: 260px;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  background: #f2f5f8;
}

.image-widget-figure a {
  display: block;
}

.image-widget-figure figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.media-widget-empty {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: var(--muted);
  text-align: center;
}

.media-widget-empty strong,
.media-widget-empty span {
  display: block;
}

.media-widget-empty strong {
  color: var(--navy-900);
  font-size: 12px;
}

.media-widget-empty span {
  margin-top: 4px;
  font-size: 9px;
}

.joke-widget {
  text-align: center;
}

.joke-widget p {
  color: var(--navy-900);
  font: 700 15px/1.4 "Plus Jakarta Sans", sans-serif;
}

.joke-punchline {
  display: block;
  margin: 10px 0;
  padding: 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--widget-accent) 10%, white);
  color: var(--navy-900);
  font-size: 13px;
}

.joke-punchline[hidden] {
  display: none;
}

.calculator-source-switch {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3px;
  margin-bottom: 5px;
  padding: 3px;
  border-radius: 9px;
  background: #dfe5ec;
}

.calculator-source-button {
  min-height: 27px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.calculator-source-button.active {
  background: white;
  color: var(--navy-900);
  box-shadow: 0 2px 6px rgba(25, 45, 70, 0.12);
}

.online-calculator-shell {
  min-height: 0;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #cbd5df;
  border-radius: 11px;
  background: #11152d;
}

.online-calculator-shell[hidden] {
  display: none;
}

.online-calculator-status {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.online-calculator-status a {
  margin-left: auto;
  color: var(--blue-500);
  font-size: 8px;
  text-decoration: none;
}

.online-calculator-status a:hover {
  text-decoration: underline;
}

.online-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e3a72f;
}

.online-calculator-shell.is-ready .online-status-dot {
  background: var(--green-500);
}

.online-calculator-shell.has-error .online-status-dot {
  background: var(--red-500);
}

.online-calculator-frame-wrap {
  width: 100%;
  max-height: calc(100vh - 115px);
  flex: 0 0 auto;
  aspect-ratio: 0.44;
  overflow: hidden;
  background: #11152d;
}

.online-calculator-frame {
  width: 111.12%;
  min-height: 0;
  height: calc(111.12% + 116px);
  display: block;
  position: relative;
  top: -130px;
  left: 50%;
  border: 0;
  background: #11152d;
  transform: translateX(-50%) scale(1.1);
  transform-origin: top center;
}

.online-calculator-error {
  display: none;
  padding: 28px 18px;
  background: white;
  text-align: center;
}

.online-calculator-error strong {
  color: var(--navy-900);
  font: 800 13px "Plus Jakarta Sans", sans-serif;
}

.online-calculator-error p {
  margin: 5px 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.online-calculator-error-actions {
  display: grid;
  gap: 7px;
}

.online-calculator-shell.has-error .online-calculator-frame-wrap {
  display: none;
}

.online-calculator-shell.has-error .online-calculator-error {
  display: block;
}

.calculator {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 11px 10px 10px;
  border-radius: 12px 12px 18px 18px;
  background: #20252c;
  box-shadow: inset 0 0 0 2px #343a43, 0 6px 14px rgba(13, 20, 29, 0.2);
}

.calculator-brand {
  display: flex;
  justify-content: space-between;
  margin: 0 4px 7px;
  color: white;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.calculator-brand strong {
  color: #70b7dc;
}

.calc-screen {
  min-height: 65px;
  margin-bottom: 9px;
  padding: 7px 8px;
  overflow: hidden;
  border: 3px solid #0e1114;
  border-radius: 4px;
  background: #c8d5bc;
  color: #182118;
  font-family: "Courier New", monospace;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.calc-expression,
.calc-result {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-expression {
  min-height: 20px;
  font-size: 12px;
}

.calc-result {
  margin-top: 3px;
  font-size: 19px;
  font-weight: 700;
}

.calc-detail {
  min-height: 13px;
  margin-top: 2px;
  overflow: hidden;
  color: #344535;
  font-size: 9px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px 3px;
}

.calc-key {
  min-width: 0;
  min-height: 28px;
  padding: 0 2px;
  border: 0;
  border-radius: 5px;
  background: #ebedf0;
  color: #111820;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 2px 0 #8b939c;
}

.calc-key:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #8b939c;
}

.calc-key.function {
  background: #3a4350;
  color: white;
  box-shadow: 0 2px 0 #11161d;
  font-size: 8px;
}

.calc-key.operator {
  background: #d9dee5;
  color: #17202a;
  box-shadow: 0 2px 0 #818b96;
  font-size: 13px;
}

.calc-key.mode {
  background: #6c7480;
  color: white;
  box-shadow: 0 2px 0 #2d333b;
  font-size: 8px;
}

.calc-key.mode.active {
  background: #d8a62b;
  color: #18202a;
  box-shadow: 0 2px 0 #8d6500;
}

.calc-key.blue {
  background: #4c9dca;
  color: white;
  box-shadow: 0 2px 0 #215c7d;
}

.calc-key.enter {
  background: #4c9dca;
  color: white;
}

.scientific-calculator:focus-visible {
  outline: 3px solid rgba(76, 157, 202, 0.45);
  outline-offset: 2px;
}

.main-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px clamp(16px, 2.1vw, 32px) 12px;
  position: relative;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.9), transparent 42%),
    var(--canvas);
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.main-display-heading {
  flex: 0 0 auto;
}

.stage-toolbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--blue-500);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.stage-toolbar h2,
.settings-modal h2 {
  color: var(--navy-900);
  font: 800 22px/1.2 "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.03em;
}

.main-display-mode-label select {
  min-width: 210px;
  min-height: 34px;
  padding: 0 34px 0 10px;
  border: 1px solid #c9d4e1;
  border-radius: 8px;
  background-color: white;
  color: var(--navy-900);
  font: 800 16px "Plus Jakarta Sans", sans-serif;
}

.camera-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.camera-status-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(7, 22, 43, 0.72);
  color: #d4deea;
  box-shadow: 0 5px 16px rgba(0, 8, 24, 0.2);
  backdrop-filter: blur(8px);
}

.camera-status-overlay.is-live {
  color: #7ce0ae;
}

.camera-status-overlay.is-frozen {
  color: #ffd477;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aab4c1;
}

.camera-status.is-live {
  color: var(--green-500);
}

.camera-status.is-live .status-dot {
  background: var(--green-500);
  box-shadow: 0 0 0 4px rgba(36, 166, 106, 0.12);
}

.camera-status.is-frozen {
  color: #a66c00;
}

.camera-status.is-frozen .status-dot {
  background: #e3a72f;
  box-shadow: 0 0 0 4px rgba(227, 167, 47, 0.15);
}

.camera-frame {
  flex: 1;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid #d8e0e9;
  border-radius: 16px;
  background: #111923;
  box-shadow: var(--shadow);
}

.camera-content,
.camera-placeholder {
  min-height: 0;
  flex: 1;
}

.camera-content {
  display: flex;
  flex-direction: column;
  position: relative;
}

.camera-content[hidden],
.main-display-resource-layer[hidden],
.main-display-resource-controls[hidden],
.main-display-resource-editor[hidden],
.youtube-resource-options[hidden] {
  display: none;
}

.camera-frame video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  background: #090d12;
}

@media (min-width: 1051px) {
  .app-shell {
    height: 100vh;
    overflow: hidden;
  }

  .dashboard {
    min-height: 0;
    overflow: hidden;
  }

  .sidebar-left,
  .sidebar-right {
    height: 100%;
    min-height: 0;
    overscroll-behavior: contain;
  }

  .main-stage,
  .sidebar-calculator {
    position: relative;
    top: auto;
    align-self: start;
    width: 100%;
    height: 100%;
    max-height: none;
  }

  .main-stage {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .main-stage .camera-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .dashboard.left-collapsed .main-stage,
  .dashboard.right-collapsed .main-stage,
  .dashboard.calculator-collapsed .main-stage {
    grid-template-rows: auto minmax(0, 1fr);
    padding: 8px clamp(10px, 1.3vw, 20px);
  }

  .dashboard.left-collapsed .stage-toolbar,
  .dashboard.right-collapsed .stage-toolbar,
  .dashboard.calculator-collapsed .stage-toolbar {
    min-height: 24px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
  }

  .dashboard.left-collapsed .stage-tip,
  .dashboard.right-collapsed .stage-tip,
  .dashboard.calculator-collapsed .stage-tip {
    display: none;
  }

  .dashboard.left-collapsed .camera-frame video,
  .dashboard.right-collapsed .camera-frame video,
  .dashboard.calculator-collapsed .camera-frame video {
    object-position: center;
  }
}

.main-display-resource-layer {
  min-height: 0;
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  container-type: size;
  background: linear-gradient(145deg, #173b66 0%, #102e52 48%, #071a32 100%);
}

.main-display-backdrop {
  position: absolute;
  inset: -30px;
  z-index: 0;
  background:
    radial-gradient(circle at center, rgba(43, 113, 216, 0.2), transparent 58%),
    #0b111a;
  background-position: center;
  background-size: cover;
  filter: blur(22px) saturate(0.9) brightness(0.58);
  opacity: 0.82;
  transform: scale(1.08);
}

.main-display-backdrop:not(.has-image) {
  background: linear-gradient(145deg, #173b66 0%, #102e52 48%, #071a32 100%);
  filter: none;
  opacity: 1;
  transform: none;
}

.main-display-resource-layer iframe {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: white;
}

.main-display-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: transparent;
}

.main-display-resource-layer.image-fit .main-display-image {
  object-fit: contain;
}

.main-display-resource-layer.image-fill .main-display-backdrop {
  opacity: 0.28;
}

.main-display-image-caption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 4;
  display: grid;
  gap: 3px;
  max-height: 30%;
  overflow: auto;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(7, 22, 43, 0.72);
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.main-display-image-caption strong {
  font: 700 13px "Plus Jakarta Sans", sans-serif;
}

.main-display-image-caption span {
  color: #d3deea;
  font-size: 10px;
  line-height: 1.4;
}

.main-display-resource-layer.has-aspect-content iframe {
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
  aspect-ratio: 16 / 9;
  box-shadow: 0 0 34px rgba(0, 0, 0, 0.42);
}

.main-display-resource-layer.is-slides {
  place-items: center;
}

.main-display-resource-layer.is-slides iframe {
  width: min(100cqw, calc((100cqh - 38px) * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16 + 38px));
  aspect-ratio: auto;
}

.main-display-resource-layer.is-clock-timer {
  display: block;
}

.main-display-clock-timer {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  padding: clamp(14px, 2.2vw, 30px);
  background:
    radial-gradient(circle at 78% 22%, rgba(67, 145, 224, 0.28), transparent 34%),
    radial-gradient(circle at 18% 78%, rgba(245, 185, 65, 0.15), transparent 30%),
    linear-gradient(145deg, #173b66 0%, #102e52 48%, #071a32 100%);
  color: white;
}

.main-timer-view-switch {
  width: max-content;
  max-width: 100%;
  display: flex;
  gap: 5px;
  margin: 0 auto clamp(10px, 1.8vh, 20px);
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(5, 20, 39, 0.44);
  backdrop-filter: blur(12px);
}

.main-timer-view-switch button {
  min-height: 34px;
  padding: 0 15px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd9e9;
  font-size: 11px;
  font-weight: 800;
}

.main-timer-view-switch button.active {
  background: white;
  color: var(--navy-900);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.main-timer-content {
  width: 100%;
  min-width: 0;
  height: calc(100% - 58px);
  display: grid;
  place-items: center;
}

.main-date-clock {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(8px, 1.6vh, 18px);
  text-align: center;
}

.main-date-clock::before {
  content: "";
  width: min(520px, 72vw);
  height: min(520px, 72vw);
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(52, 132, 215, 0.18), rgba(7, 26, 50, 0) 66%);
  box-shadow:
    0 0 0 26px rgba(255, 255, 255, 0.018),
    0 0 0 54px rgba(255, 255, 255, 0.012);
  transform: translate(-50%, -50%);
}

.main-date-clock > span {
  color: white;
  font: 800 clamp(30px, 5vw, 72px)/1.08 "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.035em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.main-date-clock > small {
  order: -1;
  color: var(--header-accent);
  font-size: clamp(10px, 1.2vw, 15px);
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.main-clock-time {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 22px);
}

.main-clock-time > strong {
  font: 800 clamp(74px, 13vw, 190px)/0.88 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.main-clock-detail {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding-bottom: clamp(6px, 1.5vw, 22px);
}

.main-clock-detail b {
  min-width: 2.1ch;
  color: var(--header-accent);
  font: 800 clamp(28px, 4.5vw, 66px)/0.9 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(245, 185, 65, 0.25);
}

.main-clock-detail em {
  min-width: 2.1ch;
  color: #cbd9e9;
  font: 800 clamp(28px, 4.5vw, 66px)/0.9 "Plus Jakarta Sans", sans-serif;
  font-style: normal;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main-countdown-layout {
  width: 100%;
  max-width: 1040px;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: clamp(5px, 1vh, 10px);
}

.main-countdown-setup {
  width: 100%;
  max-width: 720px;
  min-width: 0;
  grid-template-columns: minmax(140px, 1.4fr) repeat(2, minmax(72px, 0.7fr)) minmax(90px, 0.85fr) minmax(120px, 0.95fr);
  align-self: start;
}

.main-countdown-setup .countdown-final-setting {
  grid-column: auto;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
}

.main-countdown-setup .countdown-final-setting .countdown-switch {
  grid-template-columns: 30px auto;
}

.main-countdown-setup .countdown-preset > span,
.main-countdown-setup .countdown-stepper-label {
  color: #cbd9e9;
  font-size: 9px;
}

.main-countdown-setup .countdown-preset select {
  min-height: 60px;
  padding-inline: 12px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 13px;
}

.main-countdown-setup .countdown-preset select option {
  color: var(--navy-900);
}

.main-countdown-setup .countdown-stepper {
  grid-template-rows: auto 18px 26px 18px;
}

.main-countdown-setup .countdown-step-button,
.main-countdown-setup .countdown-step-value {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.main-countdown-setup .countdown-step-button {
  font-size: 10px;
}

.main-countdown-setup .countdown-step-value {
  font-size: 18px;
}

.main-countdown-setup .countdown-compact-toggles {
  min-height: 60px;
  padding-inline: 12px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.main-countdown-setup .countdown-switch {
  grid-template-columns: 30px 1fr;
  gap: 7px;
}

.main-countdown-setup .countdown-switch-track {
  width: 30px;
  height: 16px;
}

.main-countdown-setup .countdown-switch-track::after {
  width: 12px;
  height: 12px;
}

.main-countdown-setup .countdown-switch input:checked + .countdown-switch-track::after {
  transform: translateX(14px);
}

.main-countdown-setup .countdown-switch-text {
  color: #d8e3ef;
  font-size: 10px;
}

.main-countdown-center {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}

.main-countdown-ring {
  width: min(43vh, 500px);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1;
  position: relative;
  justify-self: center;
}

.main-countdown-ring::after {
  content: "";
  position: absolute;
  inset: 9%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 105, 177, 0.26), rgba(7, 26, 50, 0) 70%);
  box-shadow: 0 0 48px rgba(43, 113, 216, 0.18);
}

.main-countdown-ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.main-countdown-ring circle {
  fill: none;
  stroke-width: 17;
}

.main-countdown-track {
  stroke: rgba(255, 255, 255, 0.13);
}

.main-countdown-progress {
  stroke: #35b777;
  stroke-linecap: round;
  filter: drop-shadow(0 0 9px rgba(53, 183, 119, 0.34));
  transition: stroke-dashoffset 120ms linear, stroke 180ms ease, filter 180ms ease;
}

.main-countdown-progress.warning {
  stroke: #f0c448;
  filter: drop-shadow(0 0 9px rgba(240, 196, 72, 0.38));
}

.main-countdown-progress.critical {
  stroke: #ef6267;
  filter: drop-shadow(0 0 9px rgba(239, 98, 103, 0.42));
}

.main-countdown-value {
  position: absolute;
  inset: 27%;
  display: grid;
  place-content: center;
  text-align: center;
}

.main-countdown-value strong {
  font: 800 clamp(48px, 6.4vw, 96px)/0.94 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}

.main-countdown-ring.final-countdown .main-countdown-value strong {
  color: #ff7377;
  animation: main-final-number-pop 780ms ease-in-out infinite;
}

.main-countdown-ring.final-countdown {
  animation: main-final-ring-pulse 780ms ease-in-out infinite alternate;
}

@keyframes main-final-number-pop {
  50% { transform: scale(1.12); }
}

@keyframes main-final-ring-pulse {
  to { filter: drop-shadow(0 0 24px rgba(239, 98, 103, 0.42)); }
}

.main-countdown-actions {
  align-self: end;
  margin-bottom: 6px;
}

.main-countdown-value span {
  max-width: 240px;
  margin-top: 12px;
  color: #cbd9e9;
  font-size: clamp(10px, 1.2vw, 15px);
  font-weight: 700;
}

.main-timer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.main-timer-actions button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.main-timer-actions .main-timer-primary {
  border-color: var(--header-accent);
  background: var(--header-accent);
  color: var(--navy-950);
}

.main-stopwatch {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 20px;
  text-align: center;
}

.main-stopwatch::before {
  content: "";
  width: min(620px, 78vw);
  height: min(260px, 34vh);
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(43, 113, 216, 0.22), transparent 68%);
  transform: translate(-50%, -58%);
}

.main-stopwatch > span {
  color: var(--header-accent);
  font-size: clamp(11px, 1.3vw, 17px);
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.main-stopwatch-time {
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.main-stopwatch-time > strong {
  font: 800 clamp(66px, 12vw, 176px)/1 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.main-stopwatch-time > small {
  min-width: 2.5ch;
  margin-left: clamp(6px, 1vw, 14px);
  color: var(--header-accent);
  font: 800 clamp(24px, 4vw, 58px)/1 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(245, 185, 65, 0.22);
}

.main-display-timer-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 20;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 11px;
  background: rgba(7, 22, 43, 0.74);
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
}

.main-display-timer-overlay[hidden] {
  display: none;
}

.timer-overlay-return,
.timer-overlay-control {
  border: 0;
  background: transparent;
  color: inherit;
}

.timer-overlay-return {
  display: grid;
  justify-items: start;
  gap: 1px;
  padding: 7px 11px;
}

.timer-overlay-label {
  color: #bdd0e4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timer-overlay-return strong {
  font: 800 18px/1 "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}

.timer-overlay-control {
  width: 38px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
}

.main-display-empty {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 30px 82px;
  color: white;
  text-align: center;
}

.main-display-brand-chip {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100% - 36px));
  padding: 9px 12px 9px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(7, 22, 43, 0.52);
  color: white;
  text-align: left;
  box-shadow: 0 10px 28px rgba(0, 8, 24, 0.22);
  backdrop-filter: blur(12px);
}

.main-display-school-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  overflow: hidden;
  border: 1px solid rgba(245, 185, 65, 0.65);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 232, 0.92));
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color: var(--navy-900);
  font: 800 16px/1 "Plus Jakarta Sans", sans-serif;
}

.main-display-school-mark.has-image {
  color: transparent;
}

.main-display-brand-chip small {
  display: block;
  color: var(--gold-500);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main-display-brand-chip strong {
  display: block;
  max-width: 300px;
  overflow: hidden;
  color: white;
  font: 800 15px/1.15 "Plus Jakarta Sans", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summit-credit-link {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 22, 43, 0.5);
  color: #d7e1ee;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.summit-credit-link:hover,
.summit-credit-link:focus-visible {
  color: white;
  border-color: rgba(245, 185, 65, 0.72);
  outline: none;
}

.main-display-empty-logo {
  width: min(310px, 55%);
  max-height: 245px;
  margin-bottom: 15px;
  padding: 14px;
  border: 2px solid rgba(245, 185, 65, 0.86);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 232, 0.96));
  object-fit: contain;
  box-shadow: 0 16px 34px rgba(0, 8, 24, 0.32);
}

.main-display-empty-kicker {
  margin-bottom: 5px;
  color: var(--gold-500);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.main-display-empty h3,
.main-display-resource-editor h3 {
  font: 700 21px "Plus Jakarta Sans", sans-serif;
}

.main-display-empty p {
  max-width: 560px;
  margin: 8px 0 18px;
  color: #b7c7d9;
  font-size: 13px;
  line-height: 1.5;
}

.main-display-resource-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  position: static;
  width: auto;
  max-width: min(58vw, 760px);
  overflow-x: auto;
  padding: 4px;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 5px 14px rgba(25, 45, 70, 0.08);
  scrollbar-width: none;
}

.main-display-resource-controls::-webkit-scrollbar,
.camera-controls::-webkit-scrollbar {
  display: none;
}

.main-display-resource-controls label {
  flex: 1 1 220px;
  min-width: 150px;
}

.main-display-resource-controls select {
  width: 100%;
  min-height: 34px;
  padding: 0 30px 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background-color: white;
  color: #1d2d42;
  font-size: 11px;
  font-weight: 700;
}

.main-display-resource-controls a {
  flex: 0 0 auto;
  text-decoration: none;
}

.main-display-resource-editor {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: auto;
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 12;
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid #d2dbe6;
  border-radius: 14px;
  background: white;
  color: var(--ink);
  box-shadow: 0 22px 60px rgba(0, 8, 24, 0.42);
  transform: translate(-50%, -50%);
}

.main-display-resource-editor label {
  display: grid;
  gap: 5px;
  color: #526174;
  font-size: 11px;
  font-weight: 800;
}

.main-display-resource-editor input,
.main-display-resource-editor select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.main-display-resource-editor > p {
  color: #69788a;
  font-size: 11px;
  line-height: 1.45;
}

.youtube-resource-options {
  display: flex;
  align-items: end;
  gap: 16px;
}

.youtube-resource-options > label:first-child {
  flex: 1;
}

.main-display-checkbox {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 38px;
}

.main-display-checkbox input {
  min-height: auto;
}

.main-display-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.danger-button {
  min-height: 39px;
  padding: 0 16px;
  border: 1px solid #dca6a6;
  border-radius: 8px;
  background: #fff5f5;
  color: #9d2929;
  font-size: 12px;
  font-weight: 800;
}

.camera-frame.is-live video {
  display: block;
}

.camera-frame.is-live .camera-placeholder {
  display: none;
}

.camera-freeze-badge {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  background: rgba(145, 92, 0, 0.88);
  color: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.camera-frame.is-frozen .camera-freeze-badge {
  display: block;
}

.camera-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: linear-gradient(145deg, #173b66 0%, #102e52 48%, #071a32 100%);
  color: white;
  text-align: center;
}

.camera-welcome-logo {
  width: min(480px, 70%);
  max-height: min(47vh, 430px);
  margin-bottom: 14px;
  padding: clamp(14px, 2.4vw, 26px);
  border: 3px solid rgba(245, 185, 65, 0.9);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 232, 0.96));
  object-fit: contain;
  box-shadow:
    0 18px 38px rgba(0, 11, 30, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.camera-illustration {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
}

.camera-illustration svg {
  width: 76px;
  fill: none;
  stroke: #90a9c4;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.camera-placeholder h3 {
  font: 700 22px "Plus Jakarta Sans", sans-serif;
}

.camera-placeholder p {
  max-width: 420px;
  margin: 8px 0 20px;
  color: #b7c7d9;
  font-size: 13px;
  line-height: 1.5;
}

.primary-button,
.secondary-button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--blue-500);
  background: var(--blue-500);
  color: white;
  box-shadow: 0 4px 10px rgba(43, 113, 216, 0.22);
}

.primary-button:hover {
  background: #2165c4;
}

.secondary-button {
  border: 1px solid #cdd6e1;
  background: white;
  color: var(--ink);
}

.camera-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  position: static;
  width: auto;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 5px 14px rgba(25, 45, 70, 0.08);
  scrollbar-width: none;
}

.control-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: white;
  color: #26374d;
  font-size: 11px;
  font-weight: 800;
}

.control-button:hover:not(:disabled) {
  border-color: #9eb0c5;
  background: #f8fafc;
}

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

.control-primary {
  border-color: var(--blue-500);
  background: var(--blue-500);
  color: white;
}

.control-button.is-active {
  border-color: #d59a22;
  background: #fff4d5;
  color: #855900;
}

.camera-select-wrap select {
  min-height: 34px;
  width: clamp(130px, 15vw, 180px);
  max-width: 205px;
  padding: 0 30px 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: #334154;
  font-size: 11px;
  font-weight: 700;
}

.stage-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 0 0;
  color: #7b8796;
  font-size: 10px;
}

.stage-tip > span {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #a7b1be;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
}

.sidebar-restore {
  width: 34px;
  height: 118px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: fixed;
  top: 46%;
  z-index: 18;
  border: 1px solid #d1d9e3;
  background: white;
  color: var(--navy-800);
  box-shadow: var(--shadow);
  font-size: 18px;
}

.sidebar-restore-arrow {
  line-height: 1;
}

.sidebar-restore-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #607087;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.sidebar-restore-left {
  left: 0;
  border-left: 0;
  border-radius: 0 10px 10px 0;
}

.sidebar-restore-right {
  right: 0;
  border-right: 0;
  border-radius: 10px 0 0 10px;
}

.sidebar-restore-calculator {
  right: 0;
  border-right: 0;
  border-radius: 10px 0 0 10px;
}

.left-collapsed .sidebar-restore-left,
.right-collapsed .sidebar-restore-right,
.calculator-collapsed .sidebar-restore-calculator {
  display: flex;
}

.calculator-collapsed:not(.right-collapsed) .sidebar-restore-calculator {
  right: var(--right-track);
}

.right-collapsed:not(.calculator-collapsed) .sidebar-restore-right {
  right: var(--calculator-track);
}

.right-collapsed.calculator-collapsed .sidebar-restore-calculator {
  right: 34px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 22, 43, 0.58);
  backdrop-filter: blur(3px);
}

.modal-backdrop[hidden] {
  display: none;
}

.settings-modal {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: hidden;
  border-radius: 16px;
  background: white;
  box-shadow: 0 26px 70px rgba(7, 22, 43, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.setting-group {
  padding: 17px 22px;
  border-bottom: 1px solid #edf0f4;
}

.demo-mode-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #fff9e8, #fffdf7);
}

.demo-mode-copy {
  min-width: 0;
}

.demo-mode-copy label {
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 800;
}

.demo-mode-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.demo-mode-button {
  flex: 0 0 auto;
  border-color: #e5ad37;
  background: var(--gold-500);
  color: var(--navy-950);
}

.demo-mode-button.is-active {
  border-color: #d45a5a;
  background: white;
  color: #a53232;
}

.demo-welcome-backdrop {
  z-index: 120;
}

.demo-welcome-modal {
  width: min(510px, 100%);
  padding: 28px 32px 30px;
  border: 2px solid rgba(245, 185, 65, 0.85);
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #fff9e9);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 28px 80px rgba(7, 22, 43, 0.34);
}

.demo-welcome-logo {
  width: min(245px, 68%);
  max-height: 205px;
  margin-bottom: 15px;
  object-fit: contain;
}

.demo-welcome-kicker {
  display: block;
  margin-bottom: 5px;
  color: #9a6500;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.demo-welcome-modal h2 {
  color: var(--navy-900);
  font: 800 27px/1.15 "Plus Jakarta Sans", sans-serif;
}

.demo-welcome-modal p {
  margin-top: 12px;
  color: #516176;
  font-size: 13px;
  line-height: 1.55;
}

.demo-welcome-modal .primary-button {
  margin-top: 22px;
  padding-inline: 24px;
}

.settings-modal {
  overflow-y: auto;
}

.color-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.color-setting {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #d8e0e9;
  border-radius: 9px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.color-setting input {
  width: 38px;
  height: 32px;
  padding: 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.weather-location-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 9px;
}

.setting-feedback {
  min-height: 16px;
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.setting-group > label {
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 800;
}

.setting-group > p {
  margin: 4px 0 13px;
  color: var(--muted);
  font-size: 11px;
}

.logo-setting {
  gap: 14px;
}

.logo-preview {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px dashed #bdc8d5;
  border-radius: 13px;
  background: #f5f8fb;
  color: var(--navy-800);
  font: 800 20px "Plus Jakarta Sans", sans-serif;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.file-button {
  cursor: pointer;
}

#logoUpload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.logo-setting .text-button {
  display: block;
  margin-top: 8px;
}

.settings-input {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  padding: 0 11px;
  border: 1px solid #cdd6e1;
  border-radius: 8px;
}

.sheet-connection-actions,
.weather-location-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 9px;
}

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

.settings-grid label > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.settings-grid .settings-input {
  margin-top: 5px;
}

.settings-grid-wide {
  grid-column: 1 / -1;
}

.widget-preferences {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.widget-preference {
  display: grid;
  grid-template-columns: 1fr 120px;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: #fafbfd;
}

.widget-preference label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.widget-preference select {
  min-height: 30px;
  border: 1px solid #d1d9e3;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 9px;
}

.setting-feedback.is-error {
  color: #b33d3d;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 16px 22px;
  border-top: 1px solid #edf0f4;
  background: white;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.focus-mode .sidebar,
body.focus-mode .sidebar-restore {
  display: none;
}

body.focus-mode .dashboard {
  min-height: 0;
  grid-template-columns: 1fr;
}

body.focus-mode .main-stage {
  position: relative;
  inset: auto;
  z-index: auto;
  width: 100%;
  height: 100%;
  padding: 18px clamp(16px, 2.1vw, 32px) 12px;
}

body.focus-mode .camera-frame {
  min-height: 0;
}

.focus-toolbar-toggle {
  display: inline-flex;
}

.main-stage:fullscreen {
  display: block;
  width: 100vw;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #090d12;
}

.main-stage:fullscreen .sidebar-restore,
.main-stage:fullscreen .stage-tip {
  display: none;
}

.main-stage:fullscreen .stage-toolbar {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 40;
  margin: 0;
  pointer-events: none;
}

.main-stage:fullscreen .main-display-heading,
.main-stage:fullscreen .camera-status {
  display: none;
}

.main-stage:fullscreen .stage-toolbar-actions {
  display: block;
}

.main-stage:fullscreen .camera-frame {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  max-height: 100vh;
  border: 0;
  border-radius: 0;
}

.main-stage:fullscreen .camera-controls,
.main-stage:fullscreen .main-display-resource-controls {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 40;
  min-height: auto;
  width: max-content;
  max-width: calc(100vw - 32px);
  overflow-x: auto;
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding: 7px;
  border-radius: 12px;
  background: rgba(7, 22, 43, 0.62);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  pointer-events: auto;
}

.main-stage:fullscreen .main-display-resource-layer,
.main-stage:fullscreen .camera-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.main-stage:fullscreen .main-display-resource-layer iframe {
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
}

.main-stage:fullscreen .main-display-image-caption {
  bottom: 82px;
}

@media (max-width: 1350px) {
  .stage-toolbar {
    gap: 10px;
  }

  .main-display-resource-controls,
  .camera-controls {
    max-width: 54vw;
  }

  .control-icon-button .control-button-label {
    display: none;
  }

  .control-icon-button {
    width: 34px;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 1050px) {
  :root {
    --sidebar-width: 250px;
    --calculator-width: 328px;
  }

  .topbar {
    grid-template-columns: auto minmax(410px, 1fr) auto;
    gap: 10px;
    padding-inline: 14px;
  }

  .brand p {
    display: none;
  }

  .lesson-context {
    grid-template-columns: minmax(125px, 0.65fr) minmax(240px, 1.35fr);
    gap: 8px;
  }

  .brand h1 {
    max-width: 150px;
    font-size: 15px;
  }

  .topbar-date,
  .topbar-actions .topbar-date {
    width: 142px;
    min-width: 142px;
    flex-basis: 142px;
  }

  .topbar-date {
    padding-right: 10px;
  }

  .topbar-actions {
    width: 289px;
    flex-basis: 289px;
  }

  .topbar-actions .topbar-date span {
    font-size: 11px;
  }

  .topbar-actions .topbar-date strong {
    font-size: 25px;
  }

  .dashboard {
    --right-track: 0px;
    --calculator-track: 0px;
    --open-overlay-width: calc(var(--sidebar-width) + var(--calculator-width));
    grid-template-columns: var(--sidebar-width) minmax(380px, 1fr);
  }

  .dashboard.right-collapsed {
    --open-overlay-width: var(--calculator-width);
  }

  .dashboard.calculator-collapsed {
    --open-overlay-width: var(--sidebar-width);
  }

  .dashboard.right-collapsed.calculator-collapsed {
    --open-overlay-width: 0px;
  }

  .main-stage {
    justify-self: start;
    width: max(180px, calc(100% - var(--open-overlay-width)));
  }

  .sidebar-right,
  .sidebar-calculator {
    position: fixed;
    top: 88px;
    bottom: 0;
    z-index: 15;
    box-shadow: -10px 0 25px rgba(11, 31, 58, 0.12);
  }

  .sidebar-right {
    right: 0;
    width: var(--sidebar-width);
    z-index: 16;
  }

  .sidebar-calculator {
    right: var(--sidebar-width);
    width: var(--calculator-width);
  }

  .right-collapsed .sidebar-calculator {
    right: 0;
  }

  .right-collapsed .sidebar-right {
    display: none;
  }

  .calculator-collapsed .sidebar-calculator {
    display: none;
  }

  .dashboard.left-collapsed {
    grid-template-columns: 0 minmax(380px, 1fr);
  }

  .sidebar-restore-right,
  .sidebar-restore-calculator {
    position: fixed;
    top: 46%;
    z-index: 18;
  }

  .right-collapsed:not(.calculator-collapsed) .sidebar-restore-right {
    right: var(--calculator-width);
  }

  .calculator-collapsed:not(.right-collapsed) .sidebar-restore-calculator {
    right: var(--sidebar-width);
  }

  .right-collapsed.calculator-collapsed .sidebar-restore-calculator {
    right: 34px;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 76px;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    padding: 8px 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand > div:last-child {
    display: none;
  }

  .lesson-context {
    grid-template-columns: 1fr;
  }

  .context-summary {
    display: none;
  }

  .context-controls {
    grid-template-columns: 1fr 1fr auto;
    gap: 4px;
  }

  .context-controls label > span {
    display: none;
  }

  .context-controls select,
  .header-reset-button {
    height: 34px;
  }

  .topbar-actions .topbar-date {
    width: 112px;
    min-width: 112px;
    flex-basis: 112px;
    padding-right: 7px;
  }

  .topbar-actions {
    width: 155px;
    flex-basis: 155px;
  }

  .topbar-actions .topbar-date span {
    font-size: 9px;
  }

  .topbar-actions .topbar-date strong {
    font-size: 20px;
  }

  #focusModeButton,
  #browserToolbarButton {
    display: none;
  }

  .header-action-button {
    width: 36px;
    height: 36px;
  }

  .dashboard {
    --open-overlay-width: 0px;
    min-height: calc(100vh - 76px);
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    position: fixed;
    top: 76px;
    bottom: 0;
    z-index: 15;
    display: block;
    width: min(310px, 88vw);
    box-shadow: 10px 0 25px rgba(11, 31, 58, 0.16);
  }

  .sidebar-left {
    left: 0;
  }

  .sidebar-right {
    right: 0;
    box-shadow: -10px 0 25px rgba(11, 31, 58, 0.16);
  }

  .sidebar-calculator {
    right: min(310px, 88vw);
    display: flex;
  }

  .right-collapsed .sidebar-calculator {
    right: 0;
  }

  .left-collapsed .sidebar-left,
  .right-collapsed .sidebar-right,
  .calculator-collapsed .sidebar-calculator {
    display: none;
  }

  .main-stage {
    grid-column: 1;
    width: 100%;
    padding: 14px 12px 10px;
  }

  .camera-frame {
    min-height: 520px;
  }

  .camera-controls {
    flex-wrap: nowrap;
  }

  .camera-select-wrap {
    flex: 0 0 auto;
  }

  .camera-select-wrap select {
    width: clamp(125px, 26vw, 155px);
  }

  .stage-tip {
    text-align: center;
  }

  .main-display-clock-timer {
    padding: 14px;
  }

  .main-timer-view-switch button {
    padding-inline: 10px;
    font-size: 9px;
  }

  .main-countdown-layout {
    gap: 8px;
  }

  .main-countdown-setup {
    grid-template-columns: minmax(100px, 1.3fr) repeat(2, minmax(52px, 0.7fr)) minmax(70px, 0.8fr) minmax(90px, 0.9fr);
  }

  .main-countdown-ring {
    width: min(55vh, 410px, 86vw);
    justify-self: center;
  }

  .main-countdown-setup .countdown-switch-text {
    font-size: 8px;
  }

  .main-display-brand-chip {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }

  .main-display-brand-chip strong {
    max-width: 210px;
  }

  .summit-credit-link {
    right: 10px;
    bottom: 10px;
    left: 10px;
    text-align: center;
  }
}

@media (max-height: 760px) and (min-width: 721px) {
  .main-stage {
    padding-top: 8px;
    padding-bottom: 6px;
  }

  .stage-toolbar {
    margin-bottom: 6px;
  }

  .stage-tip {
    display: none;
  }

  .camera-welcome-logo,
  .main-display-empty-logo {
    max-height: 30vh;
  }

  .camera-placeholder,
  .main-display-empty {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .main-display-clock-timer {
    padding: 10px 18px;
  }

  .main-timer-view-switch {
    margin-bottom: 10px;
  }

  .main-timer-content {
    height: calc(100% - 48px);
  }

  .main-countdown-ring {
    width: min(34vh, 360px, 100%);
  }

  .main-countdown-setup .countdown-preset select,
  .main-countdown-setup .countdown-compact-toggles {
    min-height: 54px;
  }

  .main-countdown-setup .countdown-stepper {
    grid-template-rows: auto 16px 22px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .countdown-display.final-countdown,
  .countdown-progress.final-countdown,
  .main-countdown-ring.final-countdown,
  .main-countdown-ring.final-countdown .main-countdown-value strong {
    animation: none !important;
  }
}

/* Scoreboard widget and Main Display projection */
.scoreboard-widget {
  display: grid;
  gap: 0.7rem;
}

.scoreboard-control-strip,
.scoreboard-options,
.scoreboard-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: end;
}

.scoreboard-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scoreboard-control-strip label,
.scoreboard-options label {
  display: grid;
  gap: 0.22rem;
  color: #68768a;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scoreboard-control-strip select,
.scoreboard-options input,
.scoreboard-options select,
.scoreboard-project,
.scoreboard-footer button,
.scoreboard-editor button {
  min-height: 2rem;
  border: 1px solid #cbd7e6;
  border-radius: 0.55rem;
  background: #fff;
  color: #10213a;
  font: inherit;
  font-weight: 800;
  padding: 0.38rem 0.55rem;
}

.scoreboard-project {
  background: #2b71d8;
  color: #fff;
  border-color: #2b71d8;
}

.scoreboard-stage {
  border-radius: 1rem;
  background: linear-gradient(145deg, #0c2340, #173b66);
  padding: 0.7rem;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.scoreboard-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.scoreboard-stage.projection .scoreboard-team-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.scoreboard-team-card {
  position: relative;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  border-radius: 0.9rem;
  background: #173b66;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05)),
    color-mix(in srgb, var(--team-color) 28%, #10213a);
  border: 1px solid color-mix(in srgb, var(--team-color) 60%, #fff);
  padding: 0.65rem;
  overflow: hidden;
}

.scoreboard-stage.projection .scoreboard-team-card {
  min-height: 210px;
  padding: 1.1rem;
  align-content: center;
}

.scoreboard-team-card.status-eliminated {
  opacity: 0.42;
  filter: grayscale(0.8);
}

.scoreboard-team-card.status-winner {
  box-shadow: 0 0 0 2px #f5b941, 0 18px 42px rgba(245, 185, 65, 0.22);
}

.scoreboard-team-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.scoreboard-team-top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.scoreboard-stage.projection .scoreboard-team-top strong {
  font-size: clamp(1.25rem, 2vw, 2rem);
}

.scoreboard-team-icon {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.94);
  color: var(--team-color);
  font-weight: 900;
}

.scoreboard-score {
  font-family: "Plus Jakarta Sans", "DM Sans", sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.08em;
  text-align: center;
}

.scoreboard-stage.projection .scoreboard-score {
  font-size: clamp(5rem, 11vw, 9rem);
}

.scoreboard-point-row,
.scoreboard-team-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  justify-content: center;
}

.scoreboard-point-row button,
.scoreboard-team-tools button {
  min-width: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #10213a;
  font-weight: 900;
  padding: 0.32rem 0.48rem;
}

.scoreboard-team-tools button {
  font-size: 0.7rem;
  opacity: 0.9;
}

.scoreboard-trophy {
  margin-left: auto;
  color: #f5b941;
  font-size: 0;
}

.scoreboard-trophy::before {
  content: "Winner";
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scoreboard-history {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scoreboard-history li {
  border-radius: 999px;
  background: #eef3f8;
  color: #536278;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.scoreboard-editor {
  display: grid;
  gap: 0.45rem;
  border-top: 1px solid #e1e7ef;
  padding-top: 0.55rem;
}

.scoreboard-editor-head,
.scoreboard-team-editor {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  align-items: center;
}

.scoreboard-team-editor {
  grid-template-columns: minmax(0, 1fr) 2.4rem 2.5rem repeat(3, auto);
}

.scoreboard-team-editor input {
  min-width: 0;
  border: 1px solid #cbd7e6;
  border-radius: 0.5rem;
  padding: 0.4rem;
  font: inherit;
  font-weight: 700;
}

.scoreboard-race-lane {
  display: grid;
  gap: 0.45rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.65rem;
}

.scoreboard-stage.projection .scoreboard-race-lane {
  gap: 0.8rem;
  padding: 1rem;
}

.scoreboard-race-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 900;
}

.scoreboard-stage.projection .scoreboard-race-label {
  font-size: clamp(1.2rem, 2.2vw, 2rem);
}

.scoreboard-race-track {
  position: relative;
  height: 2.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.scoreboard-stage.projection .scoreboard-race-track {
  height: clamp(3rem, 6vw, 5rem);
}

.scoreboard-race-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--race-progress);
  background: linear-gradient(90deg, var(--team-color), #f5b941);
}

.scoreboard-race-marker {
  position: absolute;
  left: max(0.4rem, calc(var(--race-progress) - 3rem));
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #fff;
  color: #0c2340;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.scoreboard-stage.projection .scoreboard-race-marker {
  font-size: clamp(1rem, 1.8vw, 1.6rem);
  padding: 0.4rem 0.9rem;
}

.scoreboard-class-goal {
  display: grid;
  gap: 0.65rem;
  text-align: center;
  padding: 0.6rem;
}

.scoreboard-stage.projection .scoreboard-class-goal {
  align-content: center;
  min-height: 560px;
  gap: 1.4rem;
}

.scoreboard-class-goal > span {
  color: #f5b941;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scoreboard-class-goal > strong {
  font-size: clamp(1.35rem, 3vw, 3.4rem);
}

.scoreboard-class-meter {
  height: 1.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.scoreboard-stage.projection .scoreboard-class-meter {
  height: 3rem;
}

.scoreboard-class-meter i {
  display: block;
  width: var(--goal-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #36a269, #f5b941);
}

.scoreboard-class-values {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.45rem;
}

.scoreboard-class-values b {
  font-size: clamp(2.5rem, 8vw, 7rem);
  letter-spacing: -0.08em;
}

.scoreboard-class-values em,
.scoreboard-class-values small {
  font-style: normal;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.72);
}

.scoreboard-winner-banner {
  justify-self: center;
  border-radius: 999px;
  background: #f5b941;
  color: #0c2340;
  padding: 0.6rem 1rem;
  font-weight: 900;
}

.main-scoreboard {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  padding: clamp(1rem, 2.5vw, 2rem);
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(43, 113, 216, 0.36), transparent 32rem),
    linear-gradient(145deg, #0c2340, #07172a);
}

.main-scoreboard-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.main-scoreboard-header span {
  color: #f5b941;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.main-scoreboard-header strong {
  font-family: "Plus Jakarta Sans", "DM Sans", sans-serif;
  font-size: clamp(1.5rem, 3vw, 3rem);
}

.main-scoreboard-stage {
  min-height: 0;
  display: grid;
}

.scoreboard-stage.projection {
  min-height: 0;
  display: grid;
  align-content: stretch;
  padding: clamp(1rem, 2vw, 1.6rem);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

@keyframes scoreboard-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.045); }
  100% { transform: scale(1); }
}

.scoreboard-pop {
  animation: scoreboard-pop 320ms ease;
}

@media (max-width: 900px) {
  .scoreboard-options,
  .scoreboard-team-grid,
  .scoreboard-stage.projection .scoreboard-team-grid {
    grid-template-columns: 1fr;
  }

  .scoreboard-team-editor {
    grid-template-columns: 1fr 2.4rem 2.5rem;
  }
}

/* Scoreboard compact pass */
.scoreboard-widget {
  gap: 0.45rem;
}

.scoreboard-control-strip {
  grid-template-columns: minmax(0, 1fr) auto;
}

.scoreboard-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.32rem;
}

.scoreboard-control-strip label,
.scoreboard-options label {
  font-size: 0.5rem;
  gap: 0.16rem;
}

.scoreboard-control-strip select,
.scoreboard-options input,
.scoreboard-options select,
.scoreboard-project,
.scoreboard-footer button,
.scoreboard-editor button {
  min-height: 1.65rem;
  border-radius: 0.45rem;
  padding: 0.24rem 0.42rem;
  font-size: 0.72rem;
}

.scoreboard-stage.compact {
  padding: 0.48rem;
  border-radius: 0.75rem;
}

.scoreboard-stage.compact .scoreboard-team-grid {
  gap: 0.38rem;
}

.scoreboard-stage.compact .scoreboard-team-card {
  gap: 0.24rem;
  padding: 0.42rem;
  border-radius: 0.68rem;
}

.scoreboard-stage.compact .scoreboard-team-top {
  gap: 0.3rem;
}

.scoreboard-stage.compact .scoreboard-team-icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.45rem;
  font-size: 0.82rem;
}

.scoreboard-stage.compact .scoreboard-team-top strong {
  font-size: 0.76rem;
}

.scoreboard-stage.compact .scoreboard-score {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.scoreboard-stage.compact .scoreboard-point-row {
  gap: 0.2rem;
}

.scoreboard-stage.compact .scoreboard-point-row button,
.scoreboard-stage.compact .scoreboard-team-tools button {
  min-width: 1.85rem;
  padding: 0.22rem 0.35rem;
  font-size: 0.68rem;
}

.scoreboard-footer {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.32rem;
}

.scoreboard-history li {
  font-size: 0.64rem;
  padding: 0.18rem 0.42rem;
}

.scoreboard-editor {
  gap: 0.35rem;
  padding-top: 0.4rem;
}

.scoreboard-team-editor {
  grid-template-columns: 1fr 2.65rem 5.2rem;
  align-items: end;
  border: 1px solid #e1e7ef;
  border-radius: 0.65rem;
  padding: 0.4rem;
}

.scoreboard-team-editor label {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.scoreboard-team-editor label span {
  color: #68768a;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scoreboard-team-editor input,
.scoreboard-team-editor select {
  width: 100%;
  min-width: 0;
  min-height: 1.55rem;
  border: 1px solid #cbd7e6;
  border-radius: 0.45rem;
  padding: 0.22rem 0.35rem;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
}

.scoreboard-team-editor input[type="color"] {
  padding: 0.12rem;
}

.scoreboard-team-editor-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
}

.scoreboard-stage.compact .scoreboard-race-lane {
  gap: 0.3rem;
  padding: 0.42rem;
}

.scoreboard-stage.compact .scoreboard-race-label {
  font-size: 0.76rem;
}

.scoreboard-stage.compact .scoreboard-race-track {
  height: 1.55rem;
}

.scoreboard-stage.compact .scoreboard-race-marker {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  font-size: 1rem;
}

.main-scoreboard {
  gap: 0.55rem;
  padding: clamp(0.7rem, 1.7vw, 1.35rem);
}

.main-scoreboard-header {
  min-height: 0;
}

.main-scoreboard-header strong {
  font-size: clamp(1.4rem, 3vw, 2.6rem);
}

.scoreboard-stage.projection.mode-race {
  gap: clamp(0.35rem, 0.8vh, 0.7rem);
  align-content: stretch;
  overflow: hidden;
}

.scoreboard-stage.projection.mode-race .scoreboard-race-lane {
  gap: clamp(0.25rem, 0.65vh, 0.6rem);
  padding: clamp(0.45rem, 0.9vh, 0.8rem);
  min-height: 0;
}

.scoreboard-stage.projection.mode-race .scoreboard-race-label {
  font-size: clamp(1rem, 1.7vw, 1.8rem);
}

.scoreboard-stage.projection.mode-race .scoreboard-race-track {
  height: clamp(2.05rem, 4.8vh, 4rem);
}

.scoreboard-stage.projection.mode-race .scoreboard-race-marker {
  display: grid;
  place-items: center;
  width: clamp(2.4rem, 5vh, 4.2rem);
  height: clamp(2.4rem, 5vh, 4.2rem);
  padding: 0;
  left: max(0.3rem, calc(var(--race-progress) - clamp(1.6rem, 3vh, 2.5rem)));
  font-size: clamp(1.25rem, 2.6vh, 2.2rem);
  border: 3px solid rgba(255, 255, 255, 0.75);
}

.scoreboard-options {
  grid-template-columns: 1.4fr 0.75fr 0.75fr;
  align-items: end;
}

.scoreboard-option-field {
  min-width: 0;
}

.scoreboard-points-field {
  grid-column: span 2;
}

.scoreboard-theme-field {
  grid-column: span 2;
}

.scoreboard-small-number input {
  text-align: center;
}

.scoreboard-options .scoreboard-option-field input,
.scoreboard-options .scoreboard-option-field select {
  width: 100%;
  min-width: 0;
  min-height: 1.55rem;
  height: 1.55rem;
  padding: 0.18rem 0.36rem;
  font-size: 0.7rem;
}

.scoreboard-toggle-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 1.55rem;
  border: 1px solid #cbd7e6;
  border-radius: 0.5rem;
  background: #f8fbff;
  color: #10213a;
  padding: 0.18rem 0.34rem;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.scoreboard-toggle-option input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.scoreboard-mini-switch {
  position: relative;
  width: 1.55rem;
  height: 0.88rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #c9d4e2;
  box-shadow: inset 0 0 0 1px rgba(12, 35, 64, 0.08);
}

.scoreboard-mini-switch::after {
  content: "";
  position: absolute;
  top: 0.12rem;
  left: 0.13rem;
  width: 0.64rem;
  height: 0.64rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(12, 35, 64, 0.22);
  transition: transform 160ms ease;
}

.scoreboard-toggle-option input:checked + .scoreboard-mini-switch {
  background: #2b71d8;
}

.scoreboard-toggle-option input:checked + .scoreboard-mini-switch::after {
  transform: translateX(0.64rem);
}

.scoreboard-toggle-option:has(input:focus-visible) {
  outline: 2px solid rgba(43, 113, 216, 0.35);
  outline-offset: 2px;
}

.scoreboard-team-icon,
.scoreboard-race-marker {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "DM Sans", sans-serif;
}

@media (max-width: 900px) {
  .scoreboard-options,
  .scoreboard-team-editor {
    grid-template-columns: 1fr 1fr;
  }

  .scoreboard-team-editor label:first-child,
  .scoreboard-team-editor-actions {
    grid-column: 1 / -1;
  }
}
