:root {
  --bg: #090b0d;
  --panel: rgba(22, 18, 25, 0.88);
  --panel-2: rgba(32, 27, 35, 0.92);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(200, 153, 231, 0.45);
  --text: #e9ecea;
  --muted: #8e9997;
  --gold: #b78ddf;
  --gold-2: #cfa9f3;
  --bad: #d9757a;
  --ok: #91c7a6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
}
.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 50px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
}
h1 {
  margin: 2px 0 0;
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: 0.03em;
}
h2 {
  margin: 5px 0 0;
  font-size: 25px;
  font-weight: 500;
}
h2 span {
  color: var(--muted);
  margin: 0 8px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
}
.audio-status {
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 6px;
}
.audio-status.ok {
  color: var(--ok);
}
.audio-status.warn {
  color: var(--gold);
}
.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
}
.hero {
  min-height: 124px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 22px 24px;
}
.hero-copy p {
  max-width: 650px;
  margin: 17px 0 0;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 8px;
}
.tab,
.segment,
.ghost-button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  transition: 0.15s ease;
}
.tab {
  padding: 9px 13px;
  font-size: 13px;
}
.tab:hover,
.segment:hover,
.ghost-button:hover {
  border-color: var(--line-strong);
}
.tab.active {
  color: #111;
  background: var(--gold-2);
  border-color: var(--gold-2);
}
.controls {
  display: flex;
  align-items: center;
  gap: 22px;
}
.segmented {
  display: flex;
  border: 1px solid var(--line);
}
.segment {
  border: 0;
  border-right: 1px solid var(--line);
  padding: 10px 13px;
  color: var(--muted);
}
.segment:last-child {
  border-right: 0;
}
.segment.active {
  color: #111;
  background: var(--gold);
}
.volume-control {
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 7px;
}
.volume-control input {
  width: 100%;
  accent-color: var(--gold);
}
.qte-panel {
  margin-top: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.qte-panel.hidden {
  display: none;
}
.qte-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}
.qte-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  transition: 0.15s ease;
}
.qte-dot.current {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 4px rgba(223, 198, 141, 0.1);
}
.qte-dot.done {
  background: var(--gold-2);
  border-color: var(--gold-2);
}
.ghost-button {
  padding: 9px 14px;
  color: var(--muted);
}
.instrument {
  margin-top: 14px;
  min-height: 430px;
  overflow: hidden;
  position: relative;
  padding: 34px 42px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018),
      transparent 16%,
      transparent 84%,
      rgba(255, 255, 255, 0.018)
    ),
    var(--panel-2);
}
.instrument:before,
.instrument:after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--line-strong),
    transparent
  );
}
.instrument:before {
  top: 22px;
}
.instrument:after {
  bottom: 22px;
}
.strings {
  position: absolute;
  inset: 44px 58px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(14.285% - 1px),
    rgba(223, 198, 141, 0.17) calc(14.285% - 1px),
    rgba(223, 198, 141, 0.17) 14.285%
  );
  opacity: 0.55;
}
.board {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 18px;
  height: 360px;
}
.board-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}
.note-key {
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 5, 6, 0.46);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  user-select: none;
  transition:
    transform 0.08s ease,
    border-color 0.12s,
    background 0.12s,
    box-shadow 0.12s;
  overflow: hidden;
}
.note-key:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  left: 50%;
  background: linear-gradient(transparent, var(--gold), transparent);
  opacity: 0.36;
}
.note-key:hover {
  border-color: rgba(190, 141, 223, 0.45);
  background: rgba(177, 141, 223, 0.055);
}
.note-key.pressed {
  transform: translateY(2px);
  border-color: var(--gold-2);
  background: rgba(207, 141, 223, 0.13);
  box-shadow: inset 0 0 26px rgba(186, 141, 223, 0.08);
}
.note-key.focus {
  border-color: var(--gold-2);
  box-shadow:
    0 0 0 2px rgba(204, 141, 223, 0.12),
    inset 0 0 30px rgba(200, 141, 223, 0.08);
}
.note-key.wrong {
  border-color: var(--bad);
  animation: shake 0.18s linear;
}
.note-key.done {
  border-color: rgba(145, 199, 167, 0.5);
}
@keyframes shake {
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}
.note-label {
  position: relative;
  z-index: 2;
  text-align: center;
}
.note-name {
  font-family: Georgia, serif;
  font-size: 27px;
  color: var(--gold-2);
}
.note-hotkey {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}
.row-label {
  position: absolute;
  left: 8px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.25);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.bottom-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.info-card {
  min-height: 145px;
  padding: 19px 21px;
}
.info-card p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.keymap {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}
.keymap > div {
  display: flex;
  align-items: center;
  gap: 5px;
}
.keymap span {
  margin-left: 7px;
  color: var(--muted);
  font-size: 11px;
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  height: 24px;
  padding: 0 6px;
  background: #0c0f10;
  font:
    11px ui-monospace,
    monospace;
  color: #bbc2c0;
}
.current-note {
  font-family: Georgia, serif;
  font-size: 44px;
  color: var(--gold-2);
  margin-top: 12px;
  line-height: 1;
}
.current-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}
code {
  color: #cbd2cf;
  font-size: 11px;
  word-break: break-all;
}
.muted {
  opacity: 0.72;
}
@media (max-width: 850px) {
  .hero,
  .qte-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .controls {
    width: 100%;
    justify-content: space-between;
  }
  .instrument {
    padding: 30px 18px;
    min-height: 360px;
  }
  .board {
    height: 300px;
    gap: 10px;
  }
  .board-row {
    gap: 7px;
  }
  .note-name {
    font-size: 21px;
  }
  .strings {
    inset: 40px 28px;
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 16px;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .audio-status {
    padding: 0;
  }
  .controls {
    align-items: flex-start;
    flex-direction: column;
  }
  .volume-control {
    width: 100%;
  }
  .instrument {
    padding-left: 8px;
    padding-right: 8px;
  }
  .note-hotkey {
    display: none;
  }
  .note-name {
    font-size: 16px;
  }
  .board-row {
    gap: 4px;
  }
}

.qte-config {
  min-width: min(360px, 100%);
}

.qte-select-label {
  display: grid;
  gap: 6px;
  margin: 10px 0 6px;
  font-size: 12px;
  color: var(--muted);
}

select {
  background-color: #111;
  color: #fff;
}

select option {
  background-color: #111;
  color: #fff;
}

select optgroup {
  background-color: #1a1a1a;
  color: #888;
}

.qte-select-label select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.qte-select-label select option {
  background: #171717;
  color: #f4f0e6;
}

.custom-panel {
  margin-top: 14px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.custom-panel.hidden {
  display: none;
}
.custom-column {
  min-width: 0;
}
.field-label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.field-label input,
.field-label textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 10px 11px;
  outline: none;
  resize: vertical;
}
.field-label input:focus,
.field-label textarea:focus {
  border-color: var(--line-strong);
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.primary-button {
  cursor: pointer;
  border: 1px solid var(--gold-2);
  background: var(--gold-2);
  color: #111;
  padding: 9px 14px;
}
.recording {
  border-color: var(--bad) !important;
  color: var(--bad) !important;
}
.sequence-preview {
  margin-top: 13px;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--gold-2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}
.file-button {
  display: inline-block;
  margin-top: 12px;
  cursor: pointer;
  border: 1px solid var(--line);
  padding: 9px 14px;
  color: var(--muted);
}
.file-button:hover {
  border-color: var(--line-strong);
}
.file-button input {
  display: none;
}
@media (max-width: 850px) {
  .custom-panel {
    grid-template-columns: 1fr;
  }
}
