/* Browser edition adjustments; the recovered desktop styles remain intact. */
[hidden] { display: none !important; }

@media (max-width: 600px) {
  .topbar {
    height: 92px;
    flex: 0 0 92px;
    flex-wrap: wrap;
    align-content: center;
    gap: 6px;
    padding: 8px 10px;
    min-width: 0;
  }
  .topbar .brand { order: 0; flex: 0 0 28px; }
  #btnSidebar { order: 1; flex: 0 0 28px; width: 28px; height: 30px; padding: 0; }
  .topbar .tb-sep, .topbar .tb-spacer { display: none; }
  .topbar .proj-title {
    order: 2;
    flex: 1 1 calc(100% - 178px);
    min-width: 0;
    width: 0;
    height: 32px;
    font-size: 15px;
  }
  #btnKeys { order: 3; flex: 0 0 104px; height: 32px; padding: 5px 8px; font-size: 12px; }
  .topbar .model-chip {
    order: 4;
    flex: 1 1 calc(100% - 112px);
    min-width: 0;
    max-width: calc(100% - 112px);
    height: 30px;
    padding: 4px 9px;
    font-size: 11px;
  }
  #btnProjects { order: 5; }
  #btnExport { order: 6; }
  #btnProjects, #btnExport { height: 30px; padding: 5px 10px; font-size: 12px; }
  .layout, .work { min-width: 0; width: 100%; }
  .sidebar, .console { top: 92px; }
  .sidebar:not(.open), .console:not(.open) { display: none !important; }
  .sidebar.open, .console.open { display: flex; }
  .work-head { flex-wrap: wrap; padding: 8px 10px; gap: 5px 8px; }
  .work-head .ch-title { flex: 1 1 0; min-width: 0; width: 0; font-size: 16px; }
  .ch-tools { flex: 1 0 100%; gap: 6px; justify-content: space-between; }
  .ch-tools .mini { font-size: 11px; }
  .ch-tools .mini input { width: 62px; }
  .ch-tools .wc { font-size: 10.5px; padding: 3px 6px; }
  .ch-tools .status-pill { font-size: 10px; padding: 3px 8px; }
  .work-body { padding: 10px 10px 34px; }
  .block-head { padding: 8px 9px; gap: 6px; }
  .modal { padding: 10px; }
  .modal-card { max-height: 94dvh; }
  .modal-head, .modal-body, .modal-foot { padding: 12px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-head h3 { min-width: 0; }
  .keyrow { grid-template-columns: 1fr; gap: 5px; }
  .tabsline button { padding: 8px 9px; font-size: 12px; }
}
