:root {
  --cyan: #18d8ff;
  --pink: #ff4ed8;
  --lime: #9eff36;
  --yellow: #ffd84d;
  --ink: #f7fbff;
  --muted: rgba(221, 249, 255, 0.64);
  --panel: rgba(5, 17, 32, 0.86);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(24, 216, 255, 0.18), transparent 28%),
    radial-gradient(circle at 94% 14%, rgba(255, 78, 216, 0.12), transparent 24%),
    linear-gradient(135deg, #050a11, #0a1420 48%, #06100f);
}

.mobile-dock {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.console-shell {
  width: min(1220px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

header,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

header > div,
.panel-title > div,
.layout > *,
.stack > * {
  min-width: 0;
}

header {
  margin-bottom: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.history-button {
  padding: 8px 12px;
  border: 1px solid rgba(158, 255, 54, 0.4);
  color: var(--lime);
  background: rgba(158, 255, 54, 0.08);
  font-size: 10px;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
}

header p,
.panel-title span {
  margin: 0 0 4px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.14em;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 6vw, 64px);
  line-height: 0.96;
}

h2 {
  font-size: 18px;
}

.status,
.panel-title strong {
  padding: 8px 10px;
  border: 1px solid rgba(24, 216, 255, 0.34);
  color: var(--cyan);
  background: rgba(24, 216, 255, 0.07);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.status.is-live {
  border-color: rgba(158, 255, 54, 0.48);
  color: #07110d;
  background: var(--lime);
}

.panel-title strong.is-private {
  border-color: rgba(158, 255, 54, 0.48);
  color: #07110d;
  background: var(--lime);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.summary-grid article,
.panel,
.preview-panel {
  border: 1px solid rgba(24, 216, 255, 0.25);
  background:
    linear-gradient(135deg, rgba(24, 216, 255, 0.08), transparent 54%),
    var(--panel);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.25),
    inset 0 0 24px rgba(24, 216, 255, 0.05);
}

.summary-grid article {
  padding: 14px;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.13em;
}

.summary-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  font-size: clamp(19px, 3vw, 30px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 17px;
}

.panel-title {
  margin-bottom: 14px;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

button,
.copy-grid a {
  min-height: 46px;
  border: 1px solid rgba(24, 216, 255, 0.32);
  color: var(--ink);
  background: rgba(24, 216, 255, 0.08);
  cursor: pointer;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

button:hover,
button:focus-visible,
.copy-grid a:hover,
.copy-grid a:focus-visible {
  border-color: var(--cyan);
  background: rgba(24, 216, 255, 0.16);
  outline: none;
}

button.primary {
  border: 0;
  color: #071014;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
}

button.danger {
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(255, 107, 107, 0.13);
}

form,
label {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

input,
select {
  height: 44px;
}

textarea {
  min-height: 150px;
  padding-block: 11px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(24, 216, 255, 0.12);
}

.order-actions {
  margin-top: 4px;
}

.secret-actions {
  margin-top: 10px;
}

.private-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(24, 216, 255, 0.2);
}

.private-links[hidden] {
  display: none;
}

.eventsub-migration-warning {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--yellow);
  color: var(--muted);
  background: rgba(255, 159, 28, 0.08);
  overflow-wrap: anywhere;
}

.wheel-control-panel[hidden] {
  display: none;
}

.wheel-integrations-panel[hidden] {
  display: none;
}

.wheel-integration-list {
  display: grid;
  gap: 10px;
}

.wheel-integration-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.wheel-integration-row.is-connected {
  border-color: rgba(158, 255, 54, 0.38);
  background: rgba(158, 255, 54, 0.06);
}

.wheel-integration-row.needs-reconnect {
  border-color: rgba(255, 159, 28, 0.55);
  background: rgba(255, 159, 28, 0.07);
}

.wheel-integration-details {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.wheel-integration-details > strong {
  color: var(--ink);
  font-size: 15px;
}

.wheel-integration-details > span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wheel-integration-row.is-connected .wheel-integration-details > span {
  color: var(--lime);
}

.wheel-integration-details small {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.wheel-integration-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.wheel-integration-actions button {
  min-width: 0;
  min-height: 44px;
  padding-inline: 8px;
  white-space: normal;
}

.wheel-integrations-panel > p {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.overlay-control-panel[hidden] {
  display: none;
}

.camera-control-panel[hidden] {
  display: none;
}

.live-media-panel[hidden],
.discord-controls-disclosure[hidden] {
  display: none;
}

.live-media-panel {
  margin-bottom: 16px;
}

.main-camera-control {
  display: grid;
  gap: 10px;
}

.main-camera-control > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.discord-controls-disclosure {
  margin-top: 16px;
  border: 1px solid rgba(24, 216, 255, 0.24);
  background: var(--panel);
}

.discord-controls-disclosure > summary {
  padding: 16px 17px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.discord-controls-disclosure > summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

.discord-controls-content {
  display: grid;
  gap: 16px;
  padding: 0 12px 12px;
}

.camera-control-list {
  display: grid;
  gap: 8px;
}
.refresh-console { min-height: 36px; padding: 8px 12px; font-size: 11px; }

.camera-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 107, 107, 0.28);
  background: rgba(255, 107, 107, 0.05);
}

.camera-control-row.is-online {
  border-color: rgba(158, 255, 54, 0.38);
  background: rgba(158, 255, 54, 0.06);
}

.camera-control-row > div:first-child {
  display: grid;
  gap: 2px;
}

.camera-control-row strong {
  color: var(--ink);
  font-size: 13px;
}

.camera-control-row span,
.camera-control-row small {
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.camera-state {
  justify-self: end;
  color: #ff9898 !important;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.camera-control-row.is-online .camera-state {
  color: var(--lime) !important;
}

.camera-control-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.camera-control-actions button {
  min-height: 42px;
}

.camera-all-offline {
  width: 100%;
  margin-top: 10px;
}

.camera-audio-control {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(35, 217, 255, 0.28);
}

.camera-audio-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.camera-audio-heading > div {
  display: grid;
  gap: 2px;
}

.camera-audio-heading span {
  color: var(--lime);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.camera-audio-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.camera-audio-heading strong {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: right;
}

.camera-audio-heading strong.is-private {
  color: var(--lime);
}

.camera-audio-heading > .camera-control-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.camera-control-heading-actions .privacy-toggle { min-height: 32px; min-width: 48px; padding: 5px 9px; font-size: 11px; }
.privacy-toggle small { display: block; margin-top: 3px; font-size: 9px; font-weight: 600; }
.privacy-toggle[aria-pressed="true"] { color: var(--lime); border-color: var(--lime); background: rgba(158, 255, 54, 0.12); }
.privacy-toggle.privacy-mute[aria-pressed="true"] { color: #ff8b8b; border-color: #ff8b8b; background: rgba(255, 107, 107, 0.12); }
.privacy-toggle.is-requested { border-style: dashed; }
.privacy-control-feedback { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.voice-control-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.voice-control-toolbar > p { margin: 0; color: var(--muted); font-size: 11px; }
.voice-control-actions { display: flex; gap: 6px; }
.voice-control-actions button { min-height: 32px; padding: 6px 12px; font-size: 11px; }
.voice-control-actions button.is-selected { color: var(--lime); border-color: var(--lime); background: rgba(158, 255, 54, 0.08); }
.voice-control .voice-last-command { font-size: 10px; overflow-wrap: anywhere; }
.camera-audio-heading strong.is-processing { color: var(--yellow); }
.voice-command-help summary { color: var(--cyan); cursor: pointer; font-size: 11px; font-weight: 700; }
.voice-command-help p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.voice-command-help ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 0; margin: 10px 0 0; list-style: none; color: var(--ink); font-size: 11px; }

.camera-audio-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.camera-audio-actions button {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 46px;
  padding-inline: 8px;
  white-space: normal;
}

.camera-audio-actions small {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.8;
}

.camera-audio-actions button.is-requested {
  border-color: var(--cyan);
}

.camera-audio-actions button.is-selected {
  border-color: var(--lime);
  color: #07110d;
  background: var(--lime);
}

.camera-audio-control > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.camera-control-panel > p {
  margin-bottom: 0;
}

.overlay-vehicle-segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.overlay-vehicle-segments button {
  min-width: 0;
  min-height: 48px;
  padding: 8px 6px;
  white-space: normal;
}

.overlay-vehicle-segments button.is-selected {
  border-color: var(--lime);
  color: #07110d;
  background: var(--lime);
}

.overlay-hud-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(24, 216, 255, 0.28);
  background: rgba(24, 216, 255, 0.05);
}

.overlay-hud-control > div:first-child {
  display: grid;
  gap: 3px;
}

.overlay-hud-control strong {
  font-size: 13px;
}

.overlay-hud-control span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.overlay-hud-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.overlay-hud-actions button {
  min-height: 42px;
}

.overlay-hud-actions button.is-selected {
  border-color: var(--lime);
  color: #07110d;
  background: var(--lime);
}

.overlay-distance-form {
  grid-template-columns: minmax(120px, 1fr) auto auto;
  align-items: end;
}

.overlay-distance-form button {
  min-width: 92px;
}

.overlay-control-panel > p {
  margin-bottom: 0;
}

.stream-time-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(24, 216, 255, 0.2);
}

.stream-time-form input { font-variant-numeric: tabular-nums; }
.stream-time-form input[aria-invalid="true"] { border-color: #ff6b6b; }
.stream-time-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
#streamTimeCurrent { display: block; color: var(--cyan); }

.wheel-session-panel[hidden] { display: none; }
.wheel-session-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.wheel-session-tabs button.is-selected { border-color: var(--lime); color: var(--lime); background: rgba(158, 255, 54, 0.1); }
.wheel-session-boundary, .wheel-session-feedback { color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.wheel-session-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 14px 0; }
.wheel-session-counts > div { min-width: 0; padding: 9px 6px; background: rgba(24, 216, 255, 0.05); border: 1px solid rgba(24, 216, 255, 0.15); }
.wheel-session-counts span { display: block; min-height: 24px; color: var(--muted); font-size: 9px; line-height: 1.3; }
.wheel-session-counts strong { display: block; margin-top: 3px; color: var(--ink); font-size: 22px; font-variant-numeric: tabular-nums; }
.wheel-session-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 8px; }
.wheel-session-list-heading h3 { margin: 0; font-size: 13px; }
.wheel-session-list-heading a { color: var(--cyan); font-size: 12px; }
.wheel-session-list { display: grid; gap: 6px; padding: 0; margin: 8px 0 0; list-style: none; }
.wheel-session-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px; background: rgba(255, 255, 255, 0.03); }
.wheel-session-item strong { display: block; color: var(--ink); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.wheel-session-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.wheel-session-item[data-wheel-tier="epic"] { --tier-color: #bd80ff; background: rgba(189, 128, 255, 0.09); }
.wheel-session-item[data-wheel-tier="legendary"] { --tier-color: #ffb168; background: rgba(255, 177, 104, 0.09); }
.wheel-session-item[data-wheel-tier="epic"],
.wheel-session-item[data-wheel-tier="legendary"] { box-shadow: inset 3px 0 var(--tier-color); padding-left: 13px; }
.wheel-session-item[data-wheel-tier="epic"] strong,
.wheel-session-item[data-wheel-tier="legendary"] strong,
.wheel-session-item[data-wheel-tier="epic"] .wheel-session-tier,
.wheel-session-item[data-wheel-tier="legendary"] .wheel-session-tier { color: var(--tier-color); }
.wheel-task-status { padding: 4px 6px; border: 1px solid rgba(24, 216, 255, 0.25); color: var(--cyan); font-size: 9px; font-weight: 800; white-space: nowrap; }
.wheel-task-status.is-done { border-color: rgba(158, 255, 54, 0.35); color: var(--lime); }
.wheel-task-status.is-pending { color: #ffc971; border-color: rgba(255, 201, 113, 0.35); }
.wheel-session-item.has-actions { align-items: center; }
.wheel-session-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.wheel-session-actions button { display: grid; place-items: center; min-height: 32px; min-width: 32px; width: 32px; height: 32px; padding: 4px; }
.wheel-session-actions .wheel-session-check { border: 0; background: transparent; }
.wheel-session-check::before { content: ""; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(221, 249, 255, 0.5); background: rgba(0, 0, 0, 0.16); font-size: 18px; line-height: 1; }
.wheel-session-check[aria-checked="true"]::before { content: "✓"; color: var(--lime); border-color: var(--lime); background: rgba(158, 255, 54, 0.08); }
.wheel-session-actions .wheel-session-delete { border: 0; color: #ff7676; background: transparent; font-size: 24px; line-height: 1; }
.wheel-session-actions button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.wheel-session-empty { padding: 10px 0; color: var(--muted); font-size: 11px; }
.wheel-session-carry, .wheel-session-waiting, .wheel-archive-disclosure { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(24, 216, 255, 0.2); }
.wheel-session-panel summary, .wheel-archive-disclosure summary { cursor: pointer; color: var(--cyan); font-size: 12px; font-weight: 800; line-height: 1.5; }
.wheel-session-panel summary span { float: right; margin-left: 8px; color: var(--ink); font-variant-numeric: tabular-nums; }
.wheel-session-carry > p, .wheel-archive-disclosure > p { color: var(--muted); font-size: 11px; line-height: 1.5; }

.wheel-picker {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(24, 216, 255, 0.48);
  color: var(--ink);
  background: rgba(3, 10, 19, 0.98);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.72), inset 0 0 36px rgba(24, 216, 255, 0.08);
}

.wheel-picker::backdrop {
  background: rgba(1, 5, 10, 0.76);
  backdrop-filter: blur(8px);
}

.wheel-picker[open] {
  animation: wheelPickerIn 220ms ease-out both;
}

.wheel-picker-sheet {
  padding: 22px;
}

.wheel-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wheel-picker-heading span {
  display: block;
  margin-bottom: 4px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.wheel-picker-close {
  min-height: 38px;
  padding: 6px 12px;
}

.wheel-picker-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.wheel-choice {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 15px 17px;
  text-align: left;
}

.wheel-choice strong {
  font-size: 19px;
  text-transform: uppercase;
}

.wheel-choice span,
.wheel-picker-sheet > p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.wheel-choice-normal {
  border-color: rgba(24, 216, 255, 0.5);
  background: linear-gradient(135deg, rgba(24, 216, 255, 0.17), rgba(255, 78, 216, 0.08));
}

.wheel-choice-epic {
  border-color: rgba(179, 76, 255, 0.7);
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.35), rgba(244, 114, 255, 0.14));
}

.wheel-choice-legendary {
  border-color: rgba(255, 159, 28, 0.76);
  background: linear-gradient(135deg, rgba(255, 159, 28, 0.3), rgba(255, 77, 0, 0.14));
}

@keyframes wheelPickerIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.discord-promo-panel[hidden],
.discord-promo-settings[hidden],
.discord-live-panel[hidden],
.discord-live-form[hidden] {
  display: none;
}

#discordPromoPanelBody[hidden] {
  display: none;
}

.discord-promo-heading-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.discord-promo-heading-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 10px;
  text-transform: uppercase;
}

.discord-promo-safety {
  padding: 11px;
  border-left: 3px solid var(--lime);
  color: var(--ink);
  background: rgba(158, 255, 54, 0.07);
  line-height: 1.45;
}

.discord-promo-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.discord-promo-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.discord-promo-stream-types {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.discord-promo-stream-types legend {
  padding: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-promo-stream-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.discord-promo-stream-type {
  position: relative;
  min-width: 0;
}

.discord-promo-stream-type input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.discord-promo-stream-type label {
  display: grid;
  min-height: 52px;
  padding: 8px 6px;
  place-items: center;
  border: 2px solid rgba(247, 251, 255, 0.46);
  color: var(--ink);
  background: rgba(3, 12, 22, 0.78);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
  text-transform: none;
}

.discord-promo-stream-type label:hover {
  border-color: var(--cyan);
  background: rgba(24, 216, 255, 0.14);
}

.discord-promo-stream-type input:focus-visible + label {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.discord-promo-stream-type input:checked + label {
  border-color: var(--lime);
  color: #07110d;
  background: var(--lime);
}

.discord-promo-stream-type input:disabled + label {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.5;
}

.discord-promo-settings {
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(24, 216, 255, 0.2);
}

.discord-promo-add {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(24, 216, 255, 0.2);
  background: rgba(24, 216, 255, 0.04);
}

.discord-promo-add legend {
  padding: 0 5px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-promo-targets,
.discord-promo-batch {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin-top: 12px;
}

.discord-promo-target,
.discord-promo-item {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(24, 216, 255, 0.22);
  background: rgba(3, 12, 22, 0.48);
}

.discord-promo-target > div:first-child,
.discord-promo-item > div:first-child,
.discord-promo-batch-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.discord-promo-batch-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.discord-promo-template-name {
  color: var(--pink);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-promo-target a {
  overflow-wrap: anywhere;
  color: var(--cyan);
  font-size: 11px;
}

.discord-promo-message {
  max-width: 100%;
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid rgba(158, 255, 54, 0.24);
  color: var(--ink);
  background: rgba(158, 255, 54, 0.06);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.discord-promo-item.is-posted {
  border-color: rgba(158, 255, 54, 0.48);
  background: rgba(158, 255, 54, 0.08);
}

.discord-promo-item.is-skipped {
  opacity: 0.68;
}

.discord-promo-item p,
.discord-promo-item small {
  margin: 0;
  overflow-wrap: anywhere;
}

.discord-promo-item-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.5;
}

.discord-live-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(24, 216, 255, 0.2);
}

.discord-toggle {
  padding: 10px;
  border: 1px solid rgba(158, 255, 54, 0.22);
  background: rgba(158, 255, 54, 0.06);
}

.discord-live-actions {
  margin-top: 4px;
}

.wheel-spin-button {
  width: 100%;
}

.wheel-archive-actions {
  margin-top: 8px;
}

.wheel-result {
  margin: 14px 0 0;
  padding: 13px;
  border-left: 3px solid var(--lime);
  color: var(--ink);
  background: rgba(158, 255, 54, 0.08);
  font-weight: 900;
  line-height: 1.4;
}

.wheel-automation-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(24, 216, 255, 0.2);
}

.wheel-automation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.wheel-automation-grid fieldset {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 11px;
  border: 1px solid rgba(24, 216, 255, 0.2);
  background: rgba(24, 216, 255, 0.04);
}

.wheel-automation-grid legend {
  padding: 0 5px;
  overflow-wrap: anywhere;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 11px;
  text-transform: none;
}

.toggle-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--lime);
}

.private-links > span {
  color: var(--lime);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.copy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.copy-grid a {
  display: grid;
  place-items: center;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
}

.panel-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.settings-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.preview-panel {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.045) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.045) 75%),
    #03070d;
  background-position: 0 0, 14px 14px;
  background-size: 28px 28px;
}

.delivery-preview-disclosure { min-width: 0; border: 1px solid rgba(24, 216, 255, 0.24); background: var(--panel); }
.delivery-preview-disclosure > summary { padding: 12px 14px; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700; }
.delivery-preview-disclosure > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.preview-closing { padding: 0 14px; color: var(--muted); font-size: 11px; }
.preview-closing[hidden] { display: none; }

.preview-panel iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.wheel-preview-panel {
  aspect-ratio: 16 / 9;
}

.chat-message {
  margin: 0;
  padding: 13px;
  border-left: 3px solid var(--pink);
  color: var(--ink);
  background: rgba(255, 78, 216, 0.08);
  font-weight: 800;
  line-height: 1.45;
}

.history {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.history li.tip-entry {
  border-color: rgba(255, 216, 77, 0.32);
  background: rgba(255, 216, 77, 0.07);
}

.history li.tip-entry strong,
.history li.tip-entry span {
  color: var(--yellow);
}

.history strong {
  color: var(--ink);
}

.history li > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.history li > div:last-child {
  justify-items: end;
}

.history small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-order {
  min-height: 28px;
  padding: 0 9px;
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff9898;
  background: rgba(255, 107, 107, 0.08);
  font-size: 10px;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wheel-integration-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .wheel-session-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .camera-audio-actions button { min-height: 62px; padding-inline: 5px; font-size: 11px; }
  body {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .console-shell {
    width: 100%;
    max-width: 1220px;
    padding:
      max(16px, env(safe-area-inset-top))
      max(9px, env(safe-area-inset-right))
      28px
      max(9px, env(safe-area-inset-left));
  }

  .wheel-picker {
    width: calc(100vw - 14px);
    max-height: calc(100vh - max(14px, env(safe-area-inset-top)));
    margin: auto 7px 0;
  }

  .wheel-picker-sheet {
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  }

  .wheel-picker-heading {
    align-items: flex-start;
  }

  header,
  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .header-actions > * {
    min-width: 0;
    min-height: 44px;
    display: grid;
    place-content: center;
    text-align: center;
  }

  .panel-title strong {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .wheel-automation-grid {
    grid-template-columns: 1fr;
  }

  .wheel-archive-actions {
    grid-template-columns: 1fr;
  }

  .overlay-distance-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overlay-hud-control {
    grid-template-columns: 1fr;
  }

  .discord-promo-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .overlay-distance-form label {
    grid-column: 1 / -1;
  }

  .overlay-distance-form button {
    min-width: 0;
  }

  .camera-control-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .camera-control-actions button {
    min-height: 48px;
  }

  .discord-promo-actions {
    grid-template-columns: 1fr;
  }

  .discord-promo-toolbar {
    grid-template-columns: 1fr;
  }

  .discord-promo-item-actions {
    grid-template-columns: 1fr;
  }

  .discord-promo-target > div:first-child,
  .discord-promo-item > div:first-child,
  .discord-promo-batch-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-grid {
    position: sticky;
    top: 0;
    z-index: 8;
    width: calc(100% + 18px);
    margin-inline: -9px;
    padding: 8px 9px;
    background: rgba(4, 11, 20, 0.94);
    backdrop-filter: blur(14px);
  }

  .summary-grid article {
    padding: 10px;
  }

  .summary-grid strong {
    font-size: 20px;
  }

  .layout {
    gap: 10px;
  }

  .stack {
    gap: 10px;
  }

  .panel {
    padding: 14px;
  }

  .preview-panel {
    aspect-ratio: 16 / 10;
  }

  .delivery-preview-panel {
    min-height: 360px;
    aspect-ratio: auto;
  }

  .wheel-preview-panel {
    min-height: 300px;
    aspect-ratio: auto;
  }

  button {
    min-height: 52px;
    touch-action: manipulation;
  }

  input,
  select,
  textarea {
    height: 50px;
    font-size: 16px;
  }

  textarea {
    height: auto;
  }

  .history li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .history li > div:last-child {
    min-width: 88px;
    align-content: start;
  }

  .history small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .remove-order {
    width: 100%;
    min-height: 44px;
  }

  .mobile-dock {
    position: fixed;
    right: max(7px, env(safe-area-inset-right));
    bottom: 0;
    left: max(7px, env(safe-area-inset-left));
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    padding: 7px 7px calc(7px + env(safe-area-inset-bottom));
    border: 1px solid rgba(24, 216, 255, 0.28);
    border-bottom: 0;
    background: rgba(3, 10, 19, 0.96);
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px);
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
  }

  .mobile-dock.has-spin {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mobile-dock button[hidden] {
    display: none;
  }

  .mobile-dock button,
  .mobile-dock a {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-content: center;
    gap: 1px;
    padding: 4px;
    border: 1px solid rgba(24, 216, 255, 0.32);
    color: var(--ink);
    background: rgba(24, 216, 255, 0.08);
    text-align: center;
    text-decoration: none;
  }

  .mobile-dock span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 950;
    letter-spacing: 0.12em;
  }

  .mobile-dock strong {
    font-size: 12px;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .mobile-dock.has-spin strong {
    font-size: 9px;
  }

  .mobile-dock .mobile-primary {
    border: 0;
    color: #071014;
    background: linear-gradient(135deg, var(--cyan), var(--lime));
  }

  .mobile-dock .mobile-primary span {
    color: rgba(7, 16, 20, 0.62);
  }
}
