:root {
  color-scheme: dark;
  --bg: #050b13;
  --bg-2: #08111e;
  --panel: rgba(11, 23, 38, 0.86);
  --panel-strong: #0c1a2a;
  --panel-soft: #102238;
  --line: rgba(166, 197, 221, 0.13);
  --line-strong: rgba(166, 197, 221, 0.24);
  --text: #eef6fb;
  --muted: #8da4b7;
  --dim: #5f7487;
  --teal: #18dbc5;
  --teal-soft: rgba(24, 219, 197, 0.13);
  --orange: #ff6b35;
  --orange-soft: rgba(255, 107, 53, 0.15);
  --blue: #4fa8ff;
  --yellow: #ffd166;
  --danger: #ff5c75;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-sm: 11px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eaf0f3;
  --bg-2: #f5f8fa;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --panel-soft: #edf4f6;
  --line: rgba(18, 47, 65, 0.12);
  --line-strong: rgba(18, 47, 65, 0.22);
  --text: #122432;
  --muted: #587083;
  --dim: #7a8d9b;
  --teal: #009d91;
  --teal-soft: rgba(0, 157, 145, 0.11);
  --orange: #e34f1b;
  --orange-soft: rgba(227, 79, 27, 0.12);
  --shadow: 0 24px 60px rgba(25, 52, 69, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 2%, rgba(24, 219, 197, 0.085), transparent 28rem),
    radial-gradient(circle at 12% 21%, rgba(79, 168, 255, 0.06), transparent 26rem),
    linear-gradient(145deg, var(--bg), var(--bg-2));
}

button,
input,
select {
  font: inherit;
}

button,
label[for="fileInput"],
.drop-zone {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.drop-zone:focus-visible,
label[for="fileInput"]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.app-shell {
  width: min(1560px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(24, 219, 197, 0.48);
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(24, 219, 197, 0.12);
}

.brand-mark::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 14px var(--orange);
}

.brand-mark span {
  position: absolute;
  left: 6px;
  right: 6px;
  height: 1px;
  background: var(--teal);
  transform-origin: 50% 50%;
}

.brand-mark span:nth-child(1) {
  transform: rotate(0deg);
}

.brand-mark span:nth-child(2) {
  transform: rotate(60deg);
}

.brand-mark span:nth-child(3) {
  transform: rotate(120deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font: 600 9px/1 monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.privacy-badge {
  padding: 7px 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
}

.privacy-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  cursor: pointer;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.018), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  min-height: 405px;
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(420px, 0.82fr) 1.18fr;
  overflow: hidden;
}

.hero-copy {
  padding: 58px 42px 50px 54px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: block;
  margin-bottom: 13px;
  color: var(--teal);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.18em;
}

.hero h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(39px, 4.1vw, 66px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--teal);
  font-style: normal;
}

.hero p {
  max-width: 590px;
  margin: 23px 0 29px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.primary-button,
.secondary-button {
  min-height: 54px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-button {
  min-width: 184px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: #041310;
  background: var(--teal);
  border: 1px solid var(--teal);
  font-weight: 800;
}

.primary-button small {
  opacity: 0.7;
  font: 700 8px/1.2 ui-monospace, monospace;
}

.secondary-button {
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.rotor-visual {
  position: relative;
  min-height: 405px;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 48%, rgba(24, 219, 197, 0.07), transparent 23rem),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.018));
}

.visual-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, transparent, black 18%, black 100%);
  opacity: 0.45;
}

.shaft {
  position: absolute;
  left: 5%;
  right: 2%;
  top: 50%;
  height: 18px;
  transform: translateY(-50%);
  border: 1px solid rgba(173, 204, 221, 0.44);
  border-radius: 9px;
  background: linear-gradient(#60788a, #1e3446 46%, #0c1d2a 51%, #456174);
  box-shadow: 0 0 30px rgba(24, 219, 197, 0.05);
}

.bearing {
  position: absolute;
  top: 50%;
  width: 66px;
  height: 78px;
  transform: translate(-50%, -50%);
  border: 2px solid #688298;
  border-radius: 12px;
  background: linear-gradient(90deg, #182c3e 10%, #557084 48%, #142738 90%);
  box-shadow: inset 0 0 0 7px #0b1724, 0 10px 30px rgba(0, 0, 0, 0.35);
}

.bearing::before,
.bearing::after {
  content: "";
  position: absolute;
  left: -9px;
  right: -9px;
  height: 6px;
  border-radius: 2px;
  background: #7491a5;
}

.bearing::before {
  top: 8px;
}

.bearing::after {
  bottom: 8px;
}

.bearing-a {
  left: 30%;
}

.bearing-b {
  left: 72%;
}

.disc {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, #132434 0 17%, #5f7a8d 18% 23%, #102333 24% 38%, #17bcae 39% 42%, #0b1b29 43% 64%, #506c80 65% 69%, #112635 70%);
  border: 1px solid #7892a4;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35), inset -10px -7px 17px rgba(0, 0, 0, 0.35);
}

.disc-a {
  left: 12%;
  width: 125px;
  height: 125px;
}

.disc-b {
  left: 51%;
  width: 92px;
  height: 92px;
}

.sensor {
  position: absolute;
  top: 28%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--teal);
  font: 800 8px/1 ui-monospace, monospace;
  letter-spacing: 0.16em;
}

.sensor i {
  width: 11px;
  height: 11px;
  border: 2px solid var(--teal);
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(24, 219, 197, 0.7);
}

.sensor i::after {
  content: "";
  display: block;
  width: 1px;
  height: 53px;
  margin: 9px 0 0 11px;
  transform: rotate(-45deg);
  background: linear-gradient(var(--teal), transparent);
}

.sensor-a {
  left: 30%;
}

.sensor-b {
  left: 72%;
}

.rotor-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#heroWave,
.wave-ghost {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

#heroWave {
  filter: drop-shadow(0 0 7px rgba(24, 219, 197, 0.7));
  stroke-dasharray: 8 8;
  animation: dash 8s linear infinite;
}

.wave-ghost {
  opacity: 0.15;
  stroke-width: 12;
}

@keyframes dash {
  to {
    stroke-dashoffset: -160;
  }
}

.visual-label {
  position: absolute;
  right: 20px;
  bottom: 18px;
  padding: 7px 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(4, 12, 21, 0.56);
  font: 700 8px/1 ui-monospace, monospace;
  letter-spacing: 0.15em;
}

.workflow {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.step-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-heading > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--teal);
  border: 1px solid rgba(24, 219, 197, 0.32);
  border-radius: 8px;
  background: var(--teal-soft);
  font: 800 10px/1 ui-monospace, monospace;
}

.step-heading h2,
.section-header h2,
.info-card h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.step-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.drop-zone {
  min-height: 96px;
  margin: 20px 0 12px;
  padding: 16px;
  display: grid;
  place-content: center;
  gap: 5px;
  text-align: center;
  border: 1px dashed rgba(24, 219, 197, 0.38);
  border-radius: 12px;
  background: var(--teal-soft);
  cursor: pointer;
  transition: 0.2s ease;
}

.drop-zone::before {
  content: "＋";
  color: var(--teal);
  font-size: 22px;
}

.drop-zone strong {
  font-size: 12px;
}

.drop-zone span {
  color: var(--muted);
  font-size: 10px;
}

.drop-zone.dragging,
.drop-zone:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.sidebar-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}

.search-box {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.search-box span {
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
}

.sidebar-toolbar button,
.text-button {
  padding: 0 7px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.sidebar-toolbar button:hover,
.text-button:hover {
  color: var(--teal);
}

.channel-list {
  min-height: 180px;
  margin: 12px -6px 0 0;
  padding-right: 6px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.channel-item {
  min-height: 45px;
  margin-bottom: 6px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.022);
}

.channel-item:hover {
  border-color: var(--line);
}

.channel-item input[type="checkbox"] {
  accent-color: var(--teal);
}

.channel-item strong,
.channel-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-item strong {
  font-size: 10px;
}

.channel-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.channel-swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--dim);
}

.empty-state.compact {
  min-height: 100px;
}

.empty-state p {
  margin: 6px 0 0;
  font-size: 10px;
}

.empty-icon {
  font-size: 27px;
}

.data-quality {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.data-quality div {
  min-height: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.data-quality strong {
  color: var(--text);
  font-weight: 700;
}

.content-column {
  min-width: 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 108px;
  padding: 17px 19px;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -54px;
  width: 110px;
  height: 110px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.metric-card.accent {
  border-color: rgba(24, 219, 197, 0.28);
  background:
    radial-gradient(circle at 100% 100%, rgba(24, 219, 197, 0.12), transparent 55%),
    var(--panel);
}

.metric-card > span {
  display: block;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.metric-card > strong {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.metric-card strong b {
  font: inherit;
}

.metric-card strong i {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.metric-card small {
  display: block;
  margin-top: 7px;
  color: var(--dim);
  font-size: 9px;
}

.chart-card,
.mode-card {
  margin-top: 12px;
  padding: 23px 24px 19px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-header .eyebrow,
.info-card .eyebrow {
  margin-bottom: 8px;
}

.control-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.control-row label,
.mode-frequency-control label {
  display: grid;
  gap: 5px;
}

.control-row label span,
.mode-frequency-control label span,
.frequency-range-controls label {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}

select,
input[type="number"] {
  height: 34px;
  padding: 0 9px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-strong);
  outline: 0;
}

select {
  min-width: 98px;
  font-size: 10px;
}

input[type="number"] {
  width: 88px;
  font-size: 10px;
}

.small-button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(24, 219, 197, 0.38);
  border-radius: 8px;
  color: #041713;
  background: var(--teal);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.small-button.ghost {
  color: var(--muted);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.frequency-range-controls {
  margin-top: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.frequency-range-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.frequency-range-controls input {
  width: 72px;
  height: 29px;
}

.plot {
  width: 100%;
  position: relative;
}

.plot-frf {
  height: 480px;
  margin-top: 8px;
}

.plot-mode {
  height: 440px;
}

.chart-loading {
  height: 480px;
  display: grid;
  place-content: center;
  color: var(--muted);
  font-size: 12px;
}

.peak-strip {
  min-height: 45px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.peak-strip > span {
  color: var(--dim);
  font-size: 10px;
}

.peak-chip {
  padding: 7px 10px;
  border: 1px solid rgba(255, 107, 53, 0.35);
  border-radius: 8px;
  color: var(--orange);
  background: var(--orange-soft);
  cursor: pointer;
  font: 700 9px/1 ui-monospace, monospace;
}

.peak-chip.active {
  color: #fff;
  border-color: var(--orange);
  background: var(--orange);
}

.mode-frequency-control {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.mode-frequency-control > input[type="range"] {
  width: 180px;
  margin-bottom: 10px;
}

input[type="range"] {
  accent-color: var(--teal);
}

.mode-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: 18px;
}

.mode-main {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: rgba(4, 12, 21, 0.18);
}

.mode-tabs {
  height: 45px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.mode-tabs button {
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.mode-tabs button.active {
  color: var(--teal);
  background: var(--teal-soft);
}

.mode-table-wrap {
  height: 440px;
  overflow: auto;
  padding: 12px;
}

.mode-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.mode-table-wrap th,
.mode-table-wrap td {
  padding: 9px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.mode-table-wrap th {
  position: sticky;
  top: 0;
  color: var(--teal);
  background: var(--panel-strong);
}

.animation-bar {
  min-height: 57px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  border-top: 1px solid var(--line);
}

.animation-bar label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.animation-bar label input {
  width: 90px;
}

.play-button {
  min-height: 35px;
  padding: 0 15px;
  border: 1px solid rgba(255, 107, 53, 0.42);
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.mode-settings {
  min-width: 0;
}

.mode-settings h3 {
  margin: 2px 0 5px;
  font-size: 13px;
}

.mode-settings > p,
.mode-settings details p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.coordinate-table {
  max-height: 365px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.coordinate-row {
  min-height: 45px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}

.coordinate-row:last-child {
  border-bottom: 0;
}

.coordinate-row label {
  min-width: 0;
}

.coordinate-row label strong,
.coordinate-row label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coordinate-row label strong {
  font-size: 10px;
}

.coordinate-row label small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 8px;
}

.coordinate-row input {
  width: 100%;
  height: 29px;
}

.coordinate-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.coordinate-actions button {
  padding: 0 7px;
}

.mode-settings details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mode-settings summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
}

.mode-settings details p {
  margin-top: 9px;
}

.bottom-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.info-card {
  min-height: 180px;
  padding: 22px 24px;
}

.analysis-log {
  margin-top: 15px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.analysis-log p {
  margin: 6px 0;
}

.analysis-log p::before {
  content: "—";
  margin-right: 8px;
  color: var(--teal);
}

.analysis-log .warning::before {
  color: var(--yellow);
}

.analysis-log .error::before {
  color: var(--danger);
}

.export-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.export-grid button {
  min-height: 47px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}

.export-grid button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.export-grid button span {
  width: 31px;
  color: var(--teal);
  font: 800 9px/1 ui-monospace, monospace;
  text-align: center;
}

footer {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--dim);
  font-size: 9px;
}

.toast-stack {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  font-size: 10px;
  animation: toast-in 0.2s ease;
}

.toast.success {
  border-color: rgba(24, 219, 197, 0.38);
}

.toast.error {
  border-color: rgba(255, 92, 117, 0.45);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .hero-copy {
    padding-left: 38px;
  }

  .workflow {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .mode-layout {
    grid-template-columns: 1fr;
  }

  .mode-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
  }

  .mode-settings h3,
  .mode-settings > p,
  .mode-settings details {
    grid-column: 1 / -1;
  }

  .coordinate-table {
    max-height: 235px;
  }

  .coordinate-actions {
    grid-template-columns: 1fr;
    align-content: start;
    margin: 0;
  }
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 24px, 760px);
  }

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

  .hero-copy {
    padding: 44px 28px 30px;
  }

  .rotor-visual {
    min-height: 270px;
  }

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

  .sidebar {
    position: static;
    max-height: none;
  }

  .channel-list {
    max-height: 245px;
  }

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

  .section-header {
    display: block;
  }

  .control-row,
  .mode-frequency-control {
    margin-top: 15px;
    justify-content: flex-start;
  }

  .plot-frf {
    height: 420px;
  }
}

@media (max-width: 600px) {
  .app-shell {
    width: min(100% - 16px, 540px);
  }

  .topbar {
    min-height: 64px;
  }

  .privacy-badge {
    display: none;
  }

  .hero {
    margin-top: 16px;
  }

  .hero-copy {
    padding: 35px 20px 24px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-actions {
    display: grid;
  }

  .rotor-visual {
    min-height: 230px;
  }

  .disc-a {
    width: 90px;
    height: 90px;
  }

  .bearing {
    width: 48px;
    height: 61px;
  }

  .metrics-grid {
    gap: 8px;
  }

  .metric-card {
    min-height: 99px;
    padding: 14px;
  }

  .metric-card > strong {
    font-size: 22px;
  }

  .chart-card,
  .mode-card,
  .info-card {
    padding: 18px 14px;
  }

  .frequency-range-controls {
    align-items: flex-end;
  }

  .mode-frequency-control {
    align-items: flex-end;
    flex-wrap: wrap;
  }

  .mode-frequency-control > input[type="range"] {
    width: 100%;
    order: 3;
  }

  .plot-frf,
  .plot-mode,
  .mode-table-wrap {
    height: 360px;
  }

  .animation-bar {
    align-items: flex-start;
  }

  .mode-settings {
    display: block;
  }

  .coordinate-actions {
    margin-top: 8px;
    grid-template-columns: 1fr 1fr;
  }

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

  footer {
    padding: 30px 0;
    display: grid;
  }
}
