/* ВРЕМЕННАЯ ВЕТКА tmp/scale-styles: исходный вид и «Стекло» (под нынешние iOS), чтобы сравнить.
   Стиль задаётся атрибутом <html data-style="glass">; без атрибута — исходный вид из app.css.
   У обоих есть светлая и тёмная тема — по настройке iPhone. */

/* ---------- переключатель (одинаковый во всех стилях) ---------- */
.stylebar {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; background: #111; height: calc(40px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 8px 0; align-items: center; position: relative; z-index: 5;
}
.stylebar::-webkit-scrollbar { display: none; }
.stylebar button {
  flex: none; border: 0; background: transparent; color: #aaa; font: 600 13px -apple-system, system-ui, sans-serif;
  height: 30px; padding: 0 10px; border-radius: 0; cursor: pointer; border-bottom: 2px solid transparent; letter-spacing: 0; text-transform: none;
  box-shadow: none; text-shadow: none;
}
.stylebar button[aria-pressed="true"] { color: #fff; border-bottom-color: #f2c200; }
.app { height: calc(100dvh - 40px - env(safe-area-inset-top, 0px)); --safe-t: 0px; }

/* =====================================================================
   СТЕКЛО — нынешние iOS и macOS: матовые панели над спокойным цветным фоном.
   Фон — один мягкий переход (сирень → орхидея → персик), без пятен; кнопки без рамок, только заливка.
   ===================================================================== */
:root[data-style="glass"] {
  --bg: rgba(255,255,255,.42); --bg-2: rgba(255,255,255,.3); --ink: #1c1838; --ink-2: #4a4568; --ink-3: #7a7598;
  --hair: rgba(28,24,56,.08); --rule: rgba(255,255,255,.55); --signal: #e8336a;
  --k1: #8a87a3; --k2: #0f9e86; --k3: #4b55e0; --k4: #e07b00; --k5: #e0365c;
  --f-ui: -apple-system, system-ui, "Helvetica Neue", sans-serif; --f-sign: -apple-system, "SF Pro Display", system-ui, sans-serif;
  --f-num: -apple-system, "SF Pro Display", system-ui, sans-serif;
  --glass: rgba(255,255,255,.4); --glass-edge: rgba(255,255,255,.55); --fill: rgba(255,255,255,.5);
  color-scheme: light;
}
[data-style="glass"] body {
  background:
    radial-gradient(90% 60% at 15% 0%, rgba(255,255,255,.35), transparent 70%),
    linear-gradient(160deg, #6f7fe0 0%, #9d84df 38%, #d38fc9 68%, #f2b29a 100%);
}
[data-style="glass"] .app { padding: 10px 10px 0; gap: 10px; }
[data-style="glass"] .instr, [data-style="glass"] .tape, [data-style="glass"] .dock {
  background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid var(--glass-edge); border-radius: 28px; box-shadow: 0 12px 32px rgba(40,20,90,.16);
}
[data-style="glass"] .instr { padding-top: 14px; overflow: hidden; }
[data-style="glass"] .tape { overflow-x: hidden; overflow-y: auto; }
[data-style="glass"] .dock { margin-bottom: calc(10px + var(--safe-b)); padding-bottom: 8px; }
[data-style="glass"] .brand b { font: 700 24px/1.05 var(--f-sign); text-transform: none; letter-spacing: -.02em; padding-top: 0; }
[data-style="glass"] .ghost, [data-style="glass"] .ghost.icon, [data-style="glass"] .dock-btn, [data-style="glass"] .stepbtn {
  border: 0; background: var(--fill); border-radius: 14px; box-shadow: 0 1px 2px rgba(40,20,90,.08);
}
[data-style="glass"] .ghost { padding: 0 12px; }
[data-style="glass"] .dock-btn { border-radius: 16px; }
[data-style="glass"] .gauge .track { stroke: rgba(255,255,255,.6); }
[data-style="glass"] .gauge .tick-label { font: 600 11px var(--f-ui); }
[data-style="glass"] .gauge .tick { stroke: rgba(28,24,56,.35); }
[data-style="glass"] .gauge .knob circle.face { stroke: #fff; stroke-width: 3; }
[data-style="glass"] .gauge .knob text { font: 700 12px var(--f-ui); }
[data-style="glass"] .gauge .markdot { fill: #fff; }
[data-style="glass"] .ro-area { font: 700 42px/.95 var(--f-sign); letter-spacing: -.03em; }
[data-style="glass"] .ro-area small { font: 600 14px var(--f-ui); }
[data-style="glass"] .cats { border-top: 1px solid rgba(255,255,255,.5); }
[data-style="glass"] .cat { border-left: 1px solid rgba(255,255,255,.5); }
[data-style="glass"] .cat b { font: 700 24px/.85 var(--f-sign); }
[data-style="glass"] .cat:active { background: rgba(255,255,255,.35); }
[data-style="glass"] .car { background: transparent; }
[data-style="glass"] .car:active { background: rgba(255,255,255,.35); }
[data-style="glass"] .car .nm b { font-weight: 600; }
[data-style="glass"] .car .cn b { font: 700 22px/1 var(--f-sign); }
[data-style="glass"] .row .t { border-right: 1px solid rgba(28,24,56,.1); color: var(--ink-2); }
[data-style="glass"] .row .t::after { background: rgba(28,24,56,.25); }
[data-style="glass"] .row .t.int::before { background: transparent; color: var(--ink); }
[data-style="glass"] .bnd { background: rgba(255,255,255,.55); border-top: 2px solid var(--c); }
[data-style="glass"] .bnd .lbl b { font: 700 28px/1 var(--f-sign); padding-top: 0; }
[data-style="glass"] .search { background: var(--fill); border-radius: 16px; }
[data-style="glass"] .badge { border-radius: 10px; }
[data-style="glass"] .shade { background: rgba(40,20,90,.18); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
[data-style="glass"] .sheet {
  background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(34px) saturate(160%); backdrop-filter: blur(34px) saturate(160%);
  border: 1px solid var(--glass-edge); border-bottom: 0; border-radius: 30px 30px 0 0; box-shadow: 0 -10px 40px rgba(40,20,90,.2);
}
[data-style="glass"] .sheet-grip { background: rgba(28,24,56,.2); }
[data-style="glass"] .sheet-head h2 { font: 700 24px/1.1 var(--f-sign); letter-spacing: -.02em; padding-top: 6px; }
[data-style="glass"] .verdict { background: var(--fill); border: 0; border-top: 3px solid var(--c); border-radius: 18px; padding: 12px; }
[data-style="glass"] .verdict .n { font: 700 46px/.85 var(--f-sign); padding-top: 0; }
[data-style="glass"] .verdict .p { font: 700 24px/1 var(--f-sign); padding-top: 0; }
[data-style="glass"] .act { border: 0; background: var(--fill); border-radius: 18px; }
[data-style="glass"] .act.primary { background: rgba(75,85,224,.9); color: #fff; }
[data-style="glass"] .act.mark.on { background: rgba(232,51,106,.9); }
[data-style="glass"] .seg { border: 0; background: rgba(28,24,56,.07); border-radius: 14px; padding: 2px; }
[data-style="glass"] .seg button { border-radius: 12px; }
[data-style="glass"] .seg button + button { border-left: 0; }
[data-style="glass"] .seg button[aria-pressed="true"] { background: rgba(255,255,255,.95); color: var(--ink); box-shadow: 0 2px 8px rgba(40,20,90,.14); }
[data-style="glass"] .chip { border: 0; background: var(--fill); border-radius: 14px; }
[data-style="glass"] .chip[aria-pressed="true"] { background: rgba(28,24,56,.85); color: #fff; }
[data-style="glass"] .note::before { border-radius: 50%; }
[data-style="glass"] .bedit input { border: 0; border-radius: 18px; background: var(--fill); }
[data-style="glass"] .toast { background: rgba(28,24,56,.6); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff; border-radius: 16px; }
@media (min-width: 900px) {
  [data-style="glass"] .app { padding-bottom: 10px; }
  [data-style="glass"] .dock { margin-bottom: 0; }
  [data-style="glass"] .instr { border-right: 1px solid var(--glass-edge); }
}

/* ---------- стекло, доработка: легенда — отдельная стеклянная карточка, цифры в цветных кружках,
   тонкая полоса прокрутки, мягкая подсветка, окна как плавающие панели macOS ---------- */
:root[data-style="glass"] .cats {
  border: 0; background: rgba(255,255,255,.3); border-radius: 18px; margin: 10px 0 0; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
:root[data-style="glass"] .cat, :root[data-style="glass"] .cat:first-child { border: 0; padding-left: 8px; }
:root[data-style="glass"] .cat + .cat { box-shadow: inset 1px 0 0 rgba(28,24,56,.07); }
:root[data-style="glass"] .cat b {
  width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center;
  font: 700 14px/1 var(--f-num); padding: 0; box-shadow: 0 2px 6px color-mix(in srgb, var(--c) 45%, transparent);
}
:root[data-style="glass"] .cat span:first-of-type { color: var(--ink); font-weight: 600; }
:root[data-style="glass"] .cat span + span { color: var(--ink-2); }
:root[data-style="glass"] .tape { scrollbar-width: thin; scrollbar-color: rgba(28,24,56,.22) transparent; }
:root[data-style="glass"] .tape::-webkit-scrollbar { width: 10px; }
:root[data-style="glass"] .tape::-webkit-scrollbar-track { background: transparent; }
:root[data-style="glass"] .tape::-webkit-scrollbar-thumb { background: rgba(28,24,56,.2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
:root[data-style="glass"] .row { padding-right: 14px; }
:root[data-style="glass"] .row .t { padding-left: 14px; }
:root[data-style="glass"] .stepbtn { border-radius: 50%; width: 38px; height: 38px; }
:root[data-style="glass"] .search:focus-within { box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
:root[data-style="glass"] .car.marked .t { background: var(--signal); color: #fff; border-right-color: transparent; }
@media (min-width: 900px) {
  :root[data-style="glass"] .app { max-width: 1180px; grid-template-columns: 400px minmax(0, 1fr); padding: 18px 18px 18px; gap: 16px; }
  :root[data-style="glass"] .instr { padding: 22px 22px 22px; border-right: 1px solid var(--glass-edge); }
  :root[data-style="glass"] .brand b { font-size: 26px; }
  :root[data-style="glass"] .gauge-wrap { max-width: 340px; }
  :root[data-style="glass"] .cats { margin-top: 28px; padding: 6px; display: grid; gap: 2px; }
  :root[data-style="glass"] .cats .cat, :root[data-style="glass"] .cats .cat:first-child { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 10px 12px; border-radius: 12px; }
  :root[data-style="glass"] .cat + .cat { box-shadow: none; }
  :root[data-style="glass"] .cats .cat:hover { box-shadow: none; background: rgba(255,255,255,.45); }
  :root[data-style="glass"] .cat span + span { font-size: 15px; }
  :root[data-style="glass"] .tape { border-radius: 28px; }
  :root[data-style="glass"] .tape .car:hover { box-shadow: none; background: rgba(255,255,255,.3); }
  :root[data-style="glass"] .dock { padding: 10px 12px; }
  :root[data-style="glass"] .sheet {
    border-radius: 28px; border: 1px solid var(--glass-edge); background: rgba(255,255,255,.66);
    box-shadow: 0 30px 80px rgba(40,20,90,.3);
  }
  :root[data-style="glass"] .shade { background: rgba(40,20,90,.14); }
}
:root[data-style="glass"] .act.primary small { color: rgba(255,255,255,.85); }

/* ---------- стекло, тёмная тема (включается сама, если на iPhone тёмное оформление) ----------
   Фон — тот же переход, только ночной: индиго → слива → бордо. Панели — дымчатое тёмное стекло,
   цвета категорий чуть ярче, чтобы читались на тёмном. */
@media (prefers-color-scheme: dark) {
  :root[data-style="glass"]:not([data-theme="light"]) {
    --bg: rgba(28,26,48,.5); --bg-2: rgba(255,255,255,.08); --ink: #f3f1fb; --ink-2: #bdb8d6; --ink-3: #8b86a8;
    --hair: rgba(255,255,255,.08); --rule: rgba(255,255,255,.14); --signal: #ff5c8a;
    --k1: #a6a3c0; --k2: #2fd6b6; --k3: #8f97ff; --k4: #ffa63d; --k5: #ff5f82;
    --glass: rgba(26,24,46,.42); --glass-edge: rgba(255,255,255,.13); --fill: rgba(255,255,255,.1);
    color-scheme: dark;
  }
  :root[data-style="glass"]:not([data-theme="light"]) body {
    background:
      radial-gradient(90% 60% at 15% 0%, rgba(140,120,255,.18), transparent 70%),
      linear-gradient(160deg, #191d4a 0%, #2b1d50 40%, #45204b 70%, #4d2622 100%);
  }
  :root[data-style="glass"]:not([data-theme="light"]) :is(.instr, .tape, .dock) { box-shadow: 0 12px 32px rgba(0,0,0,.35); }
  :root[data-style="glass"]:not([data-theme="light"]) .gauge .track { stroke: rgba(255,255,255,.12); }
  :root[data-style="glass"]:not([data-theme="light"]) .gauge .tick { stroke: rgba(255,255,255,.35); }
  :root[data-style="glass"]:not([data-theme="light"]) .gauge .tick.major { stroke: rgba(255,255,255,.7); }
  :root[data-style="glass"]:not([data-theme="light"]) .gauge .knob circle.face { stroke: #1d1a36; }
  :root[data-style="glass"]:not([data-theme="light"]) .gauge .markdot { fill: #1d1a36; }
  :root[data-style="glass"]:not([data-theme="light"]) .cats { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
  :root[data-style="glass"]:not([data-theme="light"]) .cat + .cat { box-shadow: inset 1px 0 0 rgba(255,255,255,.07); }
  :root[data-style="glass"]:not([data-theme="light"]) .row .t { border-right-color: rgba(255,255,255,.08); }
  :root[data-style="glass"]:not([data-theme="light"]) .row .t::after { background: rgba(255,255,255,.25); }
  :root[data-style="glass"]:not([data-theme="light"]) .bnd { background: rgba(255,255,255,.09); }
  :root[data-style="glass"]:not([data-theme="light"]) .car:active { background: rgba(255,255,255,.08); }
  :root[data-style="glass"]:not([data-theme="light"]) .tape { scrollbar-color: rgba(255,255,255,.22) transparent; }
  :root[data-style="glass"]:not([data-theme="light"]) .tape::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); background-clip: padding-box; }
  :root[data-style="glass"]:not([data-theme="light"]) .search:focus-within { box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
  :root[data-style="glass"]:not([data-theme="light"]) .shade { background: rgba(0,0,0,.35); }
  :root[data-style="glass"]:not([data-theme="light"]) .sheet { background: rgba(30,27,52,.72); box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
  :root[data-style="glass"]:not([data-theme="light"]) .sheet-grip { background: rgba(255,255,255,.25); }
  :root[data-style="glass"]:not([data-theme="light"]) .act.primary { background: rgba(110,118,255,.9); }
  :root[data-style="glass"]:not([data-theme="light"]) .seg { background: rgba(255,255,255,.06); }
  :root[data-style="glass"]:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: rgba(255,255,255,.18); color: var(--ink); box-shadow: none; }
  :root[data-style="glass"]:not([data-theme="light"]) .chip[aria-pressed="true"] { background: rgba(255,255,255,.9); color: #1d1a36; }
  :root[data-style="glass"]:not([data-theme="light"]) .toast { background: rgba(255,255,255,.16); }
}
@media (prefers-color-scheme: dark) and (min-width: 900px) {
  :root[data-style="glass"]:not([data-theme="light"]) .sheet { background: rgba(30,27,52,.78); box-shadow: 0 30px 80px rgba(0,0,0,.55); }
  :root[data-style="glass"]:not([data-theme="light"]) .tape .car:hover, :root[data-style="glass"]:not([data-theme="light"]) .cats .cat:hover { background: rgba(255,255,255,.07); }
}

/* ---------- стекло по Apple HIG: размеры текста — стандартные стили iOS, без цветных полос-акцентов ----------
   Large Title 34 · Title 1 28 · Title 2 22 · Title 3 20 · Headline 17 semibold · Body 17 · Callout 16 ·
   Subheadline 15 · Footnote 13 · Caption 12/11. Кнопки и стрелки не меньше 44×44 pt. */
:root[data-style="glass"] .brand b { font: 700 22px/1.15 var(--f-sign); letter-spacing: -.01em; }
:root[data-style="glass"] .brand span { font-size: 13px; }
:root[data-style="glass"] .ghost { font: 600 15px var(--f-ui); height: 36px; }
:root[data-style="glass"] .ghost.icon { width: 36px; border-radius: 50%; }
:root[data-style="glass"] .ro-cat { font-size: 13px; }
:root[data-style="glass"] .ro-cat b { font: 600 15px var(--f-num); }
:root[data-style="glass"] .ro-car { font-size: 12px; }
:root[data-style="glass"] .car .nm b { font: 600 17px/1.2 var(--f-ui); letter-spacing: -.01em; }
:root[data-style="glass"] .car .nm small { font-size: 13px; }
:root[data-style="glass"] .car .cn b { font: 600 20px/1 var(--f-num); }
:root[data-style="glass"] .car .cn small { font-size: 11px; }
:root[data-style="glass"] .row .t { font-size: 15px; }
/* граница категории — подкрашенная строка вместо цветной линии */
:root[data-style="glass"] .bnd { border-top: 0; background: color-mix(in srgb, var(--c) 16%, rgba(255,255,255,.45)); }
:root[data-style="glass"] .bnd .t { color: var(--ink); font-weight: 600; }
:root[data-style="glass"] .bnd .lbl b {
  width: 32px; height: 32px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center;
  font: 600 17px/1 var(--f-num); padding: 0; flex: none;
}
:root[data-style="glass"] .bnd .lbl span { font-size: 13px; }
:root[data-style="glass"] .bnd .lbl span strong { font: 600 15px var(--f-ui); }
:root[data-style="glass"] .stepbtn { width: 44px; height: 44px; }
:root[data-style="glass"] .stepbtn svg { width: 20px; height: 20px; }
:root[data-style="glass"] .search input { font-size: 17px; }

/* окна */
:root[data-style="glass"] .sheet-head h2 { font: 700 22px/1.2 var(--f-sign); letter-spacing: -.01em; }
:root[data-style="glass"] .sheet-head .ghost.icon { width: 30px; height: 30px; background: rgba(120,120,128,.16); box-shadow: none; }
:root[data-style="glass"] .sheet-head .ghost.icon svg { width: 14px; height: 14px; }
:root[data-style="glass"] .sub { font-size: 15px; }
:root[data-style="glass"] .verdict {
  grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; border: 0; border-radius: 14px; padding: 12px 14px;
  background: var(--fill); margin-bottom: 14px;
}
:root[data-style="glass"] .verdict .n {
  width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center;
  font: 600 20px/1 var(--f-num); padding: 0;
}
:root[data-style="glass"] .verdict .d { font-size: 15px; }
:root[data-style="glass"] .verdict .d b { font: 600 17px/1.25 var(--f-ui); }
:root[data-style="glass"] .verdict .p { font: 600 20px/1 var(--f-num); padding: 0; }
/* список фактов — сгруппированный список, как в «Настройках» */
:root[data-style="glass"] .facts { background: var(--fill); border-radius: 14px; padding: 0 14px; font-size: 17px; }
:root[data-style="glass"] .facts dt, :root[data-style="glass"] .facts dd { padding: 11px 0; border-bottom: 1px solid var(--hair); }
:root[data-style="glass"] .facts dt:nth-last-of-type(1), :root[data-style="glass"] .facts dd:last-of-type { border-bottom: 0; }
:root[data-style="glass"] .facts dd .num { font-size: 17px; }
:root[data-style="glass"] .facts dd small { font-size: 13px; }
:root[data-style="glass"] .note { font-size: 15px; }
:root[data-style="glass"] .act { min-height: 50px; padding: 11px 14px; border-radius: 14px; }
:root[data-style="glass"] .act b { font: 600 17px/1.25 var(--f-ui); }
:root[data-style="glass"] .act small { font-size: 13px; }
:root[data-style="glass"] .act.mark { background: var(--fill); }
:root[data-style="glass"] .act.mark b { color: var(--signal); }
:root[data-style="glass"] .lbl-h { font: 400 13px var(--f-ui); text-transform: uppercase; letter-spacing: .02em; color: var(--ink-3); padding-left: 14px; }
:root[data-style="glass"] .seg button { font: 600 15px var(--f-ui); }
:root[data-style="glass"] .seg button small { font-size: 12px; }
:root[data-style="glass"] .sw { font-size: 17px; }
:root[data-style="glass"] .sw small { font-size: 13px; }
:root[data-style="glass"] .chip { font: 600 15px var(--f-ui); min-height: 36px; }
:root[data-style="glass"] .prices { font-size: 15px; }
:root[data-style="glass"] .prices thead th { font: 600 17px/1 var(--f-num); }
:root[data-style="glass"] .prices tbody tr.grp th { font: 400 13px var(--f-ui); text-transform: uppercase; letter-spacing: .02em; color: var(--ink-3); border-bottom: 1px solid var(--hair); }
:root[data-style="glass"] .prices tbody tr[aria-selected="true"] td:first-child { box-shadow: none; padding-left: 0; }
:root[data-style="glass"] .prices tbody tr[aria-selected="true"] td { background: rgba(255,255,255,.35); }
:root[data-style="glass"] .bedit input { font: 600 28px var(--f-num); height: 56px; }
:root[data-style="glass"] .nb button { min-height: 44px; }
:root[data-style="glass"] .nb button span { font-size: 15px; }
:root[data-style="glass"] .nb .line { border-bottom: 2px solid var(--signal); }
@media (prefers-color-scheme: dark) {
  :root[data-style="glass"]:not([data-theme="light"]) .bnd { background: color-mix(in srgb, var(--c) 22%, rgba(255,255,255,.05)); }
  :root[data-style="glass"]:not([data-theme="light"]) .prices tbody tr[aria-selected="true"] td { background: rgba(255,255,255,.08); }
}
@media (min-width: 900px) {
  :root[data-style="glass"] .brand b { font-size: 28px; }
}
/* шапка и строка границы на узком iPhone: заголовок в одну строку, стрелки 40 pt с зоной нажатия 44 pt */
:root[data-style="glass"] .brand b { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-style="glass"] .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-style="glass"] .bnd .lbl { gap: 8px; padding-left: 10px; }
:root[data-style="glass"] .bnd .lbl b { width: 28px; height: 28px; font-size: 15px; }
:root[data-style="glass"] .bnd .lbl span strong { letter-spacing: -.01em; }
:root[data-style="glass"] .bnd .step { gap: 4px; }
:root[data-style="glass"] .stepbtn { width: 40px; height: 40px; position: relative; }
:root[data-style="glass"] .stepbtn::before { content: ""; position: absolute; inset: -2px; }
:root[data-style="glass"] .bedit .stepbtn { width: 56px; height: 56px; }
/* шапка как в iOS: кнопки — верхней строкой, крупный заголовок — под ними на всю ширину */
:root[data-style="glass"] .instr-bar { flex-wrap: wrap; align-items: center; row-gap: 6px; }
:root[data-style="glass"] #serviceBtn { order: 1; margin-right: auto; }
:root[data-style="glass"] #modeBtn { order: 2; }
:root[data-style="glass"] .brand { order: 3; flex-basis: 100%; }
:root[data-style="glass"] .brand b { font-size: 28px; line-height: 1.1; white-space: normal; }
:root[data-style="glass"] .brand span { margin-top: 2px; }
@media (max-width: 899px) { :root[data-style="glass"] .gauge-wrap { max-width: 300px; } }
/* в строке границы номер уже есть в тексте «2-я категория» — кружок лишний, без него влезает цена */
:root[data-style="glass"] .bnd .lbl b { display: none; }
:root[data-style="glass"] .bnd .lbl { padding-left: 12px; }

/* ---------- стекло на телефоне: всё влезает в экран и не тормозит ----------
   1) Под панелями плавный градиент — размытие на нём ничего не меняет, а iPhone пересчитывает его
      на каждом кадре прокрутки. Поэтому панели — просто полупрозрачная заливка без blur;
      размытие осталось только у всплывающих окон, под ними пёстрый список.
   2) Без background-attachment: fixed — на iOS он дорогой, а страница и так не прокручивается.
   3) Шапка компактная, как обычная навигационная строка iOS (заголовок 17 pt рядом с кнопками),
      спидометр ужимается по высоте экрана — список и поиск всегда на экране. */
:root[data-style="glass"] .instr, :root[data-style="glass"] .tape, :root[data-style="glass"] .dock {
  -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.5);
}
@media (prefers-color-scheme: dark) {
  :root[data-style="glass"]:not([data-theme="light"]) :is(.instr, .tape, .dock) { background: rgba(22,20,42,.55); }
}
@media (max-width: 899px) {
  :root[data-style="glass"] .instr, :root[data-style="glass"] .tape, :root[data-style="glass"] .dock {
    box-shadow: 0 6px 18px rgba(40,20,90,.12);
  }
  :root[data-style="glass"] .instr { padding-top: 10px; padding-bottom: 8px; }
  :root[data-style="glass"] .instr-bar { flex-wrap: nowrap; row-gap: 0; column-gap: 8px; align-items: center; }
  :root[data-style="glass"] #serviceBtn { padding: 0 10px; }
  :root[data-style="glass"] .brand { order: 1; flex: 1 1 auto; flex-basis: auto; min-width: 0; }
  :root[data-style="glass"] .brand b { font: 600 17px/1.2 var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
  :root[data-style="glass"] .brand span { font-size: 13px; margin-top: 1px; }
  :root[data-style="glass"] #serviceBtn { order: 2; margin-right: 0; }
  :root[data-style="glass"] #modeBtn { order: 3; }
  /* подкова: ширина зависит от высоты экрана, чтобы под ней оставалось ≥3 строк списка */
  :root[data-style="glass"] .app:not([data-mode="line"]) .gauge-wrap {
    max-width: clamp(200px, calc((100dvh - 440px) * 1.4), 300px);
  }
  /* число в центре — пропорционально подкове, чтобы на маленькой не залезало на дугу */
  :root[data-style="glass"] .app:not([data-mode="line"]) .gauge-wrap { container-type: inline-size; }
  :root[data-style="glass"] .app:not([data-mode="line"]) .ro-area { font-size: clamp(28px, 14cqi, 42px); }
  :root[data-style="glass"] .cats { margin-top: 6px; }
  :root[data-style="glass"] .cat, :root[data-style="glass"] .cat:first-child { padding-top: 6px; padding-bottom: 6px; row-gap: 2px; }
  :root[data-style="glass"] .cat b { width: 22px; height: 22px; font-size: 13px; }
  /* если экран совсем низкий — список всё равно не меньше трёх строк, а сжимается шапка */
  :root[data-style="glass"] .app { grid-template-rows: minmax(0, auto) minmax(156px, 1fr) auto; }
  :root[data-style="glass"] .instr { min-height: 0; }
}
