:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --surface: #fffdf9;
  --surface-2: #f0ece3;
  --text: #1d1b18;
  --muted: #6b645a;
  --border: #ded7c9;
  --accent: #cf3a1e;
  --accent-strong: #ad2c13;
  --accent-ink: #fffaf5;
  --accent-soft: rgba(207, 58, 30, 0.1);
  --ok: #1d7448;
  --ok-soft: rgba(29, 116, 72, 0.1);
  --warning: #8a5300;
  --warning-soft: rgba(138, 83, 0, 0.1);
  --danger: #a92319;
  --danger-soft: rgba(169, 35, 25, 0.1);
  --shadow: 0 10px 30px rgba(42, 32, 18, 0.08);
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141311;
  --surface: #1c1a17;
  --surface-2: #26221d;
  --text: #f1ece3;
  --muted: #a79e91;
  --border: #37322a;
  --accent: #ff6a4a;
  --accent-strong: #ff8668;
  --accent-ink: #1c0c07;
  --accent-soft: rgba(255, 106, 74, 0.12);
  --ok: #6bd3a0;
  --ok-soft: rgba(107, 211, 160, 0.12);
  --warning: #efb45c;
  --warning-soft: rgba(239, 180, 92, 0.12);
  --danger: #ff8a80;
  --danger-soft: rgba(255, 138, 128, 0.12);
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #141311;
    --surface: #1c1a17;
    --surface-2: #26221d;
    --text: #f1ece3;
    --muted: #a79e91;
    --border: #37322a;
    --accent: #ff6a4a;
    --accent-strong: #ff8668;
    --accent-ink: #1c0c07;
    --accent-soft: rgba(255, 106, 74, 0.12);
    --ok: #6bd3a0;
    --ok-soft: rgba(107, 211, 160, 0.12);
    --warning: #efb45c;
    --warning-soft: rgba(239, 180, 92, 0.12);
    --danger: #ff8a80;
    --danger-soft: rgba(255, 138, 128, 0.12);
    --shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  font-weight: 750;
}

h1[tabindex="-1"]:focus,
h2[tabindex="-1"]:focus {
  outline: none;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
}

p {
  margin: 0;
}

ol, ul {
  margin: 0;
  padding-left: 1.25rem;
}

a {
  color: var(--accent);
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.wrap {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.small {
  font-size: 0.85rem;
}

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

.spacer {
  flex: 1;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 750;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  border: 0;
  background: none;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.switch-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.switch-button svg {
  width: 18px;
  height: 18px;
}

.switch-button.text {
  width: auto;
  padding-inline: 9px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.switch-button:hover {
  color: var(--text);
  background: var(--surface-2);
}

.switch-button[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
}

/* Shared */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  background: var(--surface-2);
}

.button svg {
  width: 18px;
  height: 18px;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button.ghost {
  background: transparent;
  border-color: transparent;
}

.button.ghost:hover {
  background: var(--surface-2);
}

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

.button.danger:hover {
  background: var(--danger-soft);
}

.button.small {
  padding: 6px 10px;
  font-size: 0.82rem;
}

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

.icon-button {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.number, .select, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}

.number {
  width: 110px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.select {
  max-width: 100%;
}

/* Banners */

.banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.banner.error {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--text);
  border-left-width: 4px;
}

.banner.warning {
  background: var(--warning-soft);
  border-color: var(--warning);
  border-left-width: 4px;
  margin-bottom: 20px;
}

.banner p {
  margin-top: 4px;
  color: var(--muted);
}

.banner h3 {
  margin-bottom: 8px;
}

.warning-line {
  color: var(--warning);
}

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

/* Home */

.intro {
  max-width: 720px;
  margin: 48px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intro p {
  color: var(--muted);
  font-size: 1.05rem;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 20px;
  align-items: stretch;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  min-height: 290px;
  border-style: dashed;
  border-width: 1.5px;
  background: var(--surface-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-icon {
  width: 54px;
  height: 54px;
  color: var(--accent);
}

.drop-text {
  font-weight: 600;
  max-width: 380px;
}

.record-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-card h2 {
  margin-bottom: 2px;
}

.record-alert {
  padding: 10px 12px;
  border-radius: 9px;
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
  font-size: 0.85rem;
}

.record-device-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.record-device-row label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.record-device-row .select {
  flex: 1;
  min-width: 0;
}

.error-detail {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.record-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.record-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.4s ease-in-out infinite;
}

#record-time {
  margin-left: auto;
  font-weight: 700;
}

.level {
  height: 10px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.level span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ok), var(--warning), var(--danger));
  transition: width 0.1s linear;
}

.record-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.check input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.take-card {
  margin-top: 20px;
}

.take-wave-wrap {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}

.take-wave {
  display: block;
  width: 100%;
  height: 170px;
  touch-action: none;
  cursor: ew-resize;
}

.take-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.take-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
}

.take-controls .number {
  width: 112px;
}

#take-selection {
  margin-left: auto;
  padding-bottom: 9px;
  color: var(--muted);
}

.take-actions {
  margin-top: 16px;
}

.record-actions .button {
  flex: 1;
}

.steps {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps ol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
  padding-left: 1.1rem;
}

.steps li {
  padding-left: 2px;
}

/* Editor */

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 40px 0 22px;
}

.view-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#editor-source {
  overflow-wrap: anywhere;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 700;
}

.stat.ok .stat-value {
  color: var(--ok);
}

.stat.danger .stat-value {
  color: var(--danger);
}

.mini-meter {
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.mini-meter span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.mini-meter span.over {
  background: var(--danger);
}

.bpm-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding-block: 18px;
}

.bpm-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bpm-head label {
  font-weight: 700;
}

.bpm-number {
  width: 84px;
  font-size: 1.15rem;
  font-weight: 700;
}

.bpm-range {
  flex: 1;
  min-width: 180px;
  accent-color: var(--accent);
}

.card + .card {
  margin-top: 20px;
}

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

.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.8rem;
  font-weight: 650;
}

.chip:hover {
  color: var(--text);
  background: var(--surface-2);
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.pattern-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  text-align: left;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.pattern-button:hover {
  border-color: var(--accent);
}

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

.pattern-number {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
}

.pattern-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.object-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.object {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.object.expanded {
  border-color: var(--accent);
}

.object-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  text-align: left;
}

.object-header:hover {
  background: var(--surface-2);
}

.object-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.object-title {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-sub {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-time {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.owner {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.alias {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.empty {
  background: var(--surface-2);
  color: var(--muted);
}

.object-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  background: color-mix(in srgb, var(--surface-2) 40%, transparent);
}

.object-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0;
}

.object-info div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.object-info dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.object-info dd {
  margin: 0;
  font-size: 0.9rem;
}

.trim {
  border: 0;
  padding: 0;
  margin: 0;
}

.trim legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.trim-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.trim-row label,
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
}

.object-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Send */

.send-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.transport {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#play-time {
  margin-left: auto;
}

.play-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.play-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.send-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.send-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.instructions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.instructions p:first-child {
  font-weight: 650;
}

/* Dialog */

.dialog {
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(10, 8, 5, 0.55);
  backdrop-filter: blur(2px);
}

.dialog-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hex-editor {
  width: 100%;
  height: 320px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
  white-space: pre;
  overflow: auto;
}

.dialog-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 20px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Busy / toast */

.busy {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 10, 7, 0.45);
  backdrop-filter: blur(3px);
}

.busy-card {
  width: min(420px, 100%);
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

.busy-label {
  font-weight: 700;
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.15s ease;
}

.progress span.indeterminate {
  width: 35%;
  animation: slide 1.2s ease-in-out infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 110;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 600;
  max-width: calc(100vw - 32px);
}

.site-footer {
  padding-block: 36px 48px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}

/* States */

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

/* Responsive */

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

  .dropzone {
    min-height: 230px;
  }

  .steps ol {
    grid-template-columns: 1fr;
  }

  .bpm-card {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .bpm-range {
    width: 100%;
  }

  .summary {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 620px) {
  .take-wave {
    height: 140px;
  }

  #take-selection {
    margin-left: 0;
    padding-bottom: 0;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-block: 12px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  #nav-send {
    display: none;
  }

  .nav-link {
    padding: 6px 8px;
    font-size: 0.85rem;
  }

  .brand-tag {
    display: none;
  }

  .view-head {
    margin-top: 24px;
  }

  .view-actions {
    width: 100%;
  }

  .view-actions .button {
    flex: 1;
  }

  .intro {
    margin-top: 28px;
  }

  .card {
    padding: 18px;
  }

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

  .object-time {
    display: none;
  }

  .pattern-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .pattern-button {
    padding: 8px;
  }

  .transport {
    gap: 8px;
  }

  #play-time {
    width: 100%;
    margin-left: 0;
  }

  .dialog-inner {
    padding: 16px;
  }

  .hex-editor {
    height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
