:root {
  color-scheme: dark;
  --ink: #f5f8fa;
  --muted: #99a4b1;
  --faint: #5e6975;
  --background: #080a0f;
  --panel: rgba(15, 19, 27, 0.88);
  --panel-solid: #10151e;
  --panel-hover: #19212d;
  --line: rgba(221, 232, 240, 0.13);
  --line-strong: rgba(221, 232, 240, 0.24);
  --mint: #8ff4d6;
  --mint-deep: #43d6ad;
  --sun: #ffd277;
  --danger: #ff8a8a;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --reader-scale: 1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--background); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% -7%, rgba(81, 238, 190, 0.14), transparent 27rem),
    radial-gradient(circle at 95% 5%, rgba(255, 210, 119, 0.10), transparent 32rem),
    var(--background);
}

button, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.8rem;
  left: 0.8rem;
  transform: translateY(-180%);
  padding: 0.7rem 0.9rem;
  color: #06120e;
  background: var(--mint);
  border-radius: 0.5rem;
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.ambient { position: fixed; z-index: -1; border-radius: 999px; filter: blur(2px); pointer-events: none; }
.ambient-one { width: 20rem; height: 20rem; top: 38%; left: -14rem; background: rgba(80, 215, 173, 0.045); }
.ambient-two { width: 25rem; height: 25rem; right: -18rem; bottom: 0; background: rgba(254, 199, 108, 0.038); }

.site-header {
  width: min(1380px, calc(100% - 2.5rem));
  min-height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; letter-spacing: 0.08em; }
.brand strong { display: block; font-size: 0.83rem; line-height: 1.05; }
.brand small { display: block; margin-top: 0.2rem; color: var(--mint); font-size: 0.58rem; font-weight: 800; }
.brand-mark { width: 2rem; height: 2rem; display: inline-flex; align-items: flex-end; justify-content: center; gap: 0.13rem; padding: 0.25rem; border: 1px solid rgba(143, 244, 214, 0.7); border-radius: 0.42rem; }
.brand-mark i { display: block; width: 0.24rem; border-radius: 99px; background: var(--mint); }
.brand-mark i:nth-child(1) { height: 0.55rem; }.brand-mark i:nth-child(2) { height: 1.15rem; }.brand-mark i:nth-child(3) { height: 0.8rem; }

.header-actions { display: flex; align-items: center; gap: 0.45rem; }
.icon-button, .stage-button, .transport-button, .source-link, .close-help {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(15, 20, 29, 0.72);
  border-radius: 0.6rem;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.icon-button:hover, .stage-button:hover, .transport-button:hover, .source-link:hover, .close-help:hover { border-color: var(--mint); background: var(--panel-hover); }
.icon-button:active, .stage-button:active, .transport-button:active { transform: translateY(1px); }
.icon-button { width: 2.35rem; height: 2.35rem; padding: 0; font-size: 0.75rem; font-weight: 800; }
.stage-button { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.35rem; padding: 0.45rem 0.72rem; font-size: 0.8rem; font-weight: 760; }
.stage-dot { width: 0.5rem; height: 0.5rem; border-radius: 100%; background: var(--sun); box-shadow: 0 0 0 3px rgba(255, 210, 119, 0.12); }

.key-help { position: fixed; z-index: 40; top: 4.8rem; right: max(1.2rem, calc((100vw - 1380px) / 2)); width: min(22rem, calc(100vw - 2.4rem)); padding: 1rem; border: 1px solid var(--line-strong); border-radius: 0.85rem; background: #121925; box-shadow: var(--shadow); }
.key-help-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.key-help-header strong { font-size: 0.86rem; }.close-help { width: 1.8rem; height: 1.8rem; padding: 0; font-size: 1.2rem; }
.key-help dl { display: grid; gap: 0.65rem; margin: 0; }.key-help dl div { display: grid; grid-template-columns: 7.3rem 1fr; align-items: center; gap: 0.8rem; }.key-help dt, .key-help dd { margin: 0; }.key-help dd { color: var(--muted); font-size: 0.78rem; }
kbd { display: inline-block; min-width: 1.35rem; padding: 0.1rem 0.28rem; border: 1px solid rgba(221, 232, 240, 0.28); border-bottom-width: 2px; border-radius: 0.26rem; color: var(--ink); background: rgba(255,255,255,0.06); font-family: inherit; font-size: 0.7rem; font-weight: 750; text-align: center; }

main { width: min(1380px, calc(100% - 2.5rem)); margin: 0 auto 4rem; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 28rem); gap: 2rem; padding: clamp(2rem, 5vw, 4.5rem) 0 2.25rem; align-items: end; }
.eyebrow { margin: 0 0 0.45rem; color: var(--mint); font-size: 0.65rem; font-weight: 850; letter-spacing: 0.18em; }
.intro h1 { max-width: 18ch; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 4.5rem); font-weight: 500; letter-spacing: -0.055em; line-height: 0.95; }
.intro-copy { max-width: 38ch; margin: 0 0 0.28rem; color: var(--muted); font-size: 0.93rem; line-height: 1.6; }

.member-tabs { display: flex; gap: 0.45rem; overflow-x: auto; padding: 0 0 1.25rem; scrollbar-width: thin; }
.member-tab { flex: 0 0 auto; min-width: 8.4rem; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 0.7rem; color: var(--muted); background: rgba(15, 19, 27, 0.5); text-align: left; }
.member-tab:hover { border-color: var(--line-strong); background: rgba(25, 33, 45, 0.75); color: var(--ink); }
.member-tab.active { color: var(--ink); border-color: rgba(143, 244, 214, 0.8); background: linear-gradient(125deg, rgba(61, 191, 153, 0.2), rgba(24, 34, 44, 0.78)); box-shadow: inset 0 0 0 1px rgba(143,244,214,0.1); }
.member-tab-name { display: block; font-size: 0.9rem; font-weight: 780; }.member-tab-role { display: block; min-height: 1.1rem; margin-top: 0.2rem; color: var(--faint); font-size: 0.66rem; }.member-tab.active .member-tab-role { color: #a9d9ca; }

.workspace { display: grid; grid-template-columns: minmax(17rem, 0.68fr) minmax(0, 1.62fr); min-height: 40rem; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.song-rail { min-width: 0; border-right: 1px solid var(--line); background: rgba(7, 10, 15, 0.38); }
.rail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.7rem; padding: 1.25rem 1.15rem 0.75rem; }.rail-header h2 { margin: 0; font-size: 1.04rem; }.rail-header .eyebrow { margin-bottom: 0.28rem; font-size: 0.57rem; }.song-count { padding-top: 0.13rem; color: var(--faint); font-size: 0.72rem; }
.library-switch { display: flex; align-items: center; gap: 0.5rem; padding: 0.15rem 1.15rem 0.9rem; color: var(--muted); font-size: 0.75rem; cursor: pointer; }.library-switch input { width: 0.9rem; height: 0.9rem; accent-color: var(--mint-deep); }
.song-list { display: grid; gap: 0.05rem; max-height: 42rem; min-height: 26rem; margin: 0; padding: 0.5rem; overflow: auto; list-style: none; }
.song-list button { width: 100%; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; align-items: center; gap: 0.45rem; padding: 0.68rem 0.65rem; border: 1px solid transparent; border-radius: 0.55rem; color: var(--muted); background: transparent; text-align: left; }
.song-list button:hover { color: var(--ink); background: rgba(255,255,255,0.045); }.song-list button.active { color: var(--ink); border-color: rgba(143, 244, 214, 0.47); background: rgba(72, 211, 170, 0.10); }
.song-list-number { color: var(--faint); font-size: 0.66rem; font-weight: 780; letter-spacing: 0.04em; }.song-list button.active .song-list-number { color: var(--mint); }.song-list-name { min-width: 0; }.song-list-name strong, .song-list-name small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.song-list-name strong { font-size: 0.8rem; font-weight: 750; }.song-list-name small { margin-top: 0.15rem; color: var(--faint); font-size: 0.68rem; }.song-list-indicator { width: 0.43rem; height: 0.43rem; border: 1px solid var(--faint); border-radius: 50%; }.song-list-indicator.linked { border-color: var(--mint); background: var(--mint); box-shadow: 0 0 0.35rem rgba(143,244,214,0.7); }

.song-panel { min-width: 0; display: flex; flex-direction: column; padding: clamp(1.2rem, 3vw, 2.5rem); background: linear-gradient(145deg, rgba(24,31,43,0.47), rgba(13,17,24,0.32)); }
.song-panel-topline { display: flex; justify-content: space-between; gap: 1rem; }.view-label, .song-status { min-height: 1.45rem; padding: 0.28rem 0.5rem; border-radius: 0.3rem; font-size: 0.63rem; font-weight: 830; letter-spacing: 0.12em; text-transform: uppercase; }.view-label { color: var(--mint); background: rgba(83, 224, 182, 0.1); }.song-status { color: var(--sun); border: 1px solid rgba(255,210,119,0.26); }
.song-heading { padding: clamp(1.4rem, 4vw, 3.5rem) 0 1.6rem; }.song-number { margin: 0 0 0.5rem; color: var(--faint); font-size: calc(0.77rem * var(--reader-scale)); font-weight: 800; letter-spacing: 0.15em; }.song-heading h2 { margin: 0; max-width: 14ch; font-family: Georgia, "Times New Roman", serif; font-size: clamp(calc(2.2rem * var(--reader-scale)), 6.2vw, calc(5.8rem * var(--reader-scale))); font-weight: 500; letter-spacing: -0.06em; line-height: 0.88; overflow-wrap: anywhere; }.song-artist { margin: 0.8rem 0 0; color: var(--muted); font-size: calc(1rem * var(--reader-scale)); }

.transport { display: grid; grid-template-columns: auto minmax(9rem, 1fr) auto; align-items: center; gap: 0.75rem; margin-bottom: 1.15rem; padding: 0.65rem; border: 1px solid var(--line); border-radius: 0.75rem; background: rgba(8,10,15,0.28); }.transport-button { min-height: 2.45rem; padding: 0.5rem 0.7rem; font-size: 0.72rem; font-weight: 770; white-space: nowrap; }.up-next { min-width: 0; color: var(--muted); font-size: 0.75rem; text-align: center; }.up-next strong { display: block; overflow: hidden; color: var(--ink); font-size: 0.8rem; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }.up-next span { display: block; margin-bottom: 0.18rem; color: var(--faint); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.13em; }

.member-setup { margin-bottom: 1rem; }.setup-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 0.95rem; border: 1px solid rgba(255,210,119,0.28); border-radius: 0.72rem; background: rgba(255,210,119,0.06); }.setup-card strong, .setup-card span { display: block; }.setup-card strong { font-size: 0.78rem; }.setup-card span { margin-top: 0.16rem; color: var(--muted); font-size: 0.7rem; }.setup-card label { color: var(--sun); font-size: 0.63rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }.setup-card select { display: block; max-width: 14rem; margin-top: 0.3rem; padding: 0.42rem 1.8rem 0.42rem 0.5rem; border: 1px solid rgba(255,210,119,0.42); border-radius: 0.35rem; color: var(--ink); background: #1b2029; font-size: 0.78rem; }.confirmed-card { border-color: rgba(143,244,214,0.24); background: rgba(143,244,214,0.05); }.confirmed-card strong { color: var(--mint); }.confirmed-card span { color: var(--muted); }

.part-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }.part-card { min-height: 10.7rem; display: flex; flex-direction: column; justify-content: space-between; padding: 1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: rgba(6,9,14,0.22); }.part-card:hover { border-color: var(--line-strong); background: rgba(24,31,43,0.5); }.part-kind { margin: 0; color: var(--mint); font-size: calc(0.64rem * var(--reader-scale)); font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }.part-card h3 { margin: 0.45rem 0 0; font-size: calc(1.05rem * var(--reader-scale)); letter-spacing: -0.02em; }.part-card p { margin: 0.4rem 0 1.1rem; color: var(--muted); font-size: calc(0.75rem * var(--reader-scale)); line-height: 1.4; }.part-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }.source-state { display: inline-flex; align-items: center; gap: 0.36rem; color: var(--faint); font-size: 0.67rem; font-weight: 760; }.source-state::before { content: ""; width: 0.46rem; height: 0.46rem; border: 1px solid currentColor; border-radius: 50%; }.source-state.linked { color: var(--mint); }.source-state.linked::before { background: currentColor; box-shadow: 0 0 0.35rem rgba(143,244,214,0.55); }.source-link { padding: 0.42rem 0.55rem; color: var(--mint); font-size: 0.69rem; font-weight: 760; text-decoration: none; }.source-link::after { content: "↗"; margin-left: 0.35rem; }.no-source { color: var(--faint); font-size: 0.69rem; font-weight: 730; }

.song-footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1.5rem; color: var(--faint); font-size: 0.67rem; }.safe-note { color: var(--muted); }.safe-note span { color: var(--mint); }.shortcut-note { white-space: nowrap; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

body.stage-mode { background: #030405; } body.stage-mode .intro, body.stage-mode .member-tabs, body.stage-mode .song-rail, body.stage-mode .safe-note, body.stage-mode .shortcut-note, body.stage-mode .key-help-toggle, body.stage-mode #decrease-type, body.stage-mode #increase-type { display: none; } body.stage-mode .site-header { width: min(1380px, calc(100% - 1.5rem)); min-height: 4.25rem; } body.stage-mode main { width: min(1380px, calc(100% - 1.5rem)); margin-bottom: 1rem; } body.stage-mode .workspace { display: block; min-height: calc(100vh - 5.5rem); border-color: rgba(143,244,214,0.25); } body.stage-mode .song-panel { min-height: calc(100vh - 5.5rem); padding: clamp(1.4rem, 4vw, 4rem); } body.stage-mode .song-heading { padding-top: clamp(2rem, 8vh, 8rem); } body.stage-mode .song-heading h2 { max-width: 16ch; } body.stage-mode .part-grid { max-width: 74rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

@media (max-width: 880px) { .intro { grid-template-columns: 1fr; gap: 1rem; }.intro h1 { max-width: 16ch; }.workspace { grid-template-columns: 15rem minmax(0, 1fr); }.part-grid { grid-template-columns: 1fr; }.song-footer { flex-direction: column; }.shortcut-note { white-space: normal; } }
@media (max-width: 690px) { .site-header, main { width: min(100% - 1.25rem, 1380px); }.site-header { min-height: 4.5rem; }.brand strong { font-size: 0.73rem; }.header-actions { gap: 0.28rem; }.icon-button { width: 2rem; height: 2rem; }.stage-button { min-height: 2rem; padding: 0.4rem 0.52rem; font-size: 0.7rem; }.intro { padding: 2.3rem 0 1.6rem; }.intro h1 { font-size: clamp(2.15rem, 13vw, 3.6rem); }.workspace { display: flex; flex-direction: column; }.song-rail { border-right: 0; border-bottom: 1px solid var(--line); }.rail-header { padding-bottom: 0.4rem; }.library-switch { padding-bottom: 0.45rem; }.song-list { max-height: 11.2rem; min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }.song-list button { grid-template-columns: 1.7rem minmax(0, 1fr); padding: 0.58rem 0.5rem; }.song-list-indicator { display: none; }.song-panel { padding: 1.05rem; }.transport { grid-template-columns: auto 1fr auto; gap: 0.4rem; padding: 0.45rem; }.transport-button { padding: 0.48rem; font-size: 0.67rem; }.up-next { font-size: 0.64rem; }.setup-card { align-items: flex-start; flex-direction: column; gap: 0.7rem; }.song-heading h2 { font-size: clamp(calc(2.35rem * var(--reader-scale)), 14vw, calc(4.5rem * var(--reader-scale))); }.member-tabs { margin-right: -0.62rem; }.member-tab { min-width: 7.7rem; }.part-card { min-height: 9.5rem; } body.stage-mode .site-header, body.stage-mode main { width: calc(100% - 1rem); } }
@media (max-width: 420px) { .key-help-toggle { display: none; }.stage-button { font-size: 0; }.stage-button .stage-dot { margin: 0.12rem; }.song-list { grid-template-columns: 1fr; max-height: 12rem; }.song-list-name small { display: none; }.intro-copy { font-size: 0.84rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }
