:root {
  --bg: #0f1115;
  --panel: #181b22;
  --panel-2: #1f232c;
  --line: #2a2f3a;
  --text: #e7eaf0;
  --muted: #8a93a6;
  --accent: #7c8cff;
  --accent-2: #ff7ac6;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
}

/* Числовые показания — моноширинным, как на приборной панели инструмента */
.row-val, #seedInput, .hud, kbd {
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
}

/* ---------- Bootstrap 5 theme overrides (our palette) ---------- */
[data-bs-theme="dark"] {
  --bs-body-bg: #0f1115;
  --bs-body-color: #e7eaf0;
  --bs-emphasis-color: #e7eaf0;
  --bs-secondary-color: #8a93a6;
  --bs-tertiary-color: #8a93a6;
  --bs-secondary-bg: #181b22;
  --bs-tertiary-bg: #1f232c;
  --bs-border-color: #2a2f3a;
  --bs-link-color: #7c8cff;
  --bs-link-hover-color: #a8b3ff;
  --bs-primary: #7c8cff;
  --bs-primary-rgb: 124, 140, 255;
  --bs-primary-bg-subtle: rgba(124, 140, 255, 0.16);
  --bs-primary-border-subtle: rgba(124, 140, 255, 0.32);
  --bs-secondary: #8a93a6;
  --bs-success: #6fcf97;
  --bs-danger: #ff6b9b;
  --bs-warning: #ffd166;
  --bs-info: #6fffe9;
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #1f232c;
  color: #e7eaf0;
  border-color: #2a2f3a;
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #1f232c;
  color: #e7eaf0;
  border-color: #7c8cff;
  box-shadow: 0 0 0 0.2rem rgba(124, 140, 255, 0.18);
}
[data-bs-theme="dark"] .btn-primary {
  background-color: #7c8cff;
  border-color: #7c8cff;
  color: #0f1115;
  font-weight: 600;
}
[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-primary:focus {
  background-color: #a8b3ff;
  border-color: #a8b3ff;
  color: #0f1115;
}
[data-bs-theme="dark"] .btn-outline-secondary {
  color: #e7eaf0;
  border-color: #2a2f3a;
}
[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background-color: #2a2f3a;
  color: #e7eaf0;
}
[data-bs-theme="dark"] .toast {
  background-color: #181b22;
  border-color: #2a2f3a;
  color: #e7eaf0;
}
[data-bs-theme="dark"] .progress {
  background-color: #1f232c;
}

/* Range slider: видимый трек и контрастный thumb в тёмной теме */
[data-bs-theme="dark"] .form-range {
  --bs-form-range-bg: var(--bs-secondary-bg);
}
[data-bs-theme="dark"] .form-range::-webkit-slider-runnable-track {
  background: linear-gradient(to right,
    var(--accent) 0%, var(--accent) var(--fill, 0%),
    #1f232c var(--fill, 0%), #1f232c 100%);
  height: 6px;
  border-radius: 3px;
  border: 1px solid #2a2f3a;
}
[data-bs-theme="dark"] .form-range::-moz-range-track {
  background-color: #1f232c;
  height: 6px;
  border-radius: 3px;
  border: 1px solid #2a2f3a;
}
[data-bs-theme="dark"] .form-range::-moz-range-progress {
  background-color: var(--accent);
  height: 6px;
  border-radius: 3px;
}
[data-bs-theme="dark"] .form-range::-webkit-slider-thumb {
  background-color: #7c8cff;
  border: 2px solid #1f232c;
  box-shadow: 0 0 0 1px #7c8cff;
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: -7px;
}
[data-bs-theme="dark"] .form-range::-moz-range-thumb {
  background-color: #7c8cff;
  border: 2px solid #1f232c;
  box-shadow: 0 0 0 1px #7c8cff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}
[data-bs-theme="dark"] .form-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(124, 140, 255, 0.25);
}
[data-bs-theme="dark"] .form-range:focus::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(124, 140, 255, 0.25);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  /* Сглаживание шрифтов на тёмном фоне */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

* {
  /* Мягкие анти-алиас на границах и тенях */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

img, canvas, svg { -webkit-font-smoothing: antialiased; }

/* Bootstrap d-flex и btn-group по умолчанию имеют резкие прямоугольные
   формы; чуть скруглим */
.btn, .form-control, .form-select, .input-group > .form-control {
  border-radius: 10px;
}

/* Smoother focus rings */
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] .btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(124, 140, 255, 0.25);
  transition: box-shadow 200ms ease-out;
}

#app {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 100vh;
  /* Контейнер приложения не должен зависеть от внутренних изменений. */
  contain: layout;
}

/* ---------- Panel ---------- */
#panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 18px 18px 24px;
  scrollbar-width: thin;
  scrollbar-color: #2a2f3a transparent;
  /* Изоляция layout/style paint: скролл панели не перерисовывает canvas. */
  contain: layout style paint;
  will-change: scroll-position;
}

.panel__head h1 {
  font-size: 18px;
  margin: 0 0 4px;
  letter-spacing: 0.2px;
}

.panel__head p { margin: 0 0 16px; }

.muted { color: var(--muted); font-size: 12px; }

.panel__group {
  border-top: 1px solid var(--line);
  padding: 14px 0 12px;
}

.panel__group:first-of-type { border-top: 0; padding-top: 6px; }

.panel__group h2 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 600;
}

/* ---------- Form fields (legacy compatibility for styles without .form-*) ---------- */
.field {
  display: block;
  margin: 10px 0;
}
.field > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="number"],
.field select {
  display: block;
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.field input[type="range"] { width: 100%; padding: 0; }
.field {
  display: block;
  margin: 10px 0;
}
.field > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.field .row-val {
  float: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.field--inline {
  display: grid;
  grid-template-columns: 110px 1fr 44px;
  align-items: center;
  gap: 8px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.row > input { flex: 1; }

/* ---------- Style list ---------- */
.search {
  width: 100%;
  margin-bottom: 10px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 28px 7px 10px;
  font-size: 12px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 140, 255, 0.18);
  background-image: none;
  padding-right: 10px;
  cursor: text;
}
.search:not(:placeholder-shown) { background-image: none; padding-right: 10px; }
/* Скрываем нативные украшения search-input'а */
.search::-webkit-search-cancel-button,
.search::-webkit-search-decoration,
.search::-webkit-search-results-button,
.search::-webkit-search-results-decoration { display: none; }
.search { -webkit-appearance: none; appearance: none; }
.search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 140, 255, 0.18);
}

.style-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  /* 120 стилей заполняли всю панель — слайдеры и кнопка генерации
     оказывались за экраном. Свой компактный скролл-бокс с тонким
     ползунком, чтобы остальная панель была видна сразу. */
  max-height: 38vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  margin-right: -6px;
  scrollbar-width: thin;
  scrollbar-color: #2a2f3a transparent;
}
.style-list::-webkit-scrollbar { width: 6px; }
.style-list::-webkit-scrollbar-thumb {
  background: #2a2f3a;
  border-radius: 3px;
}
.style-list::-webkit-scrollbar-track { background: transparent; }
.style-list h3 {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 10px 4px 3px;
  font-weight: 700;
}
.style-item {
  appearance: none;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  transition: 120ms;
  width: 100%;
  font: inherit;
}
.style-item:hover {
  border-color: #3a4150;
  background: #24283299;
}
.style-item.active {
  background: rgba(124, 140, 255, 0.18);
  border-color: rgba(124, 140, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(124, 140, 255, 0.4);
}
.style-item .name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
}
.style-item .blurb {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
  line-height: 1.3;
}

/* ---------- Buttons & segmented ---------- */

.btn:active { transform: scale(0.98); }

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  background: var(--panel-2);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.seg button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: 120ms;
  white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  color: var(--muted);
}
.seg button:disabled:hover { color: var(--muted); }
.seg button.active {
  background: rgba(124, 140, 255, 0.18);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(124, 140, 255, 0.35);
}

/* ---------- Palette list ---------- */
.palette-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.swatch {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: 120ms;
}
.swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
}
.swatch:hover { transform: scale(1.04); }
.swatch.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Stage ---------- */
#stage {
  background: #06070a;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.canvas-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  box-shadow: var(--shadow);
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.canvas-wrap canvas {
  display: block;
  /* Canvas внутреннее разрешение (canvas.width/height) задаётся через
     applyResolution(). CSS-размер выбирается так, чтобы картинка покрывала
     весь wrap, сохраняя aspect-ratio и центруясь по центру экрана. */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  image-rendering: auto;
  image-rendering: smooth;
}

/* ---------- HUD (текущее состояние: стиль/разрешение/сид) ---------- */
.hud {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(8, 10, 14, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  letter-spacing: 0.01em;
}
.hud #hudStyle { color: var(--text); font-weight: 600; }
.hud__sep { opacity: 0.4; }

/* ---------- Keyboard hints ---------- */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  line-height: 1;
}
#exportPng kbd { margin-left: 6px; opacity: 0.85; }
.shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 11px;
  color: var(--muted);
  justify-content: center;
}
.shortcuts span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.shortcuts kbd + kbd { margin-left: -4px; }

/* ---------- Loader overlay ---------- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 5;
  animation: overlay-fade-in 160ms ease-out;
}
.overlay[hidden] { display: none; }
.overlay__spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(124, 140, 255, 0.18);
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
.overlay__text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: center;
}
.overlay__sub {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  max-width: 280px;
}

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(24, 27, 34, 0.92);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 12;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast strong {
  color: var(--accent);
  font-weight: 600;
}
.toast.warn strong { color: #ffb86c; }
.toast.error strong { color: #ff6b6b; }

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes overlay-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.panel__foot {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  text-align: center;
}

/* ---------- Responsive (mobile / tablet) ---------- */
/* На десктопе close-кнопка в шапке panel не нужна: panel всегда видна */
.panel-close { display: none; }
/* Бургер живёт только в портретной мобильной раскладке (см. медиа-запрос ниже) */
.panel-burger { display: none; }

@media (max-width: 820px) {
  body { overflow: hidden; }
  .panel-close { display: block; }

  /* Канвас занимает всё доступное пространство под оверлеем */
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  #stage {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  .canvas-wrap {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  /* Bottom-sheet pattern: фиксируем панель снизу, height-toggle */
  #panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;             /* collapsed — только handle */
    max-height: 84vh;
    background: var(--panel);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.7);
    z-index: 50;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: height 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 280ms ease;
  }
  #panel.is-open {
    height: 84vh;
    overflow: hidden;          /* scroll на panelBody */
  }

  /* Header: компактный, с close-кнопкой */
  #panel .panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 4px;
    flex-shrink: 0;
  }
  #panel .panel__head h1 {
    font-size: 14px;
    margin: 0;
  }
  #panel .panel__head p { display: none; }

  .panel-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .panel-close:hover { background: var(--line); }
  /* Крестик нужен только когда панель открыта — в свёрнутом виде он
     путает («уже же закрыто, что закрывать?»). */
  #panel:not(.is-open) .panel-close { display: none; }
  /* Заголовок дублирует подпись на handle — в свёрнутом виде не нужен,
     да и просто не влезет в 64px вместе с handle. */
  #panel:not(.is-open) .panel__head { display: none; }
  #panel:not(.is-open) #panelBody { display: none; }

  /* Drag-handle — тап/свайп-зона вверху drawer'а. Основной вход в панель —
     плавающая кнопка-бургер (.panel-burger) снизу справа, эта полоска —
     запасной способ (свайп вверх) для тех, кто уже понял, что тут drawer. */
  .panel-handle {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y;
  }
  .panel-handle__bar {
    width: 44px;
    height: 5px;
    border-radius: 3px;
    background: var(--line);
  }

  /* Плавающая кнопка-бургер: открывает панель, снизу справа, поверх канваса. */
  .panel-burger {
    display: flex;
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 55;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    box-shadow: 0 8px 24px rgba(124, 140, 255, 0.45), var(--shadow);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .panel-burger span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background: #0f1115;
  }
  .panel-burger:active { transform: scale(0.94); }
  .panel-burger[aria-expanded="true"] { display: none; }

  /* Внутренний scrollable-контейнер */
  #panelBody {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 16px 24px;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Tap-targets ≥44px */
  .btn {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 12px;
    min-height: 50px;
  }
  .btn + .btn { margin-top: 10px; }
  .seg button { padding: 12px 8px; font-size: 14px; min-height: 44px; }
  .field > span { font-size: 13px; margin-bottom: 8px; }
  .field { margin: 14px 0; }
  .field input[type="text"],
  .field input[type="number"],
  .field select {
    padding: 13px 14px;
    font-size: 16px;
    border-radius: 10px;
    min-height: 48px;
  }
  .field input[type="range"] { padding: 14px 0; min-height: 40px; }
  .swatch { width: 36px; height: 36px; border-radius: 8px; }

  /* Горизонтальные чипы для стилей: 105 стилей — свайпом */
  .style-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    gap: 10px;
    margin: 0 -16px;
    padding: 8px 16px 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .style-list::-webkit-scrollbar { display: none; }
  .style-list h3 { display: none; }
  .style-item {
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 260px;
    padding: 12px 14px;
    border-radius: 12px;
    text-align: left;
  }
  /* Описание видно сразу на карточке — не заставляем тапать, чтобы узнать,
     что рисует стиль. */
  .style-item .blurb {
    display: block;
    font-size: 12px;
    line-height: 1.3;
  }
  .style-item .name { font-size: 14px; font-weight: 600; }

  /* Заголовки секций — мельче */
  .panel__group { padding: 14px 0 10px; border-top: 1px solid var(--line); }
  .panel__group:first-of-type { border-top: 0; padding-top: 8px; }
  .panel__group h2 { font-size: 11px; margin-bottom: 10px; }
  .muted { font-size: 12px; }
  .row-val { font-size: 13px; }

  /* Палитра: список, а не grid */
  .palette-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Хоткеи и HUD — для клавиатуры/мыши, на тач-экране лишние */
  .shortcuts, #exportPng kbd { display: none; }
  .hud { font-size: 10px; padding: 5px 8px; top: 8px; left: 8px; }
}

/* Бургер — только в вертикальной ориентации: в альбомной панель и так
   ближе к пальцу, свайпа за глаза. */
@media (max-width: 820px) and (orientation: landscape) {
  .panel-burger { display: none; }
}

/* Узкие экраны (≤380px) */
@media (max-width: 380px) {
  .style-item { min-width: 140px; }
  #panel { max-height: 88vh; }
}
