:root {
  --lh-bg: #e8eef9;
  --lh-glow: #b1cff9;
  --lh-glow-secondary: #d2c3f6;
  --lh-solid: #f2f6fd;
  --lh-glass: rgb(249 252 255 / 70%);
  --lh-line: rgb(255 255 255 / 82%);
  --lh-shadow: 0 8px 28px rgb(43 65 122 / 13%);
  --lh-active: rgb(94 112 230 / 15%);
}

[data-theme='dark'] {
  --lh-bg: #10182b;
  --lh-glow: #203e69;
  --lh-glow-secondary: #3c2d63;
  --lh-solid: #1b263d;
  --lh-glass: rgb(25 36 57 / 78%);
  --lh-line: rgb(182 209 255 / 17%);
  --lh-shadow: 0 8px 28px rgb(4 8 18 / 30%);
  --lh-active: rgb(133 163 255 / 24%);
}

@media (prefers-color-scheme: dark) {
  [data-theme='system'] {
    --lh-bg: #10182b;
    --lh-glow: #203e69;
    --lh-glow-secondary: #3c2d63;
    --lh-solid: #1b263d;
    --lh-glass: rgb(25 36 57 / 78%);
    --lh-line: rgb(182 209 255 / 17%);
    --lh-shadow: 0 8px 28px rgb(4 8 18 / 30%);
    --lh-active: rgb(133 163 255 / 24%);
  }
}

.likehub-shell,
body.likehub-login {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse at 9% 0%, var(--lh-glow), transparent 56%),
    radial-gradient(ellipse at 95% 100%, var(--lh-glow-secondary), transparent 59%),
    var(--lh-bg);
}

.glass-surface,
.likehub-login #login-app [data-slot='card'] {
  background: var(--lh-solid);
  border: 1px solid var(--lh-line);
  box-shadow: var(--lh-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-surface,
  .likehub-login #login-app [data-slot='card'] {
    background: var(--lh-glass);
  }
}

.likehub-shell.shell {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

.likehub-shell .topbar {
  min-height: 62px;
  height: auto;
  padding: 9px 16px;
  margin: 14px var(--pad) 0;
  border-radius: 20px;
}

.likehub-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 720;
  white-space: nowrap;
}

.likehub-brand span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.likehub-page-title {
  min-width: 0;
  margin: 0 0 0 6px;
  padding-left: 16px;
  border-left: 1px solid var(--hairline);
  color: var(--text);
  font-size: 14px;
  font-weight: 630;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.likehub-shell .content .panel {
  background: var(--lh-glass);
  border-color: var(--lh-line);
  border-radius: 18px;
  box-shadow: var(--lh-shadow);
}

.likehub-listener { background: transparent; border: 0; padding: 0; }
.likehub-listener:empty { display: none; }

.bottom-nav-wrap {
  min-width: 0;
  display: flex;
  justify-content: center;
  padding: 0 max(var(--pad), env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left));
}

.bottom-nav {
  display: flex;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  padding: 5px;
  border-radius: 23px;
}

.bottom-nav .nav-item {
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 64px;
  width: auto;
  height: 51px;
  padding: 5px 10px;
  position: relative;
  border: 0;
  border-radius: 17px;
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.2;
  transition: background-color 180ms ease, color 180ms ease;
}

.bottom-nav .nav-item [data-slot='nav-item-label'] { display: block; flex: none; }
.bottom-nav .nav-item .count { position: absolute; top: 3px; right: 3px; }
.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active { background: var(--lh-active); color: var(--text); }
.bottom-nav .nav-item.active { font-weight: 700; }
.bottom-nav .nav-item:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }

.likehub-sign-in:not([hidden]) {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 13px;
  color: white;
  background: #4d55bd;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.likehub-sign-in:hover { background: #3e469e; }

@media (min-width: 768px) {
  .likehub-shell .settings-layout { flex-direction: column; gap: 12px; }
  .likehub-shell .settings-nav {
    width: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px;
    border-radius: 16px;
    background: var(--lh-glass);
    border: 1px solid var(--lh-line);
    box-shadow: var(--lh-shadow);
  }
  .likehub-shell .settings-nav-item { width: auto; flex: 0 0 auto; }
}

@media (max-width: 767px) {
  .likehub-shell .topbar { margin: 8px 12px 0; min-height: 50px; padding: 7px 10px; }
  .likehub-brand span { display: none; }
  .likehub-page-title { margin-left: 0; padding-left: 10px; }
  .bottom-nav-wrap { padding-inline: 8px; }
  .bottom-nav { border-radius: 20px; }
  .bottom-nav .nav-item { min-width: 57px; padding-inline: 7px; }
  .likehub-listener { display: none; }
  .likehub-shell .settings-nav-item.active { color: var(--text); background: var(--lh-active); }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav .nav-item { transition: none; }
}
