.landing {
  min-height: 100%;
  max-width: 100vw;
  overflow-x: clip;
  box-sizing: border-box;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(91, 141, 239, 0.22), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(139, 92, 246, 0.12), transparent 45%),
    var(--bg-app, #1a1d23);
  color: var(--text, #e8eaed);
  font-family: var(--font-ui, system-ui, sans-serif);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
  padding-top: max(14px, env(safe-area-inset-top));
  border-bottom: 1px solid rgba(61, 68, 80, 0.85);
  background: color-mix(in srgb, var(--bg-panel, #22262e) 92%, transparent);
  backdrop-filter: blur(12px);
}

.landing-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.landing-nav-logo {
  flex-shrink: 0;
  width: clamp(28px, 8vw, 36px);
  height: clamp(28px, 8vw, 36px);
}

.landing-nav-brand span {
  font-weight: 650;
  font-size: clamp(15px, 4vw, 17px);
  letter-spacing: -0.02em;
}

.landing-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.landing-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 4px;
  color: var(--text-muted, #9aa0a6);
  text-decoration: none;
  font-size: 13px;
}

.landing-nav-links a:hover {
  color: var(--text, #e8eaed);
}

@media (pointer: coarse) {
  .landing-nav-links a {
    min-height: 44px;
    padding: 6px 8px;
  }
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border, #3d4450);
  background: var(--bg-elevated, #2a2f38);
  color: var(--text, #e8eaed);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

@media (pointer: coarse) {
  .landing-btn {
    min-height: 48px;
  }
}

.landing-btn:hover {
  background: var(--border, #3d4450);
}

.landing-btn--primary {
  background: var(--accent, #5b8def);
  border-color: transparent;
  color: #fff;
}

.landing-btn--primary:hover {
  filter: brightness(1.08);
}

.landing-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 8vw, 96px) max(16px, env(safe-area-inset-left)) 56px max(16px, env(safe-area-inset-right));
  max-width: 1200px;
  margin: 0 auto;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

@media (min-width: 960px) {
  .landing-hero-grid {
    grid-template-columns: 1fr minmax(260px, 420px);
  }
}

@media (max-width: 720px) {
  .landing-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .landing-nav-brand {
    justify-content: flex-start;
  }

  .landing-nav-links {
    justify-content: center;
    gap: 12px 20px;
    padding: 12px 0;
    border-top: 1px solid rgba(61, 68, 80, 0.55);
    border-bottom: 1px solid rgba(61, 68, 80, 0.55);
  }

  .landing-nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }
}

@media (max-width: 380px) {
  .landing-nav-actions {
    grid-template-columns: 1fr;
  }
}

.landing-hero-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.45);
  background: rgba(79, 70, 229, 0.15);
  margin-bottom: 18px;
}

.landing-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 6.5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.landing-hero-word {
  display: inline-block;
  margin-right: 0.28em;
  margin-bottom: 0.06em;
}

.landing-hero-lead {
  margin: 0 0 28px;
  max-width: 52ch;
  font-size: clamp(15px, 3.8vw, 17px);
  line-height: 1.55;
  color: var(--text-muted, #9aa0a6);
}

.landing-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.landing-hero-meta {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 12px;
  color: var(--text-muted, #9aa0a6);
}

@media (min-width: 520px) {
  .landing-hero-meta {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }
}

.landing-hero-meta code {
  font-size: 11px;
  word-break: break-all;
}

.landing-hero-meta strong {
  color: var(--text, #e8eaed);
  font-weight: 600;
}

.landing-hero-visual {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: min(100%, 420px);
  max-height: min(72vw, 380px);
  margin: 0 auto;
}

@media (min-width: 901px) {
  .landing-hero-visual {
    max-height: 420px;
  }
}

.landing-orbit {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px dashed rgba(91, 141, 239, 0.35);
  pointer-events: none;
}

.landing-mock {
  position: absolute;
  inset: 14%;
  border-radius: 16px;
  background: linear-gradient(145deg, #2a2f38 0%, #1e2229 100%);
  border: 1px solid var(--border, #3d4450);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.landing-mock-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #3d4450);
  background: rgba(0, 0, 0, 0.2);
}

.landing-mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4b5563;
}

.landing-mock-dot:nth-child(1) {
  background: #f87171;
}
.landing-mock-dot:nth-child(2) {
  background: #fbbf24;
}
.landing-mock-dot:nth-child(3) {
  background: #4ade80;
}

.landing-mock-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(22px, 36px) minmax(0, 1fr) minmax(52px, 120px);
  gap: 6px;
  padding: 10px;
  min-height: 0;
}

@media (max-width: 400px) {
  .landing-mock-body {
    grid-template-columns: minmax(18px, 28px) minmax(0, 1fr) minmax(44px, 88px);
    gap: 4px;
    padding: 8px;
  }
}

.landing-mock-sidebar {
  border-radius: 6px;
  background: rgba(91, 141, 239, 0.12);
}

.landing-mock-canvas {
  border-radius: 8px;
  background: #f4f5f7;
  position: relative;
  overflow: hidden;
}

.landing-mock-shape {
  position: absolute;
  width: 42%;
  height: 32%;
  left: 28%;
  top: 34%;
  border-radius: 10px;
  background: linear-gradient(135deg, #d1d5db, #9ca3af);
  border: 2px solid #5b8def;
  box-shadow: 0 8px 24px rgba(91, 141, 239, 0.25);
}

.landing-mock-inspector {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-mock-bar {
  height: 6px;
  margin: 6px 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.landing-section {
  padding: clamp(40px, 8vw, 64px) max(16px, env(safe-area-inset-left)) clamp(40px, 8vw, 64px)
    max(16px, env(safe-area-inset-right));
  max-width: 1100px;
  margin: 0 auto;
}

.landing-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.landing-section-intro {
  margin: 0 0 36px;
  max-width: 70ch;
  color: var(--text-muted, #9aa0a6);
  line-height: 1.55;
  font-size: clamp(14px, 3.2vw, 15px);
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.landing-card {
  padding: clamp(16px, 4vw, 22px);
  border-radius: 12px;
  border: 1px solid var(--border, #3d4450);
  background: color-mix(in srgb, var(--bg-panel, #22262e) 96%, transparent);
}

.landing-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 650;
}

.landing-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted, #9aa0a6);
}

.landing-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
  background: rgba(91, 141, 239, 0.15);
  color: #93c5fd;
}

.landing-compare-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: 12px;
  border: 1px solid var(--border, #3d4450);
  margin: 0 -4px;
  padding: 0 4px;
  scrollbar-gutter: stable;
}

.landing-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(12px, 2.8vw, 13px);
  min-width: 560px;
}

.landing-compare td:nth-child(2),
.landing-compare td:nth-child(3) {
  white-space: normal;
  max-width: 42ch;
}

.landing-compare th,
.landing-compare td {
  padding: 12px min(14px, 3vw);
  text-align: left;
  border-bottom: 1px solid var(--border, #3d4450);
  vertical-align: top;
}

.landing-compare th {
  background: rgba(91, 141, 239, 0.12);
  font-weight: 650;
  color: #e8eaed;
}

.landing-compare tr:last-child td {
  border-bottom: none;
}

.landing-compare td:first-child {
  font-weight: 600;
  color: #e8eaed;
  white-space: nowrap;
}

.landing-cta-panel {
  margin: clamp(32px, 6vw, 48px) max(16px, env(safe-area-inset-left)) clamp(48px, 10vw, 80px)
    max(16px, env(safe-area-inset-right));
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(24px, 5vw, 36px) clamp(18px, 4vw, 32px);
  border-radius: 16px;
  border: 1px solid rgba(91, 141, 239, 0.35);
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.12), rgba(139, 92, 246, 0.08));
  text-align: center;
}

.landing-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 480px) {
  .landing-hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-hero-ctas .landing-btn {
    width: 100%;
    justify-content: center;
  }

  .landing-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-cta-actions .landing-btn {
    width: 100%;
    justify-content: center;
  }
}

.landing-cta-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 4.5vw, 1.5rem);
}

.landing-cta-panel p {
  margin: 0 0 22px;
  color: var(--text-muted, #9aa0a6);
  font-size: clamp(13px, 3.2vw, 14px);
  line-height: 1.5;
}

.landing-footer {
  padding: 24px max(16px, env(safe-area-inset-left)) max(28px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-right));
  border-top: 1px solid var(--border, #3d4450);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted, #9aa0a6);
}

.landing-footer p {
  margin: 0;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.landing-footer a {
  color: var(--accent, #5b8def);
  text-decoration: none;
}

.landing-footer a:hover {
  text-decoration: underline;
}
:root {
  color-scheme: dark;
  --bg-app: #1a1d23;
  --bg-panel: #22262e;
  --bg-elevated: #2a2f38;
  --border: #3d4450;
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --accent: #5b8def;
  --accent-dim: #3d5a8a;
  --danger: #e57373;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 6px;
}

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

html,
body,
#root {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 6px 12px;
}

button:hover {
  background: var(--border);
}

button.primary {
  background: var(--accent);
  color: #fff;
}

button.primary:hover {
  filter: brightness(1.08);
}

input[type='text'],
input[type='number'] {
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 8px;
  width: 100%;
}

select {
  background-color: var(--bg-app);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 28px 5px 8px;
  min-height: 30px;
  max-width: 100%;
  cursor: pointer;
  /* Avoid light system chrome + washed-out text in Electron / WebKit */
  accent-color: var(--accent);
}

select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

select option,
select optgroup {
  background-color: var(--bg-elevated);
  color: var(--text);
}

input:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

select:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
  outline-offset: 0;
}

.app-root {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-layout {
  flex: 1;
  display: grid;
  grid-template-areas:
    'toolbar center inspector'
    'toolbar bottom bottom';
  min-height: 0;
}

.area-toolbar {
  grid-area: toolbar;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  min-height: 0;
}

.toolbar-groups {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.toolbar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0 6px 8px;
}

.toolbar-group + .toolbar-group {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.area-center {
  grid-area: center;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.area-center-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.area-inspector-shell {
  grid-area: inspector;
  display: flex;
  min-width: 0;
  min-height: 0;
}

.area-inspector {
  flex: 1;
  min-width: 0;
  background: var(--bg-panel);
  overflow: auto;
}

.area-inspector select {
  width: 100%;
  min-width: 0;
}

.area-bottom {
  grid-area: bottom;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  display: flex;
  min-height: 0;
  min-width: 0;
}

.area-bottom-content {
  flex: 1;
  display: flex;
  min-height: 0;
  min-width: 0;
}

.dock-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.dock-panel-layers {
  flex-shrink: 0;
}

.dock-panel-fill {
  flex: 1;
  min-width: 0;
}

.dock-panel-message {
  padding: 12px;
  color: var(--text-muted);
}

.dock-panel-inner {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}

.dock-panel-inner--column {
  display: flex;
  flex-direction: column;
}

.resize-handle {
  flex-shrink: 0;
  touch-action: none;
  background: transparent;
  position: relative;
  z-index: 2;
}

.resize-handle-horizontal {
  width: 6px;
  cursor: col-resize;
}

.resize-handle-vertical {
  height: 6px;
  cursor: row-resize;
}

.resize-handle::after {
  content: '';
  position: absolute;
  background: var(--border);
  opacity: 0.85;
  transition: background 0.12s ease, opacity 0.12s ease;
}

.resize-handle-horizontal::after {
  top: 0;
  bottom: 0;
  left: 2px;
  width: 1px;
}

.resize-handle-vertical::after {
  left: 0;
  right: 0;
  top: 2px;
  height: 1px;
}

.resize-handle:hover::after,
.resize-handle.is-dragging::after {
  background: var(--accent);
  opacity: 1;
}

.resize-handle-inspector {
  margin-left: -3px;
}

.resize-handle-layers {
  margin-left: -3px;
}

body.is-resizing {
  cursor: inherit;
}

body.is-resizing * {
  cursor: inherit !important;
}

.panel-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 10px 12px 6px;
}

.top-bar {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.top-bar-project-name {
  margin-right: 12px;
  min-width: 120px;
  max-width: 280px;
  height: 28px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.top-bar-project-name--display {
  display: inline-block;
  line-height: 28px;
  cursor: text;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.top-bar-project-name--display:hover {
  border-color: var(--border);
}

.top-bar-project-name--display:focus-visible {
  outline: none;
  border-color: var(--accent);
}

.top-bar-project-name:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--accent);
}

.top-bar-canvas-size select {
  width: auto;
  min-width: 168px;
  min-height: 28px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.mode-toggle {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.mode-toggle button {
  border-radius: 0;
  padding: 4px 14px;
  font-size: 12px;
  background: transparent;
}

.mode-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #12141a;
  overflow: hidden;
}

.layers-tree {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.layers-tree li {
  padding: 4px 8px 4px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.layers-tree li:hover {
  background: var(--bg-elevated);
}

.layers-tree li.selected {
  background: var(--accent-dim);
}

.layers-tree .indent {
  margin-left: 14px;
}

.timeline-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
}

.timeline-label-column {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg-panel);
}

.timeline-ruler-gutter {
  height: 28px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.timeline-scroll {
  flex: 1;
  min-width: 0;
  overflow: auto;
}

.timeline-time-inner {
  position: relative;
}

.timeline-empty {
  margin: 0;
  padding: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.timeline-ruler {
  height: 28px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: relative;
  cursor: pointer;
}

.track-label {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.track-lane {
  position: relative;
  height: 28px;
  border-bottom: 1px solid var(--border);
}

.keyframe-dot-anchor {
  display: inline-flex;
}

.keyframe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: grab;
}

.keyframe-dot:hover {
  transform: scale(1.15);
}

.keyframe-dot--selected {
  box-shadow: 0 0 0 2px #f59e0b;
  z-index: 2;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ff7043;
  pointer-events: none;
  z-index: 2;
}

.playhead::before {
  content: '';
  position: absolute;
  top: 0;
  left: -5px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #ff7043;
}

.playhead--lane::before {
  display: none;
}

/* Inspector: hover tooltips on section info icons */
.inspector-help {
  position: relative;
  flex-shrink: 0;
}

.inspector-help-trigger {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.inspector-help-trigger:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.inspector-help-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.inspector-help-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  width: 260px;
  max-width: min(260px, 70vw);
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.inspector-help-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
}

.inspector-help:hover .inspector-help-tooltip,
.inspector-help:focus-within .inspector-help-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.inspector-panel {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inspector-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.inspector-section--disabled .inspector-section-title {
  color: var(--text-muted);
}

.inspector-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 0 0;
}

.inspector-section-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.inspector-section-toggle:hover {
  background: var(--bg-elevated);
}

.inspector-section-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.inspector-section-chevron {
  width: 12px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 11px;
}

.inspector-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.inspector-section-help {
  flex-shrink: 0;
}

.inspector-section-body {
  padding: 0 10px 10px;
}

.inspector-section-hint {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}

.inspector-subsection-title {
  margin: 8px 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.inspector-subsection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 6px;
}

.inspector-subsection-header .inspector-subsection-title {
  margin: 0;
}

.area-inspector input:disabled,
.area-inspector select:disabled,
.area-inspector button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tooltip-anchor {
  display: inline-flex;
  max-width: 100%;
}

.tooltip-anchor--block {
  display: flex;
  min-width: 0;
}

.app-tooltip {
  position: fixed;
  z-index: 20000;
  max-width: min(320px, 90vw);
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.app-root--home {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(91, 141, 239, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(91, 141, 239, 0.08), transparent 28%),
    var(--bg-app);
}

.app-root--loading {
  align-items: center;
  justify-content: center;
}

.editor-loading {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.home-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home-screen-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-panel) 88%, transparent);
  backdrop-filter: blur(10px);
}

.home-screen-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.home-screen-title {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.home-screen-subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.home-screen-site-link {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.home-screen-site-link:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg-elevated);
}

.home-screen-refresh {
  flex-shrink: 0;
}

.home-screen-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-screen-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  gap: 16px;
}

.home-screen-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-elevated) 92%, #fff 8%), var(--bg-panel));
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.home-screen-action-card:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.home-screen-action-card--primary {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, var(--bg-panel)), var(--bg-panel));
}

.home-screen-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 18%, var(--bg-elevated));
  color: #dbe7ff;
}

.home-screen-action-label {
  font-size: 16px;
  font-weight: 600;
}

.home-screen-action-meta {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.home-screen-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));
  background: color-mix(in srgb, var(--danger) 12%, var(--bg-app));
  color: #ffcdd2;
}

.home-screen-recents {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.home-screen-recents-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.home-screen-recents-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.home-screen-recents-count {
  color: var(--text-muted);
  font-size: 12px;
}

.home-screen-muted {
  margin: 0;
  color: var(--text-muted);
}

.home-screen-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 240px;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: color-mix(in srgb, var(--bg-panel) 88%, transparent);
}

.home-screen-empty-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.home-screen-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.home-screen-grid-item {
  position: relative;
}

.home-screen-project-card {
  width: 100%;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  background: var(--bg-panel);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.home-screen-project-card:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.home-screen-project-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.home-screen-project-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.home-screen-project-meta {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-muted);
}

.home-screen-project-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  color: #ffcdd2;
  background: color-mix(in srgb, var(--danger) 18%, var(--bg-elevated));
}

.home-screen-grid-item:hover .home-screen-project-delete,
.home-screen-grid-item:focus-within .home-screen-project-delete {
  opacity: 1;
  pointer-events: auto;
}

.home-screen-project-delete:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 28%, var(--bg-elevated));
}

.top-bar-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin-right: 4px;
  flex-shrink: 0;
}

.top-bar-logo {
  margin-right: 8px;
  flex-shrink: 0;
}
