:root {
  --bg: #f4f1eb;
  --surface: #fffdf8;
  --surface-soft: #eae6de;
  --text: #242925;
  --muted: #6b7169;
  --border: #d5d9cf;
  --primary: #b94b28;
  --primary-soft: #f9e6dc;
  --accent: #4c6a51;
  --danger: #a7392f;
  --radius: 10px;
  color-scheme: light;
  font-family:
    Inter,
    "Avenir Next",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
:root[data-theme="night"] {
  --bg: #111714;
  --surface: #19211c;
  --surface-soft: #222d25;
  --text: #eef1e8;
  --muted: #b0baae;
  --border: #354138;
  --primary: #f38b5b;
  --primary-soft: #38271e;
  --accent: #a7c6a2;
  --danger: #ff9c8c;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
}
button,
input,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
button:active {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
p {
  line-height: 1.7;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  font-weight: 600;
}
.pill:hover {
  background: var(--surface-soft);
}
.primary {
  background: var(--primary) !important;
  color: var(--surface) !important;
  border-color: var(--primary) !important;
}
:root[data-theme="night"] .primary {
  color: var(--bg) !important;
}
.home-brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
}
.home-brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  flex: none;
}
.home-brand-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.05em;
  line-height: 1.15;
}
.home-brand-name > span {
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 500;
  color: var(--muted);
}
.drive-shell {
  max-width: 1560px;
  margin: auto;
  padding: 0 40px 28px;
}
.drive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  min-height: 88px;
  border-bottom: 1px solid var(--border);
}
.drive-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mode-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 5px;
  gap: 3px;
  background: var(--surface);
}
.mode-switch button {
  padding: 8px 12px;
  background: transparent;
  font-size: 11px;
  border-radius: 3px;
  white-space: nowrap;
}
.mode-switch button[aria-checked="true"] {
  background: var(--text);
  color: var(--surface);
}
.workspace-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 0 28px;
}
.workspace-heading h1 {
  margin: 8px 0 0;
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 600;
  line-height: 1.35;
}
.workspace-kicker,
.monitor-top,
.setup-topline,
.monitor-caption,
.console-notes {
  font:
    10px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.12em;
  line-height: 1.6;
}
.workspace-kicker {
  color: var(--primary);
}
.console-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.console-state i,
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.drive-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.35fr);
  gap: 24px;
  align-items: start;
}
.cockpit {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 20px;
  overflow: hidden;
}
.monitor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.monitor-top span:first-child {
  color: var(--text);
}
.instrument-host {
  width: 100%;
  height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 10px 0;
}
.monitor-caption {
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--border);
  font-size: 9px;
}
.start-area {
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.engine-start {
  width: 100%;
  min-height: 72px;
  border-radius: 5px;
  background: var(--text);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 16px;
  text-align: left;
  transition: background 0.2s;
}
.engine-start:hover {
  background: var(--primary);
}
:root[data-theme="night"] .engine-start:hover {
  color: var(--bg);
}
.engine-symbol {
  font-size: 23px;
  font-weight: 300;
  flex: none;
}
.engine-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.engine-copy small {
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 0.15em;
  opacity: 0.75;
}
.engine-copy strong {
  font-size: 17px;
  font-weight: 550;
}
.engine-command {
  font:
    20px ui-monospace,
    monospace;
}
.engine-start.running {
  background: var(--primary);
}
.engine-caption {
  font-size: 11px;
  color: var(--muted);
  margin: 16px 0 8px;
  min-height: 18px;
  text-align: left;
}
.guide-link {
  background: transparent;
  color: var(--text);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
  align-self: flex-start;
  padding: 4px 0;
}
.setup-column {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.setup-topline {
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
}
.setup-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.setup-tabs button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 4px 15px;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-align: left;
  min-width: 0;
}
.setup-tabs button > span {
  font-size: 14px;
  font-weight: 600;
}
.setup-tabs button small {
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.setup-tabs button[aria-selected="true"] {
  border-color: var(--primary);
  color: var(--primary);
}
.setup-panel {
  min-width: 0;
}
.sound-groups {
  display: flex;
  gap: 18px;
  margin: 20px 0 15px;
}
.sound-groups button {
  background: transparent;
  padding: 5px 0;
  color: var(--muted);
  font-size: 11px;
}
.sound-groups button[aria-selected="true"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.sound-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}
.sound-card {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 13px 14px;
  text-align: left;
  min-height: 64px;
}
.sound-card:hover {
  border-color: var(--primary);
}
.sound-card[aria-pressed="true"] {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.sound-code {
  min-width: 48px;
  font:
    11px ui-monospace,
    SFMono-Regular,
    monospace;
  color: var(--primary);
  border-right: 1px solid var(--border);
  padding: 7px 10px 7px 0;
}
.sound-title {
  font-size: 13px;
  font-weight: 550;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sound-title small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.sound-indicator {
  font-size: 15px;
  color: var(--muted);
}
.sound-card[aria-pressed="true"] .sound-indicator {
  color: var(--primary);
}
.sound-desc {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 20px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}
.sound-desc strong {
  color: var(--text);
  font-weight: 650;
  margin-right: 8px;
}
.console-notes {
  color: var(--muted);
  padding: 15px 0;
  font-size: 9px;
  line-height: 1.9;
}
.drive-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-top: 34px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.drive-footer p {
  margin: 0;
  max-width: 630px;
}
.drive-footer a {
  color: var(--primary);
  white-space: nowrap;
}
.panel-title {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  margin: 18px 0 24px;
}
.settings-section {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.range-head,
.section-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 15px;
  font-size: 12px;
  line-height: 1.5;
}
.range-head small,
.setting-hint {
  color: var(--muted);
  font-size: 10px;
  max-width: 65%;
  line-height: 1.7;
}
.segmented-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.segmented-options button {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 13px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  font-size: 11px;
  min-height: 60px;
  min-width: 55px;
}
.segmented-options small {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.4;
}
.segmented-options button[aria-checked="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
  margin: 22px 0;
}
.range-setting {
  display: block;
  min-width: 0;
}
.range-setting output {
  font:
    11px ui-monospace,
    monospace;
  color: var(--primary);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  height: 4px;
  margin: 12px 0;
  background: var(--border);
  cursor: pointer;
}
.switch-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding: 14px 0;
  font-size: 12px;
  line-height: 1.5;
}
.switch-setting small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}
.switch-setting input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex: none;
}
.calibration {
  display: flex;
  gap: 8px;
  align-items: center;
}
.calibration button {
  width: 35px;
  height: 35px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  font-size: 16px;
}
.calibration button:last-child {
  width: auto;
  padding: 0 12px;
  font-size: 10px;
}
.calibration output {
  font:
    12px ui-monospace,
    monospace;
  min-width: 42px;
  text-align: center;
}
.record-line {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 15px;
}
.record-button {
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 0;
}
.gauge-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin: 22px 0 16px;
  gap: 12px;
}
.gauge-heading small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}
.carousel-arrows {
  display: flex;
  gap: 5px;
}
.carousel-arrows button {
  width: 31px;
  height: 31px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  font-size: 18px;
}
.gauge-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 1fr);
  grid-auto-columns: 180px;
  overflow: auto;
  gap: 10px;
  padding: 4px 1px 15px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.gauge-option {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 5px;
  padding: 12px 10px;
  position: relative;
  min-width: 0;
  text-align: left;
  scroll-snap-align: start;
}
.gauge-option[aria-checked="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.mini-gauge {
  height: 88px;
  width: 100%;
}
.gauge-name {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 10px;
}
.new-badge {
  position: absolute;
  right: 8px;
  top: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 3px 4px;
  font:
    7px ui-monospace,
    monospace;
}
.in-use {
  display: block;
  font-size: 9px;
  color: var(--primary);
  margin-top: 6px;
}
.gauge-description,
.more-gauges {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
.gauge-description {
  border-top: 1px solid var(--border);
  padding-top: 17px;
  margin-top: 9px;
}
.gauge-description strong {
  color: var(--text);
  font-weight: 600;
}
.mini-palette {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 15px 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.mini-palette small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.mini-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mini-swatches button {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid var(--surface);
  outline: 1px solid var(--border);
}
.mini-swatches button[aria-checked="true"] {
  outline: 2px solid var(--primary);
}
.hud-toolbar,
.hud-dock,
.launch-banner {
  display: none;
}
.drive-shell.hud {
  position: fixed;
  inset: 0;
  max-width: none;
  padding: 0;
  background: var(--bg);
  z-index: 5;
}
.hud .drive-header,
.hud .workspace-heading,
.hud .setup-column,
.hud .start-area,
.hud .drive-footer,
.hud .monitor-top,
.hud .monitor-caption {
  display: none;
}
.hud .drive-grid {
  display: block;
  height: 100%;
}
.hud .cockpit {
  position: static;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 140px 35px 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  overflow: hidden;
}
.hud .instrument-host {
  height: 100%;
  max-height: 68vh;
  max-width: 1150px;
  margin: 0;
}
.hud-toolbar {
  position: absolute;
  top: 20px;
  left: 28px;
  right: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: opacity 0.2s;
}
.hud .hud-toolbar,
.hud .hud-dock {
  display: flex;
}
.hud-status {
  font:
    11px ui-monospace,
    monospace;
  color: var(--muted);
  line-height: 1.6;
}
.hud-controls {
  display: flex;
  gap: 8px;
}
.hud-dock {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 28px;
  right: 28px;
  gap: 1px;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  background: var(--border);
  transition: opacity 0.2s;
}
.hud-dock button,
.hud-volume {
  background: var(--surface);
  min-width: 42px;
  min-height: 62px;
  padding: 12px 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  white-space: nowrap;
}
.hud-dock .current-sound {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-dock .pedal {
  min-width: 90px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: var(--surface-soft);
}
.hud-dock .pedal.pressed {
  background: var(--primary);
  color: var(--surface);
}
.hud-dock .stop-button {
  color: var(--danger);
  min-width: 90px;
}
.hud-volume {
  flex-direction: column;
  gap: 6px;
  font:
    12px ui-monospace,
    monospace;
  min-width: 60px;
}
.hud-volume small {
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.hud .launch-banner {
  display: flex;
  position: absolute;
  top: 70px;
  left: 28px;
  right: 28px;
  width: auto;
  align-items: center;
  gap: 24px;
  padding: 13px 18px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  z-index: 1;
}
.launch-caption {
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 0.07em;
  color: var(--muted);
  line-height: 1.8;
  white-space: nowrap;
}
.launch-caption span {
  color: var(--primary);
}
.launch-time {
  font:
    500 30px ui-monospace,
    monospace;
  white-space: nowrap;
  letter-spacing: -1px;
}
.launch-time small {
  font-size: 12px;
  margin-left: 5px;
}
.launch-details {
  flex: 1;
  min-width: 0;
}
.launch-bar {
  height: 3px;
  background: var(--surface-soft);
  margin-bottom: 9px;
  overflow: hidden;
}
.launch-bar i {
  display: block;
  background: var(--primary);
  height: 100%;
  transition: width 0.1s;
}
.launch-splits {
  color: var(--muted);
  font:
    9px ui-monospace,
    monospace;
}
.controls-hidden .hud-toolbar,
.controls-hidden .hud-dock {
  opacity: 0;
  pointer-events: none;
}
.flash {
  box-shadow: inset 0 0 70px #a7392f40;
}
.shift-flash {
  box-shadow: inset 0 0 60px #d2763040;
}
#modal-root {
  position: relative;
  z-index: 100;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #07140c99;
  backdrop-filter: blur(8px);
  padding: 24px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 7px;
  width: min(540px, 100%);
  padding: 32px;
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 25px 90px #0003;
  outline: none;
}
.modal h2 {
  font-size: 25px;
  letter-spacing: -0.7px;
  font-weight: 600;
  margin: 8px 0 28px;
  line-height: 1.4;
}
.modal-kicker {
  font:
    9px ui-monospace,
    monospace;
  color: var(--primary);
  letter-spacing: 0.16em;
}
.guide-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 22px 0;
}
.step-badge {
  min-width: 30px;
  color: var(--primary);
  font:
    13px ui-monospace,
    monospace;
  padding-top: 3px;
}
.guide-step strong {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 7px;
}
.guide-step p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  line-height: 1.8;
}
.guide-tips {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 13px 17px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.guide-tips p {
  margin: 8px 0;
}
.guide-tips strong {
  color: var(--text);
  margin-right: 5px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 26px;
}
.secondary-copy {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.history-list {
  padding: 0;
  list-style: none;
  margin: 24px 0;
}
.history-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  font-size: 12px;
  line-height: 1.7;
}
.history-list li strong {
  font:
    20px ui-monospace,
    monospace;
  color: var(--primary);
}
.history-list small {
  font-size: 10px;
  color: var(--muted);
}
#toast {
  position: fixed;
  z-index: 200;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 10px);
  max-width: calc(100% - 40px);
  padding: 13px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  box-shadow: 0 8px 30px #0002;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1400px) {
  .drive-grid {
    grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.4fr);
  }
  .sound-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sound-card {
    padding: 14px 10px;
    gap: 8px;
  }
  .sound-code {
    min-width: 39px;
    font-size: 9px;
  }
  .sound-title {
    font-size: 12px;
  }
  .sound-title small {
    font-size: 9px;
  }
  .instrument-host {
    height: 380px;
  }
}
@media (max-width: 1050px) {
  .drive-shell {
    padding-inline: 24px;
  }
  .drive-grid {
    grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1fr);
    gap: 20px;
  }
  .drive-header {
    gap: 16px;
  }
  .drive-header .home-brand-name {
    font-size: 15px;
  }
  .drive-header .home-brand-name > span {
    font-size: 8px;
  }
  .drive-tools {
    gap: 5px;
  }
  .drive-tools .pill {
    padding: 10px;
    font-size: 10px;
  }
  .mode-switch button {
    padding: 8px;
    font-size: 10px;
  }
  .cockpit {
    padding: 16px;
  }
  .instrument-host {
    height: 285px;
  }
  .workspace-heading h1 {
    font-size: 26px;
  }
}
@media (max-width: 760px) {
  .drive-shell {
    padding: 0 18px 22px;
  }
  .drive-header {
    align-items: flex-start;
    padding: 18px 0;
    flex-direction: column;
    gap: 18px;
  }
  .drive-tools {
    width: 100%;
    justify-content: flex-start;
  }
  .mode-switch {
    margin-left: auto;
  }
  .workspace-heading {
    padding: 25px 0 22px;
    align-items: flex-start;
  }
  .workspace-heading h1 {
    font-size: 23px;
  }
  .console-state {
    font-size: 9px;
    margin-top: 3px;
  }
  .drive-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
  }
  .cockpit {
    position: static;
    width: 100%;
    padding: 18px;
    order: 0;
  }
  .setup-column {
    width: 100%;
    order: 1;
  }
  .instrument-host {
    height: 260px;
    margin: 10px 0 0;
  }
  .monitor-caption {
    font-size: 8px;
  }
  .engine-start {
    min-height: 65px;
  }
  .start-area {
    padding-top: 18px;
  }
  .sound-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sound-card {
    padding: 13px 10px;
    gap: 8px;
  }
  .sound-code {
    font-size: 9px;
    min-width: 36px;
  }
  .sound-title {
    font-size: 12px;
  }
  .sound-title small {
    font-size: 9px;
  }
  .sound-indicator {
    display: none;
  }
  .drive-footer {
    flex-direction: column;
    gap: 12px;
  }
  .hud .drive-grid {
    display: block;
    height: 100%;
  }
  .hud .cockpit {
    height: 100%;
    padding: 160px 16px 150px;
  }
  .hud .instrument-host {
    height: 100%;
    max-height: 55vh;
  }
  .hud-toolbar {
    left: 16px;
    right: 16px;
    top: 15px;
  }
  .hud-status {
    font-size: 9px;
    max-width: 56%;
  }
  .hud-controls .pill {
    padding: 9px;
    font-size: 10px;
  }
  .hud .launch-banner {
    left: 16px;
    right: 16px;
    top: 63px;
    gap: 15px;
    padding: 12px;
  }
  .launch-time {
    font-size: 27px;
  }
  .hud .hud-dock {
    left: 16px;
    right: 16px;
    bottom: max(14px, env(safe-area-inset-bottom));
    display: grid !important;
    grid-template-columns: 38px minmax(65px, 1fr) 38px 38px 57px 38px;
    grid-template-rows: 44px 50px;
    gap: 1px;
  }
  .hud-dock button,
  .hud-volume {
    padding: 9px 6px;
    min-height: 0;
    min-width: 0;
    font-size: 12px;
  }
  .hud-dock .current-sound {
    font-size: 12px;
  }
  .hud-dock .pedal {
    min-width: 0;
    grid-column: span 2;
  }
  .hud-dock .stop-button {
    min-width: 0;
    grid-column: span 2;
  }
  .hud-volume {
    font-size: 11px;
  }
  .hud-volume small {
    font-size: 7px;
  }
  .settings-grid {
    gap: 18px 16px;
  }
  .gauge-carousel {
    grid-auto-columns: 165px;
  }
  .modal {
    padding: 24px;
  }
  .modal h2 {
    font-size: 22px;
  }
}
@media (max-width: 380px) {
  .sound-grid {
    grid-template-columns: 1fr;
  }
  .mode-switch {
    margin-left: 0;
  }
  .workspace-heading {
    gap: 8px;
  }
  .console-state {
    max-width: 70px;
    white-space: normal;
  }
  .instrument-host {
    height: 220px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .hud-dock {
    grid-template-columns: 30px minmax(50px, 1fr) 30px 30px 47px 30px;
  }
  .launch-details {
    display: none;
  }
}
@media (max-height: 550px) and (min-width: 650px) {
  .hud .cockpit {
    padding: 95px 25px 74px;
  }
  .hud .instrument-host {
    max-height: 78vh;
  }
  .hud .launch-banner {
    left: auto;
    right: 24px;
    top: 68px;
    width: 235px;
    gap: 12px;
    padding: 9px;
  }
  .launch-details {
    display: none;
  }
  .hud-dock {
    left: 24px;
    right: 24px;
    bottom: 12px;
  }
  .hud-dock button,
  .hud-volume {
    min-height: 46px;
    padding: 8px;
  }
  .hud-toolbar {
    top: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
