/* Стили раздела «Теория музыки и аккорды» (.th-page), изолированные от остальных страниц темы.
 * Визуальный язык: много воздуха, минимум линий и рамок, спокойная премиальная иерархия.
 */
.th-page {
  --th-hair: rgba(239, 232, 220, .075);
  --th-hair2: rgba(239, 232, 220, .18);
  --th-surface: rgba(239, 232, 220, .026);
  --th-surface2: rgba(239, 232, 220, .052);
  --th-hover: rgba(239, 232, 220, .065);
  --th-red: #E30613;
  --th-red-ink: #FF4D3F;
  --th-ok: #7FD69B;
  --th-spring: cubic-bezier(.3, 1.3, .45, 1);
  --th-room: clamp(72px, 9vw, 128px);
  color: var(--ivory);
  font: 400 16px/1.6 var(--f-text);
  overflow-x: clip;
}
.th-page button {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.th-page .num { font-variant-numeric: tabular-nums; }
.th-page .eyebrow {
  margin: 0;
  font: 400 11px/1.2 var(--f-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--mute);
}
.th-page .it {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.12em;
  letter-spacing: -.01em;
  line-height: 1;
}

/* ---------- Hero ---------- */
.th-page .th-hero {
  padding-top: clamp(22px, 2.8vw, 38px);
  padding-bottom: 12px;
}
.th-page .th-hero__stack > * { animation: th-rise .8s var(--slow) both; }
.th-page .th-hero__stack > :nth-child(2) { animation-delay: .06s; }
.th-page .th-hero__stack > :nth-child(3) { animation-delay: .12s; }
.th-page .th-hero__stack > :nth-child(4) { animation-delay: .18s; }
@keyframes th-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.th-page .th-head-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 20px;
  margin-bottom: 14px;
}
.th-page .th-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 400 12px/1.3 var(--f-mono);
  color: var(--ivory-2);
}
.th-page .th-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--th-red);
  flex: none;
}

.th-page .th-mute-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--th-surface);
  border: 1px solid rgba(239, 232, 220, .08);
  font: 400 12px/1 var(--f-mono);
  color: var(--ivory-2);
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.th-page .th-mute-btn:hover { background: var(--th-surface2); color: var(--ivory); }
.th-page .th-mute-btn:active { transform: scale(.97); }
.th-page .th-mute-btn .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--th-ok);
}
.th-page .th-mute-btn[aria-pressed="true"] { color: var(--mute); }
.th-page .th-mute-btn[aria-pressed="true"] .dot { background: var(--th-red-ink); }

.th-page .th-h1 {
  margin: 0 0 14px;
  font: 300 clamp(34px, 4.5vw, 56px)/1.04 var(--f-display);
  letter-spacing: -.045em;
  max-width: 24ch;
}
.th-page .th-lede {
  margin: 0 0 26px;
  font: 300 clamp(15.5px, 1.2vw, 18px)/1.52 var(--f-text);
  color: rgba(239, 232, 220, .68);
  max-width: 58ch;
}

/* ---------- Навигация без лишних рамок ---------- */
.th-page .th-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 26px;
  padding-bottom: 0;
}
.th-page .th-seg {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0;
  border-radius: 999px;
  background: transparent;
}
.th-page .th-seg::-webkit-scrollbar { display: none; }
.th-page .th-seg__thumb,
.th-page .th-seg__hover {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}
.th-page .th-seg__thumb {
  background: var(--ivory);
  transition: transform .55s var(--th-spring), width .55s var(--th-spring);
}
.th-page .th-seg__hover {
  background: rgba(239, 232, 220, .06);
  opacity: 0;
  transition: transform .4s var(--slow), width .4s var(--slow), opacity .22s var(--ease);
}
.th-page .th-seg__hover.is-on { opacity: 1; }
.th-page .th-seg__btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  min-height: 38px;
  border-radius: 999px;
  font: 400 13.5px/1.15 var(--f-text);
  color: var(--mute);
  white-space: nowrap;
  transition: color .25s var(--ease), transform .15s var(--ease);
}
.th-page .th-seg__btn:hover { color: var(--ivory); }
.th-page .th-seg__btn:active { transform: scale(.97); }
.th-page .th-seg__btn.is-on { color: #0B0A09; font-weight: 500; }

.th-page .th-lang-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.th-page .th-lang-lbl {
  font: 400 11.5px/1.2 var(--f-mono);
  color: var(--mute);
}
.th-page .th-lang-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(239, 232, 220, .04);
}
.th-page .th-lang-btn {
  padding: 7px 13px;
  min-height: 32px;
  border-radius: 999px;
  font: 400 12.5px/1.1 var(--f-text);
  color: var(--mute);
  white-space: nowrap;
  transition: background-color .22s var(--ease), color .22s var(--ease), transform .15s var(--ease);
}
.th-page .th-lang-btn:hover { color: var(--ivory-2); }
.th-page .th-lang-btn:active { transform: scale(.97); }
.th-page .th-lang-btn.is-on {
  background: rgba(239, 232, 220, .14);
  color: var(--ivory);
  font-weight: 500;
}

/* ---------- Кнопки-капсулы ---------- */
.th-page .th-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font: 500 14.5px/1.1 var(--f-text);
  white-space: nowrap;
  transition: background-color .24s var(--ease), color .24s var(--ease), border-color .24s var(--ease), transform .18s var(--ease);
}
.th-page .th-btn:active { transform: scale(.97); }
.th-page .th-btn--ivory { background: var(--ivory); color: #0B0A09; }
.th-page .th-btn--ivory:hover { background: #fff; transform: translateY(-1px); }
.th-page .th-btn--outline { background: var(--th-surface); color: var(--ivory); border: 1px solid rgba(239, 232, 220, .12); }
.th-page .th-btn--outline:hover { background: var(--th-surface2); border-color: rgba(239, 232, 220, .26); }
.th-page .th-btn.is-playing { background: var(--th-red); color: #fff; border-color: var(--th-red); }

.th-page .th-qlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--th-hair2);
  font: 400 14.5px/1.2 var(--f-text);
  color: var(--ivory-2);
  transition: color .2s, border-color .2s, gap .35s var(--slow);
}
.th-page .th-qlink:hover { color: var(--ivory); border-color: var(--ivory); gap: 12px; }

/* ---------- Рабочая сцена ---------- */
.th-page .th-stage { padding-top: clamp(32px, 4.2vw, 52px); }

.th-page .th-panel { min-width: 0; }
.th-page .th-panel[hidden] { display: none; }
.th-page .th-panel.is-enter { animation: th-enter .48s var(--slow) both; }
.th-page .th-panel.from-r { --dx: 22px; }
.th-page .th-panel.from-l { --dx: -22px; }
@keyframes th-enter {
  from { opacity: 0; transform: translateX(var(--dx, 0)); }
  to { opacity: 1; transform: none; }
}
.th-page .is-changed {
  border-radius: 6px;
  animation: th-mark 1.5s var(--ease) both;
}
@keyframes th-mark {
  0%, 28% { background-color: rgba(227, 6, 19, .12); box-shadow: 0 0 0 6px rgba(227, 6, 19, .12); }
  100% { background-color: transparent; box-shadow: 0 0 0 6px transparent; }
}

.th-page .th-split {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(36px, 5.2vw, 76px);
  align-items: start;
}
.th-page .th-h2 {
  margin: 0 0 10px;
  font: 300 clamp(24px, 2.6vw, 34px)/1.1 var(--f-display);
  letter-spacing: -.035em;
}
.th-page .th-sub {
  margin: 0 0 22px;
  font: 300 15.5px/1.55 var(--f-text);
  color: rgba(239, 232, 220, .68);
  max-width: 48ch;
}

/* ---------- Квинтовый круг ---------- */
.th-page .cof-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 4px;
}
.th-page .cof-svg {
  width: 100%;
  max-width: 344px;
  height: auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.th-page .cof-wedge { cursor: pointer; transition: fill .22s var(--ease), opacity .22s var(--ease); }
.th-page .cof-label { pointer-events: none; font-family: var(--f-display); font-weight: 400; text-anchor: middle; dominant-baseline: central; }
.th-page .cof-label--min { font-family: var(--f-mono); font-weight: 500; }
.th-page .cof-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 24px;
  font: 400 12px/1.3 var(--f-mono);
  color: var(--mute);
}
.th-page .cof-legend span { display: inline-flex; align-items: center; gap: 7px; }
.th-page .cof-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.th-page .cof-chords {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border-radius: 16px;
  background: var(--th-surface);
  margin: 0 0 22px;
}
.th-page .cof-chord-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 11px 13px;
  min-height: 54px;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .15s var(--ease);
}
.th-page .cof-chord-btn:hover { background: var(--th-hover); }
.th-page .cof-chord-btn:active { transform: scale(.97); }
.th-page .cof-chord-btn.is-tonic { background: rgba(227, 6, 19, .14); }
.th-page .cof-chord-btn.is-now { background: var(--ivory); color: #0B0A09; }
.th-page .cof-chord-btn.is-now span { color: #66645E; }
.th-page .cof-chord-btn b { font: 500 17px/1.15 var(--f-display); letter-spacing: -.02em; }
.th-page .cof-chord-btn span { font: 400 12px/1.25 var(--f-text); color: var(--mute); }

/* Безрамочная сетка фактов (воздух вместо линий) */
.th-page .th-fact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 18px 28px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.th-page .th-fact-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 0;
}
.th-page .th-fact-list span {
  font: 400 11px/1.2 var(--f-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--mute);
}
.th-page .th-fact-list b {
  font: 400 15px/1.4 var(--f-text);
  color: var(--ivory);
}

.th-page .th-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

/* ---------- Единая хроматическая линейка 12 нот + безрамочные чипы ---------- */
.th-page .th-note-rail {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(239, 232, 220, .035);
  margin-bottom: 24px;
}
.th-page .th-note-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 6px 2px;
  border-radius: 10px;
  color: var(--ivory-2);
  transition: background-color .16s var(--ease), color .16s var(--ease), transform .14s var(--ease);
}
.th-page .th-note-key:hover { background: rgba(239, 232, 220, .06); color: var(--ivory); }
.th-page .th-note-key:active { transform: scale(.96); }
.th-page .th-note-key.is-on { background: var(--ivory); color: #0B0A09; }
.th-page .th-note-key b { font: 500 13px/1.1 var(--f-mono); }
.th-page .th-note-key small { font: 400 10px/1.1 var(--f-text); opacity: .7; }
.th-page .th-note-key.is-on small { opacity: .75; }

.th-page .th-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-bottom: 22px;
}
.th-page .th-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: transparent;
  font: 400 13.5px/1.2 var(--f-text);
  color: var(--mute);
  transition: background-color .16s var(--ease), color .16s var(--ease), transform .14s var(--ease);
}
.th-page .th-chip:hover { background: var(--th-surface2); color: var(--ivory); }
.th-page .th-chip:active { transform: scale(.97); }
.th-page .th-chip.is-on { background: var(--ivory); color: #0B0A09; font-weight: 500; }
.th-page .th-chip small { font: 400 11.5px/1 var(--f-mono); opacity: .72; }

/* ---------- Спокойный список пресетов и ладов без коробок ---------- */
.th-page .th-list-stack {
  display: grid;
  gap: 3px;
  margin-bottom: 20px;
}
.th-page .th-list-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  transition: background-color .18s var(--ease), transform .14s var(--ease);
}
.th-page .th-list-row:hover { background: rgba(239, 232, 220, .04); }
.th-page .th-list-row:active { transform: scale(.99); }
.th-page .th-list-row.is-on { background: rgba(239, 232, 220, .085); }
.th-page .th-list-row b {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 500 14.5px/1.25 var(--f-text);
  color: var(--ivory-2);
}
.th-page .th-list-row.is-on b { color: var(--ivory); }
.th-page .th-list-row.is-on b::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--th-red);
  flex: none;
}
.th-page .th-list-row span {
  font: 400 12px/1.3 var(--f-mono);
  color: var(--mute);
  text-align: right;
}

/* ---------- Список 13 интервалов в 2 чистые колонки ---------- */
.th-page .th-int-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
}
.th-page .th-int-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  text-align: left;
  color: var(--ivory-2);
  transition: background-color .16s var(--ease), color .16s var(--ease), transform .14s var(--ease);
}
.th-page .th-int-row:hover { background: rgba(239, 232, 220, .045); color: var(--ivory); }
.th-page .th-int-row:active { transform: scale(.98); }
.th-page .th-int-row code {
  min-width: 24px;
  font: 500 12px/1 var(--f-mono);
  color: var(--mute);
}
.th-page .th-int-row span { font: 400 13.5px/1.25 var(--f-text); }
.th-page .th-int-row.is-on { background: var(--ivory); color: #0B0A09; }
.th-page .th-int-row.is-on code { color: rgba(11, 10, 9, .62); }
.th-page .th-int-row.is-on span { font-weight: 500; }

/* Бегущая строка аккордов/нот */
.th-page .th-prog-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.th-page .th-prog-pill {
  min-width: 60px;
  padding: 8px 13px;
  border-radius: 10px;
  background: var(--th-surface);
  font: 500 14.5px/1.1 var(--f-display);
  text-align: center;
  color: var(--ivory-2);
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .15s var(--ease);
}
.th-page .th-prog-pill:hover { background: var(--th-surface2); color: var(--ivory); }
.th-page .th-prog-pill.is-now { background: var(--th-red); color: #fff; transform: translateY(-2px); }

/* ---------- Нотный стан (без лишних рамок и линий) ---------- */
.th-page .staff-box {
  padding: 12px 14px 8px;
  border-radius: 16px;
  background: var(--th-surface);
  margin-bottom: 16px;
}
.th-page .staff-svg { width: 100%; height: auto; max-height: 245px; user-select: none; }
.th-page .staff-note-hit { cursor: pointer; pointer-events: all; }
.th-page .staff-note-hit:hover ellipse { fill: var(--th-red-ink); }
.th-page .th-mnemonic { padding: 0; margin-bottom: 28px; }
.th-page .th-mnemonic__note { font: 300 clamp(28px, 3.2vw, 42px)/1 var(--f-display); margin: 0 0 10px; }
.th-page .th-mnemonic__txt { margin: 0; color: rgba(239, 232, 220, .72); font-size: 15.5px; }

/* ---------- Сольфеджио (тест слуха) ---------- */
.th-page .th-sf-wrap { display: grid; gap: 18px; max-width: 860px; }
.th-page .th-sf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}
.th-page .th-sf-stat {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font: 400 13px/1.2 var(--f-mono);
  color: var(--ivory-2);
}
.th-page .th-sf-bar {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--th-surface2);
  overflow: hidden;
}
.th-page .th-sf-bar i {
  display: block;
  height: 100%;
  background: var(--th-red);
  transition: width .38s var(--slow);
}
.th-page .th-sf-opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.th-page .th-sf-opt {
  padding: 15px 18px;
  border-radius: 14px;
  background: rgba(239, 232, 220, .035);
  text-align: left;
  font: 500 15px/1.3 var(--f-text);
  color: var(--ivory);
  transition: background-color .16s var(--ease), transform .14s var(--ease);
}
.th-page .th-sf-opt:hover:not(:disabled) { background: rgba(239, 232, 220, .075); }
.th-page .th-sf-opt:active:not(:disabled) { transform: scale(.98); }
.th-page .th-sf-opt.is-ok { background: rgba(127, 214, 155, .16); color: var(--th-ok); }
.th-page .th-sf-opt.is-bad { background: rgba(255, 77, 63, .14); color: var(--th-red-ink); }
.th-page .th-sf-feedback { min-height: 24px; margin-bottom: 12px; }

/* ---------- Сквозная клавиатура пианино ---------- */
.th-page .kb-wrap {
  margin-top: 40px;
  padding: 18px 20px 20px;
  border-radius: 20px;
  background: rgba(239, 232, 220, .024);
}
.th-page .kb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  margin-bottom: 12px;
}
.th-page .kb-now { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.th-page .kb-now__label { font: 500 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .09em; color: var(--mute); }
.th-page .kb-now__val { font: 400 15px/1.2 var(--f-text); color: var(--ivory); }
.th-page .kb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.th-page .kb-oct-btn {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font: 400 12px/1 var(--f-mono);
  color: var(--mute);
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.th-page .kb-oct-btn:hover { background: var(--th-surface2); color: var(--ivory); }
.th-page .kb-oct-btn.is-on { background: var(--ivory); color: #0B0A09; font-weight: 500; }
.th-page .kb-pc-hint { font: 400 11.5px/1 var(--f-mono); color: var(--mute); margin-left: 8px; }

.th-page .kb-stage {
  position: relative;
  width: 100%;
  height: 144px;
  user-select: none;
  touch-action: manipulation;
  border-radius: 12px;
  overflow: hidden;
  background: #070605;
}
.th-page .kb-whites { display: flex; width: 100%; height: 100%; }
.th-page .kb-key--white {
  position: relative;
  flex: 1 1 0;
  height: 100%;
  background: #EBE4D8;
  border-right: 1px solid #B7AFA2;
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 10px;
  gap: 2px;
  color: #2A2723;
  transition: background-color .08s var(--ease), transform .08s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.th-page .kb-key--white:last-child { border-right: 0; }
.th-page .kb-key--white:hover { background: #F5EFE4; }
.th-page .kb-key--white.is-chord { background: #FFF9EE; box-shadow: inset 0 -5px 0 #0B0A09; }
.th-page .kb-key--white.is-tonic { background: #FFE5E2; box-shadow: inset 0 -6px 0 var(--th-red); }
.th-page .kb-key--white.is-active { background: #FFD4CE !important; transform: translateY(2px); }
.th-page .kb-key__name { font: 500 11.5px/1.1 var(--f-mono); pointer-events: none; }
.th-page .kb-key__ru { font: 400 10.5px/1 var(--f-text); opacity: .72; pointer-events: none; }
.th-page .kb-key__finger {
  position: absolute;
  bottom: 36px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0B0A09;
  color: var(--ivory);
  font: 500 11px/20px var(--f-mono);
  text-align: center;
  pointer-events: none;
}
.th-page .kb-key--white.is-tonic .kb-key__finger { background: var(--th-red); color: #fff; }

.th-page .kb-blacks { position: absolute; top: 0; left: 0; right: 0; height: 60%; pointer-events: none; }
.th-page .kb-key--black {
  position: absolute;
  top: 0;
  height: 100%;
  pointer-events: auto;
  background: linear-gradient(180deg, #1E1C1A 0%, #0E0D0C 100%);
  border: 1px solid #050505;
  border-top: 0;
  border-radius: 0 0 7px 7px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 8px;
  color: rgba(239, 232, 220, .72);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45);
  transition: background .08s var(--ease), transform .08s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.th-page .kb-key--black .kb-key__name { font-size: 10px; }
.th-page .kb-key--black.is-chord { background: linear-gradient(180deg, #433D36 0%, #26221E 100%); color: #fff; box-shadow: inset 0 -4px 0 var(--ivory), 0 4px 10px rgba(0,0,0,.45); }
.th-page .kb-key--black.is-tonic { background: linear-gradient(180deg, #C80B16 0%, #8A060E 100%); color: #fff; box-shadow: inset 0 -4px 0 #fff, 0 4px 10px rgba(0,0,0,.45); }
.th-page .kb-key--black.is-active { background: var(--th-red) !important; transform: translateY(2px); }
.th-page .kb-key--black .kb-key__finger { bottom: 26px; background: var(--ivory); color: #0B0A09; }

/* ---------- Секции ниже: много воздуха, без сетки лишних линий ---------- */
.th-page .th-room { padding-top: var(--th-room); }
.th-page .th-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 48px; }
.th-page .th-val { padding-top: 4px; }
.th-page .th-val__ico { width: 22px; height: 22px; color: var(--ivory-2); margin-bottom: 16px; }
.th-page .th-val h3 { margin: 0 0 10px; font: 400 18px/1.28 var(--f-display); letter-spacing: -.025em; }
.th-page .th-val p { margin: 0; font: 300 15px/1.6 var(--f-text); color: rgba(239, 232, 220, .68); }

.th-page .th-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 28px;
}
.th-page .th-sec-head h2 { margin: 10px 0 0; font: 300 clamp(26px, 3.6vw, 46px)/1.04 var(--f-display); letter-spacing: -.04em; }
.th-page .th-sec-lede { margin: 0; max-width: 44ch; color: rgba(239, 232, 220, .68); font: 300 15.5px/1.55 var(--f-text); }

.th-page .th-routes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.th-page .th-route__a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.05fr) minmax(0, 1.45fr) 150px 24px;
  align-items: center;
  gap: 12px 24px;
  padding: 18px 16px;
  border-radius: 14px;
  transition: background-color .18s var(--ease);
}
a.th-route__a:hover { background: var(--th-surface); }
.th-page .th-route__n { font: 400 12.5px/1 var(--f-mono); color: var(--mute); }
.th-page .th-route__t b { display: block; font: 400 17px/1.25 var(--f-display); letter-spacing: -.02em; }
.th-page .th-route__d { font: 300 14.5px/1.48 var(--f-text); color: rgba(239, 232, 220, .68); }
.th-page .th-route__vol { font: 400 12.5px/1.2 var(--f-mono); color: var(--ivory-2); text-align: right; }
.th-page .th-route__vol.is-soon { color: var(--mute); }
.th-page .th-route__go { font: 400 16px/1 var(--f-text); color: var(--mute); text-align: right; }

/* Фокальная карточка UpSound AI (ровно 1 на экран) */
.th-page .th-focal {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: clamp(28px, 3.6vw, 48px);
  background:
    radial-gradient(ellipse 70% 115% at 8% 50%, rgba(227, 6, 19, .22) 0%, rgba(227, 6, 19, .06) 46%, transparent 76%),
    linear-gradient(135deg, #1B1312 0%, #110F0E 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  align-items: center;
  gap: 24px 36px;
}
.th-page .th-focal::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #FF3B30 0%, #E30613 65%, rgba(227, 6, 19, .15) 100%);
}
.th-page .th-focal__mark { height: 28px; width: auto; margin-bottom: 14px; }
.th-page .th-focal h2 { margin: 0 0 8px; font: 300 clamp(22px, 2.5vw, 32px)/1.12 var(--f-display); letter-spacing: -.035em; }
.th-page .th-focal p { margin: 0; max-width: 54ch; font: 300 15.5px/1.55 var(--f-text); color: var(--ivory-2); }

/* Светлая полоса .th-fog */
.th-page .th-fog {
  margin-top: var(--th-room);
  background: var(--fog, #EEEEEC);
  color: #0B0A09;
  padding-block: clamp(56px, 7vw, 96px);
}
.th-page .th-fog .eyebrow { color: #66645E; }
.th-page .th-fog h2 { margin: 10px 0 12px; font: 300 clamp(26px, 3.4vw, 44px)/1.05 var(--f-display); letter-spacing: -.04em; color: #0B0A09; }
.th-page .th-fog p { color: #4B4944; }
.th-page .th-fog-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 36px 64px; align-items: start; }
.th-page .th-fog-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.th-page .th-fog-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 14px;
  border-radius: 12px;
  transition: background-color .18s var(--ease);
}
.th-page .th-fog-links a:hover { background: rgba(11, 10, 9, .045); }
.th-page .th-fog-links b { display: block; font: 500 15.5px/1.3 var(--f-text); color: #0B0A09; }
.th-page .th-fog-links span { display: block; font: 400 13px/1.4 var(--f-text); color: #66645E; margin-top: 3px; }
.th-page .th-btn-ink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: #0B0A09;
  color: #EEEEEC;
  font: 500 14.5px/1 var(--f-text);
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}
.th-page .th-btn-ink:hover { opacity: .88; transform: translateY(-1px); }

/* Тихий 2-колоночный FAQ с воздухом */
.th-page .th-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 44px;
  padding-bottom: var(--th-room);
  interpolate-size: allow-keywords;
}
.th-page .th-faq details {
  padding: 18px 16px;
  border-radius: 14px;
  background: rgba(239, 232, 220, .02);
}
.th-page .th-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font: 500 15px/1.4 var(--f-text);
  color: var(--ivory);
}
.th-page .th-faq summary::-webkit-details-marker { display: none; }
.th-page .th-faq summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  transition: transform .45s var(--slow), background-size .45s var(--slow);
}
.th-page .th-faq details[open] summary::after { background-size: 12px 1.5px, 1.5px 0; transform: rotate(180deg); }
.th-page .th-faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--slow), content-visibility .45s allow-discrete; }
.th-page .th-faq details[open]::details-content { block-size: auto; }
.th-page .th-faq p { margin: 12px 0 0; font: 300 14.5px/1.6 var(--f-text); color: rgba(239, 232, 220, .72); }

/* ---------- Адаптив 960 / 720 / 640 / 480 (390 px — 0 скролла вбок) ---------- */
@media (max-width: 960px) {
  .th-page .th-split,
  .th-page .th-values,
  .th-page .th-fog-grid,
  .th-page .th-focal { grid-template-columns: 1fr; }
  .th-page .th-route__a { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 10px; }
  .th-page .th-route__d { grid-column: 2 / -1; }
  .th-page .th-route__go { display: none; }
}
@media (max-width: 720px) {
  .th-page .th-faq { grid-template-columns: 1fr; }
  .th-page .cof-chords { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-page .th-int-list,
  .th-page .th-sf-opts { grid-template-columns: 1fr; }
  .th-page .kb-wrap { padding: 14px 12px 16px; border-radius: 16px; }
  .th-page .kb-pc-hint { display: none; }
  .th-page .kb-stage { height: 152px; }
  .th-page .kb-key--oct2 { display: none !important; }
}
@media (max-width: 640px) {
  .th-page .th-note-rail { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .th-page .th-seg {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    overflow: visible;
    padding: 4px;
    border-radius: 16px;
    background: rgba(239, 232, 220, .035);
  }
  .th-page .th-seg__btn:first-of-type { grid-column: 1 / -1; }
  .th-page .th-seg__thumb, .th-page .th-seg__hover { display: none; }
  .th-page .th-seg__btn { justify-content: center; padding: 9px 10px; font-size: 13px; border-radius: 11px; }
  .th-page .th-seg__btn.is-on { background: var(--ivory); color: #0B0A09; }
}
@media (max-width: 480px) {
  .th-page .th-route__a { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 6px; }
  .th-page .th-route__n { display: none; }
  .th-page .th-route__d { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .th-page .th-hero__stack > *, .th-page .th-panel.is-enter, .th-page .is-changed { animation: none !important; }
  .th-page .th-seg__thumb, .th-page .th-seg__hover, .th-page .th-faq details::details-content { transition: none !important; }
}
