:root {
  color-scheme: dark;
  --ink: #17191c;
  --night: #11161d;
  --night-soft: #1a212a;
  --panel: #202832;
  --line: #35404c;
  --paper: #f5f0e3;
  --paper-deep: #e9dfca;
  --paper-ink: #24211d;
  --muted: #9fa9b3;
  --cream: #f4e4bf;
  --coral: #f37664;
  --coral-dark: #c85043;
  --mint: #78c8ad;
  --gold: #e4b964;
  --shadow: 0 24px 70px rgb(0 0 0 / 30%);
  font-family: Inter, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 12% 4%, rgb(243 118 100 / 8%), transparent 28rem),
    radial-gradient(circle at 86% 16%, rgb(228 185 100 / 7%), transparent 26rem), var(--night);
  color: #f4f0e8;
  margin: 0;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  background: var(--paper);
  color: var(--ink);
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1240px;
  padding: 1.2rem 2rem;
}

.brand,
.footer-brand {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 0.7rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.site-header nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-header nav a,
footer nav a {
  color: #bbc2c9;
  font-size: 0.84rem;
  text-decoration: none;
}

.site-header nav a:hover,
footer nav a:hover {
  color: white;
}

.logo-mark {
  display: inline-block;
  height: 29px;
  position: relative;
  width: 29px;
}

.logo-neck {
  background: var(--coral);
  border-radius: 2px;
  height: 29px;
  left: 6px;
  position: absolute;
  transform: rotate(-15deg);
  width: 5px;
}

.logo-neck::after {
  background: var(--cream);
  border-radius: 50% 50% 45% 45%;
  bottom: 0;
  content: "";
  height: 13px;
  left: -5px;
  position: absolute;
  width: 15px;
}

.logo-sheet {
  background: var(--paper);
  border-radius: 2px 2px 4px 4px;
  box-shadow: -2px 2px 0 var(--gold);
  height: 21px;
  position: absolute;
  right: 1px;
  top: 3px;
  transform: rotate(6deg);
  width: 14px;
}

.logo-sheet::before,
.logo-sheet::after {
  background: var(--ink);
  content: "";
  height: 1px;
  left: 3px;
  opacity: 0.45;
  position: absolute;
  width: 8px;
}

.logo-sheet::before {
  top: 7px;
}

.logo-sheet::after {
  top: 12px;
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 6vw, 6.5rem);
  grid-template-columns: minmax(260px, 0.72fr) minmax(440px, 1.28fr);
  margin: 0 auto;
  max-width: 1240px;
  min-height: 560px;
  padding: 2.5rem 2rem 4.5rem;
}

.hero-copy {
  max-width: 500px;
}

.eyebrow,
.section-kicker {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.75rem, 3.2vw, 2rem);
  letter-spacing: 0.035em;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.hero-copy > p:not(.eyebrow) {
  color: #c0c7cd;
  font-size: 0.98rem;
  line-height: 1.9;
  max-width: 32rem;
}

.hero-actions,
.dialog-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-actions {
  margin: 1.8rem 0;
}

.primary-button,
.quiet-button,
.danger-button,
.file-button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 45px;
  padding: 0.72rem 1.2rem;
  text-decoration: none;
}

.primary-button {
  background: var(--coral);
  box-shadow: 0 8px 25px rgb(243 118 100 / 22%);
  color: #1b1110;
}

.primary-button:hover {
  background: #ff8976;
  transform: translateY(-1px);
}

.primary-button.small {
  min-height: 39px;
  padding: 0.55rem 1rem;
}

.quiet-button,
.file-button {
  background: transparent;
  border-color: #4a5663;
  color: #e7e8e8;
}

.quiet-button:hover,
.file-button:hover {
  border-color: var(--cream);
}

.trust-row {
  color: #aab2ba;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.76rem;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-row li {
  align-items: center;
  display: inline-flex;
  gap: 0.42rem;
}

.trust-row span {
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(120 200 173 / 12%);
  height: 6px;
  width: 6px;
}

.stand-scene {
  aspect-ratio: 1.26;
  background:
    linear-gradient(90deg, transparent 49.7%, rgb(255 255 255 / 3%) 50%, transparent 50.3%),
    linear-gradient(#1d2630 0 72%, #17130f 72%);
  border: 1px solid #2f3944;
  border-radius: 14px 14px 30px 30px;
  box-shadow:
    var(--shadow),
    inset 0 -20px 60px rgb(0 0 0 / 22%);
  isolation: isolate;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.stand-scene::after {
  background: repeating-linear-gradient(89deg, rgb(255 255 255 / 2%) 0 1px, transparent 1px 54px);
  bottom: 0;
  content: "";
  height: 28%;
  left: 0;
  opacity: 0.7;
  position: absolute;
  right: 0;
  z-index: -1;
}

.lamp-glow {
  background: radial-gradient(
    ellipse,
    rgb(255 219 147 / 28%) 0,
    rgb(255 203 117 / 9%) 40%,
    transparent 72%
  );
  height: 70%;
  left: 17%;
  position: absolute;
  top: -16%;
  width: 75%;
}

.music-stand {
  bottom: 9%;
  height: 75%;
  left: 33%;
  position: absolute;
  width: 57%;
}

.stand-board {
  background: #0c1117;
  border: 4px solid #35414c;
  border-radius: 9px 9px 4px 4px;
  box-shadow: 0 14px 25px rgb(0 0 0 / 36%);
  height: 55%;
  left: 0;
  position: absolute;
  top: 4%;
  transform: perspective(500px) rotateX(-4deg);
  width: 100%;
}

.stand-page {
  background: linear-gradient(90deg, transparent 95%, rgb(49 42 33 / 7%)), var(--paper);
  box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
  height: 48%;
  padding: 5% 6%;
  position: absolute;
  top: 6%;
  width: 43%;
  z-index: 2;
}

.stand-page.left {
  left: 6%;
  transform: rotate(-1.7deg);
}

.stand-page.right {
  right: 6%;
  transform: rotate(1.7deg);
}

.stand-page b {
  background: #8b8274;
  display: block;
  height: 2px;
  margin: 14% 0;
  opacity: 0.55;
  width: 88%;
}

.stand-page .chord {
  color: var(--coral-dark);
  font-family: ui-monospace, Consolas, monospace;
  font-size: clamp(0.58rem, 1.3vw, 0.9rem);
  font-style: normal;
  font-weight: 900;
  position: absolute;
}

.stand-page .c1 {
  left: 10%;
  top: 10%;
}

.stand-page .c2 {
  right: 22%;
  top: 41%;
}

.stand-page .c3 {
  left: 12%;
  top: 23%;
}

.stand-page .c4 {
  right: 16%;
  top: 54%;
}

.stand-lip {
  background: linear-gradient(#384450, #141a21);
  border-radius: 3px 3px 8px 8px;
  height: 5%;
  left: -4%;
  position: absolute;
  top: 56%;
  width: 108%;
  z-index: 3;
}

.stand-pole {
  background: linear-gradient(90deg, #171e25, #4c5863 45%, #11161b);
  height: 34%;
  left: 48%;
  position: absolute;
  top: 60%;
  width: 4%;
}

.stand-feet {
  background: #11171d;
  bottom: 0;
  height: 4%;
  left: 28%;
  position: absolute;
  transform: skewX(-35deg);
  width: 48%;
}

.guitar {
  bottom: 11%;
  height: 71%;
  left: 4%;
  position: absolute;
  transform: rotate(-10deg);
  width: 31%;
}

.guitar-body {
  background:
    radial-gradient(circle at 50% 40%, #1b1110 0 14%, transparent 15%),
    radial-gradient(ellipse at 50% 63%, #d4824b 0 50%, #9d5436 52% 59%, transparent 60%);
  bottom: 0;
  height: 52%;
  left: 5%;
  position: absolute;
  width: 90%;
}

.guitar-neck {
  background: linear-gradient(90deg, #6e3d27, #b46e42 45%, #56301f);
  bottom: 44%;
  height: 54%;
  left: 44%;
  position: absolute;
  width: 10%;
}

.guitar-neck::before {
  background: #8b4a2c;
  border-radius: 50% 50% 7px 7px;
  content: "";
  height: 14%;
  left: -35%;
  position: absolute;
  top: -8%;
  width: 170%;
}

.guitar-hole {
  background: #19120f;
  border: 4px solid #e7ad6d;
  border-radius: 50%;
  bottom: 22%;
  height: 14%;
  left: 35%;
  position: absolute;
  width: 30%;
}

.guitar-bridge {
  background: #43251b;
  bottom: 8%;
  height: 3%;
  left: 31%;
  position: absolute;
  width: 38%;
}

.guitar .string {
  background: rgb(255 246 220 / 65%);
  bottom: 10%;
  height: 85%;
  position: absolute;
  width: 1px;
}

.guitar .s1 {
  left: 47%;
}

.guitar .s2 {
  left: 50%;
}

.guitar .s3 {
  left: 53%;
}

.capo {
  background: #252a2d;
  border-radius: 10px;
  bottom: 8%;
  box-shadow: 0 8px 10px rgb(0 0 0 / 30%);
  height: 8%;
  left: 41%;
  position: absolute;
  transform: rotate(8deg);
  width: 17%;
}

.capo span {
  background: var(--coral);
  border-radius: 5px;
  height: 35%;
  left: 12%;
  position: absolute;
  top: 30%;
  width: 76%;
}

.metronome {
  background: linear-gradient(100deg, #b46c42, #704029);
  bottom: 8%;
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
  height: 27%;
  position: absolute;
  right: 4%;
  width: 11%;
}

.metronome i {
  background: #16191b;
  border-radius: 50%;
  bottom: 17%;
  height: 18%;
  left: 36%;
  position: absolute;
  width: 28%;
}

.metro-arm {
  background: var(--cream);
  height: 56%;
  left: 52%;
  position: absolute;
  top: 14%;
  transform: rotate(12deg);
  transform-origin: bottom;
  width: 2px;
}

.workbench {
  background: #171e26;
  border: 1px solid #2d3742;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  margin: 0 auto 6rem;
  max-width: 1240px;
  min-height: 720px;
  overflow: hidden;
}

.setlist-panel {
  background: linear-gradient(rgb(255 255 255 / 2%), transparent), #121820;
  border-right: 1px solid #2e3843;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem 1rem;
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 0.4rem;
}

.panel-heading h2,
.score-header h2,
.score-empty h2 {
  font-size: 1.18rem;
  margin: 0;
}

.round-button {
  background: var(--coral);
  border: 0;
  border-radius: 50%;
  color: #251515;
  font-size: 1.3rem;
  font-weight: 800;
  height: 38px;
  width: 38px;
}

.setlist-summary {
  border-bottom: 1px solid #2e3843;
  color: #929ca5;
  display: flex;
  font-size: 0.72rem;
  gap: 1rem;
  margin: 1rem 0 0.8rem;
  padding: 0 0.4rem 0.8rem;
}

.setlist-summary strong {
  color: var(--cream);
  font-size: 0.94rem;
}

.setlist {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  max-height: 560px;
  overflow: auto;
  padding: 0 0.15rem;
}

.setlist li {
  align-items: stretch;
  border: 1px solid transparent;
  border-radius: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  overflow: hidden;
}

.setlist li.active {
  background: #222c36;
  border-color: #465361;
}

.song-open {
  align-items: center;
  background: transparent;
  border: 0;
  color: #dfe2e4;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 0.65rem 0.4rem;
  text-align: left;
}

.song-open:hover {
  background: rgb(255 255 255 / 3%);
}

.song-number {
  color: #697580;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.7rem;
}

.song-words {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.song-words strong,
.song-words small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-words strong {
  font-size: 0.82rem;
}

.song-words small {
  color: #89949d;
  font-size: 0.67rem;
  margin-top: 0.17rem;
}

.song-tempo {
  align-items: flex-end;
  color: var(--gold);
  display: flex;
  flex-direction: column;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
}

.song-tempo small {
  color: #77828c;
  font-size: 0.48rem;
}

.order-buttons {
  display: flex;
  flex-direction: column;
}

.order-buttons button {
  background: transparent;
  border: 0;
  color: #7f8a94;
  flex: 1;
  font-size: 0.65rem;
  line-height: 1;
  padding: 0;
}

.order-buttons button:hover:not(:disabled) {
  color: var(--cream);
}

.order-buttons button:disabled {
  cursor: default;
  opacity: 0.15;
}

.empty-setlist {
  color: #7e8993;
  font-size: 0.78rem;
  line-height: 1.7;
  padding: 2.5rem 1rem;
  text-align: center;
}

.empty-note {
  color: var(--gold);
  display: block;
  font-family: serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.data-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-top: 1px solid #2e3843;
  color: #a8b0b7;
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
  padding: 1rem 0.5rem 0;
  text-align: left;
}

.data-button:hover {
  color: white;
}

.score-desk {
  background: radial-gradient(circle at 80% 0, rgb(228 185 100 / 6%), transparent 24rem), #1b232c;
  min-width: 0;
  padding: clamp(1rem, 3vw, 2.5rem);
}

.score-empty {
  align-items: center;
  color: #9ca5ad;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 620px;
  text-align: center;
}

.score-empty h2 {
  color: #e7e5de;
  margin: 1rem 0 0.5rem;
}

.score-empty p {
  font-size: 0.86rem;
  line-height: 1.7;
  max-width: 28rem;
}

.empty-stand,
.mini-stand {
  height: 100px;
  position: relative;
  width: 120px;
}

.empty-stand span,
.mini-stand span {
  background: #303a44;
  border-radius: 6px;
  height: 56px;
  left: 12px;
  position: absolute;
  transform: perspective(200px) rotateX(-5deg);
  width: 96px;
}

.empty-stand span::after,
.mini-stand span::after {
  background: #4e5a65;
  bottom: -6px;
  content: "";
  height: 7px;
  left: -5px;
  position: absolute;
  width: 106px;
}

.empty-stand i,
.mini-stand i {
  background: #414c56;
  height: 43px;
  left: 58px;
  position: absolute;
  top: 62px;
  width: 4px;
}

.score-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.score-header p {
  color: #9ca6af;
  font-size: 0.76rem;
  margin: 0 0 0.25rem;
}

.score-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid #3b4651;
  border-radius: 7px;
  color: #b6bdc4;
  display: inline-flex;
  font-size: 0.7rem;
  gap: 0.3rem;
  min-height: 34px;
  padding: 0.4rem 0.65rem;
}

.icon-button:hover {
  border-color: #7a8792;
  color: white;
}

.icon-button.danger:hover {
  border-color: var(--coral);
  color: #ff9d8e;
}

.control-deck {
  align-items: stretch;
  background: #11171e;
  border: 1px solid #323d48;
  border-radius: 12px;
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr 1.5fr 1fr auto auto;
  margin-bottom: 1rem;
  overflow: hidden;
}

.control-block {
  background: #1a222b;
  min-width: 0;
  padding: 0.65rem 0.75rem;
}

.control-label {
  color: #7f8b95;
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.3rem;
}

.transpose-control > div,
.tempo-control > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.control-block button {
  background: #252e38;
  border: 0;
  border-radius: 50%;
  color: white;
  height: 27px;
  width: 27px;
}

.control-block output {
  color: var(--cream);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 800;
}

.tempo-control output {
  align-items: center;
  display: flex;
  flex-direction: column;
}

.tempo-control output small {
  color: #6f7c87;
  font-size: 0.48rem;
}

.capo-track {
  align-items: center;
  display: flex;
  gap: 0.55rem;
}

.capo-track input {
  accent-color: var(--coral);
  min-width: 60px;
  width: 100%;
}

.capo-track output {
  align-items: center;
  background: var(--coral);
  border-radius: 4px;
  color: #211514;
  display: inline-flex;
  height: 27px;
  justify-content: center;
  min-width: 27px;
}

.metro-button,
.play-button {
  align-items: center;
  border: 0;
  display: flex;
  flex-direction: column;
  font-size: 0.58rem;
  gap: 0.25rem;
  justify-content: center;
  min-width: 82px;
  padding: 0.5rem;
}

.metro-button {
  background: #1a222b;
  color: #aeb6bd;
}

.metro-button[aria-pressed="true"] {
  background: #28382f;
  color: #a9efd6;
}

.metro-icon {
  border-bottom: 17px solid #69747d;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  height: 0;
  position: relative;
  width: 18px;
}

.metro-icon i {
  background: var(--cream);
  bottom: -14px;
  height: 14px;
  left: 4px;
  position: absolute;
  transform: rotate(9deg);
  transform-origin: bottom;
  width: 1px;
}

.metro-button[aria-pressed="true"] .metro-icon i {
  animation: tick 0.65s ease-in-out infinite alternate;
}

@keyframes tick {
  to {
    transform: rotate(-9deg);
  }
}

.play-button {
  background: var(--coral);
  color: #251513;
  font-weight: 850;
}

.play-button span {
  font-size: 1rem;
}

.chord-rack {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.35rem;
}

.chord-card {
  align-items: center;
  background: #252e38;
  border: 1px solid #3c4854;
  border-radius: 8px;
  display: flex;
  flex: 0 0 83px;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 75px;
  padding: 0.45rem;
}

.chord-card strong {
  color: var(--gold);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
}

.mini-fret {
  background: repeating-linear-gradient(0deg, #68737c 0 1px, transparent 1px 8px);
  display: flex;
  height: 37px;
  justify-content: space-between;
  position: relative;
  width: 38px;
}

.mini-fret::before {
  background: #c5bba5;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.fret-string {
  background: #a7a29a;
  height: 100%;
  position: relative;
  width: 1px;
}

.fret-string b {
  border-radius: 50%;
  height: 5px;
  left: -2px;
  position: absolute;
  width: 5px;
}

.fret-string b.finger {
  background: var(--coral);
  top: calc((var(--fret) - 0.5) * 8px);
}

.fret-string b.open {
  border: 1px solid var(--mint);
  top: -7px;
}

.fret-string b.muted {
  height: 7px;
  top: -8px;
}

.fret-string b.muted::before,
.fret-string b.muted::after {
  background: #8d98a1;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  top: 3px;
  transform: rotate(45deg);
  width: 6px;
}

.fret-string b.muted::after {
  transform: rotate(-45deg);
}

.mini-fret.text-only {
  align-items: center;
  background: none;
  color: #77838c;
  display: flex;
  font-size: 0.55rem;
  justify-content: center;
}

.mini-fret.text-only::before {
  display: none;
}

.score-paper,
.performance-paper {
  background:
    linear-gradient(
      90deg,
      rgb(116 89 48 / 3%),
      transparent 15%,
      transparent 85%,
      rgb(116 89 48 / 3%)
    ),
    repeating-linear-gradient(0deg, transparent 0 31px, rgb(60 48 34 / 4%) 31px 32px), var(--paper);
  color: var(--paper-ink);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Yu Gothic UI", monospace;
  line-height: 2;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.score-paper {
  border-radius: 4px 4px 8px 8px;
  box-shadow: 0 20px 50px rgb(0 0 0 / 28%);
  min-height: 430px;
  padding: clamp(1.3rem, 4vw, 3rem);
}

.score-line {
  min-height: 2em;
}

.score-space {
  min-height: 1em;
}

.score-section {
  align-items: center;
  color: #756b5e;
  display: flex;
  font-family: Inter, "Yu Gothic UI", sans-serif;
  font-size: 0.67rem;
  font-weight: 800;
  gap: 0.7rem;
  letter-spacing: 0.16em;
  margin: 1.3rem 0 0.45rem;
  text-transform: uppercase;
}

.score-section::after {
  background: #c8bda7;
  content: "";
  flex: 1;
  height: 1px;
}

.score-directive {
  color: #6f665a;
  font-size: 0.75rem;
}

.chord-only-line {
  color: #b64d43;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.chord-token {
  color: #c64f43;
  font-weight: 900;
}

.score-line:not(.chord-only-line) .chord-token {
  display: inline-block;
  font-size: 0.78em;
  margin: 0 0.1em;
  transform: translateY(-0.6em);
}

.private-note {
  border-left: 3px solid var(--gold);
  color: #a9b1b8;
  font-size: 0.75rem;
  line-height: 1.7;
  margin: 1rem 0 0;
  padding: 0.5rem 0.8rem;
}

dialog {
  background: #1b232c;
  border: 1px solid #46515d;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgb(0 0 0 / 55%);
  color: #f0eee8;
  max-height: calc(100vh - 2rem);
  max-width: 760px;
  padding: 0;
  width: calc(100% - 2rem);
}

dialog::backdrop {
  background: rgb(7 10 13 / 80%);
  backdrop-filter: blur(6px);
}

.dialog-heading {
  align-items: flex-start;
  border-bottom: 1px solid #35404b;
  display: flex;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.dialog-heading h2 {
  font-size: 1.15rem;
  margin: 0;
}

.dialog-close {
  background: transparent;
  border: 0;
  color: #aab2b9;
  font-size: 1.4rem;
  padding: 0.15rem;
}

.song-form {
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-grid label > span {
  color: #aab3ba;
  font-size: 0.73rem;
  font-weight: 700;
}

.span-two {
  grid-column: span 2;
}

input,
select,
textarea {
  background: #10161d;
  border: 1px solid #3a4651;
  border-radius: 7px;
  color: white;
  min-height: 42px;
  padding: 0.65rem 0.75rem;
}

textarea {
  line-height: 1.6;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.format-hints {
  align-items: center;
  color: #919ba4;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.68rem;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.format-hints code {
  background: #2b3540;
  border-radius: 4px;
  color: var(--gold);
  padding: 0.25rem 0.4rem;
}

.format-hints span {
  margin-right: 0.5rem;
}

.form-state {
  color: var(--cream);
  font-size: 0.75rem;
  min-height: 1.3rem;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 1.1rem;
}

.data-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 1.5rem 1.5rem 0.5rem;
}

.data-grid section {
  background: #222b35;
  border: 1px solid #3a4651;
  border-radius: 10px;
  padding: 1.2rem;
}

.data-grid h3 {
  font-size: 0.9rem;
  margin: 0.75rem 0 0.5rem;
}

.data-grid p {
  color: #9fa8b0;
  font-size: 0.73rem;
  line-height: 1.65;
}

.data-illustration {
  align-items: center;
  background: #303b46;
  border-radius: 50%;
  color: var(--gold);
  display: flex;
  font-size: 1.25rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.file-button {
  cursor: pointer;
  font-size: 0.8rem;
  min-height: 39px;
}

.file-button input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.data-dialog > .form-state {
  margin: 0.5rem 1.5rem;
}

.data-danger {
  align-items: center;
  border-top: 1px solid #35404b;
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 1rem 1.5rem;
}

.data-danger div {
  display: flex;
  flex-direction: column;
}

.data-danger strong {
  font-size: 0.78rem;
}

.data-danger span {
  color: #8f99a2;
  font-size: 0.66rem;
}

.danger-button {
  background: transparent;
  border-color: #7e4a48;
  color: #ff9a8f;
  font-size: 0.75rem;
  min-height: 38px;
}

.performance-layer {
  background: #0e1319;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  inset: 0;
  position: fixed;
  z-index: 90;
}

.performance-layer > header {
  align-items: center;
  border-bottom: 1px solid #2b3540;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 0.65rem 1rem;
}

.performance-layer header p {
  color: #8c97a0;
  font-size: 0.66rem;
  margin: 0;
}

.performance-layer header h2 {
  font-size: 1rem;
  margin: 0.2rem 0 0;
}

.performance-status {
  display: flex;
  gap: 0.5rem;
}

.performance-status span {
  background: #222c35;
  border-radius: 5px;
  color: #aab3bb;
  font-size: 0.62rem;
  padding: 0.4rem 0.55rem;
}

.performance-status strong {
  color: var(--gold);
}

.performance-layer header > button {
  background: transparent;
  border: 1px solid #3f4a55;
  border-radius: 50%;
  color: white;
  height: 34px;
  width: 34px;
}

.performance-paper {
  border-radius: 0;
  font-size: clamp(0.9rem, 2vw, 1.35rem);
  margin: 0 auto;
  max-width: 900px;
  overflow-y: auto;
  padding: clamp(2rem, 7vw, 6rem);
  scroll-behavior: auto;
  width: 100%;
}

.count-in {
  align-items: center;
  background: rgb(9 12 16 / 88%);
  color: var(--coral);
  display: flex;
  font-family: ui-monospace, Consolas, monospace;
  font-size: clamp(4rem, 18vw, 12rem);
  font-weight: 900;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 92;
}

.performance-controls {
  align-items: center;
  background: #121920;
  border-top: 1px solid #2b3540;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto auto minmax(120px, 1fr) auto;
  padding: 0.65rem 1rem;
}

.performance-controls button {
  background: #232d37;
  border: 1px solid #3b4752;
  border-radius: 7px;
  color: #d9dcde;
  min-height: 38px;
  padding: 0.5rem 0.75rem;
}

.performance-controls .performance-pause {
  background: var(--coral);
  border-color: var(--coral);
  color: #251513;
  font-weight: 800;
  min-width: 92px;
}

.performance-controls label {
  align-items: center;
  color: #99a3ab;
  display: flex;
  font-size: 0.7rem;
  gap: 0.6rem;
}

.performance-controls input {
  accent-color: var(--coral);
  background: none;
  border: 0;
  min-height: 30px;
  padding: 0;
  width: 100%;
}

.performing {
  overflow: hidden;
}

.simple-page {
  margin: 0 auto;
  max-width: 960px;
  padding: 4rem 2rem 7rem;
}

.page-intro {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.page-intro h1 {
  margin: 0;
}

.mini-stand {
  flex: 0 0 90px;
  transform: scale(0.68);
  transform-origin: left center;
}

.guide-steps {
  display: grid;
  gap: 0.8rem;
}

.guide-steps article {
  align-items: flex-start;
  background: #1b232c;
  border: 1px solid #35404b;
  border-radius: 10px;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 1.15rem;
}

.guide-steps article > span {
  align-items: center;
  background: var(--coral);
  border-radius: 50%;
  color: #2a1714;
  display: flex;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.guide-steps h2,
.privacy-grid h2,
.notice-card h2,
.privacy-details h2 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.guide-steps p,
.privacy-grid p,
.notice-card p,
.privacy-details {
  color: #a7b0b8;
  font-size: 0.82rem;
  line-height: 1.8;
  margin: 0;
}

.guide-steps code {
  background: #303a44;
  color: var(--gold);
  padding: 0.15rem 0.3rem;
}

.format-card {
  background: var(--paper);
  border-radius: 9px;
  color: var(--paper-ink);
  display: grid;
  gap: 2rem;
  grid-template-columns: auto 1fr;
  margin-top: 2rem;
  overflow: auto;
  padding: 1.5rem;
}

.format-card > div {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(2, 46px);
}

.format-chord {
  align-items: center;
  background: #313a43;
  border-radius: 6px;
  color: var(--gold);
  display: flex;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 900;
  height: 46px;
  justify-content: center;
}

.format-card pre {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
}

.notice-card,
.privacy-details {
  border: 1px solid #44505b;
  border-radius: 10px;
  margin-top: 2rem;
  padding: 1.3rem;
}

.privacy-lock {
  align-items: center;
  background: #26312f;
  border: 1px solid #4d6a62;
  border-radius: 50%;
  color: var(--mint);
  display: flex;
  flex: 0 0 72px;
  font-family: serif;
  font-size: 1.8rem;
  height: 72px;
  justify-content: center;
}

.privacy-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.privacy-grid article {
  background: #1b232c;
  border: 1px solid #35404b;
  border-radius: 10px;
  padding: 1.25rem;
}

.privacy-icon {
  align-items: center;
  background: #29343d;
  border-radius: 50%;
  color: var(--mint);
  display: flex;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  width: 42px;
}

.privacy-icon.device::before {
  border: 2px solid var(--mint);
  border-radius: 3px;
  content: "";
  height: 21px;
  width: 14px;
}

.privacy-icon.device::after {
  background: var(--mint);
  border-radius: 50%;
  bottom: 9px;
  content: "";
  height: 2px;
  position: absolute;
  width: 2px;
}

.privacy-icon.pulse::before {
  content: "•••";
  letter-spacing: 2px;
}

.privacy-details ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.privacy-details li + li {
  margin-top: 0.4rem;
}

.not-found {
  align-items: center;
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(320px, 540px) 1fr;
  margin: 0 auto;
  max-width: 1100px;
  min-height: 72vh;
  padding: 3rem 2rem;
}

.not-found .stand-scene {
  min-height: 330px;
}

.not-found p:not(.eyebrow) {
  color: #a8b0b7;
  line-height: 1.7;
}

footer:not(.performance-controls) {
  align-items: center;
  border-top: 1px solid #29333d;
  color: #929ca5;
  display: grid;
  font-size: 0.75rem;
  gap: 1rem;
  grid-template-columns: auto 1fr auto;
  margin: 0 auto;
  max-width: 1240px;
  padding: 2rem;
}

footer:not(.performance-controls) p {
  margin: 0;
}

@media (max-width: 960px) {
  .hero {
    gap: 2rem;
    grid-template-columns: 0.82fr 1.18fr;
  }

  .stand-scene {
    min-height: 350px;
  }

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

  .control-deck {
    grid-template-columns: repeat(3, 1fr);
  }

  .metro-button,
  .play-button {
    min-height: 56px;
  }

  .play-button {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 1rem;
  }

  .site-header nav {
    gap: 0.8rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2.5rem 1rem 3rem;
  }

  .hero-copy {
    margin: 0 auto;
    max-width: 620px;
    width: 100%;
  }

  .stand-scene {
    margin: 0 auto;
    max-width: 620px;
    min-height: 360px;
    width: 100%;
  }

  .workbench {
    display: flex;
    flex-direction: column;
    margin-bottom: 3rem;
  }

  .setlist-panel {
    border-bottom: 1px solid #2e3843;
    border-right: 0;
    min-height: auto;
  }

  .setlist {
    display: flex;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .setlist li {
    flex: 0 0 245px;
  }

  .empty-setlist {
    padding: 1rem;
  }

  .data-button {
    margin-top: 0.5rem;
  }

  .score-desk {
    padding: 1rem;
  }

  .score-empty {
    min-height: 390px;
  }

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

  .control-deck {
    grid-template-columns: repeat(2, 1fr);
  }

  .capo-control {
    grid-column: span 2;
  }

  .play-button {
    grid-column: auto;
  }

  .score-paper {
    min-height: 360px;
    padding: 1.2rem;
  }

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

  .not-found {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .performance-layer > header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .performance-status {
    display: none;
  }

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

  .performance-controls label {
    grid-column: span 2;
    grid-row: 1;
  }

  .performance-controls .performance-pause {
    grid-column: span 2;
    grid-row: 2;
  }

  .performance-controls button:first-child,
  .performance-controls button:last-child {
    grid-row: 3;
  }

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

  footer:not(.performance-controls) {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .site-header nav a:first-child {
    display: none;
  }

  .stand-scene {
    min-height: 280px;
  }

  .hero-actions .primary-button,
  .hero-actions .quiet-button {
    flex: 1;
  }

  .trust-row {
    gap: 0.7rem;
  }

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

  .control-block {
    padding: 0.6rem;
  }

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

  .span-two {
    grid-column: span 1;
  }

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

  .format-card {
    grid-template-columns: 1fr;
  }

  .data-danger {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: white;
  }

  .site-header,
  .hero,
  .setlist-panel,
  .score-actions,
  .control-deck,
  .chord-rack,
  .private-note,
  footer,
  dialog {
    display: none !important;
  }

  .workbench,
  .score-desk,
  .score-view {
    background: white;
    border: 0;
    box-shadow: none;
    display: block !important;
    margin: 0;
    min-height: 0;
    padding: 0;
  }

  .score-header {
    color: #111;
    display: block;
    margin: 0 0 1rem;
  }

  .score-header p {
    color: #555;
  }

  .score-paper {
    background: white;
    box-shadow: none;
    color: #111;
    font-size: 10pt;
    min-height: 0;
    padding: 0;
  }

  .chord-token,
  .chord-only-line {
    color: #111;
  }
}

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