@font-face{ font-family:'Handjet'; font-style:normal; font-display:swap; font-weight:100 900;
  src:url(fonts/handjet-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face{ font-family:'Handjet'; font-style:normal; font-display:swap; font-weight:100 900;
  src:url(fonts/handjet-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face{ font-family:'Geologica'; font-style:normal; font-display:swap; font-weight:100 900;
  src:url(fonts/geologica-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face{ font-family:'Geologica'; font-style:normal; font-display:swap; font-weight:100 900;
  src:url(fonts/geologica-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root{
  --page:#D3CFC6; --ink:#2A1E17; --muted:#6B5D50; --rule:rgba(42,30,23,.18); --link:#8A4B12;
  --stage:#1C1410; --stage-2:#2A1E17; --stage-3:#382820;
  --amber:#FFB04A; --filament:#FFEBC2; --brass:#A9854F; --brass-hi:#E2C58D;
  --digit:'Handjet', ui-monospace, 'Courier New', monospace;
  --text:'Geologica', 'Segoe UI', system-ui, sans-serif;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){ --page:#120C09; --ink:#EADBC4; --muted:#A08E7A; --rule:rgba(234,219,196,.14); --link:#F2B866; }
}
:root[data-theme="dark"]{ --page:#120C09; --ink:#EADBC4; --muted:#A08E7A; --rule:rgba(234,219,196,.14); --link:#F2B866; }
html{ scroll-padding-top:env(safe-area-inset-top,0px); }
*,*::before,*::after{ box-sizing:inherit; }
body{ margin:0; background:var(--page); color:var(--ink); font-family:var(--text); font-size:17px; line-height:1.6; -webkit-font-smoothing:antialiased; }
button,select{ font:inherit; color:inherit; }
a{ color:var(--link); }
:focus-visible{ outline:2px solid var(--amber); outline-offset:3px; }

.top{ max-width:640px; margin:0 auto; padding:16px 20px 12px; display:flex; align-items:baseline; gap:14px; }
.logo{ font-family:var(--digit); font-weight:700; font-size:40px; line-height:1; color:var(--ink); text-decoration:none; flex:none; }
.top h1{ margin:0; font-size:16px; font-weight:500; color:var(--muted); line-height:1.3; }

/* ---------- tuner body ---------- */
.deck{
  max-width:640px; margin:0 auto; padding:14px 16px 18px;
  background:linear-gradient(180deg, var(--stage-2), var(--stage) 40%);
  color:var(--filament); border-radius:28px;
  box-shadow:inset 0 1px 0 rgba(255,235,194,.07), 0 24px 50px -24px rgba(20,10,5,.7);
}
@media (max-width:680px){ .deck{ border-radius:0; } }

.pills{ display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; margin:0 -16px; padding:2px 16px 4px; }
.pills::-webkit-scrollbar{ display:none; }
.pill{ flex:none; border:1px solid rgba(169,133,79,.35); background:var(--stage-3); color:var(--brass-hi); text-decoration:none;
  border-radius:999px; padding:8px 15px; font-size:15px; line-height:1.2; transition:background .15s,color .15s,border-color .15s; }
.pill:hover{ border-color:var(--brass-hi); }
.pill[aria-current="page"]{ background:var(--brass-hi); color:var(--stage); border-color:var(--brass-hi); }

.row2{ display:flex; gap:10px; align-items:center; margin-top:10px; }
.row2 select{
  flex:1; min-width:0; appearance:none; -webkit-appearance:none;
  background:var(--stage-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A9854F' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border:1px solid rgba(169,133,79,.35); border-radius:12px; padding:9px 36px 9px 14px; font-size:15px; color:var(--filament); cursor:pointer;
}
.row2 select:disabled{ cursor:default; background-image:none; }
.a4{ display:flex; align-items:center; gap:5px; font-size:14px; color:var(--brass-hi); flex:none; }
.a4 output{ font-family:var(--text); font-weight:500; font-size:16px; font-variant-numeric:tabular-nums; color:var(--filament); min-width:3.1ch; text-align:center; }
.knob{ width:32px; height:32px; border-radius:50%; border:1px solid rgba(169,133,79,.45); background:var(--stage-3); color:var(--brass-hi); cursor:pointer; font-size:17px; line-height:1; }

.panel{ margin-top:14px; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:4px 18px; min-height:112px; }
.noteblock{ display:flex; flex-direction:column; align-items:center; min-width:2.2em; }
.note{ font-family:var(--digit); font-size:88px; line-height:.9; font-weight:600; color:var(--amber); text-shadow:0 0 18px rgba(255,176,74,.5); transition:color .3s,text-shadow .3s,opacity .3s; }
.note sup{ font-size:.34em; font-weight:400; vertical-align:top; position:relative; top:.3em; margin-left:.03em; color:var(--brass-hi); text-shadow:none; }
.solf{ font-size:13px; color:var(--brass); min-height:1.2em; }
.meta{ min-width:0; }
.hint{ font-size:19px; font-weight:500; color:var(--filament); line-height:1.25; }
.nums{ display:flex; gap:14px; margin-top:6px; font-family:var(--text); font-size:16px; color:var(--brass-hi); font-variant-numeric:tabular-nums; }
.nums .freq{ color:var(--brass); }
.strip{ grid-column:1 / -1; height:12px; margin-top:10px; border-radius:6px; position:relative; overflow:hidden;
  background:repeating-linear-gradient(90deg, rgba(255,176,74,.9) 0 7px, transparent 7px 18px); opacity:.15; transition:opacity .3s; }
.strip::after{ content:""; position:absolute; inset:0; background:linear-gradient(90deg, var(--stage) 0%, transparent 22%, transparent 78%, var(--stage) 100%); }
.deck.active .strip{ opacity:1; }
.deck.tuned .strip{ background:rgba(255,235,194,.95); box-shadow:0 0 16px rgba(255,235,194,.6); }
.deck.tuned .note{ color:var(--filament); text-shadow:0 0 24px rgba(255,235,194,.8); }
.deck.running:not(.active) .note{ opacity:.45; }
.start{ border:0; border-radius:14px; cursor:pointer; padding:14px 22px; font-size:17px; font-weight:600;
  background:var(--amber); color:var(--stage); box-shadow:0 0 30px rgba(255,176,74,.3); display:flex; align-items:center; gap:10px; }
.start::before{ content:""; width:10px; height:10px; border-radius:50%; background:var(--stage); animation:breathe 2.4s ease-in-out infinite; }
@keyframes breathe{ 50%{ opacity:.3; } }
.deck.running .start{ display:none; }
.deck:not(.running) .meta, .deck:not(.running) .noteblock{ display:none; }
.deck:not(.running) .panel{ grid-template-columns:1fr; justify-items:center; }
.deck.running .start{ display:none; }

.stage{ display:block; width:100%; height:auto; aspect-ratio:546/344; max-height:62vh; margin:10px auto 0; }
.stage.vertical{ aspect-ratio:260/470; max-height:58vh; }
.stage text{ font-family:var(--digit); }
.peg{ cursor:pointer; }
.peg:focus{ outline:none; }
.peg:focus-visible .lbl{ fill:var(--amber); text-decoration:underline; }
.peg .lbl{ fill:var(--brass-hi); font-size:25px; font-weight:500; transition:fill .2s; }
.peg:hover .lbl{ fill:var(--filament); }
.peg.hit .lbl{ fill:var(--amber); }
.peg.locked .lbl{ fill:var(--filament); }
.peg .lockring{ opacity:0; transition:opacity .2s; }
.peg.locked .lockring{ opacity:1; }

.controls{ display:flex; justify-content:center; gap:10px; margin-top:8px; flex-wrap:wrap; }
.chip{ border:1px solid rgba(169,133,79,.45); background:transparent; color:var(--brass-hi); border-radius:999px; padding:7px 16px; cursor:pointer; font-size:14px; }
.chip:hover{ border-color:var(--brass-hi); }
.chip[aria-pressed="true"]{ background:var(--brass); color:var(--stage); border-color:var(--brass); }
.status{ margin:10px 0 0; min-height:1.4em; text-align:center; font-size:14px; color:var(--brass-hi); }
.noscript{ text-align:center; color:var(--filament); padding:20px; }

/* ---------- article ---------- */
.seo{ max-width:640px; margin:0 auto; padding:36px 20px 10px; }
.seo .lead{ font-size:19px; line-height:1.5; margin:0 0 8px; max-width:34em; }
.seo h2{ font-family:var(--digit); font-weight:600; font-size:34px; line-height:1.1; margin:34px 0 10px; }
.seo h3{ font-size:17px; font-weight:600; margin:18px 0 4px; }
.seo p, .seo li{ max-width:62ch; }
.seo ol, .seo ul{ padding-left:1.3em; margin:0; }
.seo li{ margin:6px 0; }
.seo .muted{ color:var(--muted); }
.tablewrap{ overflow-x:auto; margin:6px 0; }
.seo table{ border-collapse:collapse; min-width:100%; font-size:16px; }
.seo th, .seo td{ text-align:left; padding:8px 14px 8px 0; border-bottom:1px solid var(--rule); white-space:nowrap; }
.seo th{ font-weight:500; color:var(--muted); font-size:14px; }
.seo td.n{ font-variant-numeric:tabular-nums; font-weight:500; }
.faq details{ border-bottom:1px solid var(--rule); padding:10px 0; }
.faq summary{ cursor:pointer; font-weight:600; }
.faq details p{ margin:8px 0 2px; }

footer{ max-width:640px; margin:34px auto 0; padding:22px 20px 40px; color:var(--muted); font-size:14px; border-top:1px solid var(--rule); }
footer nav{ display:flex; flex-wrap:wrap; gap:6px 16px; margin-bottom:12px; }
footer nav a{ color:var(--muted); }
@media (max-width:380px){ .note{ font-size:72px; } .hint{ font-size:17px; } }
@media (prefers-reduced-motion: reduce){ .start::before{ animation:none; } }
