:root {
  --bg:       #090b10;
  --surface:  #0f1318;
  --surface2: #161b24;
  --surface3: #1d2430;
  --border:   #252c3b;
  --border2:  #2e3848;
  --accent:   #3b82f6;
  --accent2:  #60a5fa;
  --violet:   #7c3aed;
  --green:    #22c55e;
  --red:      #ef4444;
  --amber:    #f59e0b;
  --text:     #e2e8f0;
  --muted:    #64748b;
  --muted2:   #94a3b8;
  --ff-display: 'Syne', sans-serif;
  --ff-mono:    'JetBrains Mono', monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-display);
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ── */
.topbar {
  height: 54px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 100;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}
.logo-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.topbar-divider { width: 1px; height: 24px; background: var(--border); }

.url-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.url-input-group {
  flex: 1;
  display: flex;
  align-items: stretch;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  min-width: 0;
}
.url-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #3b82f618;
}
#urlInput {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--ff-mono);
  font-size: 12px;
  padding: 10px 14px;
  min-height: 40px;
  box-sizing: border-box;
  outline: none;
}
#urlInput::placeholder { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--ff-display);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { background: var(--surface3); border-color: var(--border2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent2); border-color: var(--accent2); }
.btn.violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.violet:hover { background: #6d28d9; }
.btn.violet.annotate-on { box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.45); }
.btn.danger { background: #7f1d1d; border-color: var(--red); color: #fca5a5; }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn.sm { padding: 4px 10px; font-size: 11px; border-radius: 6px; }
.btn.icon { padding: 7px 10px; }
.btn:active { transform: scale(.97); }

/* URL bar: trailing Load — must follow .btn so borders/padding win */
.btn.url-input-group__action {
  flex-shrink: 0;
  margin: 0;
  border-radius: 0;
  border: none;
  border-left: 1px solid var(--border);
  box-shadow: none;
  align-self: stretch;
  padding: 0 16px;
  gap: 4px;
}
.btn.url-input-group__action.primary {
  border-left-color: rgba(255, 255, 255, 0.22);
}
.btn.url-input-group__action.primary:hover {
  background: var(--accent2);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.32);
}
.btn.url-input-group__action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  position: relative;
  z-index: 1;
}
.btn.url-input-group__action:active {
  transform: none;
}

/* ── MAIN LAYOUT ── */
.main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 300px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: var(--ff-mono);
}

.projects-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.projects-list::-webkit-scrollbar { width: 4px; }
.projects-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.project-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.project-card:hover { border-color: var(--border2); background: var(--surface3); }
.project-card.active {
  border-color: var(--accent);
  background: #1e3a5f22;
  box-shadow: 0 0 0 1px #3b82f640;
}
.project-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-url {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--ff-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 8px;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge {
  font-size: 10px;
  font-family: var(--ff-mono);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .04em;
}
.badge-blue { background: #1e3a5f; color: var(--accent2); border: 1px solid #2563eb44; }
.badge-green { background: #14391f; color: #4ade80; border: 1px solid #16a34a44; }

.project-del-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .15s;
}
.project-card:hover .project-del-btn { opacity: 1; }
.project-del-btn:hover { color: var(--red); }

/* ── ANNOTATIONS PANEL ── */
.ann-panel {
  width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width .2s;
}
@media (min-width: 768px) {
  .ann-panel.collapsed {
    width: 0;
    border: none;
  }
}

.ann-header {
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ann-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ann-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ann-tabs-sep {
  color: var(--border2);
  font-size: 12px;
  user-select: none;
  padding: 0 2px;
}
.ann-tab {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--ff-display);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  text-align: center;
  letter-spacing: -0.01em;
}
.ann-tab:hover {
  color: var(--text);
  background: var(--surface2);
}
.ann-tab.active {
  color: var(--accent2);
  background: var(--surface2);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.ann-tab-count {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 4px;
}
.ann-tab.active .ann-tab-count {
  color: var(--accent2);
}
.ann-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.ann-list::-webkit-scrollbar { width: 4px; }
.ann-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.ann-item-head-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.ann-num-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #fff;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, sans-serif;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.ann-num-badge-wide {
  font-size: 10px;
}
.ann-num-badge-triple {
  font-size: 9px;
}
.ann-item.resolved .ann-num-badge {
  background: #22c55e;
}
.ann-author-wrap {
  flex: 1;
  min-width: 0;
}

.ann-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 6px;
  transition: border-color .15s;
}
.ann-item:hover { border-color: var(--border2); }
.ann-item.resolved { opacity: 0.55; }
.ann-list.ann-list--resolved-tab .ann-item.resolved {
  opacity: 1;
}
.ann-author {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent2);
  font-family: var(--ff-mono);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ann-type-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .04em;
}
.ann-type-pin  { background: #1e3a5f; color: #60a5fa; }
.ann-type-rect { background: #2e1065; color: #c4b5fd; }
.ann-page-url {
  font-size: 9px;
  font-family: var(--ff-mono);
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  opacity: 0.8;
}
.ann-item:hover .ann-page-url {
  opacity: 1;
  color: var(--accent);
}
.ann-comment {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 8px;
}
.ann-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── BROWSER AREA ── */
.browser-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.browser-toolbar {
  height: 42px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.browser-toolbar-spacer {
  flex: 1;
  min-width: 8px;
}
.browser-toolbar .viewport-seg {
  flex-shrink: 0;
}
.mode-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--ff-mono);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted2);
}
.mode-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.mode-dot.live { background: var(--green); box-shadow: 0 0 6px var(--green); animation: glow 1.5s ease-in-out infinite; }
@keyframes glow { 0%,100% { opacity:1; } 50% { opacity:.5; } }

.frame-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
#proxyFrame {
  width: 100%; height: 100%;
  border: none;
  display: none;
}
#proxyFrame.show { display: block; }

/* Empty / loading states */
.state-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 40px;
}
.state-view.hidden { display: none; }
.state-icon { font-size: 52px; }
.state-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.state-sub { font-size: 13px; color: var(--muted2); max-width: 380px; line-height: 1.7; font-family: var(--ff-mono); }

.progress-bar {
  width: 220px; height: 3px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  border-radius: 2px;
  animation: progress 1.4s ease-in-out infinite;
}
@keyframes progress {
  0% { width:0;margin-left:0; }
  50% { width:60%;margin-left:20%; }
  100% { width:0;margin-left:100%; }
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: #000a;
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 28px;
  width: 420px;
  box-shadow: 0 24px 64px #0008;
  transform: scale(.95);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 20px; letter-spacing: -.02em; }
.form-group { margin-bottom: 16px; }
.form-label { font-size: 11px; font-weight: 700; color: var(--muted2); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; display: block; font-family: var(--ff-mono); }
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--ff-mono);
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 8px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #3b82f620; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* Scrollbar global */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

.hidden { display: none !important; }

/* ── DASHBOARD ── */
.dash-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.dash-topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.dash-title-wrap { flex: 1; }
.dash-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.dash-sub {
  font-size: 13px;
  color: var(--muted2);
  font-family: var(--ff-mono);
  max-width: 520px;
  line-height: 1.5;
}
.dash-main {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  max-width: 1200px;
}
.dash-card {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  text-align: left;
  color: inherit;
  width: 100%;
}
.dash-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px #3b82f640;
}
.dash-card:hover .project-del-btn { opacity: 1; }
.dash-card-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.dash-card-url {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--ff-mono);
  word-break: break-all;
  margin-bottom: 10px;
}
.dash-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-family: var(--ff-mono);
  font-size: 13px;
}

/* Viewport preset buttons */
.viewport-seg {
  display: flex;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.viewport-seg .vp-btn {
  background: transparent;
  border: none;
  color: var(--muted2);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  font-family: var(--ff-display);
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.viewport-seg .vp-btn:hover { color: var(--text); background: var(--surface3); }
.viewport-seg .vp-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Device chrome around iframe */
.device-stage {
  flex: 1;
  position: relative;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: repeating-conic-gradient(#12161c 0% 25%, #0e1117 0% 50%) 50% / 24px 24px;
}
.device-stage.is-desktop {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}
.device-frame {
  position: relative;
  overflow: hidden;
  background: #0c0e12;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  border: 1px solid var(--border2);
  transition: width .22s ease, height .22s ease, max-width .22s ease;
}
.device-stage.is-desktop .device-frame {
  flex: 1;
  width: 100% !important;
  min-height: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}
.device-frame[data-device="tablet"] {
  width: 834px;
  max-width: calc(100% - 24px);
  height: min(1112px, calc(100vh - 160px));
}
.device-frame[data-device="phone"] {
  width: 390px;
  max-width: calc(100% - 24px);
  height: min(844px, calc(100vh - 160px));
}
.device-inner {
  position: absolute;
  inset: 0;
  background: #fff;
}
.device-inner .state-view,
.device-inner #proxyFrame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.device-inner #proxyFrame.show { display: block; }

.project-root { height: 100%; display: flex; flex-direction: column; }
.project-root .main { flex: 1; min-height: 0; }

.badge-vp {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--ff-mono);
  background: #312e81;
  color: #c4b5fd;
  border: 1px solid #5b21b644;
}

/* ── Project workspace: responsive (phone / tablet / desktop) ── */
:root {
  --topbar-h: 54px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
}

.topbar.topbar--project {
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 10px;
  padding: 8px 12px;
  min-height: 54px;
  height: auto;
  align-items: center;
}
.topbar.topbar--project .topbar-spacer {
  display: none;
  flex: 1 1 auto;
  min-width: 8px;
  height: 1px;
}
.topbar.topbar--project .topbar-divider--desktop {
  display: none;
}
.topbar.topbar--project .url-bar-wrap {
  flex: 1 1 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.topbar.topbar--project .url-input-group {
  width: 100%;
  min-width: 0;
}
.topbar-actions-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 2px;
  min-height: 40px;
}
.topbar-actions-scroll::-webkit-scrollbar {
  height: 4px;
}
.topbar-actions-scroll::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 2px;
}
.topbar.topbar--project .btn--toolbar {
  flex-shrink: 0;
}
.topbar-comments-toggle {
  flex-shrink: 0;
}
.ann-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ann-drawer-close {
  display: none;
}

.ann-drawer-backdrop {
  display: none;
}

@media (min-width: 768px) {
  .topbar.topbar--project {
    flex-wrap: nowrap;
    height: 54px;
    padding: 0 16px;
    row-gap: 0;
  }
  .topbar.topbar--project .topbar-divider--desktop {
    display: block;
  }
  .topbar.topbar--project .url-bar-wrap {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .topbar-actions-scroll {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    max-width: 100%;
  }
}

@media (min-width: 1024px) {
  .topbar.topbar--project {
    padding: 0 20px;
    gap: 16px;
  }
  .topbar.topbar--project .url-bar-wrap {
    flex: 1;
    min-width: 0;
  }
  .topbar-actions-scroll {
    flex: 0 0 auto;
    overflow-x: visible;
    max-width: none;
  }
}

@media (max-width: 767px) {
  .topbar.topbar--project .topbar-spacer {
    display: block;
  }
  .logo--project .logo-text {
    display: inline;
  }
  .topbar-back {
    padding-left: 8px;
    padding-right: 8px;
  }
  .browser-toolbar .viewport-seg .vp-btn {
    padding: 6px 8px;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .btn.url-input-group__action {
    padding: 0 10px;
    font-size: 11px;
  }
  .logo--project .logo-text {
    display: none;
  }
}

@media (max-width: 767px) {
  .ann-drawer-backdrop {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--topbar-h, 54px);
    z-index: 210;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .ann-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .ann-drawer-backdrop[hidden] {
    display: none !important;
  }

  .project-root .ann-panel {
    position: fixed;
    top: var(--topbar-h, 54px);
    left: 0;
    bottom: 0;
    width: min(100vw - 40px, 300px);
    max-width: 100%;
    z-index: 220;
    border-right: 1px solid var(--border);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    height: auto;
  }
  .project-root .ann-panel.ann-drawer-open {
    transform: translateX(0);
  }
  .project-root .ann-panel.collapsed:not(.ann-drawer-open) {
    width: min(100vw - 40px, 300px);
    transform: translateX(-105%);
  }
  .ann-drawer-close {
    display: inline-flex;
  }
}

@media (min-width: 768px) {
  .ann-drawer-backdrop {
    display: none !important;
  }
  .project-root .ann-panel {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    transform: none !important;
    box-shadow: none;
    height: auto;
  }
  .project-root .ann-panel.ann-drawer-open {
    transform: none !important;
  }
}

@media (max-width: 767px) {
  .device-frame[data-device="tablet"],
  .device-frame[data-device="phone"] {
    height: min(70dvh, calc(100dvh - var(--topbar-h, 54px) - 100px));
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .ann-panel {
    width: 240px;
  }
  .dash-main {
    padding: 20px 16px;
  }
  .dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 767px) {
  .dash-topbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .dash-main {
    padding: 16px 12px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
