/* =========================================================
   ProducerNotes: Vermey Music Group
   Tokens follow the label dashboard (dark, purple accent,
   Manrope + DM Mono for timecodes only).
   ========================================================= */
:root {
  --bg: #0A0A0D;
  --surface: #121217;
  --surface-2: #191921;
  --sunken: #1F1F29;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #F4F4F5;
  --text-2: #A1A1AA;
  --text-3: #8A8A96;
  --accent: #A855F7;
  --accent-strong: #C084FC;
  --accent-hover: #9333EA;
  --accent-soft: rgba(168, 85, 247, .16);
  /* Yellow = feedback (note button, playhead, markers, marks). Purple = the music. */
  --note: #FACC15;
  --note-hover: #EAB308;
  --note-ink: #17140A;
  --note-dim: rgba(250, 204, 21, .55);
  --note-soft: rgba(250, 204, 21, .16);
  --note-mark: rgba(250, 204, 21, .5);
  --note-glow: rgba(250, 204, 21, .22);
  --brand: linear-gradient(135deg, #8B5CF6, #3B82F6);
  --green: #4ADE80;
  --green-soft: rgba(34, 197, 94, .14);
  --red: #F87171;
  --danger: #DC2626;
  --danger-hover: #B91C1C;
  --wave: rgba(255, 255, 255, .26);
  --wave-hover: rgba(255, 255, 255, .5);
  --bar-bg: rgba(10, 10, 13, .9);
  --demo-bg: #1A1426;
  --on-accent: #FFFFFF;
  --accent-hover-soft: rgba(168, 85, 247, .28);
  --accent-done: rgba(192, 132, 252, .45);
  --demo-line: rgba(168, 85, 247, .25);
  --green-line: rgba(74, 222, 128, .5);
  --red-line: rgba(248, 113, 113, .55);
  --red-strike: rgba(248, 113, 113, .75);
  --line-hover: rgba(255, 255, 255, .26);
  --placeholder: #6E6E7A;
  --backdrop: rgba(0, 0, 0, .62);
  --shadow-seg: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, .6);
  --shadow-dialog: 0 30px 80px rgba(0, 0, 0, .7);
  --shadow-toast: 0 16px 40px rgba(0, 0, 0, .5);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --player-h: 88px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.ic { width: 20px; height: 20px; flex-shrink: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow > * { max-width: 720px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* ---------- demo bar ---------- */
.demo-bar { background: var(--demo-bg); border-bottom: 1px solid var(--demo-line); font-size: 13px; }
.demo-inner { max-width: 1200px; margin: 0 auto; padding: 6px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
@media (min-width: 768px) { .demo-inner { padding: 6px 32px; } }
.demo-tag { font-weight: 800; color: var(--accent-strong); }
.demo-as { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.demo-label { color: var(--text-2); white-space: nowrap; }
.demo-select { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; min-height: 36px; padding: 0 8px; font-size: 13px; max-width: 190px; }
.demo-btn { margin-left: auto; min-height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; font-size: 13px; white-space: nowrap; }
.demo-btn:hover:not(:disabled) { background: var(--accent-hover-soft); color: var(--on-accent); }
.demo-btn:disabled { opacity: .55; cursor: default; }
.demo-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--text-2); }
.demo-icon:hover { background: var(--surface-2); color: var(--text); }
.demo-icon .ic { width: 18px; height: 18px; }
@media (max-width: 480px) { .demo-label { display: none; } .demo-select { max-width: 150px; } }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -.02em; min-height: 44px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--on-accent); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark svg { width: 23px; height: 13px; }
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; }
.brand-mark.big svg { width: 36px; height: 21px; }
.brand-name { font-size: 16px; }
.who { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--text); font-weight: 700; }
.who:hover { background: var(--sunken); }
.who:active { transform: scale(.97); }
.studio-tag { font-size: 13px; font-weight: 700; color: var(--text-2); padding: 6px 12px; border-radius: 999px; background: var(--surface-2); }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--text-2); font-weight: 800; font-size: 12px; flex-shrink: 0; letter-spacing: 0; }
.who .av { background: var(--accent); color: var(--on-accent); }

/* ---------- headings ---------- */
.track-head { padding-top: 8px; padding-bottom: 18px; }
.track-sub { margin: 0; color: var(--text-2); font-weight: 600; }
.track-title { font-size: clamp(36px, 8.5vw, 64px); font-weight: 800; letter-spacing: -.045em; line-height: .98; margin: 4px 0 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 16px 0 24px; }
.page-title { font-size: clamp(32px, 6vw, 48px); font-weight: 800; letter-spacing: -.04em; margin: 0 0 8px; line-height: 1.02; }
.lead { color: var(--text-2); margin: 8px 0 0; max-width: 62ch; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; font-weight: 600; min-height: 44px; margin-left: -4px; padding: 0 4px; border-radius: 8px; }
.back:hover { color: var(--text); }
.back .ic { width: 18px; height: 18px; }
.round-tabs { margin-top: 18px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 0; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; transition: transform .12s ease; }
.btn .ic { width: 18px; height: 18px; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-secondary:hover { background: var(--sunken); }
.btn-ghost { background: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: var(--on-accent); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-note { background: var(--note); color: var(--note-ink); }
.btn-note:hover { background: var(--note-hover); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn[aria-disabled="true"] { opacity: .6; }
.link-btn { display: inline-flex; align-items: center; background: none; border: 0; padding: 0; color: var(--accent-strong); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; min-height: 36px; font-size: 14px; }
.link-btn.inline { min-height: 0; display: inline; font-size: inherit; }
.link-btn:hover { color: var(--text); }
.link-btn.danger { color: var(--red); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--text-3); flex-shrink: 0; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ic { width: 18px; height: 18px; }
@media (pointer: coarse) { .btn-sm, .icon-btn { min-height: 44px; } .icon-btn { width: 44px; } }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: 13px; box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; }
.seg button { min-height: 42px; padding: 0 18px; border-radius: 10px; border: 0; background: none; color: var(--text-2); font-weight: 700; font-size: 14px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--sunken); color: var(--text); box-shadow: var(--shadow-seg), inset 0 0 0 1px var(--line-strong); }
.seg .count { color: var(--text-3); font-variant-numeric: tabular-nums; margin-left: 2px; }

/* ---------- player ---------- */
.player-bar { position: sticky; top: 0; z-index: 20; background: var(--bar-bg); -webkit-backdrop-filter: saturate(140%) blur(16px); backdrop-filter: saturate(140%) blur(16px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0 16px; }
.player-grid { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "play wave" "meta meta"; gap: 10px 14px; align-items: center; }
.play { grid-area: play; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: transform .12s ease; }
.play:hover { background: var(--accent-hover); }
.play:active { transform: scale(.94); }
.play .ic { width: 22px; height: 22px; }
.play .i-play { margin-left: 2px; }
.play .i-pause, .play.is-playing .i-play { display: none; }
.play.is-playing .i-pause { display: block; }
.wave { grid-area: wave; position: relative; height: 56px; cursor: pointer; touch-action: pan-y; border-radius: 6px; }
.wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wave:focus-visible { outline-offset: 4px; }
.markers { position: absolute; left: 0; right: 0; bottom: -14px; height: 0; }
.marker { position: absolute; bottom: -8px; width: 22px; height: 22px; margin-left: -11px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.marker span { width: 8px; height: 8px; border-radius: 50%; background: var(--note-dim); box-shadow: 0 0 0 2px var(--bg); transition: transform .15s ease; }
.marker.mine span { background: var(--note); }
.playhead { position: absolute; left: 0; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--note); pointer-events: none; will-change: transform; }
.playhead::before { content: ""; position: absolute; left: 50%; top: -5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--note); }
.marker:hover span, .marker:focus-visible span { transform: scale(1.5); }
.hover-time { position: absolute; top: -24px; transform: translateX(-50%); padding: 1px 6px; border-radius: 6px; background: var(--text); color: var(--bg); font-family: var(--mono); font-size: 11.5px; pointer-events: none; white-space: nowrap; }
.player-meta { grid-area: meta; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 6px; }
.time { font-family: var(--mono); font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.time [data-cur] { color: var(--text); }
.player-grid.has-note { grid-template-areas: "play wave" "meta meta" "note note"; }
.note-big { grid-area: note; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--note); color: var(--note-ink); font-weight: 800; font-size: 17px; white-space: nowrap; box-shadow: 0 8px 24px var(--note-glow); transition: transform .12s ease; }
.note-big:hover { background: var(--note-hover); }
.note-big:active { transform: scale(.98); }
.note-big .ic { width: 22px; height: 22px; }
.note-big b { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.player-error { grid-column: 1 / -1; margin: 0; color: var(--red); font-size: 13.5px; font-weight: 600; }
@media (min-width: 768px) {
  .player-grid { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "play wave meta"; gap: 18px; }
  .player-grid.has-note { grid-template-columns: 52px minmax(0, 1fr) auto auto; grid-template-areas: "play wave meta note"; }
  .player-meta { margin-top: 0; gap: 16px; }
  .note-big { width: auto; min-height: 52px; font-size: 16px; }
}

/* ---------- member layout ---------- */
.member-grid { display: flex; flex-direction: column; gap: 18px; padding-top: 18px; padding-bottom: 48px; }
.side { display: contents; }
.phase-card { order: 1; }
.tabs { order: 2; align-self: flex-start; }
.pane-lyrics, .pane-notes { order: 3; min-width: 0; }
.member-grid[data-tab="tekst"] .pane-notes { display: none; }
.member-grid[data-tab="notities"] .pane-lyrics { display: none; }
@media (min-width: 960px) {
  .member-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); gap: 56px; align-items: start; padding-top: 28px; }
  .tabs { display: none; }
  .member-grid[data-tab] .pane-lyrics, .member-grid[data-tab] .pane-notes { display: block; }
  .pane-lyrics { grid-column: 1; grid-row: 1; }
  .side { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--player-h) + 16px); max-height: calc(100vh - var(--player-h) - 32px); overflow: auto; overscroll-behavior: contain; padding: 1px 6px 16px 1px; }
  .member-grid.no-lyrics { grid-template-columns: minmax(0, 720px); }
  .member-grid.no-lyrics .side { grid-column: 1; position: static; max-height: none; overflow: visible; }
}

/* phase card */
.phase-card { background: var(--surface); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); padding: 18px; }
.phase-card h2 { font-size: 19px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 6px; line-height: 1.25; }
.phase-card .steps + h2 { margin-top: 16px; }
.phase-card p { margin: 0; color: var(--text-2); }
.phase-card p + p { margin-top: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12.5px; color: var(--text-3); font-weight: 700; }
.steps li { display: grid; gap: 6px; }
.step-bar { height: 3px; border-radius: 3px; background: var(--sunken); }
.steps li.done { color: var(--text-2); }
.steps li.done .step-bar { background: var(--accent-done); }
.steps li.now { color: var(--text); }
.steps li.now .step-bar { background: var(--accent); }
.deadline { font-weight: 700; color: var(--text) !important; margin-top: 10px !important; }
.progress-row { margin-top: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.people { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--text-2); font-weight: 600; }
.person .av { width: 24px; height: 24px; font-size: 10.5px; }
.person .av .ic { width: 14px; height: 14px; }
.person.done { color: var(--text); }
.person.done .av { background: var(--accent); color: var(--on-accent); }
.phase-card .link-btn { margin-top: 10px; }
.phase-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 959px) {
  .phase-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bar-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .phase-actions .btn { flex: 1; }
  body.selecting .phase-actions { display: none; }
}
body.has-actionbar { padding-bottom: 96px; }

/* the contact person's group card */
.group-card { order: 1; background: var(--surface); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); padding: 18px; }
.group-card .pane-head { margin-top: 0; }
.group-card > p { margin: 0; color: var(--text-2); }
.group-card .btn-row { align-items: center; }
.remind { display: grid; gap: 8px; justify-items: start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.remind p { margin: 0; }
.waiting > * + * { margin-top: 16px; }
.who.is-static { cursor: default; }
.who.is-static:hover { background: var(--surface-2); }
.who.is-static:active { transform: none; }
.who .badge { display: none; margin-left: 2px; }
@media (min-width: 480px) { .who .badge { display: inline-flex; } }

/* ---------- lyrics ---------- */
.lyrics { padding: 2px 0 24px; }
.line { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; align-items: baseline; padding: 2px 0; border-radius: 10px; }
.lyrics.untimed .line { grid-template-columns: minmax(0, 1fr); }
.line.gap { margin-top: 22px; }
.line:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.line-time { font-family: var(--mono); font-size: 12px; color: var(--text-3); background: none; border: 0; padding: 0; min-height: 30px; text-align: left; border-radius: 6px; font-variant-numeric: tabular-nums; }
button.line-time:hover { color: var(--accent-strong); }
.line-text { margin: 0; font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; letter-spacing: -.022em; line-height: 1.38; color: var(--text); }
.lyrics.playing .line { opacity: .38; transition: opacity .3s ease; }
.lyrics.playing .line.active { opacity: 1; }
.lyrics.playing .line.sel, .lyrics.playing .line.focus { opacity: 1; }
.lt { border-radius: 4px; padding: 0 3px; margin: 0 -3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.line.mark .lt {
  background-image: linear-gradient(transparent 58%, var(--note-mark) 58%);
  background-image: linear-gradient(transparent 58%, color-mix(in srgb, var(--note) calc(24% + var(--depth, 1) * 16%), transparent) 58%);
}
.markable .line { cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .markable .line:not(.sel):hover .lt { background-color: var(--note-soft); } }
@media (hover: none) { .markable .line-text { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
.line.sel .lt { background: var(--note); color: var(--note-ink); }
.line.focus .lt { background-color: var(--note-soft); }
.lyrics-panel .line-text { font-size: 18px; }

/* ---------- notes ---------- */
.pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 8px; }
.pane-head h2 { font-size: 16px; font-weight: 800; letter-spacing: -.015em; margin: 0; }
.lock { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.lock .ic { width: 14px; height: 14px; }
.empty { color: var(--text-3); margin: 12px 0; }
.note { position: relative; padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; scroll-margin: 140px; }
.note::before { content: ""; position: absolute; inset: 4px -10px; border-radius: 14px; background: var(--accent-soft); opacity: 0; pointer-events: none; }
.note.hl::before { animation: flash 1.8s ease; }
@keyframes flash { 0%, 45% { opacity: 1; } 100% { opacity: 0; } }
.note > * { position: relative; }
.note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; font-size: 13px; }
.tc { font-family: var(--mono); font-size: 12.5px; color: var(--text); background: var(--surface-2); border: 0; border-radius: 8px; padding: 0 9px; min-height: 30px; font-variant-numeric: tabular-nums; }
.tc:hover { background: var(--sunken); color: var(--accent-strong); }
.cat { font-weight: 800; color: var(--text-2); }
.by { color: var(--text-3); font-weight: 600; }
.spacer { flex: 1; }
.note-head .icon-btn { margin: -6px 0; }
.quote { display: block; width: 100%; text-align: left; margin: 0; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: -.012em; line-height: 1.45; }
button.quote:hover { background: var(--sunken); }
.q-ctx { display: block; color: var(--text-3); }
.q-old { display: block; color: var(--text-3); text-decoration-thickness: 2px; text-decoration-color: var(--red-strike); }
.q-new { display: block; margin-top: 4px; text-decoration: none; color: var(--note); }
.q-sel { background: linear-gradient(transparent 58%, var(--note-mark) 58%); color: var(--text); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.textarea-lyric { min-height: 46px; font-weight: 700; }
.note-text { margin: 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.reacts { display: flex; gap: 6px; flex-wrap: wrap; }
.react { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 13px; }
.react .ic { width: 16px; height: 16px; }
.react b { color: var(--text); font-variant-numeric: tabular-nums; }
.react:hover:not(:disabled) { background: var(--sunken); color: var(--text); }
.react.on { background: var(--accent-soft); color: var(--accent-strong); }
.react.on b { color: var(--accent-strong); }
.react:disabled { cursor: default; opacity: .75; }
@media (pointer: coarse) { .react { min-height: 44px; } .tc { min-height: 36px; } }
.comments { list-style: none; margin: 2px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line-strong); display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.c-by { font-weight: 800; color: var(--text); margin-right: 6px; }
.c-form { display: flex; gap: 8px; }
.c-form .input { flex: 1; min-width: 0; }
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.status .ic { width: 14px; height: 14px; }
.status.ok { background: var(--green-soft); color: var(--green); }
.status.no { background: var(--surface-2); color: var(--text-2); }
.reply { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 14px; }
.reply-by { display: block; font-size: 12px; font-weight: 800; color: var(--text-3); margin-bottom: 2px; }

/* lyric selection bar */
.select-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 16px; background: var(--surface-2); border-radius: 16px; box-shadow: var(--shadow-pop), 0 0 0 1px var(--line-strong); animation: rise .18s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.sb-text { flex: 1; min-width: 0; }
.sb-quote { margin: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-hint { margin: 0; font-size: 12.5px; color: var(--text-3); }
.sb-hint .link-btn { min-height: 0; font-size: 12.5px; }

/* ---------- sheet ---------- */
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--text); width: min(560px, calc(100% - 32px)); max-height: min(90vh, 900px); border-radius: 20px; box-shadow: var(--shadow-dialog), 0 0 0 1px var(--line-strong); overflow: auto; overscroll-behavior: contain; }
dialog.sheet[open] { animation: sheet-in .22s ease; }
dialog.sheet::backdrop { background: var(--backdrop); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 12px 4px 20px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sheet-title { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.sheet-body { padding: 8px 20px 22px; }
.sheet-text { color: var(--text-2); margin: 0 0 16px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.sheet-quote .quote { margin-bottom: 2px; }
@media (max-width: 767px) {
  dialog.sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .sheet-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .sheet-actions .btn { flex: 1; }
}

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field > legend, .prep-step h3 { font-weight: 800; font-size: 14px; color: var(--text); padding: 0; margin: 0; }
.field > legend { margin-bottom: 8px; }
.opt { font-weight: 500; color: var(--text-3); font-size: 13px; }
.help { margin: -2px 0 0; color: var(--text-3); font-size: 13.5px; }
.input, .textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; min-height: 46px; font-size: 16px; line-height: 1.45; }
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.input:hover, .textarea:hover { border-color: var(--line-hover); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; min-height: 92px; }
.input-time { width: 120px; font-family: var(--mono); }
.input-date { max-width: 220px; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.err { margin: 0; color: var(--red); font-size: 13.5px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-weight: 700; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.chip span:hover { color: var(--text); }
.chip input:checked + span { background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 0 0 1.5px var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; top: 16px; z-index: 100; transform: translate(-50%, -12px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-toast); width: max-content; max-width: calc(100% - 32px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- pick your name ---------- */
.pick-page { padding-top: 16px; padding-bottom: 64px; }
.pick-title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin: 36px 0 0; }
.pick-list { display: grid; gap: 8px; margin: 18px 0 16px; }
.pick { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 16px 0 12px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-weight: 700; font-size: 16px; text-align: left; transition: transform .12s ease; }
.pick:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pick:active { transform: scale(.99); }
.pick-name { flex: 1; }
.empty-page { padding-top: 72px; padding-bottom: 72px; }
.empty-page h1 { font-size: 28px; letter-spacing: -.03em; margin: 20px 0 8px; }
.empty-page p { color: var(--text-2); max-width: 52ch; }

/* ---------- studio ---------- */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); overflow: hidden; margin-bottom: 64px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main go" "status go" "wave wave"; gap: 6px 12px; padding: 18px; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row:active { background: var(--sunken); }
.row-main { grid-area: main; min-width: 0; }
.row-status { grid-area: status; }
.row-wave { grid-area: wave; width: 100%; height: 30px; margin-top: 10px; display: block; }
.row-go { grid-area: go; align-self: center; color: var(--text-3); }
.row-title { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.025em; }
.row-sub { margin: 0; color: var(--text-3); font-size: 13.5px; }
.row-phase { margin: 0; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.row-phase.action { color: var(--accent-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
@media (min-width: 768px) {
  .row { grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.1fr) minmax(160px, 1.2fr) auto; grid-template-areas: "main status wave go"; align-items: center; gap: 24px; padding: 20px 24px; }
  .row-wave { margin-top: 0; }
}
.empty-card { background: var(--surface); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); padding: 28px; }
.empty-card h2 { margin: 0 0 6px; font-size: 20px; }
.empty-card p { color: var(--text-2); margin: 0 0 16px; }

.rounds { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; max-width: 660px; }
.round-step { width: 100%; text-align: left; display: grid; gap: 1px; padding: 12px 14px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.round-step:hover:not(:disabled) { background: var(--surface-2); }
.round-step.current { box-shadow: inset 0 0 0 1.5px var(--accent); }
.round-step:disabled { opacity: .5; cursor: default; }
.rs-no { font-size: 12px; color: var(--text-3); font-weight: 700; }
.rs-name { font-weight: 800; font-size: 15px; }
.rs-phase { font-size: 13px; color: var(--text-2); }

.studio-grid { display: grid; gap: 20px; padding-top: 20px; padding-bottom: 64px; }
.studio-main, .studio-side { display: grid; gap: 20px; align-content: start; min-width: 0; }
@media (min-width: 960px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  .studio-side { position: sticky; top: calc(var(--player-h) + 16px); }
}
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); padding: 20px; min-width: 0; }
.panel h2 { font-size: 19px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 6px; }
.panel > p { margin: 0 0 8px; color: var(--text-2); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.panel-head h2 { margin: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }

.prep-step { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drop { position: relative; display: grid; gap: 4px; justify-items: start; padding: 22px 20px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: var(--bg); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop:focus-within { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.drop-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.file-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--surface-2); }
.file-name { font-weight: 700; overflow-wrap: anywhere; }
.file-pick { position: relative; margin-left: auto; cursor: pointer; }
.file-pick:focus-within { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.info { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 14px; }
.lyrics-edit { font-family: var(--mono); font-size: 14px; line-height: 1.65; min-height: 300px; }
.prep-start { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.prep-start p { margin: 0; flex: 1; min-width: 200px; }

.meter { height: 6px; border-radius: 6px; background: var(--sunken); overflow: hidden; margin: 14px 0 4px; }
.meter span { display: block; height: 100%; background: var(--accent); transform-origin: left center; transition: transform .4s ease; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 6px; }
.filter { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 13.5px; }
.filter b { margin-left: 4px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.filter[aria-pressed="true"] b { color: inherit; opacity: .6; }
@media (pointer: coarse) { .filter { min-height: 44px; } }
.points { margin-top: 6px; }
.decide { display: flex; gap: 6px; flex-wrap: wrap; }
.dec { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.dec .ic { width: 16px; height: 16px; }
.dec:hover { color: var(--text); background: var(--sunken); }
.dec.ok[aria-pressed="true"] { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green-line); }
.dec.no[aria-pressed="true"] { background: var(--sunken); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.jp.missing .dec[aria-pressed="false"] { box-shadow: inset 0 0 0 1.5px var(--red-line); }
.finish { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.finish-text { margin: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.finish-text strong { color: var(--text); }

.side-panel h2 { font-size: 16px; }
.link-box { margin: 8px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; color: var(--text); }
.side-panel .muted.small { margin: 6px 0 0; }
.member-list { list-style: none; margin: 4px 0 14px; padding: 0; }
.member-list li { display: flex; align-items: center; gap: 10px; min-height: 50px; border-top: 1px solid var(--line); }
.member-list li:first-child { border-top: 0; }
.m-name { font-weight: 700; flex: 1; min-width: 0; }
.badge { font-size: 12px; font-weight: 800; color: var(--accent-strong); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; }
.add-member { display: flex; gap: 8px; margin-bottom: 8px; }
.add-member .input { flex: 1; min-width: 0; }
.side-panel .err { margin-bottom: 10px; }
.side-panel .field { margin-top: 10px; }
.side-foot { padding: 0 4px; }

/* ---------- bundle (contact person) ---------- */
.hint { margin: 16px 0 6px; color: var(--text-3); font-size: 14px; }
.b-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); scroll-margin: 140px; }
.b-main { display: grid; gap: 8px; min-width: 0; transition: opacity .2s ease; }
.b-item.off .b-main { opacity: .42; }
.switch { position: relative; display: inline-flex; width: 48px; height: 44px; align-items: center; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-ui { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line-strong); }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform .18s ease; }
.switch input:checked + .switch-ui { background: var(--accent); box-shadow: none; }
.switch input:checked + .switch-ui::after { transform: translateX(18px); background: var(--on-accent); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.b-text { min-height: 64px; font-size: 15px; }
.b-comments summary { cursor: pointer; color: var(--text-3); font-size: 13.5px; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.b-comments .comments { margin-top: 6px; }
.b-add { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.b-add-row { display: flex; gap: 8px; align-items: center; }
.b-add-row .select { max-width: 220px; }
.add-point { margin: 12px 0 32px; }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--bar-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.actionbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.actionbar-text { margin: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.actionbar-text strong { color: var(--text); }

/* ---------- pressed states and touch targets ---------- */
.seg button:active, .tc:active, .react:active:not(:disabled), .dec:active, .filter:active,
.round-step:active:not(:disabled), button.quote:active, button.line-time:active, .back:active,
.demo-btn:active:not(:disabled), .demo-icon:active, .chip span:active, .link-btn:active, .marker:active { transform: scale(.97); }
.brand:hover .brand-mark { transform: rotate(-4deg); }
.brand .brand-mark { transition: transform .15s ease; }
.b-comments summary:hover { color: var(--text); }
.switch:hover .switch-ui { box-shadow: inset 0 0 0 1px var(--line-hover); }
.demo-note { color: var(--text-3); }
@media (max-width: 767px) { .demo-note { display: none; } }
/* Small controls get an invisible hit area of at least 44px without changing the layout. */
.tc, button.line-time { position: relative; }
.tc::after, button.line-time::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 44px; transform: translateY(-50%); }
.marker::after { content: ""; position: absolute; left: 50%; top: 50%; width: 32px; height: 44px; transform: translate(-50%, -50%); }
@media (pointer: coarse) {
  .seg button, .dec, .link-btn, .demo-select, .demo-btn, .b-comments summary { min-height: 44px; }
  .demo-icon { width: 44px; height: 44px; }
}

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

/* ---------- setting line times by tapping along ---------- */
.tap-launch { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tap-launch p { margin: 0; }
.tap { display: grid; gap: 14px; outline: none; }
.tap-scroll { position: relative; max-height: clamp(240px, 46vh, 440px); overflow: auto; overscroll-behavior: contain; }
.tap-follow { list-style: none; margin: 0; padding: 0; }
.tap-follow li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 10px; }
.tap-follow li.gap { margin-top: 12px; }
.tap-follow .tap-time { font-size: 12px; color: var(--text-3); }
.tap-say { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--text-3); overflow-wrap: anywhere; }
.tap-follow li.done .tap-say { color: var(--text-2); }
.tap-follow li.now { background: var(--surface-2); }
.tap-follow li.now .tap-say, .tap-follow li.next .tap-say { color: var(--text); }
.tap-follow li.next { background: var(--note-soft); box-shadow: inset 3px 0 0 var(--note); }
.tap-follow li.next .tap-time { font-family: var(--font); font-weight: 800; color: var(--note); }
.tap-now { width: 100%; min-height: 76px; font-size: 22px; border-radius: 16px; }
.tap-now .ic { width: 24px; height: 24px; }
.tap-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tap-clock { margin: 0 auto; font-family: var(--mono); font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tap-help { margin: 0; color: var(--text-3); font-size: 13px; }
.tap-list { list-style: none; margin: 0; padding: 0; }
.tap-item { display: grid; grid-template-columns: 58px auto auto auto minmax(0, 1fr); align-items: center; gap: 2px; padding: 2px 0; border-top: 1px solid var(--line); }
.tap-item:first-child { border-top: 0; }
.tap-time { font-family: var(--mono); font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.tap-item.missing .tap-time { color: var(--text-3); }
.tap-step { font-size: 20px; font-weight: 700; }
.tap-text { min-height: 40px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.tap-text:hover { background: var(--surface-2); }
.tap-text:active { transform: scale(.99); }
.tap-item.now .tap-text { color: var(--accent-strong); }
@media (pointer: coarse) { .tap-text { min-height: 44px; } }
