:root {
  color-scheme: dark;
  --bg: #020203;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-deep: rgba(9, 5, 15, 0.54);
  --line: rgba(232, 218, 255, 0.2);
  --line-strong: rgba(226, 205, 255, 0.34);
  --liquid-surface: rgba(13, 7, 22, 0.34);
  --liquid-edge: rgba(238, 225, 255, 0.26);
  --liquid-shine: rgba(255, 255, 255, 0.15);
  --demo-surface: rgba(16, 11, 24, 0.66);
  --demo-divider: rgba(198, 168, 255, 0.18);
  --demo-divider-soft: rgba(255, 255, 255, 0.055);
  --demo-cell: rgba(7, 5, 11, 0.22);
  --demo-panel-surface:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.022) 30%, transparent 64%),
    linear-gradient(135deg, rgba(142, 86, 226, 0.18), rgba(0, 0, 0, 0.12) 42%, rgba(5, 3, 8, 0.46)),
    var(--demo-surface);
  --demo-tab-active: #362a4a;
  --demo-corner-surface: var(--demo-panel-surface);
  --text: #f8f3ff;
  --muted: #b8afc8;
  --violet: #9f68ff;
  --violet-soft: #dfccff;
  --control-toggle-option-width: 68px;
  --control-toggle-width: calc(var(--control-toggle-option-width) * 2 + 6px);
  --shadow: 0 24px 52px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 84% 6%, rgba(125, 62, 210, 0.18), transparent 34%),
    radial-gradient(circle at 12% 34%, rgba(88, 42, 155, 0.14), transparent 28%),
    linear-gradient(180deg, #020203 0%, #040307 44%, #020203 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

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

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
figure {
  margin: 0;
}

.page-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.topbar-link,
.topbar-nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.topbar-link,
.topbar-nav a {
  min-height: 38px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.topbar-link {
  padding: 0 14px 0 10px;
  border-radius: 8px;
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-nav a {
  padding: 0 12px;
  border-radius: 999px;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  min-height: auto;
  display: grid;
  align-content: center;
  padding: 34px 0 32px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--violet-soft);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  width: min(100%, 15ch);
  max-width: 15ch;
  font-size: clamp(52px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-lead,
.section-heading p,
.panel-note,
.download-band p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-lead {
  max-width: 42em;
  margin-top: 16px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
}

.button-primary {
  color: #14081f;
  border-color: rgba(232, 218, 255, 0.72);
  background: linear-gradient(180deg, #fbf7ff 0%, #c8a9ff 42%, #8954e8 100%);
  box-shadow: 0 14px 30px rgba(122, 74, 210, 0.22);
}

.button-ghost {
  border-color: var(--liquid-edge);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.016) 46%, rgba(2, 2, 3, 0.08)),
    rgba(18, 9, 30, 0.2);
}

.section {
  padding: 34px 0;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 18px;
}

.section-heading h2,
.download-band h2 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p {
  margin-top: 12px;
  font-size: 17px;
}

.instrument-tabs {
  display: grid;
  gap: 0;
}

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

.tab-strip {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding-left: 0;
  margin-bottom: -1px;
}

.tab-strip label {
  min-width: 92px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(232, 218, 255, 0.18);
  border-bottom-color: transparent;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  background: rgba(6, 5, 9, 0.82);
  box-shadow: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

#tab-xiao:checked ~ .tab-strip label[for="tab-xiao"],
#tab-di:checked ~ .tab-strip label[for="tab-di"],
#tab-scale:checked ~ .tab-strip label[for="tab-scale"] {
  color: var(--text);
  border-color: var(--liquid-edge);
  border-bottom-color: transparent;
  box-shadow: none;
}

#tab-xiao:checked ~ .tab-strip label[for="tab-xiao"] {
  background: var(--demo-tab-active);
}

#tab-di:checked ~ .tab-strip label[for="tab-di"] {
  background: var(--demo-tab-active);
}

#tab-scale:checked ~ .tab-strip label[for="tab-scale"] {
  background: var(--demo-tab-active);
}

.tab-panel {
  display: none;
}

#tab-xiao:checked ~ .tab-panel--xiao,
#tab-di:checked ~ .tab-panel--di,
#tab-scale:checked ~ .tab-panel--scale {
  display: block;
}

.instrument-demo {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(198, 168, 255, 0.26);
  border-radius: 8px;
  border-top-left-radius: 0;
  background: var(--demo-corner-surface);
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 26px 60px rgba(0, 0, 0, 0.48);
}

#tab-xiao:checked ~ .tab-panel--xiao {
  background: var(--demo-corner-surface);
}

#tab-di:checked ~ .tab-panel--di {
  background: var(--demo-corner-surface);
}

#tab-scale:checked ~ .tab-panel--scale {
  background: var(--demo-corner-surface);
}

#tab-xiao:checked ~ .tab-strip label[for="tab-xiao"],
#tab-di:checked ~ .tab-strip label[for="tab-di"],
#tab-scale:checked ~ .tab-strip label[for="tab-scale"] {
  backdrop-filter: none;
}

.instrument-demo::before {
  content: none;
}

.instrument-demo::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 7px;
  border-top-left-radius: 0;
}

.demo-grid {
  position: relative;
  z-index: 1;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(330px, 0.92fr);
  gap: 16px;
  align-items: stretch;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.side-stack {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  background: transparent;
}

.side-stack--basic {
  grid-template-rows: auto;
  align-content: start;
}

.glass-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(208, 182, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(127, 72, 210, 0.2), rgba(0, 0, 0, 0.2) 42%, rgba(0, 0, 0, 0.72)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.004) 46%, rgba(126, 76, 208, 0.045)),
    rgba(9, 5, 15, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24);
}

.glass-panel::after {
  content: none;
}

.glass-panel::before {
  content: none;
}

.model-panel {
  min-height: 560px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 18px;
}

.options-panel,
.fingering-panel {
  padding: 18px;
}

.panel-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title span {
  font-size: 18px;
  font-weight: 700;
}

.panel-title small,
.panel-title a {
  color: var(--violet-soft);
  font-size: 13px;
}

.panel-title a {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(226, 205, 255, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.014)),
    rgba(24, 12, 38, 0.28);
}

.model-placeholder {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
}

.ring {
  position: absolute;
  inset: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-outer {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line-strong);
  background:
    repeating-conic-gradient(from 90deg, rgba(226, 205, 255, 0.2) 0 2deg, transparent 2deg 30deg),
    radial-gradient(circle, transparent 61%, rgba(159, 104, 255, 0.14) 62%, transparent 72%);
}

.ring-middle {
  width: 68%;
  height: 68%;
  border: 1px solid rgba(226, 205, 255, 0.24);
  background:
    repeating-conic-gradient(from 72deg, rgba(159, 104, 255, 0.22) 0 12deg, rgba(255, 255, 255, 0.018) 12deg 30deg);
}

.ring-inner {
  width: 42%;
  height: 42%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    repeating-conic-gradient(from 48deg, rgba(255, 255, 255, 0.16) 0 14deg, rgba(255, 255, 255, 0.02) 14deg 30deg);
}

.ring-core {
  position: absolute;
  inset: 39%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--violet-soft);
  background: rgba(4, 3, 7, 0.88);
}

.tune-model {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
  touch-action: none;
  user-select: none;
}

.tune-ring,
.logo-disc {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
}

.tune-ring {
  display: grid;
  place-items: center;
  cursor: grab;
  transition: box-shadow 180ms ease, filter 180ms ease;
}

.tune-ring.is-dragging {
  cursor: grabbing;
  filter: brightness(1.1);
  box-shadow: 0 0 34px rgba(159, 104, 255, 0.28);
}

.fingering-ring {
  width: 94%;
  height: 94%;
  border: 3px solid rgba(255, 255, 255, 0.96);
  background: url("./assets/wood.png") center / cover;
}

.note-ring {
  width: 72%;
  height: 72%;
  border: 3px solid rgba(255, 255, 255, 0.96);
  background: url("./assets/piano.png") center / cover;
  cursor: default;
}

.mode-ring {
  width: 46%;
  height: 46%;
  border: 8px solid rgba(255, 255, 255, 0.96);
  background: url("./assets/wood.png") center / cover;
}

.tune-model--scale .fingering-ring .ring-label {
  color: #f1d9a6;
}

.tune-model--scale .mode-ring .ring-label {
  color: #c9d8ff;
}

.tune-model--scale .fingering-ring .ring-label,
.tune-model--scale .mode-ring .ring-label {
  color: #ffffff;
}

.tune-model--scale .logo-disc {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(4, 3, 7, 0.92);
  font-size: clamp(12px, 1.6vw, 16px);
}

.logo-disc {
  width: 19%;
  height: 19%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: 0 0 24px rgba(159, 104, 255, 0.16);
  font-weight: 800;
}

.logo-disc.logo-disc--lacquer {
  width: 19%;
  height: 19%;
  border: 3px solid rgba(255, 255, 255, 0.96);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.24) 0, rgba(255, 255, 255, 0.08) 12%, transparent 30%),
    linear-gradient(145deg, #202024 0%, #09090b 42%, #010102 76%, #111116 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.24),
    inset -10px -12px 18px rgba(0, 0, 0, 0.68),
    0 8px 20px rgba(0, 0, 0, 0.42);
}

.logo-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-disc .logo-image--dizi {
  transform: rotate(90deg);
}

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

.note-grid button {
  min-width: 0;
  min-height: 36px;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: rgba(248, 243, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.012) 58%, rgba(129, 75, 208, 0.045)),
    rgba(10, 6, 16, 0.32);
  cursor: pointer;
  line-height: 1;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.note-grid button:hover,
.note-grid button:focus-visible {
  border-color: rgba(226, 205, 255, 0.52);
  color: var(--text);
  outline: 0;
}

.note-grid button.is-active {
  border-color: rgba(226, 205, 255, 0.52);
  color: #14081f;
  background: linear-gradient(180deg, #fbf7ff 0%, #d8c0ff 48%, #9f68ff 100%);
}

.ring-label {
  position: absolute;
  display: grid;
  width: 46px;
  height: 34px;
  place-items: center;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transform: translate(-50%, -50%);
}

.fingering-ring .ring-label {
  cursor: pointer;
}

.fingering-ring .ring-label.is-active-fingering {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(223, 204, 255, 0.92);
}

.note-ring .ring-label {
  width: 50px;
  color: #121019;
  font-size: 28px;
  cursor: pointer;
}

.mode-ring .ring-label {
  width: 42px;
  height: 32px;
  font-size: 26px;
}

.note-ring .ring-label[data-note^="b"] {
  color: #f5efff;
}

.note-ring .ring-label:hover {
  color: var(--violet-soft);
  text-shadow: 0 0 12px rgba(159, 104, 255, 0.75);
}

.tune-model--scale .note-ring .ring-label {
  color: #121019;
}

.tune-model--scale .note-ring .ring-label[data-note^="b"] {
  color: #f5efff;
}

.tune-model--scale .note-ring .ring-label:hover {
  color: var(--violet-soft);
  text-shadow: 0 0 12px rgba(223, 204, 255, 0.55);
}

.ring-label.is-playing {
  color: #ffffff;
  text-shadow: 0 0 16px rgba(223, 204, 255, 0.9);
}

.panel-note {
  position: relative;
  z-index: 1;
  font-size: 14px;
}

.panel-note--stacked {
  display: grid;
  gap: 6px;
  align-content: start;
}

.panel-note--stacked span {
  display: block;
}

.control-group,
.control-row,
.secondary-control,
.fingering-controls,
.fingering-figure {
  position: relative;
  z-index: 1;
}

.control-group {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.control-group > span,
.control-row > span {
  color: var(--violet-soft);
  font-size: 14px;
  font-weight: 700;
}

.chip-row,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slider-toggle {
  position: relative;
  min-height: 40px;
  flex-wrap: nowrap;
  gap: 0;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(232, 218, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 46%, rgba(8, 5, 13, 0.5)),
    rgba(8, 5, 13, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.slider-toggle button {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--control-toggle-option-width);
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  appearance: none;
  color: rgba(248, 243, 255, 0.72);
  transition: color 160ms ease, opacity 160ms ease;
}

.slider-toggle__thumb {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: var(--control-toggle-option-width);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(250, 246, 255, 0.98), rgba(215, 192, 255, 0.96) 48%, rgba(159, 104, 255, 0.96) 100%);
  box-shadow:
    0 10px 20px rgba(122, 74, 210, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 180ms ease, width 180ms ease;
  pointer-events: none;
}

.slider-toggle[data-active-index="1"] .slider-toggle__thumb {
  transform: translateX(100%);
}

.slider-toggle--compact .slider-toggle__thumb {
  width: var(--control-toggle-option-width);
}

.slider-toggle--compact[data-active-index="1"] .slider-toggle__thumb {
  transform: translateX(100%);
}

.slider-toggle--compact[data-active-index="2"] .slider-toggle__thumb {
  transform: translateX(200%);
}

.chip-row button,
.segmented button,
.wide-control,
.secondary-control {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.012) 58%, rgba(129, 75, 208, 0.045)),
    rgba(10, 6, 16, 0.32);
  cursor: pointer;
}

.chip-row button.is-active,
.segmented button.is-active {
  border-color: rgba(226, 205, 255, 0.52);
  color: #14081f;
  background: linear-gradient(180deg, #fbf7ff 0%, #d8c0ff 48%, #9f68ff 100%);
}

.slider-toggle button.is-active {
  border-color: transparent;
  color: #14081f;
  background: transparent;
  opacity: 1;
  font-weight: 700;
}

.chip-row button {
  min-width: 44px;
}

.segmented button {
  padding: 0 12px;
}

.slider-toggle button,
.slider-toggle button:hover,
.slider-toggle button:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  padding: 0 6px;
  letter-spacing: 0;
  white-space: nowrap;
}

.control-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.control-row--mouth {
  grid-template-columns: 54px minmax(0, 1fr);
}

.control-row--mouth .slider-toggle {
  width: min(100%, calc(var(--control-toggle-option-width) * 3 + 6px));
  justify-self: start;
}

.control-row--mode {
  grid-template-columns: 54px auto;
}

.control-row--mode .slider-toggle {
  width: min(100%, var(--control-toggle-width));
  justify-self: start;
}

.wide-control {
  width: fit-content;
  padding: 0 20px;
}

.secondary-control {
  width: 100%;
  margin-top: 16px;
}

.secondary-control--inline {
  width: auto;
  margin-top: 0;
  padding: 0 18px;
  white-space: nowrap;
}

.secondary-control:disabled {
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(248, 243, 255, 0.38);
  background: rgba(10, 6, 16, 0.18);
  cursor: not-allowed;
}

.download-copy {
  min-width: 0;
}

.download-title-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(225, 198, 255, 0.58);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.04) 34%, transparent 36%),
    linear-gradient(135deg, #a467f2 0%, #7130b8 58%, #4b1f80 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(25, 8, 46, 0.3),
    0 12px 24px rgba(91, 39, 153, 0.22);
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.download-title-button:hover {
  color: #ffffff;
  border-color: rgba(239, 222, 255, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06) 34%, transparent 36%),
    linear-gradient(135deg, #b67bff 0%, #8241cd 58%, #5c2a98 100%);
}

.fingering-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.fingering-controls .control-row {
  margin-top: 0;
  min-width: 0;
}

.fingering-controls .secondary-control {
  margin-top: 0;
}

.fingering-figure {
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(232, 218, 255, 0.15);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 16% 0%, rgba(255, 255, 255, 0.08), transparent 34%),
    rgba(0, 0, 0, 0.2);
}

.instrument-fingering {
  position: relative;
  min-height: 180px;
  justify-content: center;
  overflow: hidden;
}

.instrument-fingering img {
  position: relative;
  z-index: 1;
  width: min(120%, 440px);
  height: 140px;
  object-fit: contain;
}
.xiao-figure > img:first-child {
  transform: translate(0px, 50px);
}

.di-figure > img:first-child {
  transform: translate(0px, 50px);
}

.airflow-indicator {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0px;
  pointer-events: none;
}

.instrument-fingering .airflow-indicator img {
  position: relative;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.xiao-figure .airflow-indicator {
  top: 17%;
  left: 10%;
}

.di-figure .airflow-indicator {
  top: 17%;
  left: 20%;
}

.instrument-fingering .hole {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--violet-soft);
  font-size: 10px;
}

.instrument-fingering .hole img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.instrument-fingering .hole[data-state="0"] img,
.instrument-fingering .hole[data-state="1"] img,
.instrument-fingering .hole[data-state="X"] img {
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(255, 255, 255, 0.28);
}

.di-figure .hole {
  top: 20%;
}

.di-figure .membrane {
  left: 39%;
  top:20%;
  width: 20px;
  height: 20px;
  background: rgba(78, 89, 90, 0.76);
}

.di-figure .hole[data-hole-index="0"] { left: 70%; }
.di-figure .hole[data-hole-index="1"] { left: 65%; }
.di-figure .hole[data-hole-index="2"] { left: 60%; }
.di-figure .hole[data-hole-index="3"] { left: 55%; }
.di-figure .hole[data-hole-index="4"] { left: 50%; }
.di-figure .hole[data-hole-index="5"] { left: 45%; }

.xiao-figure .hole-top {
  top: 20%;
}

.xiao-figure .hole-bottom {
  top: 60%;
  left: 27%;
}

.xiao-figure .hole[data-hole-index="0"] { left: 70%; }
.xiao-figure .hole[data-hole-index="1"] { left: 65%; }
.xiao-figure .hole[data-hole-index="2"] { left: 60%; }
.xiao-figure .hole[data-hole-index="3"] { left: 55%; }
.xiao-figure .hole[data-hole-index="4"] { left: 45%; }
.xiao-figure .hole[data-hole-index="5"] { left: 40%; }
.xiao-figure .hole[data-hole-index="6"] { left: 35%; }

.fingering-selection {
  position: absolute;
  right: 12%;
  bottom: 12%;
  z-index: 4;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #ffffff;
  line-height: 1;
  pointer-events: none;
}

.fingering-selection[hidden] {
  display: none;
}

.fingering-selection strong {
  font-size: 45px;
  font-weight: 700;
}

.fingering-selection [data-selected-pitch] {
  color: var(--violet-soft);
  font-size: 45px;
  font-weight: 700;
}

.instrument-line {
  flex: 1 1 auto;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 205, 255, 0.4), rgba(159, 104, 255, 0.22));
}

.fingering-figure i {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(226, 205, 255, 0.9);
  box-shadow: 0 0 18px rgba(159, 104, 255, 0.18);
}

.fingering-figure i.open {
  background: transparent;
}

.fingering-figure b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(226, 205, 255, 0.28);
  border-radius: 50%;
  color: var(--violet-soft);
  font-size: 12px;
  font-weight: 400;
}

.video-placeholder {
  min-height: 380px;
  display: grid;
  place-items: center;
  border: 1px solid var(--liquid-edge);
  border-radius: 8px;
  color: var(--violet-soft);
  background:
    linear-gradient(135deg, rgba(127, 72, 210, 0.28), rgba(0, 0, 0, 0.28) 42%, rgba(0, 0, 0, 0.86)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.006) 46%, rgba(126, 76, 208, 0.06)),
    var(--panel-deep);
}

.download-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 48px 0 24px;
  padding: 26px;
  border: 1px solid var(--liquid-edge);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 16% 0%, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.006) 46%, rgba(126, 76, 208, 0.06)),
    var(--panel-deep);
}

.site-footer {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

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

  .model-panel {
    min-height: 480px;
  }

}

@media (max-width: 720px) {
  .page-shell,
  .site-footer {
    width: min(100% - 22px, 1220px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding: 34px 0 26px;
  }

  h1 {
    font-size: 46px;
    width: 100%;
    max-width: 100%;
    word-break: break-all;
  }

  .hero-lead,
  .section-heading p {
    word-break: break-all;
  }

  .section {
    padding: 30px 0;
  }

  .instrument-demo {
    padding: 16px;
  }

  .model-panel {
    min-height: 390px;
  }

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

  .control-row--mouth {
    grid-template-columns: 1fr;
  }

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

  .control-row--mode .slider-toggle {
    width: min(100%, var(--control-toggle-width));
  }

  .control-row--mouth .slider-toggle {
    width: min(100%, calc(var(--control-toggle-option-width) * 3 + 6px));
  }

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

  .fingering-controls {
    grid-template-columns: 1fr;
  }

  .fingering-figure {
    overflow-x: auto;
  }

  .download-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

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