:root {
  color-scheme: dark;
  --aika-bg: #050914;
  --aika-panel: rgba(9, 13, 28, 0.72);
  --aika-line: rgba(255, 255, 255, 0.12);
  --aika-text: rgba(255, 255, 255, 0.88);
  --aika-muted: rgba(255, 255, 255, 0.62);
  --aika-brand-a: #60a5fa;
  --aika-brand-b: #2563eb;
  --aika-brand-c: #34d399;
}

html,
body {
  overflow-x: hidden;
  background: var(--aika-bg);
}

body {
  min-width: 320px;
}

.aika-topbar {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 120;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid var(--aika-line);
  border-radius: 20px;
  background: rgba(5, 8, 18, 0.62);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.aika-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.aika-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--aika-brand-a), var(--aika-brand-b) 58%, var(--aika-brand-c));
  box-shadow: 0 0 32px rgba(96, 165, 250, 0.34);
  font: 800 18px/1 Inter, system-ui, sans-serif;
}

.aika-mark::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #6ee7b7;
  box-shadow: 0 0 14px rgba(110, 231, 183, 0.8);
}

.aika-brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.aika-brand-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.aika-brand-subtitle {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.aika-topbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.aika-topbar-action:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.12);
}

body.aika-route-chat .aika-topbar {
  display: none;
}

@media (max-width: 767px) {
  .aika-topbar {
    width: calc(100% - 20px);
    padding: 8px 9px;
    border-radius: 18px;
  }

  .aika-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 16px;
  }

  .aika-brand-title {
    font-size: 14px;
  }

  .aika-brand-subtitle {
    display: none;
  }

  .aika-topbar-action {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  #root > div:first-child {
    min-height: auto !important;
    overflow: visible !important;
  }

  #root > div:first-child > div:nth-child(2) {
    height: clamp(160px, 43vw, 230px) !important;
    margin-top: 0 !important;
  }

  #root > div:first-child > div:nth-child(2) img {
    object-position: center top !important;
  }

  #root > div:first-child > div:nth-child(1) {
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    min-height: auto !important;
    padding: 18px 18px 34px !important;
  }

  #root > div:first-child > div:nth-child(1)::before {
    content: "";
    position: absolute;
    inset: 10px 12px 20px;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(13, 18, 38, 0.72), rgba(5, 7, 17, 0.58));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 90px rgba(0, 0, 0, 0.24);
    pointer-events: none;
  }

  #root > div:first-child > div:nth-child(1) > div:last-child {
    position: relative !important;
    z-index: 1 !important;
    max-width: none !important;
  }

  #root > div:first-child h1 {
    margin-bottom: 12px !important;
    font-size: clamp(3.4rem, 17vw, 4.9rem) !important;
    color: #fff !important;
    text-shadow: 0 10px 44px rgba(96, 165, 250, 0.24) !important;
  }

  #root > div:first-child p {
    margin-bottom: 18px !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    color: rgba(255, 255, 255, 0.9) !important;
  }

  #root > div:first-child [class*="grid-cols-3"] {
    gap: 8px !important;
    margin-bottom: 24px !important;
  }

  #root > div:first-child [class*="grid-cols-3"] > div {
    min-height: 52px;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.085) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  #root > div:first-child [class*="grid-cols-3"] span {
    font-size: 10.5px !important;
    color: rgba(255, 255, 255, 0.76) !important;
  }

  #root > div:first-child a {
    box-shadow: 0 14px 40px rgba(96, 165, 250, 0.36) !important;
  }

  #root > div > section,
  #root > div > footer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  #root > div > section {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }

  #root > div > section p {
    color: rgba(255, 255, 255, 0.64) !important;
  }
}

@media (min-width: 768px) {
  #root > div > div:first-child > div:first-child {
    padding-top: 96px !important;
  }
}


/* Per-domain polish */
.aika-topbar-action:hover {
  border-color: color-mix(in srgb, var(--aika-brand-a) 55%, transparent);
  background: color-mix(in srgb, var(--aika-brand-a) 16%, transparent);
}
body.aika-route-chat {
  background: #050914;
}
body.aika-route-chat .bg-\[hsl\(228\,50\%\,4\%\)\] {
  background-color: #050914 !important;
}
body.aika-route-home .aika-topbar {
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.34), 0 0 48px rgba(96, 165, 250, 0.12);
}
