:root {
    color-scheme: dark;
    --bg: #050609;
    --surface: rgba(8, 10, 14, 0.72);
    --text: #f7f0e7;
    --muted: #aaa299;
    --quiet: #666a6d;
    --line: rgba(243, 238, 229, 0.09);
    --accent: #e3b160;
    --accent-rgb: 227, 177, 96;
    --leaf: #88b47a;
    --leaf-rgb: 136, 180, 122;
    --dusk: #8a79a6;
    --dusk-rgb: 138, 121, 166;
    --flat: #f0bd5e;
    --flat-rgb: 240, 189, 94;
    --sharp: #e9b75f;
    --sharp-rgb: 233, 183, 95;
    --good: #96dfad;
    --good-rgb: 150, 223, 173;
    --all-tuned: #b4e6a1;
    --all-tuned-rgb: 180, 230, 161;
    --error-soft: #c8c0b8;
    --finger-1: #f0bd5e;
    --finger-1-rgb: 240, 189, 94;
    --finger-2: #6fd2c2;
    --finger-2-rgb: 111, 210, 194;
    --finger-3: #9b86c6;
    --finger-3-rgb: 155, 134, 198;
    --finger-4: #f08e9f;
    --finger-4-rgb: 240, 142, 159;
    --favorite: #f0c577;
    --favorite-rgb: 240, 197, 119;
    --bad: #d7afa8;
    --tune-top-space: calc(72px + env(safe-area-inset-top));
    --bottom-bar-space: calc(108px + env(safe-area-inset-bottom));
    --app-height: 100svh;
    --app-width: 100vw;
    --app-height-0055: 0.55svh;
    --app-height-007: 0.7svh;
    --app-height-012: 1.2svh;
    --app-height-014: 1.4svh;
    --app-height-015: 1.5svh;
    --app-height-017: 1.7svh;
    --app-height-020: 2svh;
    --app-height-029: 2.9svh;
    --app-height-034: 3.4svh;
    --app-height-035: 3.5svh;
    --app-height-036: 3.6svh;
    --app-height-044: 4.4svh;
    --app-height-055: 5.5svh;
    --app-height-060: 6svh;
    --app-height-062: 6.2svh;
    --app-height-075: 7.5svh;
    --app-height-080: 8svh;
    --app-height-095: 9.5svh;
    --app-height-200: 20svh;
    --app-height-220: 22svh;
    --app-height-630: 63svh;
    --app-height-720: 72svh;
    --app-height-neg-014: -1.4svh;
    --app-height-neg-017: -1.7svh;
    --app-height-neg-018: -1.8svh;
    --app-height-neg-019: -1.9svh;
    --app-height-neg-029: -2.9svh;
    --app-height-neg-034: -3.4svh;
    --app-height-neg-036: -3.6svh;
    --app-height-neg-038: -3.8svh;
    --app-height-neg-040: -4svh;
    --app-height-neg-044: -4.4svh;
    --app-height-neg-062: -6.2svh;
    --tuner-stage-width: min(100%, 500px);
    --string-lane-width: clamp(64px, 15vw, 76px);
    --string-rail-offset: clamp(92px, 30%, 150px);
    --motion-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --motion-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --motion-ease: var(--motion-ease-out);
    --motion-ease-press: cubic-bezier(0.2, 0.8, 0.2, 1);
    --motion-fast: 140ms;
    --motion-normal: 220ms;
    --motion-med: var(--motion-normal);
    --motion-slow: 480ms;
    --motion-entrance: 640ms;
    --motion-press-scale: 0.97;
    --motion-hover-lift: -2px;
    --motion-small-y: 4px;
    --motion-medium-y: 8px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  background: var(--bg);
}

body {
  height: 100%;
  min-height: var(--app-height, 100svh);
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(var(--accent-rgb), 0.085), transparent 18rem),
    radial-gradient(circle at 50% 69%, rgba(var(--leaf-rgb), 0.042), transparent 22rem),
    radial-gradient(circle at 16% 76%, rgba(var(--dusk-rgb), 0.026), transparent 20rem),
    linear-gradient(180deg, #07090d 0%, #050609 58%, #020304 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.app-shell {
  position: relative;
  min-height: var(--app-height, 100svh);
  isolation: isolate;
  overflow: visible;
  animation: appShellEnter var(--motion-entrance) var(--motion-ease) both;
}

@keyframes appShellEnter {
  from {
    opacity: 0;
    filter: saturate(0.88);
  }
  to {
    opacity: 1;
    filter: saturate(1);
  }
}

@keyframes viewEnter {
  from {
    opacity: 0;
    transform: translateY(var(--motion-small-y));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes guitarFrameEnter {
  from {
    opacity: 0;
    transform: translate(var(--guitar-x-adjust), calc(var(--guitar-y-adjust) + 6px));
    filter: saturate(0.85) brightness(0.9);
  }
  to {
    opacity: 1;
    transform: translate(var(--guitar-x-adjust), var(--guitar-y-adjust));
    filter: saturate(1) brightness(1);
  }
}

@keyframes stringLaneEnter {
  from {
    opacity: 0;
    transform: translateY(3px) scale(0.992);
  }
  to {
    opacity: 0.72;
    transform: translateY(0) scale(1);
  }
}

@keyframes controlsEnter {
  from {
    opacity: 0;
    transform: translateY(var(--motion-small-y));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes topbarEnter {
  from {
    opacity: 0;
    transform: translate(-50%, var(--motion-small-y));
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes quietFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes subtlePulse {
  0%, 100% {
    filter: drop-shadow(0 0 0 rgba(var(--accent-rgb), 0));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.2));
  }
}

@keyframes compactShake {
  0%, 100% {
    transform: translateX(0);
  }
  28% {
    transform: translateX(-3px);
  }
  58% {
    transform: translateX(2px);
  }
}

body.view-tune,
body.view-chords,
body.view-visualizer,
body.view-settings,
body.view-about {
  overflow: hidden;
}

body.view-tune .app-shell,
body.view-chords .app-shell,
body.view-visualizer .app-shell,
body.view-settings .app-shell,
body.view-about .app-shell {
  height: var(--app-height, 100svh);
  overflow: hidden;
}

.studio-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.036) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.036) 1px, transparent 1px);
  background-size: 46px 46px;
  background-position: 0 0, 0 0;
  mask-image: radial-gradient(circle at 50% 44%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 44%, black, transparent 70%);
  opacity: 0.95;
  pointer-events: none;
}

body.view-tune .studio-grid::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 35%, rgba(var(--accent-rgb), 0.07), transparent 18rem),
    radial-gradient(circle at 54% 64%, rgba(var(--leaf-rgb), 0.038), transparent 22rem),
    radial-gradient(circle at 24% 72%, rgba(var(--dusk-rgb), 0.03), transparent 19rem);
  mask-image: radial-gradient(circle at 50% 46%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 46%, black, transparent 72%);
  opacity: 0.52;
  animation: tuneGlowBreath 18s ease-in-out infinite;
}

@keyframes tuneGlowBreath {
  0%,
  100% {
    opacity: 0.46;
  }

  50% {
    opacity: 0.58;
  }
}

.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: min(620px, calc(100% - 34px));
  min-height: 58px;
  padding: calc(20px + env(safe-area-inset-top)) 0 0;
  transform: translateX(-50%);
  pointer-events: none;
  animation: topbarEnter var(--motion-slow) var(--motion-ease) 70ms both;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 730;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: auto;
}

.brand-logo {
  display: block;
  width: clamp(148px, 31vw, 206px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.32));
  user-select: none;
}

.nav-button,
.icon-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.nav-button {
  --nav-active: var(--good);
  --nav-active-rgb: var(--good-rgb);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 44px;
  padding: 5px 8px 6px;
  color: rgba(244, 240, 232, 0.58);
  font-size: 0.68rem;
  font-weight: 760;
  transition: color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease, filter var(--motion-fast) ease;
}

.nav-button:hover,
.nav-button:focus-visible {
  background: rgba(244, 240, 232, 0.045);
  color: rgba(244, 240, 232, 0.76);
  filter: brightness(1.04);
}

.nav-button:active {
  filter: brightness(0.96);
}

.nav-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-button:focus:not(:focus-visible),
.start-button:focus:not(:focus-visible),
.icon-button:focus:not(:focus-visible) {
  outline: 0;
}

.nav-button:focus-visible,
.start-button:focus-visible,
.icon-button:focus-visible {
  outline: 1px solid rgba(243, 238, 229, 0.46);
  outline-offset: 2px;
}

.nav-button.is-active {
  background:
    radial-gradient(circle at 50% 28%, rgba(var(--nav-active-rgb), 0.18), transparent 58%),
    radial-gradient(circle at 22% 86%, rgba(var(--dusk-rgb), 0.055), transparent 68%),
    rgba(244, 240, 232, 0.075);
  color: var(--text);
}

.nav-button[data-view="tune"] {
  --nav-active: var(--good);
  --nav-active-rgb: var(--good-rgb);
}

.nav-button[data-view="chords"] {
  --nav-active: var(--favorite);
  --nav-active-rgb: var(--favorite-rgb);
}

.nav-button[data-view="visualizer"] {
  --nav-active: #f2a93c;
  --nav-active-rgb: 242, 169, 60;
}

.nav-button[data-view="settings"] {
  --nav-active: #8fb7d8;
  --nav-active-rgb: 143, 183, 216;
}

.nav-button[data-view="about"] {
  --nav-active: var(--finger-3);
  --nav-active-rgb: var(--finger-3-rgb);
}

.nav-button.is-active svg {
  color: var(--nav-active);
  filter: drop-shadow(0 0 8px rgba(var(--nav-active-rgb), 0.28));
}

.nav-button.is-active span {
  color: var(--text);
}

.main-stage {
  width: min(560px, calc(100% - 18px));
  min-height: var(--app-height, 100svh);
  margin: 0 auto;
  display: grid;
  place-items: start center;
  padding: calc(66px + env(safe-area-inset-top)) 0 calc(116px + env(safe-area-inset-bottom));
}

body.view-tune .main-stage,
body.view-chords .main-stage,
body.view-visualizer .main-stage,
body.view-settings .main-stage,
body.view-about .main-stage {
  height: var(--app-height, 100svh);
  min-height: 0;
  overflow: hidden;
  padding: var(--tune-top-space) 0 var(--bottom-bar-space);
  place-items: stretch center;
}

body.view-settings .main-stage,
body.view-about .main-stage {
  padding-top: var(--page-top-space, var(--tune-top-space));
}

.view {
  display: none;
  width: 100%;
}

.view.is-active {
  display: block;
}

.view.is-view-entering {
  animation: viewEnter var(--motion-med) var(--motion-ease) both;
}

.view-tune.is-active {
  height: calc(var(--app-height, 100svh) - var(--tune-top-space) - var(--bottom-bar-space));
  min-height: 0;
}

.chords-view.is-active,
.visualizer-view.is-active,
.settings-view.is-active,
.about-view.is-active {
  height: calc(var(--app-height, 100svh) - var(--tune-top-space) - var(--bottom-bar-space));
  min-height: 0;
  overflow: hidden;
}

.settings-view.is-active,
.about-view.is-active {
  height: calc(var(--app-height, 100svh) - var(--page-top-space, var(--tune-top-space)) - var(--bottom-bar-space));
}

.tuner-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(clamp(120px, var(--app-height-220), 190px), 0.58fr) minmax(0, 1.34fr) auto;
  align-content: stretch;
  row-gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 clamp(8px, 2.6vw, 18px) 2px;
}

.tuner-panel::before {
  content: "";
  position: absolute;
  inset: 8% 3% 9%;
  z-index: -1;
  border-radius: 999px;
  background: radial-gradient(ellipse at 50% 44%, rgba(233, 184, 103, 0.11), transparent 60%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-copy {
  min-width: 0;
  background: transparent;
  text-align: left;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  color: rgba(var(--accent-rgb), 0.76);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.listening-led {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.48);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.16);
  opacity: 0.58;
  animation: listeningLedPulse 4.8s ease-in-out infinite;
}

body.is-listening:not(.has-action-warning) .listening-led {
  background: rgba(var(--sharp-rgb), 0.58);
  box-shadow: 0 0 10px rgba(var(--sharp-rgb), 0.2);
}

body.has-action-warning .listening-led {
  animation-play-state: paused;
  background: rgba(166, 160, 151, 0.34);
  box-shadow: none;
  opacity: 0.36;
}

@keyframes listeningLedPulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.92);
  }

  50% {
    opacity: 0.82;
    transform: scale(1.14);
  }
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: rgba(244, 240, 232, 0.58);
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.1;
}

.pitch-zone {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  align-items: stretch;
  gap: clamp(3px, var(--app-height-007), 8px);
  width: min(112vw, 540px);
  min-height: 0;
  margin: 0 auto clamp(-16px, var(--app-height-neg-019), -6px);
  z-index: 1;
}

.tuner-readout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 10px;
  width: min(430px, calc(100vw - 28px));
  min-height: clamp(56px, 13vw, 92px);
  margin: 0 auto;
}

.note-stack {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.detected-note {
  font-size: clamp(3.3rem, 15vw, 6.2rem);
  font-weight: 830;
  line-height: 0.8;
  text-shadow: 0 0 34px rgba(var(--accent-rgb), 0.17);
  transition: color var(--motion-med) ease, text-shadow var(--motion-med) ease, opacity var(--motion-fast) ease;
}

.detected-note.is-empty {
  display: none;
}

body:not(.has-pitch) .target-note {
  opacity: 0;
}

body.is-flat .detected-note,
body.is-flat .cents-display span {
  color: var(--flat);
  text-shadow: 0 0 34px rgba(var(--flat-rgb), 0.22);
}

body.is-sharp .detected-note,
body.is-sharp .cents-display span {
  color: var(--sharp);
  text-shadow: 0 0 34px rgba(var(--sharp-rgb), 0.2);
}

body.is-in-tune .detected-note,
body.is-in-tune .cents-display span {
  color: var(--good);
  text-shadow: 0 0 38px rgba(var(--good-rgb), 0.24);
}

body.is-acquiring .detected-note,
body.is-acquiring .target-note,
body.is-acquiring .cents-display {
  opacity: 0.72;
}

body.is-acquiring .detected-note,
body.is-acquiring .cents-display span {
  text-shadow: 0 0 22px rgba(244, 240, 232, 0.1);
}

.target-note {
  color: rgba(var(--good-rgb), 0.9);
  font-size: clamp(2.8rem, 13vw, 5.25rem);
  font-weight: 840;
  line-height: 0.86;
  text-shadow: 0 0 34px rgba(var(--good-rgb), 0.13);
  transition: color var(--motion-med) ease, opacity var(--motion-fast) ease;
}

.detected-note.is-note-swapping,
.target-note.is-note-swapping {
  animation: noteSwap 180ms var(--motion-ease);
}

@keyframes noteSwap {
  from {
    opacity: 0.45;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.is-listening .target-note,
body.has-pitch .target-note {
  color: rgba(244, 240, 232, 0.52);
  font-size: clamp(1rem, 4vw, 1.45rem);
  font-weight: 740;
  text-shadow: none;
}

.cents-display {
  display: grid;
  justify-items: end;
  gap: 1px;
  min-width: 66px;
  padding-bottom: 5px;
  background: transparent;
  color: var(--muted);
}

body:not(.has-pitch) .cents-display {
  opacity: 0;
}

.cents-display span {
  color: var(--text);
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.cents-display small {
  color: var(--quiet);
  font-size: 0.72rem;
}

.tune-meta-row {
  position: relative;
  z-index: 8;
  /* Kept in the DOM for future use, hidden visually for the current cleaner tuner layout. */
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(56px, auto);
  align-items: end;
  gap: 18px;
  width: min(100%, 430px);
  margin: clamp(-16px, var(--app-height-neg-018), -6px) auto 4px;
  padding: 0 clamp(8px, 2.4vw, 14px);
  pointer-events: none;
  background: transparent;
  transform: translateY(clamp(-58px, var(--app-height-neg-062), -34px));
}

.tuning-graph {
  --needle-angle: 0;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  isolation: isolate;
}

body[data-tuner-display="needle"] .pitch-zone {
  grid-template-rows: minmax(0, 1fr);
}

body[data-tuner-display="needle"] .tuner-readout {
  display: none;
}

.tuning-graph::before {
  content: "";
  position: absolute;
  inset: -18% -9% -24%;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(var(--good-rgb), 0.04), transparent 46%),
    linear-gradient(90deg, rgba(var(--flat-rgb), 0.026), transparent 44%, rgba(var(--sharp-rgb), 0.026));
  filter: blur(6px);
  pointer-events: none;
}

body.is-stale .tuning-graph {
  opacity: 0.82;
}

.needle-tuner-display {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(74px, 1fr) auto;
  align-items: end;
  justify-items: center;
  padding: clamp(30px, 6vh, 48px) clamp(12px, 4vw, 24px) clamp(2px, 0.5vh, 8px);
  pointer-events: none;
  z-index: 2;
}

body[data-tuner-display="graph"] .needle-tuner-display {
  display: none;
}

body[data-tuner-display="needle"] .pitch-trace-canvas,
body[data-tuner-display="needle"] .graph-center-axis,
body[data-tuner-display="needle"] .trace-badge,
body[data-tuner-display="needle"] .graph-labels {
  opacity: 0;
  visibility: hidden;
}

.needle-scale {
  position: relative;
  width: min(86%, 380px);
  height: min(100%, 120px);
  min-height: 82px;
  transform: translateY(clamp(0px, 0.35vh, 4px));
}

.needle-scale::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 22%;
  height: 56%;
  border-top: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  opacity: 0.72;
}

.needle-scale::after {
  content: "";
  position: absolute;
  left: 46%;
  right: 46%;
  top: 22%;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--good-rgb), 0.42), rgba(var(--good-rgb), 0.04));
  filter: blur(7px);
  opacity: 0.42;
}

body.is-in-tune .needle-scale::after {
  opacity: 0.74;
  filter: blur(9px);
}

.needle-ticks {
  position: absolute;
  left: 50%;
  top: 83%;
  width: 1px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.needle-ticks span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 9px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.72);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.08);
  transform-origin: 50% calc(100% + min(18vw, 82px));
  transform: translateX(-50%) rotate(calc(var(--tick) * 5.8deg)) translateY(calc(-1 * min(18vw, 82px)));
}

.needle-ticks span:nth-child(1),
.needle-ticks span:nth-child(6),
.needle-ticks span:nth-child(11),
.needle-ticks span:nth-child(16),
.needle-ticks span:nth-child(21) {
  height: 19px;
  width: 3px;
  background: rgba(var(--accent-rgb), 0.86);
}

.needle-ticks span.is-center {
  height: 24px;
  background: rgba(var(--good-rgb), 0.9);
  box-shadow: 0 0 16px rgba(var(--good-rgb), 0.24);
}

.needle-label {
  position: absolute;
  color: rgba(var(--accent-rgb), 0.92);
  font-size: clamp(0.72rem, 2.7vw, 0.92rem);
  font-weight: 760;
  line-height: 1;
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.12);
}

.needle-label-left-outer {
  left: 8%;
  top: 61%;
}

.needle-label-left-inner {
  left: 29%;
  top: 26%;
}

.needle-label-center {
  left: 50%;
  top: 13%;
  color: rgba(var(--good-rgb), 0.94);
  transform: translateX(-50%);
  text-shadow: 0 0 16px rgba(var(--good-rgb), 0.18);
}

.needle-label-right-inner {
  right: 29%;
  top: 26%;
}

.needle-label-right-outer {
  right: 8%;
  top: 61%;
}

.needle-center-zone {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: rgba(var(--good-rgb), 0.42);
  box-shadow: 0 0 16px rgba(var(--good-rgb), 0.18);
  transform: translateX(-50%);
  opacity: 0.64;
}

.needle-hand {
  position: absolute;
  left: 50%;
  top: 83%;
  width: 1px;
  height: 1px;
  transform: rotate(calc(var(--needle-angle) * 1deg));
  transform-origin: 50% 50%;
  transition: transform 120ms linear;
  will-change: transform;
}

.needle-hand span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(5px, 1.4vw, 8px);
  height: min(18vw, 82px);
  border-radius: 999px 999px 45% 45%;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255, 224, 169, 0.96) 42%, rgba(147, 98, 45, 0.78));
  clip-path: polygon(50% 0, 92% 100%, 8% 100%);
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.3));
  transform: translateX(-50%);
}

body.is-acquiring .needle-hand span {
  opacity: 0.76;
  filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), 0.18));
}

body.is-in-tune .needle-hand span {
  filter: drop-shadow(0 0 14px rgba(var(--good-rgb), 0.34));
}

.needle-pivot {
  position: absolute;
  left: 50%;
  top: 83%;
  width: clamp(18px, 5vw, 28px);
  height: clamp(18px, 5vw, 28px);
  border: 2px solid rgba(255, 224, 169, 0.82);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(244,240,232,0.9) 0 18%, rgba(18, 20, 23, 0.92) 22% 44%, rgba(var(--accent-rgb), 0.68) 48% 72%, rgba(0,0,0,0.5) 74%);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.22), inset 0 1px 2px rgba(255,255,255,0.22);
  transform: translate(-50%, -50%);
}

.needle-readout {
  display: grid;
  justify-items: center;
  gap: 3px;
  transform: translateY(clamp(-4px, -0.7vh, 0px));
}

.needle-readout strong {
  color: rgba(244, 240, 232, 0.92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 9.8vw, 3.35rem);
  font-weight: 800;
  line-height: 0.86;
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.18), 0 1px 1px rgba(0,0,0,0.5);
}

.needle-readout span {
  color: rgba(var(--accent-rgb), 0.92);
  font-size: clamp(0.78rem, 3.3vw, 1.05rem);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  line-height: 1;
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.14);
}

body:not(.has-pitch) .needle-readout strong {
  opacity: 0;
}

body.is-flat .needle-readout span {
  color: rgba(var(--flat-rgb), 0.96);
}

body.is-sharp .needle-readout span {
  color: rgba(var(--sharp-rgb), 0.95);
}

body.is-in-tune .needle-readout strong,
body.is-in-tune .needle-readout span {
  color: rgba(var(--good-rgb), 0.96);
  text-shadow: 0 0 24px rgba(var(--good-rgb), 0.22);
}

.pitch-trace-canvas {
  position: absolute;
  inset: -6px 0 -18px;
  width: 100%;
  height: calc(100% + 24px);
  mask-image: radial-gradient(ellipse at 50% 52%, black 0%, black 58%, transparent 86%);
}

.graph-center-axis {
  position: absolute;
  left: 50%;
  top: 15px;
  bottom: 8px;
  width: 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(243,238,229,0.34) 20%, rgba(var(--good-rgb), 0.56) 52%, rgba(243,238,229,0.2) 84%, transparent);
  box-shadow: 0 0 22px rgba(var(--good-rgb), 0.2);
  transform: translateX(-50%);
}

.graph-labels {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  color: rgba(243,238,229,0.34);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.graph-labels span:nth-child(2) {
  color: rgba(var(--good-rgb), 0.68);
  text-align: center;
}

body:not(.has-pitch) .graph-labels span:nth-child(2) {
  opacity: 0;
}

.graph-labels span:last-child {
  text-align: right;
}

.graph-direction {
  display: grid;
  align-items: center;
  font-family: "Segoe UI Symbol", "Noto Music", "Apple Symbols", "Arial Unicode MS", Georgia, serif;
  font-size: 1.68rem;
  font-weight: 400;
  line-height: 1;
  text-transform: none;
}

.graph-direction::before {
  opacity: 0.74;
  filter: drop-shadow(0 0 8px currentColor);
}

.graph-direction-flat {
  color: rgba(var(--flat-rgb), 0.78);
  text-shadow: 0 0 12px rgba(var(--dusk-rgb), 0.07);
}

.graph-direction-sharp {
  color: rgba(var(--sharp-rgb), 0.8);
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.12);
}

.graph-direction-flat::before {
  content: "\266D";
  justify-self: start;
}

.graph-direction-sharp::before {
  content: "\266F";
  justify-self: end;
}

.trace-badge {
  position: absolute;
  left: 50%;
  bottom: 2px;
  display: grid;
  min-width: 52px;
  padding: 5px 8px 6px;
  border: 1px solid rgba(243,238,229,0.09);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(18, 20, 23, 0.72), rgba(4, 5, 7, 0.78));
  box-shadow: 0 8px 18px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.06);
  text-align: center;
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 320ms ease;
  will-change: left, opacity;
}

.trace-badge.is-near-center {
  transform: translate(20px, 12px);
}

.trace-badge.is-near-center[data-side="left"] {
  transform: translate(calc(-100% - 20px), 12px);
}

.tuning-graph.is-idle .trace-badge {
  opacity: 0;
  visibility: hidden;
}

body.is-stale .trace-badge {
  opacity: 0.84;
}

.trace-badge strong {
  color: var(--text);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.trace-badge span {
  color: rgba(243,238,229,0.55);
  font-size: 0.53rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.tuning-graph.is-flat .trace-badge {
  border-color: rgba(var(--flat-rgb), 0.44);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28), 0 0 20px rgba(var(--flat-rgb), 0.17), 0 0 26px rgba(var(--dusk-rgb), 0.045), inset 0 1px 0 rgba(255,255,255,0.06);
}

.tuning-graph.is-sharp .trace-badge {
  border-color: rgba(var(--sharp-rgb), 0.44);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28), 0 0 20px rgba(var(--sharp-rgb), 0.16), 0 0 18px rgba(var(--dusk-rgb), 0.035), inset 0 1px 0 rgba(255,255,255,0.06);
}

.tuning-graph.is-tune .trace-badge {
  border-color: rgba(var(--good-rgb), 0.52);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28), 0 0 26px rgba(var(--good-rgb), 0.23), inset 0 1px 0 rgba(255,255,255,0.06);
}

.signal-strip {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 18px;
  opacity: 0.78;
  overflow: hidden;
}

.signal-strip::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.28), transparent);
}

.signal-strip span {
  width: min(11vw, 52px);
  height: 2px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.34);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.18);
  transform-origin: center;
  animation: signalPulse 2.5s ease-in-out infinite;
}

.signal-strip span:nth-child(2),
.signal-strip span:nth-child(4) {
  animation-delay: -0.7s;
}

.signal-strip span:nth-child(3) {
  width: min(18vw, 82px);
  animation-delay: -1.2s;
}

body.is-listening .signal-strip span {
  background: rgba(var(--accent-rgb), 0.72);
}

@keyframes signalPulse {
  50% {
    transform: scaleY(5.2);
    opacity: 1;
  }
}

.guitar-stage {
  position: relative;
  place-self: stretch center;
  width: var(--tuner-stage-width);
  height: 100%;
  min-height: 0;
  display: grid;
  align-items: start;
  justify-items: center;
  filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.46));
  margin-top: clamp(-34px, var(--app-height-neg-040), -18px);
  margin-bottom: 0;
  align-self: end;
  overflow: visible;
  z-index: 2;
}

.guitar-stage::before {
  content: "";
  position: absolute;
  inset: 8% 7% 4%;
  z-index: -1;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(221, 179, 106, 0.115), transparent 65%);
  filter: blur(18px);
}

.guitar-frame {
  position: relative;
  --guitar-x-adjust: -20px;
  --guitar-y-adjust: clamp(-34px, var(--app-height-neg-038), -18px);
  width: min(104vw, 500px);
  aspect-ratio: 2 / 3;
  flex: 0 0 auto;
  transform: translate(var(--guitar-x-adjust), var(--guitar-y-adjust));
  animation: guitarFrameEnter 720ms var(--motion-ease) 90ms both;
}

.guitar-art {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.peg-hit-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.peg-hit-zone {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(38px, 9.4vw, 54px);
  height: clamp(38px, 9.4vw, 54px);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transform: translate(-50%, -50%);
  transition: transform var(--motion-fast) var(--motion-ease-press), filter var(--motion-fast) ease;
}

.peg-hit-zone:active {
  transform: translate(-50%, -50%) scale(var(--motion-press-scale));
}

.peg-hit-zone:focus-visible {
  outline: 1px solid rgba(var(--accent-rgb), 0.42);
  outline-offset: -6px;
}

.peg-hit-glow {
  width: 64%;
  height: 64%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.46), rgba(var(--accent-rgb), 0.16) 42%, transparent 74%);
  filter: blur(1px);
  opacity: 0;
  transform: scale(0.62);
  transition: opacity 220ms ease, transform 360ms ease;
}

.peg-hit-zone.is-reference-active .peg-hit-glow {
  opacity: 0.78;
  transform: scale(1.42);
}

.peg-hit-zone.is-reference-tap .peg-hit-glow {
  animation: referencePegTap 420ms var(--motion-ease);
}

@keyframes referencePegTap {
  0% {
    opacity: 0;
    transform: scale(0.62);
  }
  44% {
    opacity: 0.82;
    transform: scale(1.62);
  }
  100% {
    opacity: 0.48;
    transform: scale(1.18);
  }
}

.reference-note-status {
  position: absolute;
  left: 50%;
  top: 59%;
  z-index: 6;
  padding: 5px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 999px;
  background: rgba(7, 8, 10, 0.68);
  color: rgba(244, 240, 232, 0.72);
  font-size: 0.66rem;
  font-weight: 820;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}

.reference-note-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reference-note-status[hidden] {
  display: none !important;
}

.headstock {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.string-lane {
  position: absolute;
  z-index: 4;
  display: grid;
  grid-template-columns: 24px auto;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: start;
  column-gap: 8px;
  width: var(--string-lane-width);
  min-width: var(--string-lane-width);
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(244,240,232,0.72);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  opacity: 0.72;
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease-press), filter var(--motion-fast) ease;
  animation: stringLaneEnter 420ms var(--motion-ease) backwards;
  animation-delay: calc(170ms + (var(--string-index, 0) * 38ms));
}

.string-lane:active {
  transform: scale(var(--motion-press-scale));
}

.string-lane:focus-visible {
  outline: 1px solid rgba(var(--accent-rgb), 0.34);
  outline-offset: 3px;
  border-radius: 999px;
}

body.is-stale .string-lane.is-active {
  opacity: 0.7;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.22));
}

.string-lane::before {
  content: none;
}

.string-marker {
  position: relative;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  grid-column: 1;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(243, 238, 229, 0.23);
  border-radius: 999px;
  background: rgba(7, 8, 10, 0.78);
  box-shadow: 0 0 0 rgba(var(--accent-rgb), 0);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.string-marker::after {
  content: "";
  width: 4px;
  height: 7px;
  border: solid transparent;
  border-width: 0 1.7px 1.7px 0;
  opacity: 0;
  transform: rotate(42deg) translateY(-1px);
  transition: opacity 180ms ease;
}

.string-label {
  grid-column: 2;
  color: rgba(244,240,232,0.94);
  font-size: 1rem;
  font-weight: 820;
  line-height: 1;
  text-shadow: 0 1px 12px rgba(0,0,0,0.72);
}

.string-note {
  grid-column: 2;
  color: rgba(244,240,232,0.43);
  font-size: 0.58rem;
  font-weight: 760;
  line-height: 1;
}

.string-check {
  display: none;
}

.string-check::before {
  content: none;
}

.string-direction {
  grid-column: 2;
  min-height: 0;
  color: rgba(var(--accent-rgb), 0.88);
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  text-transform: uppercase;
}

.string-lane.is-active {
  color: var(--text);
  opacity: 1;
  filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), 0.25)) drop-shadow(0 0 16px rgba(var(--dusk-rgb), 0.055));
  transform: scale(1.035);
}

.string-lane.is-reference-active {
  color: var(--text);
  opacity: 1;
  filter: drop-shadow(0 0 16px rgba(var(--accent-rgb), 0.32)) drop-shadow(0 0 18px rgba(var(--favorite-rgb), 0.07));
  transform: scale(1.03);
}

.string-lane.is-reference-tap {
  animation: referenceLabelTap 420ms var(--motion-ease);
}

@keyframes referenceLabelTap {
  0% {
    filter: drop-shadow(0 0 0 rgba(var(--accent-rgb), 0));
  }
  42% {
    transform: scale(1.045);
    filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.28));
  }
  100% {
    transform: scale(1.02);
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.16));
  }
}

.string-lane.is-active::before,
.string-lane.is-manual .string-marker,
.string-lane.is-active .string-marker,
.string-lane.is-reference-active .string-marker {
  border-color: rgba(var(--accent-rgb), 0.82);
  background: rgba(var(--accent-rgb), 0.88);
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.08), 0 0 22px rgba(var(--accent-rgb), 0.38);
  transform: scale(1.08);
}

body.is-in-tune .string-lane.is-active .string-marker {
  border-color: rgba(var(--good-rgb), 0.9);
  background: var(--good);
  box-shadow: 0 0 0 5px rgba(var(--good-rgb), 0.09), 0 0 24px rgba(var(--good-rgb), 0.44);
}

.string-lane.is-complete {
  opacity: 0.9;
}

.string-lane.is-complete .string-marker {
  border-color: rgba(var(--all-tuned-rgb),0.58);
  background: linear-gradient(135deg, rgba(var(--all-tuned-rgb),0.28), rgba(var(--accent-rgb),0.2));
  box-shadow: 0 0 15px rgba(var(--all-tuned-rgb),0.18), 0 0 24px rgba(var(--accent-rgb),0.06);
}

.string-lane.is-complete .string-marker::after {
  opacity: 1;
  border-color: var(--all-tuned);
}

.string-lane.tune-up .string-direction,
.string-lane.tune-down .string-direction {
  opacity: 1;
}

.string-lane.tune-up .string-marker {
  background: var(--flat);
  border-color: rgba(var(--flat-rgb),0.86);
  box-shadow: 0 0 0 5px rgba(var(--flat-rgb),0.1), 0 0 24px rgba(var(--flat-rgb),0.38);
}

.string-lane.tune-down .string-marker {
  background: var(--sharp);
  border-color: rgba(var(--sharp-rgb),0.86);
  box-shadow: 0 0 0 5px rgba(var(--sharp-rgb),0.1), 0 0 24px rgba(var(--sharp-rgb),0.32), 0 0 22px rgba(var(--dusk-rgb),0.045);
}

.string-lane.tune-up .string-direction::before {
  content: "Tune up";
}

.string-lane.tune-down .string-direction::before {
  content: "Tune down";
}

.string-0 {
  left: calc(50% - var(--string-rail-offset) - var(--string-lane-width));
  top: 24%;
}

.string-1 {
  left: calc(50% - var(--string-rail-offset) - var(--string-lane-width));
  top: 38%;
}

.string-2 {
  left: calc(50% - var(--string-rail-offset) - var(--string-lane-width));
  top: 51%;
}

.string-3 {
  left: calc(50% + var(--string-rail-offset));
  right: auto;
  top: 24%;
}

.string-4 {
  left: calc(50% + var(--string-rail-offset));
  right: auto;
  top: 38%;
}

.string-5 {
  left: calc(50% + var(--string-rail-offset));
  right: auto;
  top: 51%;
}

.string-3,
.string-4,
.string-5 {
  grid-template-columns: auto 24px;
  justify-items: end;
  text-align: right;
}

.string-3 .string-marker,
.string-4 .string-marker,
.string-5 .string-marker {
  grid-column: 2;
}

.string-3 .string-label,
.string-3 .string-note,
.string-3 .string-direction,
.string-4 .string-label,
.string-4 .string-note,
.string-4 .string-direction,
.string-5 .string-label,
.string-5 .string-note,
.string-5 .string-direction {
  grid-column: 1;
}

.bottom-app-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  display: grid;
  gap: 6px;
  padding: 7px max(12px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
  background:
    linear-gradient(180deg, rgba(7,8,11,0), rgba(3,4,6,0.34) 42%, rgba(3,4,6,0.92) 76%, #030406 100%);
  box-shadow: 0 -12px 34px rgba(0,0,0,0.34);
  transform: translateZ(0);
  contain: paint;
  animation: quietFadeIn var(--motion-slow) var(--motion-ease) 240ms both;
}

body.is-standalone .bottom-app-bar {
  position: absolute;
}

.ios-install-hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-bar-space) + 8px);
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 28px));
  padding: 9px 10px 9px 13px;
  border: 1px solid rgba(244, 240, 232, 0.09);
  border-radius: 999px;
  background: rgba(6, 7, 10, 0.78);
  color: rgba(244, 240, 232, 0.72);
  box-shadow: 0 18px 44px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.05);
  font-size: 0.74rem;
  font-weight: 680;
  line-height: 1.2;
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.ios-install-hint[hidden] {
  display: none !important;
}

body:not(.is-ios-browser) .ios-install-hint {
  display: none !important;
}

body.is-install-sheet-open .ios-install-hint {
  display: none !important;
}

.ios-install-hint button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(244, 240, 232, 0.72);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.install-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: end center;
  padding: 18px max(14px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  pointer-events: none;
}

.install-sheet[hidden] {
  display: none;
}

.install-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 82%, rgba(var(--accent-rgb), 0.1), transparent 28rem),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.install-card {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  max-height: min(740px, calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  padding: clamp(18px, 4.2vw, 24px);
  border: 1px solid rgba(244, 240, 232, 0.09);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(var(--favorite-rgb), 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
    rgba(5, 6, 9, 0.985);
  color: var(--text);
  box-shadow: 0 28px 72px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(22px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 180ms ease, transform 180ms ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--favorite-rgb), 0.44) transparent;
}

.install-card::-webkit-scrollbar {
  width: 6px;
}

.install-card::-webkit-scrollbar-track {
  margin-block: 18px;
  background: transparent;
}

.install-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--favorite-rgb), 0.36);
}

.install-card::-webkit-scrollbar-button {
  display: none;
}

.install-sheet.is-open {
  pointer-events: auto;
}

.install-sheet.is-open .install-backdrop {
  opacity: 1;
}

.install-sheet.is-open .install-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.install-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(244, 240, 232, 0.07);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: rgba(244, 240, 232, 0.62);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}

.install-card h2 {
  margin: 4px 38px 7px 0;
  font-size: clamp(1.35rem, 5vw, 1.8rem);
  letter-spacing: 0;
}

.install-card p {
  margin: 0;
}

.install-card > p:not(.eyebrow) {
  color: rgba(244, 240, 232, 0.7);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.4;
}

.install-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 4px;
}

.install-cue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(var(--favorite-rgb), 0.18);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(var(--favorite-rgb), 0.085), rgba(var(--accent-rgb), 0.025)),
    rgba(244, 240, 232, 0.026);
  color: rgba(244, 240, 232, 0.8);
  font-size: 0.72rem;
  font-weight: 780;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 16px rgba(var(--favorite-rgb), 0.045);
}

.install-cue svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: rgba(var(--favorite-rgb), 0.94);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.install-steps {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: grid;
  grid-template-columns: 26px 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(244, 240, 232, 0.065);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 18%, rgba(var(--favorite-rgb), 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012)),
    rgba(255,255,255,0.024);
  color: rgba(244, 240, 232, 0.84);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.026);
}

.install-step-badge {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 35%, rgba(var(--favorite-rgb), 0.22), transparent 70%),
    rgba(var(--accent-rgb), 0.12);
  color: rgba(var(--favorite-rgb), 0.96);
  font-size: 0.72rem;
  font-weight: 880;
}

.install-step-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(var(--favorite-rgb), 0.16);
  border-radius: 13px;
  background: rgba(4, 5, 7, 0.34);
  color: rgba(var(--favorite-rgb), 0.92);
  box-shadow: 0 0 14px rgba(var(--favorite-rgb), 0.06);
}

.install-step-icon svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.install-cue svg[data-install-icon="share"] {
  width: 17px;
  flex-basis: 17px;
}

.install-step-icon svg[data-install-icon="share"] {
  width: 20px;
  flex-basis: 20px;
}

.install-step-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.install-step-copy strong {
  color: rgba(244, 240, 232, 0.94);
  font-size: 0.9rem;
  font-weight: 840;
  line-height: 1.12;
}

.install-step-copy span {
  color: rgba(244, 240, 232, 0.62);
  font-size: 0.78rem;
  font-weight: 620;
  line-height: 1.32;
}

.install-note {
  padding: 10px 11px;
  border: 1px solid rgba(var(--sharp-rgb), 0.12);
  border-radius: 14px;
  background: rgba(var(--sharp-rgb), 0.045);
  color: rgba(244, 240, 232, 0.62) !important;
  font-size: 0.78rem !important;
}

.install-primary {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), transparent),
    rgba(var(--accent-rgb), 0.86);
  color: #101114;
  cursor: pointer;
  font-weight: 840;
}

.viewport-debug {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  z-index: 100;
  max-width: min(260px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid rgba(244, 240, 232, 0.18);
  border-radius: 10px;
  background: rgba(4, 5, 7, 0.82);
  color: rgba(244, 240, 232, 0.86);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
  font: 650 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.viewport-debug-probe {
  position: fixed;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body.debug-stage .tuner-panel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 30;
  border-left: 1px solid rgba(255, 90, 90, 0.75);
  pointer-events: none;
}

body.debug-stage .pitch-zone,
body.debug-stage .guitar-stage,
body.debug-stage .tune-meta-row {
  outline: 1px dashed rgba(94, 227, 223, 0.46);
  outline-offset: -1px;
}

body.debug-stage .guitar-frame {
  outline: 1px solid rgba(240, 189, 94, 0.48);
  outline-offset: -1px;
}

body.debug-stage .guitar-frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 12;
  border-left: 1px solid rgba(240, 189, 94, 0.72);
  pointer-events: none;
}

body.debug-stage .string-lane {
  outline: 1px solid rgba(143, 240, 191, 0.48);
  outline-offset: 1px;
  background: rgba(143, 240, 191, 0.05);
}

/* Toggle with ?debugStage=1 to inspect transparent reference-note peg hit zones. */
body.debug-stage .peg-hit-zone {
  outline: 1px solid rgba(240, 189, 94, 0.62);
  background: rgba(240, 189, 94, 0.08);
}

.control-dock {
    position: relative;
    display: grid;
    align-items: center;
    justify-content: center;
    justify-items: center;
    gap: 3px;
    width: min(100%, 390px);
    min-height: 46px;
    margin: 0 auto;
    transform: translateX(0px);
    animation: quietFadeIn var(--motion-slow) var(--motion-ease) 280ms both;
}

body:not(.view-tune) .control-dock {
  display: none;
}

body:not(.view-tune) .status-toast {
  display: none;
}

.status-toast {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  max-width: min(340px, calc(100vw - 32px));
  min-height: 34px;
  padding: 8px 13px;
  border: 1px solid rgba(243, 238, 229, 0.08);
  border-radius: 999px;
  background: rgba(6, 7, 10, 0.82);
  color: rgba(243, 238, 229, 0.82);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255,255,255,0.05);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.15;
  text-align: center;
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.status-toast[hidden] {
  display: none !important;
}

.status-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bottom-nav {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
  gap: 2px;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 3px;
  border: 1px solid rgba(244, 240, 232, 0.07);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
  overflow: hidden;
  contain: paint;
}

.bottom-nav > .nav-button {
  min-width: 0;
  width: 100%;
}

.nav-button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  max-width: min(250px, 72vw);
  overflow: hidden;
  color: rgba(243, 238, 229, 0.56);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill[hidden] {
  display: none !important;
}

body.is-in-tune .status-pill {
  color: var(--good);
  text-shadow: 0 0 18px rgba(var(--good-rgb), 0.34);
}

body.is-flat .status-pill {
  color: var(--flat);
  text-shadow: 0 0 16px rgba(var(--flat-rgb), 0.2);
}

body.is-sharp .status-pill {
  color: var(--sharp);
  text-shadow: 0 0 16px rgba(var(--sharp-rgb), 0.2);
}

body.is-all-tuned .status-pill {
  color: var(--all-tuned);
  text-shadow: 0 0 18px rgba(var(--all-tuned-rgb), 0.26), 0 0 26px rgba(var(--accent-rgb), 0.14);
}

.start-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: min(176px, 52vw);
  min-height: 38px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent),
    rgba(244, 240, 232, 0.92);
  color: #101114;
  font-weight: 790;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34), 0 0 28px rgba(var(--accent-rgb), 0.12);
  transition: transform var(--motion-fast) var(--motion-ease-press), border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
  animation: quietFadeIn var(--motion-slow) var(--motion-ease) 260ms both;
}

.start-button:hover,
.start-button:focus-visible {
  transform: translateY(var(--motion-hover-lift));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36), 0 0 32px rgba(var(--accent-rgb), 0.16);
}

.start-button:active {
  transform: scale(var(--motion-press-scale));
}

.start-button.is-small {
  min-width: min(158px, 48vw);
  min-height: 36px;
  padding: 8px 14px;
  background: rgba(244, 240, 232, 0.075);
  color: var(--text);
}

.start-icon {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  opacity: 0.78;
}

.start-label {
  position: relative;
  z-index: 1;
}

.start-button[data-mic-state="listening"],
.start-button[data-mic-state="play"],
.start-button[data-mic-state="unstable"],
.start-button[data-mic-state="holding"],
.start-button[data-mic-state="flat"],
.start-button[data-mic-state="sharp"],
.start-button[data-mic-state="tuned"],
.start-button[data-mic-state="allTuned"] {
  border-color: rgba(var(--accent-rgb), 0.18);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32), 0 0 24px rgba(var(--accent-rgb), 0.1), inset 0 1px 0 rgba(255,255,255,0.05);
}

.start-button[data-mic-state="listening"]::after,
.start-button[data-mic-state="play"]::after,
.start-button[data-mic-state="unstable"]::after,
.start-button[data-mic-state="holding"]::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: inherit;
  opacity: 0.32;
  animation: micRingBreath 4.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes micRingBreath {
  0%, 100% {
    opacity: 0.16;
    transform: scale(0.99);
  }
  50% {
    opacity: 0.38;
    transform: scale(1.018);
  }
}

.start-button[data-mic-state="listening"] .start-icon,
.start-button[data-mic-state="play"] .start-icon,
.start-button[data-mic-state="unstable"] .start-icon,
.start-button[data-mic-state="holding"] .start-icon {
  color: rgba(var(--accent-rgb), 0.92);
  animation: micCtaPulse 4.4s ease-in-out infinite;
}

.start-button[data-mic-state="flat"] .start-icon {
  color: var(--flat);
}

.start-button[data-mic-state="sharp"] .start-icon {
  color: var(--sharp);
}

.start-button[data-mic-state="tuned"] .start-icon,
.start-button[data-mic-state="allTuned"] .start-icon {
  color: var(--good);
}

.start-button[data-mic-state="blocked"],
.start-button[data-mic-state="retry"],
.start-button[data-mic-state="secure"] {
  border-color: rgba(var(--flat-rgb), 0.26);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34), 0 0 24px rgba(var(--flat-rgb), 0.12), inset 0 1px 0 rgba(255,255,255,0.05);
}

.start-button[data-mic-state="blocked"] .start-icon,
.start-button[data-mic-state="retry"] .start-icon,
.start-button[data-mic-state="secure"] .start-icon {
  color: var(--flat);
}

.start-button.is-status-changing,
.status-pill.is-status-changing {
  animation: statusSwap 220ms var(--motion-ease);
}

.start-button.is-status-warn {
  animation: compactShake 260ms var(--motion-ease);
}

@keyframes statusSwap {
  from {
    opacity: 0.72;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes micCtaPulse {
  0%, 100% {
    opacity: 0.62;
    transform: scale(1);
  }
  50% {
    opacity: 0.94;
    transform: scale(1.035);
  }
}

.start-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.start-glow {
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255,255,255,0.65), transparent 38%);
  transform: translateX(-42%);
  opacity: 0.2;
}

.permission-note {
  margin: 6px auto 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
}

.secondary-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  width: min(100%, 540px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(12px, 3.4vw, 22px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 26px;
  background: rgba(8, 10, 14, 0.76);
  box-shadow: 0 24px 60px rgba(0,0,0,0.38);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.settings-view .secondary-panel {
  border: 0;
  background:
    radial-gradient(ellipse at 50% 12%, rgba(var(--accent-rgb), 0.09), transparent 44%),
    rgba(8, 10, 14, 0.62);
  overflow: visible;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(10px, 2.4dvh, 16px);
}

h2 {
  font-size: clamp(1.55rem, 5vw, 2.1rem);
}

.icon-button {
  min-width: 70px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 720;
}

.chords-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 570px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(6px, 1.8dvh, 14px) clamp(10px, 3vw, 20px) 0;
  overflow: hidden;
}

.chords-shell::before {
  content: "";
  position: absolute;
  inset: 8% -8% 12%;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(var(--accent-rgb), 0.16), transparent 48%),
    radial-gradient(ellipse at 18% 74%, rgba(var(--finger-3-rgb), 0.055), transparent 52%),
    radial-gradient(ellipse at 78% 78%, rgba(var(--sharp-rgb), 0.07), transparent 58%);
  filter: blur(14px);
  pointer-events: none;
}

.chords-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: clamp(8px, 1.6dvh, 14px);
}

.chords-head .icon-button {
  min-width: 58px;
  min-height: 36px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 240, 232, 0.72);
}

.chords-head h2 {
  font-size: clamp(1.45rem, 6.5vw, 2.32rem);
  font-weight: 820;
  line-height: 0.9;
}

.chord-mode-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: min(100%, 360px);
  margin: 0 auto clamp(4px, 1dvh, 8px);
  padding: 3px;
  border: 1px solid rgba(244, 240, 232, 0.055);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.012)),
    rgba(3, 4, 6, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 24px rgba(0,0,0,0.12);
  backdrop-filter: blur(18px);
}

.chord-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(244, 240, 232, 0.56);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 760;
  transition: transform var(--motion-fast) var(--motion-ease-press), color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.chord-mode-button:hover,
.chord-mode-button:focus-visible {
  transform: translateY(var(--motion-hover-lift));
}

.chord-mode-button:active {
  transform: scale(var(--motion-press-scale));
}

.chord-mode-button::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: rgba(244, 240, 232, 0.44);
  opacity: 0.78;
  transition: color 170ms ease, opacity 170ms ease, filter 170ms ease;
}

.chord-mode-button[data-chord-mode="hero"]::before {
  content: "◈";
}

.chord-mode-button[data-chord-mode="browse"]::before {
  content: "▦";
}

.chord-mode-button[data-chord-mode="favorites"]::before {
  content: "☆";
}

.chord-mode-button[data-chord-mode="hero"]::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 50%, currentColor 0 1.6px, transparent 1.75px),
    radial-gradient(circle at 77% 22%, currentColor 0 1.6px, transparent 1.75px),
    linear-gradient(currentColor, currentColor) 23% 0 / 1.35px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 50% 0 / 1.35px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 77% 0 / 1.35px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 0 22% / 100% 1.35px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 1.35px no-repeat,
    linear-gradient(currentColor, currentColor) 0 78% / 100% 1.35px no-repeat;
  box-shadow: none;
}

.chord-mode-button[data-chord-mode="browse"]::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background:
    radial-gradient(circle at 25% 25%, currentColor 0 1.45px, transparent 1.65px),
    radial-gradient(circle at 75% 25%, currentColor 0 1.45px, transparent 1.65px),
    radial-gradient(circle at 25% 75%, currentColor 0 1.45px, transparent 1.65px),
    radial-gradient(circle at 75% 75%, currentColor 0 1.45px, transparent 1.65px);
}

.chord-mode-button[data-chord-mode="favorites"]::before {
  content: "";
  background: currentColor;
  clip-path: polygon(50% 5%, 61% 36%, 94% 36%, 67% 55%, 77% 88%, 50% 68%, 23% 88%, 33% 55%, 6% 36%, 39% 36%);
  opacity: 0.68;
}

.chord-mode-button.is-active {
  background:
    linear-gradient(180deg, rgba(var(--leaf-rgb), 0.105), rgba(var(--dusk-rgb), 0.04)),
    rgba(244, 240, 232, 0.04);
  color: var(--text);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16), 0 0 14px rgba(var(--leaf-rgb), 0.055);
}

.chord-mode-button.is-active::before {
  color: rgba(var(--leaf-rgb), 0.9);
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(var(--dusk-rgb), 0.15));
}

.chord-mode-panel {
  display: none;
}

.chord-mode-panel.is-active {
  display: block;
  min-height: 0;
  overflow: hidden;
}

.chord-hero-view {
  text-align: center;
}

.chord-hero-view.is-active {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  gap: clamp(8px, 1.4dvh, 14px);
  overflow: hidden;
}

.browse-view.is-active {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 240, 232, 0.24) transparent;
}

.chord-hero-actions {
  display: grid;
  grid-template-columns: minmax(0, auto) 38px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: min(100%, 405px);
  min-height: 44px;
  margin: clamp(8px, 1.25dvh, 13px) auto clamp(11px, 1.65dvh, 17px);
  padding: 3px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 50%, rgba(var(--favorite-rgb), 0.13), transparent 46%),
    radial-gradient(circle at 92% 50%, rgba(var(--favorite-rgb), 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.038), rgba(255,255,255,0.012)),
    rgba(6, 6, 7, 0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 16px 34px rgba(0,0,0,0.18), 0 0 24px rgba(var(--accent-rgb), 0.04);
}

.chord-quality,
.chord-variant-button,
.chord-type-trigger,
.chord-type-option,
.favorite-button,
.chord-card-save {
  border: 1px solid rgba(244, 240, 232, 0.09);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.022)),
    rgba(255, 255, 255, 0.028);
  color: rgba(244, 240, 232, 0.7);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chord-variant-control {
  position: relative;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: min(100%, 318px);
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.chord-variant-control::-webkit-scrollbar {
  display: none;
}

.chord-variant-control.is-scrollable {
  width: min(100%, 318px);
  max-width: calc(100vw - 116px);
  justify-self: end;
  mask-image: linear-gradient(90deg, transparent 0, black 18px, black calc(100% - 18px), transparent 100%);
}

.chord-quality {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  color: rgba(244, 240, 232, 0.64);
  font-size: 0.66rem;
}

.chord-type-menu {
  position: relative;
  flex: 0 0 auto;
}

.chord-type-menu summary {
  list-style: none;
}

.chord-type-menu summary::-webkit-details-marker {
  display: none;
}

.chord-type-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: clamp(120px, 31vw, 168px);
  min-height: 38px;
  padding: 0 15px 0 18px;
  border-color: rgba(var(--favorite-rgb), 0.48);
  background:
    radial-gradient(circle at 82% 50%, rgba(var(--favorite-rgb), 0.18), transparent 42%),
    linear-gradient(180deg, rgba(var(--favorite-rgb), 0.15), rgba(var(--accent-rgb), 0.045)),
    rgba(255,255,255,0.025);
  color: rgba(255, 247, 230, 0.94);
  cursor: pointer;
  font-size: 0.84rem;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 0 18px rgba(var(--favorite-rgb), 0.12), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform var(--motion-fast) var(--motion-ease-press), border-color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.chord-type-trigger:hover,
.chord-type-trigger:focus-visible {
  transform: translateY(var(--motion-hover-lift));
  box-shadow: 0 0 22px rgba(var(--favorite-rgb), 0.16), inset 0 1px 0 rgba(255,255,255,0.07);
}

.chord-type-trigger:active {
  transform: scale(var(--motion-press-scale));
}

.chord-type-trigger svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: rgba(var(--favorite-rgb), 0.9);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 170ms ease;
}

.chord-type-menu[open] .chord-type-trigger svg {
  transform: rotate(180deg);
}

.chord-type-options {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(190px, calc(100vw - 54px));
  padding: 6px;
  border: 1px solid rgba(244, 240, 232, 0.09);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(28, 25, 20, 0.94), rgba(8, 8, 9, 0.94)),
    rgba(4, 5, 7, 0.96);
  box-shadow: 0 18px 44px rgba(0,0,0,0.36), 0 0 28px rgba(var(--accent-rgb), 0.07), inset 0 1px 0 rgba(255,255,255,0.045);
  overflow: hidden;
  backdrop-filter: blur(18px);
  transform-origin: top left;
}

.chord-type-menu[open] .chord-type-options {
  animation: menuOpen 180ms var(--motion-ease) both;
}

@keyframes menuOpen {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chord-type-options::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 9px;
  bottom: 16px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--favorite-rgb), 0.58), rgba(var(--accent-rgb), 0.28));
  box-shadow: 0 0 10px rgba(var(--favorite-rgb), 0.12);
  pointer-events: none;
}

.chord-type-scroll {
  display: grid;
  gap: 4px;
  max-height: min(268px, 42dvh);
  padding: 0 16px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.chord-type-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chord-type-scroll::-webkit-scrollbar-track {
  margin-block: 10px;
  border-radius: 999px;
  background: transparent;
}

.chord-type-scroll::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 2px solid rgba(8, 8, 9, 0.94);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--favorite-rgb), 0.72), rgba(var(--accent-rgb), 0.36));
}

.chord-type-scroll::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  background: transparent !important;
  -webkit-appearance: none;
}

.chord-type-scroll::-webkit-scrollbar-button:single-button,
.chord-type-scroll::-webkit-scrollbar-button:vertical:start:decrement,
.chord-type-scroll::-webkit-scrollbar-button:vertical:end:increment {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.chord-type-scroll::-webkit-scrollbar-corner {
  background: transparent;
}

.chord-type-option {
  min-height: 34px;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
  color: rgba(244, 240, 232, 0.66);
  cursor: pointer;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  transition: transform var(--motion-fast) var(--motion-ease-press), background var(--motion-fast) ease, color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.chord-type-option.is-active {
  border-color: rgba(var(--accent-rgb), 0.24);
  background: rgba(var(--accent-rgb), 0.075);
  color: rgba(244, 240, 232, 0.92);
}

.chord-quick-variants {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding-right: 0;
}

.chord-variant-button {
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 38px;
  padding: 0 11px;
  border-color: rgba(244, 240, 232, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012)),
    rgba(255,255,255,0.01);
  color: rgba(244, 240, 232, 0.66);
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
  transition: color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease-press);
  white-space: nowrap;
}

.chord-variant-button:hover,
.chord-variant-button:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.25);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.035)),
    rgba(244, 240, 232, 0.04);
  color: rgba(244, 240, 232, 0.9);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.1), inset 0 1px 0 rgba(255,255,255,0.045);
  transform: translateY(var(--motion-hover-lift));
}

.chord-variant-button:active,
.chord-type-option:active {
  transform: scale(var(--motion-press-scale));
}

.favorite-button,
.chord-card-save {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease-press);
}

.favorite-button {
  min-width: 40px;
  min-height: 40px;
  border-color: rgba(var(--favorite-rgb), 0.42);
  background:
    radial-gradient(circle at 50% 38%, rgba(var(--favorite-rgb), 0.24), transparent 58%),
    linear-gradient(180deg, rgba(var(--favorite-rgb), 0.12), rgba(var(--favorite-rgb), 0.04)),
    rgba(255, 255, 255, 0.022);
  color: rgba(var(--favorite-rgb), 0.96);
  box-shadow: 0 0 18px rgba(var(--favorite-rgb), 0.1), inset 0 1px 0 rgba(255,255,255,0.055);
}

.favorite-button.is-saved,
.chord-card.is-favorite .chord-card-save {
  border-color: rgba(var(--favorite-rgb), 0.5);
  background:
    linear-gradient(180deg, rgba(var(--favorite-rgb), 0.16), rgba(var(--favorite-rgb), 0.08)),
    rgba(255, 255, 255, 0.03);
  color: var(--favorite);
  box-shadow: 0 0 22px rgba(var(--favorite-rgb), 0.14);
}

.favorite-button:hover,
.chord-card-save:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.favorite-button:active,
.chord-card-save:active {
  transform: scale(var(--motion-press-scale));
}

.favorite-button.is-favorite-popping {
  animation: favoritePop 220ms var(--motion-ease);
}

@keyframes favoritePop {
  0% {
    transform: scale(0.95);
  }
  58% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

.favorite-button:hover,
.favorite-button:focus-visible {
  border-color: rgba(var(--favorite-rgb), 0.62);
  color: rgba(255, 247, 230, 0.96);
  box-shadow: 0 0 24px rgba(var(--favorite-rgb), 0.18), inset 0 1px 0 rgba(255,255,255,0.065);
}

.star-icon {
  width: 17px;
  height: 17px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 0 transparent);
}

.star-icon.is-filled {
  fill: currentColor;
  stroke: currentColor;
  filter: drop-shadow(0 0 8px rgba(var(--favorite-rgb), 0.34));
}

.chord-hero-main {
  display: grid;
  grid-template-columns: clamp(28px, 8vw, 42px) minmax(0, 1fr) clamp(28px, 8vw, 42px);
  align-items: center;
  gap: clamp(0px, 1vw, 8px);
  min-height: 0;
}

.chord-step {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(28px, 8vw, 42px);
  min-height: clamp(52px, 14vw, 78px);
  border: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(244, 240, 232, 0.035), transparent 64%);
  color: rgba(244, 240, 232, 0.42);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: color var(--motion-fast) ease, background var(--motion-fast) ease, filter var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease-press);
}

.chord-step::before {
  content: "";
  position: absolute;
  inset: max(-10px, -2.8vw);
  border-radius: inherit;
}

.chord-step svg {
  width: clamp(21px, 5.6vw, 30px);
  height: clamp(21px, 5.6vw, 30px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chord-step:hover,
.chord-step:focus-visible {
  background: rgba(255,255,255,0.035);
  color: rgba(244, 240, 232, 0.82);
  filter: drop-shadow(0 0 14px rgba(var(--sharp-rgb), 0.1));
}

.chord-step:active {
  transform: scale(var(--motion-press-scale));
}

.chord-step:hover,
.practice-chip:hover,
.chord-card-main:hover {
  color: var(--text);
}

.chord-hero-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0;
  min-width: 0;
  padding: clamp(2px, 0.8dvh, 7px) 4px clamp(3px, 0.9dvh, 8px);
}

.chord-hero-view.is-chord-entering .chord-hero-card,
.chord-hero-view.is-chord-entering .chord-hero-actions,
.chord-hero-view.is-chord-entering .chord-voicing {
  animation: chordHeroEnter var(--motion-normal) var(--motion-ease) both;
}

.chord-hero-view[data-motion-direction="next"].is-chord-entering .chord-hero-card {
  --chord-enter-x: 8px;
}

.chord-hero-view[data-motion-direction="prev"].is-chord-entering .chord-hero-card {
  --chord-enter-x: -8px;
}

@keyframes chordHeroEnter {
  from {
    opacity: 0;
    transform: translateX(var(--chord-enter-x, 0)) translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

.chord-hero-card::before {
  content: "";
  position: absolute;
  inset: 8% 6% 6%;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(244, 240, 232, 0.065), transparent 60%),
    radial-gradient(ellipse at 50% 20%, rgba(var(--accent-rgb), 0.12), transparent 48%),
    radial-gradient(ellipse at 75% 56%, rgba(var(--finger-3-rgb), 0.045), transparent 42%);
  filter: blur(8px);
}

.chord-hero-card h3 {
  font-size: clamp(3.75rem, 15dvh, 6.3rem);
  font-weight: 850;
  line-height: 0.82;
  text-shadow: 0 0 34px rgba(var(--accent-rgb), 0.18);
}

.hero-diagram {
  width: min(65vw, 35dvh, 260px);
  margin-top: clamp(2px, 0.4dvh, 6px);
  padding: clamp(9px, 1.5dvh, 14px);
  border: 1px solid rgba(244, 240, 232, 0.075);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(var(--accent-rgb), 0.055), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.008)),
    rgba(3, 4, 6, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025), 0 18px 38px rgba(0,0,0,0.12);
  color: var(--text);
}

.chord-voicing {
  margin: clamp(6px, 0.9dvh, 10px) 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(244, 240, 232, 0.64);
  font-size: 0.86rem;
  font-weight: 620;
  line-height: 1.25;
  transform: none;
}

.related-chords {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 11px;
  width: min(100%, 430px);
  margin: clamp(6px, 1dvh, 10px) auto 0;
  padding: 14px;
  border: 1px solid rgba(var(--favorite-rgb), 0.2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(var(--favorite-rgb), 0.16), transparent 38%),
    radial-gradient(circle at 82% 120%, rgba(var(--accent-rgb), 0.065), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,0.032), rgba(255,255,255,0.01)),
    rgba(8, 7, 6, 0.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.038), 0 18px 34px rgba(0,0,0,0.18), 0 0 26px rgba(var(--favorite-rgb), 0.035);
}

.related-chords.is-suggestions-entering .practice-head,
.related-chords.is-suggestions-entering .practice-chip {
  animation: suggestionEnter var(--motion-normal) var(--motion-ease) both;
}

.related-chords.is-suggestions-entering .practice-chip:nth-child(2) {
  animation-delay: 24ms;
}

.related-chords.is-suggestions-entering .practice-chip:nth-child(3) {
  animation-delay: 48ms;
}

@keyframes suggestionEnter {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.practice-head {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  padding-left: 1px;
}

.practice-head span {
  margin-bottom: 0;
  color: rgba(255, 215, 139, 0.96);
  font-size: 0.9rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 0 0 16px rgba(var(--favorite-rgb), 0.18);
}

.practice-spark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid rgba(var(--favorite-rgb), 0.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--favorite-rgb), 0.24), transparent 58%),
    linear-gradient(180deg, rgba(var(--favorite-rgb), 0.12), rgba(var(--favorite-rgb), 0.035)),
    rgba(255,255,255,0.018);
  color: rgba(var(--favorite-rgb), 0.94);
  box-shadow: 0 0 18px rgba(var(--favorite-rgb), 0.12), inset 0 1px 0 rgba(255,255,255,0.05);
  filter: drop-shadow(0 0 8px rgba(var(--favorite-rgb), 0.16));
}

.practice-spark::before,
.practice-spark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 15px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.practice-spark::after {
  width: 15px;
  height: 3px;
}

.practice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}

.practice-chip {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid rgba(var(--favorite-rgb), 0.18);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(var(--favorite-rgb), 0.075), rgba(var(--accent-rgb), 0.022)),
    rgba(255,255,255,0.016);
  color: rgba(244, 240, 232, 0.88);
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 800;
  text-align: left;
  transition: border-color 170ms ease, color 170ms ease, background 170ms ease, transform 170ms ease;
}

.practice-chip strong {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-chip span {
  overflow: hidden;
  color: rgba(244, 240, 232, 0.58);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-chip:hover,
.practice-chip:focus-visible {
  border-color: rgba(var(--favorite-rgb), 0.36);
  background:
    linear-gradient(180deg, rgba(var(--favorite-rgb), 0.12), rgba(var(--accent-rgb), 0.045)),
    rgba(255,255,255,0.024);
  color: var(--text);
  transform: translateY(-1px);
}

.search-field {
  display: grid;
  gap: 6px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 680;
}

.search-field input,
.setting-row input,
.setting-row select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: 0;
}

.search-field input {
  width: 100%;
  padding: 0 14px;
}

.chord-sets {
  display: grid;
  gap: 6px;
}

.chord-sets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 18px;
  color: rgba(244, 240, 232, 0.48);
  font-size: 0.64rem;
  font-weight: 820;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.chord-set {
  border: 1px solid rgba(244, 240, 232, 0.065);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    rgba(3, 4, 6, 0.16);
  overflow: hidden;
}

.chord-set-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  color: rgba(244, 240, 232, 0.72);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
}

.chord-set-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: rgba(244, 240, 232, 0.48);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 170ms ease, stroke 170ms ease;
}

.chord-set.is-open .chord-set-toggle svg {
  stroke: rgba(var(--accent-rgb), 0.78);
  transform: rotate(180deg);
}

.chord-set-body {
  display: grid;
  gap: 7px;
  padding: 0 9px 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height var(--motion-med) var(--motion-ease), opacity var(--motion-med) ease, transform var(--motion-med) var(--motion-ease), padding-bottom var(--motion-med) ease;
}

.chord-set.is-open .chord-set-body {
  max-height: 360px;
  opacity: 1;
  transform: translateY(0);
}

.chord-set-line {
  display: grid;
  gap: 5px;
}

.chord-set-label {
  color: rgba(244, 240, 232, 0.38);
  font-size: 0.64rem;
  font-weight: 760;
}

.chord-set-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chord-set-chip {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(244, 240, 232, 0.075);
  border-radius: 999px;
  background: rgba(255,255,255,0.026);
  color: rgba(244, 240, 232, 0.72);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  transition: border-color 170ms ease, color 170ms ease, background 170ms ease, transform 170ms ease;
}

.chord-set-chip:hover,
.chord-set-chip:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.26);
  background: rgba(var(--accent-rgb), 0.07);
  color: var(--text);
  transform: translateY(-1px);
}

.visualizer-view.is-active {
  position: relative;
  overflow: hidden;
}

.visualizer-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  width: min(100%, 620px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(48px, var(--app-height-080), 70px) clamp(6px, 2vw, 18px) clamp(14px, var(--app-height-020), 22px);
  overflow: hidden;
  contain: layout paint style;
}

.visualizer-shell::before {
  content: "";
  position: absolute;
  inset: 5% -16% 8%;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(240, 147, 39, 0.22), transparent 42%),
    radial-gradient(ellipse at 58% 66%, rgba(255, 67, 28, 0.09), transparent 46%),
    radial-gradient(ellipse at 24% 62%, rgba(var(--finger-2-rgb), 0.05), transparent 42%);
  filter: blur(18px);
  pointer-events: none;
}

.visualizer-mode-pill {
  appearance: none;
  position: absolute;
  top: clamp(8px, var(--app-height-015), 16px);
  right: clamp(4px, 2vw, 14px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(var(--favorite-rgb), 0.16);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 50%, rgba(var(--favorite-rgb), 0.11), transparent 52%),
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.014)),
    rgba(7, 7, 8, 0.42);
  color: rgba(244, 240, 232, 0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 38px rgba(0,0,0,0.16);
  font-size: 0.82rem;
  font-weight: 820;
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--motion-ease-press), border-color var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
  animation: quietFadeIn var(--motion-slow) var(--motion-ease) 160ms both;
}

.visualizer-mode-pill:hover,
.visualizer-mode-pill:focus-visible,
.visualizer-mode-pill.is-open {
  border-color: rgba(var(--favorite-rgb), 0.34);
  color: rgba(244, 240, 232, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.055), 0 18px 40px rgba(0,0,0,0.18), 0 0 24px rgba(var(--favorite-rgb), 0.1);
  transform: translateY(var(--motion-hover-lift));
}

.visualizer-mode-pill:active {
  transform: scale(var(--motion-press-scale));
}

.visualizer-mode-pill.is-mode-tapping {
  animation: favoritePop 240ms var(--motion-ease);
}

.visualizer-mode-pill svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: rgba(var(--favorite-rgb), 0.82);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform var(--motion-fast) var(--motion-ease);
}

.visualizer-mode-pill.is-open svg {
  transform: rotate(180deg);
}

.visualizer-mode-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 226, 146, 0.95), rgba(240, 150, 43, 0.88) 56%, rgba(240, 150, 43, 0.16) 72%);
  box-shadow: 0 0 16px rgba(240, 150, 43, 0.34);
}

.visualizer-mode-dot-strings {
  background: radial-gradient(circle, rgba(255, 220, 142, 0.95), rgba(111, 210, 194, 0.84) 58%, rgba(111, 210, 194, 0.14) 74%);
  box-shadow: 0 0 16px rgba(111, 210, 194, 0.3);
}

.visualizer-mode-dot-aura {
  background: radial-gradient(circle, rgba(255, 207, 116, 0.94), rgba(138, 121, 166, 0.86) 58%, rgba(138, 121, 166, 0.14) 74%);
  box-shadow: 0 0 16px rgba(138, 121, 166, 0.32);
}

.visualizer-mode-menu {
  position: absolute;
  top: calc(clamp(8px, var(--app-height-015), 16px) + 44px);
  right: clamp(4px, 2vw, 14px);
  z-index: 4;
  min-width: 148px;
  padding: 5px;
  border: 1px solid rgba(var(--favorite-rgb), 0.17);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.016)),
    rgba(8, 7, 7, 0.82);
  box-shadow: 0 22px 52px rgba(0,0,0,0.36), 0 0 28px rgba(var(--favorite-rgb), 0.07), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  animation: menuOpen 170ms var(--motion-ease) both;
}

.visualizer-mode-option {
  width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(244, 240, 232, 0.8);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 820;
  text-align: left;
  transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease-press);
}

.visualizer-mode-option:hover,
.visualizer-mode-option:focus-visible,
.visualizer-mode-option.is-active {
  border-color: rgba(var(--favorite-rgb), 0.2);
  background: rgba(var(--favorite-rgb), 0.08);
}

.visualizer-mode-option:active {
  transform: scale(var(--motion-press-scale));
}

.visualizer-stage {
  --visualizer-level: 0;
  --visualizer-transient: 0;
  --visualizer-inner-glow: 68px;
  --visualizer-outer-glow: 80px;
  --visualizer-inner-alpha: 0.055;
  --visualizer-outer-alpha: 0.08;
  --visualizer-aura-inset: 12%;
  --visualizer-aura-blur: 18px;
  --visualizer-aura-opacity: 0.78;
  --visualizer-aura-scale: 1;
  position: relative;
  display: grid;
  place-items: center;
  width: min(95vw, 540px, var(--app-height-720));
  aspect-ratio: 1;
  margin-top: clamp(4px, var(--app-height-012), 12px);
  border-radius: 999px;
  isolation: isolate;
  contain: layout paint style;
  transform: translateZ(0);
}

.visualizer-stage.is-mode-changing {
  animation: visualizerModeSettle var(--motion-normal) var(--motion-ease) both;
}

@keyframes visualizerModeSettle {
  from {
    opacity: 0.76;
    transform: translateZ(0) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateZ(0) scale(1);
  }
}

.visualizer-stage::before,
.visualizer-stage::after {
  content: "";
  position: absolute;
  inset: 7%;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.visualizer-stage::before {
  border: 1px solid rgba(var(--favorite-rgb), 0.08);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 181, 65, 0.08), transparent 52%),
    radial-gradient(circle at 52% 44%, rgba(255, 83, 30, 0.06), transparent 62%);
  box-shadow:
    inset 0 0 var(--visualizer-inner-glow) rgba(255, 150, 38, var(--visualizer-inner-alpha)),
    0 0 var(--visualizer-outer-glow) rgba(255, 108, 32, var(--visualizer-outer-alpha));
  animation: lavaChamberBreath 5.8s ease-in-out infinite;
}

.visualizer-stage[data-visualizer-mode="strings"]::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 181, 65, 0.06), transparent 48%),
    radial-gradient(circle at 50% 42%, rgba(111, 210, 194, 0.055), transparent 62%),
    radial-gradient(circle at 55% 70%, rgba(138, 121, 166, 0.04), transparent 58%);
  box-shadow:
    inset 0 0 var(--visualizer-inner-glow) rgba(111, 210, 194, var(--visualizer-inner-alpha)),
    0 0 var(--visualizer-outer-glow) rgba(255, 150, 38, var(--visualizer-outer-alpha));
}

.visualizer-stage[data-visualizer-mode="aura"]::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 181, 65, 0.09), transparent 48%),
    radial-gradient(circle at 43% 62%, rgba(111, 210, 194, 0.055), transparent 58%),
    radial-gradient(circle at 65% 36%, rgba(138, 121, 166, 0.06), transparent 56%);
  box-shadow:
    inset 0 0 var(--visualizer-inner-glow) rgba(255, 180, 72, var(--visualizer-inner-alpha)),
    0 0 var(--visualizer-outer-glow) rgba(138, 121, 166, var(--visualizer-outer-alpha));
}

.visualizer-stage::after {
  inset: 2%;
  border: 1px solid rgba(244, 240, 232, 0.035);
  background: radial-gradient(circle at 50% 50%, transparent 48%, rgba(255, 134, 35, 0.045) 72%, transparent 76%);
  filter: blur(0.3px);
  animation: lavaChamberOrbit 18s linear infinite;
}

.visualizer-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 26px rgba(255, 142, 38, 0.2));
  transform: translateZ(0);
}

.visualizer-aura {
  position: absolute;
  inset: 12%;
  z-index: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 40% 40%, rgba(255, 207, 102, 0.18), transparent 24%),
    radial-gradient(circle at 60% 62%, rgba(255, 83, 28, 0.12), transparent 38%),
    radial-gradient(circle at 30% 72%, rgba(var(--finger-2-rgb), 0.055), transparent 30%);
  filter: blur(var(--visualizer-aura-blur));
  opacity: var(--visualizer-aura-opacity);
  transform: scale(var(--visualizer-aura-scale));
  will-change: transform, opacity, filter;
  animation: lavaAuraBreath 6.2s ease-in-out infinite;
}

.visualizer-stage[data-visualizer-mode="strings"] .visualizer-aura {
  background:
    radial-gradient(circle at 45% 38%, rgba(111, 210, 194, 0.11), transparent 26%),
    radial-gradient(circle at 54% 62%, rgba(255, 176, 64, 0.1), transparent 38%),
    radial-gradient(circle at 30% 72%, rgba(var(--finger-3-rgb), 0.055), transparent 34%);
}

.visualizer-stage[data-visualizer-mode="aura"] .visualizer-aura {
  background:
    radial-gradient(circle at 42% 42%, rgba(255, 207, 102, 0.16), transparent 24%),
    radial-gradient(circle at 62% 58%, rgba(111, 210, 194, 0.09), transparent 34%),
    radial-gradient(circle at 30% 72%, rgba(var(--finger-3-rgb), 0.11), transparent 36%);
}

.visualizer-status-pill {
  appearance: none;
  border: 1px solid rgba(var(--favorite-rgb), 0.13);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  margin-top: clamp(4px, var(--app-height-012), 12px);
  padding: 0 18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 50%, rgba(var(--favorite-rgb), 0.12), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,0.044), rgba(255,255,255,0.012)),
    rgba(6, 7, 8, 0.35);
  color: rgba(244, 240, 232, 0.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.038), 0 18px 40px rgba(0,0,0,0.18);
  font-size: 0.95rem;
  font-weight: 820;
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--motion-ease-press), border-color var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
  animation: quietFadeIn var(--motion-slow) var(--motion-ease) 260ms both;
}

.visualizer-status-pill:hover,
.visualizer-status-pill:focus-visible {
  border-color: rgba(var(--favorite-rgb), 0.28);
  color: rgba(244, 240, 232, 0.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 18px 42px rgba(0,0,0,0.2), 0 0 24px rgba(var(--favorite-rgb), 0.08);
  transform: translateY(var(--motion-hover-lift));
}

.visualizer-status-pill:active {
  transform: scale(var(--motion-press-scale));
}

.visualizer-status-pill.is-active {
  border-color: rgba(var(--favorite-rgb), 0.28);
  color: rgba(244, 240, 232, 0.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 18px 42px rgba(0,0,0,0.2), 0 0 30px rgba(var(--favorite-rgb), 0.11);
}

.visualizer-status-pill.is-unavailable {
  border-color: rgba(244, 240, 232, 0.11);
  color: rgba(244, 240, 232, 0.55);
}

.visualizer-status-pill:disabled {
  cursor: default;
  opacity: 0.78;
}

.visualizer-status-pill svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: rgba(var(--favorite-rgb), 0.92);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  filter: drop-shadow(0 0 9px rgba(var(--favorite-rgb), 0.24));
  animation: none;
}

.visualizer-status-pill.is-active svg {
  animation: visualizerListeningBars 3.2s ease-in-out infinite;
}

@keyframes lavaAuraBreath {
  0%, 100% {
    opacity: 0.62;
    transform: scale(0.985) rotate(0deg);
  }
  50% {
    opacity: 0.94;
    transform: scale(1.025) rotate(2deg);
  }
}

@keyframes lavaChamberBreath {
  0%, 100% {
    opacity: 0.74;
    transform: scale(0.992);
  }
  50% {
    opacity: 1;
    transform: scale(1.012);
  }
}

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

@keyframes visualizerListeningBars {
  0%, 100% {
    opacity: 0.68;
    transform: scaleY(0.92);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.08);
  }
}

.chord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 8px;
  overflow: visible;
}

.chord-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(244, 240, 232, 0.075);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 8%, rgba(var(--accent-rgb), 0.09), transparent 44%),
    radial-gradient(circle at 95% 12%, rgba(var(--sharp-rgb), 0.04), transparent 44%),
    rgba(255, 255, 255, 0.038);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  transition: transform var(--motion-fast) var(--motion-ease-press), border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.chord-card:hover,
.chord-card:focus-within {
  border-color: rgba(var(--accent-rgb), 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24), 0 0 18px rgba(var(--accent-rgb), 0.05);
  transform: translateY(-1px);
}

.chord-card-main {
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: center;
}

.chord-card-title {
  font-size: 1.7rem;
  font-weight: 840;
  line-height: 1;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.09);
}

.chord-card-quality {
  color: rgba(244, 240, 232, 0.48);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chord-card-save {
  justify-self: center;
  min-width: 32px;
  min-height: 32px;
}

.chord-diagram {
  width: 100%;
  height: auto;
  color: inherit;
  overflow: visible;
}

.chord-diagram-grid {
  max-width: 148px;
}

.chord-string {
  stroke: rgba(244, 240, 232, 0.5);
  stroke-width: 1.35;
  stroke-linecap: round;
}

.chord-fret {
  stroke: rgba(244, 240, 232, 0.29);
  stroke-width: 1.35;
  stroke-linecap: round;
}

.chord-nut {
  stroke: rgba(244, 240, 232, 0.92);
  stroke-width: 3.6;
  stroke-linecap: round;
}

.chord-dot circle,
.chord-barre {
  fill: rgba(var(--accent-rgb), 0.92);
  filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), 0.3)) drop-shadow(0 3px 5px rgba(0,0,0,0.28));
}

.chord-dot.finger-1 circle,
.chord-barre.finger-1 {
  fill: var(--finger-1);
  filter: drop-shadow(0 0 7px rgba(var(--finger-1-rgb), 0.34)) drop-shadow(0 3px 5px rgba(0,0,0,0.28));
}

.chord-dot.finger-2 circle {
  fill: var(--finger-2);
  filter: drop-shadow(0 0 7px rgba(var(--finger-2-rgb), 0.32)) drop-shadow(0 3px 5px rgba(0,0,0,0.28));
}

.chord-dot.finger-3 circle {
  fill: var(--finger-3);
  filter: drop-shadow(0 0 7px rgba(var(--finger-3-rgb), 0.32)) drop-shadow(0 3px 5px rgba(0,0,0,0.28));
}

.chord-dot.finger-4 circle {
  fill: var(--finger-4);
  filter: drop-shadow(0 0 7px rgba(var(--finger-4-rgb), 0.32)) drop-shadow(0 3px 5px rgba(0,0,0,0.28));
}

.chord-dot text {
  fill: #08090c;
  font-size: 10px;
  font-weight: 860;
}

.chord-topmark,
.chord-fret-label,
.chord-string-label {
  fill: rgba(244, 240, 232, 0.62);
  font-size: 10.5px;
  font-weight: 820;
}

.chord-topmark {
  fill: rgba(244, 240, 232, 0.74);
  font-size: 12px;
  font-weight: 780;
}

.chord-topmark.is-open {
  fill: rgba(var(--good-rgb), 0.84);
}

.chord-topmark.is-muted {
  fill: rgba(170, 162, 153, 0.54);
}

.favorites-empty {
  margin: 40px auto;
  max-width: 280px;
  color: rgba(244, 240, 232, 0.5);
  font-size: 0.95rem;
  font-weight: 680;
  line-height: 1.4;
  text-align: center;
}

.about-view.is-active {
  overflow: hidden;
  padding-bottom: 0;
}

.about-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 0.82fr);
  align-items: stretch;
  gap: clamp(10px, 1.6dvh, 16px);
  width: min(100%, 540px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(12px, 3.4vw, 22px);
}

.about-shell::before {
  content: "";
  position: absolute;
  inset: 4% -8% 18%;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(var(--favorite-rgb), 0.12), transparent 42%),
    radial-gradient(ellipse at 20% 78%, rgba(var(--dusk-rgb), 0.055), transparent 52%),
    radial-gradient(ellipse at 82% 74%, rgba(var(--accent-rgb), 0.07), transparent 48%);
  filter: blur(12px);
  pointer-events: none;
}

.about-hero {
  display: grid;
  align-content: start;
  gap: 2px;
  margin-bottom: 0;
  padding-top: 6px;
}

.about-hero h2 {
  margin-top: -2px;
  color: rgba(244, 240, 232, 0.94);
  font-size: clamp(1.55rem, 5vw, 2.1rem);
  font-weight: 820;
  line-height: 0.92;
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.14);
}

.about-card {
  display: grid;
  gap: 9px;
  padding: clamp(13px, 3.3vw, 18px);
  border: 1px solid rgba(244, 240, 232, 0.075);
  border-radius: 22px;
  background:
    radial-gradient(circle at 14% 10%, rgba(var(--favorite-rgb), 0.08), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,0.034), rgba(255,255,255,0.011)),
    rgba(6, 7, 8, 0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 18px 38px rgba(0,0,0,0.16);
  backdrop-filter: blur(18px);
}

.about-card p {
  margin: 0;
  color: rgba(244, 240, 232, 0.72);
  font-size: clamp(0.86rem, 3.15vw, 0.98rem);
  font-weight: 620;
  line-height: 1.42;
}

.about-mission {
  gap: 7px;
  padding: clamp(18px, 3dvh, 28px) clamp(3px, 1vw, 6px) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.about-mission p:first-child {
  color: rgba(244, 240, 232, 0.88);
  font-size: clamp(0.94rem, 3.55vw, 1.06rem);
  font-weight: 760;
  line-height: 1.38;
}

.about-mission strong {
  color: rgba(255, 247, 230, 0.98);
  font-weight: 850;
}

.about-mission p:first-child span {
  color: rgba(var(--favorite-rgb), 0.9);
  text-shadow: 0 0 16px rgba(var(--favorite-rgb), 0.12);
}

.about-promise {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.32em;
  color: rgba(244, 240, 232, 0.62);
  font-size: clamp(0.84rem, 3.05vw, 0.94rem);
  font-weight: 780;
  line-height: 1.34;
}

.about-promise span {
  color: rgba(244, 240, 232, 0.72);
}

.about-feedback h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(var(--favorite-rgb), 0.95);
  font-size: 0.9rem;
  font-weight: 830;
  letter-spacing: 0.02em;
}

.about-feedback {
  align-self: center;
}

.about-feedback h3 svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  filter: drop-shadow(0 0 8px rgba(var(--favorite-rgb), 0.16));
}

.about-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  justify-self: start;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(var(--favorite-rgb), 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 82% 50%, rgba(var(--favorite-rgb), 0.14), transparent 46%),
    linear-gradient(180deg, rgba(var(--favorite-rgb), 0.105), rgba(var(--accent-rgb), 0.035)),
    rgba(255,255,255,0.018);
  color: rgba(255, 247, 230, 0.92);
  font-size: 0.82rem;
  font-weight: 820;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(var(--favorite-rgb), 0.09), inset 0 1px 0 rgba(255,255,255,0.045);
}

.about-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  opacity: 0.9;
}

.about-footer {
  display: grid;
  justify-items: center;
  align-content: center;
  align-self: stretch;
  gap: 5px;
  margin-top: 0;
  padding: clamp(8px, 1.6dvh, 14px) 8px clamp(2px, 0.6dvh, 6px);
  text-align: center;
}

.studio-logo-link {
  display: inline-flex;
  opacity: 0.88;
  transition: opacity 170ms ease, filter 170ms ease;
}

.studio-logo-link:hover,
.studio-logo-link:focus-visible {
  opacity: 1;
  filter: drop-shadow(0 0 16px rgba(var(--favorite-rgb), 0.13));
}

.studio-logo-link img {
  display: block;
  width: min(148px, 42vw);
  height: auto;
}

.studio-credit,
.studio-site {
  color: rgba(244, 240, 232, 0.72);
  font-size: 0.76rem;
  font-weight: 760;
  text-decoration: none;
}

.studio-site {
  color: rgba(var(--favorite-rgb), 0.78);
  font-size: 0.72rem;
}

.about-footer p {
  margin: 2px 0 0;
  color: rgba(244, 240, 232, 0.42);
  font-size: 0.66rem;
  font-weight: 650;
}

.settings-list {
  display: grid;
  gap: clamp(6px, 1.05dvh, 10px);
  align-content: start;
  min-height: 0;
  overflow: visible;
}

.setting-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(126px, 190px);
  align-items: center;
  gap: 10px;
  padding: clamp(8px, 1.35dvh, 12px);
  border: 1px solid rgba(255,255,255,0.072);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.016)),
    rgba(255,255,255,0.032);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 12px 30px rgba(0,0,0,0.12);
}

.setting-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(244, 240, 232, 0.07);
  border-radius: 12px;
  background: rgba(5, 6, 8, 0.35);
  color: rgba(var(--accent-rgb), 0.78);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.08);
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1;
}

.setting-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.setting-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.setting-row strong {
  font-size: 0.9rem;
}

.setting-row small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.setting-control,
.number-control,
.theme-control {
  width: 100%;
}

.native-control {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  display: block;
}

.custom-select-button,
.number-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 38px;
  width: 100%;
  border: 1px solid rgba(244, 240, 232, 0.085);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018)),
    rgba(2, 3, 5, 0.42);
  color: rgba(244, 240, 232, 0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.custom-select-button {
  gap: 8px;
  padding: 0 11px;
  cursor: pointer;
  text-align: left;
  transition: transform var(--motion-fast) var(--motion-ease-press), border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
}

.custom-select-button:hover,
.custom-select-button:focus-visible {
  transform: translateY(var(--motion-hover-lift));
  border-color: rgba(var(--accent-rgb), 0.2);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.06), inset 0 1px 0 rgba(255,255,255,0.04);
}

.custom-select-button:active {
  transform: scale(var(--motion-press-scale));
}

.custom-select-button:focus-visible,
.number-control:focus-within,
.switch-control:focus-within .switch-track,
.theme-swatch:focus-visible,
.settings-action-button:focus-visible,
.install-primary:focus-visible,
.install-close:focus-visible {
  outline: 2px solid rgba(var(--sharp-rgb), 0.42);
  outline-offset: 2px;
}

.custom-select-value {
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.8px solid rgba(244, 240, 232, 0.5);
  border-bottom: 1.8px solid rgba(244, 240, 232, 0.5);
  transform: translateY(-2px) rotate(45deg);
}

.custom-select.is-open .custom-chevron {
  transform: translateY(2px) rotate(225deg);
}

.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 22;
  display: none;
  max-height: 178px;
  padding: 5px;
  border: 1px solid rgba(244, 240, 232, 0.09);
  border-radius: 16px;
  background: rgba(5, 6, 9, 0.94);
  box-shadow: 0 18px 44px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  overflow: auto;
  transform-origin: top center;
}

.custom-select.is-open .custom-select-menu {
  display: grid;
  gap: 2px;
  animation: menuOpen 180ms var(--motion-ease) both;
}

.custom-option {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(244, 240, 232, 0.68);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
  text-align: left;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease-press);
}

.custom-option:active {
  transform: scale(var(--motion-press-scale));
}

.custom-option:hover,
.custom-option.is-selected {
  background: rgba(var(--accent-rgb), 0.1);
  color: rgba(244, 240, 232, 0.92);
}

.custom-select.is-disabled {
  opacity: 0.58;
}

.custom-select.is-disabled .custom-select-button {
  cursor: default;
}

.settings-action-button {
  justify-self: end;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.018)),
    rgba(var(--accent-rgb), 0.08);
  color: rgba(244, 240, 232, 0.88);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 820;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.06), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform var(--motion-fast) var(--motion-ease-press), background var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.settings-action-button:hover {
  border-color: rgba(var(--accent-rgb), 0.34);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.095), rgba(255,255,255,0.024)),
    rgba(var(--accent-rgb), 0.12);
  transform: translateY(var(--motion-hover-lift));
}

.settings-action-button:active,
.theme-swatch:active,
.switch-control:active .switch-track {
  transform: scale(var(--motion-press-scale));
}

.install-setting.is-installed .setting-icon {
  color: rgba(var(--good-rgb), 0.8);
  box-shadow: 0 0 16px rgba(var(--good-rgb), 0.08);
}

.number-control {
  padding: 0 10px 0 0;
}

.number-control input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 0 0 11px;
  border: 0;
  background: transparent;
  color: rgba(244, 240, 232, 0.88);
  font-weight: 780;
  outline: 0;
}

.number-control span {
  color: rgba(var(--accent-rgb), 0.68);
  font-size: 0.68rem;
  font-weight: 860;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.switch-control {
  justify-self: end;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  display: block;
  width: 54px;
  height: 30px;
  border: 1px solid rgba(244, 240, 232, 0.09);
  border-radius: 999px;
  background: rgba(2, 3, 5, 0.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform var(--motion-fast) var(--motion-ease-press), background var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.switch-track span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.68);
  box-shadow: 0 8px 18px rgba(0,0,0,0.24);
  transition: transform 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.switch-control input:checked + .switch-track {
  border-color: rgba(var(--accent-rgb), 0.36);
  background: rgba(var(--accent-rgb), 0.14);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}

.switch-control input:checked + .switch-track span {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.24), 0 8px 18px rgba(0,0,0,0.24);
  transform: translateX(24px);
}

.theme-control {
  display: block;
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.theme-swatch {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid rgba(244, 240, 232, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.014)),
    rgba(2, 3, 5, 0.42);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--motion-ease-press), border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
}

.theme-swatch:hover,
.theme-swatch:focus-visible {
  transform: translateY(-1px);
}

.theme-swatch span {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(0,0,0,0.12);
}

.theme-swatch-amber span {
  background: linear-gradient(135deg, #f0bd5e 0%, #d4ad64 48%, #88b47a 100%);
}

.theme-swatch-green span {
  background: linear-gradient(135deg, #88b47a 0%, #6fd2c2 58%, #8a79a6 100%);
}

.theme-swatch-steel span {
  background: linear-gradient(135deg, #b5cce0 0%, #8a79a6 58%, #5f6f7f 100%);
}

.theme-swatch.is-active {
  border-color: rgba(var(--accent-rgb), 0.52);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.16), inset 0 1px 0 rgba(255,255,255,0.045);
}

.theme-swatch.is-active::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 5px;
  height: 9px;
  border: solid rgba(244, 240, 232, 0.86);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg);
}

body.theme-green {
  --accent: #88b47a;
  --accent-rgb: 136, 180, 122;
}

body.theme-steel {
  --accent: #a7b7cf;
  --accent-rgb: 167, 183, 207;
}

@media (max-width: 430px) {
  :root {
    --tune-top-space: calc(32px + env(safe-area-inset-top));
    --bottom-bar-space: calc(104px + env(safe-area-inset-bottom));
    --string-rail-offset: clamp(108px, 29vw, 150px);
  }

  body.view-tune .studio-grid,
  body.view-visualizer .studio-grid {
    background-image:
      linear-gradient(rgba(var(--leaf-rgb), 0.044) 1px, transparent 1px),
      linear-gradient(90deg, rgba(var(--dusk-rgb), 0.038) 1px, transparent 1px);
    opacity: 1;
  }

  .topbar {
    width: min(100% - 18px, 520px);
  }

  .brand span:last-child {
    display: inline;
  }

  .nav-button {
    min-width: 0;
    padding-inline: 2px;
    font-size: 0.58rem;
  }

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

  .main-stage {
    width: min(100% - 10px, 560px);
  }

  body.view-settings,
  body.view-about {
    --page-top-space: calc(50px + env(safe-area-inset-top));
  }

  body.view-chords .chords-shell {
    padding-top: clamp(22px, 3.5dvh, 32px);
  }

  .tuner-panel {
    height: 100%;
    min-height: 0;
    padding-inline: 6px;
  }

  .pitch-zone {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 4px;
    width: min(100%, 540px);
    margin-bottom: clamp(-14px, var(--app-height-neg-017), -6px);
  }

  .tune-meta-row {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(var(--bottom-bar-space) + 88px);
    width: min(430px, calc(100vw - 36px));
    margin: 0;
    padding: 0;
    transform: translateX(-50%);
  }

  .detected-note {
    font-size: clamp(3.15rem, 16vw, 4.9rem);
  }

  .guitar-frame {
    width: min(100vw, 470px);
    --guitar-x-adjust: 0px;
  }

  .guitar-stage {
    margin-top: clamp(-38px, var(--app-height-neg-044), -20px);
    margin-bottom: 0;
  }

  .control-dock {
    transform: translateX(0px);
  }

  .string-lane {
    --string-lane-width: 70px;
    column-gap: 6px;
  }

  .string-label {
    font-size: 0.9rem;
  }

  .string-note {
    display: block;
    font-size: 0.5rem;
  }

  .string-0,
  .string-1,
  .string-2 {
    left: calc(50% - var(--string-rail-offset) - var(--string-lane-width));
  }

  .string-3,
  .string-4 {
    left: calc(50% + var(--string-rail-offset));
    right: auto;
  }

  .string-5 {
    left: calc(50% + var(--string-rail-offset));
    right: auto;
  }

  .start-button {
    min-width: min(166px, 52vw);
  }

  .setting-row {
    grid-template-columns: 28px minmax(0, 1fr) minmax(102px, 142px);
    gap: 7px;
    padding: 9px 10px;
  }

  .secondary-panel {
    padding: 10px;
    border-radius: 20px;
  }

  .about-shell {
    padding: 10px;
  }

  .visualizer-shell {
    padding-top: clamp(48px, var(--app-height-075), 64px);
  }

  .visualizer-mode-pill {
    min-height: 34px;
    padding-inline: 11px;
    font-size: 0.76rem;
  }

  .visualizer-stage {
    width: min(96vw, var(--app-height-630));
  }

  .visualizer-status-pill {
    min-height: 38px;
    padding-inline: 15px;
    font-size: 0.86rem;
  }

  .panel-head {
    margin-bottom: 8px;
  }

  .setting-row strong {
    font-size: 0.84rem;
  }

  .setting-row small {
    font-size: 0.72rem;
  }

  .custom-select-button,
  .number-control,
  .theme-swatch,
  .settings-action-button {
    min-height: 36px;
  }

  .settings-action-button {
    padding: 0 11px;
    font-size: 0.7rem;
  }

  .related-chords {
    margin-top: clamp(12px, 1.8dvh, 16px);
  }

  body[data-display-mode="browser"] .chords-shell,
  body[data-viewport-size="short"] .chords-shell {
    padding-top: clamp(10px, 1.9dvh, 18px);
  }

  body[data-display-mode="browser"] .chord-mode-toggle,
  body[data-viewport-size="short"] .chord-mode-toggle {
    margin-bottom: clamp(2px, 0.45dvh, 5px);
  }

  body[data-display-mode="browser"] .chord-mode-button,
  body[data-viewport-size="short"] .chord-mode-button {
    min-height: 28px;
    font-size: 0.68rem;
  }

  body[data-display-mode="browser"] .chord-hero-view.is-active,
  body[data-viewport-size="short"] .chord-hero-view.is-active {
    align-content: start;
    gap: clamp(3px, 0.65dvh, 7px);
  }

  body[data-display-mode="browser"] .chord-hero-card,
  body[data-viewport-size="short"] .chord-hero-card {
    padding-top: 1px;
    padding-bottom: clamp(1px, 0.45dvh, 4px);
  }

  body[data-display-mode="browser"] .chord-hero-card h3,
  body[data-viewport-size="short"] .chord-hero-card h3 {
    font-size: clamp(3.05rem, 10.5dvh, 4.75rem);
  }

  body[data-display-mode="browser"] .chord-hero-actions,
  body[data-viewport-size="short"] .chord-hero-actions {
    min-height: 38px;
    margin: clamp(4px, 0.65dvh, 7px) auto clamp(5px, 0.85dvh, 9px);
    padding: 2px;
  }

  body[data-display-mode="browser"] .chord-variant-control,
  body[data-viewport-size="short"] .chord-variant-control {
    min-height: 34px;
    gap: 4px;
  }

  body[data-display-mode="browser"] .chord-type-trigger,
  body[data-viewport-size="short"] .chord-type-trigger {
    min-width: clamp(108px, 30vw, 148px);
    min-height: 34px;
    padding-inline: 14px 12px;
    font-size: 0.78rem;
  }

  body[data-display-mode="browser"] .chord-variant-button,
  body[data-viewport-size="short"] .chord-variant-button {
    min-width: 42px;
    min-height: 34px;
    padding-inline: 9px;
    font-size: 0.74rem;
  }

  body[data-display-mode="browser"] .favorite-button,
  body[data-viewport-size="short"] .favorite-button {
    min-width: 36px;
    min-height: 36px;
  }

  body[data-display-mode="browser"] .chord-hero-main,
  body[data-viewport-size="short"] .chord-hero-main {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
  }

  body[data-display-mode="browser"] .chord-step,
  body[data-viewport-size="short"] .chord-step {
    width: 28px;
    min-height: clamp(44px, 11vw, 60px);
  }

  body[data-display-mode="browser"] .hero-diagram,
  body[data-viewport-size="short"] .hero-diagram {
    width: min(60vw, 28dvh, 224px);
    margin-top: clamp(1px, 0.25dvh, 3px);
    padding: clamp(7px, 1dvh, 10px);
    border-radius: 16px;
  }

  body[data-display-mode="browser"] .chord-voicing,
  body[data-viewport-size="short"] .chord-voicing {
    margin-top: clamp(3px, 0.45dvh, 5px);
    font-size: 0.78rem;
  }

  body[data-display-mode="browser"] .related-chords,
  body[data-viewport-size="short"] .related-chords {
    gap: 7px;
    margin-top: clamp(4px, 0.7dvh, 7px);
    padding: 10px;
    border-radius: 18px;
  }

  body[data-display-mode="browser"] .practice-head,
  body[data-viewport-size="short"] .practice-head {
    gap: 7px;
  }

  body[data-display-mode="browser"] .practice-head span,
  body[data-viewport-size="short"] .practice-head span {
    font-size: 0.82rem;
  }

  body[data-display-mode="browser"] .practice-spark,
  body[data-viewport-size="short"] .practice-spark {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    border-radius: 8px;
  }

  body[data-display-mode="browser"] .practice-spark::before,
  body[data-viewport-size="short"] .practice-spark::before {
    height: 12px;
  }

  body[data-display-mode="browser"] .practice-spark::after,
  body[data-viewport-size="short"] .practice-spark::after {
    width: 12px;
  }

  body[data-display-mode="browser"] .practice-list,
  body[data-viewport-size="short"] .practice-list {
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  body[data-display-mode="browser"] .practice-list::-webkit-scrollbar,
  body[data-viewport-size="short"] .practice-list::-webkit-scrollbar {
    display: none;
  }

  body[data-display-mode="browser"] .practice-chip,
  body[data-viewport-size="short"] .practice-chip {
    min-height: 43px;
    padding: 7px 8px;
    border-radius: 11px;
    font-size: 0.9rem;
  }

  body[data-display-mode="browser"] .practice-chip span,
  body[data-viewport-size="short"] .practice-chip span {
    font-size: 0.62rem;
  }

  body.view-chords[data-display-mode="browser"] {
    --chords-browser-top-space: calc(62px + env(safe-area-inset-top));
    --chords-browser-bottom-space: calc(78px + env(safe-area-inset-bottom));
  }

  body.view-chords[data-display-mode="browser"] .main-stage {
    padding-top: var(--chords-browser-top-space);
    padding-bottom: var(--chords-browser-bottom-space);
  }

  body.view-chords[data-display-mode="browser"] .chords-view.is-active {
    height: calc(var(--app-height, 100svh) - var(--chords-browser-top-space) - var(--chords-browser-bottom-space));
  }

  body.view-chords[data-display-mode="browser"] .chords-shell {
    padding-top: clamp(10px, 1.6dvh, 14px);
  }

  body.view-chords[data-display-mode="browser"]:not(.is-short-viewport) .chord-hero-view.is-active {
    align-content: center;
    gap: clamp(8px, 1.2dvh, 12px);
  }

  body.view-tune[data-display-mode="browser"] .tuner-panel {
    --string-rail-offset: clamp(100px, 26vw, 122px);
    box-sizing: border-box;
    width: 100%;
  }

  body.view-tune[data-display-mode="browser"] .pitch-zone,
  body.view-tune[data-display-mode="browser"] .guitar-stage {
    width: 100%;
  }

  body.view-tune[data-display-mode="browser"] .guitar-frame {
    width: min(100%, 470px);
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 430px) and (hover: none) and (pointer: coarse) {
    body.view-tune .app-shell,
    body.view-tune .main-stage,
    body.view-visualizer .app-shell,
    body.view-visualizer .main-stage {
      height: var(--app-height, 100svh);
    }

    .view-tune.is-active {
      height: calc(var(--app-height, 100svh) - var(--tune-top-space) - var(--bottom-bar-space));
    }

    .tuner-panel {
      grid-template-rows: minmax(clamp(112px, var(--app-height-200), 166px), 0.54fr) minmax(0, 1.3fr) auto;
      padding-bottom: 0;
    }

    body.is-ios-standalone .main-stage {
      width: 100vw;
      max-width: none;
    }

    body.is-ios-standalone.view-settings,
    body.is-ios-standalone.view-about {
      --page-top-space: calc(52px + env(safe-area-inset-top));
    }

    body.is-ios-standalone.view-chords {
      --chords-standalone-bottom-space: 70px;
    }

    body.is-ios-standalone.view-chords .main-stage {
      padding-bottom: var(--chords-standalone-bottom-space);
    }

    body.is-ios-standalone.view-chords .chords-view.is-active {
      height: calc(var(--app-height, 100svh) - var(--tune-top-space) - var(--chords-standalone-bottom-space));
    }

    body.is-ios-standalone .tuner-panel {
      --string-rail-offset: clamp(108px, 29vw, 136px);
      width: min(100vw, 560px);
      justify-self: center;
      padding-inline: 0;
    }

    .pitch-zone {
      gap: clamp(2px, var(--app-height-0055), 5px);
      margin-bottom: clamp(-12px, var(--app-height-neg-014), -5px);
    }

    body.is-ios-standalone .pitch-zone {
      width: min(100vw, 540px);
      justify-self: center;
    }

    .guitar-stage {
      margin-top: clamp(-30px, var(--app-height-neg-034), -16px);
      align-self: end;
    }

    body.is-ios-standalone .guitar-stage {
      width: min(100vw, 500px);
      place-self: stretch center;
    }

    body.is-ios-standalone .guitar-frame {
      width: min(100vw, 470px);
      --guitar-y-adjust: clamp(-26px, var(--app-height-neg-029), -14px);
    }

    body.is-ios-standalone .tune-meta-row {
      position: absolute;
      left: 50%;
      right: auto;
      width: min(430px, calc(100vw - 36px - env(safe-area-inset-left) - env(safe-area-inset-right)));
      bottom: calc(var(--bottom-bar-space) + clamp(70px, var(--app-height-095), 82px));
      transform: translateX(-50%);
    }

    .string-0,
    .string-1,
    .string-2 {
      left: calc(50% - var(--string-rail-offset) - var(--string-lane-width));
    }

    .string-3,
    .string-4 {
      left: calc(50% + var(--string-rail-offset));
      right: auto;
    }

    .string-5 {
      left: calc(50% + var(--string-rail-offset));
      right: auto;
    }

    .control-dock {
      transform: translateX(0px);
    }

    .bottom-app-bar {
      padding-bottom: calc(7px + env(safe-area-inset-bottom));
    }

    body.is-ios-standalone .bottom-app-bar {
      padding-bottom: 3px;
    }

    body.is-ios-browser .guitar-frame {
      width: min(100%, 470px);
      --guitar-x-adjust: 0px;
      --guitar-y-adjust: clamp(-34px, var(--app-height-neg-036), -18px);
    }

    body.is-ios-browser.view-tune .tuner-panel {
      --string-rail-offset: clamp(100px, 26vw, 122px);
      box-sizing: border-box;
      width: 100%;
    }

    body.is-ios-browser.view-tune .pitch-zone,
    body.is-ios-browser.view-tune .guitar-stage {
      width: 100%;
    }

    body.is-ios-browser .tune-meta-row {
      left: max(24px, env(safe-area-inset-left));
      right: auto;
      width: min(186px, 44vw);
      bottom: calc(var(--bottom-bar-space) + clamp(42px, var(--app-height-060), 56px));
      padding: 7px 9px;
      border: 1px solid rgba(244, 240, 232, 0.055);
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(5, 6, 8, 0.18), rgba(5, 6, 8, 0.08));
      transform: none;
    }

    body.is-ios-browser .tune-meta-row .eyebrow {
      font-size: 0.5rem;
      letter-spacing: 0.12em;
      white-space: nowrap;
    }

    body.is-ios-browser .tune-meta-row h1 {
      font-size: 0.76rem;
      line-height: 1.05;
      white-space: nowrap;
    }

    body.is-ios-browser .ios-install-hint {
      top: calc(70px + env(safe-area-inset-top));
      bottom: auto;
      max-width: min(340px, calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    }

    body.is-ios-browser .string-0,
    body.is-ios-browser .string-1,
    body.is-ios-browser .string-2 {
      left: calc(50% - var(--string-rail-offset) - var(--string-lane-width));
    }

    body.is-ios-browser .string-3,
    body.is-ios-browser .string-4 {
      left: calc(50% + var(--string-rail-offset));
      right: auto;
    }

    body.is-ios-browser .string-5 {
      left: calc(50% + var(--string-rail-offset));
      right: auto;
    }
  }
}

@media (min-width: 860px) {
  .topbar,
  .main-stage {
    width: min(620px, calc(100% - 32px));
  }

  .tuner-panel {
    height: 100%;
    min-height: 0;
  }

  .guitar-frame {
    width: min(50vw, 540px);
  }
}

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

  .studio-grid {
    animation: none !important;
  }

  body.view-tune .studio-grid::after,
  .listening-led,
  .start-button::after,
  .start-icon,
  .visualizer-stage::before,
  .visualizer-stage::after,
  .visualizer-aura,
  .visualizer-status-pill svg {
    animation: none !important;
  }

  .app-shell,
  .view.is-view-entering,
  .guitar-frame,
  .string-lane,
  .bottom-app-bar,
  .control-dock,
  .topbar {
    animation: none !important;
  }
}
