/* Acoustic Print Studio — quiet, light, white-box interface. */
:root {
  color-scheme: light;
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #e5e5ea;
  --line-strong: #d2d2d7;
  --blue: #0071e3;
  --blue-soft: #e8f2ff;
  --teal: #2b9c94;
  --teal-soft: #e8f6f3;
  --coral: #e66a4e;
  --coral-soft: #fff0ec;
  --amber: #b7791f;
  --amber-soft: #fff7e6;
  --violet: #7b6bb0;
  --violet-soft: #f1effa;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.035);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.04), 0 20px 50px rgba(0, 0, 0, 0.07);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Google Sans Text", "Google Sans", "DM Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Google Sans Display", "Google Sans", "DM Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Roboto Mono", "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 113, 227, 0.055), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(43, 156, 148, 0.045), transparent 24rem),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.topbar__inner {
  width: min(1240px, calc(100% - 48px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: var(--blue-soft);
}

.brand__mark svg {
  width: 19px;
  height: 19px;
}

.brand__text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.brand__text strong {
  font-weight: 650;
}

.brand__text span {
  color: var(--muted);
  font-weight: 450;
}

.topbar__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.live-pill,
.telemetry,
.compact-button,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-soft);
  border-radius: 999px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.live-pill {
  gap: 8px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(43, 156, 148, 0.10);
  transition: background-color 260ms var(--ease), box-shadow 260ms var(--ease);
}

.status-dot.is-live {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(43, 156, 148, 0.10);
}

.status-dot.is-paused {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(183, 121, 31, 0.11);
}

.telemetry {
  gap: 6px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.telemetry strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.telemetry__sep {
  color: var(--line-strong);
}

.compact-button,
.icon-button {
  gap: 7px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 560;
  cursor: pointer;
  transition: border-color 220ms var(--ease), background-color 220ms var(--ease), transform 220ms var(--ease);
}

.compact-button:hover,
.icon-button:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.compact-button:active,
.icon-button:active,
.btn:active,
.phrase-chip:active,
.tool-button:active {
  transform: scale(0.975);
}

.compact-button--primary {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.compact-button--primary:hover {
  background: #000;
  border-color: #000;
}

.icon-button {
  width: 34px;
  padding: 0;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.page {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 74px 0 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.72fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: end;
  padding: 22px 8px 72px;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 5.4vw, 70px);
  line-height: 1.035;
  font-weight: 650;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--faint);
}

.hero__lede {
  max-width: 600px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.62;
  letter-spacing: -0.012em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

.btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease), transform 240ms var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn--primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.18);
}

.btn--primary:hover {
  background: #0077ed;
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.24);
}

.btn--secondary {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--line);
}

.btn--secondary:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.btn--quiet {
  color: var(--muted);
  background: transparent;
}

.btn--quiet:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.035);
}

.hero__aside {
  min-width: 0;
}

.phrase-panel {
  padding: 21px;
  border: 1px solid rgba(0, 0, 0, 0.065);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  font-size: 12px;
  font-weight: 600;
}

.panel-heading__meta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}

.phrase-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.phrase-chip {
  min-height: 31px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 540;
  cursor: pointer;
  transition: color 220ms var(--ease), border-color 220ms var(--ease), background-color 220ms var(--ease), transform 220ms var(--ease);
}

.phrase-chip:hover {
  color: var(--ink-soft);
  border-color: var(--line-strong);
  background: #fff;
}

.phrase-chip.is-active {
  color: var(--blue);
  border-color: rgba(0, 113, 227, 0.22);
  background: var(--blue-soft);
}

.phrase-chip__count {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.phrase-chip.is-active .phrase-chip__count {
  color: rgba(0, 113, 227, 0.62);
}

.hero__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.055);
}

.tool-button {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 540;
  cursor: pointer;
  transition: color 220ms var(--ease), background-color 220ms var(--ease), transform 220ms var(--ease);
}

.tool-button:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.tool-button svg {
  width: 14px;
  height: 14px;
}

.tool-button.is-on {
  color: var(--coral);
  background: var(--coral-soft);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 8px 21px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(25px, 2.7vw, 34px);
  line-height: 1.15;
  font-weight: 640;
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.track-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.065);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 360ms var(--ease), box-shadow 360ms var(--ease), border-color 360ms var(--ease);
}

.track-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow: var(--shadow-md);
}

.track-card--wide {
  grid-column: 1 / -1;
}

.track-card__head {
  min-height: 42px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.track-card__title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.track-index {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.track-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.track-card__sub {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.45;
}

.track-metric {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  text-align: right;
}

.canvas-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 17px;
  background: linear-gradient(180deg, #fcfcfe 0%, #f8f8fa 100%);
}

.canvas-wrap--wave,
.canvas-wrap--curve {
  height: 196px;
}

.canvas-wrap--ruler {
  height: 158px;
}

.canvas-wrap--barcode {
  height: 176px;
}

.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 12px;
  color: var(--faint);
  font-size: 10px;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend__swatch {
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.legend--blue { color: var(--blue); }
.legend--teal { color: var(--teal); }
.legend--coral { color: var(--coral); }
.legend--violet { color: var(--violet); }
.legend--muted { color: var(--faint); }

.track3-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.65fr);
  gap: 14px;
  align-items: stretch;
}

.speaker-gauge {
  min-height: 158px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 17px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface-soft);
}

.speaker-gauge__title {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.meter {
  height: 30px;
  display: flex;
  gap: 2px;
  overflow: hidden;
  border-radius: 9px;
  background: #ececef;
}

.meter__segment {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 650;
  transition: width 520ms var(--ease);
}

.meter__segment--removed {
  background: var(--coral);
}

.meter__segment--retained {
  background: var(--teal);
}

.speaker-gauge__legend {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 10px;
}

.speaker-gauge__legend strong {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-weight: 600;
}

.inline-select {
  min-height: 30px;
  max-width: 170px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 28px 0 9px;
  color: var(--ink-soft);
  background: #fff;
  font-family: var(--mono);
  font-size: 10px;
  outline: none;
}

.inline-select:focus {
  border-color: rgba(0, 113, 227, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08);
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

.segment-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.segment-pill {
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 11px;
  padding: 9px 10px;
  background: var(--surface-soft);
}

.segment-pill__label {
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
  font-weight: 600;
}

.segment-pill__value {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
}

.segment-pill__value span {
  color: var(--faint);
  font-weight: 400;
}

.drawer-shell {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-5px);
  transition: grid-template-rows 560ms var(--ease), opacity 300ms var(--ease), transform 560ms var(--ease), margin 560ms var(--ease);
  margin-top: 0;
}

.drawer-shell.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  margin-top: 18px;
}

.drawer-shell__inner {
  min-height: 0;
  overflow: hidden;
}

.drawer {
  border: 1px solid rgba(0, 0, 0, 0.065);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 21px;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.drawer__head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.drawer__head p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 11px;
}

.drawer__close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

.drawer__close:hover {
  background: var(--canvas);
  color: var(--ink);
}

.drawer__close svg {
  width: 13px;
  height: 13px;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.control__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 560;
}

.control__value {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.control__hint {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 9px;
}

input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: #dedee3;
}

input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  appearance: none;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: #dedee3;
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.drawer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.055);
}

.soft-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 11px;
  font-weight: 560;
  cursor: pointer;
  transition: background-color 220ms var(--ease), border-color 220ms var(--ease), transform 220ms var(--ease);
}

.soft-button:hover {
  background: var(--canvas);
  border-color: var(--line-strong);
}

.soft-button.is-on {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: rgba(0, 113, 227, 0.18);
}

.soft-button.is-off {
  color: var(--coral);
  background: var(--coral-soft);
  border-color: rgba(230, 106, 78, 0.18);
}

.enroll-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 560;
}

.text-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  outline: none;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.text-input:focus {
  border-color: rgba(0, 113, 227, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08);
}

.enroll-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.enroll-preview {
  border: 1px solid rgba(0, 0, 0, 0.055);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-soft);
}

.enroll-preview__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--faint);
  font-size: 9px;
}

.enroll-preview__canvas {
  height: 78px;
}

.enroll-preview__canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.audit {
  margin-top: 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
}

.audit summary {
  min-height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 540;
  cursor: pointer;
  list-style: none;
}

.audit summary::-webkit-details-marker {
  display: none;
}

.audit summary::after {
  content: "＋";
  color: var(--faint);
  font-size: 15px;
  font-weight: 400;
  transition: transform 320ms var(--ease);
}

.audit[open] summary::after {
  transform: rotate(45deg);
}

.audit__body {
  padding: 0 20px 20px;
}

.scalar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.scalar-item {
  min-width: 0;
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(0, 0, 0, 0.028);
}

.scalar-item__name {
  display: block;
  overflow: hidden;
  margin-bottom: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scalar-item__value {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

.footer {
  padding: 26px 8px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--faint);
  font-size: 10px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(390px, calc(100vw - 48px));
  min-height: 42px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 13px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 11px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 280ms var(--ease), transform 360ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.nowrap {
  white-space: nowrap;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button-label {
  white-space: nowrap;
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    align-items: start;
  }

  .hero__aside {
    max-width: 640px;
  }

  .track-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .topbar__inner,
  .page {
    width: min(100% - 32px, 1240px);
  }

  .topbar__inner {
    min-height: 58px;
  }

  .brand__text span,
  .telemetry,
  .compact-button--hide-small {
    display: none;
  }

  .page {
    padding-top: 46px;
  }

  .hero {
    padding: 8px 2px 50px;
  }

  .hero h1 {
    font-size: clamp(34px, 10.4vw, 46px);
  }

  .hero__lede {
    font-size: 15px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 9px;
    padding-bottom: 17px;
  }

  .track-card {
    padding: 17px;
    border-radius: 22px;
  }

  .track-card__head {
    flex-direction: column;
    gap: 8px;
  }

  .track-metric {
    text-align: left;
  }

  .canvas-wrap--wave,
  .canvas-wrap--curve {
    height: 175px;
  }

  .track3-body {
    grid-template-columns: 1fr;
  }

  .speaker-gauge {
    min-height: 132px;
  }

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

  .control-grid,
  .enroll-grid {
    grid-template-columns: 1fr;
  }

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

  .footer {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 460px) {
  .live-pill {
    padding: 0 9px;
  }

  .live-pill span:last-child {
    display: none;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__actions {
    align-items: stretch;
  }

  .hero__toolbar {
    gap: 2px;
  }

  .track-card__title {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Capture mode is deterministic: no entrance movement, hover lift, or animated panel state. */
.capture-mode *,
.capture-mode *::before,
.capture-mode *::after {
  animation: none !important;
  transition: none !important;
}

.capture-mode .toast {
  display: none;
}

/* -------------------------------------------------------------------------
   Scroll story: open compositions, no card containers, continuous fades.
   ------------------------------------------------------------------------- */
.topbar {
  border-bottom-color: transparent;
  background: rgba(251, 251, 253, 0.76);
}

.story {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 0 0 88px;
}

.hero.hero--story {
  min-height: calc(100svh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 84px 0 72px;
  text-align: center;
}

.hero__center {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.hero--story .eyebrow {
  text-align: center;
  margin-bottom: 22px;
}

.hero--story h1 {
  max-width: 1040px;
  margin: 0 auto;
  font-size: clamp(52px, 7.2vw, 94px);
  line-height: 0.99;
  letter-spacing: -0.065em;
}

.hero--story .hero__lede {
  max-width: 650px;
  margin: 28px auto 0;
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.62;
}

.hero--story .hero__actions {
  justify-content: center;
  margin-top: 32px;
}

.phrase-rail {
  max-width: 860px;
  margin: 52px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.phrase-rail__head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin-bottom: 15px;
  color: var(--faint);
  font-size: 11px;
}

.phrase-rail__meta {
  font-family: var(--mono);
  font-size: 9px;
}

.phrase-rail .phrase-list {
  justify-content: center;
}

.phrase-rail .phrase-chip {
  border-color: transparent;
  background: rgba(0, 0, 0, 0.045);
}

.phrase-rail .phrase-chip:hover {
  border-color: transparent;
  background: rgba(0, 0, 0, 0.07);
}

.phrase-rail .phrase-chip.is-active {
  border-color: transparent;
  background: var(--blue-soft);
}

.phrase-rail .hero__toolbar {
  justify-content: center;
  margin-top: 19px;
  padding-top: 0;
  border-top: 0;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: 58px;
  color: #a1a1a6;
  font-size: 9px;
  font-weight: 560;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scroll-cue svg {
  width: 16px;
  height: 24px;
  animation: scroll-cue 2.2s var(--ease) infinite;
}

@keyframes scroll-cue {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  45% { transform: translateY(5px); opacity: 0.9; }
}

.drawer-shell {
  width: min(1080px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.drawer-shell.is-open {
  margin-top: 0;
}

.drawer.drawer--plain {
  padding: 54px 0 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.enroll-preview--plain {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.showcase {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11vh 0;
  will-change: opacity, transform;
}

.js .showcase {
  opacity: 0;
  transform: translateY(58px) scale(0.992);
  transition: opacity 1.15s var(--ease), transform 1.25s var(--ease);
}

.js .showcase.is-inview {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.showcase__head {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: clamp(34px, 7vw, 104px);
  align-items: end;
}

.showcase__head .eyebrow {
  margin-bottom: 18px;
}

.showcase h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 5.3vw, 72px);
  line-height: 1.02;
  font-weight: 650;
  letter-spacing: -0.055em;
}

.showcase__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 5px;
}

.showcase__side--inline {
  align-items: stretch;
}

.showcase__lede {
  max-width: 430px;
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
  letter-spacing: -0.008em;
}

.showcase__side .showcase__lede {
  margin: 0;
}

.showcase__metric {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
}

#barcodeOverallSim {
  color: var(--blue);
}

.stage {
  position: relative;
  width: min(1100px, 100%);
  height: clamp(310px, 36vw, 480px);
  margin: 48px auto 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 10% 2% 4%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 48%, rgba(0, 113, 227, 0.065), rgba(0, 113, 227, 0.018) 44%, transparent 70%);
  filter: blur(24px);
}

.stage > canvas {
  display: block;
  width: 200%;
  height: 100%;
  will-change: transform;
}

.stage--ruler {
  height: clamp(250px, 27vw, 350px);
  margin: 0;
}

.stage--barcode {
  height: clamp(250px, 27vw, 360px);
}

.stage-row {
  width: min(1100px, 100%);
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: clamp(34px, 6vw, 84px);
  align-items: end;
}

.stripping {
  padding-bottom: 10px;
}

.stripping__label {
  display: block;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 11px;
}

.stripping .meter {
  height: 7px;
  gap: 2px;
  border-radius: 999px;
  background: #ececef;
}

.stripping .meter__segment {
  color: transparent;
  font-size: 0;
}

.stripping__legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  color: var(--faint);
  font-size: 10px;
}

.stripping__legend strong {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-weight: 600;
}

.stage-foot {
  width: min(1100px, 100%);
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--faint);
  font-size: 10px;
}

.stage-note {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.015em;
}

.stage-foot .legend-row {
  margin: 0;
}

.stage-scrub {
  width: min(1100px, 100%);
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--faint);
}

.stage-scrub[hidden] {
  display: none;
}

.stage-scrub__label,
.stage-scrub__value {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.stage-scrub__value {
  min-width: 38px;
  text-align: right;
  color: var(--muted);
}

.scrubber {
  --scrub-fill: 0%;
  flex: 1 1 auto;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  box-shadow: none;
  cursor: ew-resize;
}

.scrubber:focus,
.scrubber:focus-visible {
  outline: none;
}

.scrubber::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    rgba(0, 113, 227, 0.70) 0 var(--scrub-fill),
    rgba(29, 29, 31, 0.10) var(--scrub-fill) 100%
  );
}

.scrubber::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(0, 113, 227, 0.09);
  transition: box-shadow 180ms ease, transform 180ms ease;
  -webkit-appearance: none;
}

.scrubber:hover::-webkit-slider-thumb,
.scrubber:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 8px rgba(0, 113, 227, 0.12);
}

.scrubber::-moz-range-track {
  height: 2px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.10);
}

.scrubber::-moz-range-progress {
  height: 2px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.70);
}

.scrubber::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(0, 113, 227, 0.09);
}

.capture-mode .stage-scrub {
  display: none !important;
}

.compare-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inline-select {
  max-width: 190px;
  border-color: transparent;
  background: rgba(0, 0, 0, 0.045);
}

.segment-row {
  width: min(1100px, 100%);
  margin: 27px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.segment-pill {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.segment-pill__label {
  margin-bottom: 5px;
  font-size: 10px;
}

.segment-pill__value {
  font-size: 12px;
}

.audit {
  width: min(1100px, 100%);
  margin: 42px auto 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.audit summary {
  min-height: 48px;
  padding: 0;
}

.audit__body {
  padding: 11px 0 0;
}

.scalar-item {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.footer {
  width: min(1100px, 100%);
  margin: 52px auto 0;
  padding: 22px 0 0;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(58px) scale(0.992);
  transition: opacity 1.15s var(--ease), transform 1.25s var(--ease);
}

.js [data-reveal].is-inview {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.capture-mode .showcase,
.capture-mode [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 900px) {
  .showcase__head {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .showcase__lede {
    margin-left: 0;
    max-width: 590px;
  }

  .stage-row {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .stripping {
    max-width: 500px;
  }
}

@media (max-width: 760px) {
  .story {
    width: min(100% - 36px, 1240px);
    padding-bottom: 54px;
  }

  .hero.hero--story {
    min-height: calc(100svh - 58px);
    padding: 58px 0 52px;
  }

  .hero--story h1 {
    font-size: clamp(42px, 12.3vw, 58px);
  }

  .hero--story .hero__lede {
    margin-top: 22px;
    font-size: 15px;
  }

  .hero--story .hero__actions {
    margin-top: 27px;
  }

  .phrase-rail {
    margin-top: 38px;
  }

  .scroll-cue {
    margin-top: 40px;
  }

  .drawer.drawer--plain {
    padding-top: 38px;
  }

  .showcase {
    min-height: auto;
    padding: 82px 0;
  }

  .showcase h2 {
    font-size: clamp(37px, 10.8vw, 52px);
  }

  .stage,
  .stage--wave,
  .stage--curve {
    height: 270px;
    margin-top: 34px;
  }

  .stage--ruler {
    height: 240px;
  }

  .stage--barcode {
    height: 250px;
    margin-top: 34px;
  }

  .stage-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
  }

  .segment-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 20px;
    margin-top: 24px;
  }
}

@media (max-width: 460px) {
  .hero--story h1 {
    font-size: clamp(38px, 11.8vw, 48px);
  }

  .phrase-rail .phrase-chip {
    font-size: 10px;
  }

  .stage,
  .stage--wave,
  .stage--curve,
  .stage--ruler,
  .stage--barcode {
    height: 230px;
  }
}

/* -------------------------------------------------------------------------
   Gemini-inspired typography rhythm
   Open tracking and generous leading keep the Chinese and Latin text calm.
   ------------------------------------------------------------------------- */
body {
  font-family: var(--font);
  font-optical-sizing: auto;
  line-height: 1.68;
  letter-spacing: 0.012em;
}

.brand__text {
  line-height: 1.45;
  letter-spacing: 0.012em;
}

.eyebrow {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.145em;
}

.hero h1,
.hero--story h1,
.showcase h2 {
  font-family: var(--display);
  font-weight: 540;
  text-wrap: balance;
}

.hero h1 {
  font-size: clamp(46px, 6.35vw, 84px);
  line-height: 1.16;
  letter-spacing: 0.004em;
}

.hero--story h1 {
  font-size: clamp(46px, 6.35vw, 84px);
  line-height: 1.16;
  letter-spacing: 0.004em;
}

.showcase h2 {
  font-size: clamp(38px, 4.85vw, 66px);
  line-height: 1.18;
  letter-spacing: 0.008em;
}

.hero__lede,
.hero--story .hero__lede {
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.9;
  letter-spacing: 0.018em;
  text-wrap: pretty;
}

.showcase__lede {
  font-size: 14.5px;
  line-height: 1.9;
  letter-spacing: 0.018em;
  text-wrap: pretty;
}

.showcase__metric,
.stage-note,
.stripping__label,
.stripping__legend,
.phrase-rail__head,
.footer {
  line-height: 1.75;
  letter-spacing: 0.018em;
}

.phrase-chip,
.btn,
.compact-button,
.icon-button,
.live-pill,
.tool-button {
  letter-spacing: 0.012em;
}

.btn {
  font-weight: 560;
}

@media (max-width: 760px) {
  .hero--story h1 {
    font-size: clamp(38px, 10.6vw, 52px);
    line-height: 1.17;
    letter-spacing: 0.006em;
  }

  .hero--story .hero__lede {
    font-size: 15.5px;
    line-height: 1.86;
  }

  .showcase h2 {
    font-size: clamp(34px, 9.8vw, 46px);
    line-height: 1.2;
    letter-spacing: 0.01em;
  }

  .showcase__lede {
    font-size: 14px;
    line-height: 1.88;
  }
}

@media (max-width: 460px) {
  .hero--story h1 {
    font-size: clamp(35px, 10.4vw, 44px);
  }

  .showcase h2 {
    font-size: clamp(32px, 9.7vw, 42px);
  }
}

/* -------------------------------------------------------------------------
   Seamless panoramic stages, pinned overlays & prominent live microphone UX
   ------------------------------------------------------------------------- */
.compact-button--mic {
  color: var(--coral);
  border-color: rgba(230, 106, 78, 0.24);
  background: rgba(255, 240, 236, 0.78);
  padding: 0 13px;
}

.compact-button--mic:hover {
  background: #fff0ec;
  border-color: rgba(230, 106, 78, 0.45);
}

.compact-button--mic svg {
  width: 13px;
  height: 13px;
}

.compact-button--mic .mic-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  opacity: 0.75;
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
}

.compact-button--mic.is-on {
  color: #fff;
  background: linear-gradient(135deg, #e6553b 0%, #d93b52 100%);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(230, 85, 59, 0.30);
}

.compact-button--mic.is-on .mic-dot {
  background: #fff;
  opacity: 1;
  animation: mic-dot-pulse 1.3s ease-in-out infinite;
}

.btn--mic {
  position: relative;
  min-height: 46px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, #e85d3f 0%, #d93f5a 100%);
  box-shadow: 0 8px 24px rgba(230, 88, 63, 0.28), 0 1px 2px rgba(0, 0, 0, 0.08);
  overflow: visible;
}

.btn--mic:hover {
  background: linear-gradient(135deg, #ef6648 0%, #e04661 100%);
  box-shadow: 0 12px 30px rgba(230, 88, 63, 0.36), 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.btn--mic__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 1.5px solid rgba(232, 93, 63, 0.42);
  pointer-events: none;
  animation: mic-ring-idle 2.8s var(--ease) infinite;
}

.btn--mic.is-on {
  background: linear-gradient(135deg, #1d1d1f 0%, #3a3a40 100%);
  box-shadow: 0 8px 26px rgba(29, 29, 31, 0.22);
}

.btn--mic.is-on .btn--mic__pulse {
  border-color: rgba(232, 93, 63, 0.72);
  animation: mic-ring-active 1.35s ease-out infinite;
}

@keyframes mic-ring-idle {
  0%, 100% { opacity: 0.12; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.03, 1.12); }
}

@keyframes mic-ring-active {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.09, 1.32); }
}

@keyframes mic-dot-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65); }
  50% { transform: scale(1.18); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); }
}

.mic-callout {
  max-width: 720px;
  margin: 22px auto 0;
  padding: 10px 16px;
  border: 1px solid rgba(230, 106, 78, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-soft);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.028);
  transition: border-color 260ms var(--ease), background-color 260ms var(--ease), box-shadow 260ms var(--ease);
}

.mic-callout.is-live {
  border-color: rgba(230, 106, 78, 0.42);
  background: rgba(255, 245, 242, 0.92);
  box-shadow: 0 8px 26px rgba(230, 106, 78, 0.12);
}

.mic-callout__badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(230, 106, 78, 0.12);
  color: var(--coral);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mic-callout__text {
  line-height: 1.5;
  text-align: left;
}

/* Seamless stage panning & soft edge feathering */
.stage {
  border-radius: 18px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 2.2%, #000 97.8%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 2.2%, #000 97.8%, transparent 100%);
}

.stage.is-pannable {
  cursor: grab;
}

.stage.is-dragging {
  cursor: grabbing;
}

.stage--ruler,
.stage--barcode {
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 97.5%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 97.5%, transparent 100%);
}

/* Pinned left-edge labels for Tracks 3 & 4 so they stay legible while panning */
.stage-pinned {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 4;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stage-pinned--ruler {
  width: 68px;
  padding: 24px 0 22px 8px;
  background: linear-gradient(to right, rgba(245, 245, 247, 0.96) 58%, rgba(245, 245, 247, 0) 100%);
}

.stage-pinned__tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.stage-pinned__tag--linear {
  color: var(--faint);
}

.stage-pinned__tag--arc {
  color: var(--teal);
}

.stage-pinned--barcode {
  width: 84px;
  padding: 0 0 0 6px;
  background: linear-gradient(to right, rgba(245, 245, 247, 0.96) 66%, rgba(245, 245, 247, 0) 100%);
  justify-content: flex-start;
}

.stage-pinned__row {
  position: absolute;
  left: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
}

.stage-pinned__row--query {
  color: var(--ink-soft);
  top: 62px;
}

.stage-pinned__row--tmpl {
  color: var(--blue);
  top: 118px;
}

.stage-pinned__row--match {
  color: var(--faint);
  top: 164px;
}

/* Floating glassmorphic live microphone dock */
.mic-dock {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 55;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 28px));
  padding: 12px 16px;
  border: 1px solid rgba(230, 106, 78, 0.24);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 46px rgba(29, 29, 31, 0.14), 0 2px 8px rgba(230, 106, 78, 0.08);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: dock-enter 380ms var(--ease);
}

.mic-dock[hidden] {
  display: none;
}

@keyframes dock-enter {
  from { opacity: 0; transform: translate(-50%, 16px) scale(0.97); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.mic-dock__status {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.mic-dock__pulse {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(230, 106, 78, 0.55);
  animation: mic-dock-beat 1.4s ease-out infinite;
}

.mic-dock.is-frozen .mic-dock__pulse {
  background: var(--amber);
  animation: none;
  box-shadow: 0 0 0 4px rgba(183, 121, 31, 0.14);
}

@keyframes mic-dock-beat {
  0% { box-shadow: 0 0 0 0 rgba(230, 106, 78, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(230, 106, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 106, 78, 0); }
}

.mic-dock__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mic-dock__meta strong {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mic-dock__meta span {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mic-dock__vu {
  flex: 0 0 auto;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
}

.mic-dock__vu span {
  width: 3px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--coral) 0%, var(--blue) 100%);
  transition: height 65ms linear, opacity 120ms linear;
  opacity: 0.45;
}

.mic-dock__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.mic-dock__btn {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), transform 180ms var(--ease);
}

.mic-dock__btn:hover {
  background: var(--canvas);
  border-color: var(--line-strong);
}

.mic-dock__btn:active {
  transform: scale(0.97);
}

.mic-dock__btn--accent {
  color: #fff;
  background: var(--blue);
  border-color: transparent;
}

.mic-dock__btn--accent:hover {
  background: #0077ed;
  border-color: transparent;
}

.mic-dock__btn--danger {
  color: var(--coral);
  background: var(--coral-soft);
  border-color: rgba(230, 106, 78, 0.22);
}

.mic-dock__btn--danger:hover {
  background: #ffe3dc;
}

.capture-mode .mic-dock,
.capture-mode .btn--mic__pulse {
  display: none !important;
}

body.is-mic-active .toast {
  bottom: 92px;
}

@media (max-width: 760px) {
  body.is-mic-active .toast {
    bottom: 126px;
  }
  .mic-callout {
    border-radius: 16px;
    padding: 10px 14px;
    font-size: 11.5px;
  }

  .mic-dock {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    bottom: 14px;
  }

  .mic-dock__vu {
    display: none;
  }

  .mic-dock__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .compact-button--mic span:last-child {
    display: none;
  }
}
