/*
 * The analog look for the synth windows (.mmth-window / .qrt-window with .analog):
 * a grained panel between wood end cheeks, colour bars over each section, turned
 * knobs with printed tick marks, LED switches, LCD read-outs and an ivory keyboard.
 * Skins only change the role tokens and a few --an-* colours, so every part of both
 * editors follows. 15px text floor and 44px touch targets are kept (no sizes here
 * shrink a control). Compatibility: no @layer, color-mix(), oklch(), :has(), container
 * queries or nesting (Chrome 95 / Safari 14).
 */

/* ------------------------------------------------------------------ skins */
.analog[data-skin="vintage"] {
  --surface-0: #121214;
  --surface-1: #232326;
  --surface-2: #1b1b1e;
  --surface-3: #303034;
  --text-primary: #f0eadd;
  --text-secondary: #bdb6a6;
  --text-muted: #948d7f;
  --border: #3b3b40;
  --border-subtle: #2b2b2f;
  --border-strong: #5b5b62;
  --hairline: rgba(240, 234, 221, 0.12);
  --an-panel: #262629;
  --an-panel-2: #1c1c1f;
  --an-ink: #f0eadd;
  --an-ink-dim: #bdb6a6;
  --an-ptr: #fbf7ee;
  --an-cap: url(#an-cap-dark);
  --an-led: #ff4a3d;
  --an-lcd: #0b120d;
  --an-lcd-ink: #9dffbe;
  --an-lcd-glow: rgba(120, 255, 170, 0.45);
  --an-osc: #cf3a2f;
  --an-filter: #e0702b;
  --an-amp: #2f7fc2;
  --an-fx: #2b958b;
  --an-env: #d99a26;
  --an-mod: #8a5cc8;
  --an-eq: #b9a12f;
  --an-macro: #5a9638;
  --an-bar-ink: #ffffff;
  --an-wood-a: #7a4424;
  --an-wood-b: #4b2512;
  --mmth-value: #ff8a4c;
  --mmth-wave: #9dffbe;
}

.analog[data-skin="studio"] {
  --surface-0: #1a0806;
  --surface-1: #5a1a16;
  --surface-2: #4a1411;
  --surface-3: #2a0d0b;
  --text-primary: #f6ece0;
  --text-secondary: #e2c9b8;
  --text-muted: #c0a08e;
  --border: #2a0b09;
  --border-subtle: #3c100d;
  --border-strong: #8a3a32;
  --hairline: rgba(246, 236, 224, 0.2);
  --an-panel: #5e1b17;
  --an-panel-2: #4c1511;
  --an-ink: #f6ece0;
  --an-ink-dim: #e2c9b8;
  --an-ptr: #121212;
  --an-cap: url(#an-cap-gold);
  --an-led: #ffb02e;
  --an-lcd: #140604;
  --an-lcd-ink: #ffc46b;
  --an-lcd-glow: rgba(255, 180, 80, 0.45);
  --an-osc: #f6ece0;
  --an-filter: #f6ece0;
  --an-amp: #f6ece0;
  --an-fx: #f6ece0;
  --an-env: #f6ece0;
  --an-mod: #f6ece0;
  --an-eq: #f6ece0;
  --an-macro: #f6ece0;
  --an-bar-ink: #f6ece0;
  --an-wood-a: #a8683b;
  --an-wood-b: #6f3f1f;
  --mmth-value: #ffb02e;
  --mmth-wave: #ffc46b;
}

.analog[data-skin="silver"] {
  --surface-0: #2b2f36;
  --surface-1: #cfd2d7;
  --surface-2: #c2c6cc;
  --surface-3: #e4e6ea;
  --text-primary: #15171c;
  --text-secondary: #3a3f4a;
  --text-muted: #555b67;
  --border: #8d929b;
  --border-subtle: #a7acb4;
  --border-strong: #6c717a;
  --hairline: rgba(21, 23, 28, 0.18);
  --an-panel: #cdd0d5;
  --an-panel-2: #c0c4ca;
  --an-ink: #15171c;
  --an-ink-dim: #3a3f4a;
  --an-ptr: #fbfbfb;
  --an-cap: url(#an-cap-dark);
  --an-led: #ff3b30;
  --an-lcd: #10151b;
  --an-lcd-ink: #8fd8ff;
  --an-lcd-glow: rgba(120, 200, 255, 0.45);
  --an-osc: #1f2b46;
  --an-filter: #1f2b46;
  --an-amp: #1f2b46;
  --an-fx: #1f2b46;
  --an-env: #1f2b46;
  --an-mod: #1f2b46;
  --an-eq: #1f2b46;
  --an-macro: #1f2b46;
  --an-bar-ink: #ffffff;
  --an-wood-a: #5e341b;
  --an-wood-b: #3a1d0d;
  --mmth-value: #c2410c;
  --mmth-wave: #8fd8ff;
}

/* --------------------------------------------------------------- chassis */
.mmth-window.analog,
.qrt-window.analog {
  padding: 0 18px;
  color: var(--an-ink);
  background-color: var(--an-panel);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.09 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.14));
  border: 1px solid #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.analog[data-skin="silver"] {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 1px, rgba(0, 0, 0, 0.035) 1px 3px),
    linear-gradient(180deg, #e3e5e9, #b9bdc4);
}

/* Wood end cheeks */
.mmth-window.analog::before,
.mmth-window.analog::after,
.qrt-window.analog::before,
.qrt-window.analog::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 18px;
  pointer-events: none;
  background:
    repeating-linear-gradient(176deg, rgba(0, 0, 0, 0.16) 0 2px, transparent 2px 6px, rgba(255, 255, 255, 0.05) 6px 7px, transparent 7px 11px),
    linear-gradient(90deg, var(--an-wood-b), var(--an-wood-a) 45%, var(--an-wood-b));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.mmth-window.analog::before,
.qrt-window.analog::before {
  left: 0;
}

.mmth-window.analog::after,
.qrt-window.analog::after {
  right: 0;
}

/* Title bar: a dark nameplate */
.analog .mmth-titlebar,
.analog .qrt-titlebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.28));
  border-bottom: 2px solid rgba(0, 0, 0, 0.65);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.analog[data-skin="silver"] .mmth-titlebar,
.analog[data-skin="silver"] .qrt-titlebar {
  background: linear-gradient(180deg, #2e333b, #1b1f25);
  --text-primary: #f2f4f7;
  --text-secondary: #c3c8d1;
  --surface-3: #3a3f48;
  color: #f2f4f7;
}

.analog .mmth-logo,
.analog .qrt-logo {
  font-size: 22px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--an-ink);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

.analog[data-skin="silver"] .mmth-logo,
.analog[data-skin="silver"] .qrt-logo {
  color: #f2f4f7;
}

.analog[data-skin="studio"] .mmth-logo,
.analog[data-skin="studio"] .qrt-logo {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.06em;
  font-size: 24px;
}

/* LCD read-outs: preset names and every selector */
.analog .mmth-preset-name,
.analog .mmth-select,
.analog .mmth-input,
.analog .qrt-select,
.analog .an-skin-select,
.analog .mmth-readout {
  background: var(--an-lcd);
  color: var(--an-lcd-ink);
  border: 1px solid #000;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.08);
  text-shadow: 0 0 6px var(--an-lcd-glow);
  font-variant-numeric: tabular-nums;
}

.analog .mmth-readout {
  padding: 4px 8px;
  border-radius: 4px;
}

.analog .mmth-select option,
.analog .qrt-select option,
.analog .an-skin-select option {
  background: #111;
  color: #f0f0f0;
  text-shadow: none;
}

.an-skin-select {
  min-height: 34px;
  padding: 0 8px;
  border-radius: 6px;
  font: inherit;
  font-size: 15px;
}

/* Hardware buttons */
.analog .mmth-btn:not(.mmth-preset-name),
.analog .qrt-btn {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.22));
  border: 1px solid rgba(0, 0, 0, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 3px rgba(0, 0, 0, 0.45);
}

.analog .mmth-btn:not(.mmth-preset-name):active,
.analog .qrt-btn:active {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(255, 255, 255, 0.04));
}

/* --------------------------------------------------------------- sections */
.analog .mmth-sec,
.analog .qrt-card {
  background: var(--an-panel-2);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.08));
  border: 1px solid rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.analog[data-skin="silver"] .mmth-sec,
.analog[data-skin="silver"] .qrt-card {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(0, 0, 0, 0.28);
}

.analog [data-kind="osc"] { --an-bar: var(--an-osc); }
.analog [data-kind="filter"] { --an-bar: var(--an-filter); }
.analog [data-kind="amp"] { --an-bar: var(--an-amp); }
.analog [data-kind="fx"] { --an-bar: var(--an-fx); }
.analog [data-kind="env"] { --an-bar: var(--an-env); }
.analog [data-kind="mod"] { --an-bar: var(--an-mod); }
.analog [data-kind="eq"] { --an-bar: var(--an-eq); }
.analog [data-kind="macro"] { --an-bar: var(--an-macro); }

/* Each section's title sits on its colour bar */
.analog .mmth-sec-head,
.analog .qrt-card-head {
  background: var(--an-bar, var(--an-osc));
  border-bottom: 1px solid rgba(0, 0, 0, 0.55);
  border-radius: 5px 5px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.analog .qrt-card-head {
  margin: 0 -10px 4px;
  padding: 2px 10px;
}

.analog .mmth-sec-title,
.analog .qrt-card-title {
  color: var(--an-bar-ink);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.analog .mmth-sec-head .mmth-select,
.analog .qrt-card-head .qrt-select {
  border-color: rgba(0, 0, 0, 0.8);
}

/* Studio: titles printed on the red panel with a rule, no bars */
.analog[data-skin="studio"] .mmth-sec-head,
.analog[data-skin="studio"] .qrt-card-head {
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(246, 236, 224, 0.35);
}

/* ----------------------------------------------------------------- knobs */
/* A knurled skirt, a bevelled polished cap with a highlight, a pointer line, and a
   glowing value ring in the section's colour. */
.analog {
  --an-ring: var(--an-bar, var(--an-osc));
}

.analog[data-skin="studio"] {
  --an-ring: #ffb02e;
}

.analog[data-skin="silver"] {
  --an-ring: #e2541b;
}

.analog .mmth-track,
.an-track {
  fill: none;
  stroke: rgba(0, 0, 0, 0.5);
  stroke-width: 3;
  stroke-linecap: round;
}

.analog[data-skin="silver"] .mmth-track,
.analog[data-skin="silver"] .an-track {
  stroke: rgba(0, 0, 0, 0.22);
}

.analog .mmth-valarc,
.an-valarc {
  display: inline;
  fill: none;
  stroke: var(--an-ring);
  stroke-width: 3;
  stroke-linecap: round;
}

.an-valglow {
  fill: none;
  stroke: var(--an-ring);
  stroke-width: 7;
  stroke-linecap: round;
  opacity: 0.22;
}

.an-shadow {
  fill: rgba(0, 0, 0, 0.42);
}

.an-skirt {
  fill: url(#an-skirt);
  stroke: rgba(0, 0, 0, 0.9);
  stroke-width: 1;
}

.an-knurl line {
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1.1;
}

.an-knurl line:nth-child(even) {
  stroke: rgba(0, 0, 0, 0.55);
}

.an-bevel {
  fill: url(#an-bevel);
}

.analog .mmth-cap,
.analog .an-cap {
  fill: var(--an-cap);
  stroke: rgba(0, 0, 0, 0.55);
  stroke-width: 0.6;
}

.an-gloss {
  fill: #ffffff;
  opacity: 0.16;
  pointer-events: none;
}

.analog[data-skin="studio"] .an-gloss {
  opacity: 0.4;
}

.analog .mmth-ptr,
.analog .an-ptr {
  stroke: var(--an-ptr);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.analog .mmth-knob-label,
.analog .qrt-knob-label {
  color: var(--an-ink);
  font-weight: 700;
}

.analog .mmth-knob-value,
.analog .qrt-knob-value {
  color: var(--an-ink-dim);
}

.analog .mmth-dial:focus-visible,
.analog .qrt-dial:focus-visible {
  outline: 2px solid var(--mmth-value, #ff8a4c);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ LEDs */
.analog .mmth-power,
.analog .qrt-led-btn {
  background: linear-gradient(180deg, #2c2c2f, #0f0f10);
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.5);
}

.analog .mmth-led,
.analog .qrt-led {
  background: #3b0f0b;
  border: 1px solid #000;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.7);
}

.analog .mmth-power.on .mmth-led,
.analog .qrt-led-btn[aria-pressed="true"] .qrt-led {
  background: var(--an-led);
  border-color: #000;
  box-shadow: 0 0 8px var(--an-led), inset 0 0 2px rgba(255, 255, 255, 0.8);
}

/* -------------------------------------------------------------- keyboard */
.analog .mmth-key-w {
  background: linear-gradient(180deg, #e2dccb 0%, #fbf8ef 10%, #f4efe3 86%, #d6cfbd 100%);
  border: 1px solid #6b6455;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.07);
  color: #3a352b;
}

.analog .mmth-key-b {
  background: linear-gradient(180deg, #2c2c2f, #0b0b0c 78%, #222225);
  border: 1px solid #000;
  border-radius: 0 0 4px 4px;
  box-shadow: inset 0 -4px 0 rgba(255, 255, 255, 0.07), 0 3px 4px rgba(0, 0, 0, 0.55);
}

.analog .mmth-keys-wrap,
.analog .mmth-dock {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15));
}

/* Phones: no cheeks (every pixel goes to the controls) */
@media (max-width: 760px), (max-width: 900px) and (max-height: 520px) {
  .mmth-window.analog,
  .qrt-window.analog {
    padding: 0;
  }

  .mmth-window.analog::before,
  .mmth-window.analog::after,
  .qrt-window.analog::before,
  .qrt-window.analog::after {
    display: none;
  }
}

@media (pointer: coarse), (hover: none) {
  .an-skin-select {
    min-height: 44px;
  }
}

/* Mammoth's modulation pages: their header sits on the envelope colour bar too. */
.analog .mmth-tab-head {
  background: var(--an-env);
  border-radius: 5px;
  padding: 4px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.analog[data-skin="studio"] .mmth-tab-head {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(246, 236, 224, 0.35);
}

.analog .mmth-tab,
.analog .mmth-pagetab {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.22));
  border: 1px solid rgba(0, 0, 0, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 3px rgba(0, 0, 0, 0.45);
}

.analog .mmth-tab[aria-selected="true"],
.analog .mmth-pagetab[aria-selected="true"],
.analog .mmth-view-tab[aria-selected="true"] {
  box-shadow: inset 0 -3px 0 var(--an-led), inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Mammoth's phone header is one row: its Look choices move into the "…" menu there. */
@media (max-width: 760px), (max-width: 900px) and (max-height: 520px) {
  .mmth-skin {
    display: none;
  }
}

/* ------------------------------------------------------------ chassis bits */
/* Screws in the panel's four corners */
.an-screw {
  position: absolute;
  z-index: 4;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4f4f4 0%, #a9abb0 35%, #55575c 75%, #2b2c2f 100%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.an-screw::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 1.6px;
  margin-top: -0.8px;
  background: rgba(0, 0, 0, 0.65);
  transform: rotate(-35deg);
}

.an-screw-tl { top: 5px; left: 22px; }
.an-screw-tr { top: 5px; right: 22px; }
.an-screw-bl { bottom: 5px; left: 22px; }
.an-screw-br { bottom: 5px; right: 22px; }

.an-screw-tr::after,
.an-screw-bl::after {
  transform: rotate(52deg);
}

/* Racing stripes under the nameplate (Vintage), a gold rule (Studio), a blue band (Silver) */
.analog .mmth-titlebar,
.analog .qrt-titlebar {
  position: relative;
  margin-bottom: 9px;
  box-shadow: 0 3px 0 #cf3a2f, 0 6px 0 #e0702b, 0 9px 0 #d99a26;
}

.analog[data-skin="studio"] .mmth-titlebar,
.analog[data-skin="studio"] .qrt-titlebar {
  margin-bottom: 3px;
  box-shadow: 0 2px 0 #c9a24a, 0 3px 0 rgba(0, 0, 0, 0.5);
}

.analog[data-skin="silver"] .mmth-titlebar,
.analog[data-skin="silver"] .qrt-titlebar {
  margin-bottom: 5px;
  box-shadow: 0 5px 0 #2f6fb5;
}

/* ------------------------------------------------------------------ screens */
/* A dark glass screen in a bezel: the drawing glows; scanlines and glare sit on top. */
.an-screen {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0) 70%), var(--an-lcd, #0b120d);
  border: 1px solid #000;
  border-radius: 6px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9), inset 0 2px 4px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 3px rgba(0, 0, 0, 0.35);
  color: var(--an-lcd-ink, #9dffbe);
}

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

.an-screen::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 38%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
}

/* Mammoth's displays get the same glass */
.analog .mmth-wave,
.analog .mmth-envgraph {
  background: var(--an-lcd);
  border: 1px solid #000;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.1);
}

.analog .mmth-graph-line {
  stroke: var(--an-lcd-ink);
  filter: drop-shadow(0 0 3px var(--an-lcd-glow));
}

/* ---------------------------------------------------------------- switches */
/* A row of lit switches, one on (like a hardware wave selector) */
.an-switches {
  display: flex;
  gap: 4px;
}

.an-sw {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 4px;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.8);
  background: linear-gradient(180deg, #3a3a3e, #1b1b1d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 3px rgba(0, 0, 0, 0.45);
  color: #d9d4c8;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.an-sw svg {
  width: 24px;
  height: 16px;
  overflow: visible;
}

.an-sw svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.an-sw-led {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b0f0b;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.7);
}

.an-sw[aria-checked="true"] {
  color: #fff;
  background: linear-gradient(180deg, #4a4a50, #26262a);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--an-ring);
}

.an-sw[aria-checked="true"] .an-sw-led {
  background: var(--an-led);
  box-shadow: 0 0 6px var(--an-led), inset 0 0 1px rgba(255, 255, 255, 0.8);
}

.an-sw[aria-checked="true"] svg path {
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

@media (pointer: coarse), (hover: none) {
  .an-sw {
    min-height: 44px;
  }
}

/* Phones: no stripes stack (one thin line), no screws */
@media (max-width: 760px), (max-width: 900px) and (max-height: 520px) {
  .an-screw {
    display: none;
  }
}

/* ------------------------------------------------------------ centre display */
/* The centre of the panel: a backlit dot-matrix LCD between an analog VU meter and
   status lights. Amber (Studio red), green (Vintage black) or blue (Silver). */
.an-center {
  display: flex;
  align-items: stretch;
  gap: 14px;
  min-width: 0;
}

.an-wing {
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.an-wing-label {
  color: var(--an-ink-dim);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.an-vu {
  width: 140px;
  height: 78px;
  border-radius: 4px;
  background: #e8d9a8;
}

.an-vu::after {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 45%);
}

.an-wing-right {
  display: grid;
  grid-template-columns: auto;
  align-content: center;
  justify-content: center;
  gap: 2px 16px;
}

/* Mammoth has eight lights: two columns */
.mmth-window .an-wing-right {
  grid-template-columns: repeat(2, auto);
  gap: 6px 16px;
}

.an-wing-right:empty {
  display: none;
}

.an-stat {
  --lvl: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--an-ink-dim);
  font-size: 15px;
  white-space: nowrap;
}

.an-stat-led {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: #3b0f0b;
  border: 1px solid #000;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.7);
}

.an-stat.on .an-stat-led {
  background: var(--an-led);
  opacity: calc(0.35 + 0.65 * var(--lvl));
  box-shadow: 0 0 8px var(--an-led), inset 0 0 2px rgba(255, 255, 255, 0.8);
}

.an-lcd {
  --lcd-ink: #2b1203;
  --an-lcd-ink: #2b1203;
  --an-lcd-glow: rgba(70, 25, 0, 0.18);
  position: relative;
  flex: 1 1 auto;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 16px 9px;
  border-radius: 6px;
  border: 2px solid #050505;
  color: var(--lcd-ink);
  background: radial-gradient(ellipse at 50% 35%, #ffd08a 0%, #f6a23c 62%, #dc7f1c 100%);
  box-shadow: 0 0 0 5px #141414, 0 0 0 6px rgba(255, 255, 255, 0.14), 0 6px 14px rgba(0, 0, 0, 0.5), inset 0 0 26px rgba(80, 30, 0, 0.45), inset 0 2px 6px rgba(0, 0, 0, 0.45);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.12);
}

/* The dot-matrix mesh and a sheen across the glass */
.an-lcd::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 4px;
  pointer-events: none;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 32%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.07) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
}

.analog[data-skin="vintage"] .an-lcd {
  --lcd-ink: #15200a;
  --an-lcd-ink: #15200a;
  --an-lcd-glow: rgba(20, 40, 0, 0.18);
  background: radial-gradient(ellipse at 50% 35%, #dbeea0 0%, #aac856 62%, #87a536 100%);
  box-shadow: 0 0 0 5px #141414, 0 0 0 6px rgba(255, 255, 255, 0.14), 0 6px 14px rgba(0, 0, 0, 0.5), inset 0 0 26px rgba(20, 40, 0, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.analog[data-skin="silver"] .an-lcd {
  --lcd-ink: #f1f8ff;
  --an-lcd-ink: #f1f8ff;
  --an-lcd-glow: rgba(210, 235, 255, 0.45);
  background: radial-gradient(ellipse at 50% 35%, #78bdff 0%, #2f80e2 62%, #1b5bb3 100%);
  box-shadow: 0 0 0 5px #141414, 0 0 0 6px rgba(255, 255, 255, 0.3), 0 6px 14px rgba(0, 0, 0, 0.35), inset 0 0 26px rgba(0, 20, 60, 0.45), inset 0 2px 6px rgba(0, 0, 0, 0.45);
  text-shadow: 0 0 6px rgba(220, 240, 255, 0.5);
}

.an-lcd-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.an-lcd-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.an-lcd-sub {
  flex: none;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.an-lcd-vis {
  position: relative;
  height: 58px;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.analog[data-skin="silver"] .an-lcd-vis {
  border-color: rgba(255, 255, 255, 0.3);
}

.an-lcd-vis canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.an-lcd-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.an-lcd-param {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-lcd-bar {
  position: relative;
  flex: 1 1 auto;
  min-width: 40px;
  height: 11px;
  border: 1.5px solid var(--lcd-ink);
  border-radius: 2px;
}

.an-lcd-bar[hidden] {
  display: none;
}

.an-lcd-fill {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 1px;
  width: 0;
  max-width: calc(100% - 2px);
  background: repeating-linear-gradient(90deg, var(--lcd-ink) 0 4px, rgba(0, 0, 0, 0) 4px 6px);
}

.an-lcd-val {
  flex: none;
  margin-left: auto;
  font-weight: 700;
}

/* Narrower windows: the status lights fold away; phones keep only the LCD. */
@media (max-width: 1100px) {
  .an-wing-right {
    display: none;
  }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 520px) {
  .an-wing {
    display: none;
  }

  .an-lcd-name {
    font-size: 20px;
  }
}
