/* Nota Pianino: qara — jasıl — aq. style.css tan keyin jalǵanadı hám tokenlerdi almastıradı. Tek qarańǵı tema. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0a0f0c;
  --surface2: #111a14;
  --ink: #ffffff;
  --muted: #9db0a4;
  --line: #1b2b21;
  --accent: #12a05c;          /* túymelerdiń jasılı (ústinde aq jazıw) */
  --accent-ink: #ffffff;
  --hi: #2ee08a;              /* jaqtı jasıl: belgilengen, jazıw, sızıq */
  --key-w: #f4f4f2;
  --key-b: #050505;
  --key-on: #2ee08a;
  --key-on-b: #2ee08a;
  --radius: 16px;
  --tabbar-h: 0px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root.in-tg, :root.tabs-on { --tabbar-h: 60px; }
html { background: #000; }
body { background: #000; color: #fff; font-family: var(--font); }
html, body { overscroll-behavior-y: none; }

/* ---- sháqpaq ---- */
.top {
  max-width: none; margin: 0; position: relative;
  padding: calc(18px + env(safe-area-inset-top)) max(16px, calc((100% - 1280px) / 2 + 16px)) 16px;
  background: #000; color: #fff; border-bottom: 1px solid var(--line);
}
.top h1 { font-weight: 800; letter-spacing: -.01em; color: #fff; font-size: clamp(1.35rem, 4.5vw, 2rem); display: flex; align-items: center; gap: .5em; }
.top h1::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--hi); flex: none; }
.top .sub { color: var(--muted); margin-top: 6px; font-size: .95rem; }
.top .btn.ghost { color: #fff; background: var(--surface2); border-color: var(--line); }
.top .btn.ghost:hover { border-color: var(--hi); }
.top .nav { margin-top: 12px; }

/* ---- kartochkalar ---- */
main, .foot { max-width: 1280px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; scroll-margin-top: 12px; }
h2, h3, .title, .h2 { font-family: var(--font); }
.h2, .title { font-size: 1.1rem; font-weight: 700; }
.h2::before, .title::before { content: ""; display: inline-block; width: .45em; height: .45em; border-radius: 50%; background: var(--hi); margin-right: .55em; vertical-align: .12em; }
.h3 { color: var(--hi); font-weight: 600; text-transform: none; }
.hint, .meta, .sub { color: var(--muted); }
.msg { color: var(--hi); }

/* ---- túymeler hám enginizler ---- */
.btn { background: var(--surface2); border: 1px solid var(--line); color: #fff; }
.btn:hover { border-color: var(--hi); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #0e8d51; border-color: var(--hi); }
.btn.rec { background: #d93a3f; border-color: #d93a3f; color: #fff; }
.btn:focus-visible, input[type=range]:focus-visible, select:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
select { background: var(--surface2); color: #fff; border-color: var(--line); }
input[type=range] { accent-color: var(--hi); }
.drop { border: 2px dashed color-mix(in srgb, var(--hi) 55%, transparent); background: color-mix(in srgb, var(--hi) 5%, transparent); }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--hi); background: color-mix(in srgb, var(--hi) 10%, transparent); }
#meterBar, #kMeter { background: var(--hi); }
.meter { background: var(--line); }
.wave { background: var(--surface2); }
.time, .scorebar, .tonebar, .autokey, .tempo, .sl output, .inst, .speed { color: var(--muted); }
.scorebar output, .tonebar output, .tempo output { color: #fff; }

/* ---- klaviatura ---- */
.kb { padding-top: 0; background: none; }
.wk { border-color: #00000055; }

/* ---- nota paneli ---- */
.btn.big { min-height: 52px; padding: 0 28px; font-size: 1.1rem; }
.scorebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.scorebar-l { margin-right: 4px; }
.score { margin-inline: -18px; border-radius: 0; padding: 14px 6px; background: #fff; border-block: 1px solid var(--line); }
@media (min-width: 700px) { .score { padding-inline: 12px; } }
.tonebar, .autokey { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .92rem; }
.tonebar { margin-bottom: 8px; }
.autokey { margin-top: 12px; }
.tonebar output { min-width: 14ch; text-align: center; font-weight: 600; }
.chk { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.btn.arrow { min-width: 44px; font-size: 1rem; }
.scorebar .pdfbtn { margin-left: auto; }
.tempo { display: flex; align-items: center; gap: 8px; font-size: .92rem; margin-left: auto; }
.tempo output { min-width: 7ch; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.tempo .btn.small { min-width: 40px; font-size: 1.1rem; }

/* Shertiw túymeleri tómende turaqlı (menyudıń ústinde) */
.playrow {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 6;
  margin: 14px -18px 0; padding: 10px 18px;
  background: var(--surface); border-top: 1px solid var(--line);
}
.autokey[hidden], .adv[hidden], .tonebar [hidden], .scorebar[hidden], .tempo[hidden], .speed[hidden] { display: none !important; }
.tonebar[hidden] { display: none; }

/* ---- tómengi menyu (5 bólim) ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(6, 10, 8, .97); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 60px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--hi); }
.tabbar a:active { background: var(--surface2); }
:root.in-tg .tabbar, :root.tabs-on .tabbar { display: grid; }
@media (max-width: 900px) { :root { --tabbar-h: 60px; } .tabbar { display: grid; } .top .nav { display: none; } }
main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px); }
.foot { text-align: center; padding-top: 12px; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); color: var(--muted); }

/* ---- telefon: ólshemler ---- */
@media (max-width: 560px) {
  body { font-size: 15px; }
  .top { padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 14px; }
  .top .sub { font-size: .88rem; }
  main { padding-inline: 12px; gap: 12px; }
  .card { padding: 14px; border-radius: 14px; }
  .score { margin-inline: -14px; }
  .playrow { margin-inline: -14px; padding-inline: 14px; }
  .btn { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .btn.big { min-height: 48px; padding: 0 20px; font-size: 1.02rem; }
  .btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; }
  .controls { gap: 8px; }
  .controls .btn.primary { flex: 1 1 auto; }
  .scorebar .pdfbtn { margin-left: 0; width: 100%; }
  .tempo { margin-left: 0; width: 100%; justify-content: space-between; }
  .tonebar output { min-width: 0; flex: 1; }
  .drop { padding: 22px 12px; }
  .drop-big { font-size: 1rem; }
  .drop-small { font-size: .8rem; }
  .sliders, .tune-grid { grid-template-columns: 1fr; }
  .kb { height: 120px; }
  select { max-width: 100%; }
}

/* ---- bastırıw / PDF: tek nota ---- */
@media print {
  body { background: #fff !important; color: #000; }
  body > *:not(main) { display: none !important; }
  main > section:not(#player) { display: none !important; }
  #player { border: 0 !important; box-shadow: none !important; padding: 0 !important; background: #fff !important; }
  #player > *:not(#score):not(.title) { display: none !important; }
  .score { margin: 0 !important; border: 0 !important; }
  img[id^="cursorImg"] { display: none !important; }
}
