:root {
  --bg: #0e1220;
  --bg-elev: #171d33;
  --bg-elev-2: #202844;
  --border: #2c3556;
  --text: #e9edf8;
  --text-muted: #8f9ab8;
  --gold: #f2b632;
  --gold-dim: #a8802020;
  --green: #3ddc97;
  --red: #ff6b6b;
  --blue: #5aa9ff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}
input,
textarea,
select {
  font-family: inherit;
}

/* ---------- layout ---------- */

.app-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

.page {
  flex: 1;
  padding: 16px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.page.wide {
  max-width: 1200px;
}

/* centered card layout for onboarding screens */
.center-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(14, 18, 32, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-title .team-chip {
  color: var(--gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- bottom nav ---------- */

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  background: rgba(14, 18, 32, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  padding: 11px 4px 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: color 0.15s;
}

.bottom-nav a.active {
  color: var(--gold);
}
.bottom-nav .nav-icon {
  font-size: 19px;
  line-height: 1;
}

/* ---------- typography ---------- */

h1 {
  font-size: 25px;
  margin: 0 0 6px;
  letter-spacing: -0.4px;
}
h2 {
  font-size: 18px;
  margin: 0 0 10px;
}
h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 22px;
  line-height: 1.5;
}
.muted {
  color: var(--text-muted);
}
.small {
  font-size: 12.5px;
}

.brand-mark {
  font-size: 40px;
  text-align: center;
  margin-bottom: 10px;
}

/* ---------- forms ---------- */

.field {
  margin-bottom: 14px;
}

.label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px; /* >=16px prevents iOS zoom-on-focus */
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--gold);
}
.textarea {
  resize: vertical;
  min-height: 84px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 650;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: #24190a;
  transition:
    filter 0.15s,
    opacity 0.15s;
}

.btn:active {
  filter: brightness(0.9);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.secondary {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn.danger {
  background: var(--red);
  color: #2a0d0d;
}
.btn.success {
  background: var(--green);
  color: #06281a;
}
.btn.auto {
  width: auto;
}
.btn.sm {
  padding: 8px 13px;
  font-size: 13px;
}

.btn-row {
  display: flex;
  gap: 9px;
}
.btn-row .btn {
  flex: 1;
}

/* ---------- cards ---------- */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card.flat {
  background: transparent;
}

/* ---------- task cards ---------- */

.category {
  margin-bottom: 26px;
}

.category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.category-name {
  font-size: 12.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--gold);
}

.category-progress {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.category-description {
  margin: 0 0 16px;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

a.inline-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

a.inline-link:hover {
  color: var(--text);
}

.task-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}

.task-card.is-accepted {
  border-color: #2a5c46;
  background: #14251f;
}
.task-card.is-reviewed {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-dim);
}
.task-card.is-refused {
  border-color: #5c2a2a;
}

.task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
}

.task-title {
  font-weight: 650;
  font-size: 15.5px;
  line-height: 1.3;
}

.task-points {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid #6d551a;
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.task-body {
  padding: 0 15px 15px;
}

.task-prompt {
  font-size: 14.5px;
  line-height: 1.55;
  color: #cdd5e8;
  margin: 0 0 13px;
  white-space: pre-wrap;
}

.task-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  margin-bottom: 13px;
  background: var(--bg-elev-2);
}

/* status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 650;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.2px;
}

.pill.todo {
  background: #232b47;
  color: var(--text-muted);
}
.pill.under_review {
  background: #2a2547;
  color: #b39ddb;
}
.pill.reviewed {
  background: var(--gold);
  color: #24190a;
}
.pill.accepted {
  background: #16382a;
  color: var(--green);
}
.pill.refused {
  background: #3a1e1e;
  color: var(--red);
}

/* upload / answer controls */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 11px;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.upload-zone:active {
  border-color: var(--gold);
  color: var(--gold);
}
.upload-zone .zone-icon {
  font-size: 28px;
}

.preview-wrap {
  position: relative;
  margin-bottom: 11px;
}

.preview-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

.preview-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
}

/* the "you have mail" reveal button */
.reveal-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #f2b632, #e08b1e);
  color: #24190a;
  font-size: 15px;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  animation: pulse-glow 2.2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(242, 182, 50, 0.45);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(242, 182, 50, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-btn {
    animation: none;
  }
}

/* ---------- modal / letter ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 18, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 100;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.letter {
  background: #f6f1e4;
  color: #2b2415;
  border-radius: var(--radius);
  padding: 26px 22px 20px;
  max-width: 460px;
  width: 100%;
  max-height: 84dvh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: letter-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

@keyframes letter-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.letter-seal {
  font-size: 34px;
  text-align: center;
  margin-bottom: 8px;
}

.letter-verdict {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.letter-verdict.accepted {
  color: #1e7a52;
}
.letter-verdict.refused {
  color: #a33;
}

.letter-body {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.68;
  white-space: pre-wrap;
  margin-bottom: 20px;
}

.letter-score {
  text-align: center;
  font-weight: 750;
  font-size: 15px;
  padding: 11px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.letter-score.accepted {
  background: #d8ecdf;
  color: #1e7a52;
}
.letter-score.refused {
  background: #f3dcdc;
  color: #a33;
}

.letter .btn {
  background: #2b2415;
  color: #f6f1e4;
}

/* ---------- leaderboard ---------- */

.lb-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.lb-row.me {
  border-color: var(--gold);
  background: #1e1c2c;
}

.lb-rank {
  font-size: 16px;
  font-weight: 750;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.lb-rank.top {
  color: var(--gold);
  font-size: 20px;
}

.lb-name {
  flex: 1;
  font-weight: 620;
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.lb-points {
  font-weight: 750;
  font-size: 16px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ---------- misc ---------- */

.alert {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 13px;
  line-height: 1.45;
}

.alert.error {
  background: #3a1e1e;
  color: #ffb3b3;
  border: 1px solid #5c2a2a;
}
.alert.info {
  background: #1c2c42;
  color: #a9cdf5;
  border: 1px solid #2f4a6b;
}
.alert.success {
  background: #16382a;
  color: #8fe6bd;
  border: 1px solid #2a5c46;
}

.empty-state {
  text-align: center;
  padding: 46px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.team-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 15px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  margin-bottom: 8px;
  text-align: left;
  transition: border-color 0.15s;
}

.team-option:active {
  border-color: var(--gold);
}
.team-option .to-name {
  font-weight: 650;
  font-size: 15px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.name-badge {
  display: inline-block;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  font-weight: 700;
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0.3px;
}

/* ---------- admin (desktop-first) ---------- */

.admin-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.admin-tab {
  padding: 11px 17px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 620;
  white-space: nowrap;
}

.admin-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 15px;
}

.review-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.review-card-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.review-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--bg-elev-2);
  cursor: zoom-in;
}

.review-answer {
  padding: 20px 16px;
  font-size: 18px;
  font-weight: 620;
  text-align: center;
  background: var(--bg-elev-2);
  word-break: break-word;
}

.review-actions {
  padding: 12px 14px;
  margin-top: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  padding: 9px 11px;
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 11px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.chip {
  display: inline-block;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 12px;
  margin: 0 5px 5px 0;
}

.chip button {
  background: none;
  border: none;
  color: var(--red);
  font-size: 13px;
  padding: 0 0 0 5px;
  line-height: 1;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .row-2 {
    grid-template-columns: 1fr;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

/* ---------- post-competition: archive, replay, adjustments ---------- */

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

.replay-clock {
  font-size: 27px;
  font-weight: 750;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.replay-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.speed-group {
  display: flex;
  gap: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.speed-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  padding: 6px 11px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.speed-btn.active {
  background: var(--gold);
  color: #24190a;
}

.replay-scrub {
  width: 100%;
  margin: 6px 0 12px;
  accent-color: var(--gold);
  cursor: pointer;
}

.replay-event {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.replay-track {
  position: relative;
}

.replay-row {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.55s cubic-bezier(0.34, 1.2, 0.42, 1);
  will-change: transform;
}

.replay-row.bump {
  border-color: var(--gold);
}

.replay-rank {
  width: 26px;
  text-align: center;
  font-weight: 750;
  font-size: 14px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.replay-rank.top {
  color: var(--gold);
}

.replay-name {
  width: 190px;
  font-weight: 620;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-bar-wrap {
  flex: 1;
  min-width: 40px;
}

.replay-bar {
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, #8a6a18, var(--gold));
  transition: width 0.55s cubic-bezier(0.34, 1.2, 0.42, 1);
  min-width: 2px;
}

.replay-points {
  min-width: 66px;
  text-align: right;
  font-weight: 750;
  font-size: 15px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .replay-row,
  .replay-bar {
    transition: none;
  }
}

@media (max-width: 620px) {
  .replay-name {
    width: 110px;
    min-width: 45px;
    flex-shrink: 1;
    font-size: 13px;
  }
  .replay-points {
    min-width: 52px;
    font-size: 14px;
  }
}

/* filters */
.filter-bar {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-bar .select {
  width: auto;
  min-width: 150px;
  padding: 9px 12px;
  font-size: 14px;
}

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

/* adjustments */
.adj-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 860px) {
  .adj-layout {
    grid-template-columns: 1fr;
  }
}

.adj-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.adj-delta {
  font-weight: 750;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  min-width: 54px;
}

.adj-delta.plus {
  color: var(--green);
}
.adj-delta.minus {
  color: var(--red);
}

/* Archive mixes short text answers with tall photos; let each card size to its
   own content instead of stretching to the tallest in the row. */
.review-grid.archive {
  align-items: start;
}
.review-grid.archive .review-actions {
  margin-top: 0;
}

/* Edition design system: navy ink, warm gold, precise orthogonal geometry. */
:root {
  --bg: #0c1220;
  --bg-elev: #141d2f;
  --bg-elev-2: #1b2840;
  --border: #2a3750;
  --text: #f1f3f8;
  --text-muted: #a4b0c6;
  --gold: #edbd61;
  --radius: 18px;
  --radius-sm: 10px;
}
body {
  background-image: radial-gradient(
    ellipse at 80% 0%,
    #27385555,
    transparent 45%
  );
}
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button {
  touch-action: manipulation;
}
a {
  color: var(--gold);
}
fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
fieldset:disabled {
  opacity: 0.65;
}
label.field {
  display: block;
}
input[type="checkbox"] {
  accent-color: var(--gold);
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
input[type="checkbox"][role="switch"] {
  appearance: none;
  width: 44px;
  height: 26px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
}
input[type="checkbox"][role="switch"]::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.15s;
}
input[type="checkbox"][role="switch"]:checked {
  border-color: var(--gold);
  background: var(--gold);
}
input[type="checkbox"][role="switch"]:checked::before {
  transform: translateX(18px);
  background: var(--bg);
}
input[type="checkbox"][role="switch"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
input[type="file"] {
  max-width: 100%;
  font-size: 14px;
  color: var(--text-muted);
}
input[type="file"]::file-selector-button {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elev-2);
  color: var(--text);
  margin-right: 12px;
  cursor: pointer;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 6.5vw, 44px);
  font-weight: 500;
  letter-spacing: -1.1px;
  line-height: 1.12;
  margin-bottom: 12px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.25px;
}
p {
  line-height: 1.65;
}
.subtitle {
  line-height: 1.65;
  color: var(--text-muted);
}
.card {
  border: 1px solid var(--border);
  padding: 22px;
  background: linear-gradient(135deg, #182237, #121b2d);
  box-shadow: none;
}
.btn {
  min-height: 46px;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn.sm {
  min-height: 40px;
}
.btn:disabled {
  cursor: default;
}
.topbar {
  padding-top: calc(14px + env(safe-area-inset-top));
  padding-bottom: 14px;
  background: #0c1220ee;
}
.topbar-sub {
  max-width: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font: 30px Georgia;
  line-height: 1;
}
.welcome-mark {
  width: 66px;
  height: 66px;
  font-size: 55px;
  margin-bottom: 38px;
  transform: rotate(-8deg);
}
.welcome-description {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--gold);
  margin: 8px 0 26px;
}
.center-screen {
  max-width: 500px;
}
.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0 0 12px;
}
.text-link {
  font-size: 13px;
  text-align: center;
  margin-top: 24px;
  text-decoration: none;
}
.edition-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.edition-line .eyebrow,
.edition-line h2 {
  margin: 0;
}
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 7px 11px;
  white-space: nowrap;
}
.status-dot:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: currentColor;
}
.status-dot.live {
  color: #80dfbd;
}
.status-dot.closed,
.status-dot.archived {
  color: var(--gold);
}
.play-intro {
  flex: 0;
  padding-top: 32px;
  padding-bottom: 0;
}
.team-summary {
  padding: 20px 0;
  margin: 20px 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-block: 1px solid var(--border);
  gap: 16px;
}
.team-summary strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.team-summary .label {
  font-size: 9px;
  letter-spacing: 1.8px;
}
.score-number {
  font: 34px var(--serif);
  color: var(--gold);
  text-align: right;
  flex-shrink: 0;
}
.score-number small {
  display: block;
  font: 10px var(--font);
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 4px;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.mode-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  align-items: flex-start;
  gap: 10px;
  padding: 20px 16px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1a2840, #111a2b);
  color: var(--text);
  min-height: 210px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.mode-card.selected,
.mode-card:hover {
  border-color: var(--gold);
  background: linear-gradient(145deg, #2a3040, #172236);
}
.mode-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  margin-top: 8px;
}
.mode-card .small {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.6;
}
.mode-number {
  position: absolute;
  right: 16px;
  top: 18px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #71819e;
}
.mode-symbol {
  color: var(--gold);
  font-size: 28px;
  font-family: Georgia;
}
.mode-arrow {
  position: absolute;
  bottom: 12px;
  right: 14px;
  color: var(--gold);
}
@media (max-width: 480px) {
  .mode-grid:not(.mode-tabs) {
    grid-template-columns: minmax(0, 1fr);
  }
  .mode-grid:not(.mode-tabs) .mode-card {
    min-height: 170px;
  }
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: 0 -12px 35px #080e1c77;
  background: #101829f2;
}
.bottom-nav a {
  min-height: 64px;
  font-size: 11px;
  gap: 5px;
}
.bottom-nav .nav-icon {
  font-size: 18px;
  filter: grayscale(1);
}
.app-shell {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
.task-card {
  background: var(--bg-elev);
  box-shadow: none;
}
.task-photo,
.preview-img,
.review-photo {
  object-fit: contain;
  max-height: 480px;
  background: #0b111d;
}
.task-title {
  overflow-wrap: anywhere;
}
.task-head {
  flex-wrap: wrap;
}
.story-chapter {
  padding: 25px 0;
  border-top: 1px solid var(--border);
}
.story-chapter h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}
.story-body {
  white-space: pre-wrap;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.85;
  margin: 24px 0;
}
.story-image {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  border-radius: var(--radius);
}
.compass-art {
  font: 100px Georgia;
  color: var(--gold);
  opacity: 0.7;
  padding: 15px;
}
.arcade-canvas {
  display: block;
  width: min(100%, 300px);
  height: auto;
  aspect-ratio: 300/440;
  margin: 16px auto;
  touch-action: none;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.arcade-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  touch-action: none;
}
.arcade-controls button {
  flex: 1;
  touch-action: none;
  user-select: none;
  min-height: 56px;
}
.casino-display {
  min-height: 225px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background: radial-gradient(ellipse, #263b43, #0e1828);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.casino-display strong {
  font: 68px var(--serif);
  color: var(--gold);
}
.casino-display .eyebrow {
  margin: 0;
}
.segmented {
  display: flex;
  padding: 4px;
  background: var(--bg);
  border-radius: 10px;
  gap: 4px;
}
.segmented button {
  flex: 1;
  min-height: 42px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--text-muted);
}
.segmented button.active {
  background: var(--bg-elev-2);
  color: var(--gold);
}
.game-card,
.casino-card {
  margin-bottom: 18px;
}
.game-card .pill {
  white-space: nowrap;
  font-size: 10px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0 28px;
}
.section-heading h1 {
  margin: 0;
  font-size: 36px;
}
.section-heading .eyebrow {
  margin-bottom: 10px;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.admin-tab {
  min-height: 42px;
  font-size: 13px;
  padding: 10px 14px;
}
.admin-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid .field {
  min-width: 0;
}
.form-grid p {
  grid-column: 1/-1;
}
.module-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.module-switch:last-child {
  border: 0;
}
.module-switch > span:nth-child(2) {
  flex: 1;
}
.module-switch strong,
.module-switch small {
  display: block;
}
.module-switch small {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.5;
}
.module-switch .mode-symbol {
  width: 28px;
  text-align: center;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  min-height: 44px;
  cursor: pointer;
}
.game-rule {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.confirm-box {
  padding: 16px;
  border: 1px solid #edbd6155;
  background: #edbd6108;
  border-radius: 12px;
  margin-top: 16px;
}
.upload-package {
  margin-top: 22px;
}
.editor-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 90px;
}
.category-button {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elev);
  color: var(--text);
  text-align: left;
}
.category-button.active {
  border-color: var(--gold);
}
.category-button .eyebrow {
  font-size: 9px;
  margin: 0;
}
.category-button small {
  color: var(--text-muted);
}
.task-editor summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 20px;
}
.task-editor {
  margin-bottom: 16px;
}
.chapter-editor {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.story-textarea {
  min-height: 200px;
  line-height: 1.7;
}
.editor-image {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  margin: 10px 0 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.danger-zone {
  margin-top: 25px;
  padding: 16px;
  border-top: 1px solid var(--border);
  color: var(--red);
}
summary {
  cursor: pointer;
  min-height: 36px;
}
.table {
  display: block;
  overflow-x: auto;
}
@media (min-width: 800px) {
  .page:not(.wide) {
    max-width: 760px;
  }
  .play-intro {
    padding-top: 48px;
  }
  .mode-card {
    min-height: 195px;
    padding: 24px;
  }
  .mode-card strong {
    font-size: 28px;
  }
  .mode-card .small {
    font-size: 13px;
  }
  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
  }
  .bottom-nav a {
    min-height: 60px;
  }
  .center-screen {
    padding-top: 65px;
    padding-bottom: 65px;
  }
}
@media (max-width: 700px) {
  .admin-columns,
  .editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .category-list {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  .category-button {
    min-width: 180px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading h1 {
    font-size: 28px;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .card {
    padding: 18px;
  }
  .admin-tabs {
    gap: 4px;
  }
  .admin-tab {
    font-size: 12px;
    padding: 9px 11px;
  }
  .btn-row {
    flex-wrap: wrap;
  }
  .section-heading .btn.auto {
    max-width: 130px;
  }
  .review-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.mode-tabs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 10px;
}
.mode-tabs .mode-card {
  min-height: 48px;
  min-width: max-content;
  flex-direction: row;
  align-items: center;
  padding: 10px 13px;
  gap: 8px;
  border-radius: 10px;
}
.mode-tabs .mode-card strong {
  font: 13px var(--font);
  margin: 0;
}
.mode-tabs .mode-card .mode-symbol {
  font-size: 19px;
}
.mode-tabs .mode-number,
.mode-tabs .small,
.mode-tabs .mode-arrow {
  display: none;
}
.team-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.review-video,
.preview-video {
  display: block;
  width: 100%;
  max-height: 480px;
  background: #080e18;
  border-radius: var(--radius-sm);
  object-fit: contain;
}
.submission-video {
  padding: 12px;
}
.submission-video .text-link {
  display: block;
  margin: 12px 0 4px;
}

/* Reviewer queues and the three-criterion video rubric. */
.review-filters {
  padding: 18px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.review-filter-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.review-filter-heading h2 {
  margin-bottom: 4px;
}
.review-filter-heading p {
  margin: 0 0 14px;
}
.review-filter-heading .btn-row {
  flex-shrink: 0;
}
.review-category-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.review-category-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  min-height: 46px;
}
.review-category-option:has(input:checked) {
  border-color: var(--gold);
  background: #edbd6109;
}
.review-category-option small {
  color: var(--text-muted);
  font-size: 10px;
}
.video-rating-form fieldset {
  margin: 0 0 18px;
}
.video-rating-form legend {
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 9px;
}
.rating-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.rating-scale label {
  position: relative;
  cursor: pointer;
}
.rating-scale input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.rating-scale span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--rating-color);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.rating-scale input:checked + span {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #edbd6140;
}
.rating-scale input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.rating-scale input:disabled + span {
  opacity: 0.55;
  cursor: default;
}
.rating-preview {
  padding: 13px 10px;
  margin: 4px 0 16px;
  border-radius: 9px;
  background: var(--bg);
  font-size: 13px;
  color: var(--text-muted);
}
.rating-preview strong {
  color: var(--gold);
}
.rating-rounding {
  margin: 10px 0 0;
  font-size: 11px;
}
.video-rating-summary {
  padding: 16px;
  border-block: 1px solid var(--border);
}
.video-rating-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
}
.video-rating-breakdown > span {
  font-size: 11px;
  color: var(--text-muted);
}
.video-rating-breakdown strong {
  display: block;
  font-size: 22px;
  color: var(--gold);
  margin-top: 7px;
}
.video-rating-breakdown small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}
.video-rating-total {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}
@media (max-width: 500px) {
  .review-filter-heading {
    flex-direction: column;
    gap: 0;
    margin-bottom: 12px;
  }
  .review-category-options {
    flex-direction: column;
  }
  .review-category-option small {
    margin-left: auto;
  }
}

/* Ortoguesser */
.orto-page {
  max-width: 900px;
}
.orto-stats {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.orto-stats span {
  display: grid;
  gap: 5px;
  font-size: 0.85rem;
}
.orto-stats strong {
  font-size: 1.1rem;
}
.orto-question-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.orto-question-head .eyebrow {
  margin: 0;
}
.orto-progress {
  width: 100%;
  height: 6px;
  margin: 16px 0;
  accent-color: var(--gold, #d7b56d);
}
.orto-portrait {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(220px, 42vh, 420px);
  object-fit: contain;
  border-radius: 12px;
  margin: 16px auto 20px;
  box-shadow: 0 10px 30px #0000004d;
}
.orto-options {
  display: grid;
  gap: 8px;
}
.orto-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff06;
  text-align: left;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition:
    border-color 0.15s,
    background-color 0.15s,
    opacity 0.2s;
}
.orto-option:hover:not(:disabled) {
  border-color: #f2b63280;
  background: #f2b6320d;
}
.orto-option:hover:not(:disabled) .orto-key {
  border-color: var(--gold);
  color: var(--gold);
}
.orto-option:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.orto-option:disabled {
  cursor: default;
}
.orto-option:disabled:not(.correct):not(.wrong) {
  opacity: 0.45;
}
.orto-key {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.orto-option-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.orto-option-text strong {
  font-weight: 600;
}
.orto-option-text small {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.orto-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.orto-option.correct {
  border-color: var(--green);
  background: #3ddc9714;
}
.orto-option.correct .orto-key {
  border-color: var(--green);
  background: var(--green);
  color: var(--bg);
}
.orto-option.correct .orto-tag {
  color: var(--green);
}
.orto-option.wrong {
  border-color: var(--red);
  background: #ff6b6b14;
}
.orto-option.wrong .orto-key {
  border-color: var(--red);
  background: var(--red);
  color: var(--bg);
}
.orto-option.wrong .orto-tag {
  color: var(--red);
}
.orto-feedback {
  margin-top: 20px;
}
.orto-result {
  font-size: 2.5rem;
  color: var(--gold, #d7b56d);
}
.orto-result small {
  font-size: 1rem;
}
.orto-import-list {
  max-height: 180px;
  overflow: auto;
  padding-left: 20px;
  overflow-wrap: anywhere;
}
.orto-student-list {
  max-height: 440px;
  overflow: auto;
}
.orto-student {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #ffffff18;
  padding: 12px 0;
}
.orto-student img {
  width: 48px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
}
.orto-student > span {
  flex: 1;
  min-width: 100px;
  overflow-wrap: anywhere;
}
.orto-student small {
  display: block;
}
.orto-student .confirm-box {
  flex-basis: 100%;
}
.orto-gender {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.orto-gender button {
  width: 34px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.orto-gender button + button {
  border-left: 1px solid var(--border);
}
.orto-gender button.active {
  background: var(--gold);
  color: var(--bg);
}
.orto-gender button:disabled {
  cursor: default;
}
.orto-catalog input[type="file"] {
  max-width: 100%;
}
.orto-quiz {
  scroll-margin-top: 80px;
}
.orto-feedback {
  scroll-margin-bottom: calc(100px + env(safe-area-inset-bottom));
}

/* Phones: photo and all four answers fit on one screen above the bottom nav. */
@media (max-width: 540px) {
  .orto-quiz {
    padding: 14px;
  }
  .orto-question-head {
    align-items: start;
    font-size: 0.8rem;
  }
  .orto-progress {
    margin: 10px 0 0;
  }
  .orto-prompt {
    display: none;
  }
  .orto-portrait {
    /* The answers take ~475px with the top bar and nav; the photo gets the rest. */
    height: 220px;
    height: clamp(120px, calc(100svh - 475px), 340px);
    margin: 12px auto;
  }
  .orto-options {
    gap: 6px;
  }
  .orto-option {
    padding: 7px 12px;
    gap: 11px;
  }
  .orto-key {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }
  .orto-option-text strong,
  .orto-option-text small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .orto-option-text strong {
    font-size: 0.95rem;
  }
  .orto-option-text small {
    font-size: 0.78rem;
  }
  .orto-tag {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .orto-feedback {
    margin-top: 12px;
  }
  .orto-feedback p {
    margin: 0 0 10px;
  }
}

.hunt-switcher {
  margin-bottom: 24px;
}
.hunt-selector-row {
  display: flex;
  align-items: end;
  gap: 16px;
}
.hunt-selector-row .field {
  flex: 1;
  margin-bottom: 0;
  min-width: 0;
}
.hunt-selector-row .btn {
  flex-shrink: 0;
}
.new-hunt-form {
  border-top: 1px solid #ffffff20;
  padding-top: 16px;
  margin-top: 20px;
}
.hunt-switcher .select {
  width: 100%;
  text-overflow: ellipsis;
}
@media (max-width: 540px) {
  .hunt-selector-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.orto-timer {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid #d5b36580;
  border-radius: 10px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.orto-timer.urgent {
  color: #ffb8b8;
  border-color: #ed7a7a;
  background: #64253150;
}

/* OrthoGambler */
.gambler-page {
  max-width: 900px;
}
.gambler-hero {
  background: radial-gradient(ellipse at top right, #f2b63218, transparent 65%),
    var(--bg-elev);
  border-color: #f2b63250;
}
.gambler-hero > p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  max-width: 600px;
}
.gambler-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gambler-section-head .eyebrow {
  margin: 0 0 7px;
}
.gambler-section-head h2 {
  margin-bottom: 0;
}
.gambler-tag {
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.gambler-tag.is-live {
  color: var(--green);
  border-color: #3ddc9745;
  background: #3ddc970b;
}
.gambler-phases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  padding: 0;
  margin: 24px 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.gambler-phases li {
  display: grid;
  gap: 7px;
  padding: 12px;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}
.gambler-phases li:last-child {
  border-right: 0;
}
.gambler-phases li > span {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.7px;
}
.gambler-phases strong {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}
.gambler-phases strong small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 450;
}
.gambler-phases .current {
  color: var(--gold);
  background: #f2b63214;
  box-shadow: inset 0 -3px var(--gold);
}
.gambler-phases .complete > span::before {
  content: "✓ ";
}
.gambler-clock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gambler-clock-row > div:first-child {
  display: grid;
  gap: 6px;
}
.gambler-clock-row strong {
  font-size: 14px;
}
.gambler-clock {
  display: grid;
  gap: 4px;
  flex-shrink: 0;
  text-align: right;
}
.gambler-clock > span {
  color: var(--gold);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.gambler-clock small {
  color: var(--text-muted);
  font-size: 10px;
}
.gambler-end-message {
  display: grid;
  gap: 7px;
  padding-top: 6px;
  line-height: 1.5;
}
.gambler-budget {
  color: var(--gold);
  font-size: 27px;
  font-weight: 750;
}
.gambler-budget small {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}
.gambler-budget-dots {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin: 20px 0 12px;
}
.gambler-budget-dots span {
  height: 5px;
  border-radius: 3px;
  background: var(--gold);
}
.gambler-budget-dots .spent {
  background: var(--border);
}
.gambler-voting form {
  margin-top: 22px;
}
.gambler-voting fieldset {
  min-width: 0;
}
.gambler-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gambler-option,
.gambler-total {
  --option-color: #ff9cae;
}
.gambler-option.option-1,
.gambler-total.option-1 {
  --option-color: #8dbfff;
}
.gambler-option.option-2,
.gambler-total.option-2 {
  --option-color: #f2ce6e;
}
.gambler-option.option-3,
.gambler-total.option-3 {
  --option-color: #76ddb3;
}
.gambler-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 80px;
  padding: 15px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.gambler-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.gambler-option strong {
  flex: 1;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.gambler-option-symbol {
  color: var(--option-color);
  font-size: 23px;
  flex-shrink: 0;
}
.gambler-option.selected {
  border-color: var(--option-color);
  background: var(--bg-elev-2);
}
.gambler-option:focus-within {
  outline: 2px solid var(--option-color);
  outline-offset: 3px;
}
.gambler-check {
  color: var(--text-muted);
  font-size: 18px;
}
.gambler-option.selected .gambler-check {
  color: var(--option-color);
}
fieldset:disabled .gambler-option {
  opacity: 0.6;
  cursor: default;
}
.gambler-submit-row {
  display: grid;
  grid-template-columns: 125px 1fr;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}
.gambler-submit-row .field {
  margin: 0;
}
.gambler-submit-row .btn {
  min-height: 47px;
}
.gambler-vote-preview {
  line-height: 1.6;
  margin-bottom: 0;
}
.gambler-locked {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 22px 12px;
}
.gambler-locked > span:first-child {
  color: var(--gold);
  font-size: 36px;
}
.gambler-snapshot-tabs,
.gambler-view-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.gambler-snapshot-tabs button,
.gambler-view-tabs button {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}
.gambler-snapshot-tabs button.active,
.gambler-view-tabs button.active {
  color: var(--gold);
  border-color: #f2b63275;
  background: #f2b6320c;
}
.gambler-snapshot-tabs small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 400;
}
.gambler-totals {
  display: grid;
  gap: 17px;
  margin: 22px 0;
}
.gambler-total > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.gambler-total-label {
  overflow-wrap: anywhere;
}
.gambler-total-label > span {
  color: var(--option-color);
  margin-right: 6px;
}
.gambler-total strong {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.gambler-total strong small {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 400;
}
.gambler-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg);
}
.gambler-bar span {
  display: block;
  height: 100%;
  background: var(--option-color);
  border-radius: 3px;
  transition: width 0.3s;
}
.gambler-winner {
  display: inline-block;
  color: var(--green);
  margin-left: 8px;
  font-size: 10px;
}
.gambler-snapshot-caption {
  font-size: 11px;
  margin-bottom: 0;
}
.gambler-vote-list {
  margin-top: 12px;
}
.gambler-vote {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.gambler-vote:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.gambler-vote > div {
  display: grid;
  gap: 5px;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.gambler-vote-quantity {
  color: var(--gold);
  font-size: 23px;
  min-width: 35px;
}
.gambler-vote-value {
  font-size: 18px;
  font-weight: 650;
  text-align: right;
}
.gambler-vote-value small {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 400;
}
.gambler-rules summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.gambler-rules .gambler-instructions-text {
  margin-top: 12px;
}
.gambler-rules p,
.gambler-settings > p {
  line-height: 1.7;
}
.gambler-settings .field {
  display: block;
}
.gambler-settings .field > .small {
  display: block;
  margin-top: 7px;
  line-height: 1.55;
}
.gambler-admin-timing {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}
.gambler-admin-timing strong {
  color: var(--text);
  margin-left: 6px;
}
.gambler-view-tabs {
  margin: 0;
}
.gambler-table-scroll {
  width: 100%;
  overflow-x: auto;
}
.gambler-table-scroll .table th {
  white-space: nowrap;
}
.gambler-table-sub {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 5px;
}
.gambler-points {
  color: var(--gold);
  font-weight: 650;
}
.gambler-nowrap {
  white-space: nowrap;
}
.gambler-team-filter {
  max-width: 220px;
}
.gambler-team-filter .select {
  font-size: 13px;
  padding: 9px 12px;
}
.gambler-monitor .section-heading {
  gap: 16px;
}
.gambler-monitor .card {
  margin-top: 18px;
}
.gambler-instructions {
  margin-top: 24px;
  width: 100%;
  text-align: left;
}
.gambler-instructions-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
  font-size: 14px;
  color: var(--text-muted);
}
.gambler-timer-controls fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.gambler-timer-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}
.gambler-timer-form .field {
  display: block;
  margin: 0;
}
.gambler-timer-form .btn {
  min-height: 47px;
}
.gambler-timer-controls .small {
  line-height: 1.6;
}
.gambler-timer-controls details {
  margin-top: 16px;
}
@media (max-width: 540px) {
  .gambler-timer-form {
    grid-template-columns: 1fr 1fr;
  }
  .gambler-timer-form .field {
    grid-column: 1 / -1;
  }
  .gambler-section-head {
    align-items: start;
    gap: 12px;
  }
  .gambler-section-head .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .gambler-tag {
    padding: 5px 7px;
    font-size: 10px;
  }
  .gambler-clock-row strong {
    font-size: 12px;
    line-height: 1.5;
  }
  .gambler-clock > span {
    font-size: 26px;
  }
  .gambler-phases li {
    padding: 10px 8px;
  }
  .gambler-phases strong {
    font-size: 20px;
  }
  .gambler-options {
    gap: 8px;
  }
  .gambler-option {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
  }
  .gambler-option-symbol {
    font-size: 18px;
  }
  .gambler-option strong {
    order: 3;
    flex-basis: 100%;
    font-size: 12px;
  }
  .gambler-check {
    margin-left: auto;
    font-size: 15px;
  }
  .gambler-submit-row {
    grid-template-columns: 110px 1fr;
  }
  .gambler-vote-quantity {
    min-width: 25px;
    font-size: 20px;
  }
  .gambler-vote {
    gap: 8px;
  }
  .gambler-vote-value small {
    max-width: 80px;
    line-height: 1.5;
  }
  .gambler-monitor .gambler-section-head {
    flex-wrap: wrap;
  }
  .gambler-live-card .gambler-section-head {
    flex-wrap: nowrap;
  }
}

.demo-banner {
  margin: 0;
  border-radius: 0;
  text-align: center;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 30;
}
