/* trainer.css — тренажёр нот, встроен в go-music (шаг 1). Всё заскоуплено под #trnRoot,
   чтобы не задеть дизайн v9. Палитра совпадает с сайтом. keyframes переименованы
   (sheen→trnsheen и т.п.), чтобы не переопределять глобальные анимации сайта. */
#trnRoot{
  --white:#FFFFFF; --paper:#FCFCFA; --pearl:#F6F4EF; --pearl-2:#EFEBE2;
  --ink:#1A1814; --ink-soft:#6B6358; --ink-faint:#9C9486;
  --hair:#ECE7DD; --hair-2:#E3DCCD;
  --gold:#B8862F; --gold-mid:#C9A24B; --gold-lt:#E8C77E; --gold-pale:#F2E3B8; --gold-deep:#8C641F;
  --string-red:#C46856;
  --grad-gold:linear-gradient(110deg,var(--gold-deep) 0%,var(--gold) 22%,var(--gold-mid) 42%,var(--gold-pale) 50%,var(--gold-mid) 58%,var(--gold) 78%,var(--gold-deep) 100%);
  --display:"Fraunces",Georgia,serif;
  --body:"Hanken Grotesk",system-ui,-apple-system,sans-serif;
  background:var(--paper);color:var(--ink);font-family:var(--body);font-weight:400;line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden;
  background-image:radial-gradient(1200px 600px at 50% -10%,rgba(242,227,184,.28),transparent 60%);min-height:100vh
}
#trnRoot *{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
@keyframes trnsheen{to{background-position:220% 0}}
@keyframes trnpop{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:none}}
@keyframes trnrowglow{0%,100%{box-shadow:0 0 0 0 rgba(184,134,47,0)}50%{box-shadow:0 0 0 5px rgba(201,162,75,.4)}}
#trnRoot .gold-text{background:var(--grad-gold);background-size:220% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;animation:trnsheen 9s linear infinite}
#trnRoot .wrap{max-width:820px;margin:0 auto;padding:26px 18px 90px}
#trnRoot .top{text-align:center;margin-bottom:8px}
#trnRoot .top .eyebrow{display:inline-flex;align-items:center;gap:10px;font-size:11px;letter-spacing:.24em;text-transform:uppercase;font-weight:600;color:var(--gold-deep)}
#trnRoot .top .eyebrow::before, #trnRoot .top .eyebrow::after{content:"";width:26px;height:1px;background:var(--gold-mid)}
#trnRoot .top h1{font-family:var(--display);font-weight:400;font-size:clamp(28px,7vw,42px);line-height:1.04;margin:12px 0 6px}
#trnRoot .top p{color:var(--ink-soft);font-size:15px;max-width:52ch;margin:0 auto}
#trnRoot .seg{display:flex;gap:4px;margin:20px auto 0;max-width:360px;padding:4px;border-radius:16px;
  background:linear-gradient(160deg,rgba(255,255,255,.7),rgba(255,252,245,.55));
  border:1px solid rgba(184,134,47,.4);box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 10px 30px -22px rgba(140,100,31,.5)}
#trnRoot .seg button{flex:1;position:relative;border:none;background:transparent;font-family:var(--body);font-weight:600;font-size:14px;color:var(--ink-soft);
  padding:11px 8px;border-radius:12px;cursor:pointer;letter-spacing:.03em;display:flex;align-items:center;justify-content:center;gap:7px;transition:color .2s}
#trnRoot .seg button:hover{transform:none;box-shadow:none}   /* тачскрин: без подъёма/залипания */
#trnRoot .seg button.on:hover{box-shadow:0 0 0 1px var(--gold-mid),inset 0 1px 0 rgba(255,255,255,.8),0 6px 14px -8px rgba(184,134,47,.5)}
#trnRoot .seg button.on{padding-right:28%}                   /* освобождаем правую зону под звук, текст левее */
#trnRoot .seg button .ic{font-size:16px;line-height:1}
#trnRoot .seg button.on{color:var(--gold-deep);background:linear-gradient(180deg,#FFF7E4,#F6E7C0);
  box-shadow:0 0 0 1px var(--gold-mid),inset 0 1px 0 rgba(255,255,255,.8),0 6px 14px -8px rgba(184,134,47,.5)}
#trnRoot .crumbs{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:26px 0 18px;font-size:15px;color:var(--ink-faint)}
#trnRoot .crumbs .sep{color:var(--gold-mid)}
#trnRoot .crumbs a{cursor:pointer;color:var(--ink-soft)}
#trnRoot .crumbs a:hover{color:var(--gold-deep)}
#trnRoot .crumbs .cur{color:var(--ink);font-weight:500}
#trnRoot .section-h{font-family:var(--display);font-weight:400;font-size:23px;text-align:center;margin:34px 0 18px;color:var(--ink)}
#trnRoot .section-h .s{display:block;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-deep);font-family:var(--body);font-weight:600;margin-bottom:2px}
#trnRoot .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px}
#trnRoot .tile{position:relative;background:linear-gradient(160deg,rgba(255,255,255,.82),rgba(255,252,245,.64));
  border:1px solid rgba(184,134,47,.4);border-radius:18px;padding:22px;cursor:pointer;transition:transform .18s,box-shadow .18s,border-color .18s;
  box-shadow:0 12px 34px -26px rgba(140,100,31,.5)}
#trnRoot .tile:hover{transform:translateY(-3px);border-color:var(--gold-mid);box-shadow:0 20px 44px -26px rgba(140,100,31,.6)}
#trnRoot .tile .ico{width:56px;height:42px;margin-bottom:16px;display:flex;gap:2px;align-items:center}
#trnRoot .tile .ico.kb i{flex:1;background:linear-gradient(180deg,#FFFDF9,#EFE7D6);border:1px solid var(--hair-2);border-radius:0 0 4px 4px;position:relative;height:100%}
#trnRoot .tile .ico.kb i::after{content:"";position:absolute;top:0;left:60%;width:42%;height:60%;background:linear-gradient(180deg,#2A2620,#4A4034);border-radius:0 0 3px 3px}
#trnRoot .tile .ico.kb i:last-child::after{display:none}
#trnRoot .tile .ico.st{color:var(--gold-deep)}
#trnRoot .tile .ico.st svg{height:42px;width:auto}
#trnRoot .tile h3{font-family:var(--display);font-weight:400;font-size:21px;margin-bottom:4px}
#trnRoot .tile .sub{font-size:13px;color:var(--ink-soft)}
#trnRoot .tile.lock{opacity:.55;cursor:not-allowed}
#trnRoot .tile.lock::after{content:"🔒";position:absolute;top:18px;right:20px;font-size:15px}
#trnRoot .exlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
#trnRoot .excard{background:linear-gradient(160deg,rgba(255,255,255,.82),rgba(255,252,245,.6));
  border:1px solid var(--hair-2);border-radius:16px;padding:20px;display:flex;flex-direction:column;min-height:158px}
#trnRoot .excard .num{font-family:var(--display);font-size:30px;color:var(--gold-deep);line-height:1;margin-bottom:10px}
#trnRoot .excard .txt{font-size:15px;color:var(--ink);flex:1}
#trnRoot .excard .kind{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint);margin-top:6px}
#trnRoot .excard .go{margin-top:14px;align-self:flex-start;padding:10px 24px;border:none;border-radius:12px;cursor:pointer;
  font-family:var(--body);font-weight:600;font-size:14px;color:#fff;background:var(--grad-gold);background-size:220% 100%;box-shadow:0 8px 18px -10px rgba(184,134,47,.7)}
#trnRoot .exhead{display:flex;align-items:center;gap:16px;margin-top:10px;margin-bottom:10px}
#trnRoot .exhead .close{width:34px;height:34px;flex:none;border-radius:50%;border:1px solid var(--hair-2);background:rgba(255,255,255,.7);cursor:pointer;font-size:18px;color:var(--ink-soft);display:flex;align-items:center;justify-content:center}
#trnRoot .bar{flex:1;display:block;max-width:none;padding:0;height:8px;border-radius:20px;background:var(--hair);overflow:hidden}
#trnRoot .bar > i{display:block;height:100%;width:0;background:var(--grad-gold);background-size:220% 100%;animation:trnsheen 6s linear infinite;transition:width .35s cubic-bezier(.16,1,.3,1)}
#trnRoot .exhead .cnt{font-size:13px;color:var(--ink-soft);flex:none;min-width:42px;text-align:right}
#trnRoot .qtitle{font-family:var(--display);font-weight:400;font-size:clamp(24px,5vw,34px);text-align:center;margin:26px 0 6px;transition:color .2s}
#trnRoot .qtitle .ng{font-size:1.16em;font-weight:500}
#trnRoot .qhint{text-align:center;color:var(--ink-soft);font-size:14px;min-height:20px;margin-bottom:6px}
#trnRoot .qhint b{color:var(--gold-deep);font-weight:600}
/* клавиатура */
#trnRoot .keys{position:relative;height:220px;margin-top:20px;user-select:none;touch-action:manipulation}
#trnRoot .whites{display:flex;height:100%;gap:2px}
#trnRoot .white{position:relative;flex:1;background:linear-gradient(180deg,#FFFDF9,#F4EFE4);border:1px solid #E4DCC9;border-radius:0 0 8px 8px;cursor:pointer;box-shadow:inset 0 -6px 10px -8px rgba(140,100,31,.3);transition:background .12s,transform .05s}
#trnRoot .white:active{transform:translateY(1px)}
#trnRoot .white.sel{background:linear-gradient(180deg,#FFF7E4,#F6E7C0);box-shadow:inset 0 -10px 16px -8px rgba(184,134,47,.55),0 0 0 2px var(--gold-mid)}
#trnRoot .white.pick{background:linear-gradient(180deg,#FFFBEF,#F3E6C6);box-shadow:inset 0 -8px 14px -8px rgba(184,134,47,.4),0 0 0 2px var(--gold-lt)}
#trnRoot .white.good{background:linear-gradient(180deg,#FCEBB8,#EAC77A)}
#trnRoot .white.wrong{background:linear-gradient(180deg,#F4D9D1,#E7B3A6)}
#trnRoot .blacks{position:absolute;top:0;left:0;right:0;height:62%;pointer-events:none}
#trnRoot .black{position:absolute;transform:translateX(-50%);height:100%;background:linear-gradient(180deg,#2A2620,#4A4034);border-radius:0 0 6px 6px;box-shadow:0 5px 9px -3px rgba(0,0,0,.5),inset 0 -3px 4px rgba(255,255,255,.05);cursor:pointer;pointer-events:auto;transition:transform .05s,filter .1s,background .12s}
#trnRoot .black:active{transform:translateX(-50%) translateY(1px)}
#trnRoot .black.flash{filter:brightness(1.7)}
#trnRoot .black.sel{background:linear-gradient(180deg,#E8C77E,#B8862F);box-shadow:0 5px 9px -3px rgba(140,100,31,.5),0 0 0 2px var(--gold-mid)}
#trnRoot .black.pick{background:linear-gradient(180deg,#C9A24B,#8A6520)}
#trnRoot .black.good{background:linear-gradient(180deg,#EAC77A,#C9A24B)}
#trnRoot .black.wrong{background:linear-gradient(180deg,#C46856,#9A4030)}
/* нотный стан */
#trnRoot .staff{margin-top:14px;display:flex;justify-content:center;user-select:none}
#trnRoot .staffsvg{width:100%;max-width:600px;height:auto;touch-action:none}
#trnRoot .staffsvg .stl{stroke:var(--ink);stroke-width:1.6}
#trnRoot .staffsvg .led{stroke:var(--ink);stroke-width:1.6}
#trnRoot .staffsvg .clefpath{fill:var(--ink);stroke:none;transition:fill .25s,filter .25s}
#trnRoot .staffsvg .clef.good{filter:drop-shadow(0 0 7px rgba(201,162,75,.85))}
#trnRoot .staffsvg .clef.bad .clefpath{fill:var(--string-red)}
#trnRoot .staffsvg .nt{fill:var(--ink);stroke:var(--ink);stroke-width:2.4;transition:fill .2s,stroke .2s}
#trnRoot .staffsvg .nt.good{fill:var(--gold);stroke:var(--gold);filter:drop-shadow(0 0 6px rgba(201,162,75,.8))}
#trnRoot .staffsvg .nt.bad{fill:var(--string-red);stroke:var(--string-red)}
#trnRoot .staffsvg .nt.ghost{fill:var(--gold-lt);stroke:var(--gold-mid);opacity:.75}
#trnRoot .staffsvg .nt.preview{fill:var(--gold-lt);stroke:var(--gold-mid);opacity:.32}
#trnRoot .staffsvg .accsign{font-family:var(--display);font-size:44px;font-weight:500;fill:var(--ink);transition:fill .25s}
#trnRoot .staffsvg .accsign.good{fill:var(--gold)}
#trnRoot .staffsvg .accsign.bad{fill:var(--string-red)}
#trnRoot .staffsvg .accsign.ghost{fill:var(--gold-mid);opacity:.75}
#trnRoot .staffsvg .accsign.preview{fill:var(--gold-mid);opacity:.32}
#trnRoot .staffsvg .zone{fill:transparent;cursor:pointer}
#trnRoot .staffsvg .zone:hover{fill:rgba(201,162,75,.12)}
/* варианты */
#trnRoot .opts{display:flex;flex-direction:column;gap:10px;align-items:center;margin-top:26px}
#trnRoot .opt-row{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;padding:4px;border-radius:14px}
#trnRoot .opt-row.flash-row{animation:trnrowglow 1s ease-in-out 3;box-shadow:0 0 0 3px rgba(201,162,75,.3)}
#trnRoot .opt{padding:9px 16px;border-radius:11px;font-family:var(--display);font-size:16px;font-weight:400;cursor:pointer;color:var(--ink);background:rgba(255,255,255,.7);border:1px solid var(--hair-2);min-width:52px;text-align:center;transition:all .16s;touch-action:manipulation}
@media(hover:hover){#trnRoot .opt:hover{border-color:var(--gold-mid)}}
#trnRoot .opt.off{opacity:.4;pointer-events:none;color:var(--ink-faint)}
#trnRoot .opt.ok{color:var(--gold-deep);
  background:linear-gradient(rgba(255,255,255,.92),rgba(255,255,255,.92)) padding-box, var(--grad-gold) border-box;
  background-size:auto,220% 100%;border:1.5px solid transparent;
  box-shadow:0 0 0 3px rgba(201,162,75,.28),0 8px 20px -10px rgba(184,134,47,.5);
  animation:trnsheen 6s linear infinite, trnoptglow .55s ease-out}
@keyframes trnoptglow{0%{box-shadow:0 0 0 0 rgba(201,162,75,.65),0 0 22px 2px rgba(201,162,75,.5)}100%{box-shadow:0 0 0 3px rgba(201,162,75,.28),0 8px 20px -10px rgba(184,134,47,.5)}}
#trnRoot .opt.bad{color:var(--string-red);border-color:var(--string-red);background:rgba(196,104,86,.08)}
#trnRoot .answer{display:flex;justify-content:center;margin-top:26px}
#trnRoot .answer button{padding:13px 40px;border:1px solid var(--hair-2);border-radius:14px;cursor:pointer;font-family:var(--body);font-weight:600;font-size:15px;color:var(--ink-faint);background:rgba(255,255,255,.6);transition:all .18s}
#trnRoot .answer button.ready{color:#fff;background:var(--grad-gold);background-size:220% 100%;border-color:transparent;box-shadow:0 10px 24px -12px rgba(184,134,47,.7)}
#trnRoot .result{text-align:center;margin-top:10px;background:linear-gradient(160deg,rgba(255,255,255,.82),rgba(255,252,245,.66));border:1px solid rgba(184,134,47,.55);border-radius:20px;padding:34px 24px;box-shadow:0 18px 50px -30px rgba(140,100,31,.4);animation:trnpop .4s cubic-bezier(.16,1,.3,1)}
#trnRoot .result .pic{width:170px;height:170px;margin:0 auto 16px;border-radius:22px;border:3px solid transparent;
  background:linear-gradient(rgba(242,227,184,.25),rgba(242,227,184,.25)) padding-box, var(--grad-gold) border-box;
  background-size:auto, 220% 100%; animation:trnsheen 6s linear infinite;
  display:flex;align-items:center;justify-content:center;color:var(--gold-deep);font-size:12px;text-align:center;padding:12px;
  box-shadow:0 12px 30px -14px rgba(184,134,47,.5)}
#trnRoot .result h2{font-family:var(--display);font-weight:400;font-size:30px;margin-bottom:6px}
#trnRoot .result .score{font-family:var(--display);font-size:52px;color:var(--gold-deep);line-height:1;margin:8px 0}
#trnRoot .result .rbtns{display:flex;gap:12px;justify-content:center;margin-top:22px;flex-wrap:wrap}
#trnRoot .result .rbtns button{padding:13px 26px;border-radius:14px;cursor:pointer;font-family:var(--body);font-weight:600;font-size:15px;border:1px solid var(--hair-2);background:rgba(255,255,255,.7);color:var(--ink)}
#trnRoot .result .rbtns button.pri{color:#fff;background:var(--grad-gold);background-size:220% 100%;border-color:transparent;box-shadow:0 10px 24px -12px rgba(184,134,47,.7)}
#trnRoot .hidden{display:none !important}
#trnRoot .soon{text-align:center;margin-top:50px;color:var(--ink-soft)}
#trnRoot .soon .big{font-family:var(--display);font-size:26px;color:var(--gold-deep);margin-bottom:8px}
#trnRoot .note-sandbox{margin-top:54px;padding:16px 18px;border-radius:14px;background:rgba(242,227,184,.22);border:1px dashed var(--gold-mid);font-size:13px;color:var(--ink-soft);line-height:1.6}
#trnRoot .note-sandbox b{color:var(--gold-deep)}
#trnRoot .modal-ov{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px;
  background:rgba(26,24,20,.4);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);animation:trnpop .25s ease}
#trnRoot .modal{width:100%;max-width:380px;background:linear-gradient(160deg,#FFFDF9,#F6F0E4);border:1px solid rgba(184,134,47,.5);
  border-radius:22px;padding:30px 26px;text-align:center;box-shadow:0 30px 70px -30px rgba(140,100,31,.55)}
#trnRoot .modal h3{font-family:var(--display);font-weight:400;font-size:24px;margin-bottom:6px}
#trnRoot .modal .msub{font-size:13px;color:var(--ink-soft);margin-bottom:20px}
#trnRoot .modal .mval{font-family:var(--display);font-size:56px;color:var(--gold-deep);line-height:1;margin-bottom:18px}
#trnRoot .modal input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:6px;border-radius:20px;
  background:linear-gradient(90deg,var(--gold-mid),var(--gold-lt));outline:none;margin:8px 0 4px}
#trnRoot .modal input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:26px;height:26px;border-radius:50%;
  background:var(--grad-gold);background-size:220% 100%;box-shadow:0 4px 12px -4px rgba(184,134,47,.8),0 0 0 4px rgba(255,255,255,.7);cursor:pointer}
#trnRoot .modal input[type=range]::-moz-range-thumb{width:26px;height:26px;border:none;border-radius:50%;background:var(--gold);box-shadow:0 4px 12px -4px rgba(184,134,47,.8);cursor:pointer}
#trnRoot .modal .mminmax{display:flex;justify-content:space-between;font-size:12px;color:var(--ink-faint);margin-bottom:22px}
#trnRoot .modal .mbtns{display:flex;gap:12px}
#trnRoot .modal .mbtns button{flex:1;padding:13px;border-radius:14px;cursor:pointer;font-family:var(--body);font-weight:600;font-size:15px;border:1px solid var(--hair-2);background:rgba(255,255,255,.7);color:var(--ink)}
#trnRoot .modal .mbtns button.pri{color:#fff;background:var(--grad-gold);background-size:220% 100%;border-color:transparent;box-shadow:0 10px 24px -12px rgba(184,134,47,.7)}

/* мобильные отступы 15px от краёв (приоритет — телефон). Тонкая настройка тап-таргетов — в шаге 5b. */
@media(max-width:760px){
  #trnRoot .wrap{padding-left:15px;padding-right:15px}
}

/* ── п.7: CTA-кнопки в стиле сайта ─────────────────────────────────────────
   Покой — «белое стекло» (как .cab-link/.sound). Наведение — переливающийся
   золотой контур (padding/border-box + trnsheen) и лёгкий подъём. Без
   @media(hover:hover): у Дориэля hover:none, но мышь на планшете работает. */
#trnRoot .excard .go,
#trnRoot .answer button.ready,
#trnRoot .result .rbtns button.pri{
  color:var(--gold-deep);
  background:linear-gradient(rgba(255,255,255,.72),rgba(255,255,255,.72)) padding-box;
  border:1.5px solid var(--hair-2);
  -webkit-backdrop-filter:blur(8px) saturate(1.1);backdrop-filter:blur(8px) saturate(1.1);
  box-shadow:0 8px 20px -14px rgba(140,100,31,.4);
  transition:transform .18s,box-shadow .25s,border-color .25s,background .25s
}
#trnRoot .result .rbtns button{
  color:var(--ink);
  background:linear-gradient(rgba(255,255,255,.6),rgba(255,255,255,.6)) padding-box;
  border:1.5px solid var(--hair-2);
  transition:transform .18s,box-shadow .25s,border-color .25s,background .25s
}
#trnRoot .excard .go:hover,
#trnRoot .answer button.ready:hover,
#trnRoot .result .rbtns button:hover{
  border-color:transparent;
  background:linear-gradient(rgba(255,255,255,.85),rgba(255,255,255,.85)) padding-box, var(--grad-gold) border-box;
  background-size:auto,220% 100%;
  animation:trnsheen 6s linear infinite;
  color:var(--gold-deep);
  transform:translateY(-2px);
  box-shadow:0 16px 30px -16px rgba(184,134,47,.55)
}
#trnRoot .excard .go:active,
#trnRoot .answer button.ready:active,
#trnRoot .result .rbtns button:active{transform:translateY(0) scale(.98)}

/* поздравительный подзаголовок на экране результата (п.6) */
#trnRoot .result .rsub{font-size:14px;color:var(--ink-soft);margin-bottom:2px}

/* п.3: широкая клавиатура (2 октавы) — ниже по высоте (~-35%) и шире (меньше боковые отступы) */
#trnRoot .keys.wide{height:143px}
@media(max-width:760px){
  #trnRoot .keys.wide{margin-left:-8px;margin-right:-8px}   /* ~7px от края вместо 15 → клавиши шире */
}

/* п.7: PWA-режим. В установленном приложении (standalone) прячем веб-подвал
   и показываем компактный бар: разработка + возврат на начальный экран.
   Правила незаскоуплены намеренно — файл грузится только на /trainer. */
.trn-app-bar{display:none}
body.kz-standalone #trnFoot{display:none}
body.kz-standalone .trn-app-bar{display:flex;flex-direction:column;align-items:flex-start;gap:12px;
    max-width:820px;margin:24px auto 0;padding:16px 15px calc(16px + env(safe-area-inset-bottom));
    border-top:1px solid var(--hair);font-size:13px;color:var(--ink-faint)}
body.kz-standalone .trn-app-bar a{color:var(--gold-deep);text-decoration:none}
body.kz-standalone .trn-app-bar .tab-back{font-weight:600;padding:9px 16px;border:1px solid var(--hair-2);border-radius:40px;
    background:rgba(255,255,255,.6);color:var(--ink)}

/* п.1: на десктопе — одна октава на ~20% меньше (пропорции сохранены, по центру),
   две октавы — во всю ширину (утверждено, выглядит отлично) */
@media(min-width:761px){
  #trnRoot .keys{height:202px;max-width:627px;margin-left:auto;margin-right:auto}
  #trnRoot .keys.wide{height:186px;max-width:none}
}
/* п.5: на мобиле кнопки выбора ответа компактнее и в один ряд (диезы/чистые/бемоли),
   как в референсе — 7 колонок равной ширины */
@media(max-width:760px){
  #trnRoot .opts{gap:6px;margin-top:18px}
  #trnRoot .opt-row{gap:5px;flex-wrap:nowrap;width:100%;padding:2px}
  #trnRoot .opt{flex:1 1 0;min-width:0;padding:9px 3px;font-size:14px;border-radius:10px}
}

/* ── ГИТАРА (раздел, вариант B) ─────────────────────────────────────
   Плашки/опции/результат берут классы фортепиано. Ниже — только гриф. */
#trnRoot .tile .ico.gtr{font-size:30px;line-height:1;display:flex;align-items:center;justify-content:flex-start}
#trnRoot .gtr-stage{display:flex;gap:44px;align-items:flex-start;justify-content:center;margin-top:6px}
@media(max-width:760px){#trnRoot .gtr-stage{flex-direction:column-reverse;align-items:center;gap:20px}}
#trnRoot .gtr-board-col{flex:none}
#trnRoot .gtr-task-col{flex:1;max-width:540px;min-width:280px}
#trnRoot .gtr-scroll{overflow-y:auto;-webkit-overflow-scrolling:touch;-webkit-mask-image:linear-gradient(180deg,#000 82%,transparent);mask-image:linear-gradient(180deg,#000 82%,transparent)}
#trnRoot .gtr-scroll::-webkit-scrollbar{width:6px}#trnRoot .gtr-scroll::-webkit-scrollbar-thumb{background:var(--hair-2);border-radius:3px}
#trnRoot .gtr-stack{position:relative}
#trnRoot svg.gtr-fb{display:block;position:relative;z-index:1}
#trnRoot canvas.gtr-strings{position:absolute;left:0;top:0;z-index:2;pointer-events:none}
#trnRoot .gtr-openlbl{font-family:var(--display);font-style:italic;font-weight:600;font-size:13px;fill:var(--gold-deep);text-anchor:middle;dominant-baseline:central;opacity:.7}
#trnRoot .gtr-rn{font-family:var(--display);font-style:italic;font-weight:600;font-size:17px;fill:var(--gold-deep);text-anchor:middle;dominant-baseline:central}
#trnRoot .gtr-onum{font:600 13px var(--display);fill:var(--ink-soft);text-anchor:middle;dominant-baseline:central;pointer-events:none}
#trnRoot .gtr-cell{cursor:default}
#trnRoot .gtr-box{fill:url(#gtrWood);stroke:#E7E1D4;stroke-width:1;transition:fill .12s,stroke .12s}
#trnRoot .gtr-cell.gtr-inactive{opacity:.48}
#trnRoot .gtr-cell.gtr-inactive .gtr-box{fill:#F1ECE1;stroke:#E8E1D2}
#trnRoot .gtr-cell.gtr-inactive .gtr-onum{fill:#CFC7B6}
#trnRoot .gtr-cell.gtr-active{cursor:pointer}
#trnRoot .gtr-cell.gtr-active .gtr-box{fill:url(#gtrWood);stroke:var(--gold);stroke-opacity:.55;stroke-width:1}
@media(hover:hover){#trnRoot .gtr-cell.gtr-active:hover .gtr-box{fill:#FBF3DD;stroke-opacity:1}}
#trnRoot .gtr-cell.gtr-ask .gtr-box{fill:url(#gtrAsk);stroke:var(--gold-mid);stroke-width:2;animation:gtrAskPulse 1.3s ease-in-out infinite}
@keyframes gtrAskPulse{0%,100%{stroke:#C9A24B;filter:drop-shadow(0 0 2px rgba(184,134,47,.45))}50%{stroke:#B8862F;filter:drop-shadow(0 0 8px rgba(201,162,75,.95))}}
#trnRoot .gtr-cell.gtr-good .gtr-box{fill:url(#gtrGlass);stroke:#C9A24B;stroke-width:2}
#trnRoot .gtr-cell.gtr-wrong .gtr-box{fill:#F4D9D1;stroke:var(--string-red);stroke-width:2}

/* ── Гитара: выравнивание/отступы. Опции используют классы фортепиано
   (.opt/.opt-row/.flash-row); ниже — только гитарные уточнения раскладки. ── */
#trnRoot #gtrEx .qtitle{margin-top:8px;white-space:nowrap}   /* меняется только текст → без прыжков */
#trnRoot .gtr-board-col{padding-top:0}
#trnRoot .gtr-stage{gap:24px}

/* Статус-бар вынесен НАД сценой — по центру, ограниченная ширина. Заливка бара
   гитары — сплошное золото с бегущим бликом (без тёмных «пустых» концов). */
#trnRoot #gtrEx > .exhead{max-width:520px;margin:6px auto 14px}
#trnRoot #gtrEx .bar > i{background:linear-gradient(110deg,var(--gold) 0%,var(--gold-pale) 25%,var(--gold-mid) 50%,var(--gold-pale) 75%,var(--gold) 100%);background-size:220% 100%}

@media(min-width:761px){
  #trnRoot #gtrEx{width:min(1040px, calc(100vw - 48px));position:relative;left:50%;transform:translateX(-50%)}
  /* сцена компактнее: гриф ↔ колонка задания ≈ 30px, колонка не растягивается */
  #trnRoot .gtr-stage{gap:30px}
  #trnRoot .gtr-task-col{flex:0 1 auto;max-width:none;min-width:0}
  #trnRoot #gtrEx .qtitle{min-height:46px;display:flex;align-items:center;justify-content:center}
  #trnRoot #gtrEx .qtitle.gtr-prompt{font-size:clamp(18px,2.4vw,24px)}
  /* компактные кнопки ответов */
  #trnRoot #gtrEx .opts{margin-top:18px}
  #trnRoot #gtrEx .opt{padding:8px 10px;font-size:15px;min-width:0;white-space:nowrap}
  /* обычные ноты: ОДИН ряд равной ширины (до-ре-ми-фа-соль-ля-си) */
  #trnRoot #gtrEx #gtrOpts.one .opt-row{display:flex;flex-wrap:nowrap;gap:8px;justify-content:center}
  #trnRoot #gtrEx #gtrOpts.one .opt{flex:0 0 62px}
  /* альтерации: ровная решётка 3×7 — диез/чистая/бемоль строго друг под другом */
  #trnRoot #gtrEx #gtrOpts.tri{max-width:500px;margin-left:auto;margin-right:auto}
  #trnRoot #gtrEx #gtrOpts.tri .opt-row{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
  #trnRoot #gtrEx #gtrOpts.tri .opt{flex:none;padding:8px 6px}
}
@media(max-width:760px){
  #trnRoot #gtrEx .qtitle{margin-top:10px}
  #trnRoot #gtrEx > .exhead{margin-top:6px;margin-bottom:6px}
  #trnRoot .gtr-stage{gap:8px}                                /* опции ближе к грифу */
  #trnRoot .gtr-task-col{max-width:none;min-width:0;align-self:stretch}
  /* размер шрифта кнопок подстраивается под ширину — ♯/♭ (в т.ч. «соль♯») влезают
     на узких/низкоплотных экранах; текст не переносится */
  #trnRoot #gtrEx .opt{font-size:clamp(11px,3.3vw,16px);white-space:nowrap;letter-spacing:-.01em;padding-left:10px;padding-right:10px}
}

/* Завершение теста: гриф убираем, модалку поздравления — по центру */
#trnRoot #gtrEx.gtr-done .gtr-board-col{display:none}
#trnRoot #gtrEx.gtr-done .gtr-stage{justify-content:center;gap:0}
#trnRoot #gtrEx.gtr-done .gtr-task-col{max-width:520px;width:100%;flex:0 1 520px}

/* ── звук: широкая зона тапа (правые ~28% активной кнопки), значок справа ── */
#trnRoot .seg button .snd{position:absolute;top:0;bottom:0;right:0;width:28%;display:none;align-items:center;justify-content:center;
  border-left:1px solid rgba(140,110,50,.32);font-size:18px;line-height:1;opacity:.4;filter:grayscale(1);
  transition:opacity .2s,filter .2s;-webkit-tap-highlight-color:transparent}
#trnRoot .seg button.on .snd{display:flex}
#trnRoot .seg button.on .snd.sndon{opacity:1;filter:none}
#trnRoot .seg button.on .snd:active{transform:scale(.9)}
#trnRoot .snd-toast{position:fixed;left:50%;top:22%;transform:translate(-50%,-6px);max-width:min(420px,86vw);text-align:center;background:rgba(28,24,18,.92);color:#FFF7E4;padding:12px 20px;border-radius:18px;font-size:15px;font-weight:600;z-index:9999;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;box-shadow:0 8px 30px rgba(0,0,0,.25)}
#trnRoot .snd-toast .sub{display:block;margin-top:5px;font-size:13px;font-weight:400;opacity:.85;line-height:1.35}
#trnRoot .snd-toast.show{opacity:1;transform:translate(-50%,0)}
