/* Inter лежит рядом с приложением: интерфейс выглядит одинаково и без интернета */
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #000000;
  --bg: #101012;
  --dock: #151517;
  --surface: #1c1c1f;
  --surface-2: #252529;
  --surface-3: #303036;
  --glass: rgba(255, 255, 255, .06);
  --glass-2: rgba(255, 255, 255, .12);
  --border: #ffffff1a;
  --border-2: #ffffff26;
  --text: #f7f4ef;
  --muted: #a3a3a3;
  --faint: #85858e;
  --ink: #101012; /* тёмный текст на ярких заливках */
  --accent: #ff6b4a;
  --accent-soft: rgba(255, 107, 74, .16);
  --accent-text: #ff9d85;
  --aura: linear-gradient(100deg, #d9408f 0%, #f0516a 48%, #f98a3c 100%);
  --line-active: rgba(255, 255, 255, .07);
  --note: #b69cff;
  --note-soft: rgba(182, 156, 255, .15);
  --sky: #62c4ff; /* значок окна «Звук» */
  --ok: #4ade80;
  --err: #ff7b7b;
  --err-soft: rgba(255, 99, 99, .14);
  --contour: #ff6b4a;
  --hit: #4ade80;
  --close: #fbbf24;
  --miss: #ff6b6b;
  --shadow: 0 8px 32px rgba(0, 0, 0, .4);
  --radius: 16px;
  --side: 216px;
  --key-white: #dcd8d1;
  --key-white-ink: #1c1c1f;
  --key-black: #0b0b0d;
  --key-black-ink: #c2c2c1;
  --roll-white-row: #1e1e21;
  --roll-black-row: #161618;
  --contour-line: rgba(247, 244, 239, .5);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--surface-3) transparent; }
html, body { margin: 0; }
body {
  background: var(--canvas);
  color: var(--text);
  font: 15px/1.45 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(255, 107, 74, .4); }
a { color: var(--accent-text); }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- каркас: меню и основная панель на чёрном фоне ---------- */
.sidebar {
  position: fixed; z-index: 20; left: 8px; top: 8px; bottom: 8px; width: var(--side);
  display: flex; flex-direction: column; gap: 20px; padding: 20px 12px;
  background: var(--bg); border-radius: var(--radius);
}
.brand {
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  font-weight: 600; font-size: 20px; letter-spacing: -.02em; color: var(--text); text-decoration: none;
}
.brand::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--aura); }
/* версия у логотипа — серая капсула, как у Suno (v5, v5.5) */
.brand .ver {
  margin-left: -2px; padding: 2px 7px; border-radius: 999px; background: var(--glass-2);
  color: var(--muted); font-size: 11px; font-weight: 500; line-height: 16px; letter-spacing: 0;
}
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.sidebar nav a svg { width: 18px; height: 18px; flex: none; }
.sidebar nav a:hover { background: var(--glass); color: var(--text); }
.sidebar nav a.active { background: var(--surface-2); color: var(--text); }

/* чёрные полоски сверху и снизу: текст при прокрутке не выглядывает из-под панелей */
body::before, body::after { content: ""; position: fixed; z-index: 19; left: 0; right: 0; height: 8px; background: var(--canvas); pointer-events: none; }
body::before { top: 0; }
body::after { bottom: 0; }

main {
  position: relative; isolation: isolate; overflow: clip;
  margin: 8px 8px 8px calc(var(--side) + 16px); min-height: calc(100vh - 16px);
  padding: 28px max(32px, calc((100vw - var(--side) - 24px - 1100px) / 2)) 48px;
  background: var(--bg); border-radius: var(--radius);
}
h1 { font-size: 32px; font-weight: 500; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 6px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0; }

.card {
  background: var(--surface); border-radius: var(--radius); padding: 20px;
}
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); flex: 1 1 220px; }
input[type=text], input[type=url], input[type=email], input[type=password], select, textarea {
  background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 10px 14px;
  color: var(--text); min-width: 0;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { width: 100%; min-height: 160px; resize: vertical; font-family: var(--mono); font-size: 13px; border-radius: 14px; }
select {
  appearance: none; -webkit-appearance: none; padding: 8px 32px 8px 14px; border-radius: 999px;
  background: var(--glass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 12px;
  cursor: pointer;
}
select:hover { background-color: var(--glass-2); }
select option { background: var(--surface); color: var(--text); }
input[type=file] { color: var(--muted); font-size: 13px; }
input[type=file]::file-selector-button {
  margin-right: 10px; padding: 7px 14px; border: 0; border-radius: 999px; font: inherit; font-weight: 500;
  background: var(--glass-2); color: var(--text); cursor: pointer;
}
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; width: 16px; height: 16px; margin: 0; border-radius: 5px;
  border: 1px solid var(--border-2); background: var(--glass); display: inline-grid; place-items: center; cursor: pointer;
}
input[type=checkbox]:checked { background: var(--text); border-color: var(--text); }
input[type=checkbox]:checked::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px; transform: rotate(-45deg);
  border: solid var(--ink); border-width: 0 0 2px 2px;
}
input[type=range] { accent-color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--border-2); background-color: var(--surface-3); }
button:focus-visible, a:focus-visible, summary:focus-visible, input[type=checkbox]:focus-visible, select:focus-visible {
  outline: 2px solid var(--text); outline-offset: 2px;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 0;
  background: var(--glass); color: var(--text); cursor: pointer; font-size: 14px; font-weight: 500; text-decoration: none;
  white-space: nowrap; transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:hover { background: var(--glass-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--text); color: var(--ink); }
.btn.primary:hover { background: #ffffff; }
.btn.aura { background: var(--aura); color: #ffffff; font-weight: 600; }
.btn.aura:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-soft); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.icon { padding: 0; width: 40px; }
.btn.small.icon { width: 32px; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--glass); color: var(--text); }
.btn.ghost.on { background: color-mix(in srgb, var(--kc, var(--accent)) 22%, transparent); color: var(--text); font-weight: 600; }
.btn svg { width: 14px; height: 14px; flex: none; }

/* ---------- главная: аура, поле ввода, карточки песен ---------- */
.hero { padding: 48px 0 40px; text-align: center; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; inset: 0 0 auto 0; height: 620px; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 35%, transparent 96%); mask-image: linear-gradient(#000 35%, transparent 96%);
}
.hero::before {
  background:
    radial-gradient(34% 52% at 70% 10%, rgba(164, 44, 170, .8), transparent 72%),
    radial-gradient(48% 66% at 38% 0%, rgba(206, 66, 36, .95), transparent 74%),
    radial-gradient(34% 56% at 6% 16%, rgba(160, 126, 30, .8), transparent 72%),
    radial-gradient(34% 56% at 98% 14%, rgba(140, 116, 30, .7), transparent 72%);
  transform-origin: 50% 0;
  animation: aura-drift 32s ease-in-out infinite alternate;
}
.hero::after { background: var(--grain); opacity: .28; mix-blend-mode: overlay; }
@keyframes aura-drift {
  from { transform: translateX(-3%) scale(1.04); }
  to { transform: translateX(3%) scale(1.14); }
}
.hero h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.03em; color: #ffffff; margin: 0 0 14px; }
.hero .sub { max-width: 580px; margin: 0 auto 28px; font-size: 16px; color: rgba(255, 255, 255, .78); text-wrap: balance; }

.prompt {
  position: relative; max-width: 720px; margin: 0 auto; padding: 12px; text-align: left;
  background: rgba(16, 16, 18, .62); border: 1px solid var(--border); border-radius: 20px;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); transition: border-color .15s ease;
}
.prompt:focus-within { border-color: var(--border-2); }
.free-used { justify-content: center; margin: 4px 0 28px; }
.drop {
  position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding: 16px 18px;
  border: 1px dashed var(--border-2); border-radius: 12px; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.drop:hover, .drop:focus-within { background: var(--glass); }
.drop.over { background: var(--accent-soft); border-color: var(--accent); }
.drop.has-file { border-style: solid; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.drop-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--glass); color: var(--text); }
.drop-icon svg { width: 20px; height: 20px; }
.drop.over .drop-icon { background: var(--accent); color: var(--ink); }
.drop-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drop-text b { font-size: 16px; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.drop-text small { font-size: 13px; color: var(--muted); }
.prompt-fields { display: flex; gap: 4px; }
.prompt-field {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px;
  border-radius: 12px; font-size: 12px; color: var(--muted); cursor: text; transition: background-color .15s ease;
}
.prompt-field:focus-within { background: var(--glass); color: var(--text); }
.prompt-field input[type=text], .prompt-field input[type=text]:focus {
  width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 18px; line-height: 28px; outline: none;
}
details.more { margin-top: 8px; }
details.more summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 16px 6px 12px;
  max-width: calc(100% - 200px); border-radius: 20px; background: var(--glass); font-size: 14px; cursor: pointer;
  transition: background-color .15s ease;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; flex: none; width: 18px; font-size: 20px; line-height: 1; text-align: center; color: var(--muted); }
details.more[open] summary::before { content: "−"; }
details.more summary:hover { background: var(--glass-2); }
.prompt-more { padding: 16px 4px 60px; }
.prompt-go { position: absolute; right: 12px; bottom: 12px; }

.section-title { margin: 8px 0 16px; }
.songs { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 28px 16px; }
.songs > .empty { grid-column: 1 / -1; }
.song-card { position: relative; min-width: 0; }
.song-card a.open { display: block; color: inherit; text-decoration: none; }
.song-card .t { margin-top: 10px; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-card .a { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-card a.open:hover .t { text-decoration: underline; text-underline-offset: 3px; }

/* обложка собирается из цветов песни (coverStyle в app.js) */
.cover {
  position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 12px;
  background:
    radial-gradient(78% 72% at var(--x, 30%) var(--y, 25%), var(--c1, #ff5a36), transparent 74%),
    radial-gradient(72% 82% at calc(100% - var(--x, 30%)) calc(100% - var(--y, 25%)), var(--c2, #c7338f), transparent 76%),
    var(--c3, #1d0b1f);
}
.cover::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .32; mix-blend-mode: overlay; pointer-events: none; }
.song-card a.open:hover .cover { filter: brightness(1.12); }
.cover-stats { position: absolute; z-index: 1; left: 8px; bottom: 8px; display: flex; gap: 4px; }
.cover-stats span {
  padding: 3px 8px; border-radius: 7px; background: rgba(0, 0, 0, .42); color: #ffffff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 12px; font-variant-numeric: tabular-nums;
}
.card-del {
  position: absolute; z-index: 2; top: 8px; right: 8px; background: rgba(0, 0, 0, .46); color: #ffffff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .15s ease, background-color .15s ease;
}
.song-card:hover .card-del, .card-del:focus-visible { opacity: 1; }
.card-del:hover { background: var(--miss); color: var(--ink); }
@media (hover: none) { .card-del { opacity: 1; } }

.song-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border-radius: 14px; padding: 10px 14px 10px 10px; transition: background-color .15s ease;
}
.song-row:hover { background: var(--surface-2); }
.song-row .t { font-weight: 500; }
.song-row .a { color: var(--muted); font-size: 14px; }
.song-row a.open { display: flex; align-items: center; gap: 14px; min-width: 0; color: inherit; text-decoration: none; }
.cover.thumb { flex: none; width: 56px; border-radius: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--glass); color: var(--muted); text-decoration: none;
}
button.chip { border: 0; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
a.chip:hover, button.chip:hover { background: var(--glass-2); color: var(--text); }
.chip.fit { background: var(--glass-2); color: var(--text); }
.chip.fit:hover { background: var(--surface-3); }
.chip.off { color: var(--close); }
.chip.ok { color: var(--ok); }
.chip.err { color: var(--err); background: var(--err-soft); }
.chip.note { color: var(--note); background: var(--note-soft); }

.progress { height: 4px; background: var(--glass-2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--aura); border-radius: 99px; transition: width .4s ease; }
.progress.indeterminate > div { animation: slide 1.4s ease-in-out infinite; width: 30%; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }

.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- страница песни ---------- */
.song-glow, .song-glow::after {
  position: absolute; z-index: -1; inset: 0 0 auto 0; height: 420px; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 20%, transparent); mask-image: linear-gradient(#000 20%, transparent);
}
.song-glow {
  background:
    radial-gradient(50% 90% at var(--x, 30%) 0%, color-mix(in srgb, var(--c1, #ff5a36) 62%, transparent), transparent 76%),
    radial-gradient(46% 80% at calc(100% - var(--x, 30%)) 0%, color-mix(in srgb, var(--c2, #c7338f) 50%, transparent), transparent 76%);
}
.song-glow::after { content: ""; background: var(--grain); opacity: .28; mix-blend-mode: overlay; }
.song-head { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; margin: 14px 0 22px; }
.song-head .cover { flex: none; width: 136px; box-shadow: var(--shadow); }
.song-head .info { flex: 1 1 320px; min-width: 0; }
.song-head h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.06; letter-spacing: -.03em; color: #ffffff; margin-bottom: 4px; }
.song-head .sub { font-size: 16px; color: rgba(255, 255, 255, .78); }
.song-head .actions { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--text); }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--glass); }
.seg button {
  border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer; color: var(--muted);
  font-size: 13px; font-weight: 500; white-space: nowrap; transition: background-color .15s ease, color .15s ease;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--text); color: var(--ink); }

/* цвета частей песни */
.k-verse { --kc: #7aa7ff; }
.k-chorus { --kc: #ff7a4d; }
.k-prechorus { --kc: #f2c14e; }
.k-postchorus { --kc: #ff6fa8; }
.k-bridge { --kc: #a98bff; }
.k-intro, .k-outro { --kc: #3fd4b4; }
.k-refrain { --kc: #d9a26b; }
.k-part { --kc: #9a9aa3; }

.parts { display: grid; gap: 12px; }
.part {
  border-radius: var(--radius); padding: 6px 0 12px;
  background: radial-gradient(560px 180px at 0 0, color-mix(in srgb, var(--kc) 15%, transparent), transparent 74%), var(--surface);
}
.part.k-chorus { background: radial-gradient(720px 240px at 0 0, color-mix(in srgb, var(--kc) 26%, transparent), transparent 76%), var(--surface); }
.part.looping { outline: 2px solid var(--kc); outline-offset: 2px; }
.part-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px 6px; flex-wrap: wrap; }
.part-tag {
  background: color-mix(in srgb, var(--kc) 24%, transparent); color: color-mix(in srgb, var(--kc) 62%, #ffffff);
  font-weight: 600; font-size: 13px; padding: 3px 12px; border-radius: 99px;
}
.part-time { color: var(--muted); font-size: 12px; font-family: var(--mono); }

.line {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 6px; padding: 8px 60px 8px 8px;
  border-radius: 12px; margin: 0 6px; transition: background-color .15s ease;
}
.line.stanza { margin-top: 14px; }
.line.active { background: var(--line-active); }
.line.in-loop { box-shadow: inset 3px 0 0 var(--accent); }
.line.selected { background: var(--note-soft); }
.line .gutter { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 2px; }
.line .num {
  border: 0; background: transparent; padding: 1px 7px; border-radius: 6px; cursor: pointer;
  font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums;
}
.line .num:hover { background: var(--glass-2); color: var(--text); }
.line.selected .num { background: var(--note); color: var(--ink); }
.line .play {
  width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--glass);
  cursor: pointer; display: grid; place-items: center; color: var(--text); padding: 0;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.line .play:hover { background: var(--text); color: var(--ink); }
.line .play:active { transform: scale(.92); }
.line .play svg { width: 12px; height: 12px; }
.words { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-start; }
.word { display: inline-flex; gap: 1px; }
.syl {
  display: inline-flex; flex-direction: column; align-items: center; cursor: pointer;
  padding: 2px 3px 3px; border-radius: 8px; min-width: 2.4em; position: relative;
}
.syl:hover { background: var(--glass-2); }
.syl .tx { font-size: 19px; line-height: 1.3; white-space: pre; }
.syl.cont .tx::after { content: "‑"; color: var(--faint); position: absolute; right: -4px; }
.syl .nt {
  margin-top: 3px; padding: 1px 6px; border-radius: 6px; background: var(--nc); color: var(--nt);
  font: 700 12.5px/1.4 var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.syl .nt.none { background: transparent; color: var(--faint); font-weight: 400; }
.syl .mel { font: 10px/1.3 var(--mono); color: var(--muted); margin-top: 2px; white-space: nowrap; }
.syl .mel.vib { font-family: inherit; color: var(--note); }
.syl.now { background: var(--accent-soft); }
.syl.now .tx { color: var(--accent-text); font-weight: 600; }
.syl.now .nt { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--nc); }
.syl.past .tx { color: var(--muted); }
.syl.low .nt { opacity: .55; }

/* карта цветов нот */
.legend {
  display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px;
  padding: 12px 16px; background: var(--surface); border-radius: var(--radius);
}
.legend-title { font-weight: 600; font-size: 14px; }
.legend-hint { font-size: 12px; color: var(--muted); max-width: 210px; }
.legend-keys { --w: 50px; --gap: 4px; --bw: 42px; position: relative; display: flex; gap: var(--gap); padding-top: 22px; }
.lk { border: 0; cursor: pointer; background: var(--nc); color: var(--nt); font-weight: 700; padding: 0; transition: transform .1s ease, filter .1s ease; }
.lk:hover { filter: brightness(1.1); }
.lk:active { transform: translateY(2px); }
.lk.white {
  width: var(--w); height: 54px; border-radius: 4px 4px 10px 10px; font-size: 14px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18);
}
.lk.black {
  position: absolute; top: 0; z-index: 1; width: var(--bw); height: 30px; border-radius: 7px; font-size: 11px;
  left: calc((var(--i) + 1) * (var(--w) + var(--gap)) - var(--gap) / 2 - var(--bw) / 2);
  border: 2px solid var(--surface); box-shadow: 0 2px 5px rgba(0, 0, 0, .4);
}

/* счётчик: сколько раз часть прозвучала целиком */
.part-count {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 1px 11px; border-radius: 99px;
  background: var(--glass); color: var(--text); font-size: 13px;
}
.part-count b { font-size: 16px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.part-count.zero { color: var(--muted); }
.part-count.bump { animation: count-bump .7s ease; }
@keyframes count-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.3); background: var(--kc); color: var(--ink); }
  100% { transform: scale(1); }
}
/* значок на углу кнопки ▶ — не занимает места, строка не сдвигается */
.line .gutter { position: relative; }
.line-count {
  position: absolute; top: -5px; left: calc(50% + 6px); z-index: 1; pointer-events: none;
  font: 700 10px/16px var(--mono); color: var(--ink); background: var(--accent); border-radius: 99px; padding: 0 5px;
  box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.line-count:empty { display: none; }
.line-count.bump { animation: count-bump .7s ease; --kc: var(--accent); }
.map-count { margin-left: 4px; font-size: 10px; color: #ffffff; background: rgba(0, 0, 0, .55); padding: 0 4px; border-radius: 4px; flex: none; }
.map-count:empty { display: none; }

/* редактор ноты */
.syl .nt { cursor: pointer; transition: transform .1s ease; }
.syl .nt:hover { transform: scale(1.08); }
.syl .nt.doubt { outline: 2px dashed var(--muted); outline-offset: 2px; }
.syl .nt.doubt::after { content: "?"; font-size: 10px; margin-left: 2px; opacity: .8; }
.syl .nt.oct::after { content: "↓"; font-size: 10px; margin-left: 2px; }
.syl .nt.edited::after { content: "✓"; font-size: 10px; margin-left: 2px; }
.note-pop {
  position: absolute; z-index: 45; width: 280px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 16px 48px rgba(0, 0, 0, .6); padding: 14px; display: grid; gap: 8px;
}
.np-head { font-size: 12px; color: var(--muted); text-align: center; }
.np-main { display: flex; align-items: center; justify-content: center; gap: 10px; }
.np-note {
  font: 800 26px/1 var(--mono); padding: 8px 14px; border-radius: 12px; background: var(--nc); color: var(--nt);
  min-width: 96px; text-align: center;
}
.np-sub { text-align: center; font-size: 12px; color: var(--muted); }
.np-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.np-hint { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

.frags {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
  padding: 12px 16px; background: var(--surface); border-radius: var(--radius);
}
.frags-title { font-weight: 600; font-size: 14px; margin-right: 4px; }
.frags .sub { font-size: 13px; }
.frag { display: inline-flex; border-radius: 99px; overflow: hidden; background: var(--glass); }
.frag button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; cursor: pointer; padding: 5px 12px; font-size: 13px; color: var(--text); }
.frag button svg { width: 13px; height: 13px; }
.frag button:hover { background: var(--glass-2); }
.frag small { color: var(--muted); font-family: var(--mono); margin-left: 4px; }
.frag .frag-x { color: var(--muted); padding: 5px 10px; }

.status-card { display: flex; gap: 16px; align-items: center; }
.status-card .grow { min-width: 0; }
.error-box { background: var(--err-soft); color: var(--err); border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; }

/* ---------- плеер ---------- */
.dock {
  position: fixed; left: calc(var(--side) + 16px); right: 8px; bottom: 8px; z-index: 30;
  background: color-mix(in srgb, var(--dock) 92%, transparent); border: 1px solid var(--border); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 -8px 40px rgba(0, 0, 0, .5);
}
.dock-inner { max-width: 1240px; margin: 0 auto; padding: 10px 14px 12px; }
.selbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px;
  background: var(--note-soft); border-radius: 12px; padding: 6px 8px 6px 14px; margin-bottom: 8px;
}
.selbar[hidden] { display: none; }
.selbar .hint { color: var(--muted); }
.stage { display: grid; grid-template-columns: 1fr 132px; gap: 8px; align-items: stretch; }
.roll-wrap { position: relative; min-width: 0; }
.roll { width: 100%; height: 176px; display: block; border-radius: 12px; background: var(--surface); cursor: pointer; transition: height .28s cubic-bezier(.22, .8, .24, 1); }
/* клавиатура снизу: нотам нужно место, чтобы подлететь */
/* слова теперь в строке под нотами, поэтому полю нот хватает чуть меньшей высоты */
.dock.fall .roll { height: clamp(190px, 34vh, 380px); background: var(--canvas); }
/* вид мелодии переключается прямо на ней, в правом верхнем углу */
.roll-view {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.roll-view svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .roll { transition: none; } }
.readout {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  background: var(--surface); border-radius: 12px; padding: 8px;
}
.ro-label { font-size: 12px; color: var(--muted); }
.ro-note {
  font: 800 30px/1.1 var(--mono); padding: 6px 12px; border-radius: 12px; background: var(--nc); color: var(--nt);
  min-width: 88px;
}
.ro-note.empty { background: transparent; color: var(--faint); }
.ro-sub { font-size: 12px; color: var(--muted); min-height: 1.4em; }
.ro-next { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ro-pill { font: 700 12px/1.4 var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--nc); color: var(--nt); }
.phase {
  position: absolute; top: 8px; right: 86px; font-weight: 600; font-size: 13px; padding: 4px 12px; border-radius: 99px;
  background: var(--note); color: var(--ink);
}
.phase.sing { background: var(--accent); }
.transport { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.transport .time { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 96px; text-align: center; }
.transport > .btn.icon { background: transparent; color: var(--muted); }
.transport > .btn.icon:hover { background: var(--glass); color: var(--text); }
.map {
  position: relative; flex: 1 1 auto; height: 32px; background: var(--glass); border-radius: 10px;
  cursor: pointer; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
}
.map-part {
  position: absolute; top: 3px; bottom: 3px; background: var(--kc); opacity: .8; border-radius: 6px;
  color: var(--ink); font-size: 11px; font-weight: 600; padding: 0 5px; display: flex; align-items: center; overflow: hidden;
  white-space: nowrap; border-right: 2px solid var(--dock); transition: opacity .15s ease;
}
.map-part:hover { opacity: 1; }
.map-part span { overflow: hidden; text-overflow: ellipsis; }
.map-loop {
  position: absolute; top: 0; bottom: 0; border: 2px solid var(--text); border-radius: 10px; pointer-events: none;
  background: rgba(255, 255, 255, .18);
}
.map-loop[hidden] { display: none; }
.map-head { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: #ffffff; box-shadow: 0 0 6px rgba(0, 0, 0, .7); pointer-events: none; border-radius: 2px; }
.play-main {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--text); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; flex: none; transition: background-color .15s ease, transform .1s ease;
}
.play-main:hover { background: #ffffff; }
.play-main:active { transform: scale(.94); }
.play-main svg { width: 18px; height: 18px; }
/* строка слов под нотами, как в караоке: звучащая строка целыми словами и мельче — следующая */
.lyric-line {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: center;
  margin-top: 8px; padding: 10px 16px 12px; background: var(--surface); border-radius: 12px;
}
.lyric-line:empty { display: none; }
.ll-meta { display: grid; gap: 2px; min-width: 0; font-size: 12px; color: var(--muted); }
.ll-meta b { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-meta b i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--kc); }
.ll-text { min-width: 0; }
.ll-now { font-size: 26px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; padding-bottom: 6px; white-space: nowrap; overflow: hidden; }
.ll-now.wrap { white-space: normal; }
.ll-now .w { white-space: nowrap; }
/* черта под слогом — цвет его ноты; у звучащего слога она заполняется, пока он поётся */
.ll-now .s { position: relative; transition: opacity .2s ease; }
.ll-now .s::after, .ll-now .s.now::before {
  content: ""; position: absolute; left: 1px; right: 1px; bottom: -4px; height: 3px; border-radius: 2px; background: var(--c);
}
.ll-now .s::after { opacity: .5; }
.ll-now .s.past { opacity: .38; }
.ll-now .s.now { color: #ffffff; text-shadow: 0 0 22px color-mix(in srgb, var(--c) 70%, transparent); }
.ll-now .s.now::after { opacity: .4; height: 4px; bottom: -5px; }
.ll-now .s.now::before { z-index: 1; height: 4px; bottom: -5px; transform-origin: left; transform: scaleX(var(--p, 0)); }
.ll-now.hide-words .s .rest { opacity: 0; }
.ll-now.hide-words .s.now .rest, .ll-now.hide-words .s.past .rest { opacity: 1; }
.ll-next { margin-top: 6px; font-size: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-next span { margin-right: 4px; font-size: 12px; color: var(--faint); }
@media (prefers-reduced-motion: reduce) { .ll-now .s { transition: none; } }

/* нижний ряд: окна «Повтор», «Звук», «Учить»; в заголовке окна видно, что в нём включено */
.wins { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; margin-top: 10px; font-size: 13px; }
.win { --gc: var(--text); position: relative; flex: 1 1 auto; min-width: 0; }
/* окно не уже своих кнопок: если окна не влезают в ряд, последнее переходит ниже */
.dock:not(.folded) .win { min-width: min-content; }
.win.g-loop { --gc: var(--accent); }
.win.g-sound { --gc: var(--sky); }
.win.g-learn { --gc: var(--note); }
.win-body { height: 100%; display: grid; gap: 6px; align-content: start; padding: 8px 8px 10px; background: var(--surface); border-radius: 14px; }
.win-head { display: flex; align-items: center; gap: 7px; min-height: 26px; font-size: 13px; font-weight: 600; }
.win .gi { display: inline-grid; place-items: center; color: var(--gc); }
.win .gi svg { width: 15px; height: 15px; }
.win-head .st { flex: 1 1 0; width: 0; min-width: 0; text-align: right; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-head .st.active { color: var(--text); }
.win-head .loop-info { margin-left: 0; color: var(--text); }
.win-head .loop-info:empty { display: block; }
.win-head .loop-info:empty::before { content: "выкл"; color: var(--muted); }
.dock .win-head .btn { height: 26px; padding: 0 8px; font-size: 12px; }
.dock .win-head .btn.icon { width: 28px; padding: 0; }
.dock .win-head .btn svg { width: 14px; height: 14px; }
.win-row { display: flex; align-items: center; gap: 4px; }
.win-row .hint { flex: 1 1 0; width: 0; margin-left: 4px; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-chip { display: none; }
.transport > .win-fold { flex: none; }
.win-fold svg { transition: transform .2s ease; }
.dock.folded .win-fold svg { transform: rotate(180deg); }
/* сложенные окна: окошки с тем, что включено; нажатие открывает окно над пультом */
.dock.folded .wins { margin-top: 8px; }
.dock.folded .win { flex: 0 1 auto; }
.dock.folded .win-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; max-width: 100%; padding: 0 12px 0 10px;
  border: 0; border-radius: 999px; background: var(--glass); color: var(--text); cursor: pointer;
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: background-color .15s ease;
}
.dock.folded .win-chip:hover, .dock.folded .win.open .win-chip { background: var(--glass-2); }
.win-chip .sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--muted); }
.win-chip .sum.active { color: var(--text); }
.win-chip .chev { flex: none; width: 6px; height: 6px; margin: 3px 2px 0; border: solid var(--muted); border-width: 1.5px 0 0 1.5px; transform: rotate(45deg); }
.dock.folded .win-body { display: none; }
.dock.folded .win.open .win-body {
  display: grid; position: absolute; z-index: 10; left: 0; bottom: calc(100% + 10px); height: auto; min-width: 320px; padding: 12px;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: 0 16px 48px rgba(0, 0, 0, .65);
}
.dock.folded .win.open .win-body .seg { background: var(--glass-2); }
/* выпадающий список с подписью внутри: «Темп 100%» читается как одна вещь */
.pick {
  display: inline-flex; align-items: center; height: 34px; padding-left: 12px; border-radius: 999px;
  background: var(--glass); color: var(--muted); font-size: 13px; white-space: nowrap; cursor: pointer; transition: background-color .15s ease;
}
.pick:hover { background: var(--glass-2); }
.pick > span { margin-right: 6px; }
.dock .pick select { height: 34px; padding: 0 24px 0 0; border: 0; background-color: transparent; background-position: right 9px center; color: var(--text); font-size: 13px; font-weight: 600; }
.dock .pick select:focus { background-color: transparent; }
.pick.busy > span { color: var(--accent-text); font-weight: 600; }
.joined > .pick:first-child { border-radius: 999px 8px 8px 999px; }
.dock .seg { padding: 2px; }
.dock .toggle, .dock .btn.icon, .dock select { height: 34px; }
.dock .seg button { height: 30px; padding: 0 9px; }
.dock .toggle { padding: 0 12px; }
.dock .btn:not(.small) { height: 34px; padding: 0 12px; font-size: 13px; }
.dock .btn.icon { padding: 0; width: 34px; }
.dock .btn svg, .dock .toggle svg { width: 15px; height: 15px; }
.seg.ab button { font-family: var(--mono); font-weight: 700; min-width: 34px; padding: 0 10px; }
.seg.ab button.on { background: var(--accent); color: var(--ink); }
.loop-info { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; margin-left: 4px; }
.loop-info:empty { display: none; }
.vol-wrap { position: relative; }
.vol-pop {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 5;
  display: grid; gap: 10px; padding: 12px 14px; width: 220px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 36px rgba(0, 0, 0, .6);
}
.vol-pop[hidden] { display: none; }
.vol-pop label { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; color: var(--muted); }
/* верхний ряд: справа главные действия — петь и записывать */
.sing-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.joined { display: inline-flex; gap: 2px; }
.joined > :first-child { border-radius: 999px 8px 8px 999px; }
.joined > :last-child { border-radius: 8px 999px 999px 8px; }
.sing-actions .toggle { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; height: 36px; font-weight: 500; color: var(--text); }
.sing-actions .btn.icon { height: 36px; width: 38px; }
.toggle.rec { color: var(--miss); }
.sing-actions .toggle.rec { color: var(--miss); }
.toggle .ic { display: inline-grid; place-items: center; }
.toggle .ic svg { display: block; }
.toggle {
  border: 0; background: var(--glass); padding: 0 14px; border-radius: 999px; cursor: pointer; color: var(--text); font-size: 13px; font-weight: 500;
  white-space: nowrap; transition: background-color .15s ease, color .15s ease;
}
.toggle:hover { background: var(--glass-2); }
.toggle.on { background: var(--text); color: var(--ink); }
.kbd { font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* ---------- модальные окна, тосты ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .62); display: grid; place-items: center; padding: 16px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal .card { width: min(820px, 100%); max-height: 90vh; overflow: auto; border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 24px 72px rgba(0, 0, 0, .7); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60;
  background: var(--text); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-weight: 500; box-shadow: var(--shadow);
}
.toast[hidden] { display: none; }
body.has-dock .toast { bottom: 340px; }

.book-list { display: grid; gap: 8px; }
.book-song { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.book-song a { color: var(--text); text-decoration: none; }
.book-song a:hover { text-decoration: underline; text-underline-offset: 3px; }
.book-song .idx { width: 24px; color: var(--faint); font-variant-numeric: tabular-nums; }
.check-list { display: grid; gap: 4px; max-height: 340px; overflow: auto; }
.check-list label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.check-list label:hover { background: var(--glass); }

/* ---------- пение с микрофоном ---------- */
.line-score {
  position: absolute; right: 10px; top: 10px; font: 700 12px/20px var(--mono); padding: 0 7px; border-radius: 99px;
  color: var(--ink); background: var(--faint); font-variant-numeric: tabular-nums;
}
.line-score:empty { display: none; }
.line-score.good { background: var(--hit); }
.line-score.mid { background: var(--close); }
.line-score.bad { background: var(--miss); }
.line-score.bump { animation: count-bump .7s ease; --kc: var(--hit); }

.syl.sing-hit .tx { color: var(--hit); }
.syl.sing-hit .nt { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--hit); }
.syl.sing-close .tx { color: var(--close); }
.syl.sing-close .nt { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--close); }
.syl.sing-miss .tx { color: var(--miss); }
.syl.sing-miss .nt { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--miss); }
.syl.sing-silent .tx { opacity: .45; }

.toggle.mic { position: relative; overflow: hidden; }
.toggle.mic .lvl {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--hit);
  transform: scaleX(0); transform-origin: left; transition: transform .06s linear;
}
.toggle.mic.on, .sing-actions .toggle.mic.on { background: color-mix(in srgb, var(--hit) 22%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px var(--hit); }
.toggle.rec.on, .sing-actions .toggle.rec.on, .phase.rec { background: var(--miss); color: var(--ink); animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: .65; } }

.readout.tuning { gap: 5px; }
.tn-scale { position: relative; width: 100%; height: 14px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.tn-zone {
  position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  background: color-mix(in srgb, var(--hit) 30%, transparent);
}
.tn-mid { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--hit); }
.tn-needle {
  position: absolute; top: 1px; bottom: 1px; width: 6px; margin-left: -3px; border-radius: 3px; opacity: 0;
  transition: left .05s linear;
}
.tn-needle.ok { background: var(--hit); }
.tn-needle.off { background: var(--miss); }
.tn-you { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tn-you b { color: var(--text); font-family: var(--mono); }
.tn-arrow { font-weight: 700; font-size: 15px; min-height: 1.3em; }
.tn-arrow.ok { color: var(--hit); }
.tn-arrow.up, .tn-arrow.down { color: var(--miss); }

.sing-pop { width: 330px; text-align: left; }
.sp-row { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.sp-row .seg button { height: 28px; padding: 0 9px; font-size: 12px; }
.sp-row input[type=range] { flex: 1; }

/* ---------- дубли ---------- */
.takes { align-items: flex-start; }
.take-list { display: grid; gap: 6px; width: 100%; }
.take {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px;
  background: var(--glass);
}
.take.playing { box-shadow: inset 0 0 0 1px var(--accent); }
.take-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.take-info b { font-size: 14px; font-weight: 500; }
.take-info span { font-size: 12px; color: var(--muted); }
.take .star.on { color: var(--close); }
.takebar { background: var(--accent-soft); }
.chip.score.good, .score.good { color: var(--hit); }
.chip.score.mid, .score.mid { color: var(--close); }
.chip.score.bad, .score.bad { color: var(--miss); }

/* ---------- журнал занятий ---------- */
.hist-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.hc { background: var(--surface); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.hc span { font-size: 12px; color: var(--muted); }
.hc b { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.hist-h { font-size: 18px; font-weight: 600; margin: 28px 0 10px; }
.hist-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 6px 0 0; border-bottom: 1px solid var(--border); }
.hc-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.hc-col i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(0deg, #d9408f, #f98a3c); min-height: 0; }
.hc-col.today i { background: var(--note); }
.hc-col span { position: absolute; bottom: -18px; font-size: 10px; color: var(--faint); }
.hc-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 22px; }
.hist-songs { display: grid; gap: 4px; }
.hist-songs a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--surface); border-radius: 12px; font-size: 14px; color: inherit; text-decoration: none; transition: background .15s; }
.hist-songs a:hover { background: var(--surface-2); }
.hist-songs a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.hist-songs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hist-songs b { font-weight: 500; }
.hist-item { border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; background: var(--surface); }
.hist-item.summary { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.hi-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hi-head b { font-weight: 600; }
.hi-row { font-size: 13px; margin-top: 6px; color: var(--text); }
.hi-k { color: var(--muted); }
.hi-top { margin: 6px 0 0; padding-left: 20px; font-size: 13px; }

/* на невысоком экране плеер уступает место тексту песни: полоса ниже, а кнопки прячутся за «⋯» */
@media (max-height: 820px) {
  .roll { height: 128px; }
}

/* ---------- узкие окна: меню сворачивается до значков ---------- */
@media (max-width: 1100px) {
  :root { --side: 60px; }
  .sidebar { padding: 20px 8px; }
  .brand { justify-content: center; padding: 0; font-size: 0; gap: 0; }
  .brand .ver { display: none; }
  .sidebar nav a { justify-content: center; padding: 0; }
  .sidebar nav a span { display: none; }
}

@media (max-width: 700px) {
  :root { --side: 0px; }
  body::before, body::after { display: none; }
  .sidebar {
    position: sticky; top: 0; left: auto; bottom: auto; width: auto; flex-direction: row; align-items: center;
    gap: 10px; padding: 8px 12px; border-radius: 0; background: rgba(0, 0, 0, .82);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .brand { font-size: 16px; gap: 8px; white-space: nowrap; }
  .brand::before { width: 14px; height: 14px; }
  .brand .ver { display: inline; padding: 1px 6px; font-size: 10px; }
  .sidebar nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav a { height: 34px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
  .sidebar nav a span { display: inline; }
  .sidebar nav a svg { display: none; }
  main { margin: 0 6px 6px; padding: 16px 14px 32px; min-height: calc(100vh - 56px); }
  .hero { padding: 24px 0 28px; }
  .hero .sub { font-size: 15px; margin-bottom: 20px; }
  .prompt-fields { flex-direction: column; }
  details.more summary { max-width: 100%; }
  .prompt-more { padding-bottom: 8px; }
  .prompt-go { position: static; width: 100%; margin-top: 8px; }
  .songs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
  .song-head .cover { width: 88px; }
  .kbd { display: none; }
  .transport .time { min-width: 0; }
  .dock { left: 0; right: 0; bottom: 0; border-width: 1px 0 0; border-radius: 16px 16px 0 0; }
  .dock-inner { padding: 8px 12px 12px; }
  .line { grid-template-columns: 40px 1fr; padding-right: 46px; margin: 0 2px; }
  .syl .tx { font-size: 17px; }
  .stage { grid-template-columns: 1fr 70px; gap: 6px; }
  .roll { height: 116px; }
  .readout { padding: 4px; }
  .ro-label, .ro-sub { display: none; }
  .ro-note { font-size: 18px; min-width: 0; padding: 4px 6px; }
  .ro-next { font-size: 10px; }
  .transport { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
  .transport .time { font-size: 12px; }
  .play-main { width: 38px; height: 38px; }
  .map { flex-basis: 100%; order: 5; height: 26px; }
  .sing-actions { margin-left: auto; gap: 6px; }
  .sing-actions .lbl { display: none; }
  .sing-actions .toggle { padding: 0 11px; border-radius: 999px; }
  .dock .seg button { padding: 0 9px; }
  .lyric-line { grid-template-columns: 1fr; gap: 2px; margin-top: 6px; padding: 8px 12px 10px; }
  .ll-meta { display: flex; align-items: center; gap: 8px; }
  .ll-now { font-size: 20px; }
  .ll-next { margin-top: 4px; font-size: 14px; }
  /* на телефоне окно открывается листом над окошками, на всю ширину пульта */
  .wins { position: static; overflow-x: auto; scrollbar-width: none; }
  .wins::-webkit-scrollbar { display: none; }
  .dock.folded .win { position: static; flex: none; }
  .dock.folded .win.open .win-body { left: 8px; right: 8px; bottom: 60px; min-width: 0; border-radius: 18px; }
  .win-chip .sum { display: none; }
  .win.is-on .win-chip::after { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gc); }
  .win-row { flex-wrap: wrap; }
  .win-fold { display: none; }
  .phase { right: 80px; }
  .part-head .btn span { display: none; }
  .legend-keys { --w: 40px; --bw: 36px; }
  .lk.white { font-size: 12px; height: 48px; }
  .lk.black { font-size: 9.5px; }
  .legend-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  .progress.indeterminate > div { animation-duration: 3s; }
  .part-count.bump, .line-count.bump, .line-score.bump { animation: none; }
}

/* ---------- наизусть, отсчёт в проигрышах, подбор тональности, отчёт ---------- */
:root { --ghost-line: rgba(182, 156, 255, .85); }
.line.hide-notes .syl .nt, .line.hide-notes .syl .mel { visibility: hidden; }
.line.hide-words .syl .tx { box-shadow: inset 0 -1px var(--faint); }
.line.hide-words .syl .tx .rest { opacity: 0; }
.line.hide-words .syl.now .tx, .line.hide-words .syl.past .tx { box-shadow: none; }
.line.hide-words .syl.now .tx .rest, .line.hide-words .syl.past .tx .rest { opacity: 1; }
.gap-count {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); pointer-events: none;
  padding: 3px 12px; border-radius: 99px; background: var(--surface-3); color: var(--text);
  font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.gap-count[hidden] { display: none; }
.gap-count.soon { background: var(--accent); color: var(--ink); font-size: 22px; font-weight: 700; padding: 2px 16px; }
.fit-list { display: grid; gap: 8px; }
.btn.fit-opt { display: grid; justify-content: stretch; justify-items: start; gap: 2px; width: 100%; height: auto; padding: 10px 16px; border-radius: 14px; text-align: left; }
.fit-opt b { font-weight: 600; }
.fit-opt span { font-size: 12px; color: var(--muted); font-weight: 400; }
.rt-live { display: grid; place-items: center; min-height: 64px; }
.rep-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rep-notes .ro-pill { border: 0; cursor: pointer; font-size: 13px; padding: 3px 9px; }
.sp-row select { width: 100%; }
.sing-pop { max-height: calc(100vh - 16px); overflow: auto; }

/* ---------- вход и подписка ---------- */
.ic-lock { flex: none; width: 13px; height: 13px; }
.ic-check { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }
.avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--aura); color: #ffffff; font-weight: 600; font-size: 14px;
}
.avatar.big { width: 56px; height: 56px; font-size: 22px; }

/* меню */
.side-account { margin-top: auto; display: grid; gap: 8px; }
.side-offer {
  display: grid; gap: 4px; padding: 14px; border-radius: 14px;
  background: radial-gradient(130% 100% at 0 0, rgba(217, 64, 143, .3), transparent 72%), var(--surface);
}
.side-offer b { font-size: 14px; font-weight: 600; }
.side-offer span { font-size: 12px; color: var(--muted); }
.side-offer .btn { width: 100%; margin-top: 8px; }
.side-login { width: 100%; }
.side-login svg { width: 16px; height: 16px; }
.side-user {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; min-width: 0;
  color: inherit; text-decoration: none; transition: background-color .15s ease;
}
.side-user:hover { background: var(--glass); }
.side-user-text { display: grid; min-width: 0; }
.side-user-text b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text small { font-size: 12px; color: var(--muted); }
body:not(.pro) .sidebar nav a.pro-only::after {
  content: ""; flex: none; margin-left: auto; width: 13px; height: 13px; background: currentColor; opacity: .7;
  --lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2.5'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  -webkit-mask: var(--lock) center / contain no-repeat; mask: var(--lock) center / contain no-repeat;
}

/* главная для гостя */
.free-steps {
  list-style: none; margin: 0 auto 40px; padding: 0; max-width: 900px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.free-steps li { display: flex; gap: 12px; padding: 16px; background: var(--surface); border-radius: var(--radius); }
.free-step-n {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass-2); font-size: 13px; font-weight: 600;
}
.free-steps b { font-weight: 600; }
.free-steps p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.pitch {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 40px; padding: 28px; border-radius: 20px;
  background:
    radial-gradient(60% 140% at 100% 0, rgba(249, 138, 60, .3), transparent 72%),
    radial-gradient(60% 140% at 0 100%, rgba(217, 64, 143, .28), transparent 72%), var(--surface);
}
.pitch-text { flex: 1 1 320px; }
.pitch h2 { margin: 0 0 6px; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.pitch p { margin: 0; color: var(--muted); }
.pitch-go { display: flex; flex-wrap: wrap; gap: 8px; }

/* ожидание минуса и разбора */
.wait-steps { display: grid; gap: 18px; }
.wait-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
.wait-head b { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.wait-head span { color: var(--muted); }
.wait-step:not(.now):not(.done) { opacity: .55; }
.wait-step.done .progress > div { background: var(--ok); }
/* готовый минус: зелёный кружок с галочкой, в первый раз выскакивает и дорисовывается */
.wait-ok { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); }
.wait-ok .ic-check { width: 12px; height: 12px; margin: 0; color: var(--ink); stroke-width: 3.2; }
@media (prefers-reduced-motion: no-preference) {
  .wait-ok.pop { animation: wait-ok-pop .45s cubic-bezier(.34, 1.56, .64, 1); }
  .wait-ok.pop path { stroke-dasharray: 21; stroke-dashoffset: 21; animation: wait-ok-draw .3s .2s ease-out forwards; }
}
@keyframes wait-ok-pop { from { transform: scale(0); opacity: 0; } }
@keyframes wait-ok-draw { to { stroke-dashoffset: 0; } }
/* подпись этапа сменяется сама (busy.js): новая фраза проявляется снизу */
.busy-text { display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .busy-in { animation: busy-in .4s ease-out; } }
@keyframes busy-in { from { opacity: 0; transform: translateY(4px); } }

/* страница песни без подписки */
.free-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 14px; padding: 12px 12px 12px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(217, 64, 143, .22), rgba(249, 138, 60, .12)), var(--surface);
}
.free-bar .grow { flex-basis: 280px; min-width: 0; }
.free-bar b { display: block; font-weight: 600; }
.free-bar span { font-size: 13px; color: var(--muted); }
.next-lock {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; width: 100%; padding: 18px 20px;
  border: 0; border-radius: var(--radius); background: var(--aura); color: #ffffff; text-align: left; cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.next-lock:hover { filter: brightness(1.08); }
.next-lock:active { transform: scale(.995); }
.next-lock-text { display: grid; gap: 2px; min-width: 0; }
.next-lock-text b { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.next-lock-text span { font-size: 14px; color: rgba(255, 255, 255, .86); }
.next-lock-go {
  flex: none; padding: 9px 16px; border-radius: 999px; background: var(--text); color: var(--ink);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.part.locked {
  display: block; width: 100%; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: filter .15s ease;
}
.part.locked:hover { filter: brightness(1.18); }
.part.locked .part-tag { display: inline-flex; align-items: center; gap: 6px; }
.lock-rows {
  display: grid; gap: 14px; padding: 12px 24px 8px 70px; opacity: .6; filter: blur(5px);
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.lock-row { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.lock-syl { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.lock-syl i { display: block; height: 14px; border-radius: 4px; background: var(--muted); }
.lock-syl b { display: block; width: 26px; height: 14px; border-radius: 5px; background: var(--nc); }
.map-part.locked { opacity: 1; background: color-mix(in srgb, var(--kc) 22%, transparent); color: var(--muted); }
.map-part.locked:hover { background: color-mix(in srgb, var(--kc) 34%, transparent); }

body:not(.owner) .sidebar nav a[data-nav="settings"] { display: none; } /* настройки сервера — только у владельца */

/* окна: подписка, вход, оплата */
.modal .card.pay-card { position: relative; width: min(440px, 100%); }
.pay-card > .pay-close + * { margin-top: 0; }
.pay-card > .pay-close + .pay-aura { margin-top: -20px; }
.pay-close {
  position: absolute; z-index: 1; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(0, 0, 0, .3); color: var(--text); font-size: 13px; transition: background-color .15s ease;
}
.pay-close:hover { background: rgba(0, 0, 0, .55); }
.pay-aura {
  position: relative; margin: -20px -20px 0; padding: 36px 24px 24px; color: #ffffff;
  background:
    radial-gradient(70% 120% at 80% 0, rgba(164, 44, 170, .85), transparent 74%),
    radial-gradient(80% 130% at 20% 0, rgba(206, 66, 36, .95), transparent 76%), var(--surface);
}
.pay-aura h2 { margin: 0 32px 6px 0; font-size: 26px; font-weight: 500; line-height: 1.12; letter-spacing: -.025em; }
.pay-aura p { margin: 0; color: rgba(255, 255, 255, .86); }
.pay-head h2 { margin: 0 36px 4px 0; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.pay-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.pay-list li, .plan-list li { display: flex; gap: 10px; align-items: flex-start; }
.pay-price { text-align: center; color: var(--muted); font-size: 14px; }
.pay-price b { color: var(--text); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.btn.pay-go { width: 100%; height: 44px; }
.pay-card .btn.pay-go + .btn.pay-go { margin-top: 8px; }
.pay-link {
  display: block; margin: 12px auto 0; padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.pay-link:hover { color: var(--text); }
.pay-tabs { display: flex; }
.pay-tabs button { flex: 1; }
.pay-card label.field { flex: none; }
.pay-order { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.pay-order b { font-weight: 600; white-space: nowrap; }
.pay-demo-card { display: grid; gap: 10px; }
.pay-demo-card .row label.field { flex: 1 1 0; min-width: 0; }
.pay-demo-card input { width: 100%; color: var(--muted); font-family: var(--mono); cursor: default; }
.pay-demo-card input:focus { border-color: transparent; background-color: var(--surface-2); }
.pay-demo { margin: 12px 0 0; color: var(--faint); font-size: 12px; text-align: center; }
.pay-spin {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #ffffff;
  animation: pay-spin .7s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }
.pay-done { padding: 44px 24px 28px; text-align: center; }
.pay-done h2 { margin-right: 0; }
.pay-done-mark {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: #ffffff;
}
.pay-done-mark .ic-check { width: 26px; height: 26px; margin: 0; color: var(--ink); }

/* тарифы */
.plans-hero { padding-bottom: 28px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 820px; margin: 0 auto; }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 2px solid transparent; border-radius: 20px; background: var(--surface); }
.plan h2 { margin: 0; font-size: 18px; }
.plan-pro { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--aura) border-box; }
.plan-tag { align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: var(--aura); color: #ffffff; font-size: 12px; font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: 8px; }
.plan-price b { font-size: 40px; font-weight: 500; line-height: 1.1; letter-spacing: -.03em; }
.plan-price span { color: var(--muted); }
.plan-list { flex: 1; list-style: none; margin: 6px 0 10px; padding: 0; display: grid; align-content: start; gap: 10px; font-size: 14px; }
.btn.plan-go { width: 100%; height: 44px; }
.plan .pay-link { margin-top: 2px; }
.plans-q { max-width: 820px; margin: 32px auto 12px; }
.faq { display: grid; gap: 8px; max-width: 820px; margin: 0 auto; }
.faq details { padding: 14px 18px; border-radius: 14px; background: var(--surface); }
.faq summary { font-weight: 500; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* закрытый раздел и аккаунт */
.locked-view { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14vh 16px; text-align: center; }
.locked-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--aura); color: #ffffff; }
.locked-mark svg { width: 26px; height: 26px; }
.locked-view h1 { margin: 0; }
.locked-view .sub { max-width: 460px; }
.locked-view .row { justify-content: center; margin-top: 10px; }
.acc-page { max-width: 640px; }
.acc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.acc-head .grow { flex-basis: 160px; min-width: 0; }
.acc-head b { font-size: 16px; font-weight: 600; }
.acc-plan b { font-size: 18px; font-weight: 500; }
.acc-plan .sub { margin-top: 4px; }

@media (max-width: 1100px) {
  .side-offer, .side-user-text, .side-login span { display: none; }
  .side-login { padding: 0; }
  .side-user { justify-content: center; padding: 6px 0; }
  body:not(.pro) .sidebar nav a.pro-only::after { display: none; }
}
@media (max-width: 800px) {
  .free-steps, .plans { grid-template-columns: minmax(0, 1fr); }
  .lock-rows { padding-left: 24px; }
}
@media (max-width: 700px) {
  .sidebar nav { flex: 1 1 auto; min-width: 0; }
  .side-account { flex: none; margin: 0; }
  .side-login { width: auto; height: 34px; padding: 0 12px; font-size: 13px; }
  .side-login span { display: inline; }
  .side-login svg { display: none; }
  .side-user { padding: 0; }
  .free-bar .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .pay-spin { animation-duration: 1.6s; }
}

/* ---------- песенник: новая песня; обучение первого старта (tour.js) ---------- */
.book-add h2 { margin-bottom: 4px; }
.book-add .sub { margin-bottom: 12px; }
.book-add .prompt { max-width: none; }
.book-song .chips { margin-top: 4px; }
.book-song .progress { margin-top: 6px; max-width: 320px; }
.pay-done .pay-next { margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, .72); }

.tour-hole {
  position: fixed; z-index: 40; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 9999px rgba(0, 0, 0, .58);
  animation: tour-fade .2s ease-out;
}
.tour-tip {
  position: fixed; z-index: 41; width: min(320px, calc(100vw - 24px)); padding: 16px 18px 14px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 16px; box-shadow: var(--shadow);
  animation: tour-in .2s ease-out;
}
.tour-tip::after {
  content: ""; position: absolute; left: var(--ax, 50%); width: 12px; height: 12px; background: var(--surface-2);
  border: 1px solid var(--border-2); transform: translateX(-50%) rotate(45deg);
}
.tour-tip[data-side="below"]::after { top: -7px; border-right-color: transparent; border-bottom-color: transparent; }
.tour-tip[data-side="above"]::after { bottom: -7px; border-left-color: transparent; border-top-color: transparent; }
.tour-tip[data-side="over"]::after { display: none; }
.tour-label { margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--accent-text); }
.tour-tip h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.tour-tip p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.tour-btns { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.tour-skip {
  margin-left: auto; padding: 0; border: 0; background: none; color: var(--faint); font: inherit; font-size: 13px; cursor: pointer;
}
.tour-skip:hover { color: var(--text); }
@keyframes tour-fade { from { opacity: 0; } }
@keyframes tour-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) {
  .tour-hole, .tour-tip { animation: none; }
}
