:root { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; }
body { margin: 0; background: #0b0d12; color: #e9eefc; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 20px; }
header h1 { margin: 0 0 6px 0; font-size: 22px; }
.sub { opacity: 0.8; font-size: 13px; }

.panel { background: #111625; border: 1px solid #1c2744; border-radius: 14px; padding: 14px; margin: 14px 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
label { opacity: 0.9; font-size: 13px; }
select, input { background: #0e1424; color: #e9eefc; border: 1px solid #223055; border-radius: 10px; padding: 8px 10px; }
button { background: #2a5cff; color: white; border: 0; border-radius: 10px; padding: 9px 12px; cursor: pointer; }
button[disabled] { opacity: 0.4; cursor: not-allowed; }
a { color: #8bb1ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.status { margin-top: 10px; }
.pill { font-size: 12px; padding: 6px 10px; border-radius: 999px; background: #0e1424; border: 1px solid #223055; }
.pill.ok { border-color: #2ee59d; }
.pill.warn { border-color: #ffcc66; }
.pill.bad { border-color: #ff6b6b; }

.main { display: block; }
.score-section { margin-top: 10px; }
.stats-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@media (max-width: 1000px) { .stats-section { grid-template-columns: 1fr; } }

.card { background: #111625; border: 1px solid #1c2744; border-radius: 16px; padding: 16px; box-shadow: 0 12px 30px rgba(7, 10, 22, 0.35); }
.score-card { padding: 18px; }
.score { width: 100%; min-height: 420px; background: #0e1424; border: 1px solid #223055; border-radius: 14px; }
.hint { margin-top: 10px; min-height: 22px; font-size: 14px; opacity: 0.9; }
.last { margin-top: 10px; display: flex; gap: 16px; font-size: 13px; opacity: 0.9; }

.auth-wrap { max-width: 560px; margin: 60px auto 0; }
.auth-card { padding: 22px; }
.auth-title { font-size: 20px; margin: 0 0 12px 0; }
.auth-form { display: grid; gap: 10px; }
.auth-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.auth-links { display: flex; gap: 12px; font-size: 13px; }
.auth-error { min-height: 18px; font-size: 13px; color: #ffcc66; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats .k { opacity: 0.75; margin-right: 8px; }
.pernote { font-size: 13px; line-height: 1.35; opacity: 0.9; }
.history { font-size: 13px; line-height: 1.4; opacity: 0.9; }
.small { opacity: 0.7; font-size: 12px; margin-top: 14px; }
.small.inline { margin-top: 0; margin-left: 8px; display: inline-block; }
hr { border: 0; height: 1px; background: #1c2744; margin: 12px 0; }
.hidden { display: none !important; }

.voice-panel { margin-top: 12px; padding: 10px; border: 1px solid #223055; border-radius: 12px; background: #0e1424; }
.voice-row { gap: 12px; align-items: center; }
.voice-metric { font-size: 13px; opacity: 0.9; }
.voice-stable { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.voice-stable-label { font-size: 12px; opacity: 0.8; }
.voice-stable-track { flex: 1; height: 6px; background: #1c2744; border-radius: 999px; overflow: hidden; }
.voice-stable-bar { height: 100%; width: 0; background: #2ee59d; border-radius: 999px; transition: width 0.15s linear; }
.voice-stable-text { font-size: 12px; opacity: 0.8; min-width: 50px; text-align: right; }

/* Сделать VexFlow (SVG) контрастным на тёмном фоне, включая ключ */
#score svg text,
#score svg tspan {
  fill: #e9eefc;
  stroke: none;
}
#score svg path[fill="none"],
#score svg rect[fill="none"] {
  fill: none;
}
#score svg [data-note-color] {
  fill: inherit;
  stroke: inherit;
}

#score svg .vf-ledgerline,
#score svg .vf-ledgerline line,
#score svg .vf-ledgerline path {
  stroke: #e9eefc;
}

#score svg path[stroke="#444"] {
  stroke: #e9eefc !important;
}
