:root {
  --bg: #060606;
  --bg-elevated: #0e0e0f;
  --surface: #141416;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --text-muted: #8b8b93;
  --accent: #c8f031;
  --accent-hover: #d4f542;
  --accent-dim: rgba(200, 240, 49, 0.1);
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
}

.nav .logo-img {
  height: 32px;
  max-width: 44px;
}

.nav .logo span {
  font-size: 1rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Profile menu */
.nav-profile {
  position: relative;
}

.nav-profile-guest {
  display: flex;
  align-items: center;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: #1f1f1f;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-google:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.profile-guest-plan {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-avatar-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.profile-brief {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
}

.profile-plan {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.profile-expires {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.profile-chevron {
  color: var(--text-muted);
  margin-left: 2px;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  z-index: 100;
}

.profile-dropdown-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.profile-dropdown-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-dropdown-head .profile-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.profile-dropdown-head strong {
  font-size: 0.92rem;
}

.profile-dropdown-head span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-dropdown-plan {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.profile-plan-badge {
  display: inline-block;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.72rem;
}

.profile-limits {
  line-height: 1.35;
}

.profile-dropdown-link {
  display: block;
  width: 100%;
  padding: 10px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.profile-dropdown-link:hover {
  background: var(--surface);
}

.profile-logout {
  color: #ff6b6b;
}

.toolbar-right .nav-profile .btn-google {
  padding: 7px 12px;
  font-size: 0.78rem;
}

.toolbar-right .profile-trigger {
  padding: 4px 8px 4px 4px;
}

@media (max-width: 720px) {
  .profile-brief {
    display: none !important;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% -10%, rgba(200, 240, 49, 0.07), transparent),
    radial-gradient(ellipse 40% 30% at 10% 100%, rgba(200, 240, 49, 0.04), transparent);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.hidden {
  display: none !important;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.logo span {
  font-size: 1.15rem;
  font-weight: 700;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #8fb800 100%);
  box-shadow: 0 0 20px rgba(200, 240, 49, 0.25);
}

.logo-img {
  height: 32px;
  width: auto;
  max-width: 44px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  background: transparent !important;
}

.logo-sm .logo-img {
  height: 32px;
  max-width: 44px;
}

.logo-brand {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.toolbar-logo {
  height: 32px;
  width: auto;
  max-width: 44px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.toolbar-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.toolbar-meta .toolbar-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compose-input-tall {
  min-height: 180px;
}

.editor-workspace-resizable {
  --compose-width: 50%;
  grid-template-columns: var(--compose-width) 6px 1fr !important;
}
.editor-workspace-resizable .editor-compose { grid-column: 1; min-width: 0; }
.editor-workspace-resizable .editor-preview { grid-column: 3; min-width: 0; }
.editor-split-resizer {
  grid-column: 2;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
  background: var(--border);
  transition: background 0.15s;
  border-radius: 3px;
  margin: 8px 0;
  z-index: 2;
}
.editor-split-resizer:hover,
body.is-resizing .editor-split-resizer {
  background: rgba(200, 240, 49, 0.55);
}
body.is-resizing { cursor: col-resize; user-select: none; }

.btn-editor-prominent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(200, 240, 49, 0.45);
  background: linear-gradient(135deg, rgba(200, 240, 49, 0.22), rgba(200, 240, 49, 0.08));
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}
.btn-editor-prominent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 240, 49, 0.18);
}
a.btn-editor-prominent { text-decoration: none; }

.visual-edit-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(200, 240, 49, 0.28);
  background: linear-gradient(135deg, rgba(200, 240, 49, 0.1), rgba(255, 255, 255, 0.02));
}
.visual-edit-cta-copy p { margin: 4px 0 0; font-size: 0.82rem; color: var(--text-muted); }
.btn-visual-start { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; }
.visual-onboarding {
  margin-bottom: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--accent-dim); border: 1px solid rgba(200, 240, 49, 0.25);
  font-size: 0.84rem; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.visual-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 14px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
}
.visual-tool-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-muted); }
.visual-tool-label input[type="color"] { width: 32px; height: 28px; padding: 0; border: none; background: transparent; }
.visual-z-input { width: 52px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .8rem; }
.templates-body {
  min-height: 100vh;
  background: var(--bg);
}
.templates-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 48px;
  width: 100%;
  box-sizing: border-box;
}
.templates-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 28px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.templates-nav {
  justify-self: center;
  flex-wrap: wrap;
  justify-content: center;
}
.templates-header-profile {
  margin-left: auto;
}
.templates-hero { margin-bottom: 24px; }
.templates-hero h1 { font-size: 1.75rem; margin: 0 0 8px; }
.templates-hero p { color: var(--text-muted); margin: 0; max-width: 640px; }
.templates-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.templates-tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; font-size: .875rem; }
.templates-tab.active { background: rgba(200,240,49,.12); border-color: rgba(200,240,49,.4); color: var(--text); }
.templates-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  width: 100%;
}
.tpl-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tpl-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #0a100c;
}
.tpl-card-accent { height: 4px; flex-shrink: 0; }
.tpl-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.tpl-kind { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.tpl-card h3 { margin: 0; font-size: 1.05rem; word-break: break-word; }
.tpl-card p { margin: 0; font-size: .875rem; color: var(--text-muted); flex: 1; line-height: 1.45; }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-tag { font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-muted); }
.tpl-use { align-self: flex-start; margin-top: 8px; }
@media (max-width: 720px) {
  .templates-header {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .templates-nav { justify-self: stretch; justify-content: flex-start; }
  .templates-header-profile { justify-self: end; }
}
.compose-drop-zone.compose-drop-active { outline: 2px dashed rgba(200, 240, 49, 0.55); outline-offset: 4px; border-radius: 12px; }
.compose-drop-hint { margin: 6px 0 0; font-size: 0.72rem; color: var(--text-muted); }
.detail-visit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.detail-visit-actions .detail-visit-url { flex: 1; min-width: 160px; }

.editor-workspace-edit .editor-compose {
  border-right: 1px solid var(--border);
}

.interview-panel {
  margin-top: 8px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.interview-progress {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.interview-question {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.35;
}

.interview-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.45;
}

.interview-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.interview-choice {
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.interview-choice:hover,
.interview-choice.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.interview-text-input {
  width: 100%;
  min-height: 80px;
  margin-bottom: 12px;
}

.interview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

body.interview-active #compose-actions,
body.interview-active #btn-generate,
body.gen-active #compose-actions,
body.gen-active #btn-generate,
body.gen-active #compose-loading {
  display: none !important;
}

.gen-question-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(200, 240, 49, 0.2);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.gen-leave-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  border: 1px solid rgba(200, 240, 49, 0.25);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.gen-leave-banner a {
  color: var(--accent);
  font-weight: 600;
}

.gen-preview-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 280px;
  padding: 32px;
  text-align: center;
}

.gen-wave-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
}

.gen-wave-loader span {
  display: block;
  width: 5px;
  height: 28px;
  border-radius: 3px;
  background: var(--accent);
  animation: genWave 1.05s ease-in-out infinite;
}

.gen-wave-loader span:nth-child(2) { animation-delay: 0.12s; }
.gen-wave-loader span:nth-child(3) { animation-delay: 0.24s; }
.gen-wave-loader span:nth-child(4) { animation-delay: 0.36s; }
.gen-wave-loader span:nth-child(5) { animation-delay: 0.48s; }

@keyframes genWave {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.preview-loader-panel {
  position: relative;
  z-index: 2;
}

/* Full-preview particle loader */
.preview-loading.hidden {
  display: none !important;
}
.preview-loading:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-fx-loader {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, rgba(200, 240, 49, 0.07), rgba(6, 6, 6, 0.96));
  animation: previewFxIn 0.45s ease-out;
}
.preview-fx-content {
  transform: translateY(0);
}
@media (max-width: 768px) {
  .preview-fx-content {
    max-width: min(280px, calc(100vw - 32px));
    padding: 18px 20px;
  }
  .preview-fx-title { font-size: 0.98rem; }
  .preview-fx-sub { font-size: 0.8rem; }
}
@keyframes previewFxIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.preview-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.preview-fx-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px 28px;
  max-width: 320px;
  border-radius: 20px;
  background: rgba(12, 12, 12, 0.55);
  border: 1px solid rgba(200, 240, 49, 0.18);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.preview-fx-ring {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid rgba(200, 240, 49, 0.15);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}
.preview-fx-title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.preview-fx-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* Preview chrome + editor in preview panel */
.preview-chrome {
  position: sticky;
  top: 0;
  z-index: 6;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.preview-chrome-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.preview-chrome-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.preview-chrome-actions .btn-editor-prominent {
  padding: 8px 14px;
  font-size: 0.8rem;
}
.preview-chrome-actions .btn-editor-prominent.active {
  background: rgba(200, 240, 49, 0.28);
  box-shadow: inset 0 0 0 1px rgba(200, 240, 49, 0.5);
}
.editor-preview .visual-toolbar {
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  padding: 10px 14px;
  background: rgba(200, 240, 49, 0.04);
}
.editor-preview .preview-frame-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.editor-preview .preview-frame-wrap iframe,
.editor-preview .editor-frame-wrap iframe {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
}
.editor-panel.editor-preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.editor-panel.editor-preview .preview-placeholder {
  flex: 1;
  min-height: 0;
}
.editor-panel.editor-preview .bot-flow-root {
  flex: 1;
  min-height: 0;
  margin: 0;
  border: none;
  border-radius: 0;
}

/* Visual editor toolbar */
.visual-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(200, 240, 49, 0.06), rgba(200, 240, 49, 0.02));
}
.visual-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.visual-toolbar-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-right: 2px;
}
.visual-toolbar-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}
.visual-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.visual-tool-btn:hover:not(:disabled) {
  border-color: rgba(200, 240, 49, 0.35);
  background: rgba(200, 240, 49, 0.06);
}
.visual-tool-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.visual-text-input {
  flex: 1;
  min-width: 160px;
  max-width: 360px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
}
.visual-text-input:focus {
  outline: none;
  border-color: rgba(200, 240, 49, 0.45);
  box-shadow: 0 0 0 2px rgba(200, 240, 49, 0.12);
}
.visual-toolbar-text-group {
  flex: 1;
  min-width: 200px;
}
.visual-tool-btn-primary {
  border-color: rgba(200, 240, 49, 0.45);
  background: rgba(200, 240, 49, 0.12);
  color: var(--accent);
  font-weight: 600;
}
.compose-slug-field { margin-top: 14px; }
.compose-slug-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.compose-slug-input-wrap { flex: 1; min-width: 200px; }
.compose-custom-domain { margin-top: 10px; }
.compose-custom-domain .compose-input-sm { width: 100%; max-width: 420px; }

.bot-flow-root {
  flex: 1;
  min-height: 360px;
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.bot-canvas-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: rgba(200, 240, 49, 0.03);
}
.bot-flow-add-row { display: flex; flex-wrap: wrap; gap: 4px; }
.visual-tool-btn-sm {
  padding: 4px 9px !important;
  font-size: 0.72rem !important;
  min-height: 0 !important;
}
.bot-canvas-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bot-canvas-zoom-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
}
.bot-canvas-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
  background: #080c08;
  cursor: grab;
}
.bot-canvas-wrap.is-panning { cursor: grabbing; }
.bot-canvas-viewport {
  position: relative;
  width: 2800px;
  height: 1800px;
  transform-origin: 0 0;
  background-color: #0a0f0a;
  background-image:
    linear-gradient(rgba(200, 240, 49, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 240, 49, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}
.bot-canvas-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
@keyframes bot-edge-dash {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -36; }
}
.bot-canvas-edges .bot-edge {
  fill: none;
  stroke: rgba(200, 240, 49, 0.5);
  stroke-width: 2;
  stroke-dasharray: 8 6;
  stroke-linecap: round;
  marker-end: url(#bot-edge-arrow);
  animation: bot-edge-dash 1.6s linear infinite;
}
.bot-canvas-edges .bot-edge.is-temp {
  stroke: rgba(200, 240, 49, 0.9);
  stroke-width: 2;
  stroke-dasharray: 5 4;
  marker-end: url(#bot-edge-arrow-temp);
  animation: bot-edge-dash 0.9s linear infinite;
}
.bot-canvas-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bot-node {
  position: absolute;
  width: 212px;
  pointer-events: auto;
  border-radius: 10px;
  background: #121812;
  border: 1px solid rgba(200, 240, 49, 0.14);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.78rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}
.bot-node.is-selected {
  border-color: rgba(200, 240, 49, 0.45);
  box-shadow: 0 0 0 1px rgba(200, 240, 49, 0.2);
}
.bot-node.is-dragging {
  opacity: 0.95;
  z-index: 50;
}
.bot-node-start-badge {
  position: absolute;
  top: -9px;
  left: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0f0a;
  font-size: 0.62rem;
  font-weight: 700;
  z-index: 2;
}
.bot-node-port {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0a0f0a;
  border: 2px solid rgba(200, 240, 49, 0.4);
  flex-shrink: 0;
  cursor: crosshair;
  transition: border-color 0.12s, transform 0.12s;
  z-index: 3;
}
.bot-node-port:hover,
.bot-node-port.is-hot {
  border-color: var(--accent);
  background: rgba(200, 240, 49, 0.15);
  transform: scale(1.15);
}
.bot-node-port-in {
  position: absolute;
  left: -6px;
  top: 50%;
  margin-top: -5px;
}
.bot-node-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(200, 240, 49, 0.08);
  cursor: grab;
  background: rgba(200, 240, 49, 0.03);
}
.bot-node-head:active { cursor: grabbing; }
.bot-node-type {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(200, 240, 49, 0.75);
  font-weight: 700;
}
.bot-node-title {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0;
  min-width: 0;
}
.bot-node-title:focus { outline: none; }
.bot-node-del {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.bot-node-del:hover { color: #ff6b6b; }
.bot-node-body {
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bot-node-text {
  width: 100%;
  min-height: 44px;
  max-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: #dde5dd;
  font-family: inherit;
  font-size: 0.76rem;
  line-height: 1.4;
  padding: 6px 8px;
  resize: none;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.bot-node-text::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.bot-node-text:focus {
  outline: none;
  border-color: rgba(200, 240, 49, 0.35);
}
.bot-node-btn-label {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #c5d0c5;
  font-family: inherit;
  font-size: 0.74rem;
  padding: 0;
}
.bot-node-btn-label:focus { outline: none; color: #fff; }
.bot-node-image {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}
.bot-node-image img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
}
.bot-node-image-btn {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0 4px;
}
.bot-node-ports-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px solid rgba(200, 240, 49, 0.08);
}
.bot-node-port-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  font-size: 0.72rem;
  color: #9aa89a;
  border-radius: 6px;
}
.bot-node-port-row span { flex: 1; min-width: 0; }
.bot-node-port-row .bot-node-port-out { margin-left: auto; }
.bot-node-add-btn {
  border: 1px dashed rgba(200, 240, 49, 0.2);
  background: transparent;
  color: rgba(200, 240, 49, 0.75);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 0.68rem;
  cursor: pointer;
  width: 100%;
}
.bot-node-set-start {
  border: none;
  background: transparent;
  color: rgba(200, 240, 49, 0.65);
  font-size: 0.68rem;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.bot-node-set-start:hover { color: var(--accent); }

@media (max-width: 768px) {
  .bot-node { width: 196px; }
  .bot-canvas-viewport { width: 2200px; height: 1500px; }
}

.visual-save-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}
.visual-save-status.is-saving { color: var(--accent); }
.visual-save-status.is-ok { color: #6dd400; }

/* Hint bubbles */
.hint-bubble-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10060;
}
.hint-bubble {
  position: fixed;
  pointer-events: auto;
  max-width: min(300px, calc(100vw - 24px));
  padding: 14px 16px 12px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid rgba(200, 240, 49, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.hint-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.hint-bubble-body {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 10px;
}
.hint-bubble-body strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
}
.hint-bubble-actions {
  display: flex;
  justify-content: flex-end;
}
.hint-bubble-close {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  background: rgba(200, 240, 49, 0.14);
  transition: background 0.15s;
}
.hint-bubble-close:hover {
  background: rgba(200, 240, 49, 0.24);
}
.hint-bubble-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--bg-elevated);
  border: 1px solid rgba(200, 240, 49, 0.35);
  transform: rotate(45deg);
}
.hint-bubble-bottom .hint-bubble-arrow {
  top: -7px;
  left: calc(50% - 6px);
  border-bottom: none;
  border-right: none;
}
.hint-bubble-top .hint-bubble-arrow {
  bottom: -7px;
  left: calc(50% - 6px);
  border-top: none;
  border-left: none;
}
.hint-bubble-left .hint-bubble-arrow {
  right: -7px;
  top: calc(50% - 6px);
  border-bottom: none;
  border-left: none;
}
.hint-bubble-right .hint-bubble-arrow {
  left: -7px;
  top: calc(50% - 6px);
  border-top: none;
  border-right: none;
}

.compose-steps-hint {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.compose-steps-hint-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.compose-steps-hint-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(200, 240, 49, 0.12);
  color: var(--accent);
}

body.interview-active #gen-stepper {
  display: none !important;
}
body.interview-active .gen-question-panel:not(.hidden) {
  display: block !important;
}

.gen-dots {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.gen-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: genDotPulse 1.2s infinite ease-in-out;
}

.gen-dots span:nth-child(2) { animation-delay: 0.15s; }
.gen-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes genDotPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.75); }
  40% { opacity: 1; transform: scale(1.15); }
}

.gen-loading-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.gen-loading-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.projects-login-gate {
  display: flex;
  justify-content: center;
  padding: 48px 16px 64px;
}

.projects-login-card {
  max-width: 480px;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

.projects-login-card h2 {
  margin: 0 0 10px;
}

.projects-login-card p {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.detail-building-eta {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(254, 188, 46, 0.08);
  border: 1px solid rgba(254, 188, 46, 0.25);
  font-size: 0.88rem;
  color: #febc2e;
}

.card-build-progress,
.detail-build-progress {
  margin: 0 0 12px;
}

.card-build-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.card-build-progress-head strong {
  color: var(--accent);
  font-size: 0.95rem;
}

.card-build-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.card-build-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(200, 240, 49, 0.55), var(--accent));
  transition: width 0.6s ease;
}

.card-build-progress-sub {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.toolbar-limits-warn {
  color: #febc2e !important;
}

.limits-gate-card .limits-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.limits-gate-card .limits-gate-actions .btn-lg {
  width: 100%;
  justify-content: center;
}

.interview-skip-all {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.78rem;
}

@media (max-width: 768px) {
  .interview-actions {
    flex-direction: column;
  }

  .interview-skip-all {
    margin-left: 0;
    order: 3;
  }
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

.gen-loading {
  margin-top: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.gen-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gen-loading-title {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.gen-loading-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Generation stepper */
.gen-stepper {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface) 0%, var(--bg-elevated) 100%);
}

.gen-stepper-head {
  margin-bottom: 24px;
  text-align: center;
}

.gen-stepper-head h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.gen-eta {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.gen-time-detail {
  margin: 0 0 4px;
  font-size: 0.82rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.gen-time-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 8px 0 12px;
  overflow: hidden;
}

.gen-time-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #8fb800);
  transition: width 1s linear;
}

.gen-limits {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gen-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gen-step {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 20px;
}

.gen-step:last-child {
  padding-bottom: 0;
}

.gen-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border-strong) 0,
    var(--border-strong) 6px,
    transparent 6px,
    transparent 12px
  );
  animation: gen-dash 1.2s linear infinite;
}

.gen-step.done:not(:last-child)::after {
  background: var(--accent);
  animation: none;
  opacity: 0.35;
}

.gen-step.active:not(:last-child)::after {
  background: repeating-linear-gradient(
    to bottom,
    var(--accent) 0,
    var(--accent) 6px,
    transparent 6px,
    transparent 12px
  );
  animation: gen-dash 0.8s linear infinite;
}

@keyframes gen-dash {
  from { background-position: 0 0; }
  to { background-position: 0 12px; }
}

.gen-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 1;
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.gen-step.active .gen-step-dot {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 240, 49, 0.12);
  animation: gen-pulse 1.5s ease-in-out infinite;
}

.gen-step.done .gen-step-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #060606;
}

@keyframes gen-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(200, 240, 49, 0.12); }
  50% { box-shadow: 0 0 0 8px rgba(200, 240, 49, 0.06); }
}

.gen-step-body {
  padding-top: 4px;
  min-width: 0;
}

.gen-step-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}

.gen-step.active .gen-step-label,
.gen-step.done .gen-step-label {
  color: var(--text);
}

.gen-step-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.gen-step.active .gen-step-sub {
  color: var(--accent);
}

.detail-power {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  background: var(--surface);
}

.detail-power.on { border-color: rgba(200, 240, 49, 0.25); }
.detail-power.off { opacity: 0.85; }

.detail-power-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-power-info p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.detail-power-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.detail-power.on .detail-power-dot {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(200, 240, 49, 0.5);
}

.btn-power {
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-power.on {
  border-color: rgba(255, 100, 100, 0.3);
  color: #ff8a8a;
}

.detail-rename {
  margin-bottom: 20px;
}

.detail-rename-row {
  display: flex;
  gap: 8px;
}

.detail-rename-row input {
  flex: 1;
  margin: 0;
}

.detail-danger {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-danger {
  padding: 10px 16px;
  border: 1px solid rgba(255, 80, 80, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 80, 80, 0.08);
  color: #ff6b6b;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-danger:hover {
  background: rgba(255, 80, 80, 0.15);
}

.detail-panel {
  width: min(520px, 100%);
}

/* SVG icons */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 24px; height: 24px; }
.icon-lg { width: 28px; height: 28px; }
.icon-accent { color: var(--accent); }
.icon-muted { color: var(--text-muted); }

.showcase-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(200, 240, 49, 0.15);
  color: var(--accent);
  margin-bottom: 16px;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
}

.preview-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--accent-dim);
  border: 1px solid rgba(200, 240, 49, 0.15);
  color: var(--accent);
}

.detail-kind-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.detail-kind-icon .icon {
  opacity: 0.95;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.15s;
}

.nav-cta:hover {
  opacity: 0.9;
}

/* Hero */
.hero {
  margin-bottom: 56px;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
}

/* Creator */
.creator-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow);
}

.mode-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border-radius: calc(var(--radius-lg) - 4px);
  margin-bottom: 20px;
}

.mode-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: calc(var(--radius-lg) - 8px);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mode-tab.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.mode-panel {
  padding: 8px 16px 20px;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

textarea,
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: rgba(200, 240, 49, 0.4);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #0a0a0a;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.bot-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bot-status.ok {
  border-color: rgba(200, 240, 49, 0.3);
  color: var(--accent);
}

.bot-status.err {
  border-color: rgba(255, 80, 80, 0.3);
  color: #ff6b6b;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 72px;
}

.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

.feature-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.feature h3 {
  margin: 12px 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.feature p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Preview overlay */
.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.2s ease;
}

.preview-window {
  width: min(960px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.preview-title-wrap h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.preview-summary {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 480px;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-ghost {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-ghost:hover {
  background: var(--surface);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
}

.btn-icon:hover {
  background: var(--surface);
  color: var(--text);
}

.preview-frame-wrap {
  position: relative;
  flex: 1;
  min-height: 360px;
  background: #fff;
}

.preview-frame-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: none;
  display: block;
}

.preview-frame-wrap.is-loading iframe {
  filter: blur(10px) brightness(0.5);
  pointer-events: none;
  user-select: none;
  transition: filter 0.25s ease;
}

.preview-frame-wrap:not(.is-loading) iframe {
  pointer-events: auto;
}

.preview-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: transparent;
  transition: background 0.15s ease;
}
.preview-drop-overlay:not(.hidden) {
  pointer-events: auto;
}
.preview-drop-overlay.compose-drop-active {
  background: rgba(200, 240, 49, 0.12);
  outline: 2px dashed rgba(200, 240, 49, 0.55);
  outline-offset: -4px;
}
.preview-drop-label {
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.preview-drop-overlay.compose-drop-active .preview-drop-label {
  opacity: 1;
}

.preview-loading {
  position: absolute;
  inset: 0;
  z-index: 11;
  padding: 0;
  background: rgba(6, 6, 6, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-loading:not(.hidden) .gen-preview-loader {
  position: relative;
  z-index: 2;
  padding: 28px 32px;
  border-radius: 20px;
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid rgba(200, 240, 49, 0.22);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.preview-edit {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.preview-edit input {
  flex: 1;
  margin: 0;
  padding: 12px 14px;
  font-size: 0.88rem;
}

.btn-accent {
  flex-shrink: 0;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #0a0a0a;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-accent:disabled {
  opacity: 0.5;
  cursor: wait;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.nav-links a.active {
  color: var(--text);
}

.page-wide {
  max-width: 1200px;
}

.page-wide .hero-marketing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 80px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 12px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 600;
}

a.btn-primary.btn-lg {
  background: var(--accent);
  color: #0a0a0a;
}

a.btn-primary.btn-lg:hover {
  background: var(--accent-hover);
}

.hero-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.hero-demo { perspective: 800px; }

.demo-window {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotateY(-4deg) rotateX(2deg);
  transition: transform 0.4s ease;
}

.hero-demo:hover .demo-window {
  transform: rotateY(0) rotateX(0);
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.demo-dot:first-child { background: #ff5f57; }
.demo-dot:nth-child(2) { background: #febc2e; }
.demo-dot:nth-child(3) { background: #28c840; }

.demo-title {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.demo-body { padding: 16px; }
.demo-prompt, .demo-reply { margin-bottom: 12px; }

.demo-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.demo-label.accent { color: var(--accent); }

.demo-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  min-height: 1.4em;
}

.demo-preview-mini {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  opacity: 0.4;
  transition: opacity 0.5s;
}

.demo-preview-mini.ready { opacity: 1; }

.demo-preview-bar {
  height: 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.demo-preview-content { padding: 16px; background: #111; }

.sk-line {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 8px;
  width: 70%;
}

.sk-wide { width: 90%; }
.sk-short { width: 45%; }

.sk-btn {
  width: 80px;
  height: 24px;
  background: var(--accent-dim);
  border-radius: 6px;
  margin-top: 12px;
}

.home-stats,
.platform-metrics {
  position: relative;
  margin: -24px 0 88px;
  padding: 0;
  overflow: visible;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.platform-metrics.is-visible,
.home-stats.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.platform-metrics-bg {
  position: absolute;
  inset: -48px -24px -32px;
  pointer-events: none;
  overflow: hidden;
  border-radius: 32px;
}

.metrics-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 20%, transparent 75%);
}

.metrics-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  animation: metricOrbFloat 12s ease-in-out infinite alternate;
}

.metrics-orb-a {
  width: 280px;
  height: 280px;
  left: 8%;
  top: 10%;
  background: rgba(200, 240, 49, 0.16);
}

.metrics-orb-b {
  width: 220px;
  height: 220px;
  right: 10%;
  bottom: 0;
  background: rgba(100, 180, 255, 0.14);
  animation-delay: -4s;
}

@keyframes metricOrbFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, -16px) scale(1.08); }
}

.platform-metrics-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.35fr);
  gap: 36px;
  align-items: end;
}

.platform-metrics-head {
  padding-bottom: 8px;
}

.platform-metrics-head h2 {
  margin: 8px 0 10px;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.platform-metrics-head h2 em {
  font-style: normal;
  color: var(--accent);
}

.platform-metrics-sub {
  margin: 0;
  max-width: 34ch;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.platform-metrics-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 148px;
  padding: 20px 18px 18px;
  border-radius: 20px;
  background: rgba(8, 8, 8, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.metric-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(200, 240, 49, 0.28);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(200, 240, 49, 0.08);
}

.metric-tile-accent {
  border-color: rgba(200, 240, 49, 0.18);
  background: linear-gradient(160deg, rgba(200, 240, 49, 0.08) 0%, rgba(8, 8, 8, 0.62) 55%);
}

.metric-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(200, 240, 49, 0.1);
  border: 1px solid rgba(200, 240, 49, 0.14);
  color: var(--accent);
}

.metric-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #f4ffe0 0%, var(--accent) 42%, #8ec5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.metric-suffix {
  font-size: 0.72em;
  opacity: 0.85;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.metric-spark {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 240, 49, 0.18), transparent 68%);
  animation: metricSparkPulse 3.2s ease-in-out infinite;
}

@keyframes metricSparkPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.45; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.platform-metrics.is-visible .metric-tile {
  animation: metricTileIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.platform-metrics.is-visible .metric-tile:nth-child(1) { animation-delay: 0.08s; }
.platform-metrics.is-visible .metric-tile:nth-child(2) { animation-delay: 0.18s; }
.platform-metrics.is-visible .metric-tile:nth-child(3) { animation-delay: 0.28s; }

@keyframes metricTileIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-stats-glow {
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(circle at 30% 50%, rgba(200, 240, 49, 0.12), transparent 55%),
    radial-gradient(circle at 70% 40%, rgba(100, 180, 255, 0.08), transparent 50%);
  pointer-events: none;
  animation: statsGlow 8s ease-in-out infinite alternate;
}

@keyframes statsGlow {
  from { transform: translateX(-2%) scale(1); }
  to { transform: translateX(2%) scale(1.04); }
}

.home-stats-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  text-align: center;
  padding: 20px 12px;
  border-radius: 16px;
  background: rgba(6, 6, 6, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.stat-value {
  display: block;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #e8ffb0 0%, var(--accent) 45%, #9fd4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.home-stats-note {
  position: relative;
  z-index: 1;
  margin: 20px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 80px;
}

.step-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(200, 240, 49, 0.12);
  color: var(--accent);
  margin-bottom: 14px;
}

.step-num {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.step-card h3 { margin: 0 0 8px; font-size: 1rem; }
.step-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

.showcase { margin-bottom: 80px; }
.showcase-head { margin-bottom: 32px; }
.showcase-head h2 { margin: 0 0 8px; font-size: 1.75rem; }
.showcase-head p { margin: 0; color: var(--text-muted); }

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.showcase-item {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}


.showcase-item h3 { margin: 0 0 8px; }
.showcase-item p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-dim), transparent 60%);
  margin-bottom: 40px;
}

.cta-band h2 { margin: 0 0 6px; font-size: 1.35rem; }
.cta-band p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
}
.footer-links a:hover { color: var(--text); }

.pricing-hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.pricing-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 72px;
}

.price-card {
  position: relative;
  padding: 28px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
}

.price-card.popular {
  border-color: rgba(200, 240, 49, 0.35);
  box-shadow: 0 0 40px rgba(200, 240, 49, 0.08);
}

.price-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.price-card h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.price-desc { margin: 0 0 16px; font-size: 0.82rem; color: var(--text-muted); min-height: 2.5em; }
.price-amount { margin-bottom: 20px; }
.price-num { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.price-period { font-size: 0.85rem; color: var(--text-muted); }

.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}

.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 8px 0;
}

.price-features li .icon {
  margin-top: 2px;
  color: var(--accent);
  flex-shrink: 0;
}

.price-features li::before {
  content: none;
}

.price-cta {
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.pricing-faq { max-width: 680px; margin: 0 auto 64px; }
.pricing-faq h2 { margin-bottom: 20px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  padding: 0 16px;
  background: var(--bg-elevated);
}

.faq-item summary {
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.faq-item p { margin: 0 0 14px; font-size: 0.85rem; color: var(--text-muted); }

.price-billing-hint {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.price-cta[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.billing-success-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 48px 24px;
}

.billing-success-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.billing-success-card h1 {
  margin: 16px 0 8px;
  font-size: 1.5rem;
}

.billing-success-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.billing-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.billing-success-icon {
  color: var(--accent);
  display: flex;
  justify-content: center;
}

.billing-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: billing-spin 0.8s linear infinite;
}

@keyframes billing-spin {
  to { transform: rotate(360deg); }
}

.projects-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.projects-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.projects-filters { display: flex; gap: 8px; margin-bottom: 24px; }

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.filter-btn.active { border-color: var(--border-strong); }

.projects-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 40px 0;
}

.projects-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.projects-empty p { margin-bottom: 20px; }
.projects-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.project-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-green { background: rgba(200, 240, 49, 0.12); color: var(--accent); }
.badge-yellow { background: rgba(254, 188, 46, 0.12); color: #febc2e; }
.badge-muted { background: var(--surface); color: var(--text-muted); }

.card-title { margin: 0 0 6px; font-size: 1rem; }
.card-desc { margin: 0 0 8px; font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.card-domain { margin: 0 0 8px; font-size: 0.8rem; color: var(--accent); }

.slug-field {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 8px;
}

.slug-field .compose-input,
.slug-field input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

.slug-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.field-hint {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.card-meta { margin: 0 0 16px; font-size: 0.75rem; color: var(--text-muted); }

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

.btn-sm { padding: 6px 12px !important; font-size: 0.78rem !important; }

.err-text { color: #ff6b6b; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
}

.modal {
  width: min(520px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 { margin: 0; font-size: 1rem; }
.modal-body { padding: 20px; }
.modal-body textarea { min-height: 100px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.domain-help {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-height: 240px;
  overflow-y: auto;
}

.domain-help h4 { margin: 12px 0 6px; font-size: 0.85rem; color: var(--text); }
.domain-help ol { margin: 8px 0; padding-left: 20px; }
.domain-help blockquote {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
}

/* Editor (Cursor-like) */
.editor-body {
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
  overscroll-behavior: none;
}

.editor-body::before { display: none; }

.editor-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
}

.editor-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 16px;
}

.logo-sm { margin-bottom: 16px; font-size: 0.95rem; }

.sidebar-mode { margin-bottom: 16px; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.sidebar-link {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: var(--surface);
  color: var(--text);
}

.sidebar-section { margin-bottom: 20px; }

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.mode-tabs-sm { margin-bottom: 0; }

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

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 0.8rem;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

#chat-log {
  flex: 1;
  overflow-y: auto;
  font-size: 0.8rem;
}

.chat-empty { color: var(--text-muted); font-size: 0.8rem; line-height: 1.4; }

.chat-item {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
}

.chat-role {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.chat-assistant .chat-role { color: var(--accent); }
.chat-item p { margin: 0; line-height: 1.4; }

.sidebar-footer { margin-top: auto; padding-top: 12px; }
.sidebar-link.muted { font-size: 0.8rem; }

.editor-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: var(--bg);
}

.editor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.editor-nav-center {
  justify-self: center;
}

.toolbar-right {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  justify-self: end;
  align-items: center;
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  line-height: 1;
  white-space: nowrap;
}

.btn-with-icon .icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.toolbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(420px, 38vw);
}

.logo-toolbar {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-toolbar .logo-img { height: 26px; width: auto; }

.editor-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.editor-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}
.editor-nav-link:hover { color: var(--text); }
.editor-nav-link.active,
.nav-links a.active {
  color: var(--text);
  font-weight: 600;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  justify-self: start;
}

.toolbar-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  flex-shrink: 0;
}

.toolbar-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.confirm-modal .modal {
  max-width: 420px;
}

.confirm-modal-text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.confirm-modal-text strong {
  color: var(--text);
}

.editor-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.editor-panel {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.editor-compose {
  padding: 28px 32px;
  border-right: 1px solid var(--border);
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.compose-header h2 { margin: 0 0 6px; font-size: 1.25rem; }
.compose-header p { margin: 0 0 24px; color: var(--text-muted); font-size: 0.9rem; }

.compose-input {
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  line-height: 1.5;
}

.compose-input-sm { margin-bottom: 12px; }

.compose-input:focus {
  outline: none;
  border-color: rgba(200, 240, 49, 0.4);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.compose-actions { margin-top: 8px; }
.compose-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.compose-hint { margin: 10px 0 0; font-size: 0.75rem; color: var(--text-muted); }

.visual-editor-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(200, 240, 49, 0.08);
  border: 1px solid rgba(200, 240, 49, 0.2);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-ghost.active {
  border-color: rgba(200, 240, 49, 0.55);
  color: var(--accent);
  background: rgba(200, 240, 49, 0.08);
}

.gen-q-custom { margin-top: 12px; }
.gen-q-text-input, .gen-q-slug-input, .gen-q-secret-input { margin-top: 12px; }

.compose-site-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.compose-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.compose-field-head .field-label { margin: 0; }
.compose-input-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.compose-field-head-bot {
  margin-top: -4px;
  margin-bottom: 6px;
}
.compose-field-head-bot .field-label-spacer { flex: 1; }
.compose-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}
.compose-tool-btn:hover:not(:disabled) {
  border-color: rgba(200, 240, 49, 0.45);
  color: var(--accent);
  background: rgba(200, 240, 49, 0.08);
}
.compose-tool-btn:disabled { opacity: 0.65; cursor: wait; }
.compose-tool-btn.is-loading { pointer-events: none; }
.compose-tool-icon { display: inline-flex; color: inherit; }
.compose-tool-loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}
.compose-tool-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(200, 240, 49, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.compose-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.compose-attach-btn:hover {
  border-color: rgba(200, 240, 49, 0.45);
  color: var(--accent);
  background: rgba(200, 240, 49, 0.08);
}
.compose-attach-icon {
  display: inline-flex;
  color: inherit;
}
.compose-attach-label { line-height: 1; }
.compose-prompt-wrap { position: relative; }
.compose-input-site {
  min-height: 168px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.compose-site-hint { margin: 0; }
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(200, 240, 49, 0.22);
  background: rgba(200, 240, 49, 0.04);
}
.slug-field-lg .compose-input-sm { min-width: 140px; }
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.attachment-chip img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
}
.attachment-chip button {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.85rem;
}
.attachment-chip button:hover { color: #f87171; }

.edit-bar {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.edit-row {
  display: flex;
  gap: 10px;
}

.edit-row input {
  flex: 1;
  margin: 0;
}

.editor-preview {
  position: relative;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
}

.editor-frame-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}

.editor-frame-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
}

.preview-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.preview-placeholder-inner { text-align: center; }
.preview-icon { font-size: 2rem; color: var(--accent); opacity: 0.5; display: block; margin-bottom: 12px; }

.bot-result {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.bot-result-card {
  max-width: 360px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  text-align: center;
}

.bot-result-card h3 { margin: 0 0 12px; }
.bot-result-card p { margin: 0 0 16px; color: var(--text-muted); font-size: 0.9rem; }
.bot-result-card p.ok { color: var(--accent); }
.bot-result-card p.err { color: #ff6b6b; }

@media (max-width: 1024px) {
  .page-wide .hero-marketing { grid-template-columns: 1fr; }
  .hero-demo { order: -1; }
  .platform-metrics-layout { grid-template-columns: 1fr; gap: 24px; }
  .platform-metrics-cards { grid-template-columns: 1fr; }
  .home-stats-inner { grid-template-columns: 1fr; gap: 12px; }
  .steps, .showcase-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-shell { grid-template-columns: 1fr; }
  .editor-sidebar { display: none; }
  /* mobile tab layout — see @media (max-width: 1024px) for editor panels */
  .cta-band { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .preview-header { flex-direction: column; }
  .preview-edit { flex-direction: column; }
  .btn-accent { width: 100%; }
  .pricing-grid { grid-template-columns: 1fr; }
  .projects-head { flex-direction: column; }
  .detail-panel { max-width: 100%; }
}

/* Project detail panel */
.card-title-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
}

.card-title-btn:hover { color: var(--accent); }

.card-stat {
  margin-left: 8px;
  color: var(--text-muted);
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
}

.detail-panel {
  width: min(480px, 100%);
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s ease;
}

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

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-header h2 {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.detail-kind {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.detail-desc {
  margin: 0 0 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-box {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.stat-val {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-info {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.detail-info li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.detail-info strong { color: var(--text); }
.detail-warn { color: var(--accent) !important; font-size: 0.8rem; }

.detail-preview {
  width: 100%;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  margin-top: 12px;
}

.detail-log {
  margin: 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.72rem;
  color: var(--text-muted);
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.detail-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  align-items: center;
}

.detail-visit-row {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.detail-visit-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.detail-visit-url {
  font-size: 0.88rem;
  color: var(--accent);
  word-break: break-all;
}

.btn-power:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.detail-muted { font-size: 0.85rem; color: var(--text-muted); }

.detail-loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.toolbar-limits {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 8px;
  white-space: nowrap;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(6, 6, 6, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-gate.hidden { display: none; }

.login-gate-card {
  max-width: 400px;
  width: 100%;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: center;
}

.login-gate-card h2 { margin: 0 0 8px; font-size: 1.25rem; }
.login-gate-card p { margin: 0 0 20px; color: var(--text-muted); font-size: 0.9rem; }

.btn-google-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
}

.btn-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-telegram:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(42, 171, 238, 0.35);
}

.btn-telegram .telegram-icon {
  color: #fff;
}

#global-login-gate-oauth {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#global-login-gate-oauth .btn-google-lg {
  width: 100%;
}

.admin-main { padding: 32px 24px 64px; max-width: 1100px; margin: 0 auto; }
.admin-head h1 { margin: 0 0 8px; }
.admin-head p { color: var(--text-muted); margin: 0 0 24px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.admin-stat {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.admin-stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.admin-stat-value { font-size: 1.5rem; font-weight: 700; }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg-elevated); font-weight: 600; }
.admin-plan-cell { display: flex; gap: 6px; align-items: center; }
.admin-plan-select { font-size: 0.8rem; padding: 4px 8px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.admin-denied { text-align: center; padding: 64px 24px; }
.admin-denied h1 { margin-bottom: 8px; }

.profile-dropdown-accent {
  color: var(--accent) !important;
  font-weight: 600;
}

.profile-usage {
  padding: 0 8px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-usage-row { font-size: 0.72rem; }
.profile-usage-head { display: flex; justify-content: space-between; color: var(--text-muted); margin-bottom: 4px; }
.profile-usage-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.profile-usage-fill { height: 100%; background: var(--accent); border-radius: 2px; }

.settings-main { padding: 32px 24px 64px; max-width: 640px; margin: 0 auto; }
.settings-head h1 { margin: 0 0 8px; }
.settings-head p { color: var(--text-muted); margin: 0 0 24px; }
.settings-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elevated); margin-bottom: 16px; }
.settings-card h3 { margin: 0 0 16px; font-size: 1rem; }
.settings-profile { display: flex; gap: 16px; align-items: center; }
.settings-profile h2 { margin: 0 0 4px; font-size: 1.1rem; }
.settings-profile p { margin: 0 0 8px; color: var(--text-muted); font-size: 0.9rem; }
.settings-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.settings-avatar-letter { display: flex; align-items: center; justify-content: center; background: var(--accent-dim); color: var(--accent); font-weight: 700; font-size: 1.5rem; }
.settings-muted { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 12px; }
.settings-usage-row { margin-bottom: 12px; }
.settings-usage-head { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; }
.settings-usage-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.settings-usage-fill { height: 100%; background: var(--accent); }
.settings-pay-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.settings-denied { text-align: center; padding: 48px 24px; }
.settings-loading { text-align: center; color: var(--text-muted); padding: 48px; }

.login-gate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.login-gate-card { position: relative; }

/* Mobile navigation */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.nav-burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.nav-mobile-drawer {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 200;
  padding: 16px 20px 24px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.nav-mobile-drawer.hidden { display: none; }

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile-links a {
  display: block;
  padding: 14px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}

.nav-mobile-links a:hover,
.nav-mobile-links a.active {
  background: var(--surface);
  color: var(--accent);
}

body.nav-open { overflow: hidden; }

.editor-mobile-tabs { display: none; }
.editor-mobile-bar { display: none; }
.editor-mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.editor-mobile-backdrop:not(.hidden) {
  display: block;
}

.giamix-toast-root {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10050;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}
.giamix-toast {
  pointer-events: auto;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  cursor: pointer;
}
.giamix-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.giamix-toast-info { border-color: rgba(255, 255, 255, 0.12); }
.giamix-toast-success {
  border-color: rgba(200, 240, 49, 0.35);
  background: rgba(200, 240, 49, 0.08);
}
.giamix-toast-warn {
  border-color: rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.08);
}
.giamix-toast-error {
  border-color: rgba(255, 99, 99, 0.4);
  background: rgba(255, 99, 99, 0.1);
}

.mode-tabs-toolbar .mode-tab {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* ===== Mobile layout ===== */
@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
  }

  .page {
    padding: 0 16px 48px;
  }

  .nav {
    margin-bottom: 32px;
    gap: 8px;
  }

  .nav-burger { display: flex; }

  .nav-links { display: none !important; }

  .nav-actions {
    gap: 8px;
    margin-left: auto;
  }

  .nav-cta {
    padding: 7px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .logo span { display: none; }

  .hero { margin-bottom: 36px; }

  .hero-marketing {
    gap: 28px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }

  .hero-sub {
    font-size: 0.95rem;
  }

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

  .hero-actions .btn-lg,
  .cta-band .btn-lg {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero-demo {
    margin: 0 -8px;
  }

  .demo-card {
    border-radius: var(--radius);
  }

  .steps,
  .showcase-grid {
    gap: 12px;
  }

  .step-card,
  .showcase-card {
    padding: 18px;
  }

  .pricing-hero h1 {
    font-size: 1.75rem;
  }

  .price-card {
    padding: 20px;
  }

  .projects-head h1 {
    font-size: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 18px;
  }

  .card-actions {
    flex-direction: column;
  }

  .card-actions .btn-ghost,
  .card-actions .btn-primary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .profile-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    min-width: 0;
    border-radius: 20px 20px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    max-height: 85vh;
    overflow-y: auto;
  }

  .btn-google {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .btn-google span:last-child {
    display: none;
  }

  .toolbar-right .btn-google span:last-child {
    display: inline;
  }

  .login-gate-card {
    margin: 0 8px;
    padding: 28px 20px;
  }

  .settings-main {
    padding: 24px 16px 48px;
  }

  .settings-pay-grid {
    flex-direction: column;
  }

  .settings-pay-grid button {
    width: 100%;
  }

  .admin-main {
    padding: 24px 16px 48px;
  }

  .admin-table {
    font-size: 0.75rem;
  }

  .admin-plan-cell {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 1024px) {
  .editor-body {
    height: 100dvh;
    overflow: hidden;
  }

  .editor-shell {
    grid-template-columns: 1fr;
    height: 100dvh;
  }

  .editor-sidebar {
    display: none;
  }

  .editor-sidebar.mobile-drawer-open {
    display: flex;
    position: fixed;
    inset: 0 0 calc(56px + env(safe-area-inset-bottom, 0)) 0;
    z-index: 200;
    overflow-y: auto;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    padding-bottom: 16px;
  }

  .editor-mobile-tabs {
    display: flex;
    flex-shrink: 0;
  }

  .editor-mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    height: calc(56px + env(safe-area-inset-bottom, 0));
    padding: 0 6px env(safe-area-inset-bottom, 0);
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
  }

  .editor-mobile-bar-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 10px;
    min-height: 48px;
    padding: 4px 2px;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .editor-mobile-bar-btn .icon {
    width: 20px;
    height: 20px;
  }

  .editor-mobile-bar-btn.active {
    color: var(--accent);
    background: rgba(200, 240, 49, 0.1);
  }

  .editor-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
    overflow: hidden;
  }

  .editor-body.mobile-view-preview .editor-compose,
  .editor-body.mobile-view-chat .editor-compose,
  .editor-body.mobile-view-menu .editor-compose {
    display: none !important;
  }

  .editor-body.mobile-view-compose .editor-preview,
  .editor-body.mobile-view-chat .editor-preview,
  .editor-body.mobile-view-menu .editor-preview {
    display: none !important;
  }

  .editor-body.mobile-view-preview .editor-preview {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .editor-body.mobile-view-compose .editor-compose {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .giamix-toast-root {
    bottom: calc(68px + env(safe-area-inset-bottom, 0));
  }

  .editor-sidebar.mobile-drawer-open.mobile-chat-only .sidebar-mode,
  .editor-sidebar.mobile-drawer-open.mobile-chat-only .sidebar-footer {
    display: none;
  }

  .editor-sidebar.mobile-drawer-open.mobile-chat-only .sidebar-chat {
    flex: 1;
    min-height: 55vh;
  }

  .editor-sidebar.mobile-drawer-open.mobile-menu-only .sidebar-chat,
  .editor-sidebar.mobile-drawer-open.mobile-menu-only .sidebar-footer {
    display: none;
  }

  .editor-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    flex-shrink: 0;
  }

  .editor-nav-center {
    display: none;
  }

  .toolbar-left {
    flex: 1;
    min-width: 0;
    gap: 8px;
  }

  .toolbar-meta {
    max-width: none;
    flex: 1;
    min-width: 0;
  }

  .toolbar-meta .toolbar-title {
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
  }

  .toolbar-badge {
    display: none;
  }

  .toolbar-right {
    flex-shrink: 0;
    gap: 4px;
  }

  .toolbar-right .btn-ghost.btn-sm:not([href="/projects"]) {
    display: none;
  }

  .toolbar-limits {
    display: none !important;
  }

  .editor-workspace {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    grid-template-columns: 1fr !important;
  }

  .editor-workspace-resizable {
    grid-template-columns: 1fr !important;
  }

  .editor-split-resizer {
    display: none !important;
  }

  .editor-compose {
    padding: 12px 14px 16px;
    border-right: none;
    border-bottom: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .compose-steps-hint {
    display: none;
  }

  .compose-header h2 {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }

  .compose-header p {
    font-size: 0.82rem;
    margin-bottom: 12px;
    line-height: 1.35;
  }

  .compose-field-head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .compose-input-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .compose-input,
  .compose-input-site {
    font-size: 16px;
    padding: 12px;
    min-height: 120px;
    margin-bottom: 12px;
  }

  .compose-slug-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .compose-slug-input-wrap {
    min-width: 0;
    width: 100%;
  }

  .compose-slug-row .btn-ghost {
    width: 100%;
    justify-content: center;
  }

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

  .editor-preview .preview-frame-wrap,
  .editor-preview .editor-frame-wrap {
    flex: 1;
    min-height: 0;
  }

  .preview-chrome {
    padding: 8px 10px;
    gap: 8px;
  }

  .preview-chrome-actions .btn-editor-prominent,
  .preview-chrome-actions .btn-ghost {
    padding: 8px 10px;
    font-size: 0.75rem;
  }

  .compose-actions {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    padding: 12px 0 4px;
    background: linear-gradient(transparent, var(--bg) 20%);
    z-index: 2;
  }

  .compose-actions .btn-primary {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }

  .compose-hint {
    font-size: 0.7rem;
    text-align: center;
  }

  .gen-question-panel {
    margin-top: 12px;
    padding: 14px;
  }

  .interview-question {
    font-size: 1rem;
    line-height: 1.35;
  }

  .interview-hint {
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre-line;
  }

  .interview-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .interview-choice {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    min-height: 44px;
  }

  .interview-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }

  .interview-actions button {
    width: 100%;
    min-height: 44px;
  }

  .gen-overlay-card {
    margin: 8px;
    padding: 16px;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
  }

  .login-gate-card {
    margin: 16px;
    max-width: calc(100vw - 32px);
  }
}

@media (max-width: 480px) {
  .nav-cta {
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .hero-note {
    font-size: 0.78rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Workspace home (Lork-inspired, Giamix identity)
   ═══════════════════════════════════════════════════════════════ */

.workspace-page {
  min-height: 100dvh;
  overflow-x: hidden;
  background: #050506;
}

.workspace-page .page,
.workspace-page .nav {
  display: none;
}

.ws-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ws-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 75%);
}

.ws-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: ws-orb-float 18s ease-in-out infinite;
}

.ws-orb-1 {
  width: 520px;
  height: 520px;
  top: -120px;
  left: 28%;
  background: radial-gradient(circle, rgba(200, 240, 49, 0.35), transparent 70%);
}

.ws-orb-2 {
  width: 440px;
  height: 440px;
  top: 20%;
  right: 8%;
  background: radial-gradient(circle, rgba(120, 90, 255, 0.28), transparent 70%);
  animation-delay: -6s;
}

.ws-orb-3 {
  width: 380px;
  height: 380px;
  bottom: -80px;
  left: 12%;
  background: radial-gradient(circle, rgba(255, 100, 180, 0.2), transparent 70%);
  animation-delay: -12s;
}

@keyframes ws-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -16px) scale(1.05); }
  66% { transform: translate(-16px, 12px) scale(0.96); }
}

.ws-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100dvh;
  max-width: 1440px;
  margin: 0 auto;
}

.ws-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 14px 20px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.ws-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}

.ws-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ws-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.ws-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.ws-nav-item.active {
  background: rgba(200, 240, 49, 0.1);
  color: var(--accent);
}

.ws-nav-icon {
  display: flex;
  opacity: 0.85;
}

.ws-recent {
  flex: 1;
  min-height: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ws-recent-label {
  margin: 0 0 8px 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ws-recent-list {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 4px;
}

.ws-recent-empty {
  margin: 0;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ws-recent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: background 0.15s, color 0.15s;
}

.ws-recent-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.ws-recent-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ws-pro-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(140, 90, 255, 0.22), rgba(200, 240, 49, 0.12));
  border: 1px solid rgba(180, 140, 255, 0.25);
  color: #e8e0ff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}

.ws-pro-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(140, 90, 255, 0.2);
}

.ws-profile-mount .nav-profile {
  width: 100%;
}

.ws-profile-mount .profile-trigger {
  width: 100%;
  justify-content: flex-start;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.ws-profile-mount .nav-profile-guest {
  width: 100%;
}

.ws-profile-mount .btn-google {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  padding: 10px 12px;
}

.ws-main {
  display: flex;
  flex-direction: column;
  padding: 32px 40px 28px;
  min-width: 0;
}

.ws-main-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}

.ws-eyebrow {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.ws-greeting {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.ws-greeting em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), #b8ff6a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ws-greeting-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.ws-composer-wrap {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.ws-composer {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 18, 22, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(200, 240, 49, 0.04);
  overflow: hidden;
}

.ws-composer-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 14px 0;
}

.ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ws-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.ws-prompt {
  width: 100%;
  min-height: 120px;
  padding: 16px 18px;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.55;
  resize: none;
}

.ws-prompt:focus {
  outline: none;
  box-shadow: none;
}

.ws-prompt-shake {
  animation: ws-shake 0.35s ease;
}

@keyframes ws-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.ws-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ws-composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-tool-btn,
.ws-tool-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.ws-tool-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.ws-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ws-tool-link {
  color: var(--text-muted);
}

.ws-tool-link:hover {
  color: var(--text);
}

.ws-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #0a0a0a;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(200, 240, 49, 0.35);
}

.ws-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 240, 49, 0.45);
}

.ws-ideas-panel {
  margin-top: 12px;
  padding: 4px 2px;
}

.ws-ideas-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ws-idea-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.ws-idea-chip:hover {
  border-color: rgba(200, 240, 49, 0.35);
  color: var(--text);
  background: rgba(200, 240, 49, 0.06);
}

.ws-composer-hint {
  margin: 10px 4px 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ws-quick-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 720px;
  margin: 32px auto 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ws-quick-stats.is-visible {
  opacity: 1;
  transform: none;
}

.ws-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
  padding: 14px 22px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.ws-stat-pill-accent {
  border-color: rgba(200, 240, 49, 0.2);
  background: rgba(200, 240, 49, 0.06);
}

.ws-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ws-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ws-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 48px auto 0;
  width: 100%;
}

.ws-feature-card {
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, transform 0.2s;
}

.ws-feature-card:hover {
  border-color: rgba(200, 240, 49, 0.15);
  transform: translateY(-2px);
}

.ws-feature-icon {
  margin-bottom: 12px;
  color: var(--accent);
}

.ws-feature-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.ws-feature-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.ws-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 40px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ws-footer-links {
  display: flex;
  gap: 16px;
}

.ws-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.ws-footer-links a:hover {
  color: var(--text);
}

@media (max-width: 960px) {
  .ws-shell {
    grid-template-columns: 1fr;
  }

  .ws-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .ws-logo {
    padding: 0;
    flex: 0 0 auto;
  }

  .ws-logo span {
    display: none;
  }

  .ws-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
    gap: 4px;
  }

  .ws-nav-item {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .ws-nav-item span:not(.ws-nav-icon) {
    display: none;
  }

  .ws-recent {
    display: none;
  }

  .ws-sidebar-foot {
    flex-direction: row;
    align-items: center;
    margin-top: 0;
    padding-top: 0;
    gap: 8px;
  }

  .ws-pro-pill {
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .ws-pro-pill span:not([data-icon]) {
    display: none;
  }

  .ws-profile-mount .btn-google span:last-child {
    display: none;
  }

  .ws-main {
    padding: 24px 16px 20px;
  }

  .ws-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .ws-greeting {
    font-size: 1.65rem;
  }

  .ws-composer-tabs {
    flex-wrap: wrap;
  }
}
