:root {
  --bg: #0f1118;
  --bg-strong: #171a24;
  --panel: rgba(20, 24, 34, 0.92);
  --panel-solid: #1a1f2b;
  --ink: #f4f7fb;
  --muted: #a8b2c6;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff5b3d;
  --accent-strong: #ff7847;
  --accent-alt: #ff2f7c;
  --accent-gold: #ffb44d;
  --danger: #ff6a6a;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.34);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --tab-height: 48px;
  --sidebar-width: 280px;
  --toolbar-height: 72px;
  --font-main: "Segoe UI", "Trebuchet MS", sans-serif;
  --font-display: "Bahnschrift", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(255, 91, 61, 0.2), transparent 30%),
    linear-gradient(180deg, #0e1018 0%, #111521 100%);
  color: var(--ink);
  font-family: var(--font-main);
}

body {
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 20px;
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 248, 241, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  padding: 4px;
  display: block;
  border-radius: 18px;
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.titlebar h1,
.palette h2,
.page-hero h2,
.section-title h3,
.settings-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
}

.window-actions,
.titlebar-actions,
.auth-summary,
.status-actions,
.status-metrics,
.nav-cluster,
.toolbar-actions,
.tabstrip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.titlebar-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.auth-controls {
  display: flex;
  align-items: center;
}

.auth-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-link {
  width: auto;
  min-width: 120px;
}

.workspace {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 122px);
}

.sidebar,
.browser-shell {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 248, 241, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 18px;
  overflow: auto;
}

.browser-shell {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  min-height: 100%;
  overflow: hidden;
}

.tabstrip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.tabstrip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  overflow: auto hidden;
  flex: 1;
}

.tab {
  min-width: 180px;
  max-width: 240px;
  height: var(--tab-height);
  padding: 0 10px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 18px 18px 10px 10px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--muted);
  flex: 0 0 auto;
}

.tab.active {
  background: var(--panel-solid);
  border-color: rgba(213, 99, 58, 0.22);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(79, 47, 26, 0.1);
}

.tab.private {
  background: rgba(32, 24, 18, 0.08);
}

.tab-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-alt), var(--accent));
}

.tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.94rem;
}

.toolbar {
  height: var(--toolbar-height);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.icon-button,
.pill-button,
.bookmark-chip,
.section-link,
.feature-card,
.metric-card,
.result-card,
.quick-action,
.sponsor-card,
.extension-card,
.download-card,
.history-item,
.toggle-row,
.command-item,
.space-card,
.inline-button,
.hero-link {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.pill-button,
.bookmark-chip,
.section-link,
.inline-button,
.hero-link {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.search-engine-select {
  min-width: 128px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  outline: none;
}

.pill-button.active,
.bookmark-chip.active,
.hero-link.primary,
.quick-action.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #fff;
}

.address-wrap {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid rgba(29, 143, 135, 0.18);
  border-radius: 999px;
  background: var(--panel-solid);
}

.address-badge {
  min-width: 54px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(29, 143, 135, 0.12);
  color: var(--accent-alt);
  font-size: 0.74rem;
  font-weight: 700;
}

.address-badge.private {
  background: rgba(32, 24, 18, 0.12);
  color: var(--ink);
}

.address-input,
.palette-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}

.bookmarks-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  overflow: auto hidden;
}

.viewstage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.46), rgba(250, 237, 224, 0.82)),
    linear-gradient(45deg, rgba(29, 143, 135, 0.1), transparent 40%);
}

.view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100%;
}

.view-grid.split {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.webview,
.companion-pane {
  min-height: 0;
  overflow: auto;
}

.page {
  padding: 28px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-panel,
.hero-meta,
.section-block,
.settings-panel,
.companion-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 251, 247, 0.86);
}

.hero-panel {
  background:
    radial-gradient(circle at top right, rgba(29, 143, 135, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(213, 99, 58, 0.1), rgba(255, 251, 247, 0.92));
}

.hero-actions,
.section-actions,
.quick-actions,
.toggle-stack,
.metrics-grid,
.feature-grid,
.sponsor-grid,
.extensions-grid,
.downloads-grid,
.history-grid,
.results-grid,
.spaces-grid {
  display: grid;
  gap: 12px;
}

.hero-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.hero-link {
  text-align: center;
}

.quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-action,
.feature-card,
.metric-card,
.result-card,
.sponsor-card,
.extension-card,
.download-card,
.history-item,
.space-card,
.command-item {
  padding: 16px;
  text-align: left;
}

.metrics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid,
.sponsor-grid,
.extensions-grid,
.results-grid,
.spaces-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.downloads-grid,
.history-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-block + .section-block {
  margin-top: 18px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sidebar-section + .sidebar-section {
  margin-top: 18px;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.sidebar-links {
  display: grid;
  gap: 8px;
}

.section-link {
  width: 100%;
  justify-content: flex-start;
}

.section-link.active {
  background: linear-gradient(135deg, rgba(213, 99, 58, 0.14), rgba(29, 143, 135, 0.14));
  border-color: rgba(213, 99, 58, 0.2);
}

.profile-card {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(32, 24, 18, 0.9), rgba(29, 143, 135, 0.86));
  color: #fff;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-chip {
  min-width: 48px;
  height: 48px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

.metric-value {
  margin: 6px 0 2px;
  font-size: 1.65rem;
  font-family: var(--font-display);
}

.muted,
.card-meta,
.statusbar,
.small-copy {
  color: var(--muted);
}

.card-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(32, 24, 18, 0.08);
  font-size: 0.78rem;
}

.tag.good {
  background: rgba(29, 143, 135, 0.14);
  color: var(--accent-alt);
}

.tag.warm {
  background: rgba(213, 99, 58, 0.12);
  color: var(--accent-strong);
}

.tag.gold {
  background: rgba(224, 178, 77, 0.18);
  color: #92690b;
}

.toggle-row {
  width: 100%;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-copy strong {
  display: block;
  margin-bottom: 4px;
}

.switch {
  position: relative;
  width: 54px;
  height: 30px;
  flex: 0 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(32, 24, 18, 0.18);
  transition: 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s ease;
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
}

.switch input:checked + .slider::before {
  transform: translateX(24px);
}

.external-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100%;
}

.external-notice {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 251, 247, 0.84);
}

.browser-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}

.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 18, 11, 0.34);
  display: grid;
  place-items: start center;
  padding-top: 60px;
}

.palette {
  width: min(720px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 250, 244, 0.96);
  box-shadow: var(--shadow);
}

.palette-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.palette-input {
  min-height: 56px;
  margin-bottom: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-solid);
}

.palette-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.command-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hidden {
  display: none;
}

.is-compact .titlebar,
.is-compact .sidebar,
.is-compact .browser-shell,
.is-compact .hero-panel,
.is-compact .hero-meta,
.is-compact .section-block,
.is-compact .settings-panel,
.is-compact .companion-card {
  border-radius: 18px;
}

.is-compact .page {
  padding: 20px;
}

.is-compact .toolbar {
  padding: 10px 12px;
}

.is-compact .tab {
  min-width: 160px;
  height: 42px;
}

.is-focus .bookmarks-bar,
.is-focus .statusbar {
  display: none;
}

.is-focus .viewstage {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(251, 244, 236, 0.94));
}

.is-vertical .workspace {
  grid-template-columns: 88px minmax(0, 1fr);
}

.is-vertical .sidebar {
  padding: 16px 10px;
}

.is-vertical .sidebar .profile-copy,
.is-vertical .sidebar .section-copy,
.is-vertical .sidebar .section-title-text,
.is-vertical .sidebar .small-copy {
  display: none;
}

.is-vertical .sidebar .section-link {
  justify-content: center;
  padding: 0;
  min-height: 46px;
}

.is-vertical .tabstrip-row {
  padding: 0;
  border-bottom: none;
}

.is-vertical .tabstrip {
  flex-direction: column;
  width: 98px;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.is-vertical .tabstrip-row {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
}

.is-vertical .tabstrip-actions {
  padding: 14px 16px;
}

.is-vertical .tab {
  min-width: 0;
  max-width: none;
  height: auto;
  padding: 10px;
  border-radius: 18px;
}

.is-vertical .tab-main {
  flex-direction: column;
  align-items: flex-start;
}

.is-vertical .tab-close {
  align-self: flex-end;
}

.empty-state {
  padding: 20px;
  border-radius: 20px;
  border: 1px dashed var(--line);
  text-align: center;
}

.promo-band {
  margin: 18px 0;
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(29, 143, 135, 0.12), rgba(224, 178, 77, 0.16));
  border: 1px solid rgba(29, 143, 135, 0.18);
}

@media (max-width: 1200px) {
  .page-hero,
  .feature-grid,
  .sponsor-grid,
  .extensions-grid,
  .results-grid,
  .spaces-grid,
  .metrics-grid,
  .quick-actions,
  .downloads-grid,
  .history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 12px;
  }

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

  .sidebar {
    display: none;
  }

  .toolbar {
    grid-template-columns: 1fr;
    height: auto;
  }

  .page,
  .companion-pane {
    padding-bottom: 92px;
  }

  .page-hero,
  .feature-grid,
  .sponsor-grid,
  .extensions-grid,
  .results-grid,
  .spaces-grid,
  .metrics-grid,
  .quick-actions,
  .downloads-grid,
  .history-grid,
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .view-grid.split {
    grid-template-columns: 1fr;
  }

  .statusbar,
  .titlebar {
    flex-direction: column;
    align-items: flex-start;
  }
}

body[data-background="brave"] {
  background:
    radial-gradient(circle at top, rgba(255, 91, 61, 0.22), transparent 28%),
    linear-gradient(180deg, #0d1018 0%, #121623 100%);
}

body[data-background="graphite"] {
  background:
    radial-gradient(circle at top, rgba(123, 132, 153, 0.2), transparent 28%),
    linear-gradient(180deg, #0b0e14 0%, #161b24 100%);
}

body[data-background="aurora"] {
  background:
    radial-gradient(circle at top, rgba(54, 214, 191, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(41, 102, 255, 0.16), transparent 22%),
    linear-gradient(180deg, #081118 0%, #101927 100%);
}

body[data-background="ember"] {
  background:
    radial-gradient(circle at top, rgba(255, 135, 74, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 47, 124, 0.16), transparent 22%),
    linear-gradient(180deg, #110d14 0%, #201620 100%);
}

.titlebar,
.sidebar,
.browser-shell,
.hero-panel,
.hero-meta,
.section-block,
.settings-panel,
.companion-card {
  background: rgba(14, 18, 28, 0.84);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.titlebar {
  background: rgba(9, 12, 19, 0.84);
}

.sidebar {
  background: rgba(12, 16, 24, 0.92);
}

.tabstrip-row,
.toolbar,
.bookmarks-bar,
.statusbar,
.external-notice {
  background: rgba(10, 13, 20, 0.72);
  border-color: rgba(255, 255, 255, 0.06);
}

.tab {
  background: rgba(255, 255, 255, 0.05);
  color: #b2bdd2;
}

.tab.active {
  background: rgba(31, 37, 52, 0.98);
  border-color: rgba(255, 91, 61, 0.3);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.tab.private {
  background: rgba(255, 255, 255, 0.08);
}

.tab-badge,
.home-brand-mark {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
}

.icon-button,
.pill-button,
.bookmark-chip,
.section-link,
.feature-card,
.metric-card,
.result-card,
.sponsor-card,
.extension-card,
.download-card,
.history-item,
.toggle-row,
.command-item,
.space-card,
.inline-button,
.hero-link {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.icon-button:hover,
.pill-button:hover,
.bookmark-chip:hover,
.section-link:hover,
.quick-action:hover,
.inline-button:hover,
.hero-link:hover,
.theme-swatch:hover {
  background: rgba(255, 255, 255, 0.1);
}

.address-wrap {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.address-badge {
  background: rgba(255, 91, 61, 0.12);
  color: #ff8c74;
}

.address-badge.private {
  background: rgba(255, 255, 255, 0.08);
  color: #d3daea;
}

.address-input,
.palette-input,
.home-search-input {
  color: var(--ink);
}

.page {
  color: var(--ink);
}

.profile-card {
  background: linear-gradient(180deg, rgba(35, 41, 57, 0.98), rgba(18, 22, 33, 0.94));
}

.section-link.active,
.bookmark-chip.active,
.pill-button.active,
.quick-action.primary,
.hero-link.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  border-color: transparent;
  color: #fff;
}

.metric-card,
.feature-card,
.result-card,
.download-card,
.history-item,
.sponsor-card,
.extension-card,
.space-card {
  background: rgba(255, 255, 255, 0.04);
}

.metric-value,
.card-title,
.hero-panel h2,
.hero-meta h2,
.section-title h3,
.settings-panel h3 {
  color: #ffffff;
}

.tag {
  background: rgba(255, 255, 255, 0.08);
  color: #d8dfef;
}

.tag.good {
  background: rgba(255, 91, 61, 0.14);
  color: #ff9a81;
}

.tag.warm {
  background: rgba(255, 47, 124, 0.14);
  color: #ff8fb7;
}

.tag.gold {
  background: rgba(255, 180, 77, 0.14);
  color: #ffc867;
}

.promo-band {
  background: linear-gradient(135deg, rgba(255, 91, 61, 0.16), rgba(255, 47, 124, 0.1));
  border-color: rgba(255, 91, 61, 0.24);
}

.is-home-view .workspace {
  grid-template-columns: minmax(0, 1fr);
}

.is-home-view .sidebar {
  display: none !important;
}

.home-page {
  min-height: 100%;
  display: flex;
  align-items: center;
}

.home-layout {
  width: 100%;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.home-left-rail {
  display: grid;
  gap: 14px;
  align-content: start;
}

.rail-section {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(8, 11, 18, 0.6);
}

.rail-section h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.02rem;
}

.home-center-stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 12px;
}

.home-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  max-width: 760px;
}

.home-brand-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #fff;
  font-weight: 700;
}

.home-logo {
  width: 104px;
  height: 104px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.24));
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  gap: 18px;
  background:
    radial-gradient(circle at top, rgba(41, 102, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(12, 16, 24, 0.98), rgba(8, 11, 18, 1));
  transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
}

.splash-screen-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo {
  width: min(240px, 42vw);
  height: auto;
  object-fit: contain;
  animation: splash-breathe 1.2s ease forwards;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.28));
}

.splash-name {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-family: var(--font-display);
  color: #ffffff;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

@keyframes splash-breathe {
  0% {
    opacity: 0;
    transform: scale(0.86) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.home-brand h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-family: var(--font-display);
  font-weight: 700;
}

.home-search-form {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 12px;
  margin: 24px 0 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(10, 13, 21, 0.78);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.home-search-input {
  min-height: 58px;
  padding: 0 18px;
  border: none;
  outline: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 1rem;
}

.home-search-engine {
  min-width: 0;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.home-search-button {
  min-width: 138px;
  min-height: 58px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #fff;
  font-weight: 700;
}

.home-shortcuts {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-stats {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.background-picker {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.promo-builder-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.auth-hub {
  margin-bottom: 18px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.auth-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.auth-panel-active {
  border-color: rgba(255, 91, 61, 0.26);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 61, 0.12);
}

.auth-switcher,
.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

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

.promo-form-panel,
.promo-feed-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.promo-form,
.promo-feed {
  display: grid;
  gap: 14px;
}

.promo-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.promo-field-wide {
  grid-column: 1 / -1;
}

.field-stack {
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.promo-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.promo-textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

.promo-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-strip {
  display: grid;
  gap: 8px;
}

.payment-upi {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.promo-feed {
  max-height: 820px;
  overflow: auto;
}

.ad-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.ad-media {
  min-height: 170px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.ad-media-asset,
.ad-media-placeholder {
  width: 100%;
  height: 100%;
}

.ad-media-asset {
  display: block;
  object-fit: cover;
}

.ad-media-placeholder {
  min-height: 170px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #ffffff;
}

.ad-media-placeholder.image {
  background: linear-gradient(135deg, rgba(255, 91, 61, 0.26), rgba(255, 47, 124, 0.18));
}

.ad-media-placeholder.video {
  background: linear-gradient(135deg, rgba(255, 180, 77, 0.22), rgba(255, 91, 61, 0.16));
}

.ad-body {
  display: grid;
  gap: 10px;
  align-content: start;
}

.ad-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ad-meta-row h3 {
  margin: 0;
  color: #ffffff;
}

.ad-link {
  color: #ff9a81;
  text-decoration: none;
  word-break: break-word;
}

.ad-link:hover {
  text-decoration: underline;
}

.theme-swatch {
  width: 100%;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
}

.theme-swatch.active {
  border-color: rgba(255, 91, 61, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 91, 61, 0.24);
}

.theme-preview {
  width: 56px;
  height: 42px;
  border-radius: 10px;
  display: block;
}

.theme-copy {
  display: grid;
  gap: 2px;
}

.theme-copy strong {
  color: #ffffff;
}

.theme-brave {
  background: linear-gradient(135deg, #ff5b3d, #7c1737);
}

.theme-graphite {
  background: linear-gradient(135deg, #596272, #121820);
}

.theme-aurora {
  background: linear-gradient(135deg, #15c8a7, #2140c9);
}

.theme-ember {
  background: linear-gradient(135deg, #ff8b45, #932553);
}

body[data-background="brave"] .viewstage {
  background:
    radial-gradient(circle at top, rgba(255, 91, 61, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 47, 124, 0.12), transparent 24%),
    linear-gradient(180deg, #111520 0%, #171c29 100%);
}

body[data-background="graphite"] .viewstage {
  background:
    radial-gradient(circle at top, rgba(123, 132, 153, 0.16), transparent 28%),
    linear-gradient(180deg, #11141b 0%, #1a1f29 100%);
}

body[data-background="aurora"] .viewstage {
  background:
    radial-gradient(circle at top, rgba(54, 214, 191, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(41, 102, 255, 0.14), transparent 24%),
    linear-gradient(180deg, #0c1520 0%, #152031 100%);
}

body[data-background="ember"] .viewstage {
  background:
    radial-gradient(circle at top, rgba(255, 135, 74, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 47, 124, 0.14), transparent 24%),
    linear-gradient(180deg, #17111b 0%, #241927 100%);
}

body[data-background="brave"] .home-center-stage,
body[data-background="brave"] .home-left-rail {
  background-image: radial-gradient(circle at top, rgba(255, 91, 61, 0.06), transparent 32%);
}

body[data-background="graphite"] .home-center-stage,
body[data-background="graphite"] .home-left-rail {
  background-image: radial-gradient(circle at top, rgba(123, 132, 153, 0.05), transparent 32%);
}

body[data-background="aurora"] .home-center-stage,
body[data-background="aurora"] .home-left-rail {
  background-image: radial-gradient(circle at top, rgba(54, 214, 191, 0.07), transparent 32%);
}

body[data-background="ember"] .home-center-stage,
body[data-background="ember"] .home-left-rail {
  background-image: radial-gradient(circle at top, rgba(255, 135, 74, 0.07), transparent 32%);
}

@media (max-width: 1100px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-left-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .promo-builder-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .home-left-rail,
  .home-shortcuts,
  .home-stats {
    grid-template-columns: 1fr;
  }

  .home-search-form {
    grid-template-columns: 1fr;
  }

  .home-search-button {
    width: 100%;
  }

  .promo-form-grid,
  .ad-card {
    grid-template-columns: 1fr;
  }

  .promo-form-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
