﻿* {
  box-sizing: border-box;
}

html.auth-bootstrap-pending body > * {
  visibility: hidden !important;
}

html.auth-bootstrap-pending body {
  background: #050814;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: Inter, Arial, sans-serif;
  color: #e5e7eb;
}

/* Capacitor WebView: no filter blur on blobs — opacity-only wash (cheaper paint) */
html.capacitor-native .depth-blob {
  filter: none;
  opacity: 0.18;
}

html.capacitor-native .background-canvas {
  transform: none;
  will-change: auto;
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.05), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(0, 198, 255, 0.06), transparent 24%),
    radial-gradient(circle at 50% 88%, rgba(0, 245, 212, 0.04), transparent 28%);
  pointer-events: none;
  z-index: 0;
}

.background-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  transform: translate3d(0, var(--depth-parallax-y, 0px), 0);
}

.depth-blobs {
  position: absolute;
  inset: -12% -8%;
}

.depth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.22;
  transform: translate3d(0, 0, 0);
  animation: depthBlobDrift 32s ease-in-out infinite;
}

.depth-blob--a {
  width: min(72vmin, 620px);
  height: min(72vmin, 620px);
  top: -8%;
  left: -12%;
  background: rgba(0, 245, 212, 0.32);
  animation-delay: 0s;
}

.depth-blob--b {
  width: min(68vmin, 540px);
  height: min(68vmin, 540px);
  top: 28%;
  right: -18%;
  background: rgba(0, 198, 255, 0.26);
  animation-delay: -10s;
  animation-duration: 38s;
}

.depth-blob--c {
  width: min(80vmin, 680px);
  height: min(80vmin, 680px);
  bottom: -22%;
  left: 10%;
  background: rgba(14, 165, 233, 0.22);
  opacity: 0.2;
  animation-delay: -5s;
  animation-duration: 44s;
}

@keyframes depthBlobDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.18;
  }
  33% {
    transform: translate3d(2.5%, -1.8%, 0) scale(1.04);
    opacity: 0.26;
  }
  66% {
    transform: translate3d(-2%, 2.2%, 0) scale(0.98);
    opacity: 0.2;
  }
}

html.depth-motion-ready .depth-reveal:not(.depth-reveal--in) {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

html.depth-motion-ready .depth-reveal {
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

html.depth-motion-ready .depth-reveal.depth-reveal--in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

html.app-effects-paused *,
html.app-effects-paused *::before,
html.app-effects-paused *::after {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .depth-blob {
    animation: none !important;
    opacity: 0.16 !important;
    transform: none !important;
  }

  .web-chat-messenger::after {
    animation: none !important;
    opacity: 0.55 !important;
    transform: none !important;
  }

  #webChat .web-chat-messenger.chat-container.openai-mode::before {
    animation: none !important;
    opacity: 0.55 !important;
  }

  .web-chat-bubble:hover {
    transform: none;
  }

  .background-canvas {
    transform: none !important;
  }

  html.depth-motion-ready .depth-reveal,
  html.depth-motion-ready .depth-reveal:not(.depth-reveal--in) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

button {
  cursor: pointer;
}

.app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

.mobile-menu-toggle,
.mobile-nav-overlay {
  display: none;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px max(18px, env(safe-area-inset-left)) 12px max(18px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.site-footer-links {
  width: 100%;
  display: flex;
  justify-content: center;
}

.site-footer-links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 14px;
  max-width: 42rem;
}

.site-footer-links-grid a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  line-height: 1.35;
  padding: 2px 0;
  display: inline-block;
  white-space: nowrap;
}

.site-footer-links-grid a:hover {
  color: #38bdf8;
}

/* Legacy separators — removed from markup; keep for legal subpages if reused */
.site-footer-sep {
  display: none;
}

@media (max-width: 840px) {
  /* Bottom spacing: mobile-responsive.css is authoritative */
  .app .main {
    padding-bottom: var(--notes-main-bottom-pad, 10px);
    scroll-padding-bottom: var(--notes-scroll-bottom-pad, max(72px, calc(88px + env(safe-area-inset-bottom, 0px))));
  }

  .site-footer-inner {
    padding-top: var(--notes-footer-pad-top, 8px);
    padding-bottom: var(--notes-footer-pad-bottom, max(8px, env(safe-area-inset-bottom, 0px)));
    gap: var(--notes-footer-block-gap, 6px);
  }

  .site-footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--notes-footer-row-gap, 8px) var(--notes-footer-col-gap, 10px);
    width: min(100%, 288px);
    max-width: calc(100vw - 24px);
    margin-inline: auto;
    justify-items: center;
  }

  .site-footer-links-grid a {
    font-size: var(--notes-footer-link-size, 0.6875rem);
    line-height: var(--notes-footer-link-lh, 1.35);
    padding: 2px 4px;
    text-align: center;
  }

  .site-footer-copy {
    font-size: var(--notes-footer-link-size, 0.6875rem);
    line-height: var(--notes-footer-link-lh, 1.35);
    margin-top: 0;
  }
}

.site-footer-copy {
  margin: 0;
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.3;
}

.sidebar {
  width: 288px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.72));
  border-right: 1px solid var(--depth-glass-border);
  padding: 28px 22px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(var(--depth-glass-blur)) saturate(118%);
  -webkit-backdrop-filter: blur(var(--depth-glass-blur)) saturate(118%);
  box-shadow: var(--depth-elev-1);
}

.sidebar-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding: 14px 14px 16px;
  margin: 0 0 26px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(56, 189, 248, 0.04));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.25s ease;
}

.brand-lockup:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 16px 48px rgba(56, 189, 248, 0.12);
  transform: translateY(-2px);
}

.brand-mark {
  flex-shrink: 0;
  animation: brandMarkFloat 6s ease-in-out infinite;
}

@keyframes brandMarkFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.brand-mark-svg {
  display: block;
  filter: drop-shadow(0 10px 28px rgba(56, 189, 248, 0.4));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.brand-name {
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  background: linear-gradient(110deg, #f8fafc 0%, #7dd3fc 42%, #c4b5fd 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 13px 14px 13px 12px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.035);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.25s ease, color 0.25s ease,
    box-shadow 0.3s ease;
}

.menu-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #38bdf8, #a78bfa);
  opacity: 0;
  transform: scaleY(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.menu-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: background var(--depth-motion), color var(--depth-motion), border-color var(--depth-motion),
    box-shadow var(--depth-motion), transform var(--depth-motion);
}

.menu-icon svg {
  display: block;
}

.menu-label {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.menu-item:nth-child(1) {
  animation: menuItemIn 0.45s ease backwards;
  animation-delay: 0.04s;
}
.menu-item:nth-child(2) {
  animation: menuItemIn 0.45s ease backwards;
  animation-delay: 0.08s;
}
.menu-item:nth-child(3) {
  animation: menuItemIn 0.45s ease backwards;
  animation-delay: 0.12s;
}
.menu-item:nth-child(4) {
  animation: menuItemIn 0.45s ease backwards;
  animation-delay: 0.16s;
}
.menu-item:nth-child(5) {
  animation: menuItemIn 0.45s ease backwards;
  animation-delay: 0.2s;
}
.menu-item:nth-child(6) {
  animation: menuItemIn 0.45s ease backwards;
  animation-delay: 0.24s;
}

.menu-item:disabled,
.menu-item.menu-item--locked:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.menu-item:disabled:hover,
.menu-item:disabled:hover::before,
.menu-item:disabled:hover .menu-icon {
  transform: none;
  box-shadow: none;
}

.menu-item:disabled::before {
  opacity: 0;
}

.menu-item.menu-item--locked:not(:disabled) {
  border-color: rgba(250, 204, 21, 0.28);
}

.menu-item.menu-item--locked:not(:disabled) .menu-label::after {
  content: " 🔒";
  font-size: 0.72em;
  opacity: 0.85;
}

@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.menu-item:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.22);
  color: #fff;
  transform: translateX(3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.menu-item:hover::before {
  opacity: 0.85;
  transform: scaleY(1);
}

.menu-item:hover .menu-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(167, 139, 250, 0.22));
  color: #f0f9ff;
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.18);
  transform: scale(1.04);
}

.menu-item.active {
  background: linear-gradient(105deg, rgba(56, 189, 248, 0.2), rgba(167, 139, 250, 0.12));
  border-color: rgba(56, 189, 248, 0.35);
  color: #fff;
  box-shadow: 0 10px 32px rgba(56, 189, 248, 0.12);
  transform: translateX(4px);
}

.menu-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.menu-item.active .menu-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.5), rgba(167, 139, 250, 0.35));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.35);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.65;
}

.sidebar-social {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding-bottom: 6px;
}

.sidebar-social__label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 650;
  color: #cbd5fe;
  text-align: center;
  line-height: 1.35;
}

.sidebar-social__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sidebar-social__link {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(129, 140, 248, 0.42);
  background: rgba(30, 41, 59, 0.45);
  color: #e9ecff;
  text-decoration: none;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.sidebar-social__link:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  border-color: rgba(165, 180, 252, 0.55);
}

/* Community icons — official brand hues + soft outer glow */
.sidebar-social__link--discord {
  border-color: rgba(148, 161, 255, 0.55);
  background: linear-gradient(145deg, #5865f2 0%, #4752c4 52%, #3c4598 100%);
  color: #ffffff;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.32),
    0 8px 22px rgba(71, 82, 196, 0.35),
    0 0 24px rgba(88, 101, 242, 0.55);
}
.sidebar-social__link--discord:hover {
  filter: brightness(1.06);
  border-color: rgba(184, 196, 255, 0.72);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.28),
    0 12px 28px rgba(99, 102, 241, 0.38),
    0 0 32px rgba(129, 140, 255, 0.65);
}

.sidebar-social__link--tiktok {
  border-color: rgba(37, 244, 238, 0.4);
  background: linear-gradient(165deg, #000000 0%, #161823 55%, #0f1118 100%);
  color: #ffffff;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.5),
    0 8px 22px rgba(254, 44, 85, 0.16),
    0 0 22px rgba(37, 244, 238, 0.32),
    0 0 14px rgba(254, 44, 85, 0.18);
}
.sidebar-social__link--tiktok:hover {
  filter: brightness(1.07);
  border-color: rgba(37, 244, 238, 0.55);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.45),
    0 12px 28px rgba(254, 44, 85, 0.22),
    0 0 30px rgba(37, 244, 238, 0.42),
    0 0 20px rgba(254, 44, 85, 0.28);
}
.sidebar-social__link--tiktok .sidebar-social__icon svg {
  filter: drop-shadow(1.35px 0.85px 0 rgba(254, 44, 85, 0.88))
    drop-shadow(-1.25px -0.75px 0 rgba(37, 244, 238, 0.78));
}

.sidebar-social__link--youtube {
  border-color: rgba(255, 90, 90, 0.55);
  background: linear-gradient(145deg, #ff0303 0%, #cc0000 92%);
  color: #ffffff;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.3),
    0 8px 22px rgba(239, 68, 68, 0.28),
    0 0 24px rgba(255, 0, 51, 0.4);
}
.sidebar-social__link--youtube:hover {
  filter: brightness(1.07);
  border-color: rgba(255, 180, 180, 0.5);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.26),
    0 12px 28px rgba(239, 68, 68, 0.38),
    0 0 32px rgba(255, 40, 40, 0.5);
}

.sidebar-social__link--gmail {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 40%, rgba(227, 242, 253, 0.88) 100%);
  color: #ea4335;
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.18),
    0 8px 24px rgba(234, 67, 53, 0.45),
    0 0 22px rgba(66, 133, 244, 0.4),
    0 0 36px rgba(234, 67, 53, 0.42);
}
.sidebar-social__link--gmail:hover {
  filter: brightness(1.06);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.14),
    0 12px 32px rgba(234, 67, 53, 0.55),
    0 0 28px rgba(66, 133, 244, 0.48),
    0 0 42px rgba(234, 67, 53, 0.5);
}
.sidebar-social__link--gmail .sidebar-social__icon svg {
  filter: drop-shadow(0 0 5px rgba(234, 67, 53, 0.65)) drop-shadow(0 0 8px rgba(66, 133, 244, 0.35));
}

.sidebar-social__icon {
  display: grid;
  place-items: center;
}

.sidebar-social__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}

.social-community-link--inactive {
  opacity: 0.36;
  cursor: default;
  pointer-events: none;
  filter: grayscale(0.35);
}

.sidebar-social__link.social-community-link--inactive:hover {
  transform: none;
  filter: grayscale(0.35) brightness(1);
  border-color: rgba(129, 140, 248, 0.42);
}

.main {
  flex: 1;
  padding: 34px 36px 42px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.topbar {
  margin-bottom: 28px;
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
  min-width: 0;
}

.topbar-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.55));
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), 0 0 20px rgba(34, 211, 238, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform var(--depth-motion), box-shadow var(--depth-motion), border-color var(--depth-motion);
}

.topbar-logo:hover {
  transform: scale(1.04);
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32), 0 0 22px rgba(56, 189, 248, 0.14);
}

.topbar-logo-svg {
  width: 30px;
  height: 30px;
  display: block;
}

.topbar-titles {
  min-width: 0;
}

.topbar-heading {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.topbar-eyebrow {
  margin: 0 0 6px;
}

.topbar-offline-badge {
  margin: 6px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fbbf24;
}

.topbar-offline-badge.hidden {
  display: none;
}

.app-page-home .topbar {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.app-page-home .topbar-inner {
  align-items: center;
}

.app-page-home .account-area-top {
  flex-shrink: 0;
  padding: 4px 6px 4px 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(10px);
}

.app-page-home .account-area-top .logout-button {
  min-width: unset;
  padding: 12px 18px;
}

.app-page-home .account-area-top .phone-button {
  padding: 12px 18px;
}

.phone-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 20px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #e0f2fe;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(99, 102, 241, 0.18));
  box-shadow: 0 8px 26px rgba(14, 165, 233, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.phone-button:hover {
  border-color: rgba(125, 211, 252, 0.55);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.32), rgba(99, 102, 241, 0.26));
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(14, 165, 233, 0.22), 0 0 28px rgba(56, 189, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.phone-button:active {
  transform: translateY(0);
}

.phone-button-icon {
  display: flex;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  opacity: 0.95;
}

.phone-button-icon svg {
  width: 100%;
  height: 100%;
}

.account-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-button,
.logout-button,
.back-button,
.add-button,
button.save-button,
.primaryBtn {
  border: none;
  border-radius: 18px;
  padding: 14px 22px;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.22);
  transition: transform var(--depth-motion), box-shadow var(--depth-motion), filter var(--depth-motion);
}

.account-button:active:not(.logged-in),
.logout-button:active,
.back-button:active,
.add-button:active,
button.save-button:active,
.primaryBtn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.16);
}

.logout-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  justify-content: center;
  padding: 16px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(239, 68, 68, 0.14));
  border: 1px solid rgba(244, 63, 94, 0.36);
  color: #fecaca;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.logout-button::before {
  content: "🚪";
  font-size: 1.1rem;
}

.logout-button:hover {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.26), rgba(239, 68, 68, 0.22));
  border-color: rgba(244, 63, 94, 0.52);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(244, 63, 94, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.bot-actions button {
  min-width: 160px;
  border-radius: 18px;
  border: 1px solid transparent;
  padding: 14px 22px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.bot-actions .connect-button {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.24);
  color: #ffffff;
}

.bot-actions .connect-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(34, 197, 94, 0.3);
}

.bot-actions .disconnect-button {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

.bot-actions .disconnect-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateY(-2px);
}

.account-button:hover,
.logout-button:hover,
.back-button:hover,
.add-button:hover,
button.save-button:hover,
.primaryBtn:hover,
.bot-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.20);
}

.account-button.logged-in {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  cursor: default;
  pointer-events: none;
}

.account-button.logged-in:hover {
  transform: none;
  box-shadow: none;
}

.logout-button {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.page {
  animation: fadeIn 0.35s ease;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.52);
  z-index: 30;
}

.modal-content {
  width: min(560px, 92vw);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.9));
  border-radius: 28px;
  padding: 32px;
  border: 1px solid var(--depth-glass-border);
  box-shadow: var(--depth-elev-2);
  backdrop-filter: blur(22px) saturate(118%);
  -webkit-backdrop-filter: blur(22px) saturate(118%);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.close-button {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--depth-motion), background var(--depth-motion), box-shadow var(--depth-motion);
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.1);
}

.close-button:active {
  transform: scale(0.96);
  box-shadow: none;
}

.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal.hidden {
  display: none !important;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #38bdf8;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-header h2 {
  margin: 0;
  font-size: clamp(1.9rem, 2.7vw, 2.8rem);
  line-height: 1.05;
}

/* ——— Home dashboard (centered + stats column) ——— */
.home-dashboard {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.home-dashboard-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: clamp(18px, 2.5vw, 26px);
  align-items: start;
}

.home-dashboard-primary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.home-intro {
  max-width: 640px;
  margin: 0;
}

.home-intro-head .eyebrow {
  margin-bottom: 6px;
}

.home-hero-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.home-copy {
  color: #94a3b8;
  line-height: 1.55;
  font-size: 0.92rem;
  max-width: 52ch;
  margin: 0;
}

.home-stats-panel {
  position: sticky;
  top: 18px;
  padding: 20px 20px 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
}

.home-stats-eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
}

.home-welcome-line {
  margin: 0 0 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.4;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.home-stat {
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
}

.home-stat-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
  line-height: 1.1;
}

.home-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.home-stats-cta {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(34, 197, 94, 0.1));
  color: #e0f2fe;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-stats-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.15);
}

.hex-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.home-categories-grid {
  max-width: 980px;
  margin: 0 auto;
  justify-content: center;
}

.home-categories-grid .hex-card {
  min-height: 296px;
}

.home-categories-grid .hex-card-main {
  padding: 34px 24px 14px;
}

.hex-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 268px;
  color: #fff;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.hex-card:hover {
  transform: translate3d(0, -4px, 0) scale(1.01);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 36px rgba(56, 189, 248, 0.1);
}

.hex-card:active {
  transform: translate3d(0, -1px, 0) scale(0.97);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.hex-card-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  padding: 28px 20px 12px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  width: 100%;
  transition: transform 0.25s ease;
}

.hex-card:hover .hex-card-main {
  transform: scale(1.02);
}

.hex-card-add {
  margin-top: auto;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 6, 23, 0.35);
  color: #bae6fd;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.hex-card-add:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #f0f9ff;
}

.category-icon,
.hex-icon {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  font-size: 2.35rem;
  margin-bottom: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hex-card:hover .category-icon {
  transform: scale(1.06) translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 14px 36px rgba(0, 0, 0, 0.2);
}

.hex-card-main strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.28rem;
}

.card-subtitle {
  color: #dbeafe;
  line-height: 1.55;
  font-size: 0.92rem;
  max-width: 220px;
}

.hex-warm {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(245, 158, 11, 0.15));
  border-color: rgba(249, 115, 22, 0.38);
}

.hex-warm:hover {
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.35), 0 0 52px rgba(249, 115, 22, 0.15);
}

.hex-cool {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(59, 130, 246, 0.15));
  border-color: rgba(56, 189, 248, 0.38);
}

.hex-cool:hover {
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.35), 0 0 52px rgba(56, 189, 248, 0.18);
}

.hex-fresh {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.24), rgba(16, 185, 129, 0.15));
  border-color: rgba(34, 197, 94, 0.38);
}

.hex-fresh:hover {
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.35), 0 0 52px rgba(52, 211, 153, 0.16);
}

.hex-lux {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.28), rgba(244, 114, 182, 0.14));
  border-color: rgba(192, 132, 252, 0.42);
}

.hex-lux:hover {
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.35), 0 0 52px rgba(167, 139, 250, 0.22);
}

.scan-cam-category-banner {
  margin: 0 0 20px;
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(192, 132, 252, 0.28);
}

.scan-cam-category-banner__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #e2e8f0;
}

#category[data-active-category="scan_cam"] {
  animation: none;
}

#category[data-active-category="scan_cam"] #notes {
  content-visibility: auto;
  contain-intrinsic-size: 1px 140px;
}

#category[data-active-category="scan_cam"] .note-card--scan-list {
  contain: content;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

#category[data-active-category="scan_cam"] .note-card--scan-list .note-card-preview--plain {
  max-height: 4.8em;
}

#scan-cam.hidden .scan-cam-fake-doc,
#scan-cam.hidden .scan-cam-camera-glow,
#scan-cam.hidden .scan-cam-camera-glow::before,
#scan-cam.hidden .scan-cam-camera-glow::after {
  animation: none !important;
}

.scan-cam-page--tool {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
  padding: 0 0 32px;
}

.scan-cam-workspace {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.scan-cam-workspace__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.scan-cam-workspace__grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 42%, #000 0%, transparent 72%);
  opacity: 0.85;
}

.scan-cam-workspace__radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 85% 55% at 50% 38%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 45% at 70% 60%, rgba(167, 139, 250, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 40% at 22% 72%, rgba(34, 211, 238, 0.06), transparent 45%);
}

.scan-cam-workspace__float-docs {
  position: absolute;
  inset: 0;
}

.scan-cam-fake-doc {
  position: absolute;
  display: block;
  width: clamp(100px, 22vw, 160px);
  height: clamp(130px, 28vw, 200px);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.35) 100%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
  filter: blur(1.2px);
  opacity: 0.42;
  will-change: transform, opacity;
}

.scan-cam-fake-doc::before,
.scan-cam-fake-doc::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  height: 2px;
  border-radius: 1px;
  background: rgba(148, 163, 184, 0.2);
}

.scan-cam-fake-doc::before {
  top: 22%;
}

.scan-cam-fake-doc::after {
  top: 34%;
  width: 55%;
  right: auto;
}

.scan-cam-fake-doc--a {
  top: 12%;
  left: 4%;
  animation: scanCamFloatA 16s ease-in-out infinite;
}

.scan-cam-fake-doc--b {
  bottom: 18%;
  right: 6%;
  width: clamp(90px, 18vw, 140px);
  height: clamp(118px, 24vw, 170px);
  animation: scanCamFloatB 18s ease-in-out infinite;
  animation-delay: -3s;
}

.scan-cam-fake-doc--c {
  top: 38%;
  right: 10%;
  opacity: 0.32;
  width: clamp(72px, 14vw, 110px);
  height: clamp(96px, 18vw, 140px);
  animation: scanCamFloatC 20s ease-in-out infinite;
  animation-delay: -6s;
}

@keyframes scanCamFloatA {
  0%,
  100% {
    transform: rotate(-8deg) translate3d(0, 0, 0);
    opacity: 0.38;
  }
  50% {
    transform: rotate(-8deg) translate3d(6px, -10px, 0);
    opacity: 0.48;
  }
}

@keyframes scanCamFloatB {
  0%,
  100% {
    transform: rotate(11deg) translate3d(0, 0, 0);
    opacity: 0.34;
  }
  50% {
    transform: rotate(11deg) translate3d(-8px, -8px, 0);
    opacity: 0.46;
  }
}

@keyframes scanCamFloatC {
  0%,
  100% {
    transform: rotate(4deg) translate3d(0, 0, 0);
    opacity: 0.26;
  }
  50% {
    transform: rotate(4deg) translate3d(4px, 6px, 0);
    opacity: 0.36;
  }
}

.scan-cam-page--tool .scan-cam-tool {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 0 18px;
}

.scan-cam-tool__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 16px;
  flex-shrink: 0;
}

.scan-cam-tool__back {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
}

.scan-cam-tool__back:hover {
  border-color: rgba(56, 189, 248, 0.35);
  color: #f8fafc;
}

.scan-cam-tool__title {
  flex: 1;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}

.scan-cam-tool__header-actions {
  display: flex;
  gap: 6px;
}

.scan-cam-tool__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}

.scan-cam-tool__icon:hover {
  border-color: rgba(167, 139, 250, 0.35);
  color: #f8fafc;
}

.scan-cam-tool__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  min-height: 0;
}

.scan-cam-tool__status {
  margin: 0;
  min-height: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
}

.scan-cam-tool__status:empty {
  display: none;
}

.scan-cam-tool__layout-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 0;
}

.scan-cam-tool__layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 960px) {
  .scan-cam-tool__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 24px;
    align-items: start;
  }
}

.scan-cam-tool__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.scan-cam-tool__side {
  min-width: 0;
}

.scan-cam-scan-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 18px 26px;
  border-radius: 28px;
  border: 2px dashed rgba(56, 189, 248, 0.35);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.55), rgba(2, 6, 23, 0.35));
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08), 0 18px 48px rgba(2, 6, 23, 0.25);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.scan-cam-scan-zone::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  top: -10%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.55), rgba(167, 139, 250, 0.45), transparent);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
  transition: opacity 0.2s ease;
}

.scan-cam-scan-zone:hover {
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.12), 0 22px 56px rgba(2, 6, 23, 0.35);
}

.scan-cam-scan-zone:hover::before {
  opacity: 1;
  animation: scanCamZoneHoverLine 2.2s ease-in-out infinite;
}

@keyframes scanCamZoneHoverLine {
  0% {
    top: -8%;
    opacity: 0.85;
  }
  50% {
    top: 92%;
    opacity: 1;
  }
  100% {
    top: -8%;
    opacity: 0.85;
  }
}

.scan-cam-scan-zone__hint {
  margin: 0;
  max-width: 220px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.scan-cam-onboarding {
  align-self: stretch;
  max-width: 320px;
  margin: 4px auto 0;
  padding: 12px 14px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.45), 0 0 24px rgba(56, 189, 248, 0.15);
  z-index: 4;
  animation: scanCamOnboardingIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.scan-cam-onboarding.hidden {
  display: none;
}

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

.scan-cam-onboarding__text {
  margin: 0 0 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.scan-cam-onboarding__btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(167, 139, 250, 0.15));
  color: #f1f5f9;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.scan-cam-onboarding__btn:hover {
  border-color: rgba(125, 211, 252, 0.55);
  color: #fff;
}

.scan-cam-launch__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 640px) {
  .scan-cam-launch__actions {
    flex-wrap: wrap;
  }
}

.scan-cam-chip-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.scan-cam-chip-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.65);
  transform: translateY(-1px);
}

.scan-cam-chip-btn--primary {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.2));
  color: #f8fafc;
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.16);
}

.scan-cam-chip-btn--primary:hover {
  border-color: rgba(125, 211, 252, 0.6);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.22);
}

.scan-cam-chip-btn--secondary {
  min-height: 40px;
  padding: 0 13px;
  font-size: 0.8rem;
  opacity: 0.92;
}

.scan-cam-side-card {
  padding: 20px 18px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.55));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
}

.scan-cam-side-card__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.5);
}

.scan-cam-side-card__summary::-webkit-details-marker {
  display: none;
}

.scan-cam-side-card__summary-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bae6fd;
}

.scan-cam-side-card__summary-icon {
  color: #cbd5e1;
  transition: transform 0.18s ease;
}

.scan-cam-side-card[open] .scan-cam-side-card__summary-icon {
  transform: rotate(180deg);
}

.scan-cam-side-card__eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
}

.scan-cam-side-card__title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.scan-cam-features-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.45;
  list-style: none;
}

.scan-cam-features-list__item {
  padding-left: 2px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.scan-cam-info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.scan-cam-mini-card {
  padding: 16px 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(8px);
}

.scan-cam-mini-card--accent {
  border-color: rgba(167, 139, 250, 0.28);
  background: linear-gradient(145deg, rgba(76, 29, 149, 0.18), rgba(15, 23, 42, 0.55));
}

.scan-cam-mini-card__title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.scan-cam-mini-card__body {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #94a3b8;
}

.scan-cam-mini-card__steps {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
}

.scan-cam-launch {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  padding: 8px 0 12px;
  animation: scanCamLaunchIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.scan-cam-launch.hidden {
  display: none;
}

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

.scan-cam-camera-glow {
  position: relative;
  width: min(150px, 44vw);
  height: min(150px, 44vw);
  max-width: 160px;
  max-height: 160px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #e0f2fe;
  background: radial-gradient(circle at 35% 30%, rgba(125, 211, 252, 0.18), transparent 55%),
    radial-gradient(circle at 70% 65%, rgba(167, 139, 250, 0.22), transparent 50%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.78), rgba(8, 47, 73, 0.62));
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.24), 0 12px 30px rgba(2, 8, 20, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: scanCamGlowPulse 3.2s ease-in-out infinite;
}

.scan-cam-camera-glow::after {
  content: "";
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.14);
  pointer-events: none;
  animation: scanCamPulseRing 3.2s ease-in-out infinite;
}

.scan-cam-camera-glow::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  height: 2px;
  top: 18%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.64), transparent);
  opacity: 0.72;
  animation: scanCamLensSweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scanCamPulseRing {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.95;
  }
}

.scan-cam-camera-glow:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.4), 0 14px 34px rgba(2, 8, 20, 0.34), 0 0 30px rgba(56, 189, 248, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.scan-cam-camera-glow:active {
  transform: scale(0.98);
}

@keyframes scanCamGlowPulse {
  0%,
  100% {
    opacity: 0.92;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes scanCamLensSweep {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.2;
  }
  50% {
    transform: translate3d(0, 240%, 0);
    opacity: 0.85;
  }
}

.scan-cam-camera-glow__svg {
  width: 44%;
  height: 44%;
}

.scan-cam-launch__uploads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}

.scan-cam-launch__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.45);
}

.scan-cam-link-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.scan-cam-link-btn:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.65);
}

.scan-cam-stage-block {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 0;
  animation: scanCamLaunchIn 0.4s ease both;
}

.scan-cam-stage-block.hidden {
  display: none;
}

.scan-cam-stage {
  position: relative;
  flex: 1;
  min-height: min(52vh, 420px);
  max-height: min(58vh, 480px);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.75), rgba(2, 6, 23, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.45);
}

.scan-cam-stage__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(2, 6, 23, 0.55);
  color: #f1f5f9;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.scan-cam-stage__close:hover {
  background: rgba(15, 23, 42, 0.75);
}

.scan-cam-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  z-index: 1;
}

.scan-cam-placeholder.hidden {
  display: none;
}

.scan-cam-placeholder__glyph {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(167, 139, 250, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.scan-cam-placeholder__text {
  margin: 0;
  max-width: 220px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #94a3b8;
}

.scan-cam-stage__media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
}

.scan-cam-stage__media.hidden {
  display: none;
}

/* cover = same center crop as capture (feels like ~1× fill, not letterboxed ultrawide) */
.scan-cam-stage__media--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.scan-cam-stage__media--img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.scan-cam-stage__media--pdf {
  padding: 0;
}

.scan-cam-pdf-embed {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: none;
  background: #0f172a;
}

.scan-cam-doc-preview {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px 18px;
  text-align: center;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.96));
}

.scan-cam-doc-preview.hidden {
  display: none;
}

.scan-cam-doc-preview__thumb {
  display: block;
  max-width: 78%;
  max-height: 46%;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.55);
  background: #0f172a;
}

.scan-cam-doc-preview__thumb.hidden {
  display: none;
}

.scan-cam-doc-preview__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 92%;
}

.scan-cam-doc-preview__icon {
  font-size: 1.75rem;
  line-height: 1;
  opacity: 0.9;
}

.scan-cam-doc-preview__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: #f1f5f9;
  word-break: break-word;
}

.scan-cam-doc-preview__meta {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

.scan-cam-doc-preview__hint {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #7dd3fc;
}

.scan-cam-stage-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(8px);
}

.scan-cam-stage-loading.hidden {
  display: none;
}

.scan-cam-stage-loading__spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(148, 163, 184, 0.22);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: scanCamSpin 0.85s linear infinite;
}

.scan-cam-stage-loading__text {
  margin: 0;
  max-width: 240px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #e2e8f0;
}

.scan-cam-stage--busy .scan-cam-scanline {
  display: none;
}

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

.scan-cam-stage--converting::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(2, 6, 23, 0.42);
  pointer-events: none;
}

.scan-cam-scanline {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  z-index: 4;
  top: 14%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.15), rgba(125, 211, 252, 0.95), rgba(56, 189, 248, 0.15), transparent);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.65);
  pointer-events: none;
  animation: scanCamLineMove 1.15s ease-in-out infinite;
}

.scan-cam-scanline.hidden {
  display: none;
}

@keyframes scanCamLineMove {
  0% {
    top: 12%;
    opacity: 0.85;
  }
  50% {
    top: 86%;
    opacity: 1;
  }
  100% {
    top: 12%;
    opacity: 0.85;
  }
}

.scan-cam-shutter {
  flex-shrink: 0;
  min-height: 52px;
  padding: 0 36px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #042f2e;
  cursor: pointer;
  background: linear-gradient(135deg, #5eead4, #22d3ee 50%, #34d399);
  box-shadow: 0 14px 36px rgba(45, 212, 191, 0.35);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.scan-cam-shutter:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.scan-cam-shutter.hidden {
  display: none;
}

.scan-cam-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 0 8px;
}

.scan-cam-preview-bar.hidden {
  display: none;
}

.scan-cam-preview-bar__convert {
  min-height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 0.92rem;
  color: #faf5ff;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.75), rgba(59, 130, 246, 0.55));
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.28);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.scan-cam-preview-bar__convert:hover:not(:disabled) {
  transform: translateY(-1px);
}

.scan-cam-preview-bar__convert:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.scan-cam-preview-bar__ghost {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.5);
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.scan-cam-preview-bar__ghost:hover {
  border-color: rgba(56, 189, 248, 0.35);
  color: #f1f5f9;
}

.scan-cam-result {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 72px 16px 32px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.scan-cam-result.hidden {
  display: none;
}

.scan-cam-result__sheet {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  box-shadow: 0 32px 64px rgba(15, 23, 42, 0.35);
  padding: 28px 28px 32px;
  position: relative;
}

.scan-cam-result__title {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0 0 12px;
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  background: transparent;
}

.scan-cam-result__title:focus {
  outline: none;
  border-bottom-color: rgba(59, 130, 246, 0.45);
}

.scan-cam-result__title::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.scan-cam-result__body {
  font-size: 0.98rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  color: #1e293b;
  min-height: 120px;
  max-height: min(48vh, 360px);
  overflow-y: auto;
}

.scan-cam-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  max-width: 480px;
  width: 100%;
}

.scan-cam-result__btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.scan-cam-result__btn:hover {
  background: #eef2ff;
  border-color: rgba(59, 130, 246, 0.35);
}

.scan-cam-result__btn--primary {
  background: #0f172a;
  color: #f8fafc;
  border-color: #0f172a;
}

.scan-cam-result__btn--primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.scan-cam-result__dismiss {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.2);
  background: rgba(15, 23, 42, 0.5);
  color: #f1f5f9;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.scan-cam-result__dismiss:hover {
  background: rgba(30, 41, 59, 0.75);
}

/* Scan Cam OCR result: keep a light “paper” sheet so text stays readable on all themes & breakpoints */
#scanCamResultPanel .scan-cam-result__sheet {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 32px 64px rgba(15, 23, 42, 0.35);
}

#scanCamResultPanel .scan-cam-result__title {
  color: #0f172a;
  background: transparent;
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

#scanCamResultPanel .scan-cam-result__title::placeholder {
  color: #64748b;
}

#scanCamResultPanel .scan-cam-result__body {
  color: #0f172a;
  background: rgba(248, 250, 252, 0.95);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

/* Scan Cam — document source chooser bottom sheet (mounted on body — avoid overflow/transform clipping). */
.scan-cam-doc-sheet {
  position: fixed;
  inset: 0;
  z-index: 10140;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.scan-cam-doc-sheet.hidden {
  display: none;
}

.scan-cam-doc-sheet:not(.hidden) {
  pointer-events: auto;
}

.scan-cam-doc-sheet__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  /* No backdrop-filter: stacked with Scan Cam gradients it looked like a heavy “fog blur” on mobile. */
  background: rgba(2, 6, 23, 0.62);
}

.scan-cam-doc-sheet__panel {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-bottom: none;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}

.scan-cam-doc-sheet__handle {
  width: 40px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}

.scan-cam-doc-sheet__title {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.scan-cam-doc-sheet__title--leading {
  text-align: left;
}

.scan-cam-doc-sheet__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.scan-cam-doc-sheet__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.55);
  color: inherit;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.15s ease;
}

.scan-cam-doc-sheet__tile:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(30, 41, 59, 0.7);
}

.scan-cam-doc-sheet__tile:active {
  transform: scale(0.98);
}

.scan-cam-doc-sheet__tile-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(71, 85, 105, 0.45);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.scan-cam-doc-sheet__tile:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.scan-cam-doc-sheet__tile-label {
  font-size: 0.86rem;
  font-weight: 750;
  color: #f1f5f9;
  line-height: 1.25;
}

.scan-cam-doc-sheet__tile-hint {
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 1.35;
  color: #94a3b8;
  padding: 0 4px;
}

.scan-cam-doc-sheet__cancel {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 650;
  font-size: 0.88rem;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.35);
}

.scan-cam-doc-sheet__cancel:hover {
  color: #f1f5f9;
}

.scan-cam-upgrade-modal {
  max-width: 400px;
}

.scan-cam-upgrade-modal__lead {
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.scan-cam-upgrade-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.scan-cam-share-modal {
  max-width: 400px;
}

.scan-cam-share-modal__hint {
  margin: 0 0 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #94a3b8;
}

.scan-cam-share-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Home: reminders block — glass card aligned with hex category tiles */
.home-reminders-embed {
  margin-top: 8px;
  padding-top: 0;
  width: 100%;
}

.home-reminders-shell {
  position: relative;
  max-width: none;
  margin: 0;
  border-radius: 28px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.45),
    rgba(129, 140, 248, 0.35) 45%,
    rgba(168, 85, 247, 0.4)
  );
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.home-reminders-shell::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 27px;
  background: linear-gradient(
    165deg,
    rgba(15, 23, 42, 0.55) 0%,
    rgba(15, 23, 42, 0.78) 42%,
    rgba(30, 27, 75, 0.55) 100%
  );
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  z-index: 0;
  pointer-events: none;
}

.home-reminders-inner {
  position: relative;
  z-index: 1;
  padding: 28px 30px 30px;
}

.home-reminders-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 4px;
}

.home-reminders-head-badge {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 8px 18px rgba(15, 23, 42, 0.28);
}

.home-reminders-head-copy .eyebrow {
  margin-bottom: 8px;
  background: linear-gradient(90deg, #38bdf8, #a78bfa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.home-reminders-title {
  margin: 0 0 4px;
  font-size: clamp(1.15rem, 2.15vw, 1.45rem);
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.home-reminders-sub {
  margin: 0 auto;
  max-width: 32ch;
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.35;
}

.home-reminders-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(20px, 3vw, 32px);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.home-reminders-compose {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.home-reminders-notify-btn {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 18px;
  border-radius: 16px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #eff6ff;
  cursor: pointer;
  border: 1px solid rgba(94, 234, 212, 0.45);
  background: linear-gradient(135deg, rgba(39, 126, 210, 0.34), rgba(26, 165, 110, 0.32));
  box-shadow: 0 10px 24px rgba(45, 212, 191, 0.2), 0 0 22px rgba(56, 189, 248, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-reminders-notify-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.65);
  box-shadow: 0 14px 36px rgba(56, 189, 248, 0.18);
}

.home-reminders-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.home-reminders-field textarea {
  min-height: 56px;
}

.home-reminders-field input[type="datetime-local"] {
  min-height: 46px;
  color-scheme: dark;
}

.home-reminders-shell .field-group label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.home-reminders-shell .field-group label[for="homeEmbedReminderMessage"]::before {
  content: "📝 ";
}

.home-reminders-shell .field-group label[for="homeEmbedReminderTime"]::before {
  content: "🕒 ";
}

.home-reminders-shell textarea,
.home-reminders-shell input[type="datetime-local"] {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-reminders-shell textarea:focus,
.home-reminders-shell input[type="datetime-local"]:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.home-reminders-submit-wrap {
  display: flex;
  justify-content: stretch;
  margin-top: 2px;
}

.home-reminders-submit {
  width: 100%;
  min-width: 100%;
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.22);
}

.home-reminders-aside {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 14px 12px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-reminders-aside-title {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

.home-reminders-list-embedded {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.home-reminders-list-embedded .panel-note {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
  padding: 12px 8px;
}

.home-reminders-list-embedded .reminder-item.reminder-item-row {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-left: 3px solid #38bdf8;
  background: rgba(15, 23, 42, 0.65);
  align-items: stretch;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.home-reminders-list-embedded .reminder-time {
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #7dd3fc;
  letter-spacing: 0.02em;
}

.home-reminders-list-embedded .reminder-msg {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #e2e8f0;
  word-break: break-word;
}

.home-reminders-list-embedded .reminder-item-delete {
  flex-shrink: 0;
  align-self: center;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.home-reminders-list-embedded .reminder-item-delete:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(252, 165, 165, 0.5);
  color: #fecaca;
}

@media (max-width: 900px) {
  .home-reminders-inner {
    padding: 22px 18px 24px;
  }

  .home-reminders-body {
    grid-template-columns: 1fr;
  }

  .home-reminders-fields {
    grid-template-columns: 1fr;
  }

  .home-reminders-submit-wrap {
    justify-content: stretch;
  }

  .home-reminders-submit {
    width: 100%;
  }
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.note-card {
  position: relative;
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.94));
  border: 1px solid var(--depth-glass-border);
  border-radius: 20px;
  padding: 0;
  box-shadow: var(--depth-elev-1);
  contain: layout style paint;
  transition: border-color var(--depth-motion), box-shadow var(--depth-motion), transform var(--depth-motion);
}

.note-card[role="button"] {
  cursor: pointer;
}

.note-card:hover {
  transform: translate3d(0, -3px, 0);
  border-color: rgba(56, 189, 248, 0.34);
  box-shadow: var(--depth-elev-2);
}

.note-card:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.5);
  outline-offset: 2px;
  box-shadow: var(--depth-elev-1), 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.note-card:active[role="button"] {
  transform: translate3d(0, -1px, 0) scale(0.98);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.note-card-inner {
  display: contents;
}

.note-card > .note-content {
  position: relative;
  padding: 20px 20px 18px;
  min-width: 0;
  padding-right: 170px;
}

.note-content {
  min-width: 0;
  padding-right: 170px;
}

.note-content .note-category-badge {
  margin-bottom: 12px;
}

.note-card-title-row {
  margin: 0 0 8px;
}

.note-card-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #f1f5f9;
}

.note-card-title--placeholder {
  font-weight: 500;
  font-size: 0.92rem;
  font-style: italic;
  color: #64748b;
}

.note-card-preview {
  position: relative;
  margin: 0;
  max-height: 5.2em;
  overflow: hidden;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #cbd5e1;
  word-break: break-word;
}

.note-card-preview > *:first-child {
  margin-top: 0;
}

.note-card-preview > *:last-child {
  margin-bottom: 0;
}

.note-card-preview p,
.note-card-preview ul,
.note-card-preview ol,
.note-card-preview blockquote,
.note-card-preview pre {
  margin: 0 0 0.38em;
}

.note-card-preview ul,
.note-card-preview ol {
  padding-left: 1.15em;
}

.note-card-preview li {
  margin: 0.02em 0;
}

.note-card-preview::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.55em;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.92));
}

.note-card-date {
  margin: 15px 0 0;
  padding-top: 11px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.02em;
}

.note-actions--toolbar {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(5px);
}

.note-action-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.note-action-btn:hover {
  transform: translateY(-1px);
}

.note-action-btn:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

.note-action-btn--edit:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
}

.note-action-btn--delete:hover {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.note-action-btn--download:hover {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.12);
  color: #e9d5ff;
}

.note-action-btn--share:hover {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
}

.note-share-modal .note-export-option__meta {
  text-transform: none;
}

.note-view-modal {
  backdrop-filter: blur(8px);
}

.note-view-modal-content {
  width: min(760px, 94vw);
  max-height: min(82vh, 820px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: noteViewModalIn 0.22s ease-out;
}

.note-view-modal-header {
  margin-bottom: 6px;
  align-items: flex-start;
}

.note-view-head-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-view-head-main h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.note-view-head-main .note-card-date {
  margin: 0;
  padding-top: 0;
  border-top: none;
}

.note-view-body-wrap {
  overflow: auto;
  max-height: min(54vh, 520px);
  padding-right: 4px;
}

.note-view-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.72;
  font-size: 0.98rem;
  color: #dbe5f2;
}

.note-view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.note-view-actions .note-action-btn {
  width: 42px;
  height: 42px;
}

@keyframes noteViewModalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-notif-callout .settings-notif-status {
  margin: 0;
}

.settings-web-push-line {
  margin-top: 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #94a3b8;
}

.note-export-modal {
  max-width: 420px;
}

/**
 * Off-screen host for export rasterization (html2canvas). Avoid display:none / opacity:0 —
 * engines often skip layout for hidden subtrees.
 */
.export-template {
  position: fixed;
  left: -99999px;
  top: 0;
  width: 794px;
  box-sizing: border-box;
  background: #ffffff;
  color: #111111;
  pointer-events: none;
  z-index: 0;
}

.note-export-lead {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: #94a3b8;
}

.note-export-theme-block {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
}

.note-export-theme-label {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 10px;
}

.note-export-theme-seg {
  display: flex;
  gap: 8px;
}

.note-export-theme-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.note-export-theme-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
}

.note-export-theme-btn.is-active {
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(56, 189, 248, 0.22);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.15);
}

.note-export-theme-hint {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #64748b;
}

.note-export-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-export-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}

.note-export-option:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-1px);
}

.note-export-option--locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.note-export-option__ext {
  font-weight: 700;
  font-size: 1rem;
}

.note-export-option__meta {
  font-size: 0.82rem;
  color: #94a3b8;
}

.note-export-plan-hint {
  margin: 18px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #64748b;
}

@media (max-width: 520px) {
  .note-content {
    padding-right: 0;
  }

  .note-actions--toolbar {
    position: static;
    margin: 0 0 12px auto;
  }
}

.bot-connect-panel,
.manual-panel,
.bot-chat-panel,
.reminders-history {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 22px;
}

.main:has(#webChat:not(.hidden):not(.web-chat-drawer)) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.web-chat-page--messenger {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 0 4px;
}

.web-chat-messenger {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: min(calc(100dvh - 200px), 720px);
  max-height: calc(100dvh - 200px);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.05) 55%, rgba(2, 12, 28, 0.35) 100%);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(0, 245, 212, 0.07),
    inset 0 1px 1px rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 0 44px rgba(0, 198, 255, 0.06);
  overflow: hidden;
  position: relative;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    filter 0.35s ease;
}

/* —— Mode skins (instant UX clarity): .chat-container + .chat-bot-mode | .auto-mode | .openai-mode —— */

#webChat .web-chat-messenger.chat-container.chat-bot-mode {
  background:
    radial-gradient(circle at 30% 28%, rgba(15, 74, 62, 0.65), transparent 52%),
    radial-gradient(circle at 78% 82%, rgba(7, 38, 36, 0.85), transparent 45%),
    linear-gradient(165deg, rgba(15, 58, 58, 0.55) 0%, rgba(7, 28, 28, 0.72) 50%, rgba(4, 18, 22, 0.88) 100%);
  border-color: rgba(52, 211, 153, 0.28);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(52, 211, 153, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 0 36px rgba(16, 185, 129, 0.12);
}

#webChat .web-chat-messenger.chat-container.auto-mode {
  background:
    radial-gradient(circle at 28% 24%, rgba(18, 63, 74, 0.75), transparent 48%),
    radial-gradient(circle at 82% 78%, rgba(10, 34, 48, 0.9), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.08), transparent 55%),
    linear-gradient(155deg, rgba(18, 63, 74, 0.5) 0%, rgba(10, 34, 48, 0.75) 55%, rgba(6, 22, 36, 0.9) 100%);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow:
    0 26px 58px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(34, 211, 238, 0.14),
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 0 48px rgba(14, 165, 233, 0.22),
    0 0 72px rgba(34, 211, 238, 0.08);
}

#webChat .web-chat-messenger.chat-container.openai-mode {
  background:
    radial-gradient(circle at 25% 22%, rgba(91, 82, 204, 0.35), transparent 48%),
    radial-gradient(circle at 88% 88%, rgba(26, 42, 79, 0.75), transparent 46%),
    linear-gradient(165deg, rgba(35, 48, 92, 0.55) 0%, rgba(15, 23, 58, 0.82) 45%, rgba(10, 15, 37, 0.94) 100%);
  border-color: rgba(167, 139, 250, 0.42);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(139, 92, 246, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 0 56px rgba(139, 92, 246, 0.28),
    0 0 90px rgba(59, 130, 246, 0.12);
}

/* Ambient mesh — base; mode skins override animation speed + colors below */
.web-chat-messenger::after {
  content: "";
  position: absolute;
  inset: -6%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 15% 12%, rgba(0, 245, 212, 0.11), transparent 52%),
    radial-gradient(ellipse 55% 50% at 92% 88%, rgba(0, 198, 255, 0.1), transparent 48%),
    radial-gradient(ellipse 40% 35% at 48% 45%, rgba(255, 255, 255, 0.04), transparent 55%);
  opacity: 0.65;
  transition: opacity 0.35s ease;
  animation: none;
  transform: none;
}

/* Calm / slow — Chat Bot */
@keyframes webChatAmbientChatBot {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.58;
  }
  50% {
    transform: translate3d(0.8%, -0.6%, 0) scale(1.015);
    opacity: 0.72;
  }
}

/* Medium energy — Auto */
@keyframes webChatAmbientAuto {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.62;
  }
  50% {
    transform: translate3d(1.6%, -1.1%, 0) scale(1.04);
    opacity: 0.84;
  }
}

/* Dynamic — OpenAI */
@keyframes webChatAmbientOpenAiSheen {
  0%,
  100% {
    transform: translate3d(-1%, 1%, 0) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translate3d(2.5%, -1.5%, 0) scale(1.06);
    opacity: 0.88;
  }
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode::after {
  background:
    radial-gradient(ellipse 72% 48% at 18% 14%, rgba(52, 211, 153, 0.14), transparent 54%),
    radial-gradient(ellipse 58% 52% at 90% 86%, rgba(16, 185, 129, 0.1), transparent 50%),
    radial-gradient(ellipse 42% 38% at 48% 48%, rgba(255, 255, 255, 0.035), transparent 56%);
  animation: none;
  transform: none;
}

#webChat .web-chat-messenger.chat-container.auto-mode::after {
  background:
    radial-gradient(ellipse 68% 46% at 14% 12%, rgba(34, 211, 238, 0.16), transparent 52%),
    radial-gradient(ellipse 62% 48% at 88% 84%, rgba(14, 165, 233, 0.14), transparent 48%),
    radial-gradient(ellipse 45% 36% at 52% 44%, rgba(56, 189, 248, 0.08), transparent 54%);
  animation: none;
  transform: none;
}

#webChat .web-chat-messenger.chat-container.openai-mode::after {
  background:
    radial-gradient(ellipse 70% 50% at 20% 18%, rgba(139, 92, 246, 0.18), transparent 52%),
    radial-gradient(ellipse 58% 46% at 85% 82%, rgba(59, 130, 246, 0.14), transparent 48%),
    radial-gradient(ellipse 44% 38% at 45% 42%, rgba(167, 139, 250, 0.06), transparent 55%);
  opacity: 0.62;
  animation: none;
  transform: none;
}

#webChat .web-chat-messenger > * {
  position: relative;
  z-index: 1;
}

/* Futuristic nebula — OpenAI only */
#webChat .web-chat-messenger.chat-container.openai-mode::before {
  content: "";
  position: absolute;
  inset: -32%;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(167, 139, 250, 0.38), transparent 42%),
    radial-gradient(circle at 82% 28%, rgba(59, 130, 246, 0.32), transparent 44%),
    radial-gradient(circle at 48% 78%, rgba(139, 92, 246, 0.22), transparent 40%);
  filter: blur(18px);
  opacity: 0.92;
  transition: opacity 0.35s ease;
  animation: none;
  transform: none;
  pointer-events: none;
}

.web-chat-messenger__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px 20px 0 0;
}

.web-chat-messenger__head-main {
  flex: 1;
  min-width: 0;
}

.web-chat-messenger__back {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f1f5f9;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.web-chat-messenger__back:hover {
  border-color: rgba(0, 245, 212, 0.45);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 28px rgba(0, 245, 212, 0.25);
  transform: scale(1.05);
}

.web-chat-messenger__peer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.web-chat-messenger__avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.15);
}

.web-chat-messenger__avatar-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.web-chat-messenger__peer-text {
  min-width: 0;
}

.web-chat-messenger__eyebrow {
  margin: 0 0 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.web-chat-messenger__title {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 24px rgba(0, 245, 212, 0.15);
}

.web-chat-messenger__status {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #94a3b8;
}

.web-chat-messenger__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.85), 0 0 20px rgba(34, 197, 94, 0.35);
  animation: webChatPulse 2s ease-in-out infinite;
}

#webChat.web-chat-page--ai-live .web-chat-messenger.chat-container .web-chat-messenger__status-dot {
  background: #34d399 !important;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.9), 0 0 28px rgba(16, 185, 129, 0.35) !important;
  animation-duration: 0.9s;
}

#webChat.web-chat-page--ai-live .web-chat-messenger.chat-container.openai-mode::before {
  animation-duration: 2.4s;
  opacity: 1;
}

@keyframes webChatOpenAiNebula {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  50% {
    transform: translate3d(3%, 2%, 0) scale(1.06);
  }
  100% {
    transform: translate3d(-1%, 3%, 0) scale(1.02);
  }
}

@keyframes webChatPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(0.92);
  }
}

.web-chat-quota {
  margin: 0;
  padding: 6px 14px 0;
  font-size: 0.78rem;
  color: #7dd3fc;
  text-align: center;
}

.web-chat-quota.hidden {
  display: none;
}

.web-chat-soft-lock {
  margin: 6px 12px 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-radius: 14px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.65), rgba(30, 27, 75, 0.45));
  color: #f8fafc;
  font-size: 0.82rem;
}

.web-chat-soft-lock__icon {
  opacity: 0.9;
}

.web-chat-soft-lock .save-button {
  margin-left: auto;
}

.web-chat-messenger__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.web-chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  background: linear-gradient(180deg, rgba(2, 12, 28, 0.42) 0%, rgba(2, 12, 28, 0.08) 42%, transparent 78%);
}

.web-chat-messages::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.web-chat-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 100%;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.32s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.web-chat-row--visible {
  opacity: 1;
  transform: translateY(0);
}

.web-chat-row--user {
  justify-content: flex-end;
}

.web-chat-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.35), rgba(167, 139, 250, 0.25));
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: grid;
  place-items: center;
}

.web-chat-avatar__svg {
  width: 22px;
  height: 22px;
}

.web-chat-bubble-wrap {
  max-width: min(82%, 420px);
  min-width: 0;
}

.web-chat-row--user .web-chat-bubble-wrap {
  margin-inline-start: auto;
}

.web-chat-row--bot .web-chat-bubble-wrap {
  max-width: min(calc(100% - 48px), 440px);
}

.web-chat-bubble {
  padding: 12px 16px 13px;
  border-radius: 16px 16px 16px 6px;
  line-height: 1.48;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.web-chat-bubble:hover {
  transform: translateY(-1px);
}

.web-chat-row--user .web-chat-bubble {
  border-radius: 16px 16px 6px 16px;
}

.web-chat-bubble--user {
  background: linear-gradient(145deg, rgba(0, 245, 212, 0.26), rgba(0, 198, 255, 0.14));
  border: 1px solid rgba(0, 245, 212, 0.48);
  color: #f8fafc;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.28),
    0 0 32px rgba(0, 245, 212, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.web-chat-bubble--bot {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(226, 232, 240, 0.95);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.web-chat-bubble--bot.web-chat-bubble--welcome {
  white-space: normal;
}

.web-chat-welcome-intro {
  white-space: pre-line;
  line-height: 1.5;
}

.web-chat-welcome-examples {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  opacity: 1;
  max-height: 400px;
  overflow: hidden;
  transition:
    opacity 0.45s ease,
    max-height 0.55s ease,
    margin 0.45s ease,
    padding 0.45s ease,
    border-color 0.45s ease;
}

.web-chat-welcome-examples--hidden {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  border-top-color: transparent;
  pointer-events: none;
}

.web-chat-welcome-examples__lead {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #a5f3fc;
}

.web-chat-welcome-examples__list {
  margin: 0;
  padding-left: 1.05rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.web-chat-welcome-examples__list li {
  margin: 0 0 5px;
}

.web-chat-welcome-examples__list li:last-child {
  margin-bottom: 0;
}

.web-chat-ai-tag {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 0.68rem;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 999px;
  padding: 2px 8px;
}

.web-chat-row--typing .web-chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.web-chat-typing-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.02em;
  padding: 0 2px;
}

.web-chat-row--typing .web-chat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
  border-radius: 18px 18px 18px 6px;
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.web-chat-feedback {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  padding-left: 2px;
}

.web-chat-feedback__btn {
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  opacity: 0.55;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.web-chat-feedback__btn:hover {
  opacity: 1;
  background: rgba(148, 163, 184, 0.12);
}

.web-chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: webChatTypingDot 1.05s ease-in-out infinite;
}

.web-chat-typing span:nth-child(2) {
  animation-delay: 0.18s;
}

.web-chat-typing span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes webChatTypingDot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

.web-chat-messenger__footer {
  flex-shrink: 0;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.web-chat-messenger__hint {
  margin: 0 0 8px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #64748b;
  text-align: center;
}

#webChat.hidden .web-chat-model-popover,
#webChat.hidden .web-chat-model-lock-banner {
  display: none !important;
}

.web-chat-model-block {
  margin: 0 0 10px;
}

.web-chat-model-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
}

.web-chat-model-label {
  font-size: 0.78rem;
  color: #94a3b8;
  width: 100%;
  text-align: center;
}

.web-chat-model-custom {
  position: relative;
  flex: 1 1 220px;
  max-width: 320px;
  min-width: 0;
}

.web-chat-model-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.65), rgba(15, 23, 42, 0.85));
  color: #e2e8f0;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.web-chat-model-trigger:hover {
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.web-chat-model-trigger:active {
  transform: scale(0.99);
}

.web-chat-model-trigger__text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.web-chat-model-trigger__chev {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.web-chat-model-trigger[aria-expanded="true"] .web-chat-model-trigger__chev {
  transform: rotate(-180deg);
}

.web-chat-model-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.55);
}

.web-chat-model-badge--basic {
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.web-chat-model-badge--recommended {
  border-color: rgba(56, 189, 248, 0.45);
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.5);
}

.web-chat-model-badge--best {
  border-color: rgba(167, 139, 250, 0.5);
  color: #e9d5ff;
  background: rgba(76, 29, 149, 0.35);
}

.web-chat-model-popover {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 -16px 40px rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: webChatModelPopoverIn 0.22s ease;
}

.web-chat-model-popover.hidden {
  display: none;
}

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

.web-chat-model-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.45);
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.web-chat-model-option:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(30, 41, 59, 0.55);
}

.web-chat-model-option--locked {
  opacity: 0.66;
  cursor: pointer;
}

.web-chat-model-option--locked:hover {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(30, 27, 75, 0.35);
}

.web-chat-model-option__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.web-chat-model-option__name {
  font-weight: 700;
  font-size: 0.86rem;
}

.web-chat-model-option__tip {
  font-size: 0.72rem;
  line-height: 1.4;
  color: #94a3b8;
}

.web-chat-model-option__lock {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: #a5b4fc;
}

.web-chat-model-option__lock.hidden {
  display: none;
}

.web-chat-model-option__lock-svg {
  width: 15px;
  height: 15px;
  display: block;
  opacity: 0.95;
}

.web-chat-model-lock-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.45), rgba(15, 23, 42, 0.75));
  animation: webChatLockBannerIn 0.28s ease;
}

.web-chat-model-lock-banner.hidden {
  display: none;
}

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

.web-chat-model-lock-banner__text {
  flex: 1 1 160px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #e2e8f0;
  text-align: center;
}

.web-chat-model-lock-banner__cta {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: #0f172a;
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.web-chat-model-lock-banner__cta:hover {
  filter: brightness(1.06);
}

.web-chat-model-lock-banner__dismiss {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.4);
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.web-chat-model-lock-banner__dismiss:hover {
  border-color: rgba(248, 250, 252, 0.35);
  color: #f8fafc;
}

.web-chat-openai-usage {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.4);
}

.web-chat-openai-usage.hidden {
  display: none;
}

.web-chat-openai-usage__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.web-chat-openai-usage__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.web-chat-openai-usage__counts {
  font-size: 0.78rem;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

.web-chat-openai-usage__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.web-chat-openai-usage__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
  transition: width 0.35s ease;
}

.web-chat-openai-usage__fill--warn {
  background: linear-gradient(90deg, #fbbf24, #f97316);
}

.web-chat-openai-usage__warn {
  margin: 8px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #fcd34d;
}

.web-chat-openai-usage__warn.hidden {
  display: none;
}

.web-chat-quick-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 6px 0 0;
  padding: 0 0 2px;
  max-height: 2.5rem;
}

.web-chat-quick-actions::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.web-chat-quick-actions--disabled {
  pointer-events: none;
  opacity: 0.45;
}

.web-chat-quick-actions__chip {
  max-width: 100%;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.web-chat-quick-actions__chip:hover {
  border-color: rgba(0, 245, 212, 0.42);
  color: #f1f5f9;
  box-shadow: 0 0 22px rgba(0, 245, 212, 0.18);
  transform: translateY(-1px);
}

.web-chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 4px 2px;
}

.web-chat-composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  resize: none;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f1f5f9;
  font-size: clamp(0.82rem, 2.5vw, 0.92rem);
  line-height: 1.45;
  font-family: inherit;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.web-chat-composer textarea::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.web-chat-composer textarea::placeholder {
  font-size: clamp(0.8rem, 2.3vw, 0.9rem);
  line-height: 1.35;
}

.web-chat-composer textarea:focus {
  outline: none;
  border-color: rgba(0, 245, 212, 0.55);
  box-shadow:
    0 0 24px rgba(0, 245, 212, 0.35),
    0 0 40px rgba(0, 198, 255, 0.15),
    inset 0 2px 12px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.web-chat-composer textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.web-chat-smart-suggestions {
  padding: 4px 4px 10px;
  transition: opacity 0.2s ease;
}

.web-chat-smart-suggestions--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.web-chat-smart-suggestions__eyebrow {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.web-chat-smart-suggestions__eyebrow--recent {
  margin-top: 8px;
  color: #38bdf8;
}

.web-chat-smart-suggestions__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.web-chat-smart-suggestions__row--recent {
  flex-direction: column;
  align-items: stretch;
}

.web-chat-smart-suggestions__chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.web-chat-smart-suggestions__chip {
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: clamp(0.72rem, 1.9vw, 0.78rem);
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(8, 47, 73, 0.35);
  color: #e0f2fe;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.web-chat-smart-suggestions__chip:hover {
  border-color: rgba(125, 211, 252, 0.5);
  background: rgba(15, 23, 42, 0.65);
  transform: translateY(-1px);
}

.web-chat-smart-suggestions__chip--recent {
  font-weight: 500;
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.45);
}

.web-chat-smart-suggestions__chip--recent:hover {
  border-color: rgba(56, 189, 248, 0.35);
  color: #f1f5f9;
}

.web-chat-send {
  flex-shrink: 0;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: clamp(0.8rem, 2.1vw, 0.88rem);
  letter-spacing: 0.02em;
  color: #042f2e;
  cursor: pointer;
  background: linear-gradient(135deg, #5eead4 0%, #22d3ee 40%, #34d399 100%);
  box-shadow: 0 12px 28px rgba(45, 212, 191, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.web-chat-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(45, 212, 191, 0.32);
  filter: brightness(1.05);
}

.web-chat-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.3);
}

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

.panel-head h3 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-note {
  margin: 0;
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 55ch;
}

.bot-panel-grid,
.manual-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 18px;
  margin-bottom: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-group label {
  font-size: 0.95rem;
  color: #94a3b8;
}

.select,
input,
textarea,
select {
  width: 100%;
  min-height: 54px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.5);
  background: rgba(15, 23, 42, 0.98);
  color: #f8fafc;
  padding: 16px 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), inset 0 10px 24px rgba(255, 255, 255, 0.02);
}

.field-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(59, 130, 246, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 14px 34px rgba(255, 255, 255, 0.02);
  padding-right: 56px;
  color: #f8fafc;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23E5E7EB' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"), linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  background-repeat: no-repeat, no-repeat;
  background-position: right 18px center, center;
  background-size: 14px 9px, auto;
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.field-group select option {
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
}

.field-group select:hover,
.field-group select:focus {
  border-color: rgba(56, 189, 248, 0.75);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 28px 70px rgba(0, 0, 0, 0.22);
}

.field-group select::-ms-expand {
  display: none;
}

/* Phone verification: country + national number (independent of UI language) */
.phone-verify-form .phone-verify-hint {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0 0 16px;
  line-height: 1.45;
}

.phone-inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

@media (max-width: 520px) {
  .phone-inline-fields {
    grid-template-columns: 1fr;
  }
}

.phone-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 54px;
}

.phone-prefix-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 3.25rem;
  padding: 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-right: none;
  border-radius: 20px 0 0 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.phone-row input {
  flex: 1;
  min-width: 0;
  border-radius: 0 20px 20px 0;
  border-left: 1px solid rgba(30, 41, 59, 0.9);
}

.phone-row input:focus {
  border-left-color: rgba(56, 189, 248, 0.55);
}


textarea {
  resize: vertical;
  min-height: 120px;
}

.action-group {
  display: flex;
  gap: 14px;
  align-items: flex-end;
}

.bot-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.action-group .connect-button,
.bot-actions .connect-button,
.connect-button,
.action-group .disconnect-button,
.bot-actions .disconnect-button,
.disconnect-button {
  min-width: 160px;
  border-radius: 18px;
  border: 1px solid transparent;
  padding: 14px 22px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.label-icon {
  margin-right: 8px;
  opacity: 0.85;
  font-size: 1.05rem;
  display: inline-block;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-right: 6px;
}

.button-icon::before {
  display: none;
}

.button-icon.connect::before {
  display: none;
}

.button-icon.disconnect::before {
  display: none;
}

.button-icon.bot::before {
  display: none;
}

.button-icon.reminder::before {
  display: none;
}

.connect-button {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.24);
  color: #ffffff;
}

.connect-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(34, 197, 94, 0.3);
}

.disconnect-button {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

.disconnect-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateY(-2px);
}

button.save-button {
  min-width: 170px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #fff;
  box-shadow: 0 20px 50px rgba(56, 189, 248, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button.save-button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

button.save-button:hover,
button.save-button.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(56, 189, 248, 0.22);
}

.status {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 4px;
}

.notes-all-intro {
  max-width: 62ch;
  margin-top: 0;
}

.notes-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0 20px;
}

.notes-toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-toolbar-field--search {
  min-width: 0;
}

.notes-search-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.notes-search-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.75);
  color: #f1f5f9;
  font-size: 0.95rem;
}

.notes-select-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.75);
  color: #f1f5f9;
  font-size: 0.95rem;
}

.notes-search-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.notes-select-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

@media (min-width: 1320px) {
  .notes-list--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .notes-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .notes-list--grid {
    grid-template-columns: 1fr;
  }
}

.reminder-history-page .history-page-header {
  align-items: flex-start;
  margin-bottom: 20px;
}

.history-page-titles {
  flex: 1;
  min-width: 0;
}

.history-page-sub {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 0.92rem;
  max-width: 52ch;
  line-height: 1.5;
}

.history-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.history-stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.history-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
}

.history-stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.history-stat--active {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.08);
}

.history-stat--past {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 0 28px rgba(249, 115, 22, 0.06);
}

.history-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 22px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.history-toolbar-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.history-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.65;
  pointer-events: none;
}

.history-search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.5);
  color: #f1f5f9;
  font-size: 0.92rem;
}

.history-search-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.5);
}

.history-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.history-toolbar-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.history-segment {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.history-segment-btn {
  border: none;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.history-segment-btn.is-active {
  background: rgba(56, 189, 248, 0.2);
  color: #e0f2fe;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.history-toolbar-sort {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-toolbar-sort label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.history-sort-select {
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.5);
  color: #e2e8f0;
  font-size: 0.88rem;
}

.history-full {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  padding: 22px 22px 26px;
}

.history-layout--active-only .history-grid {
  grid-template-columns: 1fr;
}

.history-layout--active-only #historyColumnPast {
  display: none;
}

.history-layout--past-only .history-grid {
  grid-template-columns: 1fr;
}

.history-layout--past-only #historyColumnActive {
  display: none;
}

.column-header {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.column-header h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.column-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
}

.column-header__hint {
  margin: 8px 0 0;
  max-width: 42ch;
  font-size: 0.68rem;
  line-height: 1.45;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.78);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.history-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.history-reminder-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reminder-card {
  background: rgba(2, 6, 23, 0.45);
  border-radius: 16px;
  padding: 12px 14px 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.reminder-card:hover {
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.reminder-card.active {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(16, 185, 129, 0.07);
}

.reminder-card.past {
  border-color: rgba(249, 115, 22, 0.38);
  background: rgba(251, 191, 36, 0.06);
}

.reminder-card.empty {
  opacity: 0.85;
  text-align: center;
  padding: 22px 14px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.reminder-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.reminder-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reminder-card.active .reminder-status-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.reminder-card.past .reminder-status-badge {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.reminder-card-datetime {
  font-size: 0.88rem;
  font-weight: 700;
  color: #7dd3fc;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.reminder-card.past .reminder-card-datetime {
  color: #fdba74;
}

.reminder-card-relative {
  width: 100%;
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #a5b4fc;
  letter-spacing: 0.02em;
}

.reminder-card.past .reminder-card-relative {
  color: #94a3b8;
}

.reminder-note,
.reminder-message {
  margin: 0 0 6px;
  color: #cbd5e1;
  line-height: 1.45;
  font-size: 0.86rem;
}

.reminder-message {
  color: #e2e8f0;
  font-size: 0.9rem;
}

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

.reminder-actions button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.reminder-actions button:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.reminder-actions button[data-action="delete"] {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.reminder-actions button[data-action="delete"]:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(248, 113, 113, 0.55);
}

@media (max-width: 720px) {
  .history-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .history-sort-select {
    width: 100%;
  }
}

.reminder-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
}

.reminder-item p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 14px));
  transform: translateX(-50%);
  width: max-content;
  max-width: min(calc(100vw - 28px), 360px);
  box-sizing: border-box;
  margin: 0;
  padding: 11px 16px;
  border-radius: 14px;
  background: rgba(12, 18, 32, 0.94);
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  border: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow:
    0 14px 36px rgba(2, 8, 20, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  z-index: 1310;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast:not(.hidden) {
  opacity: 1;
  animation: toastSlideIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.reminder-foreground-toast {
  position: fixed;
  left: 50%;
  top: max(14px, calc(env(safe-area-inset-top, 0px) + 10px));
  transform: translateX(-50%);
  width: max-content;
  max-width: min(calc(100vw - 28px), 360px);
  box-sizing: border-box;
  padding: 11px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  color: #f8fafc;
  background: rgba(12, 18, 32, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 14px 36px rgba(2, 8, 20, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  z-index: 1310;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.reminder-foreground-toast:not(.hidden) {
  opacity: 1;
  animation: reminderToastIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes reminderToastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.reminder-status-overdue {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fbbf24;
  vertical-align: middle;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: grid;
  place-items: center;
  z-index: 30;
}

.modal-content {
  width: min(600px, 92vw);
  background: rgba(15, 23, 42, 0.98);
  border-radius: 28px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.close-button {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--depth-motion), background var(--depth-motion), box-shadow var(--depth-motion);
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.1);
}

.close-button:active {
  transform: scale(0.96);
  box-shadow: none;
}

.modal-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.tab {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  padding: 12px 18px;
  border-radius: 14px;
}

.tab.active {
  background: rgba(14, 165, 233, 0.2);
  color: #fff;
}

.auth-message {
  margin-top: 16px;
  color: #fda4af;
}

.remember-row {
  margin: 16px 0 22px;
  color: #cbd5e1;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  color: #d6deed;
}

.remember-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.65);
  display: inline-grid;
  place-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.remember-label input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 9px;
  transform: scale(0);
  transition: transform 0.18s ease;
  clip-path: polygon(14% 53%, 0 66%, 44% 100%, 100% 24%, 85% 11%, 43% 70%);
  background: #ffffff;
}

.remember-label input[type="checkbox"]:hover {
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(8, 47, 73, 0.55);
}

.remember-label input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28), 0 1px 2px rgba(0, 0, 0, 0.35);
}

.remember-label input[type="checkbox"]:checked {
  border-color: transparent;
  background: linear-gradient(135deg, #06b6d4, #22c55e);
}

.remember-label input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.password-field {
  margin-bottom: 20px;
}

.password-input-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  gap: 0;
}

.password-input-wrapper input {
  flex: 1;
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 8px 12px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: #e5e7eb;
  transform: scale(1.1);
}

/* Auth modal — Sign in with Google (GIS renders inside #google-login-btn) */
.auth-google-section {
  margin-bottom: 8px;
}

.auth-google-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
}

.auth-google-button-host {
  display: flex;
  justify-content: stretch;
  align-items: center;
  min-height: 44px;
  width: 100%;
}

.auth-google-button-host > div {
  width: 100% !important;
}

.auth-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 18px;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-or-divider::before,
.auth-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.22);
}

.auth-or-divider span {
  flex-shrink: 0;
  opacity: 0.9;
}

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

@media (max-width: 1020px) {
  .home-dashboard .hex-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .home-dashboard-top {
    grid-template-columns: 1fr;
  }

  .home-stats-panel {
    position: static;
    order: -1;
  }
}

@media (max-width: 840px) {
  .app {
    display: block;
    min-height: auto;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 40px;
    height: 40px;
    z-index: 2;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(13, 22, 40, 0.36);
    box-shadow: 0 4px 12px rgba(2, 8, 20, 0.2);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    padding: 0;
  }

  .mobile-menu-toggle__bar {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #e2e8f0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  body.mobile-nav-open .mobile-menu-toggle__bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.mobile-nav-open .mobile-menu-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  body.mobile-nav-open .mobile-menu-toggle__bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1180;
    border: none;
    margin: 0;
    padding: 0;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(2px);
    opacity: 1;
    transition: opacity 0.22s ease;
  }

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

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100dvh;
    z-index: 1250;
    width: min(82vw, 320px);
    max-width: 320px;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    border-bottom: none;
    transform: translateX(-106%);
    transition: transform 0.28s ease;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    /* Lift Community + inset-bottom above Android gesture / nav bar (env often 0 in WebViews). */
    scroll-padding-bottom: max(36px, calc(28px + env(safe-area-inset-bottom, 24px)));
    padding:
      calc(18px + env(safe-area-inset-top, 0px))
      max(22px, env(safe-area-inset-right, 0px))
      max(28px, calc(22px + env(safe-area-inset-bottom, 24px)))
      max(22px, env(safe-area-inset-left, 0px));
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
    background: linear-gradient(180deg, rgb(15, 23, 42) 0%, rgb(10, 18, 36) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 8px 0 40px rgba(2, 8, 20, 0.55);
  }

  /* Footer is outside .app — lift app layer above it while the drawer is open */
  body.mobile-nav-open .app {
    z-index: 1200;
  }

  body.mobile-nav-open .site-footer {
    visibility: hidden;
    pointer-events: none;
    user-select: none;
  }

  body.mobile-nav-open {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }

  .main {
    padding: 12px 14px 16px;
    width: 100%;
    max-width: 100%;
  }

  .topbar-inner {
    width: 100%;
    max-width: 100%;
    padding: 0 4px;
    gap: 12px;
  }

  .topbar-brand {
    padding-left: 0;
  }

  .topbar {
    margin-bottom: 18px;
  }

  .hex-grid {
    grid-template-columns: 1fr;
  }
  .bot-panel-grid {
    grid-template-columns: 1fr;
  }
}

.bot-page-hint {
  max-width: 720px;
  margin: 0 0 20px;
}

/* ============ WEB REMINDER FORM ============ */
.web-reminder-section {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 32px;
  display: none;
}

.web-reminder-section h3 {
  margin: 0 0 24px 0;
  font-size: 1.3rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reminder-form {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.reminder-form label {
  display: block;
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 8px;
  font-weight: 500;
}

.reminder-form select,
.reminder-form input,
.reminder-form textarea {
  width: 100%;
  padding: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.reminder-form select:focus,
.reminder-form input:focus,
.reminder-form textarea:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(15, 23, 42, 0.8);
}

.reminder-form textarea {
  resize: vertical;
  min-height: 80px;
}

.reminder-form button {
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.8), rgba(139, 92, 246, 0.6));
  color: #fff;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.reminder-form button:hover {
  background: linear-gradient(135deg, #a855f7, #8b5cf6);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(168, 85, 247, 0.3);
}

.reminder-form button:active {
  transform: translateY(0);
}

.active-reminders-container {
  display: grid;
  gap: 12px;
}

.active-reminders-container h4 {
  margin: 24px 0 12px 0;
  font-size: 1.1rem;
  color: #cbd5e1;
}

.reminder-item {
  background: rgba(15, 23, 42, 0.6);
  border-left: 3px solid #a855f7;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.reminder-item-content {
  flex: 1;
}

.reminder-item-time {
  font-weight: 600;
  color: #a855f7;
  font-size: 0.9rem;
}

.reminder-item-message {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-top: 4px;
}

.reminder-item-delete {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.reminder-item-delete:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
}

#activeRemindersList {
  display: grid;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.note-title-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-weight: 600;
}

.note-category-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* My notes: sections per category + accent (aligned with home hex tiles) */
.my-notes-groups {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.my-notes-category-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-notes-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px 2px;
  margin: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.my-notes-category-header__accent {
  width: 4px;
  height: 26px;
  border-radius: 99px;
  flex-shrink: 0;
  background: rgba(148, 163, 184, 0.35);
}

.cat-theme-warm .my-notes-category-header__accent {
  background: linear-gradient(180deg, #fb923c, #f59e0b);
  box-shadow: 0 0 18px rgba(251, 146, 60, 0.25);
}

.cat-theme-cool .my-notes-category-header__accent {
  background: linear-gradient(180deg, #38bdf8, #3b82f6);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.22);
}

.cat-theme-fresh .my-notes-category-header__accent {
  background: linear-gradient(180deg, #34d399, #10b981);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.2);
}

.cat-theme-neutral .my-notes-category-header__accent {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.cat-theme-lux .my-notes-category-header__accent {
  background: linear-gradient(180deg, #c084fc, #f472b6);
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.28);
}

.cat-theme-warm .my-notes-category-header {
  border-bottom-color: rgba(251, 146, 60, 0.28);
}

.cat-theme-cool .my-notes-category-header {
  border-bottom-color: rgba(56, 189, 248, 0.24);
}

.cat-theme-fresh .my-notes-category-header {
  border-bottom-color: rgba(52, 211, 153, 0.24);
}

.cat-theme-lux .my-notes-category-header {
  border-bottom-color: rgba(192, 132, 252, 0.28);
}

.my-notes-category-header__title {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f1f5f9;
}

.my-notes-category-header__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.note-card--accent-warm {
  border-left: 3px solid rgba(251, 146, 60, 0.92);
  background: linear-gradient(165deg, rgba(249, 115, 22, 0.1), rgba(15, 23, 42, 0.94));
}

.note-card--accent-cool {
  border-left: 3px solid rgba(56, 189, 248, 0.92);
  background: linear-gradient(165deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.94));
}

.note-card--accent-fresh {
  border-left: 3px solid rgba(52, 211, 153, 0.92);
  background: linear-gradient(165deg, rgba(52, 211, 153, 0.09), rgba(15, 23, 42, 0.94));
}

.note-card--accent-neutral {
  border-left: 3px solid rgba(148, 163, 184, 0.55);
}

.note-card--accent-lux {
  border-left: 3px solid rgba(192, 132, 252, 0.92);
  background: linear-gradient(165deg, rgba(167, 139, 250, 0.1), rgba(15, 23, 42, 0.94));
}

.note-card--accent-warm:hover {
  border-left-color: rgba(253, 186, 116, 0.98);
  border-color: rgba(251, 146, 60, 0.24);
}

.note-card--accent-cool:hover {
  border-left-color: rgba(125, 211, 252, 0.98);
  border-color: rgba(56, 189, 248, 0.26);
}

.note-card--accent-fresh:hover {
  border-left-color: rgba(110, 231, 183, 0.98);
  border-color: rgba(52, 211, 153, 0.24);
}

.note-card--accent-neutral:hover {
  border-left-color: rgba(226, 232, 240, 0.85);
}

.note-card--accent-lux:hover {
  border-left-color: rgba(233, 213, 255, 0.98);
  border-color: rgba(192, 132, 252, 0.26);
}

.note-category-badge--warm {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border-color: rgba(251, 146, 60, 0.38);
}

.note-category-badge--cool {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.28);
}

.note-category-badge--fresh {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.32);
}

.note-category-badge--neutral {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.24);
}

.note-category-badge--lux {
  background: rgba(167, 139, 250, 0.16);
  color: #e9d5ff;
  border-color: rgba(192, 132, 252, 0.35);
}

.note-editor-form {
  padding: 0 4px 8px;
}

.note-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hub-reminders-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.hub-reminders-list.home-reminders-list-embedded {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  gap: 10px;
}

.bot-context-strip {
  max-width: 1040px;
  margin: 0 auto 20px;
  padding: 0 8px;
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.55;
}

#bot .bot-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 8px;
  padding-right: 8px;
}

#bot .bot-page-header .back-button {
  flex-shrink: 0;
  min-width: 88px;
}

#bot .bot-page-header > div {
  flex: 1;
  min-width: 0;
  text-align: center;
}

/* Premium upgrade marketing (logged-in free tier) */
.premium-marketing {
  padding: 4px 0 32px;
}

.premium-marketing-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 8px;
}

.premium-hero {
  text-align: center;
  padding: 12px 0 20px;
}

.premium-hero-title {
  margin: 0 0 14px;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #f8fafc;
}

.premium-hero-lead {
  margin: 0 auto 12px;
  max-width: 36rem;
  font-size: 1.08rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.premium-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.premium-hero-primary {
  min-width: 200px;
}

.premium-hero-secondary {
  min-width: 180px;
}

.premium-hero-note {
  margin: 0;
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.premium-section-heading {
  margin: 0 0 18px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}

.premium-plans-section {
  margin-bottom: 24px;
}

.premium-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.premium-plan-card {
  position: relative;
  border-radius: 22px;
  padding: 22px 22px 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.premium-plan-card--free {
  background: rgba(15, 23, 42, 0.55);
}

.premium-plan-card--featured {
  background: linear-gradient(155deg, rgba(88, 28, 135, 0.35), rgba(15, 23, 42, 0.92));
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12), 0 24px 56px rgba(0, 0, 0, 0.35),
    0 0 48px rgba(168, 85, 247, 0.15);
}

.premium-plan-card--premium {
  background: linear-gradient(160deg, rgba(180, 83, 9, 0.12), rgba(15, 23, 42, 0.9));
  border-color: rgba(251, 191, 36, 0.28);
}

.premium-plan-card--premium:hover {
  border-color: rgba(251, 191, 36, 0.45);
}

.premium-plan-card--featured:hover {
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2), 0 28px 64px rgba(0, 0, 0, 0.4),
    0 0 64px rgba(168, 85, 247, 0.22);
}

.premium-plan-card--premium.premium-plan-card--featured {
  border-color: rgba(250, 204, 21, 0.58);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.24), 0 24px 56px rgba(0, 0, 0, 0.36),
    0 0 52px rgba(251, 191, 36, 0.22);
}

.premium-plan-card--pulse {
  animation: premiumPlanPulse 0.85s ease;
}

@keyframes premiumPlanPulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.01);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35), 0 28px 72px rgba(0, 0, 0, 0.45),
      0 0 80px rgba(34, 211, 238, 0.25);
  }
  100% {
    transform: scale(1);
  }
}

.premium-plan-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.premium-plan-badge--pro {
  background: linear-gradient(120deg, rgba(168, 85, 247, 0.35), rgba(34, 211, 238, 0.2));
  border-color: rgba(168, 85, 247, 0.5);
  color: #fae8ff;
}

.premium-plan-badge--standard {
  background: linear-gradient(120deg, rgba(14, 165, 233, 0.3), rgba(34, 211, 238, 0.15));
  border-color: rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
}

.premium-plan-badge--premium {
  background: linear-gradient(120deg, rgba(245, 158, 11, 0.28), rgba(251, 191, 36, 0.12));
  border-color: rgba(251, 191, 36, 0.45);
  color: #fef3c7;
}

.premium-plan-muted {
  margin: 0;
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.45;
}

.premium-plan-foot {
  margin-top: auto;
}

.premium-plan-cta-row {
  margin-top: auto;
  padding-top: 4px;
}

.premium-plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.premium-plan-price-value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.premium-plan-price-period {
  font-size: 1rem;
  font-weight: 600;
  color: #94a3b8;
}

.premium-plan-list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.65;
  flex: 1;
}

.premium-plan-list li {
  margin-bottom: 6px;
}

.premium-plan-list li:last-child {
  margin-bottom: 0;
}

.premium-plan-list--pro {
  color: #e2e8f0;
}

.premium-plan-cta {
  width: 100%;
  margin-top: 4px;
  min-height: 52px;
  font-size: 1rem;
  font-weight: 700;
}

.premium-plan-cta--premium {
  background: linear-gradient(135deg, #38bdf8 0%, #22d3ee 44%, #34d399 100%);
  box-shadow: 0 14px 34px rgba(45, 212, 191, 0.26), 0 0 26px rgba(56, 189, 248, 0.14);
}

.premium-plan-cta--premium:hover {
  filter: brightness(1.06);
}

.premium-plan-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.premium-plan-recommended-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.premium-why-buy {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.38);
}

.premium-why-buy__title {
  margin: 0 0 8px;
  font-weight: 700;
  color: #e2e8f0;
}

.premium-why-buy__list {
  margin: 0;
  padding-left: 1rem;
  color: #cbd5e1;
  display: grid;
  gap: 6px;
}

.premium-checkout-panel {
  margin-top: 28px;
  padding: 22px 20px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.premium-checkout-monthly {
  margin: 0 0 16px;
  font-size: 0.98rem;
  font-weight: 600;
  color: #e2e8f0;
}

.premium-checkout-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.premium-checkout-table-head,
.premium-checkout-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  font-size: 0.88rem;
  align-items: center;
}

.premium-checkout-table-head {
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.premium-checkout-table-row {
  padding: 10px 0;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.premium-checkout-table-row:last-child {
  border-bottom: none;
}

.premium-checkout-table-row--highlight {
  background: rgba(56, 189, 248, 0.06);
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 12px;
  border-bottom: none;
}

.premium-payment-methods-heading {
  margin: 20px 0 12px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
}

.premium-payment-methods {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.premium-payment-method {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.56));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 26px rgba(2, 8, 23, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.premium-payment-method[role="button"] {
  cursor: pointer;
}

.premium-payment-method--disabled {
  opacity: 0.72;
}

.premium-payment-method:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.42);
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.16);
}

.premium-payment-method:active {
  transform: scale(0.98);
}

.premium-payment-method.is-selected {
  border-color: rgba(94, 234, 212, 0.62);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.2), 0 16px 38px rgba(45, 212, 191, 0.2);
}

.premium-payment-method-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #052e2b;
  background: rgba(148, 163, 184, 0.2);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.premium-payment-method.is-selected .premium-payment-method-check {
  opacity: 1;
  transform: scale(1);
  background: linear-gradient(135deg, #5eead4, #34d399);
}

.premium-payment-method--card:hover {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(15, 23, 42, 0.66);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.16);
}

.premium-payment-method-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(148, 163, 184, 0.12));
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 20px rgba(15, 23, 42, 0.24);
}

.premium-payment-method-icon--paypal {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #003087;
  background: #ffc439;
  border-color: rgba(0, 48, 135, 0.2);
  box-shadow: 0 0 18px rgba(255, 196, 57, 0.3), 0 8px 20px rgba(15, 23, 42, 0.2);
}

.premium-payment-method-icon--paypal::before {
  content: "PayPal";
}

.premium-payment-method-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.premium-payment-method-title {
  font-weight: 800;
  font-size: 1.06rem;
  color: #f1f5f9;
}

.premium-payment-method-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.premium-payment-method-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #94a3b8;
}

.premium-payment-card-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.premium-payment-tier-btn {
  min-height: 46px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 12px;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  padding: 8px 10px;
}

.premium-payment-tier-btn--premium {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.36), rgba(167, 139, 250, 0.28)) !important;
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 10px 26px rgba(45, 212, 191, 0.16);
}

.premium-payment-tier-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.26);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fde68a;
}

@media (max-width: 560px) {
  .premium-payment-card-tiers {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .premium-payment-tier-btn {
    width: 100%;
    min-height: 42px;
    font-size: 0.8rem;
    padding: 8px 10px;
  }

  .premium-payment-tier-tag {
    display: inline-block;
    margin-left: 0;
    margin-top: 4px;
    font-size: 0.56rem;
  }
}

.premium-checkout-trust {
  margin: 0;
  font-size: 0.85rem;
  color: #86efac;
  line-height: 1.5;
}

.premium-checkout-trust--muted {
  margin-top: 2px;
  color: #a7f3d0;
  font-size: 0.78rem;
}

.premium-how-section {
  margin-bottom: 40px;
}

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

.premium-steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.premium-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.premium-step-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.premium-step-body strong {
  font-size: 1rem;
  color: #f1f5f9;
}

.premium-step-body span {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.55;
}

.premium-features-section {
  margin-bottom: 40px;
}

.premium-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.premium-feature-card {
  border-radius: 18px;
  padding: 16px 16px 18px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.premium-feature-card:hover {
  border-color: rgba(56, 189, 248, 0.28);
  transform: translateY(-2px);
}

.premium-feature-icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.premium-feature-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
}

.premium-feature-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #94a3b8;
}

.premium-extras-section {
  margin-bottom: 36px;
}

.premium-extras-lead {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.55;
  max-width: 48rem;
}

.premium-channel-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.premium-channel-pill {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.premium-channel-pill:hover {
  border-color: rgba(56, 189, 248, 0.35);
  color: #fff;
}

.premium-channel-pill.is-active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.55);
  color: #e0f2fe;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.12);
}

.premium-preview-card {
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.premium-preview-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.premium-preview-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.premium-test-btn {
  min-width: unset;
}

.premium-trust {
  text-align: center;
  padding: 20px 12px 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.premium-trust-line {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: #94a3b8;
}

.premium-trust-line:last-child {
  margin-bottom: 0;
}

.premium-trust-line--muted {
  font-size: 0.82rem;
  color: #64748b;
}

@media (max-width: 960px) {
  .premium-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .premium-plan-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
}

.premium-dev-hint code {
  font-size: 0.85em;
  word-break: break-all;
}

/* ===== Mobile-only rebalancing (phone UX) ===== */
@media (max-width: 840px) {
  .background-canvas::after,
  .workspace-item {
    opacity: 0.14;
  }

  .glow {
    filter: blur(72px);
    opacity: 0.26;
  }

  .main {
    padding: 12px 12px 16px;
  }

  .topbar-inner {
    gap: 10px;
    align-items: center;
  }

  .topbar-brand {
    padding-left: 0;
    min-width: 0;
  }

  .topbar-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .topbar-logo-svg {
    width: 26px;
    height: 26px;
  }

  .topbar-eyebrow {
    margin-bottom: 4px;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
  }

  .topbar-heading {
    font-size: clamp(1.65rem, 7vw, 2rem);
    line-height: 1.04;
  }

  .account-area-top,
  .app-page-home .account-area-top {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
    backdrop-filter: none;
  }

  .account-button,
  .phone-button,
  .logout-button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.86rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logout-button::before {
    font-size: 0.95rem;
  }

  .page-shell,
  .home-dashboard {
    padding: 0;
  }

  .page-header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title title"
      "left right";
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
  }

  .page-header > div {
    grid-area: title;
    min-width: 0;
  }

  .page-header .back-button {
    grid-area: left;
    justify-self: start;
  }

  .page-header .add-button,
  .page-header #categoryScanCamBtn,
  .page-header #categoryAddNoteBtn {
    grid-area: right;
    justify-self: end;
  }

  .back-button,
  .add-button,
  button.save-button,
  .primaryBtn {
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .page-header h2 {
    font-size: clamp(1.78rem, 8vw, 2.2rem);
    line-height: 1.02;
  }

  .home-hero-title {
    font-size: clamp(1.8rem, 9vw, 2.35rem);
    line-height: 1.02;
  }

  .home-copy {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .notes-toolbar {
    margin: 12px 0 16px;
    gap: 10px;
  }

  .notes-search-input,
  .notes-select-input,
  .field-group input,
  .field-group textarea,
  .field-group select {
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 13px;
    font-size: 0.95rem;
  }

  .note-card {
    border-radius: 18px;
  }

  .note-card-inner {
    padding: 14px 14px 12px;
  }

  .note-content {
    padding-right: 0;
  }

  .note-actions--toolbar {
    position: static;
    margin: 0 0 10px auto;
    padding: 6px;
    border-radius: 12px;
    gap: 6px;
  }

  .note-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .note-card-title {
    font-size: 1rem;
  }

  .note-card-text {
    font-size: 0.92rem;
    line-height: 1.48;
  }

  .note-card-date {
    font-size: 0.78rem;
    margin-top: 12px;
    padding-top: 9px;
  }

  .history-toolbar {
    padding: 12px;
    border-radius: 14px;
    gap: 12px;
  }

  .history-full {
    padding: 14px 12px 16px;
    border-radius: 16px;
  }

  .modal-content {
    width: min(620px, 94vw);
    border-radius: 20px;
    padding: 18px 14px;
  }
}

@media (max-width: 560px) {
  .glow-3,
  .glow-4,
  .note-1,
  .note-2,
  .sticky,
  .pencil {
    display: none;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    left: auto;
  }

  .sidebar {
    width: min(86vw, 320px);
    padding:
      calc(16px + env(safe-area-inset-top, 0px))
      max(14px, env(safe-area-inset-right, 0px))
      max(32px, calc(22px + env(safe-area-inset-bottom, 26px)))
      max(14px, env(safe-area-inset-left, 0px));
    scroll-padding-bottom: max(40px, calc(28px + env(safe-area-inset-bottom, 26px)));
  }

  .brand-lockup {
    padding: 10px 10px 12px;
    margin-bottom: 14px;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .menu-item {
    padding: 11px 10px;
    gap: 10px;
    border-radius: 13px;
  }

  .menu-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .menu-label {
    font-size: 0.9rem;
  }

  .sidebar-footer {
    padding-top: 14px;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .main {
    padding: 12px 10px 14px;
  }

  .topbar-brand {
    padding-left: 0;
  }

  .topbar-heading {
    font-size: clamp(1.55rem, 8.5vw, 1.95rem);
  }

  .account-area-top,
  .app-page-home .account-area-top {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .account-button,
  .phone-button,
  .logout-button {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.82rem;
    border-radius: 12px;
  }

  .page-header {
    gap: 8px;
  }

  .page-header h2 {
    font-size: clamp(1.62rem, 8.5vw, 2rem);
  }

  .home-hero-title {
    font-size: clamp(1.58rem, 9vw, 2rem);
  }

  .back-button,
  .add-button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 0.82rem;
  }

  .notes-search-label {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .notes-search-input,
  .notes-select-input {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .note-card-inner {
    padding: 12px 12px 11px;
  }

  .note-action-btn {
    width: 30px;
    height: 30px;
  }
}

/* ===== Mobile advanced warm visual pass (phone only, not Vintage Journal) ===== */
@media (max-width: 840px) {
  html:not(:has(body.theme-normal)),
  body:not(.theme-normal) {
    background:
      radial-gradient(circle at 8% 0%, rgba(251, 191, 36, 0.12), transparent 22%),
      radial-gradient(circle at 92% 12%, rgba(249, 115, 22, 0.1), transparent 26%),
      radial-gradient(circle at 50% 100%, rgba(45, 212, 191, 0.08), transparent 30%),
      #0c1426;
    color: #e8edf7;
  }

  body:not(.theme-normal)::before {
    background:
      radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.05), transparent 18%),
      radial-gradient(circle at 90% 8%, rgba(251, 191, 36, 0.08), transparent 16%),
      radial-gradient(circle at 76% 90%, rgba(45, 212, 191, 0.07), transparent 16%);
  }

  body:not(.theme-normal) .main,
  body:not(.theme-normal) .page-shell,
  body:not(.theme-normal) .home-dashboard {
    max-width: 100%;
  }

  body:not(.theme-normal) .topbar {
    margin-bottom: 14px;
  }

  body:not(.theme-normal) .topbar-heading,
  body:not(.theme-normal) .page-header h2,
  body:not(.theme-normal) .home-hero-title {
    color: #f8fafc;
    text-wrap: balance;
  }

  body:not(.theme-normal) .home-copy,
  body:not(.theme-normal) .history-page-sub,
  body:not(.theme-normal) .preference-desc,
  body:not(.theme-normal) .settings-page-lead,
  body:not(.theme-normal) .premium-extras-lead {
    color: #bac8df;
  }

  body:not(.theme-normal) .home-stats-panel,
  body:not(.theme-normal) .home-reminders-shell,
  body:not(.theme-normal) .settings-section,
  body:not(.theme-normal) .premium-marketing-inner,
  body:not(.theme-normal) .history-full,
  body:not(.theme-normal) .history-toolbar,
  body:not(.theme-normal) .scan-cam-side-card,
  body:not(.theme-normal) .scan-cam-mini-card,
  body:not(.theme-normal) .web-chat-messenger,
  body:not(.theme-normal) .note-card,
  body:not(.theme-normal) .modal-content,
  body:not(.theme-normal) .scan-cam-tool,
  body:not(.theme-normal) .premium-preview-card {
    background: linear-gradient(165deg, rgba(14, 24, 46, 0.9), rgba(10, 19, 38, 0.94));
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 28px rgba(2, 8, 20, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  body:not(.theme-normal) .home-stat,
  body:not(.theme-normal) .history-stat,
  body:not(.theme-normal) .premium-feature-card,
  body:not(.theme-normal) .scan-cam-mini-card,
  body:not(.theme-normal) .scan-cam-preview-bar,
  body:not(.theme-normal) .note-actions--toolbar {
    background: linear-gradient(150deg, rgba(18, 31, 58, 0.85), rgba(11, 22, 42, 0.92));
    border-color: rgba(148, 163, 184, 0.2);
  }

  body:not(.theme-normal) .menu-item,
  body:not(.theme-normal) .history-segment-btn,
  body:not(.theme-normal) .premium-channel-pill,
  body:not(.theme-normal) .scan-cam-chip-btn,
  body:not(.theme-normal) .home-stats-cta,
  body:not(.theme-normal) .web-chat-smart-suggestions__chip,
  body:not(.theme-normal) .web-chat-quick-actions__chip {
    border-radius: 12px;
  }

  body:not(.theme-normal) .account-button,
  body:not(.theme-normal) .phone-button,
  body:not(.theme-normal) .logout-button,
  body:not(.theme-normal) .back-button,
  body:not(.theme-normal) .add-button,
  body:not(.theme-normal) .save-button,
  body:not(.theme-normal) .primaryBtn,
  body:not(.theme-normal) .secondaryBtn,
  body:not(.theme-normal) .premium-plan-cta,
  body:not(.theme-normal) .web-chat-send {
    border-radius: 13px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 8px 20px rgba(2, 6, 18, 0.28);
  }

  body:not(.theme-normal) .account-button,
  body:not(.theme-normal) .phone-button,
  body:not(.theme-normal) .back-button,
  body:not(.theme-normal) .add-button,
  body:not(.theme-normal) .save-button,
  body:not(.theme-normal) .primaryBtn,
  body:not(.theme-normal) .premium-plan-cta,
  body:not(.theme-normal) .web-chat-send {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(20, 184, 166, 0.28));
    color: #f5f8ff;
  }

  body:not(.theme-normal) .logout-button {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(251, 113, 133, 0.17));
    color: #ffe3e8;
  }

  body:not(.theme-normal) .account-button:hover,
  body:not(.theme-normal) .phone-button:hover,
  body:not(.theme-normal) .logout-button:hover,
  body:not(.theme-normal) .back-button:hover,
  body:not(.theme-normal) .add-button:hover,
  body:not(.theme-normal) .save-button:hover,
  body:not(.theme-normal) .primaryBtn:hover,
  body:not(.theme-normal) .web-chat-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(2, 10, 24, 0.38);
  }

  body:not(.theme-normal) .notes-search-input,
  body:not(.theme-normal) .notes-select-input,
  body:not(.theme-normal) .history-search-input,
  body:not(.theme-normal) .history-sort-select,
  body:not(.theme-normal) .field-group input,
  body:not(.theme-normal) .field-group textarea,
  body:not(.theme-normal) .field-group select,
  body:not(.theme-normal) .web-chat-composer textarea,
  body:not(.theme-normal) #webChatInput {
    background: rgba(7, 14, 30, 0.72);
    border-color: rgba(125, 211, 252, 0.26);
    color: #edf3ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  body:not(.theme-normal) .notes-search-input:focus,
  body:not(.theme-normal) .notes-select-input:focus,
  body:not(.theme-normal) .history-search-input:focus,
  body:not(.theme-normal) .history-sort-select:focus,
  body:not(.theme-normal) .field-group input:focus,
  body:not(.theme-normal) .field-group textarea:focus,
  body:not(.theme-normal) .field-group select:focus,
  body:not(.theme-normal) .web-chat-composer textarea:focus,
  body:not(.theme-normal) #webChatInput:focus {
    border-color: rgba(94, 234, 212, 0.7);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.16);
  }

  body:not(.theme-normal) .note-card-title,
  body:not(.theme-normal) .history-stat-value,
  body:not(.theme-normal) .premium-plan-price-value,
  body:not(.theme-normal) .scan-cam-side-card__title,
  body:not(.theme-normal) .web-chat-messenger__title {
    color: #f7fbff;
  }

  body:not(.theme-normal) .note-card-text,
  body:not(.theme-normal) .history-stat-label,
  body:not(.theme-normal) .web-chat-messenger__status,
  body:not(.theme-normal) .settings-notif-status,
  body:not(.theme-normal) .premium-preview-text {
    color: #c7d4e8;
  }

  body:not(.theme-normal) .note-category-badge,
  body:not(.theme-normal) .premium-plan-badge,
  body:not(.theme-normal) .web-chat-model-badge,
  body:not(.theme-normal) .settings-plan-badge {
    border-color: rgba(94, 234, 212, 0.42);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.24), rgba(14, 165, 233, 0.2));
    color: #dffcf8;
  }

  /* Keep category colors clearly separated on mobile */
  body:not(.theme-normal) .note-card--accent-warm {
    border-left: 4px solid rgba(251, 146, 60, 0.96);
    background: linear-gradient(165deg, rgba(249, 115, 22, 0.14), rgba(15, 23, 42, 0.94));
  }

  body:not(.theme-normal) .note-card--accent-cool {
    border-left: 4px solid rgba(56, 189, 248, 0.96);
    background: linear-gradient(165deg, rgba(56, 189, 248, 0.14), rgba(15, 23, 42, 0.94));
  }

  body:not(.theme-normal) .note-card--accent-fresh {
    border-left: 4px solid rgba(52, 211, 153, 0.96);
    background: linear-gradient(165deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.94));
  }

  body:not(.theme-normal) .note-category-badge--warm {
    background: rgba(249, 115, 22, 0.22);
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.44);
  }

  body:not(.theme-normal) .note-category-badge--cool {
    background: rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.44);
  }

  body:not(.theme-normal) .note-category-badge--fresh {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.44);
  }

  body:not(.theme-normal) .web-chat-row--user .web-chat-bubble,
  body:not(.theme-normal) .web-chat-bubble--user {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.34), rgba(14, 165, 233, 0.28));
    border-color: rgba(94, 234, 212, 0.36);
    color: #f3fbff;
  }

  body:not(.theme-normal) .web-chat-bubble--bot,
  body:not(.theme-normal) .web-chat-typing {
    background: linear-gradient(145deg, rgba(13, 23, 45, 0.92), rgba(9, 18, 36, 0.96));
    border-color: rgba(148, 163, 184, 0.24);
    color: #d8e2f4;
  }

  body:not(.theme-normal) .history-segment {
    background: rgba(5, 12, 25, 0.62);
    border-color: rgba(148, 163, 184, 0.2);
  }

  body:not(.theme-normal) .history-segment-btn.is-active,
  body:not(.theme-normal) .premium-channel-pill.is-active {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.32), rgba(14, 165, 233, 0.3));
    color: #e8fcff;
    border-color: rgba(94, 234, 212, 0.55);
  }

  body:not(.theme-normal) .mobile-nav-overlay {
    background: rgba(3, 9, 20, 0.5);
    backdrop-filter: blur(4px);
  }

  body:not(.theme-normal) .sidebar {
    background: linear-gradient(180deg, rgba(10, 21, 42, 0.98), rgba(8, 18, 36, 0.99));
  }

  body.mobile-nav-open:not(.theme-normal) .sidebar {
    background: linear-gradient(180deg, rgb(10, 21, 42) 0%, rgb(8, 18, 36) 100%);
  }
}

@media (max-width: 560px) {
  .topbar-heading,
  .home-hero-title,
  .page-header h2 {
    letter-spacing: -0.018em;
  }

  .home-copy,
  .note-card-text,
  .history-page-sub,
  .premium-extras-lead,
  .scan-cam-mini-card__body {
    font-size: 0.89rem;
    line-height: 1.46;
  }

  .note-card {
    border-radius: 16px;
  }

  .note-card-inner {
    padding: 11px 11px 10px;
  }

  .history-full,
  .history-toolbar,
  .settings-section,
  .premium-marketing-inner,
  .scan-cam-tool,
  .modal-content {
    border-radius: 14px;
  }

  .web-chat-messenger {
    border-radius: 16px;
  }
}

/* ===== Final mobile core fix (highest priority) ===== */
@media (max-width: 840px) {
  .app,
  .main,
  .page-shell,
  .home-dashboard,
  .home-dashboard-top,
  .home-dashboard-primary,
  .notes-list,
  .notes-list--grid,
  .history-grid,
  .premium-plan-grid,
  .premium-feature-grid,
  .scan-cam-tool__layout,
  .settings-grid,
  .settings-layout,
  .bot-panel-grid {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: 1fr !important;
  }

  .main {
    padding: 12px 12px 16px !important;
  }

  .topbar {
    margin-bottom: 0 !important;
  }

  .topbar-inner {
    min-height: 44px;
    display: grid !important;
    grid-template-columns: 1fr auto;
    align-items: center !important;
    gap: 10px !important;
    padding: 0 2px !important;
  }

  .topbar-brand {
    padding-left: 0 !important;
    min-width: 0;
    display: flex;
    align-items: center;
  }

  .topbar-logo,
  .topbar-eyebrow {
    display: none !important;
  }

  .topbar-titles {
    min-width: 0;
  }

  .topbar-heading {
    margin: 0;
    font-size: clamp(1.2rem, 5.8vw, 1.5rem) !important;
    line-height: 1.08 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .account-area-top,
  .app-page-home .account-area-top {
    width: auto !important;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }

  .phone-button {
    display: none !important;
  }

  .account-button,
  .logout-button {
    min-height: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    width: 44px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    font-size: 0 !important;
    line-height: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .account-button::before {
    content: "👤";
    font-size: 1.05rem;
    line-height: 1;
  }

  .logout-button::before {
    font-size: 1rem !important;
  }

  .page-header {
    margin-bottom: 14px !important;
    gap: 8px !important;
  }

  .page-header h2 {
    font-size: clamp(1.35rem, 7vw, 1.75rem) !important;
    line-height: 1.08 !important;
  }

  .home-copy,
  .notes-all-intro,
  .history-page-sub {
    margin-top: 0;
    margin-bottom: 0;
  }

  .notes-toolbar,
  .history-toolbar {
    margin-top: 14px !important;
    margin-bottom: 14px !important;
  }

  .home-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .note-card,
  .history-full,
  .settings-section,
  .premium-plan-card,
  .premium-feature-card,
  .scan-cam-side-card,
  .scan-cam-mini-card,
  .web-chat-messenger {
    border-radius: 14px !important;
  }

  .note-card-inner {
    padding: 12px !important;
  }

  .note-card-title {
    font-size: 0.98rem !important;
  }

  .note-card-text {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .note-actions--toolbar {
    padding: 5px !important;
    gap: 5px !important;
  }

  .note-action-btn {
    width: 30px !important;
    height: 30px !important;
  }

  .notes-search-input,
  .notes-select-input,
  .history-search-input,
  .history-sort-select,
  .field-group input,
  .field-group textarea,
  .field-group select,
  .web-chat-composer textarea,
  #webChatInput,
  .back-button,
  .add-button,
  .save-button,
  .primaryBtn,
  .secondaryBtn,
  .web-chat-send {
    min-height: 44px !important;
  }

  .back-button,
  .add-button,
  .save-button,
  .primaryBtn,
  .secondaryBtn {
    width: 100%;
    max-width: 100%;
  }

  .web-chat-page--messenger {
    padding: 0 !important;
  }

  .web-chat-messenger {
    min-height: calc(100dvh - 132px) !important;
    max-height: calc(100dvh - 132px) !important;
  }

  .web-chat-messenger__header {
    padding: 10px 10px 8px !important;
  }

  .web-chat-messenger__body {
    min-height: 0;
  }

  .web-chat-messages {
    padding: 10px 10px 28px !important;
    gap: 6px !important;
  }

  .web-chat-messenger__footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    background: linear-gradient(180deg, rgba(12, 20, 38, 0.55), rgba(10, 18, 34, 0.96) 28%);
    backdrop-filter: blur(8px);
  }

  .web-chat-messenger__hint {
    display: none;
  }

  .web-chat-composer textarea {
    font-size: clamp(0.84rem, 3.5vw, 0.92rem);
    line-height: 1.35;
  }

  .web-chat-send {
    min-height: 42px;
    padding: 0 16px;
  }

  .web-chat-quick-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    gap: 6px !important;
    max-height: 2.5rem !important;
    margin-top: 4px !important;
    padding: 0 2px 2px !important;
    scrollbar-width: none;
  }

  .web-chat-quick-actions::-webkit-scrollbar {
    display: none;
  }

  .web-chat-quick-actions .web-chat-chip-strip__chip {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    max-width: min(240px, 78vw);
  }

  .mobile-nav-overlay.hidden {
    display: none !important;
  }
}

/* ===== iOS style polish layer (mobile only) ===== */
@media (max-width: 840px) {
  .topbar {
    position: sticky !important;
    top: env(safe-area-inset-top, 0px);
    z-index: 1200;
    margin: 0 0 10px !important;
    padding: 7px 8px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(13, 22, 40, 0.52) !important;
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    box-shadow: 0 8px 20px rgba(2, 10, 24, 0.2) !important;
    transition: padding 220ms ease, background 220ms ease, box-shadow 240ms ease, transform 220ms ease;
  }

  .topbar-inner {
    min-height: 48px !important;
    grid-template-columns: 1fr !important;
    justify-items: center;
    align-items: center !important;
    padding: 0 44px !important;
    gap: 0 !important;
  }

  .topbar-brand {
    width: 100%;
    justify-content: center;
    padding-left: 0 !important;
  }

  .topbar-titles {
    width: 100%;
    text-align: center;
  }

  .topbar-heading {
    font-size: clamp(1.18rem, 5.4vw, 1.38rem) !important;
    font-weight: 680 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.14 !important;
  }

  .topbar-eyebrow {
    display: none !important;
  }

  .account-area-top,
  .app-page-home .account-area-top {
    display: none !important;
  }
}

@media (max-width: 840px) {
  .page-header .back-button {
    display: none !important;
  }

  .page-header {
    grid-template-columns: 1fr auto !important;
    grid-template-areas: "title action" !important;
    align-items: center !important;
  }

  .page-header > div {
    grid-area: title !important;
  }

  .page-header .add-button,
  .page-header #categoryAddNoteBtn,
  .page-header #categoryScanCamBtn {
    grid-area: action !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    font-size: 0 !important;
    overflow: hidden;
  }

  .page-header .add-button::before,
  .page-header #categoryAddNoteBtn::before {
    content: "+";
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 700;
  }

  .page-header #categoryScanCamBtn::before {
    content: "📷";
    font-size: 1rem;
    line-height: 1;
  }

  .notes-toolbar {
    position: sticky;
    top: calc(60px + env(safe-area-inset-top, 0px));
    transition: top 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 15;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(8, 16, 32, 0.66);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-top: 10px !important;
    margin-bottom: 12px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .notes-toolbar-field--search {
    grid-column: 1 / -1 !important;
    position: relative;
  }

  .notes-search-label {
    display: none !important;
  }

  .notes-toolbar-field--search::before {
    content: "🔎";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.82;
    pointer-events: none;
  }

  .notes-search-input {
    padding-left: 30px !important;
  }

  .notes-select-input,
  .notes-search-input {
    min-height: 40px !important;
    height: 40px;
    border-radius: 11px !important;
    font-size: 0.88rem !important;
  }
}

@media (max-width: 560px) {
  .notes-toolbar {
    top: calc(58px + env(safe-area-inset-top, 0px));
    transition: top 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 7px;
    gap: 7px !important;
  }

  .page-header .add-button,
  .page-header #categoryAddNoteBtn,
  .page-header #categoryScanCamBtn {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 11px !important;
  }
}

@media (max-width: 840px) {
  :root:not(:has(body.theme-normal)) {
    --ios-glass-bg: rgba(255, 255, 255, 0.08);
    --ios-glass-bg-strong: rgba(255, 255, 255, 0.12);
    --ios-glass-border: rgba(255, 255, 255, 0.14);
    --ios-shadow-soft: 0 10px 28px rgba(2, 10, 24, 0.24);
    --ios-shadow-float: 0 16px 34px rgba(2, 10, 24, 0.28);
    --ios-accent: rgba(125, 211, 252, 0.62);
  }

  html:not(:has(body.theme-normal)),
  body:not(.theme-normal) {
    background:
      radial-gradient(circle at 14% 0%, rgba(56, 189, 248, 0.14), transparent 24%),
      radial-gradient(circle at 85% 12%, rgba(167, 139, 250, 0.14), transparent 22%),
      radial-gradient(circle at 50% 100%, rgba(45, 212, 191, 0.1), transparent 30%),
      #0a1223;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  body:not(.theme-normal) .topbar,
  body:not(.theme-normal) .web-chat-messenger__footer,
  body:not(.theme-normal) .home-stats-panel,
  body:not(.theme-normal) .home-reminders-shell,
  body:not(.theme-normal) .settings-section,
  body:not(.theme-normal) .history-toolbar,
  body:not(.theme-normal) .history-full,
  body:not(.theme-normal) .note-card,
  body:not(.theme-normal) .premium-plan-card,
  body:not(.theme-normal) .premium-feature-card,
  body:not(.theme-normal) .scan-cam-tool,
  body:not(.theme-normal) .scan-cam-side-card,
  body:not(.theme-normal) .scan-cam-mini-card,
  body:not(.theme-normal) .web-chat-messenger,
  body:not(.theme-normal) .modal-content {
    background: linear-gradient(165deg, var(--ios-glass-bg), rgba(255, 255, 255, 0.04)) !important;
    border: 1px solid var(--ios-glass-border) !important;
    box-shadow: var(--ios-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
  }

  body:not(.theme-normal) .topbar {
    border-radius: 14px;
    padding: 8px 8px 6px;
  }

  body:not(.theme-normal) .topbar-heading {
    font-weight: 760 !important;
    letter-spacing: -0.02em;
  }

  body:not(.theme-normal) .eyebrow,
  body:not(.theme-normal) .notes-search-label,
  body:not(.theme-normal) .history-toolbar-label,
  body:not(.theme-normal) .history-toolbar-sort label {
    letter-spacing: 0.11em;
    color: #9fb3d4 !important;
  }

  .home-copy,
  .note-card-text,
  .history-page-sub,
  .preference-desc,
  .reminder-section-desc {
    line-height: 1.52 !important;
  }

  .page-header,
  .notes-toolbar,
  .history-toolbar,
  .premium-feature-grid,
  .premium-plan-grid,
  .scan-cam-info-cards {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
  }

  body:not(.theme-normal) .home-stat,
  body:not(.theme-normal) .history-stat {
    border-radius: 13px !important;
    text-align: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .history-stat-value,
  .home-stat-value {
    font-weight: 760;
  }

  body:not(.theme-normal) .account-button,
  body:not(.theme-normal) .logout-button,
  body:not(.theme-normal) .back-button,
  body:not(.theme-normal) .add-button,
  body:not(.theme-normal) .save-button,
  body:not(.theme-normal) .primaryBtn,
  body:not(.theme-normal) .secondaryBtn,
  body:not(.theme-normal) .web-chat-send,
  body:not(.theme-normal) .home-stats-cta {
    border-radius: 14px !important;
    box-shadow: 0 6px 18px rgba(2, 10, 22, 0.25) !important;
    transition: transform 0.18s ease, filter 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  body:not(.theme-normal) .account-button:active,
  body:not(.theme-normal) .logout-button:active,
  body:not(.theme-normal) .back-button:active,
  body:not(.theme-normal) .add-button:active,
  body:not(.theme-normal) .save-button:active,
  body:not(.theme-normal) .primaryBtn:active,
  body:not(.theme-normal) .secondaryBtn:active,
  body:not(.theme-normal) .web-chat-send:active,
  body:not(.theme-normal) .home-stats-cta:active {
    transform: scale(0.97);
    filter: brightness(0.92);
  }

  body:not(.theme-normal) .save-button,
  body:not(.theme-normal) .primaryBtn,
  body:not(.theme-normal) .web-chat-send {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.42), rgba(45, 212, 191, 0.36)) !important;
  }

  .note-card,
  .history-reminder-card,
  .premium-plan-card,
  .scan-cam-mini-card {
    animation: iosCardIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .note-card:active,
  .history-reminder-card:active,
  .premium-plan-card:active,
  .scan-cam-mini-card:active {
    transform: scale(0.985);
  }

  body:not(.theme-normal) .note-card:hover,
  body:not(.theme-normal) .history-reminder-card:hover,
  body:not(.theme-normal) .premium-plan-card:hover {
    box-shadow: var(--ios-shadow-float), 0 0 0 1px rgba(125, 211, 252, 0.18);
  }

  body:not(.theme-normal) .notes-search-input:focus,
  body:not(.theme-normal) .notes-select-input:focus,
  body:not(.theme-normal) .history-search-input:focus,
  body:not(.theme-normal) .history-sort-select:focus,
  body:not(.theme-normal) .field-group input:focus,
  body:not(.theme-normal) .field-group textarea:focus,
  body:not(.theme-normal) .field-group select:focus,
  body:not(.theme-normal) .web-chat-composer textarea:focus {
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.2), 0 0 20px rgba(56, 189, 248, 0.12) !important;
    border-color: var(--ios-accent) !important;
  }

  .mobile-nav-overlay {
    animation: iosFadeIn 300ms ease both;
  }

  .sidebar {
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  .web-chat-messenger {
    overflow: hidden;
  }

  .web-chat-bubble {
    border-radius: 18px !important;
    box-shadow: 0 4px 14px rgba(2, 8, 20, 0.16);
  }

  body:not(.theme-normal) .web-chat-bubble--user {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.45), rgba(45, 212, 191, 0.4)) !important;
    color: #f8fcff !important;
  }

  body:not(.theme-normal) .web-chat-bubble--bot {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #d7e6ff !important;
  }

  .web-chat-typing span {
    animation-duration: 1.1s;
  }

  .web-chat-messenger__footer {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .main,
  .web-chat-messages {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .site-footer {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

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

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

/* ===== Targeted mobile polish: Upgrade/Plan page (#bot) ===== */
@media (max-width: 840px) {
  #bot .bot-page-header {
    padding: 0 !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  #bot .bot-page-header .back-button {
    flex-shrink: 0;
    width: auto !important;
    min-width: 88px;
    padding: 8px 12px !important;
    min-height: 38px !important;
    font-size: 0.82rem !important;
    border-radius: 12px !important;
  }

  #bot .bot-page-header > div {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  #bot .bot-page-header h2 {
    font-size: clamp(1.45rem, 7.4vw, 1.9rem) !important;
    line-height: 1.08 !important;
  }

  #bot .bot-context-strip {
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 12px;
    padding: 0;
  }

  #bot .premium-marketing {
    padding: 4px 0 max(52px, 28px + env(safe-area-inset-bottom, 0px));
  }

  #bot .premium-marketing-inner {
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    padding-top: 0 !important;
    padding-bottom: max(96px, calc(72px + env(safe-area-inset-bottom, 0px))) !important;
  }

  #bot .premium-hero {
    padding: 8px 0 16px;
    text-align: center;
  }

  #bot .premium-hero-title {
    font-size: clamp(1.5rem, 7.2vw, 1.95rem);
    line-height: 1.12;
    margin-bottom: 8px;
    text-wrap: pretty;
  }

  #bot .premium-hero-lead {
    margin: 0 auto 12px;
    max-width: 32rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #c7d4e8;
  }

  #bot .premium-section-heading {
    text-align: center;
  }

  #bot .premium-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
  }

  #bot .premium-hero-primary,
  #bot .premium-hero-secondary {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    font-size: 0.88rem;
  }

  #bot .premium-hero-note {
    text-align: left;
    font-size: 0.82rem;
    max-width: none;
  }

  #bot .premium-section-heading {
    margin: 0 0 10px;
    font-size: 1.02rem;
  }

  #bot .premium-plans-section,
  #bot .premium-how-section,
  #bot .premium-features-section,
  #bot .premium-extras-section {
    margin-bottom: 18px;
  }

  #bot .premium-plan-grid {
    gap: 10px !important;
    max-width: none !important;
  }

  #bot .premium-plan-card {
    border-radius: 14px !important;
    padding: 12px 12px 13px !important;
    gap: 10px;
  }

  #bot .premium-plan-price-value {
    font-size: clamp(1.6rem, 8vw, 1.95rem) !important;
  }

  #bot .premium-plan-price-period {
    font-size: 0.88rem;
  }

  #bot .premium-plan-list {
    font-size: 0.88rem;
    line-height: 1.48;
    padding-left: 1rem;
  }

  #bot .premium-plan-list li {
    margin-bottom: 4px;
  }

  #bot .premium-plan-cta {
    min-height: 42px !important;
    font-size: 0.88rem !important;
  }

  #bot .premium-checkout-panel {
    margin-top: 12px;
    padding: 12px 10px;
    border-radius: 12px;
  }

  #bot .premium-checkout-table-head,
  #bot .premium-checkout-table-row {
    gap: 6px;
    font-size: 0.78rem;
  }

  #bot .premium-payment-method {
    padding: 10px;
    border-radius: 12px;
    gap: 10px;
  }

  #bot .premium-payment-method-title {
    font-size: 0.92rem;
  }

  #bot .premium-payment-method-hint {
    font-size: 0.8rem;
  }

  #bot .premium-payment-tier-btn {
    min-height: 40px;
    font-size: 0.82rem;
  }
}

@media (max-width: 560px) {
  #bot .premium-hero-title {
    font-size: clamp(1.34rem, 8vw, 1.72rem);
  }

  #bot .premium-hero-lead,
  #bot .premium-plan-list,
  #bot .premium-preview-text {
    font-size: 0.86rem;
  }
}

/* Home page balance fix (mobile-first, app-like hierarchy) */
@media (max-width: 840px) {
  #home .home-dashboard {
    gap: 10px !important;
  }

  #home .home-dashboard-top {
    gap: 10px !important;
  }

  /* Make summary panel support-only (small footprint) */
  #home .home-stats-panel {
    padding: 10px 10px 9px !important;
    border-radius: 12px !important;
    order: -1;
  }

  #home .home-stats-eyebrow {
    margin-bottom: 4px !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.11em !important;
  }

  #home .home-welcome-line {
    margin: 0 0 8px !important;
    font-size: 0.84rem !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
  }

  #home .home-stats-grid {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }

  #home .home-stat {
    padding: 8px 6px !important;
    border-radius: 10px !important;
  }

  #home .home-stat-value {
    font-size: 1.05rem !important;
  }

  #home .home-stat-label {
    margin-top: 2px !important;
    font-size: 0.58rem !important;
    letter-spacing: 0.05em !important;
  }

  #home .home-stats-cta {
    min-height: 36px !important;
    padding: 7px 10px !important;
    border-radius: 10px !important;
    font-size: 0.8rem !important;
  }

  /* Reduce hero feel: short, clear, not landing-page style */
  #home .home-intro {
    margin: 0 !important;
    max-width: none !important;
  }

  #home .home-intro .eyebrow {
    margin: 0 0 3px !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.1em !important;
  }

  #home .home-hero-title {
    margin: 0 0 6px !important;
    font-size: clamp(1.18rem, 5.3vw, 1.42rem) !important;
    line-height: 1.14 !important;
    font-weight: 680 !important;
    max-width: 20ch;
  }

  #home .home-copy {
    font-size: 0.86rem !important;
    line-height: 1.38 !important;
    max-width: 42ch !important;
  }

  /* Main focus: category cards */
  #home .home-categories-grid {
    margin-top: 6px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  #home .home-categories-grid .hex-card {
    min-height: 206px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    box-shadow: 0 8px 22px rgba(2, 8, 20, 0.24) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  #home .home-categories-grid .hex-card-main {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 8px !important;
    padding: 12px 11px 8px !important;
  }

  #home .home-categories-grid .category-icon,
  #home .home-categories-grid .hex-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 11px !important;
    font-size: 1.12rem !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  #home .home-categories-grid .hex-card-main strong {
    margin: 0 !important;
    font-size: 1.01rem !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
  }

  #home .home-categories-grid .card-subtitle {
    margin: 0 !important;
    font-size: 0.8rem !important;
    line-height: 1.34 !important;
    color: #cdd9ec !important;
    max-width: none !important;
  }

  #home .home-categories-grid .hex-card-add {
    min-height: 34px !important;
    padding: 7px 9px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.09) !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.01em !important;
  }

  #home .home-categories-grid .hex-card:active {
    transform: scale(0.98) !important;
  }
}

@media (max-width: 560px) {
  #home .home-categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #home .home-categories-grid .hex-card {
    min-height: 192px !important;
    border-radius: 12px !important;
  }

  #home .home-categories-grid .hex-card-main {
    padding: 10px 9px 7px !important;
    gap: 7px !important;
  }

  #home .home-categories-grid .category-icon,
  #home .home-categories-grid .hex-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
  }

  #home .home-categories-grid .hex-card-main strong {
    font-size: 0.95rem !important;
  }

  #home .home-categories-grid .card-subtitle {
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
  }

  #home .home-categories-grid .hex-card-add {
    min-height: 32px !important;
    font-size: 0.72rem !important;
  }
}

/* Header cleanup: remove heavy title box, keep pure app bar */
@media (max-width: 840px) {
  .topbar {
    position: sticky !important;
    top: env(safe-area-inset-top, 0px);
    z-index: 1200;
    margin: 0 0 10px !important;
    padding: 0 12px !important;
    min-height: 60px;
    display: flex;
    align-items: center;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .topbar::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    pointer-events: none;
  }

  .topbar-inner {
    width: 100%;
    min-height: 60px !important;
    display: grid !important;
    grid-template-columns: 40px 1fr 40px !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 0 !important;
    position: relative;
  }

  .topbar-brand {
    grid-column: 2;
    padding: 0 !important;
    justify-content: center !important;
  }

  .topbar-logo,
  .topbar-eyebrow {
    display: none !important;
  }

  .topbar-titles {
    text-align: center;
  }

  .topbar-heading {
    margin: 0;
    font-size: clamp(1.12rem, 4.9vw, 1.32rem) !important;
    font-weight: 620 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    background: none !important;
  }

  .mobile-menu-toggle,
  .mobile-header-action-btn {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none;
    width: 40px !important;
    height: 40px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(13, 22, 40, 0.36) !important;
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    box-shadow: 0 4px 12px rgba(2, 8, 20, 0.2) !important;
    color: #dbe8ff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-toggle {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  .mobile-header-action-btn {
    grid-column: 3 !important;
    justify-self: end !important;
  }

  .mobile-header-action-btn__svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
  }

  .mobile-header-action-btn--logout {
    border-color: rgba(255, 180, 170, 0.22) !important;
    color: #ffd7cf !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 5px 14px rgba(2, 8, 20, 0.22),
      0 0 0 1px rgba(251, 146, 60, 0.08),
      0 0 22px rgba(251, 113, 133, 0.16) !important;
    background: linear-gradient(155deg, rgba(42, 18, 22, 0.55), rgba(11, 23, 43, 0.52)) !important;
  }

  .mobile-menu-toggle:active,
  .mobile-header-action-btn:active {
    transform: scale(0.95) !important;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 10px !important;
    min-height: 56px;
  }

  .topbar-inner {
    min-height: 56px !important;
    grid-template-columns: 36px 1fr 36px !important;
  }

  .mobile-menu-toggle,
  .mobile-header-action-btn {
    width: 40px !important;
    height: 40px !important;
  }

  .topbar-heading {
    font-size: clamp(1.04rem, 5.2vw, 1.2rem) !important;
  }
}

/* ===== Global Premium Design System ===== */
:root {
  --depth-bg-mid: #0c1022;
  --depth-bg-deep: #070818;
  --depth-glass-bg: rgba(15, 23, 42, 0.52);
  --depth-glass-border: rgba(148, 163, 184, 0.12);
  --depth-glass-blur: 16px;
  --depth-elev-1: 0 6px 28px rgba(0, 0, 0, 0.22);
  --depth-elev-2: 0 14px 44px rgba(0, 0, 0, 0.32);
  --depth-motion: 0.26s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --depth-glow-ring: 0 0 0 1px rgba(56, 189, 248, 0.22);
  --ds-bg-0: #060d1d;
  --ds-bg-1: #0a142a;
  --ds-bg-2: #0f1f3c;
  --ds-glass: rgba(255, 255, 255, 0.07);
  --ds-glass-strong: rgba(255, 255, 255, 0.11);
  --ds-border: rgba(255, 255, 255, 0.13);
  --ds-text: #f3f7ff;
  --ds-text-muted: rgba(220, 232, 250, 0.76);
  --ds-primary: #38bdf8;
  --ds-secondary: #22c55e;
  --ds-accent-orange: #f59e0b;
  --ds-accent-purple: #a78bfa;
  --ds-shadow: 0 14px 36px rgba(2, 8, 22, 0.32);
  --ds-shadow-soft: 0 8px 22px rgba(2, 8, 22, 0.24);
  --ds-ease: 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
  background:
    radial-gradient(ellipse 120% 75% at 50% -18%, rgba(99, 102, 241, 0.2), transparent 52%),
    radial-gradient(ellipse 85% 55% at 100% 35%, rgba(56, 189, 248, 0.11), transparent 48%),
    radial-gradient(ellipse 65% 45% at 0% 88%, rgba(139, 92, 246, 0.12), transparent 42%),
    radial-gradient(circle at 12% -8%, rgba(56, 189, 248, 0.12), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(167, 139, 250, 0.1), transparent 25%),
    radial-gradient(circle at 55% 105%, rgba(34, 197, 94, 0.08), transparent 32%),
    linear-gradient(165deg, var(--depth-bg-mid) 0%, var(--depth-bg-deep) 52%, var(--ds-bg-0) 100%);
  color: var(--ds-text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  opacity: 0.55;
}

.topbar-heading {
  font-family: Inter, Arial, sans-serif;
  font-weight: 650;
  color: var(--ds-text);
}

.home-stats-panel,
.home-reminders-shell,
.history-full,
.history-toolbar,
.settings-section,
.premium-plan-card,
.premium-feature-card,
.premium-preview-card,
.scan-cam-tool,
.scan-cam-side-card,
.scan-cam-mini-card,
.web-chat-messenger,
.modal-content {
  background: linear-gradient(165deg, var(--ds-glass), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--ds-border);
  backdrop-filter: blur(14px) saturate(128%);
  -webkit-backdrop-filter: blur(14px) saturate(128%);
  box-shadow: var(--ds-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.note-card {
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.94));
  border: 1px solid var(--ds-border);
  box-shadow: var(--ds-shadow-soft);
  contain: layout style paint;
}

.home-copy,
.card-subtitle,
.history-page-sub,
.preference-desc,
.note-card-text,
.premium-extras-lead,
.scan-cam-mini-card__body {
  color: var(--ds-text-muted);
}

.save-button,
.primaryBtn,
.web-chat-send,
.home-stats-cta,
.add-button,
.back-button {
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(34, 197, 94, 0.24));
  color: #f8fbff;
  box-shadow: 0 8px 20px rgba(2, 10, 24, 0.26);
  transition: transform var(--ds-ease), box-shadow var(--ds-ease), filter var(--ds-ease), border-color var(--ds-ease);
}

.save-button:hover,
.primaryBtn:hover,
.web-chat-send:hover,
.home-stats-cta:hover,
.add-button:hover,
.back-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow);
}

.save-button:active,
.primaryBtn:active,
.web-chat-send:active,
.home-stats-cta:active,
.add-button:active,
.back-button:active {
  transform: scale(0.97);
  filter: brightness(0.98);
  box-shadow: 0 4px 14px rgba(2, 10, 24, 0.2);
}

/* Light 3D interaction: subtle tilt on selected premium surfaces */
.tilt-target {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 200ms ease, box-shadow 220ms ease, filter 220ms ease;
  transform: perspective(980px) rotateX(var(--tilt-rx, 0deg)) rotateY(var(--tilt-ry, 0deg)) scale(var(--tilt-scale, 1));
}

.tilt-target::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--tilt-glare-o, 0);
  background: radial-gradient(circle at var(--tilt-gx, 50%) var(--tilt-gy, 35%), rgba(255, 255, 255, 0.22), transparent 48%);
  transition: opacity 200ms ease;
}

.tilt-target.is-tilting {
  will-change: transform;
  filter: brightness(1.015);
}

/* Keep existing hover visuals while allowing JS tilt transform to lead */
.home-categories-grid .hex-card.tilt-target:hover,
.note-card.tilt-target:hover,
.home-stats-cta.tilt-target:hover,
.save-button.tilt-target:hover,
.primaryBtn.tilt-target:hover,
.web-chat-send.tilt-target:hover,
.add-button.tilt-target:hover,
.back-button.tilt-target:hover {
  transform: perspective(980px) rotateX(var(--tilt-rx, 0deg)) rotateY(var(--tilt-ry, 0deg)) scale(var(--tilt-scale, 1));
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .tilt-target {
    transform: none !important;
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .tilt-target::after {
    display: none;
  }

  .web-chat-fab,
  #webChatFab {
    animation: none !important;
  }

  .web-chat-fab::before,
  .web-chat-fab__active-dot,
  .web-chat-fab__active-dot::after {
    animation: none !important;
  }

  .scan-cam-camera-glow,
  .scan-cam-camera-glow::before,
  .scan-cam-camera-glow::after {
    animation: none !important;
  }
}

.notes-search-input,
.notes-select-input,
.history-search-input,
.history-sort-select,
.field-group input,
.field-group textarea,
.field-group select,
#webChatInput,
.web-chat-composer textarea {
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  background: rgba(15, 23, 42, 0.52);
  color: var(--ds-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--ds-ease), box-shadow var(--ds-ease);
}

.notes-search-input:focus,
.notes-select-input:focus,
.history-search-input:focus,
.history-sort-select:focus,
.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus,
#webChatInput:focus,
.web-chat-composer textarea:focus {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.14), 0 0 18px rgba(56, 189, 248, 0.08);
}

.home-categories-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-categories-grid .hex-card {
  min-height: 232px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--ds-shadow-soft);
  transition: transform var(--ds-ease), box-shadow var(--ds-ease), border-color var(--ds-ease);
}

.home-categories-grid .hex-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ds-shadow), 0 0 32px rgba(56, 189, 248, 0.12);
}

.home-categories-grid .hex-card:active {
  transform: scale(0.97);
}

.home-categories-grid .hex-card-main {
  padding: 16px 14px 10px;
}

.home-categories-grid .category-icon,
.home-categories-grid .hex-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 1.55rem;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 18px rgba(2, 8, 20, 0.2);
}

.home-categories-grid .hex-card-main strong {
  font-weight: 700;
}

.home-categories-grid .hex-card-add {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.hex-warm {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.2), rgba(12, 22, 40, 0.88));
}

.hex-cool {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.2), rgba(12, 22, 40, 0.88));
}

.hex-fresh {
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.2), rgba(12, 22, 40, 0.88));
}

.hex-warm .hex-card-add {
  color: #fbbf24;
}

.hex-cool .hex-card-add {
  color: #7dd3fc;
}

.hex-fresh .hex-card-add {
  color: #86efac;
}

.home-bottom-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-bottom-info-bar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.home-bottom-info-bar__star,
.home-bottom-info-bar__stats {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(167, 139, 250, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.24);
  font-size: 0.95rem;
}

.home-bottom-info-bar__stats {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.24);
}

.home-bottom-info-bar__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 640;
  color: var(--ds-text);
}

.home-bottom-info-bar__sub {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ds-text-muted);
}

.web-chat-bubble {
  border-radius: 18px;
}

.web-chat-bubble--user {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.38), rgba(34, 197, 94, 0.3));
}

.web-chat-bubble--bot {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

@media (max-width: 840px) {
  .topbar-inner {
    grid-template-columns: 40px 1fr 40px !important;
    padding: 0 !important;
  }

  .home-categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-categories-grid .hex-card {
    min-height: 208px;
    border-radius: 16px;
  }

  .home-categories-grid .category-icon,
  .home-categories-grid .hex-icon {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    border-radius: 13px;
  }

  .home-categories-grid .hex-card-main strong {
    font-size: 1.02rem;
  }

  .home-categories-grid .card-subtitle {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .home-categories-grid .hex-card-add {
    min-height: 36px;
    font-size: 0.75rem;
  }
}

/* Home page final lock: match approved screenshot */
@media (max-width: 840px) {
  #home .home-dashboard {
    max-width: 100% !important;
    gap: 12px !important;
  }

  #home .home-dashboard-top {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #home .home-stats-panel {
    order: -1;
    border-radius: 18px !important;
    padding: 14px 14px 12px !important;
    background: linear-gradient(165deg, rgba(18, 33, 62, 0.9), rgba(10, 22, 44, 0.94)) !important;
    border: 1px solid rgba(125, 211, 252, 0.18) !important;
  }

  #home .home-stats-eyebrow {
    margin: 0 0 5px !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.14em !important;
    color: #7f96b8 !important;
  }

  #home .home-welcome-line {
    margin: 0 0 10px !important;
    font-size: 0.92rem !important;
    line-height: 1.35 !important;
    color: #e5eefc !important;
    font-weight: 650 !important;
  }

  #home .home-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  #home .home-stat {
    min-height: 86px;
    border-radius: 16px !important;
    padding: 10px 8px !important;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  #home .home-stat-value {
    font-size: 2.2rem !important;
    font-weight: 800 !important;
  }

  #home .home-stat-label {
    margin-top: 4px !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
  }

  #home .home-stats-cta {
    min-height: 42px !important;
    border-radius: 12px !important;
    font-size: 1.04rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, rgba(39, 131, 216, 0.38), rgba(28, 186, 124, 0.35)) !important;
    border: 1px solid rgba(94, 234, 212, 0.28) !important;
  }

  #home .home-intro .eyebrow {
    font-size: 0.88rem !important;
    letter-spacing: 0.16em !important;
    color: #39bdf8 !important;
    margin: 0 0 6px !important;
  }

  #home .home-hero-title {
    margin: 0 0 7px !important;
    max-width: 16ch !important;
    font-size: clamp(1.72rem, 5.3vw, 2.14rem) !important;
    line-height: 1.08 !important;
    font-weight: 690 !important;
    color: #f2f8ff !important;
    text-wrap: pretty;
  }

  #home .home-copy {
    max-width: 38ch !important;
    font-size: 0.98rem !important;
    line-height: 1.4 !important;
    color: #b9c9e1 !important;
  }

  #home .home-categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-top: 6px !important;
  }

  #home .home-categories-grid .hex-card {
    min-height: 196px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    box-shadow: 0 10px 22px rgba(2, 8, 20, 0.26) !important;
  }

  #home .home-categories-grid .hex-card-main {
    padding: 10px 10px 8px !important;
    align-items: center !important;
    text-align: center !important;
    gap: 7px !important;
  }

  #home .home-categories-grid .category-icon,
  #home .home-categories-grid .hex-icon {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 12px !important;
    font-size: 1.28rem !important;
    margin: 0 !important;
  }

  #home .home-categories-grid .hex-card-main strong {
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
  }

  #home .home-categories-grid .card-subtitle {
    font-size: 0.78rem !important;
    line-height: 1.32 !important;
    max-width: 14ch !important;
    margin: 0 auto !important;
    color: #d5e0f2 !important;
  }

  #home .home-categories-grid .hex-card-add {
    min-height: 34px !important;
    padding: 7px 8px !important;
    font-size: 0.76rem !important;
    letter-spacing: 0.01em !important;
  }

  #home .home-bottom-info-bar {
    margin-top: 8px !important;
    border-radius: 14px !important;
    padding: 9px 10px !important;
    border-color: rgba(125, 211, 252, 0.16) !important;
  }

  #home .home-bottom-info-bar__title {
    font-size: 0.84rem !important;
  }

  #home .home-bottom-info-bar__sub {
    font-size: 0.72rem !important;
  }
}

@media (max-width: 560px) {
  #home .home-categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #home .home-categories-grid .hex-card {
    min-height: 186px !important;
    border-radius: 14px !important;
  }

  #home .home-categories-grid .category-icon,
  #home .home-categories-grid .hex-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    font-size: 1.16rem !important;
  }

  #home .home-categories-grid .hex-card-main strong {
    font-size: 0.96rem !important;
  }

  #home .home-categories-grid .card-subtitle {
    font-size: 0.74rem !important;
  }

  #home .home-categories-grid .hex-card-add {
    font-size: 0.72rem !important;
  }

  #home .home-hero-title {
    font-size: clamp(1.44rem, 6vw, 1.82rem) !important;
    line-height: 1.1 !important;
  }

  #home .home-copy {
    font-size: 0.9rem !important;
    line-height: 1.36 !important;
  }
}

/* Home summary box: exact visual match pass */
@media (max-width: 840px) {
  #home .home-stats-panel {
    position: relative !important;
    top: 0 !important;
    border-radius: 14px !important;
    padding: 10px 10px 10px !important;
    margin-top: -4px !important;
    margin-bottom: 12px !important;
    background: linear-gradient(165deg, rgba(16, 31, 58, 0.92), rgba(8, 22, 44, 0.96)) !important;
    border: 1px solid rgba(120, 146, 188, 0.2) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(2, 8, 20, 0.22) !important;
  }

  #home .home-stats-eyebrow {
    margin: 0 0 6px !important;
    font-size: 0.64rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.16em !important;
    color: #7e93b7 !important;
  }

  #home .home-welcome-line {
    margin: 0 0 8px !important;
    font-size: 1.05rem !important;
    line-height: 1.28 !important;
    font-weight: 700 !important;
    color: #f3f8ff !important;
  }

  #home .home-stats-grid {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  #home .home-stat {
    min-height: 76px !important;
    border-radius: 14px !important;
    padding: 8px 8px !important;
    display: grid !important;
    grid-template-columns: 30px 1fr !important;
    align-items: center !important;
    gap: 8px !important;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
  }

  #home .home-stat::before {
    content: "📝";
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.84rem;
    line-height: 1;
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  #home .home-stat:nth-child(2)::before {
    content: "🌐";
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.32);
  }

  #home .home-stat-value {
    font-size: 2rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  #home .home-stat-label {
    margin-top: 1px !important;
    font-size: 0.64rem !important;
    letter-spacing: 0.08em !important;
  }

  #home .home-stat-value,
  #home .home-stat-label {
    grid-column: 2;
    text-align: center;
  }

  #home .home-stats-cta {
    min-height: 38px !important;
    border-radius: 11px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    border: 1px solid rgba(110, 196, 223, 0.28) !important;
    background: linear-gradient(135deg, rgba(39, 126, 210, 0.34), rgba(26, 165, 110, 0.3)) !important;
    position: relative;
    padding-right: 32px !important;
  }

  #home .home-stats-cta::after {
    content: "›";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-52%);
    font-size: 1.1rem;
    opacity: 0.95;
  }
}

/* Home intro compact center lock (mobile premium) */
@media (max-width: 840px) {
  #home .home-dashboard {
    padding-top: 6px !important;
  }

  #home .home-intro {
    margin: 4px auto 0 !important;
    max-width: 28ch !important;
    text-align: center !important;
    animation: homeIntroIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  #home .home-intro .eyebrow {
    margin: 0 0 6px !important;
    text-align: center !important;
  }

  #home .home-hero-title {
    margin: 0 0 5px !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    font-size: clamp(1.04rem, 4.7vw, 1.28rem) !important;
    line-height: 1.08 !important;
    white-space: nowrap;
  }

  #home .home-copy {
    margin: 0 auto !important;
    max-width: 100% !important;
    text-align: center !important;
    font-size: clamp(0.76rem, 3.4vw, 0.88rem) !important;
    line-height: 1.34 !important;
    white-space: nowrap;
  }

  #home .home-categories-grid {
    margin-top: 2px !important;
  }
}

@keyframes homeIntroIn {
  from {
    opacity: 0;
    transform: translate3d(0, 9px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 560px) {
  #home .home-stats-panel {
    padding: 9px 9px 9px !important;
    margin-top: -3px !important;
    margin-bottom: 10px !important;
  }

  #home .home-welcome-line {
    font-size: 0.98rem !important;
  }

  #home .home-stat {
    min-height: 72px !important;
    gap: 7px !important;
    grid-template-columns: 28px 1fr !important;
  }

  #home .home-stat::before {
    width: 26px;
    height: 26px;
  }

  #home .home-stat-value {
    font-size: 1.8rem !important;
  }

  #home .home-stat-label {
    font-size: 0.62rem !important;
  }
}

/* Header exact lock (final) */
@media (max-width: 840px) {
  body .topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: env(safe-area-inset-top, 0px) 16px 0 !important;
    min-height: calc(60px + env(safe-area-inset-top, 0px)) !important;
    height: auto !important;
    box-sizing: border-box !important;
    z-index: 1200 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition:
      min-height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      padding 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      background 0.28s ease,
      border-color 0.28s ease,
      box-shadow 0.28s ease;
  }

  body .topbar::after {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    opacity: 0.34 !important;
    transition: opacity 0.28s ease;
  }

  body .topbar-inner {
    width: 100% !important;
    min-height: 60px !important;
    height: 60px !important;
    display: grid !important;
    grid-template-columns: 40px 1fr 40px !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 0 !important;
    transition: min-height 0.28s cubic-bezier(0.22, 1, 0.36, 1), height 0.28s cubic-bezier(0.22, 1, 0.36, 1), gap 0.28s ease;
  }

  body .topbar-brand {
    grid-column: 2 !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  body .topbar-logo,
  body .topbar-eyebrow {
    display: none !important;
  }

  body .topbar-heading {
    margin: 0 !important;
    font-size: clamp(1.12rem, 4.9vw, 1.32rem) !important;
    font-weight: 680 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.1 !important;
    text-align: center !important;
    transition: font-size 0.28s cubic-bezier(0.22, 1, 0.36, 1), line-height 0.28s ease;
  }

  body .mobile-menu-toggle,
  body .mobile-header-action-btn {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    background: linear-gradient(155deg, rgba(16, 31, 58, 0.62), rgba(11, 23, 43, 0.52)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 5px 14px rgba(2, 8, 20, 0.22) !important;
    color: #e5efff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
  }

  body .mobile-menu-toggle {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  body .mobile-header-action-btn {
    grid-column: 3 !important;
    justify-self: end !important;
  }

  body .mobile-header-action-btn__svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
  }

  body .mobile-header-action-btn--logout {
    border-color: rgba(255, 180, 170, 0.22) !important;
    color: #ffd7cf !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 5px 14px rgba(2, 8, 20, 0.22),
      0 0 0 1px rgba(251, 146, 60, 0.08),
      0 0 22px rgba(251, 113, 133, 0.16) !important;
    background: linear-gradient(155deg, rgba(42, 18, 22, 0.55), rgba(11, 23, 43, 0.52)) !important;
  }

  body .mobile-menu-toggle__bar {
    width: 15px !important;
    height: 2px !important;
    background: #e5efff !important;
  }

  body .mobile-menu-toggle:active,
  body .mobile-header-action-btn:active {
    transform: scale(0.95) !important;
  }

  @media (hover: hover) {
    body .mobile-menu-toggle:hover,
    body .mobile-header-action-btn:hover {
      border-color: rgba(125, 211, 252, 0.28) !important;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 14px rgba(2, 8, 20, 0.22),
        0 0 20px rgba(56, 189, 248, 0.12) !important;
    }

    body .mobile-header-action-btn--logout:hover {
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 14px rgba(2, 8, 20, 0.22),
        0 0 18px rgba(251, 113, 133, 0.14) !important;
    }
  }

  body .main {
    padding-top: calc(60px + env(safe-area-inset-top, 0px)) !important;
    transition: padding-top 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.mobile-scrolled .topbar {
    padding: env(safe-area-inset-top, 0px) 14px 0 !important;
    min-height: calc(52px + env(safe-area-inset-top, 0px)) !important;
    background: rgba(6, 10, 22, 0.62) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(14px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(135%) !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.06),
      0 10px 28px rgba(2, 6, 18, 0.22),
      0 0 40px rgba(56, 189, 248, 0.06) !important;
  }

  body.mobile-scrolled .topbar::after {
    opacity: 0.55 !important;
  }

  body.mobile-scrolled .topbar-inner {
    min-height: 52px !important;
    height: 52px !important;
    gap: 10px !important;
  }

  body.mobile-scrolled .topbar-heading {
    font-size: clamp(1.02rem, 4.4vw, 1.18rem) !important;
    line-height: 1.08 !important;
  }

  body.mobile-scrolled .main {
    padding-top: calc(52px + env(safe-area-inset-top, 0px)) !important;
  }

  body.mobile-scrolled .notes-toolbar {
    top: calc(52px + env(safe-area-inset-top, 0px)) !important;
    transition: top 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

@media (max-width: 560px) {
  body .topbar {
    min-height: calc(58px + env(safe-area-inset-top, 0px)) !important;
    height: auto !important;
    padding: env(safe-area-inset-top, 0px) 16px 0 !important;
  }

  body .topbar-inner {
    min-height: 58px !important;
    height: 58px !important;
    grid-template-columns: 40px 1fr 40px !important;
  }

  body .main {
    padding-top: calc(58px + env(safe-area-inset-top, 0px)) !important;
  }

  body.mobile-scrolled .topbar {
    min-height: calc(50px + env(safe-area-inset-top, 0px)) !important;
    padding: env(safe-area-inset-top, 0px) 14px 0 !important;
  }

  body.mobile-scrolled .topbar-inner {
    min-height: 50px !important;
    height: 50px !important;
  }

  body.mobile-scrolled .main {
    padding-top: calc(50px + env(safe-area-inset-top, 0px)) !important;
  }

  body.mobile-scrolled .notes-toolbar {
    top: calc(50px + env(safe-area-inset-top, 0px)) !important;
  }

  body .topbar-heading {
    font-size: clamp(1.02rem, 5vw, 1.16rem) !important;
  }

  body .mobile-menu-toggle,
  body .mobile-header-action-btn {
    width: 40px !important;
    height: 40px !important;
  }
}

/* Category cards mobile refinement: smaller, cleaner, app-like */
@media (max-width: 840px) {
  .home-categories-grid {
    gap: 10px !important;
  }

  .home-categories-grid .hex-card {
    min-height: 0 !important;
    border-radius: 14px !important;
    overflow: hidden;
  }

  .home-categories-grid .hex-card-main {
    display: grid !important;
    grid-template-columns: 60px 1fr !important;
    align-items: center !important;
    gap: 10px !important;
    text-align: left !important;
    padding: 12px 12px 10px !important;
  }

  .home-categories-grid .category-icon,
  .home-categories-grid .hex-icon {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px;
    border-radius: 16px !important;
    margin: 0 !important;
    font-size: 1.55rem !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07)) !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 16px rgba(2, 8, 20, 0.2) !important;
  }

  .home-categories-grid .hex-card-main strong {
    margin: 0 0 4px !important;
    font-size: 1.08rem !important;
    line-height: 1.16;
    letter-spacing: -0.01em;
  }

  .home-categories-grid .card-subtitle {
    margin: 0;
    max-width: none !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    color: #d4e2f6;
  }

  .home-categories-grid .hex-card-add {
    min-height: 38px;
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.01em !important;
  }

  .home-categories-grid .hex-card:active {
    transform: scale(0.985);
  }

  .home-categories-grid .hex-card:active .category-icon,
  .home-categories-grid .hex-card:active .hex-icon {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(125, 211, 252, 0.25), 0 8px 18px rgba(2, 8, 20, 0.26) !important;
  }
}

@media (max-width: 560px) {
  .home-categories-grid .hex-card-main {
    grid-template-columns: 54px 1fr !important;
    gap: 9px !important;
    padding: 10px 10px 8px !important;
  }

  .home-categories-grid .category-icon,
  .home-categories-grid .hex-icon {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px;
    border-radius: 14px !important;
    font-size: 1.38rem !important;
  }

  .home-categories-grid .hex-card-main strong {
    font-size: 1rem !important;
  }

  .home-categories-grid .card-subtitle {
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
  }

  .home-categories-grid .hex-card-add {
    min-height: 36px;
    font-size: 0.76rem !important;
  }
}

/* Keep original web plan colors on mobile (only size/layout adapted) */
@media (max-width: 840px) {
  #bot .premium-plan-grid .premium-plan-card--free {
    order: 1 !important;
  }

  #bot .premium-plan-grid .premium-plan-card--featured {
    order: 2 !important;
  }

  #bot .premium-plan-grid .premium-plan-card--premium {
    order: 3 !important;
  }

  #bot .premium-plan-card {
    background: rgba(15, 23, 42, 0.72) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    box-shadow: none !important;
  }

  #bot .premium-plan-card--free {
    background: rgba(15, 23, 42, 0.55) !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
  }

  #bot .premium-plan-card--featured {
    background: linear-gradient(155deg, rgba(88, 28, 135, 0.35), rgba(15, 23, 42, 0.92)) !important;
    border-color: rgba(168, 85, 247, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12), 0 24px 56px rgba(0, 0, 0, 0.35), 0 0 48px rgba(168, 85, 247, 0.15) !important;
  }

  #bot .premium-plan-card--premium {
    background: linear-gradient(160deg, rgba(180, 83, 9, 0.12), rgba(15, 23, 42, 0.9)) !important;
    border-color: rgba(251, 191, 36, 0.28) !important;
  }

  #bot .premium-plan-badge {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #cbd5e1 !important;
    padding: 4px 10px !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.06em !important;
  }

  #bot .premium-plan-badge--standard {
    background: linear-gradient(120deg, rgba(14, 165, 233, 0.3), rgba(34, 211, 238, 0.15)) !important;
    border-color: rgba(56, 189, 248, 0.45) !important;
    color: #e0f2fe !important;
  }

  #bot .premium-plan-badge--premium {
    background: linear-gradient(120deg, rgba(245, 158, 11, 0.28), rgba(251, 191, 36, 0.12)) !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
    color: #fef3c7 !important;
  }

  #bot .premium-plan-price-value {
    color: #ffffff !important;
  }

  #bot .premium-plan-price-period {
    color: #94a3b8 !important;
  }

  #bot .premium-plan-list {
    color: #cbd5e1 !important;
  }

  #bot .premium-plan-list--pro {
    color: #e2e8f0 !important;
  }

  #bot .premium-plan-recommended-badge {
    background: linear-gradient(120deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.12)) !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
    color: #fde68a !important;
    padding: 4px 9px !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.05em !important;
  }
}

/* Final header symmetry + logout confirm popup */
@media (max-width: 840px) {
  .mobile-logout-confirm {
    position: fixed;
    top: max(56px, env(safe-area-inset-top, 0px) + 54px);
    right: max(10px, env(safe-area-inset-right, 0px) + 8px);
    z-index: 1295;
    width: min(180px, 56vw);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(9, 18, 34, 0.86);
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    box-shadow: 0 14px 26px rgba(2, 8, 20, 0.32);
    padding: 10px;
  }

  .mobile-logout-confirm__text {
    margin: 0 0 8px;
    font-size: 0.82rem;
    color: #dbe8ff;
    text-align: center;
  }

  .mobile-logout-confirm__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .mobile-logout-confirm__btn {
    min-height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 650;
    padding: 0 8px;
  }

  .mobile-logout-confirm__btn--yes {
    border-color: rgba(248, 113, 113, 0.3);
  }

  .mobile-logout-confirm__btn--yes:hover {
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2);
    background: rgba(239, 68, 68, 0.16);
  }
}

/* Mobile topbar: keep account controls out of the app bar (hamburger + title + action only) */
@media (max-width: 840px) {
  .topbar .account-area-top,
  .topbar .app-page-home .account-area-top {
    display: none !important;
  }

  .topbar .mobile-menu-toggle {
    display: inline-flex !important;
    grid-column: 1 !important;
    justify-self: start !important;
  }

  .topbar .mobile-header-action-btn {
    grid-column: 3 !important;
    justify-self: end !important;
  }

  .topbar .topbar-brand {
    grid-column: 2 !important;
  }
}

/* ========== Web Chat — minimal messenger (v2) ========== */
#webChat.web-chat-page--messenger {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 8px 12px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#webChat .web-chat-messenger {
  flex: 1;
  min-height: min(78dvh, 780px);
  max-height: min(78dvh, 780px);
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 24px 56px rgba(2, 6, 23, 0.42),
    0 0 0 1px rgba(0, 245, 212, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

#webChat .web-chat-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 8px 0 2px;
}

#webChat .web-chat-sheet-handle__bar {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 245, 212, 0.35);
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.28);
}

#webChat .web-chat-messenger__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#webChat .web-chat-messenger__back {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#webChat .web-chat-messenger__back:hover {
  border-color: rgba(0, 245, 212, 0.45);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 28px rgba(0, 245, 212, 0.22);
  transform: scale(1.05);
}

#webChat .web-chat-messenger__head-main {
  text-align: left;
  min-width: 0;
}

#webChat .web-chat-messenger__title {
  margin: 0 0 2px;
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-messenger__title {
  color: #ecfdf5;
  text-shadow: 0 0 26px rgba(52, 211, 153, 0.38);
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-messenger__title {
  color: #ecfeff;
  text-shadow: 0 0 28px rgba(34, 211, 238, 0.42);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-messenger__title {
  color: #f5f3ff;
  text-shadow: 0 0 34px rgba(167, 139, 250, 0.48);
}

#webChat .web-chat-messenger__title-icon {
  font-size: 0.95rem;
}

#webChat .web-chat-messenger__status {
  justify-content: flex-start;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.85);
  transition: color 0.35s ease;
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-messenger__status {
  color: rgba(207, 250, 254, 0.88);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-messenger__status {
  color: rgba(221, 214, 254, 0.88);
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-messenger__status-dot {
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.85), 0 0 22px rgba(16, 185, 129, 0.35);
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-messenger__status-dot {
  background: #22d3ee;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.85), 0 0 26px rgba(6, 182, 212, 0.38);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-messenger__status-dot {
  background: #c084fc;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.95), 0 0 28px rgba(139, 92, 246, 0.42);
}

#webChat .web-chat-messenger__body {
  background: transparent;
}

#webChat .web-chat-messages {
  flex: 1;
  min-height: 120px;
  gap: 12px;
  padding: 14px 12px 16px;
  background: transparent;
  transition: background 0.35s ease;
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-messages {
  background: linear-gradient(180deg, rgba(6, 42, 36, 0.5) 0%, rgba(2, 12, 28, 0.12) 45%, transparent 78%);
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-messages {
  background: linear-gradient(180deg, rgba(8, 50, 62, 0.45) 0%, rgba(14, 165, 233, 0.08) 40%, transparent 75%);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-messages {
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.4) 0%, rgba(59, 130, 246, 0.1) 42%, transparent 76%);
}

#webChat .web-chat-bubble {
  border-radius: 16px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-bubble--user {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.32), rgba(16, 185, 129, 0.18));
  border: 1px solid rgba(52, 211, 153, 0.52);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.26),
    0 0 36px rgba(52, 211, 153, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-bubble--bot {
  background: rgba(52, 211, 153, 0.09);
  border: 1px solid rgba(52, 211, 153, 0.22);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 20px rgba(52, 211, 153, 0.08);
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-bubble--user {
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.28), rgba(14, 165, 233, 0.16));
  border: 1px solid rgba(34, 211, 238, 0.52);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.26),
    0 0 38px rgba(34, 211, 238, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-bubble--bot {
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 24px rgba(34, 211, 238, 0.12);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-bubble--user {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.32), rgba(99, 102, 241, 0.18));
  border: 1px solid rgba(167, 139, 250, 0.52);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.28),
    0 0 42px rgba(139, 92, 246, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.14);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-bubble--bot {
  background: rgba(167, 139, 250, 0.09);
  border: 1px solid rgba(167, 139, 250, 0.26);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 28px rgba(139, 92, 246, 0.14);
}

#webChat .web-chat-bubble--bot.web-chat-bubble--welcome {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.92);
}

#webChat .web-chat-welcome-one {
  margin: 0;
  line-height: 1.45;
}

#webChat .web-chat-messenger__footer {
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#webChat .web-chat-mode-static {
  margin: 0;
  padding: 0 2px 2px;
  text-align: center;
}

#webChat .web-chat-mode-static__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
  color: #e2e8f0;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

#webChat .web-chat-mode-pills {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
  gap: 4px;
}

#webChat .web-chat-mode-pill {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 10px;
  font-size: 0.74rem;
  font-weight: 650;
  color: rgba(226, 232, 240, 0.55);
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, opacity 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease,
    transform 0.22s ease;
  text-align: center;
}

#webChat .web-chat-mode-pill:hover:not(.is-active):not(:disabled) {
  color: rgba(240, 253, 250, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 198, 255, 0.2);
  box-shadow: 0 0 18px rgba(0, 198, 255, 0.12);
  transform: translateY(-1px);
}

#webChat .web-chat-mode-pill.is-active {
  color: #ecfeff;
  z-index: 1;
  transform: scale(1.05);
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-mode-pill.is-active {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.35), rgba(16, 185, 129, 0.22));
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow:
    0 0 28px rgba(52, 211, 153, 0.45),
    0 0 44px rgba(16, 185, 129, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-mode-pill.is-active {
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.32), rgba(14, 165, 233, 0.2));
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow:
    0 0 32px rgba(34, 211, 238, 0.42),
    0 0 52px rgba(14, 165, 233, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-mode-pill.is-active {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.38), rgba(99, 102, 241, 0.22));
  border-color: rgba(167, 139, 250, 0.58);
  box-shadow:
    0 0 34px rgba(167, 139, 250, 0.48),
    0 0 56px rgba(139, 92, 246, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

#webChat .web-chat-mode-pill--locked {
  opacity: 0.42;
}

#webChat .web-chat-mode-pill__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
}

#webChat .web-chat-mode-pill__lock {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.72;
  margin-top: 1px;
}

#webChat .web-chat-mode-pill:not(.web-chat-mode-pill--locked) .web-chat-mode-pill__lock {
  display: none;
}

#webChat .web-chat-mode-pill:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

/* Mini tooltip when tapping Auto/OpenAI without Premium (fixed to viewport; clamped on narrow screens) */
.web-chat-premium-tab-tooltip {
  position: fixed;
  z-index: 10060;
  box-sizing: border-box;
  max-width: min(220px, calc(100vw - 16px));
  padding: 7px 11px;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  color: rgba(238, 244, 255, 0.96);
  background: rgba(10, 14, 34, 0.82);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  border: 1px solid rgba(99, 112, 255, 0.42);
  border-radius: 11px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(139, 92, 246, 0.12) inset;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.26s ease;
}

.web-chat-premium-tab-tooltip.is-visible {
  opacity: 1;
}

.web-chat-premium-tab-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(99, 112, 255, 0.5);
  filter: drop-shadow(0 1px 0 rgba(139, 92, 246, 0.25));
}

.web-chat-premium-tab-tooltip--below::after {
  bottom: auto;
  top: -6px;
  border-top: none;
  border-bottom: 6px solid rgba(99, 112, 255, 0.5);
}

#webChat .web-chat-model-lock-banner--slim {
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  box-shadow: none;
}

#webChat .web-chat-openai-usage--slim {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

#webChat .web-chat-openai-usage--slim .web-chat-openai-usage__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.72rem;
  color: rgba(186, 230, 253, 0.88);
  margin-bottom: 5px;
}

#webChat .web-chat-openai-usage--slim .web-chat-openai-usage__counts {
  font-size: 0.78rem;
  color: rgba(248, 250, 252, 0.95);
}

#webChat .web-chat-openai-usage--slim .web-chat-openai-usage__track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
}

#webChat .web-chat-openai-usage--slim .web-chat-openai-usage__fill {
  border-radius: 999px;
}

#webChat .web-chat-openai-usage--slim .web-chat-openai-usage__warn {
  margin: 6px 0 0;
  font-size: 0.7rem;
}

#webChat .web-chat-composer-bar {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  margin-top: 2px;
}

#webChat .web-chat-composer {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 6px;
  border-radius: 999px;
  padding: 4px 8px 4px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-composer:focus-within {
  border-color: rgba(52, 211, 153, 0.58);
  box-shadow:
    0 0 0 2px rgba(52, 211, 153, 0.18),
    0 0 36px rgba(52, 211, 153, 0.32),
    0 0 56px rgba(16, 185, 129, 0.14),
    inset 0 2px 12px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-composer:focus-within {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.18),
    0 0 38px rgba(34, 211, 238, 0.34),
    0 0 58px rgba(14, 165, 233, 0.18),
    inset 0 2px 12px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-composer:focus-within {
  border-color: rgba(167, 139, 250, 0.58);
  box-shadow:
    0 0 0 2px rgba(167, 139, 250, 0.2),
    0 0 42px rgba(139, 92, 246, 0.38),
    0 0 64px rgba(99, 102, 241, 0.15),
    inset 0 2px 12px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#webChat .web-chat-composer textarea,
#webChat #webChatInput {
  width: 100%;
  min-height: 42px;
  max-height: 96px;
  resize: none;
  border-radius: 999px;
  padding: 10px 14px;
  margin: 0;
  border: none;
  background: transparent;
  color: #f8fafc;
  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: 550;
  box-shadow: inset 0 1px 2px rgba(148, 163, 184, 0.08);
}

#webChat #webChatInput::placeholder {
  color: rgba(226, 232, 240, 0.82);
  font-weight: 500;
}

#webChat #webChatInput:focus {
  outline: none;
}

#webChat .web-chat-send {
  flex-shrink: 0;
  min-height: 40px;
  min-width: 40px;
  width: 40px;
  padding: 0;
  border-radius: 999px;
  align-self: center;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #22d3ee 0%, #14b8a6 40%, #22c55e 100%);
  color: #042f2e;
  box-shadow: 0 14px 30px rgba(20, 184, 166, 0.3), 0 0 18px rgba(34, 211, 238, 0.2);
  font-size: 0.76rem;
}

#webChat .web-chat-send--inline {
  position: relative;
  min-height: 36px;
  min-width: 36px;
  width: 36px;
  padding: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  border: 1px solid rgba(0, 245, 212, 0.4);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(0, 245, 212, 0.85), rgba(0, 198, 255, 0.75));
  color: #042f2e;
  box-shadow:
    0 0 20px rgba(0, 245, 212, 0.45),
    0 8px 20px rgba(0, 198, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

#webChat .web-chat-send:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

#webChat .web-chat-send--inline:hover:not(:disabled) {
  transform: scale(1.05);
  filter: brightness(1.08);
  box-shadow:
    0 0 32px rgba(0, 245, 212, 0.55),
    0 10px 24px rgba(0, 198, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

#webChat .web-chat-send:active:not(:disabled) {
  transform: scale(0.97);
}

#webChat .web-chat-send--inline:active:not(:disabled) {
  transform: scale(0.96);
  filter: brightness(0.98);
}

#webChat .web-chat-chip-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 2px;
  max-height: 2.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

#webChat .web-chat-chip-strip::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#webChat .web-chat-chip-strip--recent {
  margin-top: 2px;
}

#webChat .web-chat-chip-strip__chip,
#webChat .web-chat-chip-strip__chip--recent {
  flex: 0 0 auto;
  max-width: min(220px, 72vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 8px 14px;
  min-height: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e0f2fe;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

#webChat .web-chat-chip-strip__chip:hover,
#webChat .web-chat-chip-strip__chip--recent:hover {
  border-color: rgba(0, 245, 212, 0.4);
  background: rgba(0, 245, 212, 0.1);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 198, 255, 0.18);
}

#webChat .web-chat-bubble--user {
  background: rgba(0, 245, 212, 0.14);
  border-color: rgba(0, 245, 212, 0.32);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.18),
    0 0 20px rgba(0, 198, 255, 0.12);
}

#webChat .web-chat-bubble--bot {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

#webChat .web-chat-typing span {
  background: #67e8f9;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.36);
}

#webChat .web-chat-recent-wrap {
  margin-top: 2px;
}

#webChat .web-chat-recent-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#webChat .web-chat-recent-inner.hidden {
  display: none !important;
}

#webChat .web-chat-recent__label {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
}

#webChat .web-chat-quota--slim {
  padding: 4px 12px 0;
  font-size: 0.72rem;
  text-align: center;
}

#webChat .web-chat-soft-lock--slim {
  margin: 6px 10px 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 121, 0.22);
  background: rgba(30, 27, 60, 0.42);
  font-size: 0.78rem;
  gap: 8px;
}

#webChat .web-chat-soft-lock__text {
  flex: 1;
  min-width: 0;
}

#webChat .web-chat-soft-lock__cta {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 0.75rem;
}

#webChat .web-chat-chip-strip.web-chat-quick-actions--disabled {
  opacity: 0.38;
  pointer-events: none;
}

@media (max-width: 560px) {
  #webChat .web-chat-composer-bar {
    gap: 0;
  }

  #webChat .web-chat-send:not(.web-chat-send--inline) {
    padding: 0 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 840px) {
  #webChat .web-chat-messenger {
    min-height: min(calc(100dvh - 112px), 820px) !important;
    max-height: none !important;
  }

  #webChat .web-chat-messages {
    padding-bottom: 12px !important;
  }
}

/* ========== Pricing Lite redesign ========== */
.pricing-lite-hero {
  padding-bottom: 10px;
}

.pricing-lite-hero .premium-hero-lead {
  max-width: 30rem;
}

.pricing-lite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.pricing-lite-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pricing-lite-billing-switch {
  margin-top: 8px;
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  padding: 3px;
  background: rgba(255, 255, 255, 0.03);
}

.pricing-lite-billing-btn {
  border: none;
  background: transparent;
  color: #cbd5e1;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
}

.pricing-lite-billing-btn.is-active {
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), rgba(99, 102, 241, 0.3));
}

.pricing-lite-compare-btn {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.03);
  color: #dbeafe;
  min-height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
}

.pricing-lite-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s ease, opacity 0.2s ease;
  animation: pricingLiteCardIn 240ms ease both;
  min-height: 100%;
}

.pricing-lite-card--free {
  justify-content: flex-start;
}

.pricing-lite-card--featured,
.pricing-lite-card[data-lite-plan="standard"].is-selected {
  border-color: rgba(167, 139, 250, 0.42);
  background: linear-gradient(155deg, rgba(88, 28, 135, 0.22), rgba(15, 23, 42, 0.88));
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.1), 0 16px 36px rgba(0, 0, 0, 0.24);
}

.pricing-lite-card:nth-child(1) {
  animation-delay: 20ms;
}

.pricing-lite-card:nth-child(2) {
  animation-delay: 80ms;
}

.pricing-lite-card:nth-child(3) {
  animation-delay: 150ms;
}

.pricing-lite-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pricing-lite-card__head h3 {
  margin: 0;
  font-size: 1rem;
}

.pricing-lite-badge {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
}

.pricing-lite-badge--highlight {
  border-color: rgba(167, 139, 250, 0.58);
  color: #ddd6fe;
  background: rgba(124, 58, 237, 0.22);
}

.pricing-lite-price {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 800;
  color: #f8fafc;
}

.pricing-lite-price span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #a5b4fc;
}

.pricing-lite-price #premiumLiteStandardPriceMain,
.pricing-lite-price #premiumLitePremiumPriceMain {
  display: inline-block;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.pricing-lite-subline {
  margin: -4px 0 0;
  font-size: 0.72rem;
  color: #c7d2fe;
}

.pricing-lite-save {
  margin: -2px 0 0;
  font-size: 0.72rem;
  color: #67e8f9;
}

.pricing-lite-benefits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  flex: 1;
}

.pricing-lite-benefits li {
  font-size: 0.84rem;
  color: #dbeafe;
}

.pricing-lite-cta {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
}

.pricing-lite-card--premium {
  border-color: rgba(167, 139, 250, 0.45);
  background: linear-gradient(155deg, rgba(88, 28, 135, 0.32), rgba(15, 23, 42, 0.86));
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.1), 0 20px 44px rgba(0, 0, 0, 0.28);
}

.pricing-lite-card--premium .pricing-lite-cta--premium {
  transform: scale(1.02);
}

.pricing-lite-cta--premium {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.65), rgba(34, 211, 238, 0.48));
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.32), 0 10px 26px rgba(2, 8, 22, 0.34);
}

.pricing-lite-social-proof {
  margin: 0 0 12px;
  font-size: 0.72rem;
  color: #c4b5fd;
}

.pricing-lite-plans--yearly .pricing-lite-card[data-lite-plan="standard"] .pricing-lite-badge,
.pricing-lite-plans--yearly .pricing-lite-card[data-lite-plan="premium"] .pricing-lite-badge {
  border-color: rgba(45, 212, 191, 0.58);
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.14);
}

.pricing-lite-plans--yearly .pricing-lite-card[data-lite-plan="premium"] {
  border-color: rgba(20, 184, 166, 0.6);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.32), 0 0 30px rgba(45, 212, 191, 0.2), 0 22px 42px rgba(2, 8, 20, 0.36);
}

.pricing-lite-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(125, 211, 252, 0.42);
  box-shadow: 0 20px 38px rgba(2, 8, 20, 0.3);
}

.pricing-lite-card.is-selected {
  border-color: rgba(56, 189, 248, 0.62);
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.26), 0 24px 44px rgba(2, 8, 20, 0.34);
}

.pricing-lite-grid.has-selected .pricing-lite-card:not(.is-selected) {
  opacity: 0.55;
  transform: scale(0.985);
}

.pricing-lite-grid.has-selected .pricing-lite-card.is-selected {
  opacity: 1;
}

.pricing-lite-card--premium.is-focus {
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.3), 0 0 28px rgba(167, 139, 250, 0.26), 0 26px 46px rgba(2, 8, 20, 0.35);
}

.pricing-lite-compare {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.54);
  overflow: hidden;
}

.pricing-lite-compare__head,
.pricing-lite-compare__row {
  display: grid;
  grid-template-columns: 1.8fr repeat(2, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
}

.pricing-lite-compare__head {
  background: rgba(56, 189, 248, 0.1);
  font-size: 0.74rem;
  font-weight: 700;
}

.pricing-lite-compare__row {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 0.78rem;
}

.pricing-lite-why {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pricing-lite-why__item {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.5);
  padding: 11px 10px;
  text-align: center;
}

.pricing-lite-why__item span {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.pricing-lite-why__item p {
  margin: 0;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.pricing-lite-trust {
  margin-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 12px;
  padding-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  row-gap: 12px;
}

.pricing-lite-trust p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.52;
  color: #cbd5e1;
}

.pricing-lite-sticky-cta {
  display: none;
}

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

@media (max-width: 840px) {
  .pricing-lite-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pricing-lite-compare-btn {
    width: 100%;
  }

  .pricing-lite-grid {
    grid-template-columns: 1fr;
  }

  .pricing-lite-why {
    grid-template-columns: 1fr;
  }

  .pricing-lite-compare__head,
  .pricing-lite-compare__row {
    grid-template-columns: 1.4fr repeat(2, 1fr);
    font-size: 0.74rem;
  }

  .pricing-lite-sticky-cta {
    display: inline-flex;
    position: sticky;
    bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 132px);
    width: 100%;
    min-height: 44px;
    margin-top: 14px;
    margin-bottom: 4px;
    justify-content: center;
    z-index: 4;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.75), rgba(34, 211, 238, 0.6));
    box-shadow:
      0 -8px 20px rgba(2, 8, 20, 0.45),
      0 0 18px rgba(167, 139, 250, 0.26),
      0 10px 24px rgba(2, 8, 20, 0.3);
  }

  #bot .pricing-lite-trust {
    margin-bottom: 4px;
  }
}

/* ========== Daily Planner (floating mini panel) ========== */
.daily-planner-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px) + 14px);
  /* Stacked above chat FAB: shared base + chat column + intentional vertical gap (see .web-chat-fab bottom) */
  bottom: calc(max(40px, env(safe-area-inset-bottom, 0px) + 28px) + 58px + 28px);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(186, 230, 253, 0.42);
  background:
    radial-gradient(circle at 28% 22%, rgba(224, 242, 254, 0.5) 0%, rgba(224, 242, 254, 0) 38%),
    radial-gradient(circle at 78% 88%, rgba(79, 70, 229, 0.5) 0%, rgba(79, 70, 229, 0) 45%),
    linear-gradient(155deg, #0ea5e9 0%, #22d3ee 42%, #6366f1 100%);
  color: #ecfeff;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1300;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2), 0 7px 12px rgba(3, 7, 18, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -10px 18px rgba(14, 116, 144, 0.28),
    0 14px 24px rgba(2, 8, 20, 0.36),
    0 0 24px rgba(34, 211, 238, 0.22);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.22s ease;
}

.daily-planner-fab:hover {
  transform: translateY(-2px) scale(1.05);
  filter: saturate(1.08) brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -10px 18px rgba(14, 116, 144, 0.32),
    0 18px 30px rgba(2, 8, 20, 0.42),
    0 0 30px rgba(34, 211, 238, 0.35);
}

.daily-planner-fab:active {
  transform: translateY(0) scale(0.94);
}

.daily-planner-fab.is-locked {
  filter: grayscale(0.22) saturate(0.75);
  opacity: 0.84;
}

.daily-planner-fab.is-locked::before {
  content: "🔒";
  position: absolute;
  top: -4px;
  right: -2px;
  font-size: 0.68rem;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(2, 8, 20, 0.45);
}

.daily-planner-fab::after,
.web-chat-fab::after,
.discord-fab::after {
  content: attr(data-float-label);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 620;
  line-height: 1;
  padding: 6px 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.daily-planner-fab:hover::after,
.daily-planner-fab:focus-visible::after,
.web-chat-fab:hover::after,
.web-chat-fab:focus-visible::after,
.discord-fab:hover::after,
.discord-fab:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.home-social-card {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: linear-gradient(150deg, rgba(88, 101, 242, 0.18), rgba(30, 41, 59, 0.54));
  box-shadow: 0 16px 30px rgba(2, 8, 20, 0.24);
  padding: 12px 14px 14px;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.home-social-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #eef2ff;
}

.home-social-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.home-social-card__link {
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.home-social-card__link:hover {
  transform: translateY(-3px);
  filter: brightness(1.06);
}

.home-social-card__link.social-community-link--inactive:hover {
  transform: none;
  filter: grayscale(0.35) brightness(1);
}

.home-social-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(129, 140, 248, 0.4);
  background: rgba(15, 23, 42, 0.4);
  color: #eef2ff;
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.28);
}

.home-social-card__link--discord .home-social-card__icon {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(145deg, #5865f2 0%, #4752c4 62%, #3c4598 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 28px rgba(88, 101, 242, 0.42),
    0 0 26px rgba(129, 140, 248, 0.48);
}

.home-social-card__link--tiktok .home-social-card__icon {
  border-color: rgba(37, 244, 238, 0.35);
  background: linear-gradient(165deg, #000000 0%, #161823 92%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 28px rgba(254, 44, 85, 0.2),
    0 0 24px rgba(37, 244, 238, 0.32),
    0 0 14px rgba(254, 44, 85, 0.2);
}
.home-social-card__link--tiktok .home-social-card__icon--tiktok svg {
  filter: drop-shadow(1.35px 0.85px 0 rgba(254, 44, 85, 0.85))
    drop-shadow(-1.25px -0.75px 0 rgba(37, 244, 238, 0.75));
}

.home-social-card__link--youtube .home-social-card__icon {
  border-color: rgba(255, 200, 200, 0.35);
  background: linear-gradient(145deg, #ff0303 0%, #c40000 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 28px rgba(239, 68, 68, 0.38),
    0 0 24px rgba(255, 0, 51, 0.4);
}

.home-social-card__link--gmail .home-social-card__icon {
  border-color: rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(145deg, #ffffff 0%, #f8fafc 38%, rgba(227, 242, 253, 0.92) 100%);
  color: #ea4335;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 30px rgba(234, 67, 53, 0.48),
    0 0 24px rgba(66, 133, 244, 0.42),
    0 0 34px rgba(234, 67, 53, 0.45);
}
.home-social-card__link--gmail .home-social-card__icon svg {
  filter: drop-shadow(0 0 6px rgba(234, 67, 53, 0.7)) drop-shadow(0 0 10px rgba(66, 133, 244, 0.4));
}

.discord-fab {
  position: fixed;
  left: max(20px, env(safe-area-inset-left, 0px) + 14px);
  bottom: max(28px, env(safe-area-inset-bottom, 0px) + 20px);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.45);
  background: linear-gradient(145deg, rgba(88, 101, 242, 0.9), rgba(99, 102, 241, 0.78), rgba(56, 189, 248, 0.68));
  color: #eef2ff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1301;
  box-shadow: 0 16px 28px rgba(30, 41, 59, 0.34), 0 0 26px rgba(99, 102, 241, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.24s ease;
}

.discord-fab:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
}

.discord-fab__icon {
  font-size: 1.15rem;
}

.discord-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.daily-planner-modal-overlay.modal {
  align-items: flex-end;
  padding: max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left, 0px));
  background: rgba(2, 6, 18, 0.86);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

@media (min-width: 561px) {
  .daily-planner-modal-overlay.modal {
    align-items: center;
    padding: 24px max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px))
      max(16px, env(safe-area-inset-left, 0px));
  }
}

.daily-planner-modal.modal-content {
  width: min(520px, 100%);
  max-width: 100%;
  max-height: min(88dvh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  padding: clamp(16px, 3.5vw, 22px) clamp(14px, 3.2vw, 20px) clamp(14px, 3vw, 18px);
  border-radius: clamp(22px, 4.5vw, 28px);
  background:
    linear-gradient(165deg, rgba(15, 23, 42, 0.94) 0%, rgba(8, 11, 28, 0.97) 48%, rgba(6, 10, 26, 0.99) 100%);
  border: 1px solid rgba(129, 140, 248, 0.32);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.12),
    0 0 40px rgba(99, 102, 241, 0.22),
    0 0 64px rgba(56, 189, 248, 0.12),
    0 24px 48px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.daily-planner-modal .modal-header.daily-planner-modal__header {
  margin-bottom: 14px;
  align-items: flex-start;
  gap: 12px;
}

.daily-planner-modal__title-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.daily-planner-modal__icon-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #f5f3ff;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.95) 0%, rgba(99, 102, 241, 0.9) 45%, rgba(56, 189, 248, 0.75) 100%);
  border: 1px solid rgba(196, 181, 253, 0.45);
  box-shadow:
    0 0 24px rgba(139, 92, 246, 0.45),
    0 8px 20px rgba(15, 23, 42, 0.4);
}

.daily-planner-modal__titles {
  min-width: 0;
}

.daily-planner-modal__header h2 {
  margin: 0 0 4px;
  font-size: clamp(1.15rem, 3.8vw, 1.42rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
  line-height: 1.2;
}

.daily-planner-modal__tagline {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(203, 213, 225, 0.88);
  font-weight: 500;
  max-width: 36ch;
}

.daily-planner-close.close-button {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.daily-planner-close.close-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow:
    0 0 20px rgba(139, 92, 246, 0.35),
    0 6px 18px rgba(0, 0, 0, 0.35);
}

.daily-planner-modal__composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.daily-planner-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.daily-planner-field--task {
  padding: 1px;
  border-radius: 18px;
  background: linear-gradient(125deg, #a855f7 0%, #6366f1 42%, #22d3ee 100%);
  box-shadow:
    0 0 28px rgba(168, 85, 247, 0.28),
    0 0 40px rgba(34, 211, 238, 0.14);
}

.daily-planner-field--task input[type="text"] {
  width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px 14px 12px 42px;
  border-radius: 17px;
  border: none;
  background: rgba(8, 12, 28, 0.92);
  color: #f1f5f9;
  font-size: 0.92rem;
  font-weight: 500;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.daily-planner-field--task input[type="text"]::placeholder {
  color: rgba(148, 163, 184, 0.75);
  font-weight: 400;
}

.daily-planner-field__sparkle {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: #c4b5fd;
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.8);
  pointer-events: none;
  z-index: 1;
}

.daily-planner-modal__composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.daily-planner-field--time {
  border-radius: 16px;
  padding: 1px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.daily-planner-field--time input[type="time"] {
  flex: 1;
  min-width: 0;
  margin: 0;
  min-height: 46px;
  padding: 10px 12px 10px 42px;
  border: none;
  border-radius: 15px;
  background: rgba(12, 16, 36, 0.75);
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  color-scheme: dark;
  outline: none;
}

.daily-planner-field__clock {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(125, 211, 252, 0.9);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}

.daily-planner-add-btn.save-button,
.daily-planner-modal__composer #dailyPlannerAddBtn {
  min-height: 46px;
  padding: 0 clamp(16px, 4vw, 22px);
  border-radius: 16px;
  border: none;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #f8fafc;
  cursor: pointer;
  background: linear-gradient(120deg, #a855f7 0%, #6366f1 38%, #0ea5e9 68%, #22c55e 100%);
  background-size: 140% 100%;
  box-shadow:
    0 0 28px rgba(168, 85, 247, 0.45),
    0 6px 22px rgba(34, 197, 94, 0.22),
    0 8px 24px rgba(15, 23, 42, 0.45);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.22s ease;
}

.daily-planner-add-btn:hover {
  filter: brightness(1.07) saturate(1.05);
  transform: translateY(-1px);
  box-shadow:
    0 0 36px rgba(139, 92, 246, 0.55),
    0 10px 28px rgba(34, 197, 94, 0.28),
    0 12px 32px rgba(0, 0, 0, 0.5);
}

.daily-planner-add-btn:active {
  transform: translateY(0);
}

.daily-planner-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  max-height: min(42dvh, 340px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.45) transparent;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.daily-planner-list::-webkit-scrollbar {
  width: 5px;
}

.daily-planner-list::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 999px;
}

.daily-planner-empty {
  margin: 4px 0 2px;
  padding: 14px 12px;
  border-radius: 16px;
  text-align: center;
  color: rgba(203, 213, 225, 0.88);
  border: 1px dashed rgba(139, 92, 246, 0.35);
  background: rgba(15, 23, 42, 0.5);
  font-size: 0.84rem;
}

.daily-planner-progress {
  margin: 2px 0 10px;
  flex-shrink: 0;
}

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

.daily-planner-progress__label {
  font-size: 0.78rem;
  font-weight: 650;
  color: rgba(226, 232, 240, 0.92);
}

.daily-planner-progress__pct {
  font-size: 0.78rem;
  font-weight: 800;
  color: #22d3ee;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
}

.daily-planner-progress__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.85);
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.daily-planner-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  position: relative;
  background: linear-gradient(90deg, #a855f7 0%, #6366f1 45%, #22d3ee 100%);
  box-shadow:
    0 0 16px rgba(168, 85, 247, 0.55),
    0 0 24px rgba(34, 211, 238, 0.35);
  transition: width 0.28s ease;
}

.daily-planner-progress__fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ecfeff;
  box-shadow: 0 0 14px 4px rgba(34, 211, 238, 0.85), 0 0 20px rgba(168, 85, 247, 0.5);
}

.daily-planner-group {
  display: grid;
  gap: 8px;
}

.daily-planner-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  background: transparent;
  color: inherit;
  padding: 2px 0 4px;
  width: 100%;
  text-align: left;
}

.daily-planner-group__head h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.daily-planner-group__head--pending h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.85);
}

.daily-planner-group__head--pending h3 {
  color: #d8b4fe;
}

.daily-planner-group__head--completed h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.75);
}

.daily-planner-group__head--completed h3 {
  color: #86efac;
}

.daily-planner-group__count {
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.82);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.daily-planner-group__chev {
  font-size: 0.65rem;
  opacity: 0.85;
}

.daily-planner-group__toggle {
  cursor: pointer;
}

.daily-planner-group__body {
  display: grid;
  gap: 10px;
}

.daily-planner-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: clamp(16px, 3vw, 20px);
  padding: 12px 14px;
  border: 1px solid rgba(129, 140, 248, 0.22);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.28);
  contain: layout style paint;
  transition: transform 0.2s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.daily-planner-item:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow:
    0 12px 32px rgba(2, 6, 23, 0.45),
    0 0 28px rgba(99, 102, 241, 0.15);
}

.daily-planner-item--new {
  animation: dailyPlannerItemIn 220ms ease;
}

.daily-planner-item--moved {
  animation: dailyPlannerItemDoneMove 260ms ease;
}

.daily-planner-item__toggle {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  border: 2px solid rgba(167, 139, 250, 0.65);
  background: rgba(15, 23, 42, 0.65);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
  color: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  align-self: center;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  padding: 0;
  transform: translateZ(0);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.daily-planner-item__toggle:hover {
  border-color: rgba(196, 181, 253, 0.85);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.daily-planner-item__toggle-check {
  opacity: 0;
  transform: scale(0.65);
  color: #ecfdf5;
  transition: opacity 0.16s ease, transform 0.18s ease;
}

.daily-planner-item__text-wrap {
  min-width: 0;
}

.daily-planner-item__text {
  display: block;
  color: #f8fafc;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.24s ease, opacity 0.22s ease;
}

.daily-planner-item__meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.daily-planner-item__time {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.45);
  background: rgba(8, 51, 68, 0.45);
}

.daily-planner-item__bell {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(234, 179, 8, 0.35);
  background: rgba(30, 27, 15, 0.5);
  color: #fde047;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.daily-planner-item__bell.is-on {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.65);
  background: rgba(250, 204, 21, 0.15);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.35);
}

.daily-planner-item__bell.is-bounce {
  animation: dailyPlannerBellBounce 250ms ease;
}

.daily-planner-item__kebab {
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
}

.daily-planner-item__kebab-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.75);
  display: block;
}

.daily-planner-item__kebab:hover {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.25);
}

.daily-planner-item.is-done {
  opacity: 0.88;
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(15, 23, 42, 0.42);
}

.daily-planner-item.is-done .daily-planner-item__toggle {
  border-color: rgba(34, 197, 94, 0.85);
  background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%);
  box-shadow:
    0 0 18px rgba(34, 197, 94, 0.55),
    0 6px 16px rgba(6, 40, 20, 0.35);
  color: #ecfdf5;
}

.daily-planner-item.is-done .daily-planner-item__toggle-check {
  opacity: 1;
  transform: scale(1);
}

.daily-planner-item.is-done .daily-planner-item__text {
  color: rgba(148, 163, 184, 0.95);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(34, 197, 94, 0.55);
}

.daily-planner-modal__foot-deco {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 4px;
  flex-shrink: 0;
}

.daily-planner-modal__foot-line {
  flex: 1;
  max-width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.55), transparent);
}

.daily-planner-modal__foot-star {
  font-size: 0.75rem;
  color: #c4b5fd;
  text-shadow: 0 0 14px rgba(167, 139, 250, 0.75);
}

@keyframes dailyPlannerBellBounce {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.16);
  }
  100% {
    transform: scale(1);
  }
}

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

@keyframes dailyPlannerItemDoneMove {
  from {
    transform: translateY(-4px);
    opacity: 0.55;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .daily-planner-fab {
    width: 44px;
    height: 44px;
    right: calc(max(20px, env(safe-area-inset-right, 0px) + 12px) + 4px);
  }

  .daily-planner-modal-overlay.modal {
    align-items: flex-end;
  }

  .daily-planner-modal.modal-content {
    width: 100%;
    max-height: min(92dvh, 900px);
    border-radius: clamp(20px, 5vw, 26px) clamp(20px, 5vw, 26px) 0 0;
    padding: 16px 14px max(14px, env(safe-area-inset-bottom, 0px));
  }

  .daily-planner-modal__composer-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .daily-planner-modal__composer #dailyPlannerAddBtn,
  .daily-planner-add-btn {
    width: 100%;
    min-height: 48px;
  }

  .daily-planner-list {
    max-height: min(38dvh, 280px);
  }

  .daily-planner-modal__title-block {
    gap: 10px;
  }

  .daily-planner-modal__icon-badge {
    width: 40px;
    height: 40px;
  }
}

/* ========== Floating Web Chat (Messenger-like) ========== */
.web-chat-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px) + 14px);
  bottom: max(40px, env(safe-area-inset-bottom, 0px) + 28px);
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.5);
  background:
    radial-gradient(circle at 27% 20%, rgba(224, 242, 254, 0.56) 0%, rgba(224, 242, 254, 0) 36%),
    radial-gradient(circle at 80% 86%, rgba(139, 92, 246, 0.55) 0%, rgba(139, 92, 246, 0) 42%),
    linear-gradient(155deg, #0ea5e9 0%, #22d3ee 45%, #6366f1 100%);
  color: #f8fbff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1301;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 -12px 20px rgba(37, 99, 235, 0.26),
    0 16px 30px rgba(2, 8, 20, 0.38),
    0 0 28px rgba(34, 211, 238, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.24s ease;
  animation: webChatFabPulse 2.7s ease-in-out infinite;
}

.web-chat-fab::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  opacity: 0.55;
  animation: webChatFabRing 2.2s ease-out infinite;
}

.web-chat-fab.is-teasing {
  transform: scale(1.06);
}

.web-chat-fab:hover {
  transform: translateY(-2px) scale(1.06);
  filter: saturate(1.08) brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -12px 20px rgba(37, 99, 235, 0.3),
    0 20px 36px rgba(2, 8, 20, 0.44),
    0 0 36px rgba(34, 211, 238, 0.4);
}

.web-chat-fab:active {
  transform: translateY(0) scale(0.94);
}

.web-chat-fab__icon {
  font-size: 1.2rem;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2), 0 7px 12px rgba(2, 8, 20, 0.35);
  filter: drop-shadow(0 2px 7px rgba(2, 8, 20, 0.34));
  transform: translateY(-0.5px);
}

.web-chat-fab__active-dot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #bbf7d0 0%, #22c55e 55%, #16a34a 100%);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.9), 0 0 20px rgba(34, 197, 94, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.85);
  animation: webChatActiveDot 1.8s ease-in-out infinite;
}

.web-chat-fab__active-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(134, 239, 172, 0.55);
  animation: webChatActiveDotRing 2.1s ease-out infinite;
}

.web-chat-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.web-chat-fab-tip {
  position: fixed;
  right: max(88px, env(safe-area-inset-right, 0px) + 82px);
  bottom: max(42px, env(safe-area-inset-bottom, 0px) + 32px);
  z-index: 1301;
  max-width: min(250px, 62vw);
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  padding: 8px 12px;
  font-size: 0.78rem;
  box-shadow: 0 10px 20px rgba(2, 8, 20, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}


#webChat.web-chat-drawer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

#webChat.web-chat-drawer::before,
#webChat.web-chat-drawer::after {
  display: none;
}

#webChat.web-chat-drawer.hidden {
  display: none !important;
}

#webChat.web-chat-drawer.web-chat-drawer--active {
  opacity: 1;
  pointer-events: auto;
}

#webChat.web-chat-drawer.web-chat-page--messenger {
  max-width: none;
  margin: 0;
  padding: 0;
  flex: none;
  min-height: 0;
}

#webChat.web-chat-drawer .web-chat-messenger {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  max-width: 420px;
  min-height: min(520px, 80vh);
  max-height: min(80vh, 760px);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  box-shadow:
    0 24px 48px rgba(2, 8, 20, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateY(10px) scale(0.97);
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms ease;
  transform-origin: bottom right;
}

#webChat.web-chat-drawer.web-chat-drawer--active .web-chat-messenger {
  transform: translateY(0) scale(1);
  opacity: 1;
}

body.web-chat-drawer-open {
  overscroll-behavior: none;
}

body.web-chat-drawer-open .web-chat-fab,
body.web-chat-drawer-open #webChatFab,
body.web-chat-drawer-open .web-chat-fab-tip,
body.web-chat-drawer-open #webChatFabTip {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

body.web-chat-drawer-open .site-footer {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

/* Mobile / APK: hide floating controls while chat drawer is open (FAB z-index > drawer) */
@media (max-width: 840px) {
  .web-chat-fab,
  #webChatFab,
  .daily-planner-fab,
  #dailyPlannerFab,
  .web-chat-fab-tip,
  #webChatFabTip {
    transition:
      transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 260ms ease,
      visibility 0s linear 280ms;
  }

  body.web-chat-drawer-open .web-chat-fab,
  body.web-chat-drawer-open #webChatFab,
  body.web-chat-drawer-open .daily-planner-fab,
  body.web-chat-drawer-open #dailyPlannerFab,
  body.web-chat-drawer-open .web-chat-fab-tip,
  body.web-chat-drawer-open #webChatFabTip {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translate3d(115%, 0, 0) scale(0.92);
    animation: none;
    transition:
      transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 260ms ease,
      visibility 0s linear 0s;
  }

  body.web-chat-drawer-open .web-chat-fab::before,
  body.web-chat-drawer-open .web-chat-fab::after,
  body.web-chat-drawer-open .daily-planner-fab::after {
    opacity: 0;
    animation: none;
  }
}

@media (max-width: 840px) and (prefers-reduced-motion: reduce) {
  body.web-chat-drawer-open .web-chat-fab,
  body.web-chat-drawer-open #webChatFab,
  body.web-chat-drawer-open .daily-planner-fab,
  body.web-chat-drawer-open #dailyPlannerFab,
  body.web-chat-drawer-open .web-chat-fab-tip,
  body.web-chat-drawer-open #webChatFabTip {
    transform: none;
  }
}

@keyframes webChatFabPulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.56),
      inset 0 -12px 20px rgba(37, 99, 235, 0.26),
      0 16px 30px rgba(2, 8, 20, 0.38),
      0 0 22px rgba(34, 211, 238, 0.24);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.6),
      inset 0 -12px 20px rgba(37, 99, 235, 0.3),
      0 18px 32px rgba(2, 8, 20, 0.42),
      0 0 34px rgba(34, 211, 238, 0.4);
  }
}

@keyframes webChatFabRing {
  0% {
    transform: scale(0.94);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}

@keyframes webChatActiveDot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.82;
  }
}

@keyframes webChatActiveDotRing {
  0% {
    transform: scale(0.9);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

@keyframes webChatFabShake {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-2px);
  }
  60% {
    transform: translateX(2px);
  }
}

.web-chat-fab.web-chat-fab--shake {
  animation: webChatFabPulse 2.7s ease-in-out infinite, webChatFabShake 300ms ease-in-out;
}

@media (max-width: 840px) {
  .discord-fab {
    width: 52px;
    height: 52px;
    left: max(18px, env(safe-area-inset-left, 0px) + 10px);
    bottom: calc(max(30px, env(safe-area-inset-bottom, 0px) + 18px) + 44px);
  }

  .web-chat-fab {
    width: 54px;
    height: 54px;
    right: calc(max(20px, env(safe-area-inset-right, 0px) + 12px) + 4px);
  }

  .web-chat-fab-tip {
    right: max(80px, env(safe-area-inset-right, 0px) + 76px);
    font-size: 0.74rem;
  }

  .daily-planner-fab {
    width: 44px;
    height: 44px;
    right: calc(max(20px, env(safe-area-inset-right, 0px) + 12px) + 4px);
  }

  #webChat.web-chat-drawer .web-chat-messenger {
    width: auto !important;
    min-height: min(62dvh, 520px) !important;
    max-height: min(78dvh, 580px) !important;
    border-radius: 20px 20px 12px 12px !important;
  }
}

body.floating-scrolled .web-chat-fab,
body.floating-scrolled .daily-planner-fab,
body.floating-scrolled .discord-fab {
  opacity: 0.78;
}

body.floating-scrolled .web-chat-fab:hover,
body.floating-scrolled .daily-planner-fab:hover,
body.floating-scrolled .discord-fab:hover {
  opacity: 1;
}

@media (max-width: 840px) {
  body.web-chat-drawer-open.floating-scrolled .web-chat-fab,
  body.web-chat-drawer-open.floating-scrolled #webChatFab,
  body.web-chat-drawer-open.floating-scrolled .daily-planner-fab,
  body.web-chat-drawer-open.floating-scrolled #dailyPlannerFab,
  body.web-chat-drawer-open.floating-scrolled .web-chat-fab-tip,
  body.web-chat-drawer-open.floating-scrolled #webChatFabTip {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translate3d(115%, 0, 0) scale(0.92);
    animation: none;
  }
}

/* ========== My Notes warm redesign ========== */
#notes-all .page-shell--notes {
  position: relative;
}

#notes-all .page-shell--notes::before {
  content: "";
  position: absolute;
  inset: -10px -4px auto -4px;
  height: 220px;
  border-radius: 26px;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 26%, rgba(251, 146, 60, 0.18), transparent 52%),
    radial-gradient(circle at 78% 18%, rgba(167, 139, 250, 0.18), transparent 50%),
    radial-gradient(circle at 48% 72%, rgba(56, 189, 248, 0.1), transparent 58%);
  filter: blur(4px);
}

#notes-all .page-header h2 {
  font-weight: 760;
  letter-spacing: -0.015em;
}

#notes-all .notes-all-intro {
  max-width: 56ch;
  opacity: 0.9;
  color: #dbe6f5;
}

#notes-all .notes-toolbar {
  border: 1px solid rgba(251, 146, 60, 0.16);
  background: linear-gradient(165deg, rgba(251, 146, 60, 0.08), rgba(30, 41, 59, 0.38));
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.2);
}

#notes-all .notes-search-input,
#notes-all .notes-select-input {
  border-radius: 16px;
  border-color: rgba(244, 114, 182, 0.14);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.48));
}

#notes-all .notes-search-input:focus,
#notes-all .notes-select-input:focus {
  border-color: rgba(251, 146, 60, 0.4);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.14), 0 0 20px rgba(249, 115, 22, 0.1);
}

#notes-all .add-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.62), rgba(147, 51, 234, 0.58));
  border-color: rgba(125, 211, 252, 0.42);
  box-shadow: 0 12px 24px rgba(30, 64, 175, 0.26), 0 0 20px rgba(168, 85, 247, 0.2);
}

#notes-all .add-button:hover {
  box-shadow: 0 16px 28px rgba(30, 64, 175, 0.3), 0 0 28px rgba(168, 85, 247, 0.28);
}

#notes-all .note-card {
  border-radius: 24px;
  border-color: rgba(148, 163, 184, 0.2);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(30, 41, 59, 0.68));
  box-shadow: 0 16px 30px rgba(2, 8, 20, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#notes-all .note-card:hover {
  border-color: rgba(251, 146, 60, 0.32);
  box-shadow: 0 18px 34px rgba(2, 8, 20, 0.28), 0 0 24px rgba(251, 146, 60, 0.12);
}

#notes-all .note-card-inner {
  padding: 24px 22px 20px;
}

#notes-all .note-card-title {
  font-weight: 720;
  letter-spacing: -0.014em;
}

#notes-all .note-card-text {
  opacity: 0.94;
}

#notes-all .note-category-badge {
  border-radius: 999px;
  padding: 5px 11px;
  border-width: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 6px 14px rgba(2, 8, 20, 0.16);
}

#notes-all .note-category-badge--warm {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.22), rgba(249, 115, 22, 0.12));
}

#notes-all .note-category-badge--cool {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(59, 130, 246, 0.12));
}

#notes-all .note-category-badge--fresh {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(16, 185, 129, 0.12));
}

#allNotesList.notes-list--grid .note-card {
  animation: myNotesCardIn 240ms ease both;
}

#allNotesList.notes-list--grid .note-card:nth-child(1) { animation-delay: 20ms; }
#allNotesList.notes-list--grid .note-card:nth-child(2) { animation-delay: 60ms; }
#allNotesList.notes-list--grid .note-card:nth-child(3) { animation-delay: 100ms; }
#allNotesList.notes-list--grid .note-card:nth-child(4) { animation-delay: 140ms; }

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

/* ========== Settings dashboard redesign ========== */
.settings-layout--dashboard {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.settings-nav-card,
.settings-content-card {
  background: linear-gradient(165deg, rgba(12, 22, 40, 0.64), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  padding: 12px;
}

.settings-content-card {
  min-height: 0;
}

.settings-page-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-page-heading::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 10px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.22), transparent);
}

.settings-search-wrap {
  margin-bottom: 10px;
}

.settings-search-input {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0;
  padding: 0 12px;
}

.settings-nav-list {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .settings-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-nav-btn:nth-child(5):last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 3px);
    justify-self: center;
  }
}

.settings-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: #dbe7fb;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 620;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.settings-nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.4);
}

.settings-nav-btn.is-active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.3), rgba(14, 165, 233, 0.18));
  border-color: rgba(56, 189, 248, 0.5);
}

.settings-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-profile-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.settings-profile-edit__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.settings-edit-cancel-btn,
.settings-edit-save-btn {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.76rem;
}

.settings-edit-profile-btn {
  width: auto;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.78rem;
}

.settings-notif-card {
  padding: 1.05rem 1.12rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.5), rgba(2, 6, 23, 0.78));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.settings-notif-card__title.section-title {
  margin: 0 0 0.35rem;
}

.settings-notif-card__lead.preference-desc {
  margin: 0 0 0.95rem;
  font-size: 0.88rem;
  line-height: 1.48;
}

.settings-notif-card--paused {
  border-color: rgba(251, 191, 36, 0.32);
}

.settings-notif-toggle-text {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.settings-notif-label {
  display: block;
  font-weight: 650;
  font-size: 0.93rem;
  color: #e2e8f0;
}

.settings-notif-callout {
  margin: 0 0 1rem;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.settings-notif-callout .settings-notif-status {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.settings-web-push-line {
  margin-top: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
}

.settings-web-push-line.hidden {
  display: none;
}

.settings-notif-btn.save-button {
  width: 100%;
  min-height: 46px;
  margin-top: 0;
  font-weight: 700;
}

.settings-notif-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
}

.settings-switch {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 28px;
}

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

.settings-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.34);
  transition: background 0.2s ease;
}

.settings-switch__track::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f8fafc;
  transition: transform 0.2s ease;
}

.settings-switch input:checked + .settings-switch__track {
  background: rgba(34, 197, 94, 0.55);
}

.settings-switch input:checked + .settings-switch__track::after {
  transform: translateX(20px);
}

.settings-premium-badge {
  margin: 0 0 4px;
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  color: #93c5fd;
  font-weight: 700;
}

.settings-premium-card--clickable {
  cursor: pointer;
}

.settings-premium-card--clickable:hover {
  transform: translateY(-1px);
}

.theme-options--visual .theme-button {
  transition: transform 0.2s ease, box-shadow 0.22s ease, border-color 0.2s ease;
}

.theme-options--visual .theme-button:hover {
  transform: translateY(-2px);
}

.theme-options--visual .theme-button.active {
  border-color: rgba(56, 189, 248, 0.62);
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.26), 0 16px 28px rgba(2, 8, 22, 0.24);
}

.settings-security-toggle {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  font-weight: 650;
}

.settings-security-toggle__chev {
  transition: transform 0.2s ease;
}

.settings-security-toggle[aria-expanded="true"] .settings-security-toggle__chev {
  transform: rotate(180deg);
}

.settings-security-accordion {
  margin-top: 10px;
}

@media (max-width: 840px) {
  .settings-layout--dashboard {
    grid-template-columns: 1fr;
  }

  .settings-nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .settings-nav-btn:nth-child(5):last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 3px);
    justify-self: center;
  }

  .settings-content-card {
    min-height: 0;
  }

  .settings-profile-edit {
    grid-template-columns: 1fr;
  }
}

/* —— Auth: glass + neumorphic 3D —— */
@keyframes authShellBlobDrift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translate(14px, -22px) scale(1.05);
    opacity: 0.8;
  }
}

@keyframes authInnerFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

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

body.auth-shell-locked .app,
body.auth-shell-locked .site-footer {
  visibility: hidden;
}

.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 520px at 18% 8%, rgba(99, 102, 241, 0.28), transparent 58%),
    radial-gradient(ellipse 780px 460px at 88% 78%, rgba(56, 189, 248, 0.2), transparent 52%),
    radial-gradient(ellipse 640px 400px at 50% 105%, rgba(167, 139, 250, 0.18), transparent 48%),
    linear-gradient(168deg, #050814 0%, #0f172a 40%, #1e1b4b 100%);
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  z-index: 0;
}

.auth-shell::before {
  width: min(440px, 58vw);
  height: min(440px, 58vw);
  left: -10%;
  top: 8%;
  background: rgba(56, 189, 248, 0.22);
  animation: authShellBlobDrift 19s ease-in-out infinite;
}

.auth-shell::after {
  width: min(400px, 52vw);
  height: min(400px, 52vw);
  right: -8%;
  bottom: 6%;
  background: rgba(167, 139, 250, 0.24);
  animation: authShellBlobDrift 24s ease-in-out infinite reverse;
}

.auth-shell.hidden {
  display: none !important;
}

.auth-shell__inner {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.auth-shell:not(.hidden) .auth-shell__inner {
  animation: authInnerFloat 6.5s ease-in-out 0.5s infinite;
}

.auth-shell__card {
  position: relative;
  border-radius: 26px;
  padding: 38px 30px;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow:
    0 32px 64px rgba(2, 6, 23, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 48px rgba(56, 189, 248, 0.1);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
}

.auth-shell:not(.hidden) .auth-shell__card--3d {
  animation: authCardEnter 0.42s ease forwards;
}

.auth-shell__card .close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.auth-shell__title {
  margin: 0 0 8px;
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #f8fafc;
  text-align: center;
}

.auth-shell__subtitle {
  margin: 0 0 20px;
  font-size: 0.98rem;
  color: rgba(226, 232, 240, 0.72);
  text-align: center;
  line-height: 1.45;
}

.auth-shell__tabs {
  display: flex;
  gap: 0;
  margin: 0 0 20px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.auth-shell__tab {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-shell__tab:hover {
  color: #e2e8f0;
}

.auth-shell__tab.is-active {
  background: rgba(56, 189, 248, 0.14);
  color: #e0f2fe;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22);
}

.auth-shell__tab-panel {
  margin-top: 2px;
}

.auth-shell__signup-lead {
  margin: 0 0 18px;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.5;
}

.auth-shell__panel {
  margin-bottom: 4px;
}

.auth-shell__panel .auth-shell__label:first-of-type {
  margin-top: 0;
}

.auth-shell__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  color: rgba(148, 163, 184, 0.75);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-shell__divider::before,
.auth-shell__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.15);
}

.auth-shell__btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  color: #1e293b;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-shell__btn-google:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(2, 8, 22, 0.32);
}

.auth-shell__g-icon {
  display: flex;
  flex-shrink: 0;
}

.auth-shell__hint {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: #fb923c;
  text-align: center;
}

.auth-shell__email {
  margin: 0 0 20px;
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.65);
  text-align: center;
}

.auth-shell__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.auth-shell__input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(30, 41, 59, 0.85);
  background: rgba(2, 6, 23, 0.55);
  color: #f1f5f9;
  font-size: 1rem;
  margin-bottom: 12px;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.45),
    inset 0 -1px 0 rgba(148, 163, 184, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-shell__input::placeholder {
  color: rgba(148, 163, 184, 0.45);
}

.auth-shell__input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 0 3px rgba(56, 189, 248, 0.22),
    0 0 24px rgba(34, 211, 238, 0.15);
}

.auth-shell__field-hint {
  margin: -6px 0 8px;
  font-size: 0.78rem;
  color: #fb923c;
}

.auth-shell__remember-row {
  margin: 2px 0 10px;
}

.auth-shell__remember {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.88);
}

.auth-shell__remember input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #22d3ee;
  border-radius: 4px;
}

.auth-shell__error {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: #fca5a5;
}

.auth-shell__btn-primary {
  width: 100%;
  margin-top: 8px;
  padding: 14px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8 0%, #22d3ee 55%, #06b6d4 100%);
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 650;
  cursor: pointer;
  box-shadow:
    0 4px 0 rgba(14, 116, 144, 0.35),
    0 12px 28px rgba(8, 145, 178, 0.35),
    0 0 28px rgba(56, 189, 248, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-shell__btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 6px 0 rgba(14, 116, 144, 0.3),
    0 16px 36px rgba(8, 145, 178, 0.45),
    0 0 36px rgba(56, 189, 248, 0.45);
}

.auth-shell__btn-primary:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 2px 0 rgba(14, 116, 144, 0.4),
    0 8px 20px rgba(8, 145, 178, 0.3);
}

/* —— TipTap full-screen note editor (glass + neon, matches auth shell) —— */
@keyframes note-rich-editor-gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes note-rich-editor-card-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes note-rich-editor-screen-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes note-rich-toolbar-active-glow {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2),
      0 0 16px rgba(0, 245, 212, 0.28);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 -1px 0 rgba(0, 0, 0, 0.18),
      0 0 26px rgba(0, 198, 255, 0.38);
  }
}

body.note-rich-editor-open {
  overflow: hidden;
}

body.note-rich-editor-open #webChatFab,
body.note-rich-editor-open #dailyPlannerFab {
  display: none !important;
  pointer-events: none;
}

.note-rich-editor-screen {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  flex-direction: column;
  color: #e2e8f0;
  overflow: hidden;
}

.note-rich-editor-screen:not(.hidden) {
  animation: note-rich-editor-screen-fade 0.32s ease-out forwards;
}

.note-rich-editor-screen.hidden {
  display: none !important;
}

.note-rich-editor-gradient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(165deg, #050506 0%, #0b0c0f 42%, #111116 100%);
  background-size: 100% 100%;
  animation: none;
}

.note-rich-editor-gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.note-rich-editor-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 92% 70% at 50% -15%, rgba(255, 255, 255, 0.045), transparent 52%);
  pointer-events: none;
}

/* Water-drop / rain-on-glass depth (soft blurred circles) */
.note-rich-editor-rain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(ellipse 20px 28px at 9% 14%, rgba(255, 255, 255, 0.13), transparent 72%),
    radial-gradient(ellipse 24px 16px at 24% 36%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(ellipse 14px 22px at 43% 10%, rgba(255, 255, 255, 0.09), transparent 68%),
    radial-gradient(ellipse 28px 20px at 71% 24%, rgba(255, 255, 255, 0.08), transparent 70%),
    radial-gradient(ellipse 18px 26px at 90% 42%, rgba(255, 255, 255, 0.1), transparent 72%),
    radial-gradient(ellipse 22px 18px at 17% 76%, rgba(255, 255, 255, 0.06), transparent 68%),
    radial-gradient(ellipse 26px 22px at 39% 90%, rgba(255, 255, 255, 0.08), transparent 70%),
    radial-gradient(ellipse 12px 20px at 58% 56%, rgba(255, 255, 255, 0.05), transparent 65%),
    radial-gradient(ellipse 20px 24px at 84% 79%, rgba(255, 255, 255, 0.07), transparent 68%),
    radial-gradient(ellipse 16px 18px at 66% 34%, rgba(255, 255, 255, 0.06), transparent 65%),
    radial-gradient(ellipse 32px 24px at 52% 78%, rgba(0, 198, 255, 0.05), transparent 72%);
  filter: blur(0.6px);
}

.note-rich-editor-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: clamp(12px, 3vw, 22px);
  box-sizing: border-box;
  align-items: center;
}

.note-rich-editor-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.14),
    0 0 48px rgba(0, 245, 212, 0.06);
}

.note-rich-editor-main-card {
  width: 100%;
  max-width: 820px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
}

.note-rich-editor-screen:not(.hidden) .note-rich-editor-main-card--enter {
  animation: note-rich-editor-card-enter 0.38s ease forwards;
}

.note-rich-editor-main-inner {
  flex: 1;
  min-height: 0;
  /* Scroll only inside the note body — header, title & toolbar stay fixed above the typing area */
  overflow: hidden;
  padding: clamp(16px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-sizing: border-box;
}

.note-rich-editor-row--header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.note-rich-editor-title-block {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.note-rich-editor-title-error {
  margin: 0;
  padding: 0 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fca5a5;
  letter-spacing: 0.01em;
}

.note-rich-editor-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(234, 252, 255, 0.95);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.note-rich-editor-back:hover {
  background: linear-gradient(165deg, rgba(0, 245, 212, 0.14), rgba(255, 255, 255, 0.07));
  border-color: rgba(0, 245, 212, 0.38);
  box-shadow:
    0 0 26px rgba(0, 245, 212, 0.22),
    0 12px 32px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: scale(1.03);
}

.note-rich-editor-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 212, 0.42);
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.42), rgba(0, 198, 255, 0.32));
  color: #042f2e;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.note-rich-editor-save:hover:not(:disabled) {
  filter: brightness(1.07);
  border-color: rgba(0, 245, 212, 0.55);
  box-shadow:
    0 0 32px rgba(0, 245, 212, 0.42),
    0 12px 32px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: scale(1.03);
}

.note-rich-editor-save:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.note-rich-editor-back-icon {
  font-size: 1.1rem;
  opacity: 0.9;
}

.note-rich-editor-title-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 4px 14px;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(234, 252, 255, 0.98);
  font-size: clamp(20px, 3.6vw, 22px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  box-shadow: none;
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    color 0.28s ease;
}

.note-rich-editor-title-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.note-rich-editor-title-input:focus {
  outline: none;
  border-bottom-color: rgba(0, 245, 212, 0.85);
  box-shadow: 0 6px 28px rgba(0, 245, 212, 0.32), 0 2px 14px rgba(0, 198, 255, 0.12);
}

.note-rich-editor-title-input.note-rich-editor-title-input--invalid {
  border-bottom-color: rgba(248, 113, 113, 0.75);
  box-shadow: 0 6px 22px rgba(248, 113, 113, 0.22);
}

.note-rich-editor-toolbar {
  flex-shrink: 0;
  touch-action: manipulation;
  padding: 4px 2px 8px;
  overflow: visible;
}

.note-rich-toolbar-inner {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* One scrollable strip — toolbar separated from editor “sheet” below */
.note-rich-toolbar-inner--single-row {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
  padding: 8px 12px;
  box-sizing: border-box;
  border-radius: 14px;
  background: linear-gradient(180deg, #1c1c21 0%, #121214 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.65),
    0 2px 6px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.note-rich-toolbar-inner--single-row::-webkit-scrollbar {
  height: 5px;
}

.note-rich-toolbar-inner--single-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 5px;
}

.note-rich-toolbar-inner--single-row .note-rich-toolbar-row--single {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  max-width: none;
}

@media (min-width: 769px) {
  .note-rich-toolbar-inner--single-row .note-rich-toolbar-row--single {
    justify-content: center;
  }
}

.note-rich-toolbar-row--single {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 100%;
}

.note-rich-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(226, 232, 240, 0.92);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 6px 18px rgba(0, 0, 0, 0.26);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease,
    color 0.2s ease;
}

.note-rich-toolbar-btn:hover {
  background: linear-gradient(165deg, rgba(0, 245, 212, 0.16), rgba(255, 255, 255, 0.08));
  border-color: rgba(0, 245, 212, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.14),
    0 0 30px rgba(0, 198, 255, 0.32),
    0 8px 22px rgba(0, 0, 0, 0.3);
  transform: scale(1.07);
}

.note-rich-toolbar-btn:active {
  transform: scale(0.97);
}

.note-rich-toolbar-btn.is-active {
  background: rgba(14, 116, 144, 0.25);
  border-color: rgba(56, 189, 248, 0.45);
  color: #f8fafc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(56, 189, 248, 0.2);
}

.note-rich-toolbar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

@media (prefers-reduced-motion: reduce) {
  .note-rich-toolbar-btn.is-active {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 0 0 1px rgba(56, 189, 248, 0.25);
  }

  .note-rich-toolbar-btn:hover {
    transform: none;
  }

  .note-rich-editor-gradient {
    animation: none;
    background-position: 50% 50%;
  }
}

.note-rich-editor-tags-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-rich-editor-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: rgba(226, 232, 240, 0.75);
}

.note-rich-tags-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  min-height: 52px;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 10px 26px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.note-rich-tags-field:focus-within {
  border-color: rgba(0, 245, 212, 0.42);
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 2px rgba(0, 245, 212, 0.12),
    0 0 32px rgba(0, 198, 255, 0.22);
}

.note-rich-tags-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.note-rich-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.14), rgba(0, 198, 255, 0.1));
  border: 1px solid rgba(0, 245, 212, 0.28);
  color: rgba(240, 253, 250, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.note-rich-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(15, 23, 42, 0.35);
  color: rgba(226, 232, 240, 0.92);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.note-rich-tag-remove:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.55);
  transform: scale(1.06);
}

.note-rich-tag-input {
  flex: 1;
  min-width: 120px;
  border: none;
  background: transparent;
  color: #f8fafc;
  font-size: 0.9rem;
  padding: 6px 4px;
}

.note-rich-tag-input:focus {
  outline: none;
}

.note-rich-tag-input::placeholder {
  color: rgba(148, 163, 184, 0.65);
}

.note-rich-editor-content-shell {
  flex: 1;
  min-height: 0;
  border-radius: 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(
    155deg,
    rgba(2, 8, 22, 0.78) 0%,
    rgba(4, 18, 36, 0.58) 48%,
    rgba(6, 28, 44, 0.5) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 3px 32px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 36px rgba(0, 0, 0, 0.28);
}

.note-rich-editor-mount {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: clamp(22px, 4vw, 36px);
  box-sizing: border-box;
}

.note-rich-editor-mount .note-rich-editor-content {
  min-height: 0;
  max-width: 680px;
  margin: 0 auto;
}

.note-rich-editor-content-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px clamp(22px, 4vw, 36px) 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.note-rich-editor-wordcount {
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.72);
}

.note-rich-editor-mount .ProseMirror {
  outline: none;
  min-height: 12rem;
  font-size: 1.1rem;
  line-height: 1.78;
  color: rgba(234, 252, 255, 0.96);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.035) 0%,
    rgba(0, 0, 0, 0.14) 52%,
    rgba(0, 198, 255, 0.04) 100%
  );
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 2px 52px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.note-rich-editor-mount .ProseMirror p.is-editor-empty:first-child::before {
  color: rgba(148, 163, 184, 0.55);
}

.note-rich-editor-mount .ProseMirror:focus {
  outline: none;
}

.note-rich-editor-mount .ProseMirror p {
  margin: 0.55em 0;
}

.note-rich-editor-mount .ProseMirror h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
  letter-spacing: -0.03em;
}

.note-rich-editor-mount .ProseMirror h2 {
  font-size: 1.45rem;
  font-weight: 650;
  margin: 0.9rem 0 0.45rem;
}

.note-rich-editor-mount .ProseMirror h3 {
  font-size: 1.2rem;
  font-weight: 650;
  margin: 0.75rem 0 0.35rem;
}

.note-rich-editor-mount .ProseMirror ul,
.note-rich-editor-mount .ProseMirror ol {
  padding-left: 1.35rem;
  margin: 0.5em 0;
}

.note-rich-editor-mount .ProseMirror blockquote {
  border-left: 3px solid rgba(0, 245, 212, 0.45);
  margin: 0.75em 0;
  padding-left: 1rem;
  color: rgba(203, 213, 225, 0.95);
}

.note-rich-editor-mount .ProseMirror pre {
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  overflow-x: auto;
}

.note-rich-editor-mount .ProseMirror img.note-rich-img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 0.75em 0;
}

.note-rich-editor-mount .ProseMirror ul[data-type="taskList"] {
  list-style: none;
  padding-left: 0;
}

.note-rich-editor-mount .ProseMirror li[data-type="taskItem"] {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.note-rich-editor-mount .ProseMirror li[data-type="taskItem"] > label {
  flex-shrink: 0;
  margin-top: 4px;
}

/* Mobile / narrow: black base, raised toolbar rail, sculpted note sheet — max writing area */
@media (max-width: 768px) {
  .note-rich-editor-gradient {
    background: #050506;
  }

  .note-rich-editor-gradient::after {
    opacity: 0.9;
    background: radial-gradient(ellipse 100% 70% at 50% -8%, rgba(255, 255, 255, 0.05), transparent 50%);
  }

  .note-rich-editor-rain {
    display: none;
  }

  .note-rich-editor-layout {
    padding: max(4px, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right)) env(safe-area-inset-bottom)
      max(0px, env(safe-area-inset-left));
    align-items: stretch;
  }

  .note-rich-editor-glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #080809;
    border: none;
    box-shadow: none;
  }

  .note-rich-editor-main-card {
    border-radius: 0;
    max-width: none;
  }

  .note-rich-editor-main-inner {
    gap: 6px;
    padding: 8px 10px 10px;
    overflow: hidden;
  }

  .note-rich-editor-row--header,
  .note-rich-editor-title-block,
  .note-rich-editor-toolbar {
    flex-shrink: 0;
  }

  .note-rich-editor-row--header {
    gap: 8px;
    padding-top: 2px;
  }

  .note-rich-editor-back {
    padding: 5px 11px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(180deg, #2c2c32, #222228);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(241, 245, 249, 0.95);
    transform: none;
  }

  .note-rich-editor-back:hover {
    transform: none;
    filter: brightness(1.08);
    border-color: rgba(255, 255, 255, 0.16);
  }

  .note-rich-editor-back-icon {
    font-size: 0.95rem;
    line-height: 1;
  }

  .note-rich-editor-save {
    padding: 5px 12px;
    font-size: 0.73rem;
    font-weight: 650;
    border-radius: 999px;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border-color: rgba(148, 163, 184, 0.28);
    color: #f8fafc;
    box-shadow:
      0 3px 10px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: none;
  }

  .note-rich-editor-save:hover:not(:disabled) {
    transform: none;
    filter: brightness(1.1);
    border-color: rgba(203, 213, 225, 0.35);
  }

  .note-rich-editor-title-block {
    gap: 2px;
  }

  .note-rich-editor-title-input {
    padding: 6px 2px 8px;
    font-size: 1.05rem;
    font-weight: 650;
    border-bottom-color: rgba(148, 163, 184, 0.28);
  }

  .note-rich-editor-title-input:focus {
    border-bottom-color: rgba(250, 250, 250, 0.28);
    box-shadow: none;
  }

  .note-rich-editor-toolbar {
    padding: 2px 4px 6px;
  }

  .note-rich-toolbar-inner--single-row {
    padding: 6px 8px;
    border-radius: 12px;
  }

  .note-rich-toolbar-inner--single-row .note-rich-toolbar-row--single {
    gap: 6px;
  }

  .note-rich-toolbar-btn {
    width: 33px;
    height: 33px;
    border-radius: 9px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(180deg, #32323a 0%, #24242b 55%, #1c1c22 100%);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.35);
    transform: none;
  }

  .note-rich-toolbar-btn:hover {
    transform: none;
    background: linear-gradient(180deg, #3a3a44 0%, #2e2e36 55%, #26262e 100%);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
      0 3px 8px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  .note-rich-toolbar-btn:active {
    transform: scale(0.96);
    box-shadow:
      0 1px 3px rgba(0, 0, 0, 0.6),
      inset 0 2px 6px rgba(0, 0, 0, 0.45);
  }

  .note-rich-toolbar-btn.is-active {
    background: linear-gradient(180deg, #3d4c5f 0%, #2f3f55 100%);
    border-color: rgba(148, 163, 184, 0.28);
    color: #f8fafc;
    box-shadow:
      0 0 0 1px rgba(148, 163, 184, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .note-rich-toolbar-icon svg {
    width: 15px;
    height: 15px;
  }

  .note-rich-editor-content-shell {
    flex: 1 1 auto;
    min-height: 0;
    margin: 4px 4px 0;
    align-self: stretch;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    background: linear-gradient(180deg, #101114 0%, #09090c 92%);
    box-shadow:
      0 14px 40px rgba(0, 0, 0, 0.75),
      0 6px 16px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      inset 0 -2px 18px rgba(0, 0, 0, 0.45);
  }

  .note-rich-editor-mount {
    padding: 10px 8px 6px;
  }

  .note-rich-editor-mount .note-rich-editor-content {
    max-width: none;
    margin: 0;
    min-height: 0;
  }

  .note-rich-editor-mount .ProseMirror {
    min-height: 6rem;
    padding: 4px 2px 10px;
    font-size: 1.02rem;
    line-height: 1.65;
    color: #eceef2;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    /* Stop iOS focusing the editable from aggressively scroll-panning the screen */
    scroll-margin-block: 0;
  }

  .note-rich-editor-content-footer {
    padding: 6px 10px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  .note-rich-editor-wordcount {
    font-size: 0.62rem;
    color: rgba(148, 163, 184, 0.7);
    letter-spacing: 0.05em;
  }

  .note-rich-editor-mount .ProseMirror blockquote {
    border-left-color: rgba(148, 163, 184, 0.45);
  }

  .note-rich-editor-screen:not(.hidden) {
    animation: none;
    opacity: 1;
  }

  .note-rich-editor-screen:not(.hidden) .note-rich-editor-main-card--enter {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.note-view-prose {
  font-size: 1.02rem;
  line-height: 1.65;
  color: #e2e8f0;
}

.note-view-prose p {
  margin: 0.55em 0;
}

.note-view-prose h1 {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0.85em 0 0.45em;
}

.note-view-prose h2 {
  font-size: 1.35rem;
  font-weight: 650;
  margin: 0.75em 0 0.35em;
}

.note-view-prose h3 {
  font-size: 1.12rem;
  font-weight: 650;
  margin: 0.65em 0 0.3em;
}

.note-view-prose ul,
.note-view-prose ol {
  padding-left: 1.35rem;
  margin: 0.5em 0;
}

.note-view-prose blockquote {
  border-left: 3px solid rgba(56, 189, 248, 0.45);
  margin: 0.65em 0;
  padding-left: 1rem;
  color: #cbd5e1;
}

.note-view-prose pre {
  background: rgba(2, 6, 23, 0.65);
  border-radius: 10px;
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 0.88rem;
}

.note-view-prose img.note-rich-img {
  max-width: 100%;
  border-radius: 10px;
}

.note-view-prose a.note-rich-link {
  color: #7dd3fc;
}

/* Coins rewards — gamified dashboard */
.page.coins-dash-page {
  background: radial-gradient(1200px 500px at 15% -5%, rgba(99, 102, 241, 0.2), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(56, 189, 248, 0.12), transparent 50%),
    linear-gradient(180deg, #0b1220 0%, #070b14 42%, #060a12 100%);
}

.coins-dash-shell {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Accent for the first earn card stack (daily + video precede balance hero) */
.coins-dash-card--coins-first {
  margin-top: 2px;
  border-color: rgba(56, 189, 248, 0.28);
}

/* Coins rewards: tighter layout under global topbar */
body.coins-hub-open #coins-hub .coins-dash-shell {
  margin-top: -8px;
}

@media (max-width: 560px) {
  body.coins-hub-open #coins-hub .coins-dash-shell {
    margin-top: -4px;
  }
}

.coins-dash-card--hero-tight .coins-dash-balance-digits {
  margin-top: 10px;
}

.coins-dash-card--balance-compact.coins-dash-card--hero {
  padding-top: 16px;
  padding-bottom: 16px;
}

.coins-dash-card--balance-compact .coins-dash-coin-stack {
  width: 44px;
  height: 44px;
}

.coins-dash-card--balance-compact .coins-dash-coin-3d {
  font-size: 1.8rem;
}

.coins-dash-card--balance-compact .coins-dash-coin-3d--back {
  font-size: 1.45rem;
}

.coins-dash-card--balance-compact .coins-dash-balance-num {
  font-size: clamp(1.75rem, 6.5vw, 2.35rem);
}

.coins-dash-card--balance-compact .coins-dash-balance-digits {
  margin-top: 8px;
  margin-bottom: 8px;
}

.coins-dash-card-title--tight {
  margin: 0 0 6px;
}

/* Task row (Watch video) — simple list style */
.coins-hub-task {
  padding: 14px 16px;
}

.coins-hub-task--video {
  border-color: rgba(52, 211, 153, 0.24);
  background: linear-gradient(
    148deg,
    rgba(16, 185, 129, 0.08) 0%,
    rgba(15, 23, 42, 0.92) 48%,
    rgba(17, 24, 39, 0.95) 100%
  );
}

.coins-hub-task__row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
}

.coins-hub-task__icon-slot {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, rgba(6, 78, 59, 0.55), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(52, 211, 153, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.coins-hub-task__icon-glyphs {
  font-size: 1.1rem;
  font-weight: 800;
  color: #4ade80;
  line-height: 1;
}

.coins-hub-task__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 780;
  color: #f8fafc;
}

.coins-hub-task__meta {
  margin: 0;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.coins-hub-task__go {
  appearance: none;
  min-width: 88px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #ecfdf5;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(74, 222, 128, 0.62);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.12);
  transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.coins-hub-task__go:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(110, 231, 183, 0.95);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.22);
}

.coins-hub-task__go:disabled,
.coins-hub-task__go--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.coins-hub-task__foot {
  margin: 10px 0 0;
  font-size: 0.78rem;
}

.coins-hub-task__hint {
  margin: 8px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
}

.coins-hub-task--burst {
  animation: coins-hub-task-burst 0.55s ease;
}

@keyframes coins-hub-task-burst {
  0% {
    box-shadow: 0 0 0 rgba(74, 222, 128, 0);
  }
  35% {
    box-shadow: 0 0 28px rgba(74, 222, 128, 0.42);
  }
  100% {
    box-shadow: 0 0 0 rgba(74, 222, 128, 0);
  }
}

.coins-hub-streak-card {
  border-color: rgba(52, 211, 153, 0.22);
  background: linear-gradient(
    148deg,
    rgba(16, 185, 129, 0.12) 0%,
    rgba(15, 23, 42, 0.92) 42%,
    rgba(15, 23, 42, 0.96) 100%
  );
}

/* Daily check-in — compact header + 7-day coin row */
.coins-daily-checkin-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(250, 204, 21, 0.2);
  background:
    radial-gradient(ellipse 90% 55% at 50% -18%, rgba(250, 204, 21, 0.09) 0%, transparent 52%),
    radial-gradient(circle at 10% 100%, rgba(52, 211, 153, 0.06) 0%, transparent 40%),
    linear-gradient(168deg, rgba(15, 23, 42, 0.99) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.coins-daily-checkin-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.coins-daily-checkin-head--compact {
  gap: 8px;
  margin-bottom: 10px;
}

.coins-daily-checkin-head__title {
  margin: 0;
}

.coins-daily-checkin-head__streak {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.45;
  color: #cbd5e1;
}

.coins-daily-checkin-head__accent {
  color: #fde68a;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.coins-daily-balance-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 0 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.coins-daily-balance-hero__label {
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.coins-daily-balance-hero__value {
  font-size: clamp(1.35rem, 3.4vw, 1.65rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #fde047;
  text-shadow: 0 0 28px rgba(250, 204, 21, 0.2);
}

.daily-checkin-coins-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 6px;
  margin: 0;
  padding: 12px 0 2px;
}

.daily-checkin-slot {
  box-sizing: border-box;
  flex: 1 1 2.65rem;
  min-width: 2.65rem;
  max-width: 4.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  margin: 0;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  background: rgba(2, 6, 23, 0.45);
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

button.daily-checkin-slot {
  appearance: none;
  -webkit-appearance: none;
}

.daily-checkin-slot--locked {
  opacity: 0.56;
}

.daily-checkin-slot__coin-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, rgba(250, 250, 250, 0.1), transparent 46%),
    linear-gradient(160deg, rgba(51, 65, 85, 0.5), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(100, 116, 139, 0.42);
}

.daily-checkin-slot__coin {
  font-size: 1.28rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.38));
}

.daily-checkin-slot__coin--muted {
  opacity: 0.4;
  filter: grayscale(0.5) brightness(0.82);
}

.daily-checkin-slot__tick {
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.58rem;
  font-weight: 900;
  color: #ecfdf5;
  background: linear-gradient(145deg, #22c55e, #15803d);
  border: 1px solid rgba(187, 247, 208, 0.45);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.38);
}

.daily-checkin-slot__amt {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fcd34d;
}

.daily-checkin-slot__amt--muted {
  color: #9ca8bc;
}

.daily-checkin-slot__amt--locked {
  color: rgba(148, 163, 184, 0.78);
}

.daily-checkin-slot__meta {
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  max-width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-checkin-slot__meta--done {
  color: #86efac;
}

.daily-checkin-slot__meta--locked {
  color: rgba(100, 116, 139, 0.72);
}

.daily-checkin-slot--claim {
  border-color: rgba(250, 204, 21, 0.52);
  background: rgba(253, 230, 138, 0.06);
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.1),
    0 10px 26px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  opacity: 1;
}

.daily-checkin-slot--claim .daily-checkin-slot__coin-ring {
  border-color: rgba(250, 204, 21, 0.42);
  background:
    radial-gradient(circle at 35% 24%, rgba(254, 240, 138, 0.24), transparent 48%),
    linear-gradient(160deg, rgba(66, 32, 6, 0.32), rgba(15, 23, 42, 0.96));
}

.daily-checkin-slot--claim:hover {
  transform: translateY(-1px);
}

.daily-checkin-slot--claim:focus-visible {
  outline: 2px solid rgba(250, 204, 21, 0.75);
  outline-offset: 2px;
}

.daily-checkin-slot--done {
  border-color: rgba(52, 211, 153, 0.26);
  background: rgba(6, 78, 59, 0.1);
  opacity: 0.93;
}

.daily-checkin-slot--finale .daily-checkin-slot__coin-ring {
  border-color: rgba(251, 191, 36, 0.48);
}

.daily-checkin-slot--pop {
  animation: daily-checkin-slot-pop 0.72s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes daily-checkin-slot-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.065);
    box-shadow:
      0 0 0 1px rgba(250, 204, 21, 0.35),
      0 14px 38px rgba(250, 204, 21, 0.16);
  }
  100% {
    transform: scale(1);
  }
}

body.theme-normal .coins-daily-checkin-card {
  border-color: rgba(251, 191, 36, 0.24);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.96) 100%);
}

body.theme-normal .coins-daily-checkin-head__streak {
  color: #475569;
}

body.theme-normal .coins-daily-balance-hero {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

body.theme-normal .coins-daily-balance-hero__label {
  color: #64748b;
}

body.theme-normal .coins-daily-balance-hero__value {
  color: #b45309;
  text-shadow: none;
}

body.theme-normal .daily-checkin-slot {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(148, 163, 184, 0.36);
}

body.theme-normal .daily-checkin-slot--locked {
  opacity: 0.58;
}

body.theme-normal .daily-checkin-slot__coin-ring {
  background: linear-gradient(160deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.88));
  border-color: rgba(148, 163, 184, 0.42);
}

body.theme-normal .daily-checkin-slot--claim {
  background: rgba(254, 252, 232, 0.88);
}

body.theme-normal .daily-checkin-slot--done {
  background: rgba(236, 253, 245, 0.72);
}

body.theme-normal .page.coins-dash-page {
  background:
    radial-gradient(1100px 480px at 12% -8%, rgba(251, 191, 36, 0.12), transparent 55%),
    radial-gradient(800px 360px at 100% 0%, rgba(59, 130, 246, 0.08), transparent 52%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

body.theme-normal .coins-dash-page-title {
  color: #0f172a;
}

body.theme-normal .coins-invite-panel__stats {
  color: #334155;
  border-color: rgba(167, 139, 250, 0.28);
  background: rgba(248, 250, 252, 0.94);
}

body.theme-normal .coins-dash-details--learn {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.92);
}

body.theme-normal .coins-dash-details-summary {
  color: #0f172a;
}

body.theme-normal .coins-dash-guide-ul {
  color: #475569;
}

.coins-hub-streak-top {
  margin-bottom: 10px;
}

.coins-hub-streak-top--flush {
  margin-bottom: 8px;
}

.coins-hub-streak-progress--solo {
  margin-top: 4px;
}

.coins-hub-streak-card--simple .coins-hub-streak-track.coins-hub-streak-track--slim {
  display: block;
  height: 6px;
  margin-bottom: 10px;
  margin-top: -2px;
  opacity: 0.92;
}

.coins-hub-streak-track--slim .coins-hub-streak-fill {
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

.coins-hub-streak-progress {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #a7f3d0;
}

.coins-hub-streak-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(45, 212, 191, 0.2);
  overflow: hidden;
  margin-bottom: 14px;
}

.coins-hub-streak-fill {
  height: 100%;
  border-radius: inherit;
  width: 0%;
  background: linear-gradient(90deg, #34d399, #22c55e);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.55);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.coins-hub-streak-list {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(45, 212, 191, 0.18);
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(2, 6, 23, 0.35);
}

.coins-hub-streak-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.coins-hub-streak-row:last-child {
  border-bottom: none;
}

.coins-hub-streak-row__mark {
  font-size: 0.92rem;
  font-weight: 800;
  color: #475569;
  line-height: 1;
}

.coins-hub-streak-row--done .coins-hub-streak-row__mark {
  color: #34d399;
}

.coins-hub-streak-row--current .coins-hub-streak-row__mark {
  color: #facc15;
}

.coins-hub-streak-row__mid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.coins-hub-streak-row__title {
  font-size: 0.88rem;
  font-weight: 750;
  color: #f1f5f9;
}

.coins-hub-streak-row__coins {
  font-size: 0.74rem;
  font-weight: 700;
  color: #fcd34d;
  font-variant-numeric: tabular-nums;
}

.coins-hub-streak-row--locked {
  opacity: 0.48;
}

.coins-hub-streak-row--locked .coins-hub-streak-row__title {
  color: #94a3b8;
}

.coins-hub-streak-row__tail {
  min-width: 4.25rem;
  text-align: right;
}

.coins-hub-streak-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coins-hub-streak-status--done {
  color: #bbf7d0;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(6, 78, 59, 0.25);
}

.coins-hub-streak-status--now {
  color: #fef08a;
  border: 1px solid rgba(250, 204, 21, 0.5);
  background: rgba(120, 53, 15, 0.22);
}

.coins-hub-streak-row--current {
  background: rgba(30, 41, 59, 0.28);
}

.coins-hub-streak-row--pop {
  animation: coins-hub-streak-row-pop 0.65s ease;
}

@keyframes coins-hub-streak-row-pop {
  0% {
    transform: scaleY(1);
  }
  40% {
    transform: scale(1.01);
    filter: brightness(1.12);
    box-shadow: inset 0 0 24px rgba(52, 211, 153, 0.12);
  }
  100% {
    transform: scaleY(1);
    filter: none;
  }
}

.coins-hub-claim-btn {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  color: #052e16;
  background: linear-gradient(135deg, #4ade80, #22c55e 50%, #059669);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.coins-hub-claim-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.coins-hub-claim-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.coins-hub-claim-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.coins-hub-redeem-card {
  padding: 12px 16px;
}

.coins-hub-redeem-btn {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  color: #1c1917;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.85), rgba(245, 158, 11, 0.72));
  border: 1px solid rgba(253, 224, 71, 0.35);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.18);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.coins-hub-redeem-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.coins-hub-redeem-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.coins-dash-topbar {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 0.5rem;
}

/* Coins hub: back on the left, eyebrow + title optically centered */
#coins-hub .coins-dash-topbar--balanced {
  display: grid;
  grid-template-columns: minmax(5.5rem, 6.6rem) minmax(0, 1fr) minmax(5.5rem, 6.6rem);
  align-items: center;
  column-gap: 10px;
  margin-bottom: 0.62rem;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-back-btn {
  justify-self: start;
  font-size: 0.8rem;
  font-weight: 400;
  min-height: 32px;
  padding: 6px 10px;
  border-color: rgba(148, 163, 184, 0.15);
  color: rgba(241, 245, 249, 0.95);
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-back-btn__glyph {
  font-size: 1.06rem;
  font-weight: 300;
  line-height: 1;
  opacity: 1;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-back-btn__label {
  font-weight: 400;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-topbar-text {
  flex: unset;
  min-width: 0;
  text-align: center;
  justify-self: stretch;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-topbar-text .eyebrow {
  margin: 0 0 4px;
  text-align: center;
  text-transform: none;
  letter-spacing: 0.05em;
  font-weight: 500;
  font-size: 0.7rem;
  color: rgba(226, 232, 240, 0.88);
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-page-title {
  margin: 0;
  text-align: center;
  text-wrap: balance;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-topbar-slot {
  display: block;
  visibility: hidden;
  pointer-events: none;
  justify-self: end;
  width: 100%;
}

.coins-dash-topbar .coins-dash-topbar-text {
  flex: 1;
  min-width: 0;
}

.coins-dash-back-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 4px 8px;
  min-height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform var(--depth-motion), border-color var(--depth-motion), background var(--depth-motion),
    box-shadow var(--depth-motion);
}

.coins-dash-back-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(30, 41, 59, 0.75);
}

.coins-dash-back-btn:active {
  transform: scale(0.98);
}

.coins-dash-back-btn__glyph {
  font-size: 0.88rem;
  line-height: 1;
  opacity: 0.88;
}

.coins-dash-back-btn__label {
  line-height: 1;
  max-width: 8ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coins-dash-topbar-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1 1 12rem;
}

.coins-dash-topbar-balance {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.32);
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.12), rgba(15, 23, 42, 0.75));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 22px rgba(0, 0, 0, 0.25);
}

.coins-dash-topbar-balance__icon {
  font-size: 1.05rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.coins-dash-topbar-balance__num {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #fef08a;
}

.coins-dash-topbar-balance__sep {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.coins-dash-topbar-balance__cap {
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}

.coins-dash-back {
  flex-shrink: 0;
}

/* Deprecated: coins page uses `.coins-dash-back-btn` instead of global `.back-button`. */

.coins-dash-page-title {
  margin: 0.15rem 0 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.coins-dash-topbar-text .eyebrow {
  margin: 0;
}

.coins-dash-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(56, 189, 248, 0.2), rgba(167, 139, 250, 0.14));
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.coins-dash-alert-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #e2e8f0;
}

.coins-dash-alert-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.coins-dash-chip {
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  width: fit-content;
}

.coins-dash-chip--muted {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}

.coins-dash-card {
  position: relative;
  margin-bottom: 14px;
  padding: clamp(18px, 4vw, 22px);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(
      155deg,
      rgba(30, 41, 59, 0.75) 0%,
      rgba(15, 23, 42, 0.88) 45%,
      rgba(17, 24, 39, 0.92) 100%
    );
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.coins-dash-card--hero-first {
  margin-top: 2px;
  border-color: rgba(56, 189, 248, 0.34);
}

.coins-dash-card--hero {
  overflow: hidden;
  padding-top: clamp(20px, 5vw, 26px);
  border-color: rgba(56, 189, 248, 0.28);
}

.coins-dash-card--hero.coins-dash-pulse,
.coins-daily-checkin-card.coins-dash-pulse {
  animation: coins-dash-pulse 0.72s ease;
}

@keyframes coins-dash-pulse {
  0% {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
  }
  45% {
    box-shadow:
      0 18px 48px rgba(56, 189, 248, 0.35),
      0 0 0 2px rgba(167, 139, 250, 0.25);
    transform: scale(1.01);
  }
  100% {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
    transform: scale(1);
  }
}

.coins-dash-hero-aura {
  position: absolute;
  inset: -40% -30% auto;
  height: 80%;
  background: radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.35), transparent 62%);
  pointer-events: none;
  opacity: 0.85;
}

.coins-dash-hero-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1;
}

.coins-dash-coin-stack {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.coins-dash-coin-3d {
  position: absolute;
  font-size: 2.35rem;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)) drop-shadow(0 2px 0 rgba(250, 204, 21, 0.35));
}

.coins-dash-coin-3d--back {
  right: -2px;
  bottom: -2px;
  font-size: 1.75rem;
  opacity: 0.92;
}

.coins-dash-balance-caption {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94d9ff;
}

.coins-dash-balance-tagline {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: #94a3b8;
  max-width: 28ch;
  line-height: 1.4;
}

.coins-dash-balance-digits {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 16px 0 12px;
}

.coins-dash-balance-num {
  font-size: clamp(2.5rem, 9vw, 3.35rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fef9c3 0%, #fbbf24 40%, #d97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.25));
}

.coins-dash-balance-max {
  font-size: 1.05rem;
  font-weight: 600;
  color: #64748b;
}

.coins-dash-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.25), transparent);
  margin: 8px 0 14px;
}

.coins-dash-goal-eyebrow {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7dd3fc;
}

.coins-dash-bar-wrap {
  position: relative;
  z-index: 1;
}

.coins-dash-bar-wrap + .coins-dash-divider {
  margin-top: 14px;
}

.coins-dash-bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.75);
}

.coins-dash-bar-track--glow {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(56, 189, 248, 0.12);
}

.coins-dash-bar-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.coins-dash-bar-fill--wallet {
  background: linear-gradient(90deg, #22d3ee, #38bdf8 40%, #a78bfa 90%);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

.coins-dash-bar-fill--goal {
  background: linear-gradient(90deg, #34d399, #22c55e);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.coins-dash-bar-label {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: #cbd5e1;
}

/* Actions */
.coins-dash-card-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 750;
  color: #f1f5f9;
}

.coins-dash-card-title--flush {
  margin-bottom: 4px;
}

.coins-dash-card-sub {
  margin: 0;
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.45;
}

.coins-dash-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.coins-dash-action {
  appearance: none;
  border: none;
  cursor: pointer;
  min-height: 78px;
  padding: 12px 10px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  text-align: left;
  color: #f8fafc;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.coins-dash-action:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.coins-dash-action:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.coins-dash-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.coins-dash-action--gift {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.45), rgba(16, 185, 129, 0.28));
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.2);
}

.coins-dash-action--video {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.42), rgba(56, 189, 248, 0.25));
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.2);
}

.coins-dash-action--redeem {
  grid-column: 1 / -1;
  min-height: 72px;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.4), rgba(245, 158, 11, 0.25));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.15);
}

.coins-dash-action-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.coins-dash-action-label {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.coins-dash-card--invite {
  border-color: rgba(167, 139, 250, 0.35);
  background: linear-gradient(
    155deg,
    rgba(67, 56, 202, 0.18) 0%,
      rgba(15, 23, 42, 0.9) 40%,
    rgba(15, 23, 42, 0.95) 100%
  );
}

.coins-invite-panel__hint {
  margin: 2px 0 12px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.coins-invite-panel__field {
  margin-bottom: 10px;
}

.coins-invite-panel__cta {
  margin-bottom: 10px;
}

.coins-invite-panel__stats {
  margin: 4px 0 8px;
  padding: 10px 12px;
  font-size: 0.79rem;
  font-weight: 600;
  line-height: 1.45;
  color: #e2e8f0;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(2, 6, 23, 0.35);
}

.coins-invite-panel__code {
  margin-top: 2px;
}

.coins-dash-invite-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.coins-dash-invite-emoji {
  font-size: 1.5rem;
}

.coins-dash-link-box {
  margin-bottom: 10px;
}

.coins-dash-link-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.55);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  word-break: break-all;
}

.coins-dash-invite-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.coins-dash-mini-btn {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  color: #0f172a;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.coins-dash-mini-btn:active {
  transform: scale(0.98);
}

.coins-dash-mini-btn--blue {
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
}

.coins-dash-mini-btn--purple {
  background: linear-gradient(180deg, #c4b5fd, #818cf8);
  color: #1e1b4b;
}

.coins-dash-invite-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.coins-dash-stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.coins-dash-stat-pill--green {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: #bbf7d0;
}

.coins-dash-stat-pill--gold {
  background: rgba(250, 204, 21, 0.11);
  border: 1px solid rgba(250, 204, 21, 0.25);
  color: #fef08a;
}

.coins-dash-code-row {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

.coins-dash-code-strong {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  color: #fde047;
}

/* Learn more accordion */
.coins-dash-details {
  margin-bottom: 12px;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  background: rgba(15, 23, 42, 0.6);
  overflow: hidden;
}

.coins-dash-details-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}

.coins-dash-details-summary::-webkit-details-marker {
  display: none;
}

.coins-dash-details[open] .coins-dash-chevron {
  transform: rotate(180deg);
}

.coins-dash-chevron {
  font-size: 0.7rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.coins-dash-details-body {
  padding: 0 16px 16px;
}

.coins-dash-details--learn {
  margin-top: 2px;
  margin-bottom: 8px;
}

.coins-dash-guide-ul {
  margin: 0;
  padding: 0 0 0 1.05rem;
  color: #cbd5e1;
  font-size: 0.86rem;
  line-height: 1.58;
}

.coins-dash-guide-ul--short li {
  list-style-position: outside;
}

.coins-dash-guide-ul li + li {
  margin-top: 8px;
}

.coins-dash-footer-hint {
  margin: 0 0 1.5rem;
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
}

.coins-dash-muted {
  color: #94a3b8;
}

@media (max-width: 520px) {
  .coins-dash-topbar {
    flex-wrap: nowrap;
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .coins-dash-invite-stats {
    grid-template-columns: 1fr;
  }
}

body.trial-gift-modal-open {
  overflow: hidden;
}

/* Trial Standard gift — centered overlay shown once per user (trial lifecycle). */
.trial-gift-modal:not(.hidden) {
  display: flex !important;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.trial-gift-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

.trial-gift-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(36rem, 100%);
  padding: clamp(1.25rem, 4vw, 1.85rem);
  padding-top: clamp(1.6rem, 4.5vw, 2.1rem);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(
      155deg,
      rgba(15, 23, 42, 0.98) 0%,
      rgba(30, 41, 59, 0.95) 40%,
      rgba(17, 24, 39, 0.98) 100%
    );
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.trial-gift-modal__badge {
  margin: 0 0 0.5rem;
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.trial-gift-modal__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3.8vw, 1.65rem);
  font-weight: 800;
  line-height: 1.2;
  color: #f8fafc;
}

.trial-gift-modal__lead {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.trial-gift-modal__list {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
  color: #e2e8f0;
  font-size: 0.93rem;
  line-height: 1.58;
}

.trial-gift-modal__list li + li {
  margin-top: 0.42rem;
}

.trial-gift-modal__note {
  margin: 0 0 1.15rem;
  font-size: 0.87rem;
  line-height: 1.52;
  color: #94a3b8;
}

.trial-gift-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.trial-gift-modal__close:hover {
  background: rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
}

.trial-gift-modal__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.trial-gift-modal__cta {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  font-weight: 700;
}

.trial-gift-modal__later {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.trial-gift-modal__later:hover {
  color: #cbd5e1;
}

/* —— First-time welcome (single centered sheet, no spotlight animations) —— */
#onboardingTutorialRoot.welcome-root {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  pointer-events: none;
}

#onboardingTutorialRoot.welcome-root:not(.hidden) {
  display: flex !important;
  pointer-events: auto;
}

#onboardingTutorialRoot.welcome-root.hidden {
  display: none !important;
}

body.welcome-screen-open {
  overflow: hidden;
}

.welcome-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 24, 0.48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

@media (prefers-reduced-transparency: reduce) {
  .welcome-sheet__backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(5, 10, 24, 0.58);
  }
}

.welcome-sheet {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(26rem, 100%);
  max-height: min(85dvh, 640px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.15rem 1.2rem 1.1rem;
  border-radius: 18px;
  background: rgba(14, 20, 35, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(56, 189, 248, 0.1);
  color: #e2e8f0;
  outline: none;
}

.welcome-sheet__close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 2.1rem;
  height: 2.1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.welcome-sheet__close:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #f1f5f9;
}

.welcome-sheet__title {
  margin: 0 0 0.35rem;
  padding-right: 2rem;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.3;
  color: #f8fafc;
}

.welcome-sheet__subtitle {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.welcome-sheet__bullets {
  margin: 0 0 0.75rem;
  padding: 0 0 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #cbd5e1;
  flex: 0 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.welcome-sheet__bullet {
  margin: 0 0 0.42rem;
  padding-left: 0.15rem;
}

.welcome-sheet__trial {
  flex-shrink: 0;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.welcome-sheet__trial--hidden {
  display: none !important;
}

.welcome-sheet__trial-heading {
  margin: 0 0 0.4rem;
  font-size: 0.93rem;
  font-weight: 800;
  color: #fde68a;
  line-height: 1.3;
}

.welcome-sheet__trial-lead {
  margin: 0 0 0.45rem;
  font-size: 0.86rem;
  line-height: 1.47;
  color: #e2e8f0;
}

.welcome-sheet__trial-bullets {
  margin: 0 0 0.45rem;
  padding-left: 1.05rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
}

.welcome-sheet__trial-li {
  margin-bottom: 0.25rem;
}

.welcome-sheet__trial-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.42;
  color: #cbd5e1;
}

.welcome-sheet__cta.save-button {
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  flex-shrink: 0;
  font-weight: 800;
  border-radius: 12px;
}

body.theme-normal .welcome-sheet {
  background: rgba(253, 253, 255, 0.99);
  border-color: rgba(100, 116, 139, 0.22);
  color: #334155;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
}

body.theme-normal .welcome-sheet__title {
  color: #0f172a;
}

body.theme-normal .welcome-sheet__subtitle {
  color: #64748b;
}

body.theme-normal .welcome-sheet__bullets,
body.theme-normal .welcome-sheet__trial-note {
  color: #475569;
}

body.theme-normal .welcome-sheet__trial-lead {
  color: #334155;
}

body.theme-normal .welcome-sheet__trial {
  background: rgba(254, 252, 246, 0.95);
  border-color: rgba(251, 191, 36, 0.35);
}

body.theme-normal .welcome-sheet__trial-heading {
  color: #b45309;
}

body.theme-normal .welcome-sheet__trial-bullets {
  color: #64748b;
}

body.theme-normal .welcome-sheet__close {
  color: #64748b;
}

/* Coins hub premium polish */
#coins-hub .coins-dash-topbar--balanced {
  position: relative;
  grid-template-columns: minmax(6.25rem, 7rem) minmax(0, 1fr) 2.5rem;
  align-items: center;
  column-gap: 10px;
  margin: 0 0 12px;
  padding: 11px 12px 12px;
  border-radius: 20px;
  background: linear-gradient(148deg, rgba(30, 58, 138, 0.22), rgba(30, 41, 59, 0.56) 48%, rgba(88, 28, 135, 0.3));
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-back-btn {
  min-height: 34px;
  margin-top: 0;
  border-radius: 12px;
  padding: 6px 11px;
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 6px 16px rgba(2, 6, 23, 0.34);
  align-self: start;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-back-btn__label {
  font-weight: 500;
  font-size: 0.84rem;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-topbar-text .eyebrow {
  margin: 0 0 10px;
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  color: rgba(196, 181, 253, 0.92);
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-page-title {
  font-size: clamp(1.34rem, 4.9vw, 1.62rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.012em;
  color: #f8fafc;
  white-space: nowrap;
  margin: 0;
}

#coins-hub .coins-dash-subtitle {
  margin: 5px auto 0;
  max-width: 33ch;
  font-size: 0.77rem;
  line-height: 1.3;
  color: rgba(203, 213, 225, 0.95);
  text-wrap: balance;
}

#coins-hub .coins-dash-top-action {
  appearance: none;
  justify-self: end;
  width: 36px;
  height: 36px;
  margin-top: 0;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.58);
  background: radial-gradient(circle at 30% 25%, rgba(191, 219, 254, 0.36), rgba(30, 41, 59, 0.94) 65%);
  color: #ddd6fe;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.16), 0 0 18px rgba(139, 92, 246, 0.28);
  align-self: start;
}

#coins-hub .coins-daily-checkin-card {
  border-color: rgba(94, 234, 212, 0.22);
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#coins-hub .coins-hub-streak-track--slim {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

#coins-hub .coins-hub-streak-track--slim .coins-hub-streak-fill {
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #22d3ee 45%, #a78bfa 100%);
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.34);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

#coins-hub .daily-checkin-coins-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: stretch;
}

#coins-hub .daily-checkin-slot {
  min-height: 96px;
  border-radius: 14px;
}

#coins-hub .coins-dash-card--balance-compact.coins-dash-card--hero {
  border-color: rgba(56, 189, 248, 0.34);
  background: linear-gradient(158deg, rgba(15, 23, 42, 0.9), rgba(14, 30, 58, 0.94) 45%, rgba(30, 27, 75, 0.9));
}

#coins-hub .coins-dash-bar-track {
  height: 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
}

#coins-hub .coins-dash-bar-fill {
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 560px) {
  #coins-hub .coins-dash-topbar--balanced {
    padding: 10px 10px 11px;
    grid-template-columns: minmax(5.35rem, 5.95rem) minmax(0, 1fr) 2.3rem;
  }
  #coins-hub .coins-dash-subtitle {
    margin-top: 4px;
    font-size: 0.72rem;
    line-height: 1.26;
  }
  #coins-hub .coins-dash-topbar--balanced .coins-dash-page-title {
    font-size: clamp(1.16rem, 5.4vw, 1.3rem);
  }
  #coins-hub .coins-dash-topbar--balanced .coins-dash-topbar-text .eyebrow {
    margin-bottom: 8px;
  }
}

/* Web Chat premium lightweight redesign */
#webChat.web-chat-page--messenger {
  max-width: 860px;
  padding: 0 6px 12px;
  background:
    radial-gradient(72% 48% at 50% 62%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(52% 38% at 86% 20%, rgba(139, 92, 246, 0.12), transparent 58%),
    linear-gradient(180deg, #07132a 0%, #050d1e 48%, #050a16 100%);
}

#webChat .web-chat-messenger {
  min-height: min(calc(100dvh - 178px), 760px);
  max-height: calc(100dvh - 178px);
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(168deg, rgba(12, 24, 52, 0.88), rgba(9, 16, 36, 0.9) 54%, rgba(7, 12, 28, 0.92));
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(130%);
}

#webChat .web-chat-messenger::before {
  display: none;
}

#webChat .web-chat-messenger::after {
  opacity: 0.45;
  filter: blur(1px);
  animation-duration: 70s;
}

#webChat .web-chat-messenger__header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.24));
}

#webChat .web-chat-messenger__title {
  font-size: 1.12rem;
  font-weight: 760;
  letter-spacing: -0.015em;
}

#webChat .web-chat-messenger__status {
  font-size: 0.78rem;
  color: rgba(191, 219, 254, 0.88);
}

#webChat .web-chat-messenger__status-dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

#webChat .web-chat-messenger__back {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.52);
  box-shadow: none;
}

#webChat .web-chat-messenger__back:hover {
  transform: none;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

#webChat .web-chat-soft-lock {
  margin: 8px 12px 0;
  padding: 10px 12px;
  border-radius: 16px;
  border-color: rgba(148, 163, 184, 0.2);
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.2), rgba(15, 23, 42, 0.42));
  font-size: 0.83rem;
}

#webChat .web-chat-soft-lock__cta.save-button.secondary {
  min-width: 138px;
  min-height: 36px;
  border-radius: 12px;
  font-size: 0.82rem;
  box-shadow: none;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.65), rgba(124, 58, 237, 0.58));
  border: 1px solid rgba(147, 197, 253, 0.2);
}

#webChat .web-chat-messages {
  padding: 18px 14px 26px;
  gap: 10px;
  background: linear-gradient(180deg, rgba(2, 12, 28, 0.16), rgba(2, 12, 28, 0.05) 40%, transparent 84%);
}

#webChat .web-chat-bubble {
  font-size: 0.9rem;
  line-height: 1.52;
  padding: 11px 14px 12px;
}

#webChat .web-chat-bubble--bot {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#webChat .web-chat-bubble--user {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.25), rgba(99, 102, 241, 0.16));
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 8px 18px rgba(8, 47, 73, 0.3);
}

#webChat .web-chat-messenger__footer {
  padding: 10px 10px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0.6));
  gap: 8px;
}

#webChat .web-chat-mode-pills {
  gap: 6px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

#webChat .web-chat-mode-pill {
  min-height: 34px;
  border-radius: 11px;
  padding: 0 12px;
  font-size: 0.81rem;
  border-color: transparent;
  background: rgba(15, 23, 42, 0.12);
}

#webChat .web-chat-mode-pill.is-active {
  box-shadow: 0 5px 16px rgba(14, 116, 144, 0.2);
}

#webChat .web-chat-composer-bar {
  gap: 6px;
}

#webChat .web-chat-composer {
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.32);
  min-height: 52px;
}

#webChat .web-chat-composer textarea {
  min-height: 46px;
  max-height: 92px;
  font-size: 0.89rem;
  line-height: 1.42;
  padding: 12px 48px 10px 13px;
}

#webChat .web-chat-send {
  width: 38px;
  height: 38px;
  right: 6px;
  bottom: 6px;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(14, 116, 144, 0.28);
}

#webChat .web-chat-chip-strip {
  gap: 6px;
  margin-top: 2px;
}

#webChat .web-chat-chip-strip__chip,
#webChat .web-chat-chip-strip__chip--recent {
  min-height: 26px;
  border-radius: 10px;
  font-size: 0.74rem;
  padding: 0 10px;
  background: rgba(15, 23, 42, 0.48);
  border-color: rgba(148, 163, 184, 0.18);
}

@media (min-width: 841px) {
  .web-chat-fab {
    width: 50px;
    height: 50px;
    right: max(14px, env(safe-area-inset-right, 0px) + 8px);
    bottom: max(32px, env(safe-area-inset-bottom, 0px) + 20px);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.34), 0 0 0 1px rgba(125, 211, 252, 0.22);
  }

  .daily-planner-fab {
    width: 46px;
    height: 46px;
    right: max(14px, env(safe-area-inset-right, 0px) + 8px);
    bottom: max(102px, env(safe-area-inset-bottom, 0px) + 68px);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.34), 0 0 0 1px rgba(125, 211, 252, 0.18);
  }

  .web-chat-fab::after,
  .daily-planner-fab::after {
    opacity: 0.35;
  }
}

@media (max-width: 560px) {
  #webChat.web-chat-page--messenger {
    padding: 0 2px 8px;
  }
  #webChat .web-chat-messenger__header {
    padding: 10px 11px 9px;
  }
  #webChat .web-chat-messages {
    padding: 16px 10px 24px;
  }
  #webChat .web-chat-messenger__footer {
    padding: 8px 8px 10px;
  }
}

/* Web Chat redesign v2 strong - modern AI assistant */
#webChat.web-chat-page--messenger {
  max-width: 880px;
  padding: 0 8px 16px;
  overflow-x: clip;
  background:
    radial-gradient(76% 56% at 50% 75%, rgba(37, 99, 235, 0.12), transparent 62%),
    radial-gradient(44% 36% at 86% 12%, rgba(124, 58, 237, 0.11), transparent 60%),
    linear-gradient(180deg, #061126 0%, #040c1d 56%, #040915 100%);
}

#webChat .web-chat-messenger {
  min-height: min(calc(100dvh - 164px), 820px);
  max-height: calc(100dvh - 164px);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  background: linear-gradient(165deg, rgba(10, 21, 46, 0.88), rgba(7, 14, 34, 0.93) 56%, rgba(6, 11, 26, 0.95));
  box-shadow: 0 22px 56px rgba(2, 6, 23, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px) saturate(118%);
  position: relative;
  overflow: hidden;
}

#webChat .web-chat-messenger::after {
  inset: -10%;
  opacity: 0.32;
  background:
    radial-gradient(ellipse 60% 40% at 18% 18%, rgba(96, 165, 250, 0.14), transparent 62%),
    radial-gradient(ellipse 52% 36% at 82% 82%, rgba(129, 140, 248, 0.12), transparent 60%),
    radial-gradient(ellipse 44% 34% at 48% 55%, rgba(255, 255, 255, 0.03), transparent 65%);
  animation: none;
  transform: none;
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode::after {
  background:
    radial-gradient(ellipse 60% 42% at 18% 20%, rgba(45, 212, 191, 0.15), transparent 62%),
    radial-gradient(ellipse 52% 34% at 84% 82%, rgba(56, 189, 248, 0.09), transparent 62%),
    radial-gradient(ellipse 44% 34% at 48% 55%, rgba(255, 255, 255, 0.03), transparent 66%);
}

#webChat .web-chat-messenger.chat-container.auto-mode::after {
  background:
    radial-gradient(ellipse 58% 40% at 16% 18%, rgba(56, 189, 248, 0.17), transparent 62%),
    radial-gradient(ellipse 50% 34% at 84% 80%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(ellipse 44% 34% at 50% 54%, rgba(148, 163, 184, 0.03), transparent 66%);
}

#webChat .web-chat-messenger.chat-container.openai-mode::after {
  background:
    radial-gradient(ellipse 58% 40% at 18% 20%, rgba(139, 92, 246, 0.2), transparent 60%),
    radial-gradient(ellipse 54% 34% at 84% 82%, rgba(99, 102, 241, 0.12), transparent 62%),
    radial-gradient(ellipse 40% 30% at 46% 52%, rgba(255, 255, 255, 0.03), transparent 66%);
}

#webChat .web-chat-sheet-handle {
  padding: 7px 0 0;
}

#webChat .web-chat-sheet-handle__bar {
  width: 38px;
  height: 3px;
  background: rgba(148, 163, 184, 0.5);
  box-shadow: none;
}

#webChat .web-chat-messenger__header {
  padding: 10px 14px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.11);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.38), rgba(15, 23, 42, 0.16));
}

#webChat .web-chat-messenger__head-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

#webChat .web-chat-messenger__title-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.46), rgba(124, 58, 237, 0.34));
  border: 1px solid rgba(147, 197, 253, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#webChat .web-chat-messenger__peer-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#webChat .web-chat-messenger__title {
  margin: 0;
  font-size: 1.03rem;
  font-weight: 760;
  letter-spacing: -0.012em;
  text-shadow: none;
}

#webChat .web-chat-messenger__status {
  margin-top: 2px;
  font-size: 0.77rem;
  color: rgba(191, 219, 254, 0.84);
}

#webChat .web-chat-messenger__status-dot {
  width: 7px;
  height: 7px;
  animation: none;
  box-shadow: none;
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-messenger__status-dot {
  background: #34d399;
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-messenger__status-dot {
  background: #38bdf8;
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-messenger__status-dot {
  background: #a78bfa;
}

#webChat .web-chat-messenger__back {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.52);
  font-size: 0.92rem;
}

#webChat .web-chat-messenger__back:hover {
  transform: none;
  border-color: rgba(191, 219, 254, 0.4);
  background: rgba(30, 41, 59, 0.58);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.2);
}

#webChat .web-chat-soft-lock {
  margin: 8px 12px 0;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.4), rgba(30, 64, 175, 0.16));
  gap: 8px;
}

#webChat .web-chat-soft-lock__text {
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(226, 232, 240, 0.92);
}

#webChat .web-chat-soft-lock__cta.save-button.secondary {
  min-width: 118px;
  min-height: 31px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid rgba(191, 219, 254, 0.2);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.72), rgba(124, 58, 237, 0.7));
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.22);
}

#webChat .web-chat-messenger__body {
  position: relative;
  overflow: hidden;
}

#webChat .web-chat-messages {
  gap: 10px;
  padding: 18px 14px 182px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(2, 6, 23, 0.04) 55%, transparent 92%);
}

#webChat .web-chat-bubble-wrap {
  max-width: min(84%, 440px);
}

#webChat .web-chat-row--bot .web-chat-bubble-wrap {
  max-width: min(calc(100% - 46px), 460px);
}

#webChat .web-chat-bubble {
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}

#webChat .web-chat-bubble:hover {
  transform: none;
}

#webChat .web-chat-bubble--bot {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.18);
}

#webChat .web-chat-bubble--user {
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.25);
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-bubble--user {
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.23), rgba(59, 130, 246, 0.18));
  border: 1px solid rgba(45, 212, 191, 0.35);
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-bubble--user {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.24), rgba(59, 130, 246, 0.16));
  border: 1px solid rgba(56, 189, 248, 0.35);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-bubble--user {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.26), rgba(99, 102, 241, 0.18));
  border: 1px solid rgba(167, 139, 250, 0.35);
}

#webChat .web-chat-messenger__footer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  border-radius: 16px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.6));
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  gap: 8px;
}

#webChat .web-chat-mode-pills {
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.42);
  gap: 4px;
}

#webChat .web-chat-mode-pill {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.76rem;
  color: rgba(191, 219, 254, 0.66);
  background: transparent;
  border: 1px solid transparent;
  transform: none;
}

#webChat .web-chat-mode-pill:hover:not(.is-active):not(:disabled) {
  transform: none;
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: none;
}

#webChat .web-chat-mode-pill.is-active {
  transform: none;
  color: #f8fafc;
}

#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-mode-pill.is-active {
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.22), rgba(59, 130, 246, 0.16));
  border-color: rgba(45, 212, 191, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-mode-pill.is-active {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.22), rgba(59, 130, 246, 0.16));
  border-color: rgba(56, 189, 248, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-mode-pill.is-active {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.24), rgba(99, 102, 241, 0.16));
  border-color: rgba(167, 139, 250, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#webChat .web-chat-model-lock-banner--slim {
  margin: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

#webChat .web-chat-composer-bar {
  margin-top: 0;
}

#webChat .web-chat-composer {
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 3px 5px 3px 8px;
}

#webChat .web-chat-composer:focus-within {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(148, 163, 184, 0.24);
}

#webChat .web-chat-composer textarea,
#webChat #webChatInput {
  min-height: 38px;
  max-height: 80px;
  padding: 8px 44px 8px 2px;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.38;
  font-weight: 520;
  box-shadow: none;
}

#webChat #webChatInput::placeholder {
  color: rgba(203, 213, 225, 0.68);
  font-weight: 500;
}

#webChat .web-chat-send,
#webChat .web-chat-send--inline {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(191, 219, 254, 0.2);
  background: linear-gradient(145deg, #3b82f6, #6366f1);
  color: #eff6ff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.34);
  font-size: 0.82rem;
}

#webChat .web-chat-send:hover:not(:disabled),
#webChat .web-chat-send--inline:hover:not(:disabled) {
  transform: none;
  filter: brightness(1.06);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.36);
}

#webChat .web-chat-chip-strip {
  gap: 5px;
  padding-bottom: 0;
  max-height: 2.2rem;
}

#webChat .web-chat-chip-strip__chip,
#webChat .web-chat-chip-strip__chip--recent {
  max-width: min(208px, 68vw);
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.68rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.54);
  color: rgba(219, 234, 254, 0.9);
  box-shadow: none;
}

#webChat .web-chat-chip-strip__chip:hover,
#webChat .web-chat-chip-strip__chip--recent:hover {
  transform: none;
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(30, 41, 59, 0.7);
}

@media (min-width: 841px) {
  body:has(#webChat:not(.hidden)) .web-chat-fab {
    bottom: max(36px, env(safe-area-inset-bottom, 0px) + 20px);
  }

  body:has(#webChat:not(.hidden)) .daily-planner-fab {
    bottom: max(102px, env(safe-area-inset-bottom, 0px) + 70px);
  }

  .web-chat-fab,
  .daily-planner-fab {
    width: 42px;
    height: 42px;
    right: max(14px, env(safe-area-inset-right, 0px) + 8px);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.34), 0 0 0 1px rgba(148, 163, 184, 0.16);
  }

  .web-chat-fab::after,
  .daily-planner-fab::after {
    opacity: 0.22;
  }
}

@media (max-width: 840px) {
  #webChat .web-chat-messenger {
    min-height: min(calc(100dvh - 102px), 860px) !important;
    max-height: none !important;
  }
}

@media (max-width: 560px) {
  #webChat.web-chat-page--messenger {
    padding: 0 3px 10px;
  }

  #webChat .web-chat-messenger {
    border-radius: 20px;
  }

  #webChat .web-chat-messenger__header {
    padding: 9px 10px;
  }

  #webChat .web-chat-soft-lock {
    margin: 7px 9px 0;
    padding: 8px 9px;
  }

  #webChat .web-chat-messages {
    padding: 14px 10px 174px;
    gap: 9px;
  }

  #webChat .web-chat-messenger__footer {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 8px;
  }

  #webChat .web-chat-mode-pill {
    min-height: 29px;
    font-size: 0.72rem;
    padding: 0 8px;
  }

  #webChat .web-chat-composer textarea,
  #webChat #webChatInput {
    min-height: 36px;
    font-size: 0.81rem;
  }

  #webChat .web-chat-chip-strip__chip,
  #webChat .web-chat-chip-strip__chip--recent {
    max-width: min(180px, 64vw);
    font-size: 0.64rem;
  }

  .web-chat-fab,
  .daily-planner-fab {
    right: max(10px, env(safe-area-inset-right, 0px) + 6px);
    width: 40px;
    height: 40px;
  }
}

/* WEB CHAT PREMIUM REDESIGN OVERRIDE - mockup v2 */
#webChat.web-chat-page--messenger,
.web-chat,
.chat-panel,
.web-chat-panel,
.chatbot-panel {
  background:
    radial-gradient(circle at 50% 52%, rgba(0, 142, 255, 0.22), transparent 34%),
    radial-gradient(circle at 20% 10%, rgba(116, 70, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #050816 0%, #07142b 42%, #020611 100%) !important;
  border: none !important;
  box-shadow: none !important;
  color: #f8fbff !important;
}

#webChat .web-chat-messenger,
#webChat .web-chat-messenger.chat-container.chat-bot-mode,
#webChat .web-chat-messenger.chat-container.auto-mode,
#webChat .web-chat-messenger.chat-container.openai-mode {
  background:
    radial-gradient(circle at 50% 56%, rgba(37, 99, 235, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(6, 12, 30, 0.96) 0%, rgba(5, 10, 24, 0.96) 100%) !important;
  border: none !important;
  box-shadow: none !important;
}

#webChat .web-chat-messenger::after {
  opacity: 0.32 !important;
  filter: none !important;
  animation: none !important;
  transform: none !important;
}

/* top app bar */
.app-header,
.top-header,
.mobile-header,
#webChat .web-chat-messenger__header {
  background: rgba(5, 8, 22, 0.86) !important;
  backdrop-filter: blur(18px) !important;
  border-bottom: 1px solid rgba(120, 140, 255, 0.16) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28) !important;
}

/* main chatbot card */
.chatbot-card,
.chat-lock-card,
.chat-upgrade-card,
.web-chat-card,
#webChat .web-chat-soft-lock {
  margin: 14px 14px 0 !important;
  padding: 14px !important;
  border-radius: 20px !important;
  background: linear-gradient(145deg, rgba(15, 28, 72, 0.8), rgba(10, 12, 40, 0.9)) !important;
  border: 1px solid rgba(130, 120, 255, 0.2) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* bot title row */
.chatbot-title,
.chat-header-title,
#webChat .web-chat-messenger__title {
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  color: #ffffff !important;
}

.chatbot-status,
.online-status,
#webChat .web-chat-messenger__status {
  color: #c8d4ff !important;
  font-size: 13px !important;
}

.chatbot-avatar,
.bot-avatar,
#webChat .web-chat-messenger__title-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 18px !important;
  background: radial-gradient(circle, #1de7ff 0%, #4a4dff 55%, #1a143d 100%) !important;
  box-shadow: 0 0 28px rgba(50, 120, 255, 0.55) !important;
}

/* close button */
.chat-close,
.close-chat,
.chatbot-close,
#webChat .web-chat-messenger__back {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
}

/* upgrade message */
.upgrade-message,
.lock-message,
.chat-access-message,
#webChat .web-chat-soft-lock__text {
  color: #d7e0ff !important;
  line-height: 1.55 !important;
}

.upgrade-btn,
.upgrade-plan-btn,
#webChat .web-chat-soft-lock__cta.save-button.secondary,
#webChat .web-chat-model-lock-banner__cta {
  height: 44px !important;
  margin-top: 10px !important;
  border-radius: 14px !important;
  border: none !important;
  background: linear-gradient(90deg, #1e6bff, #7b28d9) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 14px 30px rgba(75, 80, 255, 0.26) !important;
}

/* chat bubble intro */
.chat-intro,
.bot-message,
.chat-empty-message,
#webChat .web-chat-bubble--bot {
  max-width: 78% !important;
  padding: 16px 18px !important;
  border-radius: 22px !important;
  background: rgba(20, 31, 72, 0.62) !important;
  border: 1px solid rgba(130, 150, 255, 0.16) !important;
  color: #bcd0ff !important;
  line-height: 1.55 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2) !important;
}

/* user bubble by mode */
#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-bubble--user {
  background: linear-gradient(135deg, rgba(22, 76, 255, 0.45), rgba(64, 88, 255, 0.35)) !important;
  border: 1px solid rgba(130, 150, 255, 0.24) !important;
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-bubble--user {
  background: linear-gradient(135deg, rgba(30, 107, 255, 0.45), rgba(56, 189, 248, 0.34)) !important;
  border: 1px solid rgba(125, 170, 255, 0.24) !important;
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-bubble--user {
  background: linear-gradient(135deg, rgba(80, 88, 255, 0.48), rgba(123, 40, 217, 0.38)) !important;
  border: 1px solid rgba(150, 130, 255, 0.26) !important;
}

/* bottom composer */
.chat-composer,
.chat-input-panel,
.message-composer,
#webChat .web-chat-messenger__footer {
  position: absolute !important;
  left: 14px !important;
  right: 14px !important;
  bottom: 14px !important;
  padding: 12px !important;
  border-radius: 22px !important;
  background: rgba(10, 16, 52, 0.82) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(125, 130, 255, 0.22) !important;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.34) !important;
  z-index: 50 !important;
}

/* tabs segmented control */
.chat-tabs,
.mode-tabs,
.chat-mode-tabs,
#webChat .web-chat-mode-pills {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  padding: 5px !important;
  border-radius: 18px !important;
  background: rgba(3, 8, 28, 0.72) !important;
  border: 1px solid rgba(125, 130, 255, 0.12) !important;
}

.chat-tabs button,
.mode-tabs button,
.chat-mode-tabs button,
#webChat .web-chat-mode-pill {
  height: 42px !important;
  border-radius: 14px !important;
  border: none !important;
  color: rgba(220, 230, 255, 0.55) !important;
  background: transparent !important;
  font-weight: 700 !important;
}

.chat-tabs button.active,
.mode-tabs button.active,
.chat-mode-tabs button.active,
#webChat .web-chat-mode-pill.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, #164cff, #6431ff) !important;
  box-shadow: 0 10px 24px rgba(70, 80, 255, 0.32) !important;
  border: none !important;
}

/* textarea/input */
.chat-input,
.chat-textarea,
.message-input,
#webChat .web-chat-composer,
#webChat .web-chat-composer textarea,
#webChat #webChatInput {
  min-height: 58px !important;
  border-radius: 18px !important;
  padding: 14px 64px 14px 16px !important;
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #eef4ff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.chat-input::placeholder,
.chat-textarea::placeholder,
.message-input::placeholder,
#webChat #webChatInput::placeholder {
  color: rgba(210, 220, 255, 0.45) !important;
}

/* send button */
.send-btn,
.chat-send,
.message-send,
#webChat .web-chat-send,
#webChat .web-chat-send--inline {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #4058ff, #7a3cff) !important;
  box-shadow: 0 12px 28px rgba(85, 75, 255, 0.4) !important;
  border: none !important;
  color: #ffffff !important;
}

/* chips */
.example-chip,
.suggestion-chip,
.quick-chip,
#webChat .web-chat-chip-strip__chip,
#webChat .web-chat-chip-strip__chip--recent {
  border-radius: 999px !important;
  padding: 9px 14px !important;
  background: rgba(42, 50, 120, 0.45) !important;
  border: 1px solid rgba(130, 150, 255, 0.16) !important;
  color: rgba(230, 236, 255, 0.72) !important;
  font-size: 12px !important;
}

/* floating buttons — desktop only; mobile stack lives in mobile-responsive.css */
@media (min-width: 841px) {
  .floating-chat-btn,
  .floating-calendar-btn,
  .chat-fab,
  .calendar-fab,
  .web-chat-fab,
  .daily-planner-fab {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg, rgba(30, 55, 120, 0.92), rgba(20, 20, 65, 0.96)) !important;
    border: 1px solid rgba(125, 150, 255, 0.24) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32) !important;
  }

  body:has(#webChat:not(.hidden)) .daily-planner-fab {
    bottom: max(102px, env(safe-area-inset-bottom, 0px) + 70px) !important;
  }

  body:has(#webChat:not(.hidden)) .web-chat-fab {
    bottom: max(36px, env(safe-area-inset-bottom, 0px) + 20px) !important;
  }
}

/* prevent bottom overlap — extra scroll room matches lifted FAB stack */
.chat-messages,
.chat-body,
.messages-area,
#webChat .web-chat-messages {
  padding-bottom: 222px !important;
}

/* mode-specific identity */
#webChat .web-chat-messenger.chat-container.chat-bot-mode .web-chat-mode-pill.is-active {
  background: linear-gradient(135deg, #1976ff, #3d63ff) !important;
}

#webChat .web-chat-messenger.chat-container.auto-mode .web-chat-mode-pill.is-active {
  background: linear-gradient(135deg, #1d8eff, #4b7dff) !important;
}

#webChat .web-chat-messenger.chat-container.openai-mode .web-chat-mode-pill.is-active {
  background: linear-gradient(135deg, #5c52ff, #7b28d9) !important;
}

/* mobile exact polish */
@media (max-width: 430px) {
  .chatbot-card,
  .chat-lock-card,
  .web-chat-card,
  #webChat .web-chat-soft-lock {
    margin: 12px !important;
    padding: 14px !important;
  }

  .chat-composer,
  .chat-input-panel,
  .message-composer,
  #webChat .web-chat-messenger__footer {
    left: 10px !important;
    right: 10px !important;
    bottom: 12px !important;
    padding: 10px !important;
  }

  .chatbot-title,
  .chat-header-title,
  #webChat .web-chat-messenger__title {
    font-size: 18px !important;
  }

  #webChat .web-chat-mode-pill {
    height: 38px !important;
    font-size: 12px !important;
  }

  #webChat .web-chat-send,
  #webChat .web-chat-send--inline {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
  }

  #webChat .web-chat-messages {
    padding-bottom: 208px !important;
  }
}

/* Web Chat practical fixes: input width, center send, clean mobile */
#webChat .web-chat-model-lock-banner {
  display: none !important;
}

#webChat .web-chat-messenger__footer {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

#webChat .web-chat-composer-bar {
  width: 100% !important;
}

#webChat .web-chat-composer {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 8px !important;
  min-height: 58px !important;
  padding: 6px 6px 6px 10px !important;
  overflow: hidden !important;
}

#webChat #webChatInput,
#webChat .web-chat-composer textarea {
  width: 100% !important;
  min-height: 44px !important;
  max-height: 88px !important;
  height: auto !important;
  padding: 10px 2px !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  overflow-y: auto !important;
  scrollbar-width: none !important;
}

#webChat #webChatInput::-webkit-scrollbar,
#webChat .web-chat-composer textarea::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

#webChat .web-chat-send,
#webChat .web-chat-send--inline {
  position: static !important;
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
  transform: none !important;
}

#webChat .web-chat-chip-strip {
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding-bottom: 2px !important;
}

#webChat .web-chat-messages {
  padding-bottom: 236px !important;
}

@media (max-width: 430px) {
  #webChat .web-chat-messenger__footer {
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    padding: 8px !important;
  }
  #webChat .web-chat-composer {
    min-height: 52px !important;
    padding: 5px 5px 5px 8px !important;
  }
  #webChat #webChatInput,
  #webChat .web-chat-composer textarea {
    min-height: 40px !important;
    max-height: 74px !important;
    font-size: 0.84rem !important;
  }
  #webChat .web-chat-send,
  #webChat .web-chat-send--inline {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }
  #webChat .web-chat-mode-pills {
    width: 100% !important;
  }
  #webChat .web-chat-messages {
    padding-bottom: 212px !important;
  }
  .web-chat-fab,
  .daily-planner-fab {
    right: max(8px, env(safe-area-inset-right, 0px) + 6px) !important;
  }
}

/* Web chat soft-lock compact + dismiss */
#webChat .web-chat-soft-lock {
  margin: 10px 12px 0 !important;
  padding: 10px 10px !important;
  border-radius: 14px !important;
  gap: 8px !important;
}

#webChat .web-chat-soft-lock__text {
  flex: 1 1 100% !important;
  font-size: 0.84rem !important;
  line-height: 1.45 !important;
}

#webChat .web-chat-soft-lock__cta.save-button.secondary {
  margin-top: 6px !important;
  height: 40px !important;
  min-width: 124px !important;
  font-size: 0.82rem !important;
}

#webChat .web-chat-soft-lock__dismiss {
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.78);
  color: rgba(226, 232, 240, 0.9);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

#webChat .web-chat-soft-lock__dismiss:hover {
  border-color: rgba(191, 219, 254, 0.45);
  background: rgba(30, 41, 59, 0.9);
}

@media (max-width: 430px) {
  #webChat .web-chat-soft-lock {
    margin: 8px 10px 0 !important;
    padding: 9px 8px !important;
  }
  #webChat .web-chat-soft-lock__text {
    font-size: 0.8rem !important;
  }
  #webChat .web-chat-soft-lock__cta.save-button.secondary {
    height: 38px !important;
    min-width: 114px !important;
    font-size: 0.78rem !important;
  }
}

/* Coins header edge-to-edge balance layout */
#coins-hub .page-shell.coins-dash-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

#coins-hub .coins-dash-topbar--balanced {
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 12px 12px;
  border-radius: 0 0 22px 22px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px;
  align-items: start;
  column-gap: 8px;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-back-btn {
  justify-self: start;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-topbar-text {
  justify-self: center;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

#coins-hub .coins-dash-topbar--balanced .coins-dash-page-title,
#coins-hub .coins-dash-topbar--balanced .coins-dash-topbar-text .eyebrow,
#coins-hub .coins-dash-subtitle {
  text-align: center;
}

#coins-hub .coins-dash-top-action {
  justify-self: end;
}

@media (max-width: 560px) {
  #coins-hub .coins-dash-topbar--balanced {
    margin-bottom: 10px;
    padding: 9px 10px 11px;
    border-radius: 0 0 18px 18px;
    grid-template-columns: 82px minmax(0, 1fr) 82px;
  }
  #coins-hub .coins-dash-topbar--balanced .coins-dash-topbar-text {
    max-width: 290px;
  }
}

/* Coins hub — pro layout (wallet first, section rhythm, 7-col streak) */
#coins-hub .page-shell.coins-dash-shell--pro {
  box-sizing: border-box;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 14px;
  padding-right: 14px;
  padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}

#coins-hub .coins-dash-shell--pro .coins-dash-topbar--pro {
  width: calc(100% + 28px);
  max-width: none;
  margin-left: -14px;
  margin-right: -14px;
  margin-bottom: 10px;
}

#coins-hub .coins-dash-subtitle--pro {
  max-width: 28ch;
  font-size: 0.74rem;
  line-height: 1.35;
  color: rgba(203, 213, 225, 0.82);
}

#coins-hub .coins-dash-section-label {
  margin: 16px 0 6px;
  padding: 0 2px;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

#coins-hub .coins-dash-section-label:first-of-type {
  margin-top: 4px;
}

#coins-hub .coins-dash-shell--pro .coins-dash-card {
  margin-bottom: 10px;
  padding: 14px 14px 15px;
  border-radius: 16px;
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.32);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#coins-hub .coins-dash-shell--pro .coins-dash-wallet-card {
  margin-top: 2px;
  border-color: rgba(56, 189, 248, 0.26);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.94) 0%, rgba(17, 28, 52, 0.96) 55%, rgba(30, 27, 75, 0.88) 100%);
}

#coins-hub .coins-dash-shell--pro .coins-dash-wallet-card .coins-dash-hero-aura {
  opacity: 0.55;
}

#coins-hub .coins-dash-wallet-redeem {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

#coins-hub .coins-dash-wallet-redeem .coins-hub-redeem-btn {
  min-height: 46px;
  border-radius: 12px;
  font-size: 0.86rem;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.14);
}

#coins-hub .coins-dash-shell--pro .coins-daily-checkin-card {
  border-color: rgba(52, 211, 153, 0.18);
  background: rgba(15, 23, 42, 0.82);
}

#coins-hub .coins-dash-shell--pro .coins-hub-task--video {
  border-color: rgba(52, 211, 153, 0.16);
  background: rgba(15, 23, 42, 0.82);
  padding: 12px 14px;
}

#coins-hub .coins-dash-shell--pro .coins-hub-task__hint {
  margin-top: 6px;
  font-size: 0.68rem;
  line-height: 1.35;
  opacity: 0.78;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#coins-hub .coins-dash-shell--pro .coins-dash-card--invite {
  border-color: rgba(129, 140, 248, 0.22);
  background: rgba(15, 23, 42, 0.82);
}

#coins-hub .coins-dash-shell--pro .coins-dash-card--invite .coins-dash-card-title--flush {
  display: none;
}

#coins-hub .coins-dash-shell--pro .coins-invite-panel__hint {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 0.76rem;
}

#coins-hub .coins-dash-shell--pro .coins-invite-panel__stats {
  margin-bottom: 0;
  padding: 10px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 10px;
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.35);
}

#coins-hub .daily-checkin-coins-row--week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding: 6px 0 0;
}

#coins-hub .daily-checkin-coins-row--week .daily-checkin-slot {
  flex: unset;
  min-width: 0;
  max-width: none;
  min-height: 0;
  padding: 5px 2px 6px;
  gap: 2px;
  border-radius: 10px;
}

#coins-hub .daily-checkin-coins-row--week .daily-checkin-slot__coin-ring {
  width: 1.9rem;
  height: 1.9rem;
}

#coins-hub .daily-checkin-coins-row--week .daily-checkin-slot__coin {
  font-size: 1.05rem;
}

#coins-hub .daily-checkin-coins-row--week .daily-checkin-slot__amt {
  font-size: 0.62rem;
}

#coins-hub .daily-checkin-coins-row--week .daily-checkin-slot__meta {
  font-size: 0.48rem;
  letter-spacing: 0.02em;
}

#coins-hub .daily-checkin-coins-row--week .daily-checkin-slot__tick {
  width: 14px;
  height: 14px;
  font-size: 0.5rem;
  right: -2px;
  bottom: -1px;
}

#coins-hub .coins-dash-shell--pro .coins-dash-bar-wrap--goal {
  margin-top: 2px;
}

#coins-hub .coins-dash-shell--pro .coins-dash-divider {
  margin: 10px 0;
  opacity: 0.65;
}

#coins-hub .coins-dash-shell--pro .coins-dash-details--learn {
  margin-top: 4px;
  border-radius: 14px;
}

@media (max-width: 380px) {
  #coins-hub .daily-checkin-coins-row--week {
    gap: 3px;
  }
  #coins-hub .daily-checkin-coins-row--week .daily-checkin-slot__coin-ring {
    width: 1.65rem;
    height: 1.65rem;
  }
  #coins-hub .daily-checkin-coins-row--week .daily-checkin-slot__coin {
    font-size: 0.92rem;
  }
}

body.theme-normal #coins-hub .coins-dash-shell--pro .coins-dash-card {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

body.theme-normal #coins-hub .coins-dash-section-label {
  color: #64748b;
}

/**
 * Mobile perf: lighter glass + promote floating controls; keeps look, cuts repaint cost while scrolling.
 */
@media (max-width: 600px) {
  :root {
    --depth-glass-blur: 0px;
  }
  .web-chat-fab,
  #webChatFab,
  #dailyPlannerFab,
  .daily-planner-fab {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  #webChat.web-chat-drawer .web-chat-messenger {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.98) !important;
    box-shadow: 0 12px 28px rgba(2, 8, 20, 0.32) !important;
  }
}

/* APK: lighter inherited glass tokens — same hierarchy, cheaper compositing on scroll */
html.capacitor-native {
  --depth-glass-blur: 0px;
  --depth-elev-1: 0 4px 12px rgba(0, 0, 0, 0.16);
  --depth-elev-2: 0 8px 20px rgba(0, 0, 0, 0.22);
  --ds-shadow: 0 8px 20px rgba(2, 8, 22, 0.22);
  --ds-shadow-soft: 0 4px 12px rgba(2, 8, 22, 0.16);
}

@media (max-width: 600px), (pointer: coarse) {
  html.capacitor-native {
    --depth-glass-blur: 0px;
    --depth-elev-1: 0 3px 10px rgba(0, 0, 0, 0.14);
    --depth-elev-2: 0 6px 16px rgba(0, 0, 0, 0.2);
    --ds-shadow: 0 6px 16px rgba(2, 8, 22, 0.2);
    --ds-shadow-soft: 0 3px 10px rgba(2, 8, 22, 0.14);
  }

  html.capacitor-native #webChat.web-chat-drawer .web-chat-messenger {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.98) !important;
  }

  html.capacitor-native .web-chat-fab,
  html.capacitor-native #webChatFab,
  html.capacitor-native #dailyPlannerFab {
    contain: layout paint;
  }
}

@media (max-width: 840px) {
  /* WebView-safe: extra lift when OS doesn’t populate safe-area insets for gesture/nav bars */
  html.capacitor-native .sidebar {
    padding-bottom: max(44px, calc(26px + env(safe-area-inset-bottom, 32px))) !important;
    scroll-padding-bottom: max(48px, calc(32px + env(safe-area-inset-bottom, 32px)));
  }

}

/* —— UI balance pass (Free + Standard, Chat Bot only) —— */
.premium-hero {
  padding: 8px 0 16px;
}

.premium-hero-lead {
  margin-bottom: 10px;
}

.pricing-lite-plans .premium-section-heading {
  margin-bottom: 12px;
}

.pricing-lite-card--free .pricing-lite-benefits--compact {
  min-height: 4.5rem;
}

#webChat .web-chat-messenger__header {
  padding-bottom: 10px;
}

#webChat .web-chat-soft-lock--slim {
  margin: 4px 10px 0;
}

.settings-section-pane {
  padding: 2px 0 4px;
}

.settings-premium-card .settings-billing-grid {
  gap: 10px 12px;
}

.settings-upgrade-btn {
  margin-top: 10px;
}

#bot .bot-context-strip {
  margin-bottom: 14px;
}

@media (max-width: 840px) {
  .home-dashboard-top {
    gap: 16px;
  }

  .home-dashboard-primary {
    gap: 12px;
  }

  #bot .premium-hero {
    padding: 6px 0 12px;
  }

  .pricing-lite-trust {
    justify-content: center;
    text-align: center;
  }
}
