:root {
  color-scheme: dark;
  --bg: #202124;
  --surface: #292a2d;
  --surface-2: #303134;
  --border: #3c4043;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --blue: #8ab4f8;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--sans); }
button { font: inherit; }
.hidden { display: none !important; }
.app { display: flex; flex-direction: column; width: 100%; height: 100%; }
.target-bar { display: flex; flex: 0 0 35px; min-width: 0; background: #252629; border-bottom: 1px solid var(--border); }
.target-tabs { display: flex; align-items: end; gap: 1px; flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 4px 7px 0; scrollbar-width: thin; }
.new-tab-button { display: flex; align-items: center; gap: 4px; flex: none; height: 26px; margin: 4px 7px 4px 3px; padding: 0 9px; border: 1px solid #4b4f52; border-radius: 4px; background: #303134; color: var(--text); cursor: pointer; font-size: 12px; }
.new-tab-button:hover:not(:disabled) { background: #3c4043; border-color: #6b7075; }
.new-tab-button:disabled { color: #777d83; cursor: not-allowed; opacity: .65; }
.target-tab { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; max-width: 240px; height: 31px; padding: 0 11px; border: 1px solid transparent; border-bottom: 0; border-radius: 5px 5px 0 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.target-tab:hover { background: #303134; color: var(--text); }
.target-tab.active { background: var(--bg); color: var(--text); border-color: var(--border); }
.tab-icon { color: var(--blue); font-size: 10px; }
.tab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-empty { padding: 4px 8px 8px; color: #777d83; font-size: 12px; }
.frame-stage { position: relative; flex: 1 1 auto; min-height: 0; background: var(--bg); }
.devtools-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
.devtools-frame.inactive { visibility: hidden; pointer-events: none; }
.frame-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: var(--bg); color: var(--muted); font-size: 13px; }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; text-align: center; color: var(--muted); }
.empty-state p { margin: 0; font-size: 13px; }
.toast { position: fixed; right: 12px; bottom: 12px; z-index: 20; max-width: min(440px, calc(100vw - 24px)); padding: 9px 12px; border: 1px solid var(--border); border-radius: 5px; background: #303134f2; box-shadow: 0 10px 35px #0009; color: var(--text); font-size: 12px; }
.toast.error { color: #f6aea8; border-color: #8c4b47; }
