:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.app {
  background: #070807;
}

.light .app {
  background: #e6e9e5;
}

.topbar {
  height: 58px;
  gap: 16px;
  padding: 0 24px;
  border-color: #20231f;
}

.brand-mark {
  color: #a1a69f;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.brand-dot {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.eyebrow,
.readout span,
.gauge-caption {
  display: none;
}

.drive-stage {
  background: #070807;
}

.light .drive-stage {
  background: #e6e9e5;
}

.setup-panel {
  background: #111310;
}

.setup-heading {
  padding: 18px 20px 14px;
}

.setup-heading h1 {
  font-size: 17px;
  font-weight: 500;
}

.section-heading h2 {
  font-size: 14px;
  font-weight: 500;
}

.mode-switch {
  border-radius: 4px;
  background: #151715;
}

.mode,
.icon-btn,
.quiet-btn,
.control-btn {
  border-radius: 4px;
}

.sound-option {
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid #2a2d29;
  border-radius: 0;
  background: transparent;
  padding: 7px 6px;
}

.sound-option.selected {
  background: #1d251d;
}

.sound-icon {
  width: 24px;
  height: 24px;
  border-radius: 3px;
}

.sound-description {
  border-radius: 0;
}

.gauge-card,
.gauge-current,
.drive-style button,
.accel-options button {
  border-radius: 4px;
}

.drive-style button,
.accel-options button {
  background: #171a17;
}

.app.driving .topbar {
  position: relative;
  z-index: 9;
  height: 54px;
  padding: 0 20px;
  border: 0;
  background: #070807;
}

.app.driving .brand-mark,
.app.driving .mode-switch,
.app.driving #guideBtn,
.app.driving #donateBtn {
  display: none;
}

.app.driving .top-actions {
  margin-left: auto;
}

.app.driving .drive-layout {
  display: block;
  min-height: calc(100vh - 54px);
}

.app.driving .setup-panel {
  display: none;
}

.app.driving .setup-panel.open {
  position: fixed;
  z-index: 8;
  top: 54px;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(370px, 100vw);
  max-height: none;
  min-height: 0;
  box-shadow: -12px 0 34px #0008;
}

.app.driving .drive-stage {
  width: 100%;
  height: calc(100vh - 54px);
  min-height: 500px;
  padding: 14px 22px;
}

.app.driving .readout-row,
.app.driving .notice {
  display: none;
}

.app.driving .status-row {
  color: #9a9f99;
  font-family: inherit;
  font-size: 12px;
}

.app.driving .drive-mode-label {
  display: none;
}

.app.driving .accel-chip {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #b7bcb5;
}

.app.driving .accel-chip i {
  display: none;
}

.app.driving .gauge-wrap {
  top: 49%;
  width: min(520px, 72vh, 78vw);
}

.app.driving .drive-controls {
  bottom: 4.5%;
  left: 22px;
  right: 22px;
}

.app.driving .start-btn,
.app.driving .stop-btn,
.app.driving .demo-controls .control-btn {
  background: #191b19;
  border-color: #303430;
  color: #e7eae5;
}

.app.driving .icon-btn,
.app.driving .quiet-btn {
  background: #171a17;
  border-color: #303430;
  color: #e7eae5;
}

.app.driving .stop-outline {
  color: #e47d75;
}

.app.driving .gps-hint {
  color: #858b84;
}

@media (max-width: 760px) {
  .topbar {
    padding: 0 14px;
  }

  .app.driving .topbar {
    height: 52px;
    padding: 0 12px;
  }

  .app.driving #settingsBtn {
    display: inline-flex;
    align-items: center;
  }

  .app.driving .drive-stage {
    height: calc(100dvh - 52px);
    min-height: 560px;
    padding: 14px 12px;
  }

  .app.driving .gauge-wrap {
    top: 46%;
  }

  .app.driving .drive-controls {
    bottom: 61px;
    left: 7px;
    right: 7px;
  }

  .app.driving .setup-panel.open {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: min(80dvh, 680px);
    transform: translateY(0);
    border-radius: 10px 10px 0 0;
  }
}

@media (min-width: 761px) {
  .drive-controls {
    bottom: 20%;
  }
}

.donation-qr-frame {
  position: relative;
  display: block;
  width: clamp(76px, 8vw, 104px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #dce3ea;
  background: #fff;
}

.donation-qr-frame img[data-inline-qr] {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.donation-qr-logo,
.qr-brand-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25%;
  height: 25%;
  padding: 3px;
  border: 1px solid #e2e7ec;
  border-radius: 7px;
  background: #fff;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.donate-preview-code {
  width: clamp(76px, 8vw, 104px);
}

.donate-preview-code .donation-qr-frame {
  width: 100%;
}

.donate-preview-code .donation-qr-logo {
  width: 25%;
  height: 25%;
}

.qr-placeholder .qr-image-wrap {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  background: #fff;
}

.qr-placeholder .qr-image-wrap img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-placeholder .qr-image-wrap .qr-brand-logo {
  top: 50%;
  left: 50%;
  width: 25%;
  height: 25%;
  padding: 5px;
  transform: translate(-50%, -50%);
}

.qr-placeholder .qr-upload-action {
  position: absolute;
  z-index: 2;
  right: 5px;
  bottom: 5px;
  padding: 4px 7px;
  border-radius: 3px;
  background: #111a24c9;
  color: #fff;
  font-size: 10px;
}

@media (max-width: 760px) {
  .donate-preview-code,
  .donate-preview-code .donation-qr-frame {
    width: 76px;
  }
}

@media (min-width: 761px) {
  .drive-stage {
    position: sticky;
    top: 12px;
  }

  .panel-scroll {
    max-height: none;
    overflow: visible;
  }
}

/* Reference-inspired page frame and settings hierarchy. */
body,
.light {
  background: #eeeeef;
}

.app,
.light .app {
  min-height: 100vh;
  background: #eeeeef;
}

.topbar {
  width: min(1232px, calc(100% - 48px));
  height: 64px;
  margin: 0 auto;
  padding: 0;
  border: 0;
}

.brand-mark {
  color: #2d3b4c;
  font-size: 17px;
  font-weight: 700;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background: #4c67d8;
  border-radius: 3px;
}

.mode-switch,
.light .mode-switch {
  margin-left: auto;
  margin-right: 0;
  padding: 4px;
  border: 0;
  border-radius: 24px;
  background: #e0e1e3;
}

.mode,
.light .mode {
  padding: 9px 16px;
  border-radius: 20px;
  color: #59616d;
  font-size: 13px;
}

.mode.active,
.light .mode.active {
  background: #4c67d8;
  color: #fff;
  box-shadow: none;
}

.top-actions {
  gap: 8px;
}

.icon-btn,
.quiet-btn,
.light .icon-btn,
.light .quiet-btn {
  height: 38px;
  border: 0;
  border-radius: 20px;
  background: #e3e4e6;
  color: #46515f;
}

.quiet-btn {
  padding: 0 16px;
}

.top-actions #donateBtn {
  background: #f4a90b;
  color: #fff;
}

.drive-layout {
  width: min(1232px, calc(100% - 48px));
  margin: 10px auto 0;
  padding: 0;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
  gap: 24px;
  min-height: 0;
}

.drive-stage,
.light .drive-stage {
  height: min(606px, calc(100vh - 164px));
  min-height: 520px;
  padding: 20px;
  border: 0;
  border-radius: 24px;
  background: #fff;
}

.status-row,
.light .status-row {
  width: 100%;
  color: #626873;
  font-size: 12px;
}

.gauge-wrap {
  top: 24%;
  width: min(54%, 300px);
}

.gauge-shadow {
  fill: #fff;
  stroke: #d7dadd;
  stroke-width: 10;
}

.gauge-track {
  stroke: #d4d7dc;
  stroke-width: 8;
}

.gauge-progress {
  stroke-width: 8;
}

.dial {
  stroke: #c9ced6;
  stroke-width: 5;
}

.dial-center,
.light .dial-center {
  fill: #f8fbff !important;
  stroke: #4c67d8;
  stroke-width: 1.5;
}

.gauge-rpm-label,
.gauge-unit,
.light .gauge-rpm-label,
.light .gauge-unit {
  fill: #5b6572;
  font-size: 11px;
}

.gauge-speed,
.light .gauge-speed {
  fill: #19344f;
  font-size: 58px;
}

.gear-plate {
  fill: #4c67d8;
}

.drive-controls {
  bottom: clamp(14%, calc(100vh - 50vw), 44%);
}

.start-btn,
.light .start-btn {
  height: 54px;
  min-width: 180px;
  border: 1px solid #d5dbe4;
  border-radius: 9px;
  background: #fff;
  color: #30465e;
  font-weight: 600;
}

.gps-hint {
  color: #69717b;
  font-size: 12px;
}

.notice,
.light .notice {
  right: 20px;
  bottom: 12px;
  left: 20px;
  justify-content: center;
  color: #737984;
  font-size: 9px;
  text-align: center;
}

.setup-panel,
.light .setup-panel {
  min-height: 0;
  max-height: none;
  gap: 12px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.setup-heading {
  display: none;
}

.setup-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 14px;
  background: #fff;
}

.setup-tab,
.light .setup-tab {
  height: 48px;
  border: 0;
  border-radius: 11px;
  color: #424c58;
  font-size: 13px;
}

.setup-tab span {
  display: none;
}

.setup-tab.active,
.light .setup-tab.active {
  background: #4c67d8;
  color: #fff;
}

.panel-scroll {
  max-height: calc(100vh - 220px);
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  scrollbar-color: #c8cbd0 transparent;
}

.section-heading {
  margin: 2px 0 15px;
}

.section-heading .eyebrow {
  display: none;
}

.section-heading h2 {
  margin: 0;
  color: #252d38;
  font-size: 16px;
  font-weight: 600;
}

.item-count {
  color: #626b77;
}

.segmented,
.light .segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: 11px;
  padding: 4px;
  border-radius: 12px;
  background: #e4e5e7;
}

.segmented button,
.light .segmented button {
  min-height: 36px;
  border-radius: 9px;
  color: #555e68;
  font-size: 12px;
}

.segmented button.selected,
.light .segmented button.selected {
  background: #fff;
  color: #273340;
  box-shadow: 0 1px 3px #00000012;
}

.sound-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.sound-option,
.light .sound-option {
  min-width: 0;
  min-height: 48px;
  justify-content: center;
  padding: 7px 5px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #e3e4e6;
  color: #343c47;
  font-size: 11px;
  text-align: center;
}

.sound-option.selected,
.light .sound-option.selected {
  border: 1.5px solid #4c67d8;
  background: #edf1ff;
  color: #284caa;
}

.sound-description,
.light .sound-description {
  margin-top: 12px;
  padding: 12px 2px 0;
  border-top: 1px solid #e0e2e5;
  color: #535d69;
  font-size: 12px;
  line-height: 1.6;
}

.listen-note {
  display: none;
}

@media (max-width: 760px) {
  .topbar,
  .drive-layout {
    width: calc(100% - 28px);
  }

  .drive-layout {
    margin-top: 8px;
    gap: 12px;
  }

  .drive-stage,
  .light .drive-stage {
    height: calc(100dvh - 180px);
    min-height: 500px;
    padding: 14px;
    border-radius: 18px;
  }

  .gauge-wrap {
    top: 44%;
    width: min(64%, 290px);
  }

  .drive-controls {
    bottom: 13%;
  }

  .setup-panel,
  .light .setup-panel {
    gap: 8px;
  }

  .setup-tabs {
    padding: 3px;
  }

  .setup-tab,
  .light .setup-tab {
    height: 42px;
  }

  .panel-scroll {
    max-height: 52dvh;
    padding: 14px;
    border-radius: 18px;
  }
}

#tab-settings.active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 761px) {
  .drive-stage {
    position: sticky;
    top: 12px;
  }

  .panel-scroll {
    max-height: none;
    overflow: visible;
  }
}

#tab-settings > .section-heading,
#tab-settings > .setting-block,
#tab-settings > .range-setting:nth-of-type(5),
#tab-settings > .setting-block.calibration,
#tab-settings > .setting-block.acceleration {
  grid-column: 1 / -1;
}

#tab-settings > .setting-block:not(.calibration):not(.acceleration) {
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #e3e4e6;
}

#tab-settings > .setting-block h3,
#tab-settings > .range-setting b,
#tab-settings > .toggle-setting b {
  color: #343d49;
  font-size: 12px;
  font-weight: 600;
}

#tab-settings > .setting-block p,
#tab-settings > .range-setting small,
#tab-settings > .toggle-setting small {
  color: #68717d;
  font-size: 10px;
  line-height: 1.5;
}

#tab-settings .drive-style {
  gap: 6px;
  margin-top: 10px;
}

#tab-settings .drive-style button,
#tab-settings .drive-style button.selected {
  min-height: 48px;
  padding: 8px 6px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: #404a57;
  text-align: center;
}

#tab-settings .drive-style button.selected {
  background: #4c67d8;
  color: #fff;
}

#tab-settings .drive-style button small {
  color: inherit;
  opacity: .82;
  font-size: 9px;
  white-space: normal;
}

#tab-settings > .range-setting,
#tab-settings > .toggle-setting {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #e3e4e6;
}

#tab-settings > .range-setting > span {
  min-height: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2px 6px;
}

#tab-settings > .range-setting small {
  flex: 1 1 auto;
}

#tab-settings > .range-setting output {
  color: #454e5a;
  font-size: 11px;
}

#tab-settings input[type="range"] {
  height: 5px;
  margin: 11px 0 2px;
  accent-color: #4c67d8;
}

#tab-settings > .toggle-setting {
  gap: 12px;
  min-height: 68px;
  align-items: center;
}

#tab-settings > .toggle-setting > span {
  min-width: 0;
}

#tab-settings > .toggle-setting i {
  width: 20px;
  height: 20px;
  border: 1px solid #aeb5be;
  border-radius: 3px;
  background: #fff;
}

#tab-settings > .toggle-setting i:after {
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: transparent;
  content: "";
}

#tab-settings > .toggle-setting input:checked + i {
  border-color: #4c67d8;
  background: #4c67d8;
}

#tab-settings > .toggle-setting input:checked + i:after {
  left: 0;
  background: transparent;
  content: "✓";
  color: #fff;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
}

#tab-settings > .setting-block.calibration {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: #e3e4e6;
}

#tab-settings > .setting-block.calibration h3,
#tab-settings > .setting-block.calibration p {
  margin: 0;
}

#tab-settings > .setting-block.calibration p {
  flex: 1 1 auto;
}

#tab-settings .calibration > div {
  gap: 8px;
}

#tab-settings .calibration button {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #343d49;
  font-size: 16px;
}

#tab-settings .calibration b {
  color: #343d49;
  font-size: 12px;
}

#tab-settings .calibration .reset-btn {
  width: auto;
  min-width: 42px;
  height: 30px;
  margin-left: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 10px;
}

#tab-settings > .setting-block.acceleration {
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #e3e4e6;
}

#tab-settings .accel-options {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

#tab-settings .accel-options button,
#tab-settings .accel-options button.selected {
  min-width: 0;
  padding: 8px 4px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: #3f4955;
  font-size: 10px;
  text-align: center;
}

#tab-settings .accel-options button.selected {
  background: #4c67d8;
  color: #fff;
}

#tab-settings .accel-options small {
  color: inherit;
  font-size: 8px;
  white-space: normal;
}

#tab-settings .best-time,
#tab-settings .best-time b {
  color: #59636f;
}

@media (max-width: 760px) {
  #tab-settings.active {
    grid-template-columns: minmax(0, 1fr);
  }

  #tab-settings > .range-setting:nth-of-type(5),
  #tab-settings > .setting-block.calibration,
  #tab-settings > .setting-block.acceleration,
  #tab-settings > .section-heading,
  #tab-settings > .setting-block {
    grid-column: 1;
  }

  #tab-settings > .setting-block.calibration {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.donate-preview {
  display: flex;
  min-height: 172px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
}

.donate-preview p {
  margin: 0;
  color: #9c5a32;
  font-size: 14px;
  font-weight: 600;
}

.donate-preview-codes {
  display: flex;
  gap: 16px;
}

.donate-preview-code {
  display: grid;
  width: clamp(76px, 8vw, 104px);
  justify-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #69717b;
  cursor: pointer;
}

.donate-preview-code img,
.donate-preview-placeholder {
  width: clamp(76px, 8vw, 104px);
  height: clamp(76px, 8vw, 104px);
  object-fit: contain;
}

.donate-preview-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed #c4c9d0;
  border-radius: 4px;
  background: #f7f8fa;
  color: #7b8490;
  font-size: 24px;
  font-weight: 300;
}

.donate-preview-code small {
  color: #606975;
  font-size: 11px;
}

@media (max-width: 760px) {
  .donate-preview {
    min-height: 150px;
    padding: 12px;
    border-radius: 18px;
  }

  .donate-preview-codes {
    gap: 8px;
  }

  .donate-preview-code,
  .donate-preview-code img,
  .donate-preview-placeholder {
    width: 76px;
  }

  .donate-preview-code img,
  .donate-preview-placeholder {
    height: 76px;
  }
}

.app.driving.settings-open .drive-controls {
  display: none;
}

.app.driving.settings-open .gauge-wrap {
  left: calc((100% - 370px) / 2);
  width: min(360px, 54vh);
}

@media (max-width: 760px) {
  .app.driving.settings-open .gauge-wrap {
    top: 31%;
    left: 50%;
    width: min(300px, 40vh, 70vw);
  }
}

/* Bright blue instrument theme */
:root {
  color-scheme: light;
  --bg: #eaf4ff;
  --panel: #f7fbff;
  --panel2: #e7f2ff;
  --line: #c8ddf2;
  --text: #123353;
  --muted: #67819b;
  --soft: #416482;
  --accent: #1688e8;
  --accent-strong: #0875d1;
  --dial-top: #ffffff;
  --dial-bottom: #d9eaff;
  --dial-text: #20496e;
  --dial-core: #c8e5ff;
  --needle-tone: #087de0;
}

body,
.app,
.drive-stage,
.app.driving .topbar {
  background: #eaf4ff;
}

.app,
.light .app {
  background: linear-gradient(135deg, #f8fcff 0%, #eaf4ff 58%, #e1efff 100%);
}

.topbar,
.light .topbar {
  border-color: #c8ddf2;
}

.brand-mark,
.light .brand-mark,
.status-row,
.light .status-row,
.app.driving .status-row,
.gps-hint,
.light .gps-hint {
  color: #54738f;
}

.mode-switch,
.light .mode-switch,
.setup-panel,
.light .setup-panel {
  background: #f7fbff;
  border-color: #c8ddf2;
}

.mode,
.light .mode,
.setup-tab,
.light .setup-tab {
  color: #587691;
}

.mode.active,
.light .mode.active,
.setup-tab.active,
.light .setup-tab.active {
  background: #d9edff;
  color: #075fae;
}

.icon-btn,
.quiet-btn,
.control-btn,
.light .icon-btn,
.light .quiet-btn,
.light .control-btn,
.app.driving .icon-btn,
.app.driving .quiet-btn,
.app.driving .start-btn,
.app.driving .stop-btn,
.app.driving .demo-controls .control-btn {
  background: #f7fbff;
  border-color: #b9d4ee;
  color: #17466d;
}

.control-btn:hover,
.light .control-btn:hover {
  background: #e2f1ff;
  border-color: #78b8ef;
}

.sound-option,
.light .sound-option,
.gauge-card,
.light .gauge-card,
.drive-style button,
.light .drive-style button,
.accel-options button,
.light .accel-options button {
  color: #244a6b;
  border-color: #c8ddf2;
  background: #f7fbff;
}

.sound-option.selected,
.light .sound-option.selected,
.gauge-card.selected,
.light .gauge-card.selected,
.drive-style button.selected,
.light .drive-style button.selected,
.accel-options button.selected,
.light .accel-options button.selected {
  color: #075fae;
  border-color: #5ca9e9;
  background: #e1f1ff;
}

.sound-icon,
.light .sound-icon,
.segmented,
.light .segmented,
.segmented button.selected,
.light .segmented button.selected,
.gauge-current,
.light .gauge-current,
.sound-description,
.light .sound-description {
  background: #e8f3ff;
  border-color: #c8ddf2;
  color: #244a6b;
}

.gauge-shadow {
  fill: #d9eaff;
  stroke: #8ebce4;
}

.gauge-track {
  stroke: #a7c8e7;
}

.dial {
  stroke: #8ebce4;
}

.dial-center {
  fill: #c8e5ff !important;
  stroke: #1688e8;
}

.gauge-rpm-label,
.gauge-unit {
  fill: #315b7d;
}

.gauge-speed {
  fill: #123d62;
  filter: none;
}

.gear-plate {
  fill: #1688e8;
}

.app.driving .accel-chip {
  color: #315b7d;
}

.app.driving .stop-outline {
  color: #1978bd;
  border-color: #88b9e1;
}

.mobile-settings-bar button,
.qr-placeholder,
.qr-placeholder span {
  background: #e8f3ff;
  border-color: #b9d4ee;
  color: #17466d;
}

/* Match the reference page's quiet two-column workspace. */
@media (min-width: 761px) {
  .drive-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 1.15fr);
    gap: 18px;
    padding: 18px 24px 30px;
    min-height: calc(100vh - 58px);
  }

  .drive-stage {
    min-height: 640px;
    border: 1px solid #d6e6f5;
    border-radius: 18px;
    background: #fff;
  }

  .setup-panel {
    min-height: 640px;
    max-height: none;
    border: 0;
    border-radius: 18px;
    background: transparent;
  }

  .gauge-wrap {
    width: min(380px, 52vh, 36vw);
  }

  .drive-controls {
    bottom: 20%;
  }

  .app.driving .drive-layout {
    padding: 0;
    gap: 0;
  }

  .app.driving .drive-stage {
    border: 0;
    border-radius: 0;
  }

  .app.driving .gauge-wrap {
    width: min(380px, 52vh, 36vw);
  }
}

.readout-row {
  display: none;
}

.light .drive-stage {
  background: #fff;
}

.status-row,
.light .status-row {
  color: #587792;
  font-size: 12px;
}

.live-state i,
.accel-chip i {
  flex: none;
}

.accel-chip,
.light .accel-chip {
  background: #f0f7ff;
  border-color: #c8ddf2;
  color: #315b7d;
}

.setup-heading {
  padding: 20px 20px 14px;
}

.setup-heading h1 {
  color: #153b5d;
  font-size: 18px;
  font-weight: 600;
}

.setup-tabs {
  border-color: #d5e4f2;
}

.setup-tab {
  font-size: 13px;
}

.panel-scroll {
  padding: 18px 20px 28px;
}

.section-heading h2 {
  color: #173e60;
  font-size: 16px;
  font-weight: 600;
}

.item-count,
.setting-block p,
.range-setting small,
.toggle-setting small,
.readout,
.listen-note,
.light .listen-note {
  color: #617e98;
}

.sound-list {
  gap: 8px;
}

.sound-option,
.light .sound-option {
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid #d4e1ed;
  border-radius: 7px;
  background: #f0f2f4;
  color: #304b63;
  font-size: 12px;
}

.sound-option:hover,
.light .sound-option:hover {
  border-color: #8bbbe5;
  background: #eaf4ff;
}

.sound-option.selected,
.light .sound-option.selected {
  border: 1.5px solid #4a83dc;
  background: #e7f1ff;
  color: #174f99;
}

.sound-icon,
.sound-option.selected .sound-icon {
  display: none;
}

.sound-description,
.light .sound-description {
  margin-top: 12px;
  padding: 12px 14px;
  border: 0;
  border-top: 1px solid #d7e3ee;
  border-radius: 0;
  background: transparent;
  color: #385a77;
  font-size: 12px;
  line-height: 1.65;
}

.listen-note {
  font-size: 11px;
}

.drive-controls {
  bottom: 7%;
}

.control-btn,
.light .control-btn {
  height: 50px;
  border-radius: 8px;
  font-size: 14px;
}

.start-btn,
.light .start-btn {
  min-width: 180px;
  background: #fff;
  border-color: #b9d4ee;
  color: #15578c;
}

.start-icon {
  color: #1688e8;
}

.notice,
.light .notice {
  color: #587792;
  font-size: 10px;
  line-height: 1.5;
}

.notice span:last-child {
  display: none;
}

.gauge-shadow {
  fill: #fff;
  stroke: #c6dced;
}

.gauge-track {
  stroke: #d2deea;
}

.dial {
  stroke: #b9d2e8;
}

.gauge-speed {
  fill: #123d62;
  font-size: 58px;
}

.light .gauge-speed {
  fill: #123d62;
}

.light .gauge-rpm-label,
.light .gauge-unit {
  fill: #315b7d;
}

.gear-plate {
  fill: #4a83dc;
}

@media (min-width: 1100px) {
  .sound-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .drive-stage {
    background: #eaf4ff;
  }

  .app.driving .gauge-wrap {
    width: min(390px, 57vh, 86vw);
  }

  .sound-option,
  .light .sound-option {
    font-size: 11px;
  }
}

/* Final page-frame overrides for the reference layout. */
body.light,
.light .app {
  background: #eeeeef;
}

.light .app {
  background: #eeeeef;
}

.topbar {
  width: min(1232px, calc(100% - 48px));
  height: 64px;
  margin: 0 auto;
  padding: 0;
  border: 0;
}

.brand-mark {
  color: #2d3b4c;
  font-size: 17px;
  font-weight: 700;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #4c67d8;
}

.mode-switch,
.light .mode-switch {
  margin-left: auto;
  margin-right: 0;
  padding: 4px;
  border: 0;
  border-radius: 24px;
  background: #e0e1e3;
}

.mode,
.light .mode {
  padding: 9px 16px;
  border-radius: 20px;
  color: #59616d;
  font-size: 13px;
}

.mode.active,
.light .mode.active {
  background: #4c67d8;
  color: #fff;
  box-shadow: none;
}

.icon-btn,
.quiet-btn,
.light .icon-btn,
.light .quiet-btn {
  height: 38px;
  border: 0;
  border-radius: 20px;
  background: #e3e4e6;
  color: #46515f;
}

.quiet-btn {
  padding: 0 16px;
}

.top-actions #donateBtn {
  background: #f4a90b;
  color: #fff;
}

.drive-layout {
  width: min(1232px, calc(100% - 48px));
  margin: 10px auto 0;
  padding: 0;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
  gap: 24px;
  min-height: 0;
}

.drive-stage,
.light .drive-stage {
  height: min(606px, calc(100vh - 164px));
  min-height: 520px;
  padding: 20px;
  border: 0;
  border-radius: 24px;
  background: #fff;
}

.gauge-wrap {
  top: 24%;
  width: min(54%, 300px);
}

.gauge-shadow {
  fill: #fff;
  stroke: #d7dadd;
  stroke-width: 10;
}

.gauge-track {
  stroke: #d4d7dc;
  stroke-width: 8;
}

.gauge-progress {
  stroke-width: 8;
}

.dial {
  stroke: #c9ced6;
  stroke-width: 5;
}

.dial-center,
.light .dial-center {
  fill: #f8fbff !important;
  stroke: #4c67d8;
  stroke-width: 1.5;
}

.gauge-rpm-label,
.gauge-unit,
.light .gauge-rpm-label,
.light .gauge-unit {
  fill: #5b6572;
  font-size: 11px;
}

.gauge-speed,
.light .gauge-speed {
  fill: #19344f;
  font-size: 58px;
}

.gear-plate {
  fill: #4c67d8;
}

.drive-controls {
  bottom: 14%;
}

.notice,
.light .notice {
  right: 20px;
  bottom: 12px;
  left: 20px;
  justify-content: center;
  color: #737984;
  font-size: 9px;
  text-align: center;
}

.start-btn,
.light .start-btn {
  width: clamp(80px, calc((100vw - 600px) * 0.25), 136px) !important;
  height: clamp(80px, calc((100vw - 600px) * 0.25), 136px) !important;
  min-width: 0;
  padding: 0;
  flex-direction: column;
  gap: 6px;
  border: 6px solid #d2d6dc;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #77b9ff, #2878d4 58%, #1456ab);
  box-shadow: 0 3px 8px #1d355322, inset 0 0 0 2px #fff;
  color: #fff;
  font-size: 13px;
}

.start-icon {
  color: #fff;
  font-size: 21px;
}

.setup-panel,
.light .setup-panel {
  min-height: 0;
  max-height: none;
  gap: 12px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.setup-heading {
  display: none;
}

.setup-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 14px;
  background: #fff;
}

.setup-tab,
.light .setup-tab {
  height: 48px;
  border: 0;
  border-radius: 11px;
  color: #424c58;
  font-size: 13px;
}

.setup-tab span {
  display: none;
}

.setup-tab.active,
.light .setup-tab.active {
  background: #4c67d8;
  color: #fff;
}

.panel-scroll {
  max-height: calc(100vh - 220px);
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  scrollbar-color: #c8cbd0 transparent;
}

.section-heading .eyebrow {
  display: none;
}

.section-heading h2 {
  margin: 0;
  color: #252d38;
  font-size: 16px;
  font-weight: 600;
}

.segmented,
.light .segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: 11px;
  padding: 4px;
  border-radius: 12px;
  background: #e4e5e7;
}

.segmented button,
.light .segmented button {
  min-height: 36px;
  border-radius: 9px;
  color: #555e68;
  font-size: 12px;
}

.segmented button.selected,
.light .segmented button.selected {
  background: #fff;
  color: #273340;
  box-shadow: 0 1px 3px #00000012;
}

.sound-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.sound-option,
.light .sound-option {
  min-width: 0;
  min-height: 48px;
  justify-content: center;
  padding: 7px 5px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #e3e4e6;
  color: #343c47;
  font-size: 11px;
  text-align: center;
}

.sound-option.selected,
.light .sound-option.selected {
  border: 1.5px solid #4c67d8;
  background: #edf1ff;
  color: #284caa;
}

.sound-description,
.light .sound-description {
  margin-top: 12px;
  padding: 12px 2px 0;
  border-top: 1px solid #e0e2e5;
  background: transparent;
  color: #535d69;
  font-size: 12px;
  line-height: 1.6;
}

.listen-note {
  display: none;
}

@media (max-width: 760px) {
  .topbar,
  .drive-layout {
    width: calc(100% - 28px);
  }

  .drive-stage,
  .light .drive-stage {
    height: calc(100dvh - 180px);
    min-height: 500px;
    padding: 14px;
    border-radius: 18px;
  }

  .gauge-wrap {
    top: 44%;
    width: min(64%, 290px);
  }

  .drive-controls {
    bottom: 13%;
  }

  .panel-scroll {
    max-height: 52dvh;
    padding: 14px;
    border-radius: 18px;
  }
}

@media (min-width: 761px) {
  .drive-controls {
    bottom: 20%;
  }
}
