:root{
  --bg: #171b23;
  --surface: #1f2430;
  --surface-2: #262c3a;
  --ink: #f2ede2;
  --muted: #9aa1b2;
  --gold: #e0ab52;
  --gold-dim: #7a6438;
  --good: #6fbf8f;
  --good-dim: #24382c;
  --bad: #e0745a;
  --bad-dim: #3a2620;
  --line: #333a4a;
  --font-heading: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  display:flex;
  flex-direction:column;
  align-items:center;
  min-height:100vh;
  padding: 56px 20px 40px;
}
.wrap{
  width:100%;
  max-width: 640px;
  flex: 1;
  display:flex;
  flex-direction:column;
}

header{ text-align:center; margin-bottom: 40px; }
.eyebrow{
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
h1{
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 34px;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}
p.lead{
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto;
}

.grid{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

a.card{
  display:flex;
  align-items:center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration:none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.08s ease, background 0.15s ease;
}
a.card:hover{ border-color: var(--gold-dim); background: var(--surface-2); }
a.card:active{ transform: scale(0.99); }

.card .icon{
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--gold-dim);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--gold);
  flex-shrink:0;
}

.card .text{ flex: 1; min-width:0; }
.card .name{
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 2px;
}
.card .desc{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.card .arrow{
  color: var(--muted);
  font-size: 18px;
  flex-shrink:0;
}

footer{
  margin-top: auto;
  padding-top: 44px;
  text-align:center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
footer a{
  color: inherit;
  text-decoration: none;
}
footer a:hover{ color: var(--gold); }
footer button{
  background:none;
  border:none;
  color: var(--gold);
  font-size: 12px;
  cursor:pointer;
  text-decoration: underline;
  padding: 0;
}
.footer-nav{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Компоненты тренажёров (note-trainer, note-notation-trainer) */
.stats-row{
  display:flex;
  align-items:center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 26px;
}
.stats{
  display:flex;
  gap: 10px;
}
.stat{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 16px;
  text-align:center;
  min-width: 84px;
}
.stat .n{ font-family: var(--font-heading); font-size:20px; font-weight:600; }
.stat .l{ font-size:11px; color: var(--muted); letter-spacing:0.06em; text-transform:uppercase; margin-top:2px; }

.reset-btn{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.reset-btn:hover{ border-color: var(--gold-dim); color: var(--gold); }
.reset-btn:active{ transform: scale(0.92); }
.reset-btn svg{ width:15px; height:15px; }

.switch{
  position:relative;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  cursor:pointer;
  flex-shrink:0;
}
.switch .knob{
  position:absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s ease, background 0.15s ease;
}
.switch.on{ border-color: var(--gold-dim); }
.switch.on .knob{ transform: translateX(16px); background: var(--gold); }

.stage{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px 20px 28px;
  position: relative;
  overflow:hidden;
  margin-bottom: 22px;
}
.staff{
  position:absolute;
  left:0; right:0; top:50%;
  transform: translateY(-50%);
  height: 64px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  opacity: 0.35;
  pointer-events:none;
}
.staff div{ height:1px; background: var(--gold-dim); }

.prompt{
  position:relative;
  text-align:center;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
  letter-spacing: 0.04em;
}
.note-display{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 14px;
}
.note-display .current{
  font-family: var(--font-heading);
  font-weight:600;
  font-size: 64px;
  color: var(--gold);
  line-height:1;
}

.feedback{
  min-height: 22px;
  text-align:center;
  font-size: 14px;
  margin-top: 16px;
  color: var(--muted);
}
.feedback.good{ color: var(--good); }
.feedback.bad{ color: var(--bad); }
