.bik-root{--bg:#070b12;--line:rgba(160,220,255,.14);--txt:#d8f2ff;--muted:rgba(216,242,255,.7);--acc:#7cf7ff;--acc2:#ffd27a;--danger:#ff3b5c;
font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;color:var(--txt);
background:linear-gradient(180deg,#05070c,#070b12 40%,#05070c);border:1px solid var(--line);border-radius:18px;overflow:hidden}
.bik-root *{box-sizing:border-box}
.bik-topbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;background:rgba(10,16,27,.9);border-bottom:1px solid var(--line)}
.bik-brand{display:flex;align-items:center;gap:10px}
.bik-logo{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:rgba(124,247,255,.10);border:1px solid rgba(124,247,255,.25);font-weight:800;letter-spacing:.08em}
.bik-name{font-weight:900;letter-spacing:.14em;font-size:12px}
.bik-sub{font-size:11px;color:var(--muted)}
.bik-status{display:flex;gap:8px;flex-wrap:wrap}
.bik-pill{font-size:11px;letter-spacing:.12em;padding:8px 10px;border-radius:999px;border:1px solid var(--line);background:rgba(0,0,0,.18);color:var(--muted)}
.bik-pill--arm{cursor:pointer;border-color:rgba(124,247,255,.35);color:var(--txt);background:rgba(124,247,255,.08)}
.bik-pill--arm.bik-armed{background:rgba(124,247,255,.16)}
.bik-actions{display:flex;gap:8px}
.bik-btn{border:1px solid var(--line);background:rgba(0,0,0,.18);color:var(--txt);padding:10px 12px;border-radius:12px;font-weight:800;letter-spacing:.08em;font-size:11px;cursor:pointer}
.bik-btn--danger{border-color:rgba(255,59,92,.4);background:rgba(255,59,92,.10)}
.bik-screen{padding:12px 14px;border-bottom:1px solid var(--line)}
.bik-screenRow{display:grid;grid-template-columns:1.2fr .6fr;gap:12px}
.bik-screenLeft,.bik-screenRight{border:1px solid var(--line);border-radius:16px;padding:10px;background:rgba(0,0,0,.18)}
.bik-scope,.bik-bars{width:100%;height:auto;border-radius:12px;background:rgba(0,0,0,.22);border:1px solid rgba(124,247,255,.12)}
.bik-screenHud{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.bik-hudItem{font-size:11px;border:1px solid var(--line);background:rgba(0,0,0,.18);padding:7px 9px;border-radius:999px}
.bik-hudKey{color:var(--muted);margin-right:6px}
.bik-tip{margin-top:10px;border:1px dashed rgba(255,210,122,.25);background:rgba(255,210,122,.06);border-radius:14px;padding:10px}
.bik-tipTitle{font-weight:900;letter-spacing:.12em;font-size:11px;color:rgba(255,210,122,.92)}
.bik-tipText{font-size:12px;color:var(--muted);line-height:1.35}
.bik-presetRow,.bik-controlRow{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line);background:rgba(0,0,0,.08)}
.bik-rowTitle{font-weight:900;letter-spacing:.14em;font-size:11px;color:rgba(124,247,255,.92);min-width:92px}
.bik-presetStrip{display:flex;gap:8px;overflow:auto;padding:4px 0}
.bik-presetBtn{white-space:nowrap;padding:10px 12px;border-radius:999px;border:1px solid var(--line);background:rgba(0,0,0,.14);font-weight:800;font-size:11px;letter-spacing:.08em;cursor:pointer}
.bik-presetBtn.bik-active{background:rgba(124,247,255,.12);border-color:rgba(124,247,255,.55)}
.bik-rowTools{margin-left:auto}
.bik-chipGroup{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bik-chipLabel{font-size:11px;color:var(--muted);letter-spacing:.12em;margin-right:4px}
.bik-chip{padding:9px 10px;border-radius:999px;border:1px solid var(--line);background:rgba(0,0,0,.12);font-weight:900;font-size:11px;letter-spacing:.10em;cursor:pointer}
.bik-chip.bik-active{background:rgba(124,247,255,.14);border-color:rgba(124,247,255,.6)}
.bik-keysWrap{padding:12px 14px;border-bottom:1px solid var(--line)}
.bik-keys{display:grid;gap:6px;user-select:none;touch-action:none;padding:6px}
.bik-key{position:relative;height:46px;border-radius:14px;border:1px solid rgba(160,220,255,.16);background:linear-gradient(180deg,rgba(12,20,35,.8),rgba(7,12,20,.85));
display:flex;align-items:center;justify-content:space-between;padding:0 10px;cursor:pointer}
.bik-key.bik-on{border-color:rgba(124,247,255,.55);box-shadow:0 0 0 2px rgba(124,247,255,.10) inset}
.bik-keyNote{font-weight:900;letter-spacing:.10em;font-size:11px}
.bik-keyHz{font-size:11px;color:var(--muted)}
.bik-keyMark{position:absolute;top:7px;left:7px;width:8px;height:8px;border-radius:99px;opacity:.0}
.bik-keyMark.root{background:rgba(124,247,255,.95);opacity:.85}
.bik-keyMark.fifth{background:rgba(255,210,122,.95);opacity:.85}
.bik-keyMark.oct{background:rgba(255,59,92,.95);opacity:.85}
.bik-keysLegend{display:flex;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:12px;padding:8px 6px 0}
.bik-dot{display:inline-block;width:10px;height:10px;border-radius:99px;margin-right:6px;vertical-align:-1px}
.bik-dot--root{background:rgba(124,247,255,.95)}.bik-dot--fifth{background:rgba(255,210,122,.95)}.bik-dot--oct{background:rgba(255,59,92,.95)}
.bik-rack{padding:12px 14px}
.bik-modGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.bik-mod{border:1px solid var(--line);border-radius:18px;padding:10px;background:rgba(0,0,0,.16)}
.bik-modHead{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.bik-modTitle{font-weight:900;letter-spacing:.14em;font-size:11px;color:rgba(255,210,122,.92)}
.bik-switch{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:11px;letter-spacing:.12em}
.bik-miniRow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:6px 0}
.bik-miniLabel{font-size:11px;color:var(--muted);letter-spacing:.12em}
.bik-miniBtns{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.bik-miniBtn{padding:7px 9px;border-radius:999px;border:1px solid var(--line);background:rgba(0,0,0,.14);font-weight:900;font-size:10px;letter-spacing:.12em;cursor:pointer}
.bik-miniBtn.bik-active{background:rgba(124,247,255,.14);border-color:rgba(124,247,255,.6)}
.bik-sliderTop{display:flex;justify-content:space-between;align-items:center}
.bik-sliderLabel{font-size:11px;color:var(--muted);letter-spacing:.12em}
.bik-sliderVal{font-size:11px;font-weight:900;letter-spacing:.10em}
.bik-range{width:100%;height:34px}
.bik-helpInner,.bik-faultInner{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.72);display:grid;place-items:center;padding:18px}
.bik-helpInner>div,.bik-faultInner>div{width:min(1100px,100%);background:rgba(10,16,27,.95);border:1px solid var(--line);border-radius:18px;padding:12px}
.bik-helpHead{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:12px}
.bik-helpTitle{font-weight:900;letter-spacing:.14em;font-size:12px}
.bik-helpGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px}
.bik-helpCard{border:1px solid var(--line);border-radius:18px;padding:12px;background:rgba(0,0,0,.12)}
.bik-helpH{font-weight:900;letter-spacing:.12em;font-size:11px;color:rgba(124,247,255,.92);margin-bottom:8px}
.bik-helpP{font-size:12px;color:var(--muted);line-height:1.35;margin:0 0 8px}
.bik-helpList{margin:0;padding-left:18px;color:var(--muted);font-size:12px;line-height:1.4}
.bik-helpHint{margin-top:10px;font-size:12px;color:rgba(255,210,122,.88)}
.bik-faultTitle{font-weight:900;letter-spacing:.14em;font-size:12px;color:rgba(255,59,92,.92);margin-bottom:6px}
.bik-faultText{color:var(--muted);font-size:12px;white-space:pre-wrap}
.bik-faultBtns{margin-top:12px;display:flex;justify-content:flex-end}
@media(max-width:980px){
  .bik-screenRow{grid-template-columns:1fr}
  .bik-modGrid{grid-template-columns:1fr}
  .bik-helpGrid{grid-template-columns:1fr}
}

.bik-tipSub{display:block;margin-top:6px;color:rgba(216,242,255,.75);font-size:11px;letter-spacing:.02em}
.bik-pill--arm{appearance:none;background:rgba(124,247,255,.08)}
.bik-pill--kbd{border-color:rgba(255,210,122,.25)}

/* v2.1 UI-only patch (keeps v2 JS/PHP intact) */
.bik-logo,.bik-title{display:none !important;}
.bik-brand{min-width:0}
.bik-brand::before{content:"ISO KEYS";display:inline-block;font-weight:900;letter-spacing:.18em;font-size:12px;color:rgba(124,247,255,.92);white-space:nowrap}

/* Presets: wrap instead of long horizontal scroller */
.bik-presetStrip{flex-wrap:wrap;overflow:visible}
.bik-presetRow{align-items:flex-start}
.bik-presetBtn{padding:9px 10px;border-radius:14px}
.bik-presetStrip::-webkit-scrollbar{height:0;width:0}

/* Microtonal chips: wrap */
.bik-controlRow{flex-wrap:wrap;align-items:flex-start}
.bik-chipGroup{flex-wrap:wrap}
.bik-rowTitle{min-width:72px}

/* Key label safety */
.bik-key{gap:8px}
.bik-keyNote{font-size:11px;max-width:62%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bik-keyHz{font-size:10px;max-width:36%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@media(max-width:980px){
  .bik-topbar{flex-wrap:wrap}
  .bik-status{order:2;width:100%}
  .bik-actions{order:3;width:100%;justify-content:flex-end}
  .bik-brand{order:1}
  .bik-brand::before{font-size:11px}
  .bik-screen{padding:10px}
  .bik-presetStrip{gap:6px}
  .bik-presetBtn{font-size:10px;padding:8px 9px;border-radius:12px}
  .bik-chip{padding:8px 9px;font-size:10px}
  .bik-keys{gap:5px}
  .bik-key{height:44px;padding:0 8px;border-radius:12px}
  .bik-keyHz{display:none} /* mobile: hide Hz to prevent chaos */
  .bik-keyNote{max-width:100%}
}

/* ========= BUMP ISO KEYS – Mobile presets ribbon + key labels ========= */

/* 1) HIDE Hz everywhere (frequencies not needed) */
.bik-keyHz { 
  display: none !important; 
}

/* 2) Make note labels always readable (including sharps) */
.bik-keyNote{
  font-size: 12px !important;
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  letter-spacing: .02em;
}

/* Optional: slightly smaller on very narrow phones */
@media (max-width: 420px){
  .bik-keyNote{ font-size: 11px !important; }
}

/* 3) Mobile: presets should be a horizontal strip with invisible scroll */
@media (max-width: 980px){

  /* Keep presets row clean */
  .bik-presetRow{
    align-items: stretch !important;
  }

  /* Make the strip a single horizontal ribbon */
  .bik-presetStrip{
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    gap: 8px !important;

    /* full width so it doesn't center into a column */
    width: 100% !important;
    justify-content: flex-start !important;
    align-items: center !important;

    /* prevent "centered vertical list" vibe */
    max-width: 100% !important;
  }

  /* Hide scrollbar (still scrollable) */
  .bik-presetStrip::-webkit-scrollbar{ height: 0 !important; }
  .bik-presetStrip{ scrollbar-width: none; } /* Firefox */
  .bik-presetStrip{ -ms-overflow-style: none; } /* old Edge */

  /* Make buttons compact so more fit on screen */
  .bik-presetBtn{
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 8px 10px !important;
    font-size: 10px !important;
    border-radius: 12px !important;
  }

  /* ---- Randomize button handling ---- */

  /* Variant A (recommended): Randomize goes below presets, full width */
  .bik-rowTools{
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 8px !important;
  }
  .bik-rowTools [data-bik-rand]{
    width: auto !important;
    max-width: 100% !important;
  }

  /* If you prefer Variant B (Randomize stays on the same line):
     comment out the block above and use this instead:

  .bik-presetRow{
    flex-wrap: wrap !important;
  }
  .bik-rowTools{
    flex: 0 0 auto !important;
    margin-left: 8px !important;
  }
  */
}
/* ===== ISO KEYS – wider keys on mobile ===== */
@media (max-width: 980px){

  /* Уменьшаем количество клавиш в ряду */
  .bik-keys{
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  /* Сами клавиши шире и выше */
  .bik-key{
    height: 52px !important;
    padding: 0 10px !important;
    border-radius: 14px !important;
  }

  /* Текст ноты — центр, без обрезки */
  .bik-keyNote{
    font-size: 12px !important;
    text-align: center !important;
    max-width: 100% !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }
}

/* Очень узкие телефоны */
@media (max-width: 420px){
  .bik-keys{
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .bik-key{
    height: 54px !important;
  }

  .bik-keyNote{
    font-size: 11px !important;
  }
}
