*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; width: 100%; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --panel-w:  360px;
  --bg:       #ffffff;
  --bg2:      #f4f5f7;
  --border:   #e2e4e9;
  --text:     #1a1d23;
  --text2:    #52576b;
  --text3:    #9499a8;
  --accent:   #2563eb;
  --danger:   #dc2626;
  --warn:     #d97706;
  --ok:       #16a34a;
  --gold:     #f59e0b;
  --shadow:   0 2px 12px rgba(0,0,0,.10);
  --shadow-lg:0 8px 32px rgba(0,0,0,.14);
  --r:        10px;
  --r-lg:     16px;
}

#map { position: absolute; inset: 0; }

/* ── Лоадер ── */
#loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}
#loader.hidden { display: none; }
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loader p { font-size: 13px; color: var(--text3); }

/* ── Боковая панель ── */
#sidebar {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: var(--panel-w); z-index: 200;
  background: var(--bg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}

#panel-header {
  padding: 14px 12px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg);
}

.app-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}

.header-actions {
  display: flex;
  gap: 8px;
  height: 44px;
  position: relative;  /* ← важно */
  align-items: center;
}

/* Кнопка "Ближайшие" — полная */
#btn-locate {
  flex: 1;
  height: 44px;      /* ← явно задаём высоту */
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  transition: .15s;
  white-space: nowrap;
}
#btn-locate:hover { background: #e0e4f0; }
#btn-locate svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Поиск — только кнопка, раздвигается */
#stop-search-wrap {
  width: 44px;
  height: 44px;      /* ← синхронно с btn-locate */
  display: flex;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0;
  cursor: text;
  transition: width .2s ease, border-color .15s;
  overflow: hidden;
  flex-shrink: 0;
}

#stop-search-wrap.active {
  width: 100%;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 10;
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: var(--r);
  overflow: visible;
}

#search-icon-btn {
  width: 44px;
  height: 44px;      /* ← синхронно */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
#search-icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--text3);
  stroke-width: 2;
  fill: none;
}

#stop-search {
  flex: 1;
  height: 44px;      /* ← синхронно */
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text);
  padding: 0 4px 0 0;
  min-width: 0;
}
#stop-search::placeholder { color: var(--text3); }

#stop-search-clear {
  width: 36px;
  height: 44px;      /* ← синхронно */
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text3);
  font-size: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#active-bar {
  padding: 6px 12px; border-bottom: 1px solid var(--border);
  display: none; flex-wrap: wrap; gap: 5px; flex-shrink: 0;
}
#active-bar.visible { display: flex; }
.ar-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; color: #fff; cursor: pointer;
}
.ar-tag-x { font-size: 14px; opacity: .75; }

#panel-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  contain: layout style;
}

/* ── Statusbar ── */
#statusbar {
  position: absolute; z-index: 300; pointer-events: none;
  background: rgba(20,20,30,.85); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px;
  backdrop-filter: blur(6px); white-space: nowrap;
  transition: opacity .2s;
}

/* Десктоп: внизу справа */
@media (min-width: 641px) {
  #statusbar { bottom: 20px; right: 20px; left: auto; }
}

/* Мобилка: сверху по центру */
@media (max-width: 640px) {
  #statusbar {
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    bottom: auto;
  }

  #sidebar {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    /* ИСПРАВЛЕНО: высота на весь экран, управляем через transform */
    height: 100dvh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,.13);
    /* По умолчанию — видна только шапка (72px) */
    transform: translateY(calc(100% - 72px));
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    /* Важно для скролла внутри */
    overflow: hidden;
  }

  /* Половина экрана */
  #sidebar.sheet-half {
    transform: translateY(50%);
  }

  /* Полный экран — учитываем safe-area (iPhone чёлка) */
  #sidebar.sheet-full {
    transform: translateY(env(safe-area-inset-top, 0px));
  }

  #panel-header {
    cursor: grab;
    /* Фиксируем высоту шапки */
    min-height: 72px;
  }

  #panel-header::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 12px;
  }

  /* panel-body должен скроллиться внутри */
  #panel-body {
    /* Высота = весь экран минус шапка (72px) минус active-bar (~30px) */
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 24px; /* отступ чтобы последний элемент не прилипал */
    /* Критично: убираем конфликт с max-height */
    min-height: 0; /* позволяет flex-контейнеру сжиматься */
  }

  .maplibregl-ctrl-bottom-right {
    right: 8px !important;
    /* По умолчанию — внизу, но если панель открыта — поднимаем */
    bottom: 8px !important;
    transition: bottom .3s ease;
    z-index: 150 !important; /* выше панели, но ниже хедера */
  }

  /* Если панель в состоянии half или full — поднимаем кнопки */
  #sidebar.sheet-half ~ #map .maplibregl-ctrl-bottom-right,
  #sidebar.sheet-full ~ #map .maplibregl-ctrl-bottom-right {
    bottom: calc(50% + 40px) !important; /* половина экрана + отступ */
  }

  /* Если панель закрыта — кнопки внизу */
  #sidebar:not(.sheet-half):not(.sheet-full) ~ #map .maplibregl-ctrl-bottom-right {
    bottom: 8px !important;
  }
}

/* ── Остальные стили (без изменений) ── */
.main-tabs { display: flex; gap: 4px; padding: 10px 12px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.main-tab { flex: 1; padding: 8px 4px; border: none; border-radius: var(--r); background: var(--bg2); font-size: 13px; font-weight: 600; color: var(--text3); cursor: pointer; transition: .15s; }
.main-tab.on { background: var(--accent); color: #fff; }
.section-head { padding: 12px 16px 6px; font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; justify-content: space-between; }
.back-link { border: none; background: none; font-size: 12px; color: var(--accent); cursor: pointer; font-weight: 600; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; padding: 4px 12px 12px; }
.cat-chip { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 4px 6px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--bg); cursor: pointer; transition: .15s; gap: 2px; user-select: none; min-height: 52px; }
.cat-chip:hover { background: var(--bg2); }
.cat-chip.on { border-color: var(--chip-color, var(--accent)); background: color-mix(in srgb, var(--chip-color, var(--accent)) 10%, #fff); }
.cat-chip-num { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1; }
.cat-chip.on .cat-chip-num { color: var(--chip-color, var(--accent)); }
.cat-chip-type { font-size: 9px; color: var(--text3); }
.cat-fav { position: absolute; top: 0; right: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--border); cursor: pointer; border-radius: 0 var(--r) 0 var(--r); transition: color .15s, background .15s; z-index: 2; }
.cat-fav:hover { background: rgba(0,0,0,.06); }
.cat-fav.on { color: var(--gold); }
.stop-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.stop-item:hover, .stop-item:active { background: var(--bg2); }
.stop-dot-icon { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.stop-info { flex: 1; min-width: 0; }
.stop-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.stop-dist { font-size: 12px; color: var(--text3); flex-shrink: 0; }
.stop-fav { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--border); cursor: pointer; border-radius: 50%; transition: color .15s, background .15s; }
.stop-fav:hover { background: var(--bg2); }
.stop-fav.on { color: var(--gold); }
.fav-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.fav-badge { min-width: 42px; height: 42px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; flex-shrink: 0; }
.fav-info { flex: 1; min-width: 0; }
.fav-name { font-size: 13px; font-weight: 700; color: var(--text); }
.fav-sub { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-show-btn { padding: 6px 12px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--bg); font-size: 12px; font-weight: 600; color: var(--text2); cursor: pointer; flex-shrink: 0; transition: .15s; }
.fav-show-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fav-rm { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: none; background: none; cursor: pointer; font-size: 18px; color: var(--text3); border-radius: 50%; transition: color .15s, background .15s; }
.fav-rm:hover { background: var(--bg2); color: var(--danger); }
.fav-stop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .12s;
}
.fav-stop-item:hover { background: var(--bg2); }

.fav-stop-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 12%, #fff);
    border: 1.5px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.fav-stop-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fav-stop-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fav-stop-routes {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    min-height: 18px;
}

.fav-stop-loading {
    font-size: 11px;
    color: var(--text3);
}

.fav-stop-no-routes {
    font-size: 11px;
    color: var(--text3);
}
.tabs { display: flex; gap: 4px; padding: 10px 12px 8px; flex-shrink: 0; }
.tab-btn { flex: 1; padding: 7px 4px; border: none; border-radius: var(--r); background: var(--bg2); font-size: 13px; font-weight: 600; color: var(--text3); cursor: pointer; transition: .15s; }
.tab-btn.on { background: var(--accent); color: #fff; }
.detail-header { padding: 10px 16px 4px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.back-btn { border: none; background: none; font-size: 13px; color: var(--accent); cursor: pointer; flex-shrink: 0; font-weight: 600; }
.detail-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-fav { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: none; background: none; cursor: pointer; font-size: 20px; color: var(--border); border-radius: 50%; transition: color .15s, background .15s; }
.detail-fav:hover { background: var(--bg2); }
.detail-fav.on { color: var(--gold); }
.dir-chips { display: flex; gap: 5px; flex-wrap: wrap; padding: 4px 12px 8px; }
.dir-chip { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1.5px solid var(--border); background: var(--bg); color: var(--text2); cursor: pointer; transition: .15s; white-space: nowrap; }
.dir-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.forecast-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.forecast-item:hover { background: var(--bg2); }
.f-badge { min-width: 44px; height: 44px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; flex-shrink: 0; }
.f-body { flex: 1; min-width: 0; }
.f-name { font-size: 13px; font-weight: 700; color: var(--text); }
.f-dest { font-size: 12px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-time { text-align: right; flex-shrink: 0; }
.f-min { font-size: 20px; font-weight: 800; line-height: 1; }
.f-min.now { color: var(--danger); }
.f-min.soon { color: var(--warn); }
.f-min.ok { color: var(--ok); }
.f-plate { font-size: 11px; color: var(--text3); margin-top: 2px; }
.f-map-ico { color: var(--text3); flex-shrink: 0; padding-left: 2px; }
.forecast-hint { font-size: 11px; color: var(--text3); text-align: center; padding: 6px 16px; }
.sched-block { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.sched-rhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sched-rname { font-size: 13px; font-weight: 700; color: var(--text); }
.sched-times { display: flex; flex-wrap: wrap; gap: 5px; }
.s-t { padding: 4px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; background: var(--bg2); color: var(--text2); }
.s-t.past { opacity: .3; }
.s-t.next { background: var(--ok); color: #fff; }
.r-chip { display: inline-flex; align-items: center; justify-content: center; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; line-height: 1.4; }
.empty { text-align: center; padding: 36px 20px; color: var(--text3); font-size: 13px; }
.skel { background: linear-gradient(90deg,#f0f1f3 25%,#e4e6ea 50%,#f0f1f3 75%); background-size: 200% 100%; animation: shim 1.3s infinite; border-radius: 5px; }
@keyframes shim { to { background-position: -200% 0; } }
.skel-row { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.vm-root { width: 0; height: 0; cursor: pointer; }
.vm-wrap { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.vm-rot { display: flex; flex-direction: column; align-items: center; transition: transform .35s linear; transform-origin: 50% calc(100% - 13px); }
.vm-arrow { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid currentColor; margin-bottom: -1px; }
.vm-circle { width: 26px; height: 26px; border-radius: 50%; background: currentColor; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.30); display: flex; align-items: center; justify-content: center; }
.vm-num { color: #fff; font-size: 10px; font-weight: 700; }
.sm-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  top: -9px;
  left: -9px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
}
.sm-dot:hover { transform: scale(1.4); }
.sm-dot.active {
  background: var(--danger);
  border-color: var(--danger);
}
.my-loc { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 5px rgba(37,99,235,.22); }
.maplibregl-popup-content { padding: 10px 13px !important; border-radius: var(--r-lg) !important; box-shadow: var(--shadow-lg) !important; font-family: inherit !important; font-size: 13px !important; }
.pop-title { font-weight: 700; color: var(--text); margin-bottom: 3px; }
.pop-row { color: var(--text2); margin-bottom: 1px; }
.pop-sub { color: var(--text3); font-size: 11px; }
.maplibregl-ctrl-group { box-shadow: var(--shadow) !important; border-radius: var(--r) !important; }
.stop-popup .maplibregl-popup-content { padding: 5px 10px !important; border-radius: 8px !important; font-size: 12px !important; pointer-events: none; white-space: nowrap; }
/* ── Тёмная тема (Telegram dark mode) ───────────────────────────── */
body.tg-dark {
  --bg:     #1c1c1e;
  --bg2:    #2c2c2e;
  --border: #3a3a3c;
  --text:   #ffffff;
  --text2:  #ebebf5cc;
  --text3:  #ebebf599;
  --shadow: 0 2px 12px rgba(0,0,0,.40);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.50);
}

body.tg-dark .maplibregl-popup-content {
  background: var(--bg) !important;
  color: var(--text) !important;
}

/* ── Колокольчик ─────────────────────────────────────────────────── */
.bell-btn {
  position: relative;
  width:  44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: .15s;
}
.bell-btn:hover { background: #e0e4f0; }

.bell-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--text3);
  transition: stroke .15s;
}
.bell-btn svg.active { stroke: var(--danger); }

#alert-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ── Уведомления ─────────────────────────────────────────────────── */
.alert-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--danger);
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.alert-icon { font-size: 14px; }

.alert-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  flex: 1;
}

.alert-time {
  font-size: 11px;
  color: var(--text3);
  flex-shrink: 0;
}

.alert-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}

.alert-body {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}

#panel-header {
cursor: pointer;
position: relative;
min-height: 72px;
}

/* Ручка для перетаскивания — видимая зона клика */
.panel-handle {
position: absolute;
top: 8px;
left: 50%;
transform: translateX(-50%);
width: 120px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
cursor: pointer;
}

.panel-handle::before {
content: '';
display: block;
width: 40px;
height: 4px;
background: var(--text3);
border-radius: 2px;
opacity: 0.5;
transition: opacity .2s;
}

.panel-handle:active::before {
opacity: 1;
}

/* Кнопки управления */
.panel-controls {
display: flex;
gap: 8px;
padding: 8px 12px 0;
}

.panel-btn {
flex: 1;
padding: 10px;
border: none;
border-radius: var(--r);
background: var(--bg2);
font-size: 12px;
font-weight: 600;
color: var(--text2);
cursor: pointer;
transition: .15s;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
}

.panel-btn:hover {
background: #e0e4f0;
}

.panel-btn.active {
background: var(--accent);
color: #fff;
}

.panel-btn svg {
width: 16px;
height: 16px;
stroke: currentColor;
fill: none;
stroke-width: 2;
}

@media (min-width: 641px) {
.panel-handle,
.panel-controls {
  display: none;
}
}

/* === Кнопки управления панелью (мобильные) === */
.panel-controls {
  display: flex;
  gap: 6px;
  padding: 8px 12px 0;
  justify-content: center;
}

.panel-btn {
  flex: 1;
  max-width: 44px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
  padding: 0;
}

.panel-btn:hover {
  background: #e0e4f0;
  transform: translateY(-1px);
}

.panel-btn:active {
  transform: translateY(0);
  background: #d0d4e0;
}

.panel-btn.active {
  background: var(--accent);
  color: #fff;
}

.panel-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Ручка для свайпа — визуальный индикатор */
#panel-header::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 8px;
  cursor: grab;
}

#panel-header:active::before {
  background: var(--text3);
}

/* Скрываем кнопки на десктопе */
@media (min-width: 641px) {
  .panel-controls,
  #panel-header::before {
    display: none;
  }
}