:root {
  color-scheme: dark;
  --ink: #f6f2ea;
  --muted: #bbc0d1;
  --gold: #f5d69a;
  --line: rgba(222, 225, 255, 0.16);
  --world: #a49bf6;
  --font: "Avenir Next", "Nunito", "Trebuchet MS", system-ui, sans-serif;
  font-family: var(--font);
  font-size: 16px;
  background: #0b1021;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  min-height: 100svh;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
button {
  touch-action: manipulation;
}
a {
  color: inherit;
}
button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
#backdrop {
  position: fixed;
  inset: -3%;
  background: linear-gradient(#121832, #0c122b);
  background-image: url("./assets/world-starlight.webp");
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition:
    background-image 1s,
    filter 1s;
  animation: drift 40s ease-in-out infinite alternate;
  filter: brightness(0.79) saturate(0.95);
}
@keyframes drift {
  to {
    transform: translate3d(1%, 0.5%, 0) scale(1.025);
  }
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(8, 12, 28, 0.9),
      rgba(8, 12, 28, 0.5) 27%,
      transparent 62%
    ),
    linear-gradient(0deg, rgba(5, 9, 21, 0.78), transparent 35%);
  z-index: 1;
  transition: background 0.5s;
}
#app {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}
#stage-wrap {
  position: absolute;
  inset: 0;
}
#stage {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: 0;
}
#key-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.key-label {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 22px;
  padding: 0 3px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 6px;
  color: #3a312d;
  background: rgba(255, 251, 231, 0.89);
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 6px #0002;
}
.key-label.blue {
  background: #172956;
  color: #e5edff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
}
.topbar {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  left: max(32px, env(safe-area-inset-left));
  right: max(32px, env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  z-index: 8;
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1.2px;
}
.brand-light {
  font-weight: 450;
}
.brand b {
  font-size: 17px;
  color: var(--gold);
  vertical-align: super;
  margin-left: 4px;
}
.brand-mark {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 31px;
  transform: rotate(-7deg);
}
.brand-mark i {
  width: 7px;
  height: 23px;
  background: #f9dfaf;
  border-radius: 2px 2px 4px 4px;
}
.brand-mark i:nth-child(2) {
  height: 29px;
  background: #a19beb;
}
.brand-mark i:nth-child(3) {
  height: 25px;
  background: #94d9cb;
}
.brand-mark i:nth-child(4) {
  height: 19px;
  background: #f2aaa6;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.glass-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: rgba(21, 27, 48, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 13px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition:
    background 0.2s,
    transform 0.2s;
}
.glass-button:hover,
.icon-button:hover {
  background: rgba(80, 86, 120, 0.4);
  transform: translateY(-1px);
}
.icon-button {
  width: 44px;
  padding: 0;
  font-size: 25px;
}
.top-actions .glass-button span:first-child {
  font-size: 23px;
  font-weight: 400;
}
#home-panel {
  position: absolute;
  left: 5.2%;
  top: 22%;
  width: 315px;
  z-index: 4;
}
.world-tag {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 7px 0;
  background: transparent;
  color: var(--world);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.07em;
}
.world-tag span:first-child {
  font-size: 22px;
}
.tiny-chevron {
  color: #a3a9c1;
  margin-left: 8px;
  font-size: 19px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
#song-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 4.4vw, 63px);
  line-height: 1.02;
  letter-spacing: -2px;
  font-weight: 400;
  margin-top: 12px;
  text-wrap: balance;
}
#song-subtitle {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 23px;
  color: #d5cde4;
  margin-top: 7px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 12px 0;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.text-button:hover {
  color: var(--gold);
}
#change-song {
  margin: 7px 0 17px;
  justify-content: flex-start;
  color: #efdec1;
}
#change-song span {
  font-size: 20px;
}
.play-options {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.mode-field {
  border: 0;
  padding: 0;
  margin: 0;
}
.mode-field legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 11px;
  color: #c9cce0;
}
.segmented {
  display: flex;
  padding: 4px;
  gap: 3px;
  background: #151c33c9;
  border: 1px solid #41465b69;
  border-radius: 13px;
}
.segmented button {
  flex: 1;
  font-size: 13px;
  font-weight: 650;
  padding: 10px 2px;
  min-height: 39px;
  border-radius: 9px;
  white-space: nowrap;
  background: none;
  color: #c1c5d6;
}
.segmented button.selected {
  background: #ece5d7;
  color: #252838;
  box-shadow: 0 2px 8px #0003;
}
.input-help {
  font-size: 13px;
  color: #c1c4d4;
  line-height: 1.45;
  min-height: 39px;
  margin: 10px 2px 13px;
}
.mode-row,
.speed-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 11px;
  font-size: 14px;
}
.mode-row label,
.speed-row label {
  width: 38px;
  color: #c1c4d4;
}
.mode-row select {
  background: #151c33bc;
  border: 1px solid #50556a78;
  border-radius: 8px;
  color: #eae6df;
  min-width: 0;
  flex: 1;
  padding: 8px;
  font-size: 13px;
}
.speed-row input {
  width: 100%;
  min-width: 0;
  flex: 1;
  accent-color: var(--gold);
  height: 25px;
}
.speed-row output {
  width: 38px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.start-actions {
  margin-top: 23px;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  border: 1px solid #fff0cc;
  border-radius: 15px;
  background: linear-gradient(135deg, #ffe7b3, #e9c689);
  color: #29263a;
  font-weight: 800;
  font-size: 16px;
  box-shadow:
    0 5px 28px #f2c87920,
    0 2px 2px #0002;
  transition:
    transform 0.2s,
    filter 0.2s;
}
.primary-button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}
.primary-button:active {
  transform: translateY(0);
}
.play-triangle {
  font-size: 16px;
}
.preview-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 43px;
  background: transparent;
  font-size: 14px;
  color: #d1d2df;
}
.preview-button span {
  font-size: 21px;
  color: var(--gold);
}
.status-line {
  font-size: 12px;
  line-height: 1.45;
  color: #b6bcce;
  min-height: 18px;
  max-width: 340px;
}
.home-caption {
  position: absolute;
  bottom: 7%;
  right: 7%;
  text-align: right;
  pointer-events: none;
}
.caption-line {
  display: block;
  width: 33px;
  height: 1px;
  background: #e9d3ac;
  margin: 0 0 12px auto;
}
.home-caption p {
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.42;
  color: #c4c1d0;
}
.home-caption strong {
  font-weight: 400;
  color: #f2e5d2;
}
.key-count {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-top: 13px;
  color: #9fabc1;
}
.play-only,
.inspect-only {
  display: none !important;
}
body[data-screen="play"] .home-only,
body[data-screen="inspect"] .home-only {
  display: none !important;
}
body[data-screen="play"] .play-only {
  display: flex !important;
}
body[data-screen="inspect"] .inspect-only {
  display: flex !important;
}
body[data-screen="play"] .vignette {
  background:
    linear-gradient(180deg, #070c1cbb, transparent 22%),
    linear-gradient(0deg, #060c1fc9, transparent 22%);
}
body[data-screen="inspect"] .vignette {
  background: radial-gradient(ellipse at 50% 55%, #22313d77, #0a1327e8 75%);
}
body[data-screen="inspect"] #backdrop {
  filter: brightness(0.35) blur(14px);
  animation: none;
}
body[data-screen="play"] #key-labels {
  opacity: 1;
}
body[data-labels="false"] #key-labels {
  opacity: 0;
}
.playing-title {
  margin-right: auto;
}
.playing-title small {
  display: block;
  color: var(--world);
  font-size: 12px;
  letter-spacing: 0.13em;
  margin-bottom: 3px;
}
.playing-title h2 {
  font-size: 21px;
  font-weight: 550;
}
.play-header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.mic-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d7dddb;
  font-size: 13px;
}
.mic-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8ad6b4;
  box-shadow: 0 0 13px #8ad6b4;
}
.mic-status.quiet i {
  background: #d8cba9;
  box-shadow: none;
}
#countdown {
  position: absolute;
  left: 50%;
  top: 27%;
  transform: translate(-50%, -50%);
  font-family: Georgia, serif;
  font-size: 94px;
  color: #fff2ce;
  text-shadow: 0 0 50px #ffc45e77;
  pointer-events: none;
  z-index: 4;
}
#feedback {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff2ce;
  font-weight: 650;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  text-shadow: 0 2px 14px #08091e;
  z-index: 4;
}
#feedback.visible {
  opacity: 1;
}
#play-footer {
  position: absolute;
  bottom: max(25px, env(safe-area-inset-bottom));
  left: 4%;
  right: 4%;
  z-index: 6;
  align-items: center;
  gap: 30px;
}
.progress-area {
  width: 230px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #cbcddd;
  gap: 16px;
  margin-bottom: 9px;
}
.progress-label span:last-child {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--world);
}
.progress-track {
  height: 4px;
  background: #f5f1ff25;
  border-radius: 5px;
  overflow: hidden;
}
.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 5px;
  background: var(--gold);
  transition: width 0.25s;
}
.next-note {
  margin: auto;
  text-align: center;
  font-size: 16px;
  color: #e8dfcc;
  min-height: 22px;
}
.next-note b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  border: 1px solid #ffe9b354;
  border-radius: 9px;
  background: #171b32ae;
  color: var(--gold);
  font-size: 18px;
  margin-left: 8px;
}
#loop-button[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold);
}
.inspect-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.inspect-heading strong {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}
.inspect-heading span {
  font-size: 13px;
  color: #b4c0d0;
}
.view-picker {
  position: absolute;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 6px;
  gap: 4px;
  max-width: calc(100% - 28px);
  background: #172036dc;
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.view-picker button {
  padding: 10px 16px;
  min-height: 42px;
  border-radius: 10px;
  background: none;
  color: #c5cddd;
  font-size: 14px;
}
.view-picker button.selected {
  background: #f2ddb7;
  color: #252838;
}
.sheet {
  background: linear-gradient(145deg, #20283f, #11192e);
  color: var(--ink);
  border: 1px solid #b7bdd440;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 30px 140px #000a;
  max-height: calc(100svh - 50px);
  max-width: calc(100vw - 32px);
  width: 740px;
  overscroll-behavior: contain;
}
.sheet::backdrop {
  background: #04091f99;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.sheet-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.17em;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}
.sheet h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.6px;
}
.sheet h3 {
  font-size: 17px;
  font-weight: 650;
}
.sheet-heading .icon-button {
  flex-shrink: 0;
}
.library-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.song-groups {
  display: grid;
  gap: 26px;
}
.song-group {
  min-width: 0;
}
.song-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--gold);
}
.song-group-heading span {
  overflow-wrap: anywhere;
}
.song-group-heading small {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.songbook-empty {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}
.song-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.song-card {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  background: #ffffff05;
  border: 1px solid #b7bdd41f;
  border-radius: 15px;
  padding: 12px;
  min-height: 98px;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.song-card:hover {
  background: #ffffff0c;
  border-color: #f9ddb785;
}
.song-card.current {
  border-color: #f2d69aad;
  background: #f2d69a0a;
}
.song-art {
  width: 70px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 10px;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px #fff2;
}
.song-copy {
  min-width: 0;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.song-copy strong {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
}
.song-copy small {
  font-size: 11px;
  line-height: 1.35;
  color: #aeb9cc;
}
.song-copy .song-meta {
  color: #dccdae;
  font-size: 11px;
}
.settings-sheet {
  width: 480px;
}
.setting-section + .setting-section {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}
.setting-section p {
  font-size: 14px;
  line-height: 1.55;
  color: #c1cada;
  margin: 10px 0 16px;
}
.setting-section .fine-print {
  font-size: 12px;
  color: #9caac2;
  line-height: 1.5;
  margin-bottom: 0;
}
.slider-setting {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 11px;
  margin-top: 20px;
  font-size: 14px;
}
.slider-setting input {
  width: 100%;
  grid-column: 1/-1;
  accent-color: var(--gold);
}
.slider-setting output {
  font-size: 13px;
  color: var(--gold);
}
.check-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  margin-top: 19px;
}
.check-setting small {
  display: block;
  color: #98a8bf;
  font-size: 11px;
  margin-top: 4px;
}
.check-setting input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}
.mic-test {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.meter {
  height: 7px;
  flex: 1;
  background: #f5f1ff15;
  border-radius: 8px;
  overflow: hidden;
}
.meter i {
  display: block;
  width: 0;
  height: 100%;
  background: #93dab6;
  transition: width 0.075s;
}
.mic-test span {
  font-size: 14px;
  color: #dfcead;
  min-width: 120px;
  text-align: right;
}
.setting-section .error-text {
  color: #ffb9b4;
  font-size: 13px;
}
.wide {
  width: 100%;
  margin-top: 20px;
}
.pause-sheet,
.result-sheet {
  text-align: center;
  width: 400px;
  padding: 36px;
}
.pause-sheet h2,
.result-sheet h2 {
  font-size: 38px;
  margin: 10px 0 28px;
}
.pause-sheet .text-button,
.result-sheet .text-button {
  margin-top: 14px;
}
.result-stars {
  font-size: 39px;
  color: #e7c881;
  letter-spacing: 6px;
  margin: 0 auto 25px;
  text-shadow: 0 0 25px #edc66e33;
}
.result-stars b {
  font-size: 62px;
  font-weight: 400;
}
.result-sheet .eyebrow {
  font-size: 10px;
}
.result-sheet h2 {
  margin-bottom: 15px;
}
.result-sheet p {
  font-size: 15px;
  line-height: 1.5;
  color: #c5cce0;
}
.result-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 25px 0;
}
.result-stats span {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #bac4d9;
}
.result-stats strong {
  font-size: 30px;
  color: #f5dfb4;
  font-weight: 500;
}
#fatal-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(450px, 90%);
  padding: 32px;
  background: #151f35;
  border: 1px solid var(--line);
  border-radius: 24px;
  z-index: 20;
}
#fatal-error p {
  margin: 20px 0;
  line-height: 1.6;
}
.no-script {
  position: fixed;
  inset: 30%;
  z-index: 50;
  padding: 25px;
  background: #151f35;
}
.home-only {
  transition: opacity 0.3s;
}
body[data-gentle="true"] #backdrop {
  animation: none;
}
@media (min-width: 1500px) {
  #home-panel {
    left: 8%;
    top: 24%;
    width: 350px;
  }
  .home-caption {
    right: 10%;
    bottom: 10%;
  }
}
@media (max-height: 760px) and (min-width: 700px) {
  #home-panel {
    top: 16%;
    width: 285px;
  }
  #song-title {
    font-size: 43px;
    margin-top: 4px;
  }
  #song-subtitle {
    font-size: 19px;
  }
  #change-song {
    margin: 0 0 7px;
    padding: 8px 0;
  }
  .play-options {
    padding-top: 12px;
  }
  .mode-field legend {
    margin-bottom: 7px;
  }
  .input-help {
    margin: 7px 0;
    min-height: 34px;
    font-size: 12px;
  }
  .start-actions {
    margin-top: 14px;
  }
  .status-line {
    font-size: 11px;
  }
  .mode-row,
  .speed-row {
    margin-top: 6px;
  }
  .home-caption {
    bottom: 5%;
    right: 4%;
  }
}
@media (max-height: 590px) and (min-width: 700px) {
  #home-panel {
    top: 15%;
    width: 260px;
  }
  .topbar {
    top: 14px;
    left: 22px;
    right: 22px;
  }
  .brand {
    font-size: 23px;
  }
  .world-tag {
    font-size: 12px;
    padding: 0;
  }
  #song-title {
    font-size: 34px;
  }
  #song-subtitle {
    font-size: 16px;
  }
  #change-song {
    margin: 0;
    padding: 5px 0;
  }
  .play-options {
    padding-top: 8px;
  }
  .mode-field legend {
    display: none;
  }
  .input-help {
    font-size: 11px;
    min-height: 28px;
  }
  .segmented button {
    font-size: 11px;
    min-height: 30px;
    padding: 6px 2px;
  }
  .mode-row {
    font-size: 12px;
  }
  .mode-row select {
    padding: 5px;
    font-size: 11px;
  }
  .speed-row {
    font-size: 12px;
  }
  .start-actions {
    margin-top: 9px;
  }
  .primary-button {
    min-height: 44px;
    padding: 10px 16px;
  }
  .preview-button {
    min-height: 32px;
    font-size: 12px;
  }
  .status-line {
    font-size: 10px;
  }
  .home-caption p {
    font-size: 16px;
  }
  #play-footer {
    bottom: 15px;
  }
  .playing-title h2 {
    font-size: 18px;
  }
}
@media (max-width: 699px) {
  .topbar {
    top: max(16px, env(safe-area-inset-top));
    left: 18px;
    right: 18px;
  }
  .brand {
    font-size: 24px;
  }
  .brand-mark {
    transform: scale(0.8) rotate(-7deg);
    margin-right: -5px;
  }
  .top-actions {
    gap: 7px;
  }
  .top-actions .glass-button {
    padding: 7px 10px;
    min-height: 40px;
  }
  .top-actions .glass-button span:last-child {
    display: none;
  }
  .top-actions .icon-button {
    width: 40px;
    min-height: 40px;
  }
  .home-caption {
    display: none;
  }
  .vignette {
    background: linear-gradient(
      0deg,
      #080e22 0%,
      #080e22ef 40%,
      transparent 78%
    );
  }
  #home-panel {
    left: 22px;
    right: 22px;
    top: auto;
    bottom: max(17px, env(safe-area-inset-bottom));
    width: auto;
    max-height: 60%;
    overflow: auto;
    padding: 2px;
  }
  .world-tag {
    font-size: 12px;
    padding: 0;
  }
  #song-title {
    font-size: 37px;
    line-height: 1.05;
    margin-top: 5px;
    letter-spacing: -1.2px;
  }
  #song-title br {
    display: none;
  }
  #song-subtitle {
    font-size: 17px;
    margin-top: 4px;
  }
  #change-song {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 12px;
    padding: 0;
  }
  .play-options {
    margin-top: 15px;
    padding-top: 13px;
  }
  .mode-field legend {
    font-size: 12px;
    margin-bottom: 8px;
  }
  .segmented button {
    font-size: 13px;
    min-height: 35px;
    padding: 8px 3px;
  }
  .input-help {
    font-size: 12px;
    min-height: 0;
    margin: 8px 0;
  }
  .mode-row select {
    font-size: 12px;
  }
  .mode-row,
  .speed-row {
    margin-top: 8px;
  }
  .start-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
  }
  .primary-button {
    min-height: 48px;
    padding: 12px 15px;
    font-size: 14px;
  }
  .preview-button {
    width: 116px;
    flex-shrink: 0;
    font-size: 12px;
  }
  .status-line {
    font-size: 11px;
    margin-top: 6px;
  }
  .play-header-right {
    gap: 10px;
  }
  .mic-status {
    font-size: 11px;
  }
  .playing-title h2 {
    font-size: 16px;
  }
  .playing-title small {
    font-size: 10px;
  }
  .playing-title {
    max-width: 53%;
  }
  .play-header-right .icon-button {
    width: 40px;
    min-height: 40px;
  }
  .play-only.topbar {
    gap: 9px;
  }
  #play-footer {
    flex-wrap: wrap;
    gap: 15px;
    left: 22px;
    right: 22px;
    bottom: max(20px, env(safe-area-inset-bottom));
  }
  .progress-area {
    width: 100%;
    order: 1;
  }
  .next-note {
    order: 2;
    margin-right: auto;
    margin-left: 0;
    font-size: 14px;
  }
  #loop-button {
    order: 3;
    padding: 7px 10px;
    font-size: 12px;
    min-height: 38px;
  }
  #countdown {
    top: 25%;
    font-size: 72px;
  }
  #feedback {
    font-size: 21px;
    top: 22%;
    white-space: nowrap;
  }
  .sheet {
    padding: 22px;
    border-radius: 20px;
    max-height: calc(100svh - 28px);
  }
  .sheet h2 {
    font-size: 27px;
  }
  .sheet-heading {
    gap: 10px;
    margin-bottom: 20px;
  }
  .song-list {
    grid-template-columns: 1fr;
  }
  .song-card {
    min-height: 86px;
  }
  .song-art {
    width: 64px;
    height: 64px;
  }
  .song-copy strong {
    font-size: 15px;
  }
  .song-copy small,
  .song-copy .song-meta {
    font-size: 12px;
  }
  .inspect-heading {
    display: none;
  }
  .view-picker button {
    padding: 8px 11px;
    min-height: 38px;
    font-size: 12px;
  }
  .view-picker {
    gap: 1px;
    padding: 5px;
  }
  .key-label {
    font-size: 11px;
    min-width: 18px;
    height: 19px;
  }
  .key-label.blue {
    font-size: 9px;
    min-width: 15px;
    height: 15px;
  }
  .result-sheet,
  .pause-sheet {
    padding: 30px;
  }
  .result-sheet h2,
  .pause-sheet h2 {
    font-size: 35px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #backdrop {
    animation: none;
  }
  * {
    scroll-behavior: auto !important;
  }
}
@media (max-width: 699px) and (max-height: 700px) {
  #home-panel {
    max-height: 65%;
  }
  #song-title {
    font-size: 29px;
  }
  .mode-field legend {
    display: none;
  }
  .play-options {
    margin-top: 10px;
  }
  .mode-row,
  .speed-row {
    margin-top: 5px;
  }
  .start-actions {
    margin-top: 10px;
  }
  .input-help {
    font-size: 11px;
  }
  .status-line {
    display: none;
  }
}

@media (max-width: 699px) {
  body[data-screen="home"] #stage-wrap {
    top: 58px;
    bottom: auto;
    height: calc(100svh - 525px);
    min-height: 180px;
    max-height: 440px;
  }
  body[data-screen="home"] #stage {
    mask-image: linear-gradient(#000 0%, #000 90%, transparent 100%);
  }
  #home-panel {
    background: linear-gradient(
      0deg,
      #0c1428 0%,
      #0c1428e8 77%,
      #0c142800 100%
    );
    border-radius: 15px;
  }
  .home-caption {
    display: none !important;
  }
}
@media (max-height: 500px) and (min-width: 700px) {
  #home-panel {
    top: 72px;
    width: 265px;
    max-height: calc(100svh - 84px);
    overflow: auto;
    padding-right: 6px;
    scrollbar-width: thin;
  }
  #song-title {
    font-size: 27px;
  }
  #song-subtitle,
  .input-help,
  .home-caption {
    display: none !important;
  }
  #change-song {
    font-size: 12px;
  }
  .play-options {
    margin-top: 5px;
  }
  .start-actions {
    margin-top: 10px;
  }
  .preview-button {
    min-height: 30px;
  }
}

.notation-setting {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  font-size: 14px;
}
.notation-setting select {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: #151e33;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.hover-preview-hint,
.song-preview-status {
  font-size: 13px;
  color: var(--muted);
}
.song-preview-status {
  min-height: 1.3em;
  color: var(--gold);
  margin: 8px 0 18px;
}
.song-card.previewing {
  border-color: var(--gold);
  background: #ffffff12;
}
.song-card.previewing .song-art {
  box-shadow: 0 0 15px #e9cfa733;
}
@media (hover: none) {
  .hover-preview-hint {
    display: none;
  }
}
