:root {
  --bg: #f1f2f4;
  --surface: #fbfbfa;
  --ink: #1d2229;
  --muted: #747b84;
  --line: #d8dadd;
  --primary: #3d4652;
  --primary-ink: #ffffff;
  --gold: #b7a06a;
  --amber: #9c6b2f;
  --danger: #b42318;
  --green: #16803c;
  --radius: 8px;
  --shadow: 0 16px 34px rgba(24, 28, 34, .08);
  --shadow-soft: 0 8px 22px rgba(24, 28, 34, .06);
}

* {
  box-sizing: border-box;
}

.mobile-only,
.mobile-bottom-nav,
.mobile-save-bar,
.mobile-table-tv {
  display: none;
}

.topnav { display: none; }

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
}

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

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
}

.admin-body {
  background: linear-gradient(180deg, #f8f8f7 0%, var(--bg) 52%, #eaedf0 100%);
}

.topbar {
  min-height: 60px;
  padding: 9px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 250, .94);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(24, 28, 34, .05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand strong {
  display: block;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(145deg, #6f747b 0%, #20262e 72%);
  color: #d8c27d;
  display: inline-grid;
  place-items: center;
  font-family: Consolas, monospace;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 8px 18px rgba(29,34,41,.14);
}

.brand-mark.owner {
  background: linear-gradient(145deg, #777d85 0%, #2b3138 72%);
  color: #f5e3a1;
}

.brand-mark.large {
  width: 54px;
  height: 54px;
  font-size: 28px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.warning-strip {
  padding: 9px 28px;
  background: #fff7ed;
  color: #9a3412;
  border-bottom: 1px solid #fed7aa;
  font-size: 14px;
}

.page-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 20px auto 40px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}

.page-heading.compact {
  align-items: center;
}

.page-heading h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.workspace-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.workspace-context-bar > div { min-width: 0; }

.workspace-context-bar span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.workspace-context-bar h1 {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 22px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heading-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.surface {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.button {
  min-height: 38px;
  border: 1px solid #cfd2d6;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f6 100%);
  color: var(--ink);
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
}

.button:hover {
  border-color: #a9adb4;
  box-shadow: var(--shadow-soft);
}

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

.button.primary {
  border-color: #303844;
  background: linear-gradient(180deg, #56606b 0%, #343d49 100%);
  color: var(--primary-ink);
}

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

.button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.button.ghost {
  background: linear-gradient(180deg, #fbfbfb 0%, #f0f1f3 100%);
  color: #444b55;
}

.button.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 14px;
}

.button.wide,
.wide {
  width: 100%;
}

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

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

.data-table th {
  color: #546273;
  font-weight: 600;
  font-size: 13px;
  background: #f8fafc;
}

.data-table td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

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

.right {
  text-align: right !important;
}

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

.actions form {
  display: inline-flex;
  margin: 0;
}

.pill {
  border-radius: 999px;
  border: 1px solid #cbd5df;
  background: #f8fafc;
  color: #475569;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  font-size: 13px;
}

.pill.green {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.pill.amber {
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--amber);
}

.pill.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--danger);
}

.pill.muted {
  color: #64748b;
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.empty-state h2 {
  color: var(--ink);
  margin: 0;
}

.login-layout {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  width: 100%;
  padding: 16px;
  box-sizing: border-box;
}

.login-panel {
  width: 100%;
  max-width: 380px;
  min-width: 0;
  box-sizing: border-box;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-package-options { display: grid; gap: 8px; margin-top: 18px; }
.login-package-title { color: var(--muted); font-size: 13px; font-weight: 700; }
.login-package-option, .checkout-plan-choice { display: grid; gap: 3px; padding: 11px 12px; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.login-package-option strong, .checkout-plan-choice strong { font-size: 14px; }
.login-package-option small, .checkout-plan-choice small { color: var(--muted); line-height: 1.45; }
.login-package-option:hover, .login-package-option.featured, .checkout-plan-choice.active { border-color: #c68a21; background: #fff8ea; }
.checkout-plan-switch { display: grid; gap: 8px; }
.checkout-layout { max-width: 680px; margin: 48px auto; }
.checkout-card { padding: 30px; }
.checkout-card h1 { margin: 8px 0 12px; }
.checkout-card textarea { width: 100%; resize: vertical; }
.renewal-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 20px 0; padding: 20px; }
.renewal-panel h2 { margin: 0 0 6px; font-size: 20px; }
.renewal-panel p { margin: 0; color: #64748b; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-placeholder, .credential-box, .service-qr-placeholder { border: 1px solid #d6dde8; padding: 18px; margin: 18px 0; border-radius: 6px; }
.huifu-checkout { min-height: 160px; margin: 18px 0; border: 1px solid #d6dde8; border-radius: 6px; overflow: hidden; }
.payment-loading { margin: 0; padding: 18px; color: var(--muted); }
.credential-box { display: grid; grid-template-columns: 100px 1fr; gap: 8px 16px; background: #f8fafc; }
.credential-box small { grid-column: 1 / -1; color: #64748b; }
.service-qr-placeholder { min-height: 150px; display: grid; place-content: center; text-align: center; border-style: dashed; color: #64748b; }
@media (max-width: 760px) { .renewal-panel { align-items: flex-start; flex-direction: column; } .checkout-layout { margin: 20px 12px; } }

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

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

.login-tv-download {
  margin-left: auto;
  flex: 0 0 auto;
}

.stack-form,
.form-grid,
.inline-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.stack-form label,
.form-grid label,
.inline-form label,
.full-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

label span,
.full-field span {
  color: #536171;
  font-size: 13px;
}

input,
select,
textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #cbd5df;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  min-height: 40px;
  padding: 9px 11px;
}

textarea {
  min-height: 320px;
  resize: vertical;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) 17px, calc(100% - 12px) 17px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 118, 110, .18);
  border-color: var(--primary);
}

.password-field {
  display: grid;
  min-width: 0;
  max-width: 100%;
}

.password-field input {
  grid-area: 1 / 1;
  min-width: 0;
  width: 100%;
  padding-right: 64px;
}

.password-toggle {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: end;
  z-index: 1;
  width: 48px;
  min-height: 28px;
  margin-right: 8px;
  border: 1px solid #dbe1e8;
  border-radius: 6px;
  background: #f7f9fb;
  color: #64748b;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
}

.password-toggle:hover {
  border-color: #cbd5df;
  background: #f7f9fb;
  color: #0f172a;
}

.captcha-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 8px;
  align-items: center;
}

.captcha-field img {
  width: 180px;
  height: 52px;
  border: 1px solid #d6dbe1;
  border-radius: 7px;
  background: #f4f6f8;
  cursor: pointer;
}

.form-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 7px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.form-success {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 7px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.settings-grid {
  display: grid;
  gap: 14px;
}

.settings-top-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f4f5;
}

.settings-top-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.settings-top-tabs button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(24, 32, 42, .12);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.account-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-table td {
  min-width: 120px;
}

.field-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stat-card {
  padding: 14px;
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1.18;
}

.stat-card .compact-value {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.status-text {
  display: block;
  margin-top: 6px;
  font-size: 13px;
}

.status-text.green {
  color: var(--green);
}

.status-text.amber {
  color: var(--amber);
}

.status-text.danger {
  color: var(--danger);
}

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

.admin-table td {
  min-width: 120px;
}

.form-section {
  padding: 16px;
}

.form-section h2,
.side-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.tournament-list-surface {
  margin-top: 4px;
}

.batch-timer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
  padding: 14px;
}

.batch-timer-toolbar h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.batch-timer-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.batch-timer-actions,
.tournament-card-head-actions,
.tournament-select {
  display: flex;
  align-items: center;
}

.batch-timer-actions {
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-timer-count {
  color: var(--muted);
  font-size: 13px;
  min-width: 68px;
  white-space: nowrap;
}

.tournament-card-head-actions {
  gap: 8px;
}

.tournament-select {
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.tournament-select input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.tournament-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tournament-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid #d9dde2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(24, 32, 42, .06);
}

.tournament-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}

.tournament-card-head strong {
  display: block;
  font-size: 21px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.tournament-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tournament-card-metrics div {
  min-width: 0;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #dfe3e7;
  border-radius: 8px;
  background: #fcfcfd;
  padding: 12px;
}

.tournament-card-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.tournament-card-metrics strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-card-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  align-content: start;
}

.tournament-card-actions form,
.tournament-card-actions .button {
  width: 100%;
}

.tournament-card-actions .button {
  min-height: 42px;
}

.tournament-card-actions form {
  grid-column: 1;
}

.table-card-countdown strong {
  font-family: Consolas, "SFMono-Regular", monospace;
  letter-spacing: 0;
}

.table-card-status strong {
  overflow: visible;
}

.table-card-status .pill {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-title-row h2 {
  margin: 0;
}

.form-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.form-grid.tight {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.color-field {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.color-swatch {
  padding: 3px;
  min-height: 42px;
  cursor: pointer;
}

.color-hex {
  text-transform: lowercase;
}

.input-invalid {
  border-color: var(--danger) !important;
  background: #fff7f7;
}

.checkline {
  display: flex !important;
  align-items: center;
  gap: 9px;
}

.checkline input {
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.full-field {
  margin-top: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.blind-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 10px;
}

.blind-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.blind-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

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

.blind-table th {
  background: #f8fafc;
  color: #536171;
  font-size: 13px;
  font-weight: 600;
}

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

.blind-table input,
.blind-table select {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
  width: 100%;
}

.blind-table .break-row {
  background: #f8fbff;
}

.blind-actions {
  white-space: nowrap;
}

.blind-level-marker {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 5px;
  background: #f4f6f8;
  color: #334155;
  font-weight: 700;
}

.break-row .blind-level-marker {
  color: var(--amber);
}

.blind-position-select {
  width: 72px !important;
}

.icon-action {
  min-width: 30px;
  height: 30px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  margin-left: 4px;
  color: #334155;
}

.danger-text {
  color: var(--danger);
}

.json-details {
  margin-top: 12px;
}

.json-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.json-details textarea {
  min-height: 160px;
}

.asset-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.asset-preview-row figure {
  margin: 0;
  width: 180px;
}

.asset-preview-row img {
  width: 180px;
  height: 96px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
}

.asset-preview-row figcaption {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr) minmax(280px, .75fr);
  gap: 14px;
  align-items: start;
}

.taskbar-settings-panel {
  grid-column: 1 / -1;
}

.taskbar-settings-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, .45fr)) auto;
  align-items: end;
  gap: 12px;
}

.taskbar-settings-form .checkline {
  min-height: 42px;
  align-self: center;
}

.taskbar-settings-form .muted-line {
  grid-column: 1 / -1;
  margin: 0;
}

.taskbar-settings-form .button {
  min-width: 148px;
}

.display-setting-list {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.display-setting-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 105px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.display-setting-row:last-child { border-bottom: 0; }
.display-setting-row > strong { font-size: 13px; }
.display-setting-content-pair { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 7px; }
.display-setting-content-pair.equal-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.display-time-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.display-time-fields label { position: relative; display: block; }
.display-time-fields input { padding-right: 22px; }
.display-time-fields small { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; pointer-events: none; }
.display-setting-auto {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}
.display-setting-toggle { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.display-setting-toggle input { width: auto; }
.settings-subtitle { margin: 16px 0 10px; font-size: 15px; }
.display-registration-toggle { margin-top: 10px; }
.settings-save-status {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: 6px;
  background: #173f2b;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  white-space: nowrap;
}
.settings-save-status.failed { background: var(--danger); }

.participant-display-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.participant-display-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.participant-display-toggles input { width: auto; }
.participant-player-form { grid-template-columns: minmax(0, 1fr) 88px; }
.participant-player-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.participant-player-input { display: grid; gap: 4px; }
.participant-player-input small { color: var(--muted); font-size: 12px; }
.participant-delta-actions { justify-content: flex-start; margin: 8px 0 14px; }
.participant-delta-actions .button { min-width: 56px; }

.participant-score-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.participant-score-metrics > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
}

.participant-score-metrics span { display: block; color: var(--muted); font-size: 13px; }
.participant-score-metrics strong { display: block; margin-top: 5px; font-size: 22px; }
.participant-chip-actions { grid-template-columns: minmax(0, 1fr) repeat(2, auto); }

@media (max-width: 1050px) {
  .taskbar-settings-form {
    grid-template-columns: minmax(210px, 1fr) repeat(3, minmax(120px, .45fr));
  }

  .taskbar-settings-form .button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .taskbar-settings-form {
    grid-template-columns: 1fr;
  }

  .taskbar-settings-form .button {
    grid-column: auto;
    width: 100%;
  }
}

.timer-console {
  padding: 18px;
  grid-row: auto;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}

.timer-value {
  font-size: clamp(66px, 10vw, 134px);
  line-height: 1;
  margin: 18px 0 12px;
  color: #2f3a46;
  text-align: center;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e6edf3;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #c28a14);
}

.progress-track {
  position: relative;
  overflow: visible;
}

.progress-track > span {
  border-radius: inherit;
  pointer-events: none;
}

input.progress-seek {
  position: absolute;
  z-index: 2;
  inset: -8px 0;
  width: 100%;
  height: 26px;
  min-height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  box-shadow: none;
  cursor: ew-resize;
  touch-action: pan-y;
}

input.progress-seek::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: transparent;
}

input.progress-seek::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -6px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  appearance: none;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(31, 38, 46, .24);
}

input.progress-seek::-moz-range-track {
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

input.progress-seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(31, 38, 46, .24);
}

input.progress-seek:focus-visible {
  outline: 3px solid rgba(173, 34, 44, .18);
  outline-offset: 5px;
}

.console-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.console-stats div,
.metric-pair div {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #f8fafc;
}

.console-stats span,
.metric-pair span,
.muted-line {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.console-stats strong,
.metric-pair strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-row {
  margin: 10px 0 16px;
}

.side-panel {
  padding: 14px;
}

.inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 12px;
}

.inline-form:has(button + button) {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.metric-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.projection-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.projection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.projection-actions form {
  margin: 0;
}

.event-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.event-list li {
  display: grid;
  grid-template-columns: 70px 90px minmax(0, 1fr);
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.event-list span {
  color: var(--ink);
}

.empty-log {
  display: block !important;
}

.projection-body {
  margin: 0;
  background: #030712;
  overflow: hidden;
}

.projection-stage {
  --projection-timer: #00e5ff;
  --projection-font-color: #ffffff;
  --projection-progress: #00e5ff;
  --projection-registration: #007846;
  --projection-font: "Microsoft YaHei";
  width: 100vw;
  height: 100vh;
  color: var(--projection-font-color);
  background-color: #060a1a;
  background-size: cover;
  background-position: center;
  font-family: var(--projection-font), "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  display: grid;
  grid-template-columns: clamp(220px, 15vw, 310px) minmax(0, 1fr) clamp(300px, 18vw, 390px);
  grid-template-rows: 7vh 1fr 4vh;
}

.projection-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: clamp(180px, 15vw, 310px) minmax(0, 1fr) 120px clamp(150px, 10vw, 190px);
  align-items: center;
  border-bottom: 1px solid rgba(115, 165, 220, .35);
  background: rgba(7, 17, 38, .86);
  padding: 0 2vw;
  gap: 18px;
}

.projection-brand strong {
  color: #ffcc38;
  font-family: Consolas, monospace;
  font-size: clamp(22px, 2.1vw, 38px);
}

.projection-brand img {
  max-width: 10vw;
  max-height: 5vh;
}

.projection-top h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(20px, 2.1vw, 40px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.projection-top span {
  border: 1px solid #ffcc38;
  background: #ffcc38;
  color: #071126;
  border-radius: 6px;
  padding: 7px 12px;
  text-align: center;
  font-weight: 800;
}

.projection-top time {
  text-align: right;
  color: var(--projection-font-color);
  font-family: Consolas, monospace;
  font-size: clamp(16px, 1.4vw, 26px);
}

.projection-left,
.projection-right {
  min-width: 0;
  box-sizing: border-box;
  padding: 5vh clamp(16px, 1.2vw, 26px);
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 2.1vh;
  background: rgba(4, 12, 30, .48);
}

.projection-left {
  border-right: 1px dashed rgba(115, 165, 220, .32);
}

.projection-right {
  border-left: 1px dashed rgba(115, 165, 220, .32);
  padding-top: 3vh;
  padding-bottom: 3vh;
  gap: 1.25vh;
}

.projection-left span,
.projection-right span,
.projection-info dt {
  color: var(--projection-font-color);
  font-size: clamp(13px, 1.1vw, 22px);
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.projection-left strong,
.projection-right strong {
  font-family: Consolas, monospace;
  font-size: clamp(30px, 4.2vw, 78px);
  color: var(--projection-font-color);
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
}

.projection-right strong {
  font-size: 42px;
  line-height: 1.05;
}

.projection-right .projection-side-highlight {
  color: #ffd700;
}

.projection-right .projection-side-blue {
  color: #2f91ff;
}

.projection-right .projection-side-green {
  color: #00f5a8;
}

@media (max-width: 1600px) {
  .projection-stage {
    grid-template-columns: 220px minmax(0, 1fr) 300px;
  }

  .projection-right strong {
    font-size: 34px;
  }
}

@media (max-width: 1200px) {
  .projection-stage {
    grid-template-columns: 190px minmax(0, 1fr) 250px;
  }

  .projection-right strong {
    font-size: 28px;
  }
}

.projection-left small {
  color: var(--projection-font-color);
  font-family: Consolas, monospace;
  margin-top: -2vh;
}

.projection-divider {
  width: 75%;
  border-top: 1px solid rgba(115, 165, 220, .34);
}

.projection-center {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 4vh 4vw;
}

.break-label {
  min-height: 7vh;
  font-size: clamp(24px, 3.6vw, 70px);
  color: var(--projection-timer);
  font-weight: 800;
}

.projection-time {
  font-size: clamp(88px, 14vw, 260px);
  line-height: .95;
  color: var(--projection-timer);
  text-shadow: 0 0 24px currentColor;
}

.projection-blinds {
  display: flex;
  gap: 3vw;
  align-items: center;
  justify-content: center;
  margin-top: 4vh;
  font-size: clamp(24px, 3vw, 58px);
}

.projection-blinds span {
  color: var(--projection-font-color);
}

.projection-blinds strong {
  color: var(--projection-font-color);
}

.projection-progress {
  width: min(980px, 86%);
  height: 10px;
  margin-top: 4vh;
  border-radius: 999px;
  background: rgba(117, 151, 190, .24);
  overflow: hidden;
}

.projection-progress span {
  display: block;
  height: 100%;
  background: var(--projection-progress);
}

.registration-badge {
  margin-top: 4vh;
  min-width: 220px;
  text-align: center;
  border: 2px solid var(--projection-registration);
  background: var(--projection-registration);
  border-radius: 7px;
  padding: 11px 24px;
  font-size: clamp(16px, 1.6vw, 30px);
  font-weight: 800;
}

.registration-badge.closed {
  border-color: #475569;
  background: rgba(30, 41, 59, .84);
  color: #94a3b8;
}

.projection-info {
  margin: 4vh 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3vw;
}

.projection-info div {
  min-width: 240px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 18px;
  align-items: baseline;
}

.projection-info dd {
  margin: 0;
  color: var(--projection-font-color);
  font-family: Consolas, monospace;
  font-size: clamp(20px, 2vw, 40px);
}

.projection-bottom {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  background: rgba(7, 17, 38, .92);
  color: var(--projection-font-color);
  font-family: Consolas, monospace;
  font-size: clamp(11px, .9vw, 18px);
  border-top: 1px solid rgba(115, 165, 220, .25);
}

@media (max-width: 900px) {
  .topbar,
  .page-heading,
  .topnav {
    align-items: stretch;
    flex-direction: column;
  }

  .page-shell {
    width: min(100% - 24px, 1280px);
    margin-top: 16px;
  }

  .form-grid,
  .form-grid.tight,
  .control-grid,
  .console-stats,
  .metric-pair {
    grid-template-columns: 1fr;
  }

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

  .account-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .merchant-stats .membership-card {
    grid-column: 1 / -1;
  }

  .timer-console {
    grid-row: auto;
  }

  .data-table {
    min-width: 760px;
  }

  .surface {
    overflow-x: auto;
  }

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

@media (min-width: 681px) and (max-width: 900px) {
  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-grid .timer-console {
    grid-column: 1 / -1;
  }

  .console-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    background: #f6f8fb;
  }

  .topbar {
    position: static;
    padding: 9px 12px;
    gap: 8px;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .brand {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

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

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    font-size: 12px;
  }

  .topnav {
    width: auto;
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
  }

  .topnav .button,
  .topnav form,
  .topnav form .button {
    width: auto;
  }

  .topnav > span {
    grid-column: auto;
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topnav .button {
    min-height: 34px;
    padding: 6px 10px;
  }

  .warning-strip {
    padding: 10px 12px;
    font-size: 13px;
  }

  .page-shell {
    width: 100%;
    margin: 0;
    padding: 10px;
  }

  .page-heading {
    gap: 10px;
    margin-bottom: 10px;
  }

  .page-heading.compact {
    align-items: flex-end;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .page-heading.compact > .button {
    width: auto;
  }

  .page-heading.compact .heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .page-heading.compact .heading-actions .button {
    width: 100%;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .page-heading p {
    font-size: 14px;
  }

  .heading-actions,
  .heading-actions .button {
    width: 100%;
  }

  .surface {
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(20, 32, 45, .06);
    overflow: visible;
  }

  .admin-stat-grid {
    gap: 10px;
  }

  .account-stat-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card strong {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .responsive-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

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

  .responsive-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 0;
    text-align: left !important;
  }

  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
  }

  .responsive-table td.actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .responsive-table td.actions::before {
    content: "";
    display: none;
  }

  .actions .button,
  .button-row .button {
    width: 100%;
  }

  .actions form {
    width: 100%;
  }

  .timer-console,
  .side-panel,
  .form-section,
  .login-panel {
    padding: 12px;
  }

  .tournament-card-grid {
    gap: 10px;
  }

  .tournament-card {
    padding: 10px;
  }

  .tournament-card-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-bottom: 8px;
  }

  .tournament-card-head strong {
    font-size: 15px;
  }

  .batch-timer-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .batch-timer-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .batch-timer-count {
    display: flex;
    align-items: center;
  }

  .tournament-card-head-actions {
    justify-content: space-between;
  }

  .tournament-card-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .tournament-card-metrics div {
    padding: 6px;
  }

  .tournament-card-metrics strong {
    font-size: 13px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tournament-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .tournament-card-actions .button {
    min-height: 32px;
    padding: 5px 6px;
    font-size: 13px;
  }

  .login-panel {
    width: calc(100vw - 56px);
    max-width: calc(100vw - 56px);
  }

  .timer-value {
    font-size: clamp(62px, 19vw, 92px);
    margin: 20px 0 14px;
  }

  .status-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .console-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .button-row .button.primary,
  .button-row .button.amber,
  .button-row .button.danger {
    grid-column: span 2;
  }

  .inline-form,
  .inline-form:has(button + button),
  .projection-link,
  .projection-actions {
    grid-template-columns: 1fr;
  }

  .projection-actions {
    display: grid;
  }

  .projection-actions .button,
  .projection-actions form {
    width: 100%;
  }

  .event-list li {
    grid-template-columns: 1fr;
    gap: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }

  .form-grid,
  .form-grid.tight {
    gap: 12px;
  }

  .settings-grid .form-grid,
  .settings-grid .form-grid.tight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .settings-grid .checkline {
    min-height: 40px;
  }

  .settings-grid input[type="file"] {
    font-size: 12px;
    padding: 7px;
  }

  textarea {
    min-height: 180px;
  }

  .blind-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .blind-table-wrap {
    border: 0;
    overflow: visible;
  }

  .blind-table {
    min-width: 0;
  }

  .blind-table thead {
    display: none;
  }

  .blind-table,
  .blind-table tr,
  .blind-table td {
    display: block;
    width: 100%;
  }

  .blind-table tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .blind-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    margin-bottom: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .blind-table tr::before {
    content: attr(data-level-title);
    display: block;
    font-weight: 800;
    color: var(--ink);
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 6px;
    margin-bottom: 2px;
  }

  .blind-table td {
    display: block;
    padding: 0;
    border-bottom: 0;
  }

  .blind-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 3px;
  }

  .blind-table input,
  .blind-table select {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 13px;
  }

  .blind-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .blind-actions::before {
    grid-column: 1 / -1;
    margin: 0;
  }

  .icon-action {
    min-width: 0;
    width: 100%;
    height: 32px;
  }

  .asset-preview-row figure,
  .asset-preview-row img {
    width: 100%;
  }

  .asset-preview-row img {
    height: 140px;
  }

  .password-field {
    grid-template-columns: 1fr;
  }

  .captcha-field {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .captcha-field img {
    width: 150px;
    height: 44px;
  }

  .captcha-field .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .tournament-card-grid,
  .blind-table tbody {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .projection-stage {
    overflow: auto;
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
  }

  .projection-top,
  .projection-left,
  .projection-center,
  .projection-right,
  .projection-bottom {
    grid-column: 1;
  }

  .projection-top {
    grid-template-columns: 1fr;
    min-height: 150px;
    text-align: center;
  }

  .projection-top time {
    text-align: center;
  }

  .projection-left,
  .projection-right {
    border: 0;
    grid-template-columns: repeat(3, 1fr);
    padding: 18px;
  }

  .projection-right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
  }

  .projection-right strong {
    font-size: 24px;
  }

  .projection-divider,
  .projection-left small {
    display: none;
  }

  .projection-info {
    grid-template-columns: 1fr;
  }
}

.panel-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

.text-link {
  display: inline-block;
  margin-top: 10px;
  color: #2f5d73;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tv-connect-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}

.tv-connect-form.management {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr) auto;
  width: 100%;
  margin: 0;
}

.tv-connect-form label,
.tv-device-edit-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.tv-connect-form label span,
.tv-device-edit-form label span {
  color: var(--muted);
  font-size: 13px;
}

.tv-device-summary {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tv-device-summary li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
  font-size: 14px;
}

.control-tv-device-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.control-tv-device-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.control-tv-device-card .tv-device-card-head h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.control-tv-device-kicker {
  color: var(--muted);
  font-size: 13px;
}

.control-tv-current {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.control-tv-current strong {
  color: var(--text);
}

.control-tv-device-card .tv-device-edit-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  margin: 14px 0 8px;
}

.control-tv-device-card .control-tv-save,
.control-tv-device-card .control-tv-disconnect .button {
  width: 100%;
}

.control-tv-device-card .control-tv-save {
  grid-column: 1 / -1;
}

.control-tv-device-card .control-tv-disconnect {
  grid-column: 1 / -1;
  width: 100%;
}

.tv-connect-panel {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 22px;
  padding: 18px;
}

.tv-connect-panel h2,
.tv-device-card h2 {
  margin: 0;
  font-size: 19px;
}

.tv-connect-panel p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.tv-device-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.tv-device-card {
  padding: 16px;
}

.tv-device-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.tv-device-card .muted-line {
  margin: 12px 0;
}

.tv-device-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
  align-items: end;
  gap: 10px;
  margin: 12px 0 10px;
}

.tv-body {
  margin: 0;
  min-width: 0;
  background: #080b10;
  color: #f4f5f6;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

.tv-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #080b10;
}

.tv-waiting {
  width: min(880px, calc(100vw - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 8vh 0 6vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.tv-brand {
  color: #f4c950;
  font-weight: 800;
  font-size: clamp(26px, 3vw, 48px);
  letter-spacing: 0;
}

.tv-brand span {
  color: #aab2bc;
  font-weight: 500;
}

.tv-kicker {
  margin: 36px 0 10px;
  color: #aab2bc;
  font-size: clamp(16px, 1.6vw, 23px);
}

.tv-waiting h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(32px, 4vw, 64px);
  line-height: 1.18;
  font-weight: 700;
}

.tv-instruction {
  max-width: 720px;
  margin: 20px 0 0;
  color: #c0c6cc;
  font-size: clamp(16px, 1.7vw, 25px);
  line-height: 1.65;
}

.tv-pairing-code {
  display: block;
  margin: 34px 0 12px;
  padding: 20px 32px;
  border: 1px solid #68717c;
  border-radius: 8px;
  background: #141920;
  color: #f4c950;
  font-size: clamp(54px, 10vw, 148px);
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1;
  text-indent: .18em;
}

.tv-expiry,
.tv-url {
  margin: 0;
  color: #9099a4;
  font-size: clamp(14px, 1.3vw, 20px);
}

.tv-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.tv-wide-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
  color: #d6dde4;
  font-size: clamp(14px, 1.25vw, 19px);
  cursor: pointer;
  user-select: none;
}

.tv-wide-toggle input {
  width: 19px;
  height: 19px;
  accent-color: #37d8ff;
}

.tv-refresh,
.tv-fullscreen {
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid #68717c;
  border-radius: 7px;
  background: transparent;
  color: #e3e6e8;
  font: inherit;
  cursor: pointer;
}

.tv-refresh {
  border-color: #37d8ff;
  background: #0b4b70;
  color: #ffffff;
}

.tv-refresh:focus-visible,
.tv-fullscreen:focus-visible {
  outline: 3px solid #f4c950;
  outline-offset: 4px;
}

.tv-url {
  margin-top: 26px;
  font-family: Consolas, monospace;
}

.tv-projection-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #030712;
}

.tv-connected-indicator {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 2;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 6px;
  background: rgba(8, 11, 16, .78);
  color: #f4f5f6;
  font-size: 14px;
  transition: opacity .35s ease;
}

/* The TV receiver always renders the dedicated 16:9 projection canvas. */
.projection-tv-body .projection-stage {
  min-width: 1280px;
  min-height: 720px;
}

@media (max-width: 900px) {
  .tv-connect-panel,
  .tv-connect-form.management,
  .tv-device-edit-form {
    grid-template-columns: 1fr 1fr;
  }

  .tv-connect-panel > div {
    grid-column: 1 / -1;
  }

  .tv-connect-form.management .button,
  .tv-device-edit-form .button {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .topnav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topnav > span {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .topnav form {
    grid-column: 3;
    grid-row: 1;
  }

  .tv-connect-form,
  .tv-connect-form.management,
  .tv-device-edit-form,
  .tv-device-list {
    grid-template-columns: 1fr;
  }

  .tv-connect-form .button,
  .tv-connect-form.management .button,
  .tv-device-edit-form .button {
    grid-column: auto;
  }

  .tv-connect-panel {
    padding: 14px;
  }

  .tv-waiting {
    width: min(100% - 32px, 640px);
    padding: 10vh 0 7vh;
  }

  .tv-kicker {
    margin-top: 26px;
  }

  .tv-pairing-code {
    width: 100%;
    padding: 18px 10px;
    letter-spacing: .1em;
    text-indent: .1em;
  }
}

/* Projection layout: fixed three-zone scoreboard for desktop and TV displays. */
.projection-body {
  margin: 0;
  background: #030712;
  overflow: hidden;
}

.projection-stage {
  --projection-side-width: clamp(250px, 17vw, 340px);
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--projection-side-width) minmax(0, 1fr) var(--projection-side-width);
  grid-template-rows: clamp(72px, 8.5vh, 100px) minmax(0, 1fr);
  color: var(--projection-font-color);
  background-color: #060a1a;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: var(--projection-font), "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

.projection-stage [hidden] {
  display: none !important;
}

.projection-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--projection-side-width) minmax(0, 1fr) var(--projection-side-width);
  align-items: center;
  min-width: 0;
  padding: 0;
  gap: 0;
  border-bottom: 1px solid rgba(143, 188, 229, .4);
  background: rgba(4, 14, 34, .86);
}

.projection-store,
.projection-title,
.projection-top time {
  min-width: 0;
  padding: 0 clamp(18px, 1.6vw, 34px);
}

.projection-store {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 18px);
}

.projection-store img {
  flex: 0 0 auto;
  max-width: clamp(42px, 4.2vw, 78px);
  max-height: clamp(40px, 5.5vh, 62px);
  object-fit: contain;
}

.projection-store strong {
  min-width: 0;
  overflow: hidden;
  color: #ffcf42;
  font-size: clamp(18px, 1.4vw, 27px);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projection-title {
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.projection-title h1 {
  width: 100%;
  margin: 0;
  overflow: hidden;
  font-size: clamp(25px, 2.25vw, 44px);
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projection-title small {
  max-width: 100%;
  overflow: hidden;
  color: var(--projection-font-color);
  font-size: clamp(11px, .9vw, 17px);
  font-weight: 700;
  opacity: .7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projection-top time {
  color: var(--projection-font-color);
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(18px, 1.7vw, 32px);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.projection-left,
.projection-right {
  min-width: 0;
  min-height: 0;
  padding: clamp(8px, 1.2vh, 15px) clamp(16px, 1.25vw, 25px);
  background: rgba(3, 13, 32, .5);
}

.projection-left {
  border-right: 1px solid rgba(143, 188, 229, .34);
}

.projection-right {
  border-left: 1px solid rgba(143, 188, 229, .34);
}

.projection-side-list {
  display: grid;
  grid-auto-flow: row;
  grid-auto-rows: minmax(0, 1fr);
  align-items: stretch;
}

.projection-side-item {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vh, 13px);
  padding: clamp(8px, 1.25vh, 16px) 4px;
  border-bottom: 1px solid rgba(143, 188, 229, .26);
  text-align: center;
}

.projection-side-item:last-child {
  border-bottom: 0;
}

.projection-side-item span {
  width: 100%;
  overflow: hidden;
  color: var(--projection-font-color);
  font-size: clamp(14px, 1.1vw, 21px);
  font-weight: 600;
  line-height: 1.25;
  opacity: .72;
  overflow-wrap: anywhere;
}

.projection-side-item strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--projection-font-color);
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(25px, 2.65vw, 50px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.projection-side-item .projection-side-highlight {
  color: #ffd84d;
}

.projection-side-item .projection-side-green {
  color: #2fe6a1;
}

.projection-side-item .projection-side-blue {
  color: #59adff;
  font-size: clamp(22px, 2.15vw, 40px);
}

.projection-center {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(26px, 4vh) auto auto auto minmax(10px, 1fr) auto;
  align-content: stretch;
  align-items: center;
  justify-items: center;
  padding: clamp(14px, 2vh, 24px) clamp(28px, 4vw, 76px) clamp(16px, 2.5vh, 30px);
}

.break-label {
  min-height: 0;
  color: var(--projection-timer);
  font-size: clamp(20px, 2.2vw, 42px);
  font-weight: 800;
}

.projection-time {
  max-width: 100%;
  color: var(--projection-timer);
  font-size: clamp(108px, 14vw, 268px);
  font-weight: 800;
  line-height: .92;
  text-align: center;
  text-shadow: 0 0 24px color-mix(in srgb, var(--projection-timer) 58%, transparent);
  white-space: nowrap;
}

.projection-blind-pair {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 80px);
  margin-top: clamp(14px, 2.5vh, 30px);
}

.projection-blind-pair > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(10px, 1.2vw, 22px);
  text-align: center;
}

.projection-blind-pair span {
  color: var(--projection-font-color);
  font-size: clamp(16px, 1.55vw, 30px);
  opacity: .72;
  white-space: nowrap;
}

.projection-blind-pair strong {
  min-width: 0;
  overflow: hidden;
  color: var(--projection-font-color);
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(25px, 2.65vw, 50px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projection-progress {
  width: min(100%, 980px);
  height: clamp(7px, .8vh, 10px);
  margin-top: clamp(18px, 3vh, 36px);
  overflow: hidden;
  border-radius: 999px;
  background: rgba(117, 151, 190, .25);
}

.projection-progress span {
  display: block;
  height: 100%;
  background: var(--projection-progress);
  transition: width .3s linear;
}

.projection-center-footer {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, .8fr) minmax(0, 1fr);
  align-items: center;
  align-self: end;
  gap: clamp(14px, 2vw, 34px);
}

.projection-compliance {
  color: #58db9d;
  font-size: clamp(16px, 1.4vw, 27px);
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.registration-badge {
  min-width: 0;
  margin: 0;
  padding: clamp(10px, 1.15vh, 14px) clamp(18px, 2vw, 38px);
  border: 2px solid color-mix(in srgb, var(--projection-registration) 75%, white);
  border-radius: 7px;
  background: var(--projection-registration);
  color: #fff;
  font-size: clamp(17px, 1.5vw, 29px);
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.registration-badge.closed {
  border-color: #64748b;
  background: rgba(30, 41, 59, .9);
  color: #aab6c7;
}

.projection-registration-close {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: clamp(8px, .8vw, 14px);
  text-align: right;
}

.projection-registration-close span {
  color: var(--projection-font-color);
  font-size: clamp(13px, 1vw, 19px);
  opacity: .72;
  white-space: nowrap;
}

.projection-registration-close strong {
  overflow: hidden;
  color: var(--projection-font-color);
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(17px, 1.35vw, 26px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .projection-stage {
    --projection-side-width: clamp(200px, 19vw, 250px);
  }

  .projection-center {
    padding-right: 24px;
    padding-left: 24px;
  }

  .projection-center-footer {
    grid-template-columns: 1fr minmax(160px, .8fr) 1fr;
  }
}

@media (max-width: 760px) {
  .projection-body {
    overflow: auto;
  }

  .projection-stage,
  .projection-tv-body .projection-stage {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .projection-top,
  .projection-left,
  .projection-center,
  .projection-right {
    grid-column: 1;
  }

  .projection-top {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    padding: 14px 16px;
    gap: 10px;
  }

  .projection-store,
  .projection-title,
  .projection-top time {
    padding: 0;
  }

  .projection-title {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .projection-left,
  .projection-right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 0;
    border-bottom: 1px solid rgba(143, 188, 229, .34);
  }

  .projection-side-item {
    min-height: 112px;
    border-right: 1px solid rgba(143, 188, 229, .2);
  }

  .projection-center {
    min-height: 620px;
    grid-template-rows: auto auto auto auto minmax(28px, 1fr) auto;
    padding: 24px 18px;
  }

  .projection-time {
    font-size: clamp(74px, 22vw, 118px);
  }

  .projection-blind-pair {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .projection-center-footer {
    grid-template-columns: 1fr;
  }

  .projection-compliance,
  .projection-registration-close {
    justify-content: center;
    text-align: center;
  }
}

.projection-theme-picker {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.projection-theme-picker legend {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.projection-theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.projection-theme-option {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 7px;
  border: 1px solid #cfd4d8;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.projection-theme-option:has(input:checked) {
  border-color: #737b83;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(115, 123, 131, .16);
}

.projection-theme-option input {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #596168;
}

.projection-theme-option > strong {
  overflow: hidden;
  color: #30363b;
  font-size: 13px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projection-theme-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 5px;
  background: #0c7770;
}

.projection-theme-preview::before,
.projection-theme-preview::after,
.projection-theme-preview i,
.projection-theme-preview b,
.projection-theme-preview em {
  content: "";
  position: absolute;
  display: block;
}

.projection-theme-preview::before {
  inset: 8% 19% 14%;
  border: 1px solid rgba(255, 255, 255, .78);
  clip-path: polygon(7% 0, 93% 0, 100% 9%, 100% 92%, 96% 100%, 4% 100%, 0 92%, 0 9%);
}

.projection-theme-preview::after {
  left: 40%;
  top: 34%;
  width: 20%;
  height: 18%;
  border-top: 4px solid rgba(255, 255, 255, .95);
  border-bottom: 4px solid rgba(255, 255, 255, .95);
}

.projection-theme-preview i,
.projection-theme-preview b {
  top: 8%;
  bottom: 14%;
  width: 18%;
  border: 1px solid rgba(255, 255, 255, .58);
}

.projection-theme-preview i { left: 0; }
.projection-theme-preview b { right: 0; }

.projection-theme-preview em {
  right: 0;
  bottom: 0;
  left: 0;
  height: 11%;
  background: rgba(255, 255, 255, .16);
}

.projection-theme-preview-emerald {
  background: linear-gradient(125deg, #006b66, #0eb6a5 58%, #a6fff0);
}

.projection-theme-preview-silver {
  background: linear-gradient(125deg, #243a4a, #6d899a 58%, #dbe8ed);
}

.projection-theme-preview-midnight {
  background: linear-gradient(125deg, #030916, #0a2343 62%, #b79544);
}

.projection-theme-preview-crimson {
  background: linear-gradient(125deg, #16090b, #632329 62%, #d3a564);
}

.projection-theme-preview-inkwash {
  background: #eee9df url('/static/theme_inkwash.webp') center / cover no-repeat;
}

.projection-theme-preview-inkwash::before,
.projection-theme-preview-inkwash i,
.projection-theme-preview-inkwash b {
  border-color: rgba(40, 36, 31, .62);
}

.projection-theme-preview-inkwash::after {
  border-color: rgba(40, 36, 31, .88);
}

.projection-theme-preview-inkwash em {
  background: rgba(56, 48, 40, .14);
}

.projection-theme-preview-blush {
  background: #f6b3c5 url('/static/theme_blush.webp') center / cover no-repeat;
}

@media (max-width: 760px) {
  .projection-theme-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.wheel-config-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}.wheel-config-panel,.wheel-status-panel{padding:20px}.section-heading{display:flex;justify-content:space-between;gap:16px;align-items:start}.section-heading h2,.wheel-status-panel h2{margin:0 0 6px}.section-heading p,.wheel-status-panel p{color:var(--muted);margin:0 0 14px}.wheel-items{display:grid;gap:8px}.wheel-item-row{display:grid;grid-template-columns:minmax(150px,1.5fr) 110px 90px 100px auto;gap:8px;align-items:center}.wheel-item-head{font-size:12px;color:var(--muted);padding:0 8px}.wheel-edit-form{display:contents}.wheel-item-row input:not([type=checkbox]){width:100%;min-width:0}.wheel-item-row>form:last-child{justify-self:end}.wheel-new-form{display:grid;grid-template-columns:minmax(150px,1.5fr) 110px 90px 100px auto;gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}.check{display:flex;align-items:center;gap:6px;white-space:nowrap;color:var(--muted);font-size:13px}.check input{width:auto}.wheel-winner{font-size:18px!important;color:var(--text)!important;margin:24px 0!important}.wheel-winner strong{color:var(--primary)}.wheel-safety-note{margin-top:24px;padding:12px;background:var(--surface-2);border-radius:8px;color:var(--muted);font-size:13px}.compact-empty{padding:18px}.form-success{padding:10px 14px;margin-bottom:14px;border:1px solid #b4ebca;background:#effcf3;color:#177245;border-radius:8px}@media(max-width:900px){.wheel-config-layout{grid-template-columns:1fr}.wheel-item-head{display:none}.wheel-item-row{grid-template-columns:1fr 1fr 1fr auto;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}.wheel-edit-form{display:contents}.wheel-item-row>form:last-child{grid-column:4}.wheel-new-form{grid-template-columns:1fr 1fr}.wheel-new-form .check{grid-column:1}.wheel-new-form button{grid-column:2}}@media(max-width:540px){.wheel-item-row{grid-template-columns:1fr 1fr}.wheel-item-row>form:last-child{grid-column:2}.wheel-new-form{grid-template-columns:1fr}.wheel-new-form .check,.wheel-new-form button{grid-column:auto}.section-heading{display:block}.section-heading form{margin-top:12px}}
.wheel-editor-shell{max-width:980px;margin:0 auto 28px;display:grid;gap:16px}.wheel-editor-card{padding:20px 22px}.wheel-settings-form{display:grid;grid-template-columns:1.2fr .8fr;gap:14px;align-items:end}.wheel-settings-form label{display:grid;gap:7px}.wheel-settings-form label>span:first-child,.wheel-list-title p,.wheel-batch-card p{color:var(--muted);font-size:13px}.wheel-wide-field{grid-column:1/-1}.wheel-number-field{display:flex!important;align-items:center;gap:8px}.wheel-number-field input{flex:1}.wheel-number-field em{font-style:normal;color:var(--muted)}.wheel-list-title h2,.wheel-batch-card h2{margin:0 0 5px}.wheel-list-title h2 small{font-size:13px;color:var(--muted);font-weight:400}.wheel-list-title p,.wheel-batch-card p{margin:0 0 15px}.wheel-prize-list{display:grid;gap:9px}.wheel-prize-card{background:linear-gradient(100deg,#f8f8fb,#f3f2f8);border:1px solid #e3e2ea;border-radius:16px;padding:12px 14px}.wheel-prize-card.is-disabled{opacity:.58}.wheel-prize-form{display:grid;grid-template-columns:38px minmax(0,1fr) 18px 86px 66px 58px;align-items:center;gap:10px}.wheel-delete-icon{width:30px;height:30px;border:0;border-radius:50%;background:#ff5360;color:white;font-size:26px;line-height:25px;cursor:pointer}.wheel-prize-name,.wheel-weight{border:0!important;background:transparent!important;font-size:16px;font-weight:600}.wheel-weight{text-align:right}.wheel-color-dot{width:18px;height:18px;border-radius:50%;display:block}.dot-0{background:#a9e7d5}.dot-1{background:#82c77d}.dot-2{background:#ff8a00}.dot-3{background:#e53b13}.dot-4{background:#ffd2c5}.dot-5{background:#9bc4f3}.dot-6{background:#c8a5f1}.dot-7{background:#f39bc2}.wheel-enabled{display:flex;align-items:center;gap:5px;white-space:nowrap;color:var(--muted);font-size:12px}.wheel-enabled input{width:auto}.wheel-add-form{display:grid;grid-template-columns:minmax(0,1fr) 90px 55px auto;gap:9px;margin-top:13px;padding-top:14px;border-top:1px solid var(--line)}.wheel-batch-form{display:grid;gap:10px}.wheel-batch-form textarea{min-height:110px}.wheel-start-card{display:flex;align-items:center;gap:18px;justify-content:flex-end;padding:16px 22px;position:sticky;bottom:12px;z-index:3}.wheel-start-card>div{margin-right:auto;display:grid;gap:4px}.eyebrow{font-size:12px;color:var(--muted)}.wheel-status{font-size:16px}.wheel-status.spinning{color:#d97706}.wheel-status.finished{color:#15803d}.wheel-start-button{min-width:150px;background:#f43f5e!important;border-color:#f43f5e!important}@media(max-width:680px){.wheel-page-heading{display:block}.wheel-page-heading .heading-actions{margin-top:12px}.wheel-editor-card{padding:16px 14px}.wheel-settings-form{grid-template-columns:1fr}.wheel-wide-field{grid-column:auto}.wheel-prize-form{grid-template-columns:32px minmax(0,1fr) 18px 60px 42px}.wheel-save-button{grid-column:4/6}.wheel-add-form{grid-template-columns:1fr 76px}.wheel-add-form .wheel-enabled{grid-column:1}.wheel-add-form button{grid-column:2}.wheel-start-card{position:static;display:grid;grid-template-columns:1fr auto;gap:12px}.wheel-start-card form:last-child{grid-column:2}}
.wheel-audio-note{margin:0;color:#64748b;font-size:13px;line-height:1.6;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px}

.trial-credentials{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px;padding:20px 22px;border-left:4px solid var(--gold)}
.trial-credentials h2{margin:0 0 6px;font-size:19px}.trial-credentials p{margin:0;color:var(--muted)}
.trial-credentials pre{margin:14px 0 0;padding:12px 14px;background:#f4f1e9;border:1px solid #e0d6bd;border-radius:6px;color:#30343a;font:13px/1.7 Consolas,"Microsoft YaHei",monospace;white-space:pre-wrap}
@media(max-width:640px){.trial-credentials{display:grid}.trial-credentials .button{width:100%}}

.json-actions{display:flex;align-items:center;gap:10px;margin:10px 0}.json-actions span{font-size:13px}.form-success-inline{color:var(--green)}.form-error-inline{color:var(--danger)}

.tv-install-page{max-width:900px;margin:0 auto;display:grid;gap:18px}.tv-install-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:20px 0 4px}.tv-install-hero h1{margin:4px 0 8px;font-size:30px}.tv-install-hero p:not(.eyebrow){max-width:620px;margin:0;color:var(--muted);line-height:1.7}.tv-apk-download{min-width:170px}.tv-install-steps{padding:8px 28px}.tv-install-steps ol{margin:0;padding:0;list-style:none;counter-reset:install-step}.tv-install-steps li{position:relative;display:grid;grid-template-columns:170px minmax(0,1fr);gap:18px;padding:18px 0 18px 46px;border-bottom:1px solid var(--line);line-height:1.65}.tv-install-steps li:last-child{border-bottom:0}.tv-install-steps li::before{content:counter(install-step);counter-increment:install-step;position:absolute;left:0;top:16px;width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#3d4652;color:#fff;font:700 13px/1 Consolas,monospace}.tv-install-steps strong{font-size:16px}.tv-install-steps span{color:var(--muted)}.tv-install-steps code{padding:1px 4px;border-radius:3px;background:#eef0f2;color:#303844;font:12px Consolas,monospace}.tv-install-note{margin:0;padding:12px 14px;border-left:3px solid var(--gold);background:rgba(255,255,255,.55);color:#5c6470;font-size:14px;line-height:1.65}@media(max-width:680px){.tv-install-hero{display:grid;align-items:start}.tv-apk-download{width:100%}.tv-install-steps{padding:6px 18px}.tv-install-steps li{grid-template-columns:1fr;gap:5px;padding-left:40px}.tv-install-steps li::before{left:0}.tv-install-hero h1{font-size:26px}}

/* Compact merchant workspace for phones. */
.mobile-account-heading { margin-bottom: 12px; }
.account-summary-card { padding: 18px; }
.account-menu { margin-top: 14px; padding: 0 18px; }
.account-menu a, .account-menu-disabled { padding: 10px 0; }
.account-logout { margin-top: 14px; }

@media (max-width: 680px) {
  html, body.admin-body { height: 100%; overflow: hidden; }
  .mobile-only { display: initial; }
  .desktop-only, .topnav, .dashboard-heading p, .merchant-stats, .renewal-panel { display: none !important; }
  .topbar { min-height: 54px; height: 54px; padding: 8px 12px; position: relative; }
  .brand strong { font-size: 16px; }
  .brand small { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-shell { height: calc(100dvh - 118px); padding: 12px 12px 18px; overflow-y: auto; overscroll-behavior: contain; }
  .warning-strip + .page-shell { height: calc(100dvh - 157px); }

  .mobile-bottom-nav {
    position: fixed; z-index: 80; left: 0; right: 0; bottom: 0;
    height: calc(64px + env(safe-area-inset-bottom)); padding: 5px 10px env(safe-area-inset-bottom);
    border-top: 1px solid #d9dde2; background: rgba(255,255,255,.97);
    display: grid; grid-template-columns: repeat(4,1fr); box-shadow: 0 -8px 22px rgba(24,28,34,.08);
  }
  .mobile-bottom-nav a { min-width: 0; display: grid; place-items: center; align-content: center; gap: 2px; color: #747b84; border-radius: 7px; }
  .mobile-bottom-nav a span { font-size: 20px; line-height: 1; }
  .mobile-bottom-nav a small { font-size: 11px; }
  .mobile-bottom-nav a.active { color: #18212c; background: #f0f2f4; font-weight: 700; }

  .dashboard-heading { align-items: center !important; flex-direction: row !important; margin: 0 0 10px; }
  .dashboard-heading h1 { font-size: 21px; margin-top: 2px; }
  .dashboard-heading > .button { width: auto; min-height: 36px; }
  .tournament-list-surface { display: grid; gap: 10px; min-height: 0; }
  .batch-timer-toolbar { margin: 0; padding: 10px; }
  .batch-timer-toolbar > div:first-child p { display: none; }
  .batch-timer-toolbar h2 { font-size: 15px; }
  .batch-timer-actions { grid-template-columns: auto 1fr 1fr 1fr; }
  .batch-timer-actions .button { min-height: 34px; padding: 5px 7px; font-size: 12px; }
  .tournament-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tournament-card { padding: 10px; background: #fff; }
  .tournament-card-metrics { gap: 5px; }
  .tournament-card-metrics div { min-height: 56px; padding: 5px 7px; justify-content: center; align-items: center; text-align: center; }
  .tournament-card-metrics span { font-size: 11px; line-height: 1.15; }
  .tournament-card-metrics strong { margin-top: 2px; font-size: 13px; line-height: 1.2; }
  .tournament-card-metrics .pill { min-height: 24px; padding: 3px 6px; font-size: 11px; }
  .mobile-table-tv { display: none; }
  .tournament-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tournament-card-actions .button { min-height: 34px; padding: 5px 4px; font-size: 12px; }
  .tournament-card-actions form { grid-column: auto; }
  #timerActions .timer-sound-button,
  #timerActions .timer-reset-button { grid-column: span 1; }

  .mobile-save-bar { display: block; position: sticky; bottom: -18px; z-index: 15; margin: 0 -12px -18px; padding: 9px 12px 10px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
  .settings-grid .form-section .form-actions { display: none; }
  .settings-grid .form-grid, .settings-grid .form-grid.tight { grid-template-columns: 1fr 1fr; }
  .settings-top-tabs { position: static; }
  .settings-top-tabs button { min-height: 36px; font-size: 13px; }
  .tournament-display-settings { padding: 10px; }
  .display-setting-row { grid-template-columns: 72px minmax(0, 1fr) 76px; gap: 6px; padding: 7px 6px; }
  .display-setting-row > strong { font-size: 12px; }
  .display-setting-row input:not([type="checkbox"]) { min-height: 34px; padding: 5px 7px; font-size: 13px; }
  .display-setting-content-pair { grid-template-columns: minmax(0, 1fr) 58px; gap: 5px; }
  .display-setting-toggle { gap: 4px; font-size: 11px; }
  .display-setting-toggle input { width: 17px; height: 17px; }
  .settings-subtitle { margin: 12px 0 8px; }
  .compact-parameter-grid { gap: 7px; }
  .participant-score-settings { padding: 10px; }
  .participant-score-settings h2 { margin-bottom: 7px; font-size: 17px; }
  .participant-display-toggles { gap: 5px 12px; margin-bottom: 8px; font-size: 12px; }
  .participant-display-toggles label { gap: 4px; }
  .participant-display-toggles input { width: 16px; height: 16px; }
  .participant-player-form { grid-template-columns: minmax(0, 1fr) 68px; gap: 7px; }
  .participant-player-form label { gap: 4px; }
  .participant-player-inputs { gap: 6px; }
  .participant-player-input small { font-size: 11px; }
  .participant-player-input input { min-height: 34px; padding: 5px 8px; }
  .participant-player-form > .button { min-height: 34px; padding: 5px 8px; align-self: end; }
  .participant-delta-actions { gap: 6px; margin: 6px 0 8px; }
  .participant-delta-actions .button { min-height: 32px; padding: 4px 8px; }
  .participant-score-metrics { gap: 7px; margin-bottom: 8px; }
  .participant-score-metrics > div { padding: 8px 10px; }
  .participant-score-metrics span { font-size: 12px; }
  .participant-score-metrics strong { margin-top: 2px; font-size: 19px; }
  .settings-grid .participant-chip-actions { display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, 58px); gap: 6px; }
  .participant-chip-actions input,
  .participant-chip-actions .button { min-height: 34px; padding: 5px 7px; }
  .participant-chip-actions .button { font-size: 12px; }
  .taskbar-settings-panel,
  .projection-tv-panel,
  .projection-entry-panel { padding: 10px; }
  .taskbar-settings-panel h2,
  .projection-tv-panel > h2,
  .projection-entry-panel > h2 { margin-bottom: 8px; font-size: 17px; }
  .taskbar-settings-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 8px;
  }
  .taskbar-settings-form .checkline { min-height: 32px; }
  .taskbar-settings-form label span { font-size: 12px; }
  .taskbar-settings-form input,
  .taskbar-settings-form select { min-height: 34px; padding: 5px 8px; }
  .taskbar-settings-form .muted-line,
  .taskbar-settings-form .button { grid-column: 1 / -1; }
  .taskbar-settings-form .muted-line { font-size: 11px; line-height: 1.35; }
  .taskbar-settings-form .button { min-height: 34px; padding: 5px 10px; }
  .projection-entry-panel .projection-link {
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 6px;
  }
  .projection-entry-panel .projection-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 6px 0;
  }
  .projection-entry-panel .projection-link input,
  .projection-entry-panel .projection-link .button,
  .projection-entry-panel .projection-actions .button { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
  .projection-entry-panel > .muted-line { margin: 6px 0 0; font-size: 12px; line-height: 1.4; }
  .blind-table-wrap { border: 1px solid var(--line); overflow: hidden; }
  .blind-table { width: 100%; min-width: 0; table-layout: fixed; }
  .blind-table thead { display: table-header-group; }
  .blind-table tbody { display: table-row-group; width: auto; }
  .blind-table tr { display: table-row; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .blind-table tr::before, .blind-table td::before { display: none; }
  .blind-table th, .blind-table td { display: table-cell; width: auto; padding: 4px 2px; overflow: hidden; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .blind-table th { font-size: 10px; line-height: 1.15; text-align: center; white-space: normal; }
  .blind-table th:nth-child(1) { width: 32px; }
  .blind-table th:nth-child(2), .blind-table th:nth-child(3), .blind-table th:nth-child(4) { width: 43px; }
  .blind-table th:nth-child(5) { width: 36px; }
  .blind-table th:nth-child(6) { width: 52px; }
  .blind-table th:nth-child(7) { width: 43px; }
  .blind-table th:nth-child(8) { width: 57px; }
  .blind-table input, .blind-table select { min-height: 28px; padding: 3px 2px; border-radius: 4px; font-size: 12px; }
  .blind-actions { display: table-cell !important; padding: 3px 1px !important; white-space: nowrap; }
  .blind-actions .icon-action { width: 17px; min-width: 17px; height: 28px; margin: 0 1px; padding: 0; border-radius: 4px; font-size: 12px; }
  .blind-position-select { width: 34px !important; min-width: 34px; appearance: auto; background-image: none; padding: 0 1px !important; }
  .blind-level-marker { min-width: 24px; min-height: 28px; font-size: 12px; }

  .control-grid { gap: 10px; }
  .timer-console { padding: 12px; }
  .timer-console .timer-value { font-size: clamp(48px,15vw,68px); margin: 8px 0 7px; }
  .timer-console .progress-track { height: 7px; }
  .timer-console .console-stats { gap: 6px; margin: 8px 0; }
  .timer-console .console-stats div { padding: 7px; }
  .timer-console .console-stats strong { margin-top: 3px; font-size: 18px; }
  .timer-console #timerActions { gap: 6px; }
  .timer-console #timerActions .button { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
  .control-grid .projection-tv-panel { order: 2; }
  .control-grid .projection-entry-panel { order: 3; }
  .control-grid .taskbar-settings-panel { grid-column: auto; order: 3; }
  .projection-tv-panel .tv-connect-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 7px;
  }
  .projection-tv-panel .tv-connect-form .button { grid-column: 1 / -1; min-height: 36px; }
  .projection-tv-panel .tv-connect-form input,
  .projection-tv-panel .tv-device-edit-form select { min-height: 36px; padding: 6px 9px; }
  .projection-tv-panel .control-tv-device-list { margin-top: 8px; }
  .projection-tv-panel .control-tv-device-card { padding: 10px; }
  .projection-tv-panel .control-tv-device-card .tv-device-card-head h2 { font-size: 18px; }
  .projection-tv-panel .control-tv-current { margin-top: 7px; font-size: 12px; line-height: 1.4; }
  .projection-tv-panel .control-tv-device-card .tv-device-edit-form { margin: 8px 0 0; gap: 6px; }
  .projection-tv-panel .control-tv-device-card .button { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }

  .mobile-account-heading { padding: 2px 2px 10px; }
  .mobile-account-heading h1 { margin: 2px 0 4px; font-size: 24px; }
  .mobile-account-heading p { margin: 0; color: var(--muted); }
  .account-summary-card { padding: 14px; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 10px; }
  .account-summary-card > div > span { color: var(--muted); display: block; font-size: 12px; }
  .account-summary-card > div > strong { display: block; margin-top: 4px; font-size: 18px; }
  .account-summary-card dl { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,1fr); margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
  .account-summary-card dl div { text-align: center; }
  .account-summary-card dt { color: var(--muted); font-size: 12px; }
  .account-summary-card dd { margin: 3px 0 0; font-size: 19px; font-weight: 700; }
  .account-menu { margin-top: 10px; padding: 0 14px; }
  .account-menu a, .account-menu-disabled { min-height: 60px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) auto; align-content: center; gap: 2px 10px; }
  .account-menu a:last-child, .account-menu-disabled:last-child { border-bottom: 0; }
  .account-menu span { font-weight: 700; }
  .account-menu small { color: var(--muted); }
  .account-menu b { grid-column: 2; grid-row: 1/span 2; align-self: center; color: var(--muted); font-size: 22px; }
  .account-menu-disabled { opacity: .58; }
  .account-logout { margin-top: 10px; }
}

/* White-red merchant theme. Keep projection theme choices independent. */
:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --soft: #f4f5f7;
  --ink: #202329;
  --text: #202329;
  --muted: #747982;
  --line: #dfe2e6;
  --primary: #ad222c;
  --primary-ink: #ffffff;
  --gold: #ad222c;
  --amber: #bd7620;
  --danger: #ba251f;
  --green: #168253;
  --shadow: 0 12px 30px rgba(31, 38, 46, .09);
  --shadow-soft: 0 7px 18px rgba(31, 38, 46, .09);
}

html,
body,
body.admin-body {
  background: #f3f5f7;
  color: var(--ink);
}

body.admin-body {
  background-image: linear-gradient(180deg, #ffffff 0, #f3f5f7 420px);
}

::selection {
  background: rgba(173, 34, 44, .18);
  color: #64151b;
}

.topbar {
  border-bottom-color: #e3e5e8;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(31, 38, 46, .07);
}

.brand-mark,
.brand-mark.owner {
  border: 1px solid #8f1d25;
  background: #ad222c;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 7px 18px rgba(122, 24, 32, .2);
}

.brand strong,
.page-heading h1,
.workspace-context-bar h1,
.mobile-account-heading h1 {
  color: #202329;
}

.warning-strip {
  border-color: #f0d6ad;
  background: #fff8eb;
  color: #8a5313;
}

.surface,
.login-panel,
.tournament-card,
.control-tv-device-card {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.surface {
  background-image: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
}

.workspace-context-bar {
  border-bottom-color: #dfe2e6;
}

.workspace-context-bar > div::before,
.mobile-account-heading::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  margin-bottom: 6px;
  background: var(--gold);
}

.button {
  border-color: #d3d7dc;
  background: #ffffff;
  color: #2d3137;
  box-shadow: 0 1px 2px rgba(31, 38, 46, .04);
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .12s ease;
}

.button:hover {
  border-color: #ba7a80;
  background: #fff8f8;
  box-shadow: var(--shadow-soft);
}

.button:active {
  transform: translateY(1px);
}

.button.primary,
.button.amber {
  border-color: #ad222c;
  background: #ad222c;
  color: #ffffff;
  font-weight: 700;
}

.button.primary:hover,
.button.amber:hover {
  border-color: #8f1d25;
  background: #971d26;
}

.button.ghost {
  border-color: #d7dade;
  background: #f7f8fa;
  color: #4e535b;
}

.button.danger {
  border-color: #ba251f;
  background: #ba251f;
  color: #ffffff;
}

label span,
.full-field span,
.data-table th,
.blind-table th {
  color: #626872;
}

input,
select,
textarea,
.blind-table input,
.blind-table select {
  border-color: #cfd4da;
  background-color: #ffffff;
  color: #202329;
  box-shadow: inset 0 1px 2px rgba(31, 38, 46, .035);
}

input::placeholder,
textarea::placeholder {
  color: #989da5;
  opacity: 1;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, #9a3a41 50%),
    linear-gradient(135deg, #9a3a41 50%, transparent 50%);
}

input:focus,
select:focus,
textarea:focus {
  outline-color: rgba(173, 34, 44, .14);
  border-color: #ad222c;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--gold);
}

.data-table th,
.blind-table th {
  background: #f4f5f7;
}

.data-table td,
.blind-table td {
  border-bottom-color: var(--line);
}

.blind-table .break-row {
  background: #fff8f8;
}

.blind-level-marker,
.icon-action,
.password-toggle {
  border-color: #d6dade;
  background: #f6f7f8;
  color: #555b64;
}

.pill {
  border-color: #d5d9de;
  background: #f7f8fa;
  color: #59606a;
}

.pill.green {
  border-color: #b9e2cc;
  background: #eef9f3;
  color: #168253;
}

.pill.amber {
  border-color: #edd3aa;
  background: #fff8eb;
  color: #9a5d16;
}

.pill.danger {
  border-color: #efc0bd;
  background: #fff1f0;
  color: #b52620;
}

.pill.muted {
  color: #7c8189;
}

.form-success {
  border-color: #b9e2cc;
  background: #eef9f3;
  color: #166c47;
}

.form-error {
  border-color: #efc0bd;
  background: #fff1f0;
  color: #a8211c;
}

.settings-top-tabs {
  border-color: #daddE2;
  border-radius: 12px;
  background: #eef0f2;
}

.settings-top-tabs button {
  position: relative;
  border-radius: 9px;
  color: #747982;
}

.settings-top-tabs button.active {
  background: #ffffff;
  color: #a51f29;
  box-shadow: 0 2px 8px rgba(31, 38, 46, .1), inset 0 0 0 1px #e2c1c4;
}

.settings-top-tabs button.active::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 3px;
  left: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.tournament-card {
  position: relative;
  overflow: hidden;
}

.tournament-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: #ad222c;
}

.tournament-card-metrics div,
.console-stats div,
.metric-pair div,
.participant-score-metrics > div,
.tv-device-summary li {
  border-color: #e0e3e7;
  background: #f8f9fa;
}

.tournament-card-metrics strong,
.console-stats strong,
.participant-score-metrics strong,
.stat-card strong,
.account-summary-card dd {
  color: #202329;
}

.timer-value {
  color: #ad222c;
  text-shadow: none;
}

.progress-track {
  background: #eceef1;
}

.progress-track span {
  background: #ad222c;
}

.display-setting-list,
.blind-table-wrap {
  border-color: var(--line);
  background: #ffffff;
}

.display-setting-row {
  border-bottom-color: var(--line);
}

.display-setting-auto {
  border-color: #d8dce1;
  background: #f4f5f7;
}

.panel-divider {
  background: #e1e4e7;
}

.text-link {
  color: #a51f29;
}

.account-summary-card {
  border-top: 2px solid #ad222c;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: start;
  gap: 14px 20px;
}

.account-summary-card > div > span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.account-summary-card > div > strong {
  display: block;
  margin-top: 5px;
  color: #202329;
  font-size: 24px;
}

.account-summary-card dl {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.account-summary-card dl div {
  text-align: center;
}

.account-summary-card dt {
  color: var(--muted);
  font-size: 13px;
}

.account-summary-card dd {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 700;
}

.account-menu a {
  transition: color .15s ease, background-color .15s ease;
}

.account-menu a,
.account-menu-disabled {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 3px 14px;
  border-bottom: 1px solid var(--line);
}

.account-menu a:last-child,
.account-menu-disabled:last-child {
  border-bottom: 0;
}

.account-menu span {
  font-weight: 700;
}

.account-menu small {
  color: var(--muted);
}

.account-menu b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #a9343c;
  font-size: 22px;
}

.account-menu a:hover {
  color: #9b1d26;
  background: rgba(173, 34, 44, .045);
}

.account-menu-disabled {
  color: #8c9199;
}

.payment-placeholder,
.credential-box,
.service-qr-placeholder,
.wheel-audio-note {
  border-color: var(--line);
  background: #f7f8fa;
  color: var(--muted);
}

.projection-theme-option {
  border-color: #d9dde2;
  background: #f7f8fa;
}

.projection-theme-option:has(input:checked) {
  border-color: #ad222c;
  background: #fff7f7;
  box-shadow: 0 0 0 2px rgba(173, 34, 44, .12);
}

.projection-theme-option > strong {
  color: #34383e;
}

.mobile-save-bar {
  border-top-color: #e0e3e7;
  background: rgba(255, 255, 255, .97);
}

@media (max-width: 680px) {
  body,
  body.admin-body {
    background: #f3f5f7;
  }

  .page-shell {
    height: calc(100dvh - 132px);
  }

  .warning-strip + .page-shell {
    height: calc(100dvh - 171px);
  }

  .surface {
    box-shadow: 0 8px 20px rgba(31, 38, 46, .08);
  }

  .tournament-card,
  .blind-table tr {
    background: #ffffff;
  }

  .blind-table tr::before {
    border-bottom-color: var(--line);
  }

  .mobile-bottom-nav {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    height: 68px;
    padding: 6px;
    border: 1px solid #e3d3d5;
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 32px rgba(43, 49, 57, .16);
    backdrop-filter: blur(14px);
    overflow: hidden;
  }

  .mobile-bottom-nav a {
    position: relative;
    gap: 3px;
    color: #858a92;
    border: 1px solid transparent;
    border-radius: 13px;
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .12s ease;
  }

  .mobile-bottom-nav a .nav-icon {
    width: 34px;
    height: 34px;
    padding: 7px;
    border: 1px solid transparent;
    border-radius: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
  }

  .mobile-bottom-nav a:active {
    transform: translateY(1px);
  }

  .mobile-bottom-nav a.active {
    border-color: #e6bfc2;
    background: #fff1f2;
    color: #a91f29;
    font-weight: 700;
  }

  .mobile-bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: 3px;
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 0 10px rgba(173, 34, 44, .22);
  }

  .mobile-bottom-nav a.active .nav-icon {
    border-color: #dca8ad;
    background: #f8dfe1;
    color: #a91f29;
    transform: translateY(-1px);
  }

  .mobile-bottom-nav a small {
    line-height: 1;
    letter-spacing: 0;
  }

  .account-menu a,
  .account-menu-disabled {
    border-bottom-color: var(--line);
  }
}
