@font-face { font-family: Geist; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/geist-400.ttf') format('truetype'); }
@font-face { font-family: Geist; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/geist-500.ttf') format('truetype'); }
@font-face { font-family: Geist; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/geist-600.ttf') format('truetype'); }
@font-face { font-family: Geist; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/geist-700.ttf') format('truetype'); }

:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: #090b0a;
  --panel: #0b0b0b;
  --panel-2: #141414;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(191, 255, 4, 0.38);
  --text: #f4f4f5;
  --muted: #929296;
  --lime: #bfff04;
  --lime-2: #d7ff58;
  --danger: #ff5f57;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font: inherit;
}
input[type=checkbox] { accent-color: var(--lime); }

button {
  border: 0;
  cursor: pointer;
}
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

input, textarea, select {
  width: 100%;
  color: var(--text);
  background: #0b0b0b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(191, 255, 4, 0.08);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.auth-shell, .onboarding-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card, .onboarding-card, .modal-card {
  width: min(460px, 100%);
  background: rgba(17, 20, 17, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.brand {
  position: relative;
  width: 216px;
  max-width: 100%;
  aspect-ratio: 5;
  flex-shrink: 0;
  overflow: hidden;
}

.brand img {
  position: absolute;
  width: 116%;
  height: auto;
  max-width: none;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.brand--access { width: 240px; margin-bottom: 24px; }
.brand--compact { width: 104px; }

.eyebrow {
  margin: 18px 0 8px;
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1, h2, h3 { font-weight: 600; }

h1 {
  font-size: 30px;
  line-height: 1.02;
  letter-spacing: 0;
  margin-bottom: 16px;
}

h2 {
  font-size: 24px;
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 4px;
  background: #0c0f0d;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 20px 0;
}

.tab {
  padding: 10px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
}

.tab.active {
  color: #111411;
  background: var(--lime);
  font-weight: 800;
}

.primary, .secondary, .ghost, .danger {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary {
  color: #0b0d0b;
  background: var(--lime);
}

.primary:hover { background: var(--lime-2); transform: translateY(-1px); }

.secondary, .ghost {
  color: var(--lime);
  background: #111111;
  border: 1px solid var(--line);
}

.ghost {
  background: transparent;
}

.danger {
  color: white;
  background: rgba(255, 95, 87, 0.14);
  border: 1px solid rgba(255, 95, 87, 0.35);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.check-row input {
  width: auto;
  margin-top: 3px;
}

.app-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 18px;
  background: #000000;
  border-right: 1px solid var(--line);
}
.sidebar .brand { width: 186px; margin: 0 8px; }

.side-nav {
  display: grid;
  gap: 5px;
  margin-top: 38px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  padding: 0 12px;
  text-align: left;
  font-size: 14px;
  transition: color 150ms ease, background 150ms ease;
}

.nav-item.active, .nav-item:hover {
  color: var(--text);
  background: #161616;
}

.nav-item.active {
  box-shadow: inset 2px 0 0 var(--lime);
}
.nav-item.active svg { color: var(--lime); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-recents { margin: 30px 8px 20px; min-height: 0; overflow: auto; }
.recents-label { margin: 0 0 12px; color: #68686d; font-size: 11px; font-weight: 500; }
.recent-list { display: grid; gap: 4px; }
.recent-project { min-width: 0; min-height: 32px; width: 100%; padding: 6px 0; background: transparent; color: var(--muted); font-size: 12px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-project:hover { color: var(--text); }
.recent-empty { color: #68686d; font-size: 12px; }

.sidebar-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.main {
  min-width: 0;
  padding: 0;
}
.dashboard-topbar { height: 80px; padding: 0 40px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); position: relative; z-index: 3; background: #000; }
.global-search { display: flex; align-items: center; gap: 10px; width: min(410px, 100%); min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: #0a0a0a; }
.global-search svg { flex-shrink: 0; width: 17px; height: 17px; color: #74747a; }
.global-search input { min-width: 0; padding: 11px 0; font-size: 13px; background: transparent; border: 0; box-shadow: none; }
.global-search:focus-within { border-color: rgba(191,255,4,.3); }
.dashboard-topbar-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.topbar-dropdown { position: relative; }
.topbar-dropdown summary, .project-menu summary { list-style: none; cursor: pointer; }
.topbar-dropdown summary::-webkit-details-marker, .project-menu summary::-webkit-details-marker { display: none; }
.topbar-dropdown summary { display: flex; align-items: center; justify-content: center; }
.topbar-dropdown .icon-button { color: var(--muted); }
.notification-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); position: absolute; top: 6px; right: 5px; }
.topbar-popover { position: absolute; top: 48px; right: 0; z-index: 10; width: 236px; padding: 8px; background: #101010; border: 1px solid #272727; border-radius: 8px; box-shadow: 0 16px 40px #0009; animation: popover-in 140ms ease both; }
.topbar-popover button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 10px; color: var(--text); background: transparent; border-radius: 5px; text-align: left; font-size: 13px; }
.topbar-popover button:hover { background: #202020; }
.topbar-popover button svg { width: 16px; height: 16px; color: var(--muted); }
.profile-menu-heading { display: grid; gap: 5px; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; font-size: 13px; }
.profile-menu-heading span { font-size: 12px; }
.profile-avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: #22251b; border: 1px solid #414532; color: var(--lime); font-weight: 500; overflow: hidden; flex-shrink: 0; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-large { width: 80px; height: 80px; font-size: 26px; }
.notification-menu .topbar-popover { max-height: 350px; width: 280px; overflow: auto; }
.topbar-popover h3 { font-size: 14px; margin: 10px; }
.notification-item { border-top: 1px solid var(--line); padding: 12px 10px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.notification-item p { margin: 4px 0 0; color: var(--muted); }
.notification-empty { padding: 14px 10px; font-size: 13px; margin: 0; }
.dashboard-topbar .mobile-menu, .sidebar-backdrop { display: none; }
.dashboard-content { padding: 36px 40px; }
.home-main .dashboard-content { padding: 0; }

.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.dashboard-header .eyebrow { margin: 0 0 8px; }
.dashboard-header h1 { margin: 0; }
.import-section { margin: 0; }
.import-inner { max-width: 850px; }
.home-welcome {
  position: relative;
  min-height: calc(100dvh - 80px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  border: 0;
  padding: 300px 40px 96px;
  background: #000;
  overflow: hidden;
}
.planet-scene { position: absolute; top: -30px; left: 0; width: 100%; height: 465px; overflow: hidden; pointer-events: none; }
.planet-scene img { display: block; position: absolute; top: 0; left: 50%; width: 900px; height: 600px; transform: translateX(-50%); mask-image: linear-gradient(#000 55%, transparent 78%); animation: planet-drift 14s ease-in-out infinite alternate; }
.home-welcome .import-inner { position: relative; z-index: 1; width: min(760px, 100%); animation: greeting-in 550ms ease both; }
.welcome-greeting { color: var(--text); font-size: 32px; line-height: 1.3; font-weight: 500; text-align: center; margin: 0 0 14px; overflow-wrap: anywhere; }
.welcome-greeting > span:not(.greeting-emoji) { color: var(--lime); }
.greeting-emoji { display: inline-block; margin-left: 10px; font-size: 28px; vertical-align: middle; }
.home-welcome .url-box { margin-top: 28px; border-radius: 8px; background: #0c0c0d; border-color: rgba(191,255,4,.2); transition: border-color 150ms ease, box-shadow 150ms ease; }
.home-welcome .url-box:hover { border-color: rgba(191,255,4,.35); }
.home-welcome .url-box:focus-within { border-color: rgba(191,255,4,.6); box-shadow: 0 0 0 3px rgba(191,255,4,.045); }
.home-welcome .url-box .primary { border-radius: 5px; }
.home-welcome .url-box input:focus { box-shadow: none; }
.url-icon { display: grid; place-items: center; color: var(--muted); }
.url-icon svg { width: 19px; height: 19px; }
.import-submit { height: 44px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.import-submit svg { width: 17px; height: 17px; }
.import-submit:disabled { opacity: .8; }
.import-submit:disabled svg { animation: spinner 900ms linear infinite; }
@keyframes spinner { to { transform: rotate(360deg); } }
.import-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 32px 0 0; }
.import-benefits > div { display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0; padding: 0 16px; }
.import-benefits > div + div { border-left: 1px solid #252525; }
.import-benefits svg { color: var(--lime); width: 20px; height: 20px; flex-shrink: 0; }
.import-benefits > div > div { display: grid; gap: 5px; min-width: 0; }
.import-benefits strong { font-size: 12px; font-weight: 500; }
.import-benefits span { font-size: 11px; color: var(--muted); line-height: 1.4; }
@keyframes planet-drift { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -5px); } }
@keyframes greeting-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popover-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.url-box {
  margin: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.url-box input {
  border: 0;
  background: transparent;
  padding-left: 0;
}

.import-caption {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.arrow-button {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--lime);
  color: #111411;
  font-size: 24px;
  font-weight: 900;
}

.progress {
  width: min(720px, 100%);
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.step {
  height: 4px;
  background: #1a201a;
  border-radius: 999px;
  overflow: hidden;
}

.step.active::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--lime);
  animation: fill 900ms ease both;
}

@keyframes fill { from { transform: translateX(-100%); } to { transform: translateX(0); } }

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.toolbar h2 { margin-bottom: 0; font-size: 20px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 310px));
  gap: 28px 22px;
}

.tool-card, .setting-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-card {
  padding: 0;
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}
.project-info { display: grid; grid-template-columns: 24px minmax(0,1fr) 28px; align-items: start; gap: 8px; }
.project-avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1d2415; color: var(--lime); font-size: 11px; }
.project-description { min-width: 0; display: grid; gap: 4px; }
.project-title { background: transparent; color: var(--text); font-size: 12px; font-weight: 500; padding: 0; min-width: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; text-align: left; }
.project-description time { font-size: 11px; }
.project-menu { position: relative; }
.project-menu summary { display: grid; place-items: center; width: 28px; height: 26px; color: var(--muted); border-radius: 4px; }
.project-menu summary:hover { background: #171717; color: var(--text); }
.project-menu svg { width: 16px; height: 16px; flex-shrink: 0; }
.project-menu-items { position: absolute; right: 0; top: 30px; z-index: 2; width: 170px; padding: 5px; border: 1px solid #292929; background: #101010; box-shadow: 0 12px 24px #000a; border-radius: 7px; }
.project-menu-items button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; background: transparent; color: var(--text); font-size: 12px; text-align: left; border-radius: 4px; }
.project-menu-items button:hover { background: #202020; }
.project-menu-items .danger-icon { color: var(--danger); }
.empty-projects { grid-column: 1 / -1; min-height: 160px; display: grid; align-content: center; justify-items: center; gap: 12px; color: var(--muted); border-block: 1px dashed var(--line); }

.preview-tile {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.preview-tile:hover { border-color: rgba(191,255,4,.3); }
.preview-tile iframe { width: 400%; height: 400%; position: absolute; left: 0; top: 0; border: 0; transform: scale(.25); transform-origin: top left; pointer-events: none; background: #000; }

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-shell {
  height: 100vh;
  display: grid;
  height: 100dvh;
  grid-template-rows: 52px 44px minmax(0, 1fr);
  background: #000000;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #000000;
}

.topbar-left, .topbar-right, .device-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-right { justify-content: end; }
.topbar-left { min-width: 0; overflow: hidden; }
.project-name { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0; background: transparent; color: var(--lime); font-size: 12px; }
.project-name span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.project-name svg { flex-shrink: 0; width: 16px; }
.topbar .primary { min-height: 34px; padding: 0 12px; font-size: 12px; }
.device-switch { padding: 2px; background: #0d0d0d; border: 1px solid var(--line); border-radius: 6px; gap: 2px; }
.page-toolbar { display: flex; align-items: center; gap: 12px; padding: 4px 14px; min-width: 0; border-bottom: 1px solid var(--line); background: #080808; }
.page-picker { display: flex; align-items: center; gap: 8px; min-width: 0; width: min(300px, 40%); }
.page-picker > .lucide { color: var(--muted); }
.page-picker select { min-width: 0; width: 100%; height: 32px; min-height: 32px; padding: 0 26px 0 8px; font-size: 12px; border: 1px solid var(--line); border-radius: 5px; }
.page-count { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--muted); white-space: nowrap; }
.page-actions, .preview-mode { display: flex; align-items: center; gap: 2px; }
.preview-mode { margin-left: auto; border-left: 1px solid var(--line); padding-left: 8px; }
.editor-shell.is-preview .editor-sidebar { display: none; }
.editor-shell.is-preview .editor-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.site-report-modal { max-height: 85dvh; overflow: auto; }
.site-page-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; background: transparent; text-align: left; border-bottom: 1px solid var(--line); }
.site-page-row > span { flex: 1; min-width: 0; }
.site-page-row strong, .site-page-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-page-row strong { font-size: 13px; font-weight: 500; }
.site-page-row small { margin-top: 4px; font-size: 11px; color: var(--muted); }
.site-page-row:hover { color: var(--lime); }
.site-report-modal h3 { margin-top: 20px; font-size: 14px; }
.site-issues { padding-left: 18px; font-size: 12px; }
.site-issues li { margin: 10px 0; }
.site-issues strong, .site-issues span { display: block; overflow-wrap: anywhere; }
.site-issues span { margin-top: 4px; color: var(--muted); }
.lucide { width: 18px; height: 18px; flex-shrink: 0; }
.icon-button { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; flex-shrink: 0; color: #939393; background: transparent; border-radius: 5px; }
.icon-button:hover, .icon-button.active { color: var(--lime); background: #1a1d12; }
.icon-button:disabled { opacity: .3; cursor: default; }
.icon-button:focus-visible, button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.is-favorite { color: var(--lime); }
.danger-icon:hover { color: var(--danger); background: #291310; }

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

.editor-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
.editor-sidebar { min-height: 0; min-width: 0; overflow: hidden; background: #000; border-right: 1px solid var(--line); }

.tool-rail {
  padding: 4px 0;
  display: grid;
  align-content: start;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr);
  background: #000000;
}

.tool-card {
  height: 48px;
  padding: 8px 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 12px;
}
.tool-card .tool-icon { color: var(--lime); flex-shrink: 0; }
.tool-card:hover { background: #161616; border-color: var(--line-strong); }
.button-colors { align-items: end; }
.quiz-step-list { display: grid; gap: 6px; margin-bottom: 18px; }
.quiz-step-list button { justify-content: flex-start; min-height: 38px; }
.quiz-step-list button.active { border-color: var(--lime); color: var(--lime); }
.quiz-step-number { font-size: 11px; color: var(--muted); width: 18px; flex-shrink: 0; }
.quiz-field-editor { padding: 10px 0; border-top: 1px solid var(--line); }
.quiz-required { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 6px 0; }
.quiz-required input { width: 16px; height: 16px; accent-color: var(--lime); }
.button-colors label { flex: 1; min-width: 0; font-size: 11px; color: var(--muted); }
.button-colors input { height: 36px; margin-top: 6px; padding: 4px; cursor: pointer; }
.button-settings, .video-settings { display: grid; gap: 12px; }
.media-provider { font-size: 12px; }
.video-add { margin-top: 20px; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.video-settings .row button { min-width: 0; padding-inline: 8px; font-size: 11px; gap: 5px; }
.video-settings .row svg { width: 14px; height: 14px; flex-shrink: 0; }
.original-tracking { border-bottom: 1px solid var(--line); margin-bottom: 16px; padding-bottom: 14px; }
.original-tracking .tracking-heading { min-height: 30px; }
.original-tracker { display: grid; grid-template-columns: 24px minmax(0, 1fr) 32px; gap: 10px; align-items: center; padding: 9px 0; }
.original-tracker > .icon-button { width: 32px; height: 32px; }
.original-tracker > div { display: grid; gap: 4px; min-width: 0; }
.original-tracker strong { font-size: 12px; }
.original-tracker span { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.original-tracker > svg { width: 16px; height: 16px; color: var(--lime); justify-self: center; }
[data-edit-popup] { justify-content: flex-start; min-width: 0; margin-bottom: 8px; }
.inspection-empty, .inspection-error, .inspection-pending { margin: 8px 0 0; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.inspection-error { color: var(--danger); }
.inspection-pending { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.inspection-pending svg { width: 14px; height: 14px; }

.tool-card.active {
  color: var(--lime);
  border-color: var(--line-strong);
  background: #151515;
}

.tool-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #181818;
  color: var(--lime);
  font-weight: 900;
}

.panel {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  background: #000000;
}
.panel > h2 { display: none; }
.panel-header { display: flex; align-items: center; gap: 6px; min-height: 30px; margin-bottom: 14px; color: var(--lime); font-size: 11px; text-transform: uppercase; }
.panel-header .icon-button { width: 24px; }
.panel-header > svg { width: 14px; }
.selection-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #0b0b0b; margin-bottom: 14px; }
.selection-control small, .selection-title small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.selection-control strong { display: block; font-size: 14px; color: var(--lime); }
input.switch { width: 36px; height: 20px; padding: 0; border: 0; border-radius: 20px; appearance: none; background: #333; position: relative; cursor: pointer; flex-shrink: 0; }
input.switch::after { content: ""; position: absolute; width: 14px; height: 14px; top: 3px; left: 3px; border-radius: 50%; background: #b5b5b5; transition: transform .15s; }
input.switch:checked { background: var(--lime); }
input.switch:checked::after { transform: translateX(16px); background: #000; }
.selection-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.selection-title strong { color: var(--lime); font-size: 14px; }
.selected-text-preview { font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; max-height: 120px; overflow-y: auto; margin-bottom: 16px; }
.selected-editor { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.selected-editor textarea { font-size: 13px; line-height: 1.5; margin-bottom: 10px; min-height: 90px; }
.field-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.text-properties { margin: 4px 0 12px; }
.text-properties label { flex: 1; font-size: 11px; color: var(--muted); }
.text-properties input { margin-top: 6px; height: 36px; padding: 6px; }
.align-controls { display: flex; gap: 6px; margin-bottom: 12px; }
.full-width { width: 100%; font-size: 12px; }
.selection-empty { padding: 26px 8px; display: grid; justify-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.selection-empty svg { width: 26px; height: 26px; color: var(--lime); }
.text-filter { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; padding: 3px; margin-bottom: 16px; }
.text-filter button { background: transparent; color: var(--muted); min-height: 30px; border-radius: 4px; font-size: 12px; }
.text-filter button.active { color: #000; background: var(--lime); }
.panel-section-title { color: var(--muted); font-size: 11px; text-transform: uppercase; margin: 0 0 10px; }
.text-block-list { display: grid; gap: 5px; }
.text-block { display: grid; grid-template-columns: 25px minmax(0, 1fr) 14px; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 8px; background: #0a0a0a; color: #bbb; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; line-height: 1.45; }
.text-block span { overflow-wrap: anywhere; }
.text-block svg { width: 14px; }
.text-block.active, .text-block:hover { border-color: var(--line-strong); color: var(--lime); }
.tag-label { font-size: 10px; color: var(--lime); }
.image-thumbnail { width: 100%; height: 110px; padding: 6px; background: #000; border: 1px solid var(--line); border-radius: 5px; margin-bottom: 12px; }
.image-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.tracking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 18px; }
.tracking-heading { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; gap: 8px; }
.tracking-heading .panel-section-title { margin: 0; }
.tracking-count { color: var(--muted); font-size: 10px; white-space: nowrap; }
.tracking-provider { position: relative; display: flex; align-items: center; gap: 8px; height: 62px; padding: 8px; color: var(--lime); font-size: 11px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: #0a0a0a; min-width: 0; }
.tracking-provider:hover { border-color: var(--line-strong); background: #101010; }
.tracking-provider > span:not(.tracking-active) { overflow-wrap: anywhere; line-height: 1.35; }
.tracking-provider img, .tracking-detail-heading img, .tracking-result img { object-fit: contain; flex-shrink: 0; border-radius: 3px; }
.tracking-active { position: absolute; top: 4px; right: 4px; line-height: 0; }
.tracking-active svg { width: 12px; height: 12px; }
.tracking-detail { border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: #0a0a0a; margin-bottom: 14px; }
.tracking-detail-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.tracking-detail-heading h3 { font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.tracking-detail-heading .icon-button { width: 24px; height: 28px; }
.tracking-detail form { display: grid; gap: 10px; }
.tracking-detail .primary, .tracking-test-button, #testUtmify { font-size: 11px; min-height: 38px; padding: 8px; height: auto; }
.tracking-detail textarea { min-height: 158px; font-family: ui-monospace, monospace; font-size: 11px; }
.tracking-toggle { display: flex; align-items: center; justify-content: space-between; font-size: 12px; margin-bottom: 14px; }
#testUtmify { margin-top: 12px; }
.tracking-test-button { margin-bottom: 18px; }
.tracking-detail button:disabled { opacity: .4; cursor: default; }
.tracking-modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.tracking-modal-heading h2 { font-size: 20px; margin: 0; }
.tracking-diagnostics { max-height: calc(100dvh - 32px); overflow: auto; }
.tracking-result { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tracking-result > div { display: grid; gap: 4px; flex: 1; min-width: 0; }
.tracking-result strong { font-size: 13px; }
.tracking-result span { color: var(--muted); font-size: 12px; }
.tracking-result.installed > svg { color: var(--lime); }
.tracking-result.missing > svg { color: var(--danger); }
.tracking-result.inactive > svg { color: var(--muted); }
.tracking-event-status { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 16px 0; }
.tracking-published-test { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 10px; }
.tracking-published-test a { font-size: 12px; text-decoration: none; }
.tracking-published-test a[aria-disabled=true] { opacity: .4; pointer-events: none; }
.custom-tracking { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 18px; }
.custom-tracking summary { color: var(--muted); cursor: pointer; font-size: 12px; margin-bottom: 12px; }
.panel input, .panel select { font-size: 12px; padding: 9px; }
.panel input[type=color] { height: 36px; padding: 4px; }
.panel .setting-card input, .panel .setting-card textarea, .panel .setting-card .row { margin-bottom: 10px; }
.panel .setting-card .row:last-child { margin-bottom: 0; }
.panel .setting-card .primary, .panel .setting-card .secondary { padding: 0 10px; font-size: 11px; min-height: 34px; }

.setting-card {
  padding: 14px;
  margin-bottom: 12px;
}

.setting-card label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.canvas-wrap {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0;
  display: flex;
  justify-content: center;
  background: #000000;
}

.canvas {
  height: 100%;
  width: 100%;
  background: #000;
  max-width: 100%;
  transition: width 180ms ease;
}

.canvas.mobile { width: 390px; }
.canvas.tablet { width: 768px; }

.canvas iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.list {
  display: grid;
  gap: 8px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row > * { min-width: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(191,255,4,.1);
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 8px;
  background: #171c17;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.66);
}
.modal-card { max-height: calc(100dvh - 48px); overflow-y: auto; }
#exportStatus, #exportIssues { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
#exportIssues { padding-left: 20px; }
#exportIssues li + li { margin-top: 8px; }

.profile-modal { width: min(480px, 100%); background: #111; }
.profile-modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.profile-modal-heading h2 { font-size: 20px; margin: 0; }
.profile-photo-row { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.profile-photo-row > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.profile-photo-row p { font-size: 13px; margin: 6px 0 0; }
.photo-controls { display: grid; gap: 5px; }
.photo-controls .secondary, .photo-controls .ghost { min-height: 34px; font-size: 12px; padding: 0 10px; }
.photo-controls svg { width: 15px; height: 15px; }
.photo-upload { cursor: pointer; }
.emoji-picker { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 6px; margin-bottom: 12px; }
.emoji-option { height: 40px; display: grid; place-items: center; background: #191919; border: 1px solid var(--line); border-radius: 5px; font-size: 22px; color: var(--muted); }
.emoji-option svg { width: 20px; height: 20px; }
.emoji-option[aria-checked=true] { border-color: var(--lime); background: #24281b; }
.profile-form-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 20px; }
.profile-form-actions button { font-size: 13px; }
.profile-error { font-size: 12px; color: var(--danger); margin: 0; line-height: 1.5; }
.profile-details { margin: 0 0 24px; display: grid; gap: 16px; font-size: 13px; }
.profile-details div { display: grid; gap: 6px; }
.profile-details dt { color: var(--muted); }
.profile-details dd { margin: 0; overflow-wrap: anywhere; }

.option-grid {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.option {
  padding: 14px;
  text-align: left;
  color: var(--text);
  background: #101410;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.option.active, .option:hover {
  border-color: var(--line-strong);
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .main { padding: 0; }
  .dashboard-topbar { padding: 0 24px; }
  .dashboard-content { padding: 28px 24px; }
  .sidebar .brand { width: 164px; margin: 0; }
  .home-welcome { padding-inline: 24px; }
  .planet-scene img { width: 800px; height: auto; }
  .editor-shell { grid-template-rows: 88px 44px minmax(0, 1fr); }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 38px 38px; gap: 0 8px; padding: 4px 10px; }
  .device-switch { grid-row: 2; grid-column: 1; width: fit-content; }
  .topbar-right { grid-column: 2; grid-row: 1 / 3; gap: 2px; }
  .topbar-right .dirty { display: none; }
  .editor-body { grid-template-columns: 250px minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .app-shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; z-index: 21; transform: translateX(-100%); transition: transform 180ms ease; background: #080808; }
  .sidebar .brand { width: 186px; margin: 0 8px; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100%; background: #0009; z-index: 20; }
  .dashboard-topbar .mobile-menu { display: grid; width: 30px; flex-shrink: 0; }
  .dashboard-topbar { height: 64px; padding: 0 14px; gap: 10px; }
  .dashboard-topbar-actions { gap: 10px; }
  .global-search { width: auto; flex: 1; padding: 0 9px; gap: 7px; }
  .global-search input { font-size: 12px; }
  .profile-avatar { width: 32px; height: 32px; }
  .profile-avatar-large { width: 80px; height: 80px; }
  .dashboard-topbar-actions .icon-button { width: 28px; }
  .dashboard-content { padding: 26px 20px; }
  .dashboard-header h1 { font-size: 23px; }
  .dashboard-header .secondary { font-size: 12px; padding: 0 10px; min-height: 36px; }
  .home-welcome { min-height: calc(100dvh - 64px); padding: 240px 24px 80px; }
  .planet-scene { top: -6px; height: 350px; }
  .planet-scene img { width: 680px; height: auto; }
  .welcome-greeting { font-size: 28px; }
  .greeting-emoji { font-size: 24px; }
  .import-caption { font-size: 14px; }
  .import-benefits > div { padding: 0 10px; gap: 8px; }
  .import-benefits strong { font-size: 11px; }
  .import-benefits span { font-size: 10px; }
  .project-grid { grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); }
}

@media (max-width: 600px) {
  .toolbar { flex-wrap: wrap; }
  .url-box { gap: 4px; grid-template-columns: 20px minmax(0, 1fr) auto; }
  .url-box .primary { padding: 0 12px; font-size: 12px; }
  .editor-shell { grid-template-rows: 92px 78px minmax(0, 1fr); }
  .page-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: 32px 32px; gap: 2px 6px; padding: 5px 10px; }
  .page-picker { grid-column: 1 / -1; width: 100%; }
  .page-count { grid-column: 1; }
  .page-actions { grid-column: 2; }
  .preview-mode { grid-column: 3; padding-left: 4px; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 38px 46px; }
  .topbar-left { grid-column: 1 / -1; }
  .topbar-right { grid-column: 2; grid-row: 2; }
  .topbar-right #history { display: none; }
  .topbar-right .primary svg { display: none; }
  .topbar-right .icon-button { width: 28px; }
  .device-switch .icon-button { width: 28px; }
  .editor-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 37%) minmax(0, 1fr); }
  .editor-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .tool-rail { grid-template-columns: minmax(0, 1fr); }
  .tool-card { height: 48px; }
}

@media (max-width: 480px) {
  .home-welcome { padding: 216px 20px 70px; }
  .planet-scene { height: 315px; }
  .planet-scene img { width: 610px; }
  .welcome-greeting { font-size: 26px; margin-bottom: 12px; }
  .import-caption { max-width: 300px; margin-inline: auto; line-height: 1.6; }
  .home-welcome .url-box { grid-template-columns: 26px minmax(0,1fr); gap: 4px 8px; margin-top: 24px; padding: 8px; }
  .url-box input { padding: 10px 0; font-size: 14px; }
  .import-submit { grid-column: 1 / -1; width: 100%; height: 42px; }
  .import-benefits { grid-template-columns: 1fr; gap: 16px; max-width: 230px; margin: 28px auto 0; }
  .import-benefits > div { justify-content: flex-start; padding: 0; gap: 14px; }
  .import-benefits > div + div { border: 0; }
  .import-benefits strong { font-size: 12px; }
  .import-benefits span { font-size: 11px; }
  .notification-menu .topbar-popover { width: 260px; right: -42px; }
  .emoji-picker { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .profile-modal { padding: 22px; }
  .profile-photo-row { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
