    :root {
      --saffron: #E8690A;
      --deep-saffron: #C45000;
      --gold: #D4A017;
      --gold-light: #F5C842;
      --cream: #FDF6E3;
      --dark: #211304;
      --dark-mid: #362006;
      --lotus-pink: #C9627A;
      --deep-teal: #0D4A47;
      --text-body: #3A2000;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      background-color: var(--dark);
      color: var(--cream);
      font-family: 'Crimson Pro', Georgia, serif;
      min-height: 100vh;
      overflow-x: hidden;
      animation: app-boot 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
    html.popup-scroll-lock,
    body.popup-scroll-lock {
      overflow: hidden !important;
      overscroll-behavior: none;
      height: 100dvh;
    }
    body.popup-scroll-lock #chat-window {
      overflow: hidden !important;
    }

    /* Ultra-safe onboarding guard until auth/session + first paint settle */
    body:not(.auth-ready-visible) #onboarding {
      display: none !important;
      opacity: 0 !important;
      pointer-events: none !important;
    }
    /* Prevent top utility auth flicker during session hydration */
    body:not(.auth-ready-visible) .utility-bar {
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
    }

    @keyframes app-boot {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background:
        radial-gradient(ellipse at 20% 20%, rgba(232,105,10,0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(212,160,23,0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(201,98,122,0.06) 0%, transparent 70%);
      pointer-events: none;
      z-index: 0;
      animation: ambient-drift 34s ease-in-out infinite alternate;
      transform-origin: center;
    }

    @keyframes ambient-drift {
      0% { transform: translate3d(0, 0, 0) scale(1); filter: saturate(100%); }
      50% { transform: translate3d(0, -6px, 0) scale(1.02); filter: saturate(105%); }
      100% { transform: translate3d(0, 4px, 0) scale(1.015); filter: saturate(98%); }
    }

    .top-border {
      width: 100%;
      height: 6px;
      background: linear-gradient(90deg, var(--deep-saffron), var(--gold), var(--gold-light), var(--gold), var(--deep-saffron));
    }

    /* ── Header ── */
    header {
      position: relative;
      z-index: 1;
      text-align: center;
      padding: 98px 24px 20px;
      animation: section-enter 420ms var(--ease-standard, cubic-bezier(0.22, 1, 0.36, 1)) both;
      transition: padding var(--dur-base) var(--ease-standard);
    }

    /* ── Auth button (top-right) ── */
    .auth-corner {
      position: fixed;
      top: 14px;
      right: 16px;
      z-index: 50;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .auth-btn {
      background: rgba(212,160,23,0.12);
      border: 1.5px solid rgba(212,160,23,0.35);
      color: var(--gold-light);
      font-family: 'Crimson Pro', serif;
      font-size: 0.9rem;
      padding: 7px 16px;
      border-radius: 50px;
      cursor: pointer;
      transition: all 0.2s;
      letter-spacing: 0.04em;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .auth-btn:hover {
      background: rgba(212,160,23,0.22);
      border-color: var(--gold);
    }

    .auth-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold), var(--deep-saffron));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      cursor: pointer;
      box-shadow: 0 0 12px rgba(212,160,23,0.35);
      border: 1.5px solid rgba(212,160,23,0.4);
      transition: all 0.2s;
    }

    .auth-avatar:hover { box-shadow: 0 0 20px rgba(212,160,23,0.5); }

    .auth-user-name {
      font-size: 0.85rem;
      color: rgba(253,246,227,0.74);
      letter-spacing: 0.04em;
      max-width: 100px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .om-symbol {
      font-size: 52px;
      line-height: 1;
      color: var(--gold);
      text-shadow: 0 0 30px rgba(212,160,23,0.6);
      margin-bottom: 16px;
      display: block;
      animation: glow-pulse 3s ease-in-out infinite;
      transition: font-size var(--dur-base) var(--ease-standard), margin-bottom var(--dur-base) var(--ease-standard);
    }

    @keyframes glow-pulse {
      0%, 100% { text-shadow: 0 0 20px rgba(212,160,23,0.5); }
      50%       { text-shadow: 0 0 50px rgba(212,160,23,0.9), 0 0 80px rgba(232,105,10,0.4); }
    }

    h1 {
      font-family: 'Yatra One', cursive;
      font-size: clamp(2.2rem, 6vw, 3.8rem);
      color: var(--gold-light);
      letter-spacing: 0.04em;
      line-height: 1.1;
      margin-bottom: 8px;
      transition: font-size var(--dur-base) var(--ease-standard), margin-bottom var(--dur-base) var(--ease-standard);
    }

    .tagline {
      font-family: 'Crimson Pro', serif;
      font-style: italic;
      font-size: clamp(1rem, 2.5vw, 1.25rem);
      color: rgba(253,246,227,0.74);
      letter-spacing: 0.06em;
      margin-bottom: 24px;
      transition: margin-bottom var(--dur-base) var(--ease-standard), font-size var(--dur-base) var(--ease-standard), opacity var(--dur-base) var(--ease-standard);
    }

    .lang-bar {
      display: flex;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }

    .lang-btn {
      background: transparent;
      border: 1.5px solid rgba(212,160,23,0.4);
      color: rgba(253,246,227,0.78);
      padding: 6px 18px;
      border-radius: 50px;
      font-family: 'Crimson Pro', serif;
      font-size: 1rem;
      cursor: pointer;
      transition: all 0.25s;
      letter-spacing: 0.03em;
    }

    .lang-btn:hover, .lang-btn.active {
      background: rgba(212,160,23,0.18);
      border-color: var(--gold);
      color: var(--gold-light);
    }

    .divider {
      text-align: center;
      color: rgba(212,160,23,0.35);
      font-size: 1.3rem;
      letter-spacing: 0.5rem;
      margin: 4px 0 28px;
      transition: margin var(--dur-base) var(--ease-standard), opacity var(--dur-base) var(--ease-standard);
    }

    main {
      position: relative;
      z-index: 1;
      max-width: 820px;
      margin: 0 auto;
      padding: 0 16px 48px;
      animation: section-enter 520ms var(--ease-standard, cubic-bezier(0.22, 1, 0.36, 1)) both;
    }

    #chat-window {
      background: linear-gradient(180deg, rgba(48,28,4,0.72), rgba(29,17,2,0.72));
      border: 1px solid rgba(212,160,23,0.26);
      border-radius: 16px;
      min-height: 420px;
      max-height: 520px;
      overflow-y: auto;
      padding: 28px 24px;
      margin-top: 20px;
      margin-bottom: 0;
      scroll-behavior: smooth;
      backdrop-filter: blur(6px);
    }

    #chat-window::-webkit-scrollbar { width: 5px; }
    #chat-window::-webkit-scrollbar-track { background: transparent; }
    #chat-window::-webkit-scrollbar-thumb { background: rgba(212,160,23,0.3); border-radius: 4px; }

    .thread-toggle {
      position: fixed;
      top: 14px;
      left: 16px;
      z-index: 52;
      display: none;
      align-items: center;
      gap: 8px;
      background: rgba(212,160,23,0.12);
      border: 1.5px solid rgba(212,160,23,0.35);
      color: var(--gold-light);
      font-family: 'Crimson Pro', serif;
      font-size: 0.9rem;
      padding: 8px 14px;
      border-radius: 999px;
      cursor: pointer;
      transition: all 0.2s;
      letter-spacing: 0.04em;
    }

    .thread-toggle:hover {
      background: rgba(212,160,23,0.22);
      border-color: var(--gold);
    }

    .thread-overlay {
      position: fixed;
      inset: 0;
      background: rgba(8, 4, 0, 0.56);
      backdrop-filter: blur(4px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.24s ease;
      z-index: 58;
    }

    .thread-overlay.open {
      opacity: 1;
      pointer-events: auto;
    }

    .thread-sidebar {
      position: fixed;
      top: 0;
      left: 0;
      height: 100vh;
      width: min(360px, 92vw);
      background:
        linear-gradient(180deg, rgba(58,33,4,0.97), rgba(30,18,2,0.98)),
        radial-gradient(circle at top left, rgba(212,160,23,0.14), transparent 45%);
      border-right: 1px solid rgba(212,160,23,0.2);
      box-shadow: 20px 0 60px rgba(0,0,0,0.38);
      transform: translateX(-100%);
      transition: transform 0.26s ease;
      z-index: 59;
      display: flex;
      flex-direction: column;
    }

    .thread-sidebar.open {
      transform: translateX(0);
    }

    .thread-sidebar-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 18px 18px 14px;
      border-bottom: 1px solid rgba(212,160,23,0.12);
    }

    .thread-sidebar-title {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .thread-sidebar-kicker {
      font-size: 0.72rem;
      font-family: 'Crimson Pro', serif;
      text-transform: uppercase;
      letter-spacing: 0.15em;
      color: rgba(253,246,227,0.38);
    }

    .thread-sidebar-name {
      font-family: 'Crimson Pro', serif;
      font-size: 1rem;
      font-style: italic;
      font-weight: 400;
      color: rgba(253,246,227,0.92);
      letter-spacing: 0.01em;
    }

    .thread-close-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 1px solid rgba(212,160,23,0.22);
      background: rgba(212,160,23,0.08);
      color: var(--gold-light);
      cursor: pointer;
      transition: all 0.2s;
      font-size: 1rem;
    }

    .thread-close-btn:hover {
      background: rgba(212,160,23,0.16);
      border-color: rgba(212,160,23,0.42);
    }

    .thread-sidebar-actions {
      padding: 14px 18px 0;
    }

    .thread-new-btn {
      background: rgba(212,160,23,0.12);
      border: 1px solid rgba(212,160,23,0.3);
      border-radius: 999px;
      color: var(--gold-light);
      font-family: 'Crimson Pro', serif;
      font-size: 0.84rem;
      padding: 8px 15px;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
      letter-spacing: 0.03em;
    }

    .thread-new-btn:hover {
      background: rgba(212,160,23,0.2);
      border-color: var(--gold);
    }

    .thread-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 14px 16px 20px;
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: rgba(212,160,23,0.35) transparent;
      min-height: 0;
      flex: 1;
    }

    .thread-list::-webkit-scrollbar { width: 5px; }
    .thread-list::-webkit-scrollbar-track { background: transparent; }
    .thread-list::-webkit-scrollbar-thumb { background: rgba(212,160,23,0.3); border-radius: 999px; }

    .thread-chip {
      width: 100%;
      padding: 13px 14px 12px;
      border-radius: 14px;
      border: 1px solid rgba(212,160,23,0.16);
      background: rgba(58,33,4,0.34);
      color: var(--cream);
      cursor: pointer;
      transition: all 0.2s;
      text-align: left;
    }

    .thread-chip-row {
      display: flex;
      align-items: stretch;
      gap: 8px;
    }

    .thread-chip-main {
      flex: 1;
      min-width: 0;
    }

    .thread-delete-btn {
      width: 40px;
      min-width: 40px;
      border-radius: 12px;
      border: 1px solid rgba(212,160,23,0.2);
      background: linear-gradient(180deg, rgba(58,33,4,0.5), rgba(38,22,3,0.6));
      color: rgba(212,160,23,0.82);
      cursor: pointer;
      transition: all 0.2s ease;
      font-size: 0.92rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      box-shadow: inset 0 1px 0 rgba(245,200,66,0.08);
    }

    .thread-delete-btn:hover {
      background: linear-gradient(180deg, rgba(76,38,4,0.7), rgba(48,24,3,0.74));
      border-color: rgba(212,160,23,0.42);
      color: var(--gold-light);
      transform: translateY(-1px);
      box-shadow: 0 6px 14px rgba(0,0,0,0.22);
    }

    .thread-confirm {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 10px;
      border-radius: 14px;
      border: 1px solid rgba(212,160,23,0.28);
      background: linear-gradient(160deg, rgba(52,29,4,0.94), rgba(28,16,2,0.95));
      min-width: 184px;
      box-shadow: 0 8px 18px rgba(0,0,0,0.26);
      animation: thread-confirm-enter 0.22s ease both;
      transform-origin: right center;
    }

    @keyframes thread-confirm-enter {
      from { opacity: 0; transform: translateX(6px) scale(0.96); }
      to   { opacity: 1; transform: translateX(0) scale(1); }
    }

    .thread-confirm-text {
      font-size: 0.76rem;
      color: rgba(253,246,227,0.84);
      letter-spacing: 0.04em;
      white-space: nowrap;
      font-style: italic;
      margin-right: 1px;
    }

    .thread-confirm-btn {
      border: 1px solid rgba(212,160,23,0.32);
      background: rgba(212,160,23,0.12);
      color: rgba(253,246,227,0.88);
      border-radius: 999px;
      padding: 3px 9px;
      font-size: 0.71rem;
      cursor: pointer;
      transition: all 0.2s ease;
      line-height: 1.2;
      letter-spacing: 0.03em;
    }

    .thread-confirm-btn:hover {
      background: rgba(212,160,23,0.18);
      border-color: rgba(212,160,23,0.44);
    }

    .thread-confirm-btn.danger {
      border-color: rgba(232,128,128,0.45);
      background: rgba(232,128,128,0.16);
      color: rgba(255,204,204,0.96);
    }

    .thread-confirm-btn.danger:hover {
      border-color: rgba(232,128,128,0.5);
      background: rgba(232,128,128,0.2);
    }

    .thread-chip-row.confirming .thread-chip-main {
      border-color: rgba(212,160,23,0.36);
      background: linear-gradient(180deg, rgba(212,160,23,0.12), rgba(212,160,23,0.05));
      box-shadow: 0 0 0 1px rgba(212,160,23,0.05) inset;
    }

    .thread-chip:hover {
      border-color: rgba(212,160,23,0.22);
      background: rgba(58,33,4,0.5);
      transform: translateY(-1px);
    }

    .thread-chip.active {
      border-color: rgba(212,160,23,0.3);
      background: linear-gradient(180deg, rgba(212,160,23,0.11), rgba(212,160,23,0.05));
      box-shadow: 0 0 0 1px rgba(212,160,23,0.04) inset, 0 8px 18px rgba(0,0,0,0.12);
    }

    .thread-chip-title {
      font-family: 'Crimson Pro', serif;
      font-size: 0.9rem;
      font-weight: 400;
      color: rgba(253,246,227,0.9);
      margin-bottom: 6px;
      line-height: 1.35;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .thread-chip-time {
      font-family: 'Crimson Pro', serif;
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(212,160,23,0.62);
    }

    .thread-empty {
      border: 1px dashed rgba(212,160,23,0.22);
      border-radius: 16px;
      padding: 18px 16px;
      color: rgba(253,246,227,0.64);
      font-size: 0.9rem;
      font-style: italic;
      line-height: 1.6;
      background: rgba(44,24,0,0.32);
    }

    .message { margin-bottom: 28px; animation: fade-up 0.4s ease both; }

    @keyframes fade-up {
      from { opacity: 0; transform: translateY(12px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .message.user {
      display: flex;
      flex-direction: row;
      justify-content: flex-end;
      align-items: flex-start;
      gap: 14px;
    }

    .message.user .user-wrap {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
    }

    .user-avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold), var(--deep-saffron));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      flex-shrink: 0;
      box-shadow: 0 0 16px rgba(212,160,23,0.28);
      border: 1.5px solid rgba(212,160,23,0.35);
      color: var(--dark);
      font-weight: 700;
    }

    .message.user .bubble {
      background: rgba(232,105,10,0.18);
      border: 1px solid rgba(232,105,10,0.35);
      color: var(--cream);
      padding: 12px 18px;
      border-radius: 18px 4px 18px 18px;
      max-width: 75%;
      font-size: 1.05rem;
      line-height: 1.6;
    }

    .message.krishna { display: flex; gap: 14px; align-items: flex-start; }

    .krishna-avatar {
      width: 42px; height: 42px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold), var(--deep-saffron));
      display: flex; align-items: center; justify-content: center;
      font-size: 1.4rem; flex-shrink: 0;
      box-shadow: 0 0 16px rgba(212,160,23,0.4);
    }

    .message.krishna .bubble {
      background: rgba(44,24,0,0.6);
      border: 1px solid rgba(212,160,23,0.25);
      color: var(--cream);
      padding: 14px 18px;
      border-radius: 4px 18px 18px 18px;
      max-width: 85%;
      font-size: 1.08rem;
      line-height: 1.75;
    }

    .message.krishna .bubble .verse-ref {
      display: inline-block;
      margin-top: 10px;
      font-size: 0.82rem;
      color: var(--gold);
      opacity: 0.8;
      font-style: italic;
      letter-spacing: 0.04em;
    }

    .sender-label {
      font-size: 0.78rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      opacity: 0.5;
      margin-bottom: 5px;
    }

    .typing-indicator { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }

    .typing-dots {
      display: flex; gap: 5px; padding: 14px 18px;
      background: rgba(44,24,0,0.6);
      border: 1px solid rgba(212,160,23,0.2);
      border-radius: 4px 18px 18px 18px;
    }

    .typing-dots span {
      width: 8px; height: 8px;
      background: var(--gold);
      border-radius: 50%;
      animation: bounce 1.2s infinite;
      opacity: 0.6;
    }
    .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
    .typing-dots span:nth-child(3) { animation-delay: 0.4s; }

    @keyframes bounce {
      0%, 80%, 100% { transform: translateY(0); }
      40%            { transform: translateY(-7px); opacity: 1; }
    }

    .suggestions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-auto-rows: 46px;
      gap: 8px;
      margin-bottom: 16px;
      align-items: stretch;
    }

    .suggestion-chip {
      background: rgba(212,160,23,0.045);
      border: 1px solid rgba(212,160,23,0.18);
      color: rgba(253,246,227,0.72);
      padding: 0 14px;
      border-radius: 999px;
      font-size: 0.84rem;
      font-family: 'Crimson Pro', serif;
      cursor: pointer;
      transition: all 0.2s;
      line-height: 1;
      min-height: 46px;
      max-height: 46px;
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: left;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      letter-spacing: 0.01em;
    }

    .suggestion-chip:hover {
      background: rgba(212,160,23,0.12);
      color: var(--gold-light);
      border-color: rgba(212,160,23,0.36);
    }

    @media (max-width: 560px) {
      .suggestions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 44px;
      }
      .suggestion-chip {
        min-height: 44px;
        max-height: 44px;
        font-size: 0.8rem;
        padding: 0 12px;
      }
    }

    /* Quick reply chips after Krishna messages */
    .quick-replies {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 12px;
      padding-top: 10px;
      border-top: 1px solid rgba(212,160,23,0.12);
      animation: fade-up 0.4s ease both;
      animation-delay: 0.2s;
    }

    .quick-reply-chip {
      background: rgba(212,160,23,0.07);
      border: 1px solid rgba(212,160,23,0.25);
      color: rgba(253,246,227,0.7);
      padding: 6px 13px;
      border-radius: 50px;
      font-size: 0.84rem;
      font-family: 'Crimson Pro', serif;
      cursor: pointer;
      transition: all 0.2s;
      line-height: 1.3;
      letter-spacing: 0.02em;
    }

    .quick-reply-chip:hover {
      background: rgba(212,160,23,0.16);
      color: var(--gold-light);
      border-color: rgba(212,160,23,0.5);
      transform: translateY(-1px);
    }

    .input-area { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; }

    #user-input {
      flex: 1;
      background: rgba(26,15,0,0.8);
      border: 1.5px solid rgba(212,160,23,0.3);
      border-radius: 12px;
      color: var(--cream);
      font-family: 'Crimson Pro', serif;
      font-size: 1.05rem;
      padding: 14px 18px;
      resize: none;
      min-height: 52px;
      max-height: 140px;
      transition: border-color 0.2s;
      line-height: 1.5;
    }

    #user-input::placeholder { color: rgba(253,246,227,0.3); }
    #user-input:focus { outline: none; border-color: var(--gold); }

    #send-btn {
      background: linear-gradient(135deg, var(--saffron), var(--deep-saffron));
      border: none; border-radius: 12px;
      width: 52px; height: 52px;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: all 0.2s; flex-shrink: 0;
      box-shadow: 0 4px 16px rgba(232,105,10,0.35);
    }

    #send-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(232,105,10,0.5); }
    #send-btn:active { transform: scale(0.97); }
    #send-btn svg { width: 22px; height: 22px; fill: white; }

    .welcome-msg { text-align: center; padding: 32px 16px; opacity: 0.75; }
    .welcome-msg .peacock-feather { font-size: 3rem; display: block; margin-bottom: 12px; }
    .welcome-msg p { font-style: italic; font-size: 1.1rem; line-height: 1.8; color: rgba(253,246,227,0.7); }

    /* ── Verse of the Day ── */
    .votd-section {
      position: relative; z-index: 1;
      max-width: 820px; margin: 28px auto 32px; padding: 0 16px;
      animation: section-enter 600ms var(--ease-standard, cubic-bezier(0.22, 1, 0.36, 1)) both;
    }

    .votd-card {
      background: linear-gradient(135deg, rgba(44,24,0,0.85) 0%, rgba(26,15,0,0.9) 100%);
      border: 1px solid rgba(212,160,23,0.35);
      border-radius: 16px; padding: 28px 32px;
      position: relative; overflow: hidden;
    }

    .votd-card::before {
      content: '❝';
      position: absolute; top: -10px; left: 18px;
      font-size: 7rem; color: rgba(212,160,23,0.07);
      font-family: Georgia, serif; line-height: 1; pointer-events: none;
    }

    .votd-label {
      display: flex; align-items: center; gap: 8px;
      font-size: 0.75rem; letter-spacing: 0.15em;
      text-transform: uppercase; color: var(--gold); opacity: 0.8; margin-bottom: 14px;
    }

    .votd-label::before, .votd-label::after {
      content: ''; flex: 1; height: 1px; background: rgba(212,160,23,0.25);
    }

    .votd-sanskrit {
      font-family: 'Tiro Devanagari Sanskrit', serif;
      font-size: clamp(1rem, 2.5vw, 1.2rem);
      color: var(--gold-light); line-height: 1.9; margin-bottom: 14px;
      text-align: center; letter-spacing: 0.03em;
    }

    .votd-translation {
      font-family: 'Crimson Pro', serif; font-style: italic;
      font-size: clamp(1.05rem, 2.5vw, 1.2rem);
      color: rgba(253,246,227,0.85); line-height: 1.75;
      text-align: center; margin-bottom: 16px;
    }

    .votd-ref { text-align: center; font-size: 0.82rem; color: var(--gold); opacity: 0.7; letter-spacing: 0.06em; }
    .votd-separator { width: 60px; height: 1px; background: rgba(212,160,23,0.3); margin: 12px auto; }
    .votd-actions {
      margin-top: 16px;
      display: flex;
      justify-content: center;
    }
    .votd-share-btn {
      background: rgba(212,160,23,0.12);
      border: 1px solid rgba(212,160,23,0.34);
      color: var(--gold-light);
      border-radius: 999px;
      padding: 8px 16px;
      font-family: 'Crimson Pro', serif;
      font-size: 0.86rem;
      letter-spacing: 0.04em;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .votd-share-btn:hover {
      background: rgba(212,160,23,0.22);
      border-color: var(--gold);
      transform: translateY(-1px);
    }
    .votd-share-render {
      position: fixed;
      left: -9999px;
      top: 0;
      width: 1200px;
      pointer-events: none;
      z-index: -1;
    }
    .votd-share-frame {
      width: 1200px;
      min-height: 1500px;
      padding: 82px 86px;
      background:
        radial-gradient(circle at 20% 16%, rgba(212,160,23,0.22), transparent 40%),
        radial-gradient(circle at 84% 86%, rgba(201,98,122,0.12), transparent 44%),
        #211304;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .votd-share-card {
      width: 100%;
      background: linear-gradient(160deg, #2b1802, #170d01);
      border: 2px solid rgba(212,160,23,0.42);
      border-radius: 32px;
      padding: 62px 66px 50px;
      color: #fdf6e3;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
      font-family: 'Crimson Pro', serif;
    }
    .votd-share-card .votd-label {
      font-size: 1.42rem;
      letter-spacing: 0.1em;
      margin-bottom: 36px;
    }
    .votd-share-card .votd-sanskrit {
      font-size: 2.28rem;
      line-height: 1.75;
      margin-bottom: 28px;
    }
    .votd-share-card .votd-separator {
      width: 132px;
      margin: 24px auto;
    }
    .votd-share-card .votd-translation {
      font-size: 2.18rem;
      line-height: 1.75;
      margin-bottom: 30px;
    }
    .votd-share-card .votd-ref {
      font-size: 1.34rem;
      letter-spacing: 0.05em;
    }
    .votd-share-footer {
      margin-top: 28px;
      padding-top: 22px;
      border-top: 1px solid rgba(212,160,23,0.28);
      font-size: 1.26rem;
      color: rgba(253,246,227,0.86);
      text-align: center;
      letter-spacing: 0.02em;
      line-height: 1.5;
    }

    footer {
      position: relative; z-index: 1; text-align: center; padding: 20px;
      font-size: 0.82rem; color: rgba(253,246,227,0.3); letter-spacing: 0.06em;
      border-top: 1px solid rgba(212,160,23,0.1);
      animation: section-enter 680ms var(--ease-standard, cubic-bezier(0.22, 1, 0.36, 1)) both;
    }

    @keyframes section-enter {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 520px) {
      .message.user .bubble, .message.krishna .bubble { max-width: 92%; }
      #chat-window { padding: 18px 14px; }
    }

    /* ════════════════════════════════════
       ONBOARDING OVERLAY
    ════════════════════════════════════ */
    #onboarding {
      position: fixed; inset: 0;
      background:
        linear-gradient(180deg, rgba(10,6,0,0.92), rgba(16,9,0,0.95)),
        radial-gradient(circle at top, rgba(212,160,23,0.08), transparent 42%);
      backdrop-filter: blur(12px);
      z-index: 100;
      display: flex; align-items: center; justify-content: center;
      padding: 16px; animation: fade-in 0.5s ease;
      overflow: hidden;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    #onboarding::-webkit-scrollbar { display: none; }

    @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

    .onboarding-card {
      background:
        linear-gradient(180deg, rgba(47,27,2,0.96), rgba(24,14,0,0.98)),
        radial-gradient(circle at top, rgba(212,160,23,0.08), transparent 48%);
      border: 1px solid rgba(212,160,23,0.24);
      border-radius: 24px;
      max-width: 458px; width: 100%;
      padding: 24px 24px 18px;
      text-align: center;
      box-shadow:
        0 24px 80px rgba(0,0,0,0.58),
        inset 0 1px 0 rgba(245,200,66,0.06),
        0 0 60px rgba(212,160,23,0.06);
      animation: slide-up 0.5s ease;
      position: relative;
      max-height: none;
      overflow: hidden;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .onboarding-card::-webkit-scrollbar { display: none; }

    @keyframes slide-up {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .onboarding-om {
      font-size: 1.7rem;
      display: block;
      margin-bottom: 8px;
      color: rgba(245,200,66,0.92);
      text-shadow: 0 0 22px rgba(212,160,23,0.34);
      animation: glow-pulse 3s ease-in-out infinite;
    }
    .onboarding-title {
      font-family: 'Crimson Pro', serif;
      font-size: 1.78rem;
      line-height: 1.05;
      font-weight: 600;
      letter-spacing: 0.02em;
      color: rgba(253,246,227,0.95);
      margin-bottom: 6px;
    }
    .onboarding-subtitle {
      font-family: 'Crimson Pro', serif;
      font-style: italic;
      color: rgba(253,246,227,0.64);
      font-size: 0.94rem;
      margin-bottom: 14px;
      line-height: 1.55;
      letter-spacing: 0.02em;
    }
    .onboarding-label {
      text-align: left;
      font-size: 0.74rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(245,200,66,0.72);
      margin-bottom: 6px;
      font-family: 'Crimson Pro', serif;
    }

    .onboarding-input {
      width: 100%;
      background: rgba(26,15,0,0.72);
      border: 1px solid rgba(212,160,23,0.2);
      border-radius: 14px;
      color: rgba(253,246,227,0.92);
      font-family: 'Crimson Pro', serif;
      font-size: 0.98rem;
      padding: 11px 14px;
      margin-bottom: 12px;
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
      box-shadow: inset 0 1px 0 rgba(245,200,66,0.03);
    }
    .onboarding-input::placeholder { color: rgba(253,246,227,0.28); font-style: italic; }
    .onboarding-input:focus {
      outline: none;
      border-color: rgba(212,160,23,0.42);
      box-shadow: 0 0 0 3px rgba(212,160,23,0.07);
      background: rgba(26,15,0,0.8);
    }

    .onboarding-question {
      text-align: left;
      font-size: 0.74rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(245,200,66,0.72);
      margin-bottom: 8px;
      font-family: 'Crimson Pro', serif;
    }

    .intent-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 14px;
    }

    .intent-btn {
      background: rgba(212,160,23,0.05);
      border: 1px solid rgba(212,160,23,0.16);
      border-radius: 16px;
      color: rgba(253,246,227,0.72);
      font-family: 'Crimson Pro', serif;
      font-size: 0.9rem;
      padding: 10px 8px 9px;
      cursor: pointer;
      transition: all 0.2s;
      line-height: 1.35;
      text-align: center;
      min-height: 64px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 4px;
    }
    .intent-btn:hover {
      background: rgba(212,160,23,0.1);
      color: rgba(253,246,227,0.9);
      border-color: rgba(212,160,23,0.28);
      transform: translateY(-1px);
    }
    .intent-btn.selected {
      background: linear-gradient(180deg, rgba(212,160,23,0.14), rgba(212,160,23,0.08));
      border-color: rgba(212,160,23,0.34);
      color: var(--gold-light);
      box-shadow: inset 0 1px 0 rgba(245,200,66,0.06), 0 0 0 1px rgba(212,160,23,0.03);
    }
    .intent-btn .intent-icon {
      display: block;
      font-size: 1.02rem;
      margin-bottom: 1px;
      opacity: 0.9;
    }

    .onboarding-cta {
      width: 100%;
      background: linear-gradient(135deg, rgba(212,160,23,0.18), rgba(212,160,23,0.08));
      border: 1px solid rgba(212,160,23,0.34);
      border-radius: 14px;
      color: var(--gold-light);
      font-family: 'Crimson Pro', serif;
      font-size: 0.95rem;
      font-weight: 600;
      padding: 11px 14px;
      cursor: pointer;
      transition: all 0.2s;
      letter-spacing: 0.04em;
      box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    }
    .onboarding-cta:hover {
      background: linear-gradient(135deg, rgba(212,160,23,0.24), rgba(212,160,23,0.11));
      border-color: rgba(212,160,23,0.44);
      transform: translateY(-1px);
      box-shadow: 0 16px 34px rgba(0,0,0,0.24);
    }
    .onboarding-cta:disabled {
      opacity: 0.42;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
      filter: blur(0.2px);
    }

    .onboarding-skip {
      display: block;
      margin-top: 10px;
      font-size: 0.8rem;
      color: rgba(253,246,227,0.5);
      cursor: pointer;
      letter-spacing: 0.04em;
      background: none;
      border: none;
      font-family: 'Crimson Pro', serif;
      text-decoration: underline;
      text-underline-offset: 4px;
    }
    .onboarding-skip:hover { color: rgba(253,246,227,0.62); }

    @media (max-height: 860px) {
      #onboarding { padding: 12px; }
      .onboarding-card { padding: 20px 18px 14px; }
      .onboarding-title { font-size: 1.62rem; }
      .onboarding-subtitle { font-size: 0.9rem; margin-bottom: 10px; }
      .onboarding-input { margin-bottom: 10px; }
      .intent-grid { gap: 7px; margin-bottom: 10px; }
      .intent-btn { min-height: 58px; font-size: 0.86rem; padding: 8px 6px; }
      .intent-btn .intent-icon { font-size: 0.96rem; }
      .onboarding-cta { padding: 10px 12px; font-size: 0.9rem; }
      .onboarding-skip { margin-top: 8px; font-size: 0.78rem; }
    }

    @media (max-width: 520px) {
      #onboarding { padding: 10px; }
      .onboarding-card {
        border-radius: 20px;
        padding: 18px 14px 12px;
      }
      .onboarding-title { font-size: 1.5rem; }
      .onboarding-subtitle {
        font-size: 0.86rem;
        margin-bottom: 8px;
        line-height: 1.45;
      }
      .onboarding-label, .onboarding-question {
        font-size: 0.68rem;
        letter-spacing: 0.15em;
      }
      .onboarding-input {
        font-size: 0.93rem;
        padding: 9px 12px;
        margin-bottom: 9px;
      }
      .intent-grid { gap: 6px; margin-bottom: 9px; }
      .intent-btn {
        min-height: 54px;
        font-size: 0.82rem;
        padding: 7px 6px;
      }
      .intent-btn .intent-icon { font-size: 0.92rem; }
      .onboarding-cta { padding: 9px 10px; font-size: 0.86rem; }
      .onboarding-skip { font-size: 0.75rem; margin-top: 6px; }
    }

    /* ════════════════════════════════════
       AUTH MODAL
    ════════════════════════════════════ */
    #auth-modal {
      position: fixed; inset: 0;
      background:
        linear-gradient(180deg, rgba(10,6,0,0.92), rgba(16,9,0,0.95)),
        radial-gradient(circle at top, rgba(212,160,23,0.08), transparent 42%);
      backdrop-filter: blur(12px);
      z-index: 200;
      display: none;
      align-items: center; justify-content: center;
      padding: 16px;
    }
    #auth-modal.open { display: flex; animation: fade-in 0.35s ease; }

    .auth-card {
      background:
        linear-gradient(180deg, rgba(47,27,2,0.96), rgba(24,14,0,0.98)),
        radial-gradient(circle at top, rgba(212,160,23,0.08), transparent 48%);
      border: 1px solid rgba(212,160,23,0.24);
      border-radius: 24px;
      max-width: 420px; width: 100%;
      padding: 28px 26px 22px;
      text-align: center;
      box-shadow: 0 24px 80px rgba(0,0,0,0.58), inset 0 1px 0 rgba(245,200,66,0.06), 0 0 60px rgba(212,160,23,0.06);
      animation: slide-up 0.4s ease;
      position: relative;
    }
    .popup-close,
    .auth-close {
      position: absolute; top: 16px; right: 18px;
      background: none; border: none;
      color: rgba(253,246,227,0.28); font-size: 1.1rem;
      cursor: pointer; transition: color 0.2s; line-height: 1;
      font-family: 'Crimson Pro', serif;
      z-index: 5;
      pointer-events: auto;
      width: 28px;
      height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .popup-close:hover,
    .auth-close:hover { color: rgba(253,246,227,0.6); }

    .auth-om {
      font-size: 1.7rem; display: block; margin-bottom: 8px;
      color: rgba(245,200,66,0.92);
      text-shadow: 0 0 22px rgba(212,160,23,0.34);
      animation: glow-pulse 3s ease-in-out infinite;
    }
    .auth-title {
      font-family: 'Crimson Pro', serif;
      font-size: 1.65rem; font-weight: 600; letter-spacing: 0.02em;
      color: rgba(253,246,227,0.95); margin-bottom: 4px;
    }
    .auth-subtitle {
      font-family: 'Crimson Pro', serif;
      font-style: italic; color: rgba(253,246,227,0.52);
      font-size: 0.9rem; margin-bottom: 22px; line-height: 1.55; letter-spacing: 0.02em;
    }

    .auth-panel { display: none; }
    .auth-panel.active { display: block; animation: fade-in 0.2s ease; }

    .auth-field-label {
      text-align: left; font-size: 0.73rem; letter-spacing: 0.18em;
      text-transform: uppercase; color: rgba(245,200,66,0.72);
      margin-bottom: 6px; font-family: 'Crimson Pro', serif;
    }

    .auth-input {
      width: 100%;
      background: rgba(26,15,0,0.72);
      border: 1px solid rgba(212,160,23,0.2);
      border-radius: 14px;
      color: rgba(253,246,227,0.92);
      font-family: 'Crimson Pro', serif; font-size: 0.98rem;
      padding: 11px 14px; margin-bottom: 18px;
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
      box-shadow: inset 0 1px 0 rgba(245,200,66,0.03);
      box-sizing: border-box;
    }
    .auth-input::placeholder { color: rgba(253,246,227,0.28); font-style: italic; }
    .auth-input:focus {
      outline: none; border-color: rgba(212,160,23,0.42);
      box-shadow: 0 0 0 3px rgba(212,160,23,0.07); background: rgba(26,15,0,0.8);
    }

    .auth-signin-btn {
      width: 100%;
      background: linear-gradient(135deg, rgba(212,160,23,0.14), rgba(212,160,23,0.07));
      border: 1px solid rgba(212,160,23,0.3);
      border-radius: 14px;
      color: rgba(253,246,227,0.85);
      font-family: 'Crimson Pro', serif; font-size: 0.97rem; font-weight: 600;
      padding: 12px 14px; cursor: pointer;
      transition: all 0.22s; letter-spacing: 0.04em;
      display: flex; align-items: center; justify-content: center; gap: 10px;
      margin-bottom: 10px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    }
    .auth-signin-btn svg { width: 18px; height: 18px; min-width: 18px; min-height: 18px; flex-shrink: 0; }
    .auth-signin-btn:hover:not(:disabled) {
      background: linear-gradient(135deg, rgba(212,160,23,0.22), rgba(212,160,23,0.11));
      border-color: rgba(212,160,23,0.44); color: var(--gold-light);
      transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,0.2);
    }
    .auth-signin-btn:disabled {
      opacity: 0.32; cursor: not-allowed; transform: none; box-shadow: none; filter: blur(0.2px);
    }

    .auth-divider {
      display: flex; align-items: center; gap: 12px;
      color: rgba(253,246,227,0.2); font-size: 0.75rem; letter-spacing: 0.1em;
      font-family: 'Crimson Pro', serif; text-transform: uppercase;
      margin-bottom: 10px; margin-top: 2px;
    }
    .auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(212,160,23,0.16); }

    .phone-row { display: flex; gap: 8px; margin-bottom: 14px; }
    .phone-flag-select {
      background: rgba(26,15,0,0.72);
      border: 1px solid rgba(212,160,23,0.2);
      border-radius: 14px; color: var(--cream);
      font-family: 'Crimson Pro', serif; font-size: 0.95rem;
      padding: 11px 10px; cursor: pointer; width: 88px;
      transition: border-color 0.2s; -webkit-appearance: none;
      box-shadow: inset 0 1px 0 rgba(245,200,66,0.03);
    }
    .phone-flag-select:focus { outline: none; border-color: rgba(212,160,23,0.42); }

    .auth-input-phone {
      flex: 1; background: rgba(26,15,0,0.72);
      border: 1px solid rgba(212,160,23,0.2); border-radius: 14px;
      color: rgba(253,246,227,0.92); font-family: 'Crimson Pro', serif; font-size: 0.98rem;
      padding: 11px 14px;
      transition: border-color 0.2s, box-shadow 0.2s;
      box-shadow: inset 0 1px 0 rgba(245,200,66,0.03);
    }
    .auth-input-phone::placeholder { color: rgba(253,246,227,0.28); font-style: italic; }
    .auth-input-phone:focus {
      outline: none; border-color: rgba(212,160,23,0.42);
      box-shadow: 0 0 0 3px rgba(212,160,23,0.07); background: rgba(26,15,0,0.8);
    }

    .auth-send-otp, .auth-verify-otp {
      width: 100%;
      background: linear-gradient(135deg, rgba(212,160,23,0.18), rgba(212,160,23,0.08));
      border: 1px solid rgba(212,160,23,0.34); border-radius: 14px;
      color: var(--gold-light); font-family: 'Crimson Pro', serif;
      font-size: 0.97rem; font-weight: 600;
      padding: 12px 14px; cursor: pointer;
      transition: all 0.2s; letter-spacing: 0.04em;
      box-shadow: 0 8px 24px rgba(0,0,0,0.14); margin-top: 2px;
    }
    .auth-send-otp:hover, .auth-verify-otp:hover {
      background: linear-gradient(135deg, rgba(212,160,23,0.26), rgba(212,160,23,0.12));
      border-color: rgba(212,160,23,0.48); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,0.2);
    }
    .auth-send-otp:disabled, .auth-verify-otp:disabled { opacity: 0.32; cursor: not-allowed; transform: none; box-shadow: none; }

    .otp-hint {
      font-family: 'Crimson Pro', serif; font-style: italic;
      font-size: 0.82rem; color: rgba(253,246,227,0.3); margin-top: 12px; line-height: 1.55;
    }
    .otp-hint a { color: rgba(212,160,23,0.6); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

    .auth-msg {
      font-family: 'Crimson Pro', serif; font-size: 0.85rem;
      margin-top: 12px; text-align: center; min-height: 20px;
      letter-spacing: 0.02em; font-style: italic;
    }
    .auth-msg.success { color: rgba(150,220,150,0.85); }
    .auth-msg.error { color: rgba(230,140,140,0.85); }
    .auth-msg.info { color: rgba(253,246,227,0.42); }

    .otp-boxes { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
    .otp-box {
      width: 44px; height: 54px;
      background: rgba(26,15,0,0.72);
      border: 1px solid rgba(212,160,23,0.22); border-radius: 12px;
      color: var(--gold-light); font-family: 'Crimson Pro', serif; font-size: 1.5rem;
      text-align: center; transition: border-color 0.2s;
      box-shadow: inset 0 1px 0 rgba(245,200,66,0.03);
    }
    .otp-box:focus { outline: none; border-color: rgba(212,160,23,0.5); box-shadow: 0 0 0 3px rgba(212,160,23,0.07); }

    .auth-back-link {
      background: none; border: none; color: rgba(253,246,227,0.32);
      font-family: 'Crimson Pro', serif; font-style: italic;
      font-size: 0.82rem; cursor: pointer; letter-spacing: 0.03em;
      padding: 0; margin-bottom: 16px; display: inline-block; transition: color 0.2s;
    }
    .auth-back-link:hover { color: rgba(253,246,227,0.55); }

    /* ════════════════════════════════════
       MOOD SELECTOR
    ════════════════════════════════════ */
    #mood-modal {
      position: fixed; inset: 0;
      background:
        linear-gradient(180deg, rgba(10,6,0,0.9), rgba(16,9,0,0.94)),
        radial-gradient(circle at top, rgba(212,160,23,0.07), transparent 44%);
      backdrop-filter: blur(10px);
      z-index: 360;
      display: none;
      align-items: center; justify-content: center;
      padding: 16px;
      overflow-y: auto;
    }

    #mood-modal.open { display: flex; animation: fade-in 0.35s ease; }

    .mood-card {
      background:
        linear-gradient(180deg, rgba(47,27,2,0.96), rgba(24,14,0,0.98)),
        radial-gradient(circle at top, rgba(212,160,23,0.08), transparent 48%);
      border: 1px solid rgba(212,160,23,0.24);
      border-radius: 24px;
      max-width: 420px; width: 100%;
      max-height: min(88vh, 760px);
      overflow-y: auto;
      padding: 26px 24px 22px;
      text-align: center;
      box-shadow: 0 24px 80px rgba(0,0,0,0.58), inset 0 1px 0 rgba(245,200,66,0.06), 0 0 60px rgba(212,160,23,0.06);
      animation: slide-up 0.4s ease;
      position: relative;
    }

    .mood-om { font-size: 1.6rem; display: block; margin-bottom: 8px; }
    .mood-title {
      font-family: 'Crimson Pro', serif;
      font-size: 1.55rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      color: rgba(253,246,227,0.94);
      margin-bottom: 6px;
    }
    .mood-subtitle {
      font-family: 'Crimson Pro', serif;
      font-style: italic;
      color: rgba(253,246,227,0.52);
      font-size: 0.9rem;
      margin-bottom: 20px;
      line-height: 1.55;
      letter-spacing: 0.02em;
    }

    .mood-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 24px;
    }

    .mood-btn {
      background: rgba(212,160,23,0.06);
      border: 1.5px solid rgba(212,160,23,0.2);
      border-radius: 14px;
      padding: 14px 8px 12px;
      cursor: pointer; transition: all 0.22s;
      display: flex; flex-direction: column;
      align-items: center; gap: 6px;
    }

    .mood-btn:hover {
      background: rgba(212,160,23,0.14);
      border-color: rgba(212,160,23,0.45);
      transform: translateY(-2px);
    }

    .mood-btn.selected {
      background: rgba(212,160,23,0.2);
      border-color: var(--gold);
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(212,160,23,0.2);
    }

    .mood-emoji { font-size: 1.8rem; line-height: 1; display: block; }

    .mood-label {
      font-family: 'Crimson Pro', serif;
      font-size: 0.82rem; letter-spacing: 0.04em;
      color: rgba(253,246,227,0.65); line-height: 1.3;
      text-align: center;
    }

    .mood-btn.selected .mood-label { color: var(--gold-light); }

    .mood-intensity {
      margin-bottom: 20px;
    }

    .mood-intensity-label {
      font-size: 0.75rem; letter-spacing: 0.1em;
      text-transform: uppercase; color: var(--gold); opacity: 0.7;
      margin-bottom: 12px; display: block;
    }

    .intensity-track {
      display: flex; align-items: center; gap: 12px;
    }

    .intensity-track span {
      font-size: 0.8rem; color: rgba(253,246,227,0.35);
      letter-spacing: 0.04em; min-width: 36px;
    }

    #mood-intensity-range {
      flex: 1; -webkit-appearance: none; appearance: none;
      height: 4px; background: rgba(212,160,23,0.2);
      border-radius: 4px; outline: none; cursor: pointer;
    }

    #mood-intensity-range::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 18px; height: 18px;
      background: radial-gradient(circle, var(--gold-light), var(--gold));
      border-radius: 50%;
      box-shadow: 0 0 8px rgba(212,160,23,0.5);
    }

    .mood-note-label { 
      text-align: left; font-size: 0.75rem; letter-spacing: 0.1em;
      text-transform: uppercase; color: var(--gold); opacity: 0.7;
      margin-bottom: 8px; display: block;
    }

    .mood-note {
      width: 100%;
      background: rgba(26,15,0,0.8);
      border: 1.5px solid rgba(212,160,23,0.25);
      border-radius: 10px; color: var(--cream);
      font-family: 'Crimson Pro', serif; font-size: 0.95rem;
      padding: 10px 14px; resize: none; height: 68px;
      margin-bottom: 20px; transition: border-color 0.2s;
      line-height: 1.5;
    }
    .mood-note::placeholder { color: rgba(253,246,227,0.25); font-style: italic; }
    .mood-note:focus { outline: none; border-color: rgba(212,160,23,0.5); }

    .mood-cta {
      width: 100%;
      background: linear-gradient(135deg, var(--saffron), var(--deep-saffron));
      border: none; border-radius: 12px;
      color: white; font-family: 'Crimson Pro', serif;
      font-size: 0.98rem; font-weight: 600; padding: 13px; cursor: pointer;
      transition: all 0.2s; letter-spacing: 0.03em;
      box-shadow: 0 4px 16px rgba(232,105,10,0.3);
    }
    .mood-cta:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(232,105,10,0.45); }
    .mood-cta:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

    /* Mood nudge — floating banner after N messages */
    #mood-nudge {
      position: fixed; top: 74px; left: 50%; transform: translateX(-50%);
      background: linear-gradient(135deg, rgba(44,24,0,0.95), rgba(26,15,0,0.97));
      border: 1px solid rgba(212,160,23,0.35);
      border-radius: 16px; padding: 10px 16px;
      display: none; align-items: center; gap: 14px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.5);
      z-index: 90; animation: slide-up 0.4s ease;
      width: min(760px, calc(100vw - 28px));
    }

    #mood-nudge.visible { display: flex; }

    .mood-nudge-text {
      font-family: 'Crimson Pro', serif; font-style: italic;
      font-size: 0.9rem; color: rgba(253,246,227,0.76);
      letter-spacing: 0.03em;
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .mood-nudge-btn {
      background: linear-gradient(135deg, var(--saffron), var(--deep-saffron));
      border: none; border-radius: 999px;
      color: white; font-family: 'Crimson Pro', serif;
      font-size: 0.84rem; padding: 6px 14px;
      cursor: pointer; transition: all 0.2s; white-space: nowrap;
    }
    .mood-nudge-btn:hover { transform: scale(1.04); }

    .mood-nudge-close {
      background: none; border: none;
      color: rgba(253,246,227,0.3); font-size: 1rem;
      cursor: pointer; transition: color 0.2s; flex-shrink: 0;
    }
    .mood-nudge-close:hover { color: rgba(253,246,227,0.6); }

    /* Streak badge */
    .streak-badge {
      display: inline-flex; align-items: center; gap: 5px;
      background: rgba(212,160,23,0.12);
      border: 1px solid rgba(212,160,23,0.3);
      border-radius: 50px; padding: 4px 12px;
      font-size: 0.78rem; color: var(--gold-light);
      letter-spacing: 0.06em; margin-left: 8px;
      vertical-align: middle;
    }

    /* WhatsApp opt-in banner */
    #wa-optin {
      position: relative; z-index: 1;
      max-width: 820px; margin: 0 auto 20px; padding: 0 16px;
      display: none;
    }
    #wa-optin.show { display: none; }

    .wa-card {
      background: linear-gradient(135deg, rgba(37,211,102,0.08), rgba(26,15,0,0.9));
      border: 1px solid rgba(37,211,102,0.25);
      border-radius: 14px; padding: 18px 22px;
      display: flex; align-items: center; gap: 16px;
      flex-wrap: wrap;
    }

    .wa-icon { font-size: 1.8rem; flex-shrink: 0; }

    .wa-text { flex: 1; min-width: 200px; }
    .wa-text strong { font-family: 'Yatra One', cursive; font-size: 1rem; color: #7de8a0; display: block; margin-bottom: 2px; }
    .wa-text span { font-size: 0.88rem; color: rgba(253,246,227,0.55); line-height: 1.4; }

    .wa-btn {
      background: linear-gradient(135deg, #25d366, #128c7e);
      border: none; border-radius: 50px;
      color: white; font-family: 'Crimson Pro', serif;
      font-size: 0.9rem; padding: 9px 20px;
      cursor: pointer; transition: all 0.2s; white-space: nowrap;
      letter-spacing: 0.03em; font-weight: 600;
    }
    .wa-btn:hover { transform: scale(1.04); box-shadow: 0 4px 16px rgba(37,211,102,0.35); }

    .wa-dismiss { background: none; border: none; color: rgba(253,246,227,0.25); font-size: 1rem; cursor: pointer; transition: color 0.2s; }
    .wa-dismiss:hover { color: rgba(253,246,227,0.5); }

    /* ════════════════════════════════════
       PROFILE PANEL (slide-in drawer)
    ════════════════════════════════════ */
    #profile-panel-overlay {
      position: fixed; inset: 0;
      background: rgba(10,6,0,0.7);
      backdrop-filter: blur(6px);
      z-index: 300;
      opacity: 0;
      pointer-events: none;
      transition: opacity var(--dur-base, 220ms) var(--ease-standard, cubic-bezier(0.22, 1, 0.36, 1));
    }
    #profile-panel-overlay.open {
      opacity: 1;
      pointer-events: auto;
    }

    #profile-panel {
      position: fixed;
      top: 0; right: 0;
      height: 100vh;
      width: min(420px, 100vw);
      background: linear-gradient(180deg, rgba(36,20,0,0.99) 0%, rgba(20,10,0,0.99) 100%);
      border-left: 1px solid rgba(212,160,23,0.25);
      z-index: 301;
      display: flex; flex-direction: column;
      transform: translateX(100%);
      opacity: 0.96;
      transition:
        transform var(--dur-slow, 320ms) cubic-bezier(0.32,0,0.15,1),
        opacity var(--dur-base, 220ms) var(--ease-standard, cubic-bezier(0.22, 1, 0.36, 1));
      box-shadow: -12px 0 60px rgba(0,0,0,0.6);
    }
    #profile-panel.open {
      transform: translateX(0);
      opacity: 1;
    }

    @media (prefers-reduced-motion: reduce) {
      body,
      header,
      main,
      .votd-section,
      footer,
      body::before,
      .thread-confirm {
        animation: none !important;
      }
      * {
        transition-duration: 0.01ms !important;
      }
    }

    .pp-header {
      padding: 28px 24px 20px;
      border-bottom: 1px solid rgba(212,160,23,0.15);
      display: flex; align-items: flex-start; justify-content: space-between;
      flex-shrink: 0;
    }

    .pp-avatar-block { display: flex; align-items: center; gap: 14px; }

    .pp-avatar {
      width: 52px; height: 52px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold), var(--deep-saffron));
      display: flex; align-items: center; justify-content: center;
      font-size: 1.5rem; font-family: 'Yatra One', cursive;
      box-shadow: 0 0 20px rgba(212,160,23,0.4);
      border: 2px solid rgba(212,160,23,0.5);
      flex-shrink: 0;
    }

    .pp-name {
      font-family: 'Crimson Pro', serif;
      font-size: 1.18rem;
      font-weight: 500;
      color: rgba(253,246,227,0.88);
      line-height: 1.2;
      letter-spacing: 0.015em;
    }
    .pp-email {
      font-family: 'Crimson Pro', serif;
      font-size: 0.82rem;
      color: rgba(253,246,227,0.54);
      margin-top: 4px;
      letter-spacing: 0.02em;
    }
    .pp-intent-tag {
      display: inline-block; margin-top: 6px;
      background: rgba(212,160,23,0.08); border: 1px solid rgba(212,160,23,0.2);
      border-radius: 50px; padding: 3px 11px;
      font-size: 0.74rem; color: rgba(245,200,66,0.88); letter-spacing: 0.05em;
      font-family: 'Crimson Pro', serif;
    }

    .pp-close {
      background: none; border: none;
      color: rgba(253,246,227,0.3); font-size: 1.4rem;
      cursor: pointer; transition: color 0.2s; line-height: 1;
      padding: 4px;
    }
    .pp-close:hover { color: rgba(253,246,227,0.7); }

    /* Tabs */
    .pp-tabs {
      display: flex; border-bottom: 1px solid rgba(212,160,23,0.15);
      flex-shrink: 0;
    }
    .pp-tab {
      flex: 1; padding: 13px 8px 12px;
      background: none; border: none; border-bottom: 2px solid transparent;
      color: rgba(253,246,227,0.46); font-family: 'Crimson Pro', serif;
      font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
      cursor: pointer; transition: all 0.2s; margin-bottom: -1px;
    }
    .pp-tab:hover { color: rgba(253,246,227,0.68); }
    .pp-tab.active {
      color: rgba(245,200,66,0.9);
      border-bottom-color: rgba(212,160,23,0.92);
      text-shadow: 0 0 10px rgba(212,160,23,0.12);
    }

    /* Scrollable body */
    .pp-body {
      flex: 1; overflow-y: auto; padding: 20px 24px;
      background: linear-gradient(180deg, rgba(36,21,2,0.42), rgba(24,14,0,0.28));
    }
    .pp-body::-webkit-scrollbar { width: 4px; }
    .pp-body::-webkit-scrollbar-track { background: transparent; }
    .pp-body::-webkit-scrollbar-thumb { background: rgba(212,160,23,0.2); border-radius: 4px; }

    .pp-tab-panel { display: none; }
    .pp-tab-panel.active { display: block; animation: fade-in 0.2s ease; }

    /* Section label */
    .pp-section-label {
      font-size: 0.69rem; letter-spacing: 0.16em; text-transform: uppercase;
      color: var(--gold); opacity: 0.58; margin-bottom: 14px; margin-top: 4px;
      font-family: 'Crimson Pro', serif;
    }
    .pp-mood-checkin-row {
      display: flex;
      justify-content: flex-end;
      margin: 2px 0 10px;
    }
    .pp-mood-checkin-btn {
      border: 1px solid rgba(212,160,23,0.34);
      background: rgba(212,160,23,0.1);
      color: rgba(245,200,66,0.92);
      border-radius: 999px;
      padding: 7px 12px;
      font-family: 'Crimson Pro', serif;
      font-size: 0.84rem;
      letter-spacing: 0.03em;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .pp-mood-checkin-btn:hover {
      background: rgba(212,160,23,0.18);
      border-color: rgba(212,160,23,0.46);
      color: var(--gold-light);
      transform: translateY(-1px);
    }

    .mood-hero {
      background:
        radial-gradient(circle at top right, rgba(212,160,23,0.12), transparent 38%),
        linear-gradient(180deg, rgba(44,24,0,0.48), rgba(28,16,0,0.52));
      border: 1px solid rgba(212,160,23,0.14);
      border-radius: 18px;
      padding: 18px 18px 16px;
      margin-bottom: 18px;
      box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    }

    .mood-hero-kicker {
      font-family: 'Crimson Pro', serif;
      font-size: 0.68rem;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: rgba(245,200,66,0.62);
      margin-bottom: 8px;
    }

    .mood-hero-title {
      font-family: 'Crimson Pro', serif;
      font-size: 1.08rem;
      font-weight: 600;
      color: rgba(253,246,227,0.92);
      line-height: 1.3;
      margin-bottom: 8px;
    }

    .mood-hero-text {
      font-family: 'Crimson Pro', serif;
      font-size: 0.9rem;
      color: rgba(253,246,227,0.72);
      line-height: 1.65;
    }

    .mood-hero-meta {
      margin-top: 10px;
      font-family: 'Crimson Pro', serif;
      font-size: 0.76rem;
      color: rgba(245,200,66,0.66);
      letter-spacing: 0.05em;
    }

    .mood-presence {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 20px;
    }

    .mood-day {
      background: rgba(44,24,0,0.34);
      border: 1px solid rgba(212,160,23,0.12);
      border-radius: 14px;
      padding: 10px 8px;
      min-height: 88px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      text-align: center;
    }

    .mood-day.empty {
      opacity: 0.55;
      border-style: dashed;
    }

    .mood-day-label {
      font-family: 'Crimson Pro', serif;
      font-size: 0.7rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(253,246,227,0.46);
    }

    .mood-day-badge {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(212,160,23,0.08);
      border: 1px solid rgba(212,160,23,0.12);
      font-size: 1.15rem;
    }

    .mood-day.empty .mood-day-badge {
      font-size: 0.9rem;
      color: rgba(253,246,227,0.3);
    }

    .mood-day-intensity {
      width: 100%;
      height: 4px;
      border-radius: 999px;
      background: rgba(212,160,23,0.08);
      overflow: hidden;
    }

    .mood-day-intensity-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(245,200,66,0.92), rgba(232,105,10,0.84));
    }

    .mood-pattern-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 22px;
    }

    .mood-pattern-card {
      background: rgba(44,24,0,0.32);
      border: 1px solid rgba(212,160,23,0.12);
      border-radius: 15px;
      padding: 13px 14px;
    }

    .mood-pattern-label {
      font-family: 'Crimson Pro', serif;
      font-size: 0.67rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(245,200,66,0.56);
      margin-bottom: 8px;
    }

    .mood-pattern-value {
      font-family: 'Crimson Pro', serif;
      font-size: 0.96rem;
      font-weight: 600;
      color: rgba(253,246,227,0.9);
      line-height: 1.35;
      margin-bottom: 4px;
    }

    .mood-pattern-note {
      font-family: 'Crimson Pro', serif;
      font-size: 0.82rem;
      color: rgba(253,246,227,0.52);
      line-height: 1.55;
    }

    /* Mood history timeline */
    .mood-timeline { display: flex; flex-direction: column; gap: 12px; }

    .mood-entry {
      background: linear-gradient(180deg, rgba(44,24,0,0.42), rgba(32,18,0,0.42));
      border: 1px solid rgba(212,160,23,0.14);
      border-radius: 16px; padding: 15px 16px 14px;
      animation: fade-up 0.3s ease;
      box-shadow: 0 10px 24px rgba(0,0,0,0.1);
    }

    .mood-entry-top {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 8px;
    }

    .mood-entry-left { display: flex; align-items: center; gap: 12px; }
    .mood-entry-emoji {
      font-size: 1.4rem;
      line-height: 1;
      width: 34px;
      height: 34px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(212,160,23,0.08);
      border: 1px solid rgba(212,160,23,0.1);
    }
    .mood-entry-name {
      font-family: 'Crimson Pro', serif;
      font-size: 1rem;
      font-weight: 600;
      color: rgba(245,200,66,0.88);
      letter-spacing: 0.01em;
      text-transform: capitalize;
    }
    .mood-entry-date {
      font-family: 'Crimson Pro', serif;
      font-size: 0.73rem; color: rgba(253,246,227,0.34);
      letter-spacing: 0.05em; text-align: right; white-space: nowrap;
    }

    .mood-intensity-bar {
      height: 4px; background: rgba(212,160,23,0.1);
      border-radius: 999px; margin-bottom: 4px; overflow: hidden;
    }
    .mood-intensity-fill {
      height: 100%;
      background: linear-gradient(90deg, rgba(245,200,66,0.92), rgba(232,105,10,0.9));
      border-radius: 999px; transition: width 0.6s ease;
    }

    .mood-entry-note {
      font-style: italic; font-size: 0.89rem;
      color: rgba(253,246,227,0.48); line-height: 1.6;
      margin-top: 8px;
    }

    .mood-entry-reflection {
      margin-top: 10px;
      font-family: 'Crimson Pro', serif;
      font-size: 0.77rem;
      letter-spacing: 0.04em;
      color: rgba(245,200,66,0.6);
    }

    .mood-empty {
      text-align: center; padding: 32px 16px;
      color: rgba(253,246,227,0.3); font-style: italic; font-size: 0.92rem;
      line-height: 1.7;
    }
    .mood-empty span { font-size: 2rem; display: block; margin-bottom: 10px; }

    /* Mood summary chips */
    .mood-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
    .mood-chip {
      background: rgba(212,160,23,0.07);
      border: 1px solid rgba(212,160,23,0.16);
      border-radius: 999px; padding: 6px 12px;
      font-size: 0.82rem; color: rgba(253,246,227,0.62);
      font-family: 'Crimson Pro', serif;
      display: flex; align-items: center; gap: 5px;
    }
    .mood-chip-count {
      background: rgba(212,160,23,0.14);
      border-radius: 999px; padding: 1px 7px;
      font-size: 0.7rem; color: rgba(245,200,66,0.86);
    }

    .mood-journey-arc {
      margin-top: 22px;
      background: linear-gradient(180deg, rgba(44,24,0,0.36), rgba(28,16,0,0.4));
      border: 1px solid rgba(212,160,23,0.12);
      border-radius: 18px;
      padding: 16px 16px 15px;
    }

    .mood-journey-title {
      font-family: 'Crimson Pro', serif;
      font-size: 0.7rem;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: rgba(245,200,66,0.58);
      margin-bottom: 10px;
    }

    .mood-journey-text {
      font-family: 'Crimson Pro', serif;
      font-size: 0.91rem;
      color: rgba(253,246,227,0.66);
      line-height: 1.7;
      font-style: italic;
    }

    /* Journey tab — profile info */
    .pp-field { margin-bottom: 18px; }
    .pp-field-label {
      font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
      color: var(--gold); opacity: 0.66; margin-bottom: 7px;
      font-family: 'Crimson Pro', serif;
    }
    .pp-field-value {
      font-size: 0.96rem; color: rgba(253,246,227,0.74);
      background: rgba(26,15,0,0.6);
      border: 1px solid rgba(212,160,23,0.16);
      border-radius: 12px; padding: 12px 14px;
      line-height: 1.4;
      font-family: 'Crimson Pro', serif;
    }

    .pp-edit-input {
      width: 100%;
      background: rgba(26,15,0,0.8);
      border: 1.5px solid rgba(212,160,23,0.3);
      border-radius: 12px; color: var(--cream);
      font-family: 'Crimson Pro', serif; font-size: 1rem;
      padding: 12px 14px; transition: border-color 0.2s, box-shadow 0.2s;
    }
    .pp-edit-input::placeholder { color: rgba(253,246,227,0.25); }
    .pp-edit-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,160,23,0.08); }

    .pp-choice-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .pp-choice-btn {
      background: rgba(212,160,23,0.06);
      border: 1px solid rgba(212,160,23,0.18);
      border-radius: 999px;
      color: rgba(253,246,227,0.68);
      font-family: 'Crimson Pro', serif;
      font-size: 0.88rem;
      padding: 9px 14px;
      cursor: pointer;
      transition: all 0.2s;
      letter-spacing: 0.02em;
    }

    .pp-choice-btn:hover {
      border-color: rgba(212,160,23,0.32);
      color: rgba(253,246,227,0.88);
      background: rgba(212,160,23,0.11);
    }

    .pp-choice-btn.active {
      border-color: rgba(212,160,23,0.42);
      background: rgba(212,160,23,0.14);
      color: var(--gold-light);
      box-shadow: 0 0 0 1px rgba(212,160,23,0.04) inset;
    }

    .pp-save-btn {
      width: 100%;
      background: linear-gradient(135deg, rgba(212,160,23,0.18), rgba(212,160,23,0.08));
      border: 1px solid rgba(212,160,23,0.35);
      border-radius: 12px; color: var(--gold-light);
      font-family: 'Crimson Pro', serif; font-size: 0.92rem;
      padding: 11px; cursor: pointer; transition: all 0.2s;
      letter-spacing: 0.04em; margin-top: 6px;
    }
    .pp-save-btn:hover { background: rgba(212,160,23,0.25); border-color: var(--gold); }
    .pp-save-btn:disabled {
      opacity: 0.45;
      cursor: default;
      filter: blur(0.2px);
      background: rgba(212,160,23,0.05);
      border-color: rgba(212,160,23,0.14);
      color: rgba(245,200,66,0.55);
      box-shadow: none;
    }

    .pp-signout-btn {
      width: 100%;
      background: none; border: 1px solid rgba(232,128,128,0.2);
      border-radius: 12px; color: rgba(232,128,128,0.6);
      font-family: 'Crimson Pro', serif; font-size: 0.9rem;
      padding: 10px; cursor: pointer; transition: all 0.2s;
      letter-spacing: 0.05em; margin-top: 8px;
    }
    .pp-signout-btn:hover { background: rgba(232,128,128,0.08); color: #e88080; border-color: rgba(232,128,128,0.4); }

    /* Spinner */
    .pp-loading {
      text-align: center; padding: 28px 0;
      color: rgba(253,246,227,0.3); font-style: italic; font-size: 0.88rem;
    }
    .pp-loading::after {
      content: ''; display: block; width: 24px; height: 24px;
      border: 2px solid rgba(212,160,23,0.2);
      border-top-color: var(--gold);
      border-radius: 50%; margin: 12px auto 0;
      animation: spin 0.8s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .pwa-install-fab {
      position: fixed !important;
      top: auto !important;
      left: auto !important;
      right: 14px !important;
      bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
      inset: auto 14px calc(14px + env(safe-area-inset-bottom, 0px)) auto !important;
      z-index: 90;
      width: 52px;
      height: 52px;
      padding: 0;
      border-radius: 999px;
      border: none;
      background: rgba(21,12,2,0.16);
      backdrop-filter: blur(2px);
      color: rgba(245,200,66,0.9);
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      overflow: hidden;
      box-shadow: 0 8px 18px rgba(0,0,0,0.22);
      transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
      opacity: 0.76;
      will-change: transform;
      touch-action: none;
      user-select: none;
    }
    .pwa-install-fab:hover {
      transform: translateY(-1px);
      background: rgba(21,12,2,0.22);
      opacity: 0.92;
      box-shadow: 0 10px 22px rgba(0,0,0,0.25);
    }
    .pwa-install-fab-icon {
      width: 100%;
      height: 100%;
      border-radius: 999px;
      object-fit: contain;
      display: block;
      opacity: 0.84;
      filter: saturate(0.88) brightness(0.95);
    }

    .pwa-install-card {
      position: fixed;
      right: 14px !important;
      bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
      inset: auto 14px calc(62px + env(safe-area-inset-bottom, 0px)) auto !important;
      z-index: 91;
      width: min(368px, calc(100vw - 24px));
      border-radius: 16px;
      border: 1px solid rgba(212,160,23,0.22);
      background: linear-gradient(155deg, rgba(41,24,3,0.74), rgba(24,14,2,0.68));
      box-shadow: 0 10px 24px rgba(0,0,0,0.28), 0 0 14px rgba(212,160,23,0.06);
      backdrop-filter: blur(2px);
      padding: 12px 13px 11px;
      color: var(--cream);
      transform: translateY(10px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.24s ease, transform 0.24s ease;
    }
    .pwa-install-card.show {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    .pwa-install-close {
      position: absolute;
      top: 8px;
      right: 10px;
      border: none;
      background: transparent;
      color: rgba(253,246,227,0.54);
      font-size: 0.95rem;
      cursor: pointer;
      padding: 2px;
      line-height: 1;
    }
    .pwa-install-close:hover { color: rgba(253,246,227,0.86); }

    .pwa-install-title {
      font-family: 'Crimson Pro', serif;
      font-size: 1rem;
      font-style: italic;
      font-weight: 600;
      color: rgba(245,200,66,0.88);
      letter-spacing: 0.02em;
      margin-bottom: 4px;
    }

    .pwa-install-text {
      font-size: 0.86rem;
      color: rgba(253,246,227,0.68);
      line-height: 1.4;
      margin-bottom: 10px;
    }

    .pwa-install-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    .pwa-btn {
      border-radius: 999px;
      font-family: 'Crimson Pro', serif;
      letter-spacing: 0.03em;
      cursor: pointer;
      transition: all 0.2s ease;
      padding: 6px 11px;
      font-size: 0.8rem;
      border: 1px solid rgba(212,160,23,0.34);
    }

    .pwa-btn.secondary {
      background: rgba(253,246,227,0.04);
      color: rgba(253,246,227,0.76);
    }

    .pwa-btn.secondary:hover {
      background: rgba(253,246,227,0.09);
      color: var(--cream);
    }

    .pwa-btn.primary {
      background: rgba(212,160,23,0.2);
      color: var(--gold-light);
      border-color: var(--gold);
    }

    .pwa-btn.primary:hover {
      background: rgba(212,160,23,0.32);
      box-shadow: 0 0 16px rgba(212,160,23,0.25);
    }

    .pwa-update-toast {
      position: fixed;
      left: 50%;
      bottom: calc(16px + env(safe-area-inset-bottom, 0px));
      transform: translateX(-50%) translateY(16px);
      width: min(520px, calc(100vw - 24px));
      z-index: 96;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 14px;
      border: 1px solid rgba(212,160,23,0.36);
      background: linear-gradient(160deg, rgba(42,24,3,0.96), rgba(24,14,2,0.96));
      box-shadow: 0 14px 34px rgba(0,0,0,0.44);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.28s ease, transform 0.28s ease;
    }

    .pwa-update-toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
      pointer-events: auto;
    }

    .pwa-update-copy {
      font-size: 0.9rem;
      color: rgba(253,246,227,0.86);
      line-height: 1.4;
    }

    .pwa-update-actions {
      display: flex;
      gap: 8px;
      flex-shrink: 0;
    }

    .pwa-update-actions .pwa-btn {
      padding: 6px 12px;
      font-size: 0.82rem;
    }

    .app-toast-stack {
      position: fixed;
      right: 14px;
      bottom: calc(14px + env(safe-area-inset-bottom, 0px));
      z-index: 120;
      display: flex;
      flex-direction: column;
      gap: 8px;
      width: min(360px, calc(100vw - 20px));
      pointer-events: none;
    }

    .app-toast {
      background: linear-gradient(150deg, rgba(45,25,3,0.96), rgba(24,14,2,0.96));
      border: 1px solid rgba(212,160,23,0.3);
      border-radius: 12px;
      color: rgba(253,246,227,0.9);
      font-family: 'Crimson Pro', serif;
      font-size: 0.9rem;
      letter-spacing: 0.02em;
      line-height: 1.45;
      padding: 9px 12px;
      box-shadow: 0 10px 26px rgba(0,0,0,0.33);
      transform: translateY(8px);
      opacity: 0;
      animation: app-toast-enter var(--dur-base) var(--ease-standard) forwards;
      pointer-events: auto;
    }

    .app-toast.success { border-color: rgba(153,214,167,0.44); }
    .app-toast.error { border-color: rgba(232,128,128,0.45); }

    @keyframes app-toast-enter {
      to { transform: translateY(0); opacity: 1; }
    }

    @media (max-width: 720px) {
      .pwa-install-fab {
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        width: 50px;
        height: 50px;
      }
      .pwa-install-card {
        right: 10px;
        left: auto;
        bottom: calc(58px + env(safe-area-inset-bottom, 0px));
        width: min(344px, calc(100vw - 16px));
      }
      .pwa-update-toast {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
      }
      .pwa-update-actions {
        width: 100%;
        justify-content: flex-end;
      }
      .app-toast-stack {
        right: 10px;
        left: 10px;
        width: auto;
      }
    }

    /* ── UI Polish Layer (non-breaking overrides) ── */
    :root {
      --space-1: 8px;
      --space-2: 12px;
      --space-3: 16px;
      --space-4: 24px;
      --space-5: 32px;
      --radius-sm: 12px;
      --radius-md: 16px;
      --radius-lg: 20px;
      --surface-1: linear-gradient(180deg, rgba(46,27,4,0.8), rgba(28,17,3,0.84));
      --surface-2: linear-gradient(180deg, rgba(42,24,3,0.92), rgba(24,14,2,0.95));
      --border-soft: 1px solid rgba(212,160,23,0.2);
      --shadow-soft: 0 10px 30px rgba(0,0,0,0.28);
      --text-soft: rgba(253,246,227,0.84);
      --text-muted: rgba(253,246,227,0.62);
      --ring: 0 0 0 3px rgba(212,160,23,0.16);
      --dur-fast: 160ms;
      --dur-base: 220ms;
      --dur-slow: 320ms;
      --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
    }

    body {
      color: var(--text-soft);
      line-height: 1.5;
      letter-spacing: 0.01em;
    }

    h1 {
      letter-spacing: 0.03em;
      text-wrap: balance;
    }

    .tagline {
      color: var(--text-muted);
      margin-bottom: var(--space-4);
    }

    .utility-bar {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: var(--space-2);
      position: fixed !important;
      top: 10px !important;
      left: 50% !important;
      right: auto !important;
      bottom: auto !important;
      transform: translateX(-50%) !important;
      width: min(820px, calc(100vw - 22px));
      margin-bottom: 0;
      padding: 10px 14px;
      border: var(--border-soft);
      border-radius: 999px;
      background: rgba(26,15,0,0.44);
      backdrop-filter: blur(4px);
      box-shadow: 0 6px 20px rgba(0,0,0,0.12);
      z-index: 999 !important;
      transition:
        padding var(--dur-base) var(--ease-standard),
        background-color var(--dur-base) var(--ease-standard),
        border-color var(--dur-base) var(--ease-standard),
        box-shadow var(--dur-base) var(--ease-standard);
    }
    .utility-bar.scrolled {
      background: rgba(20,12,0,0.72);
      border-color: rgba(212,160,23,0.34);
      box-shadow: 0 12px 30px rgba(0,0,0,0.26);
    }

    .utility-left,
    .utility-center,
    .utility-right {
      display: flex;
      align-items: center;
      min-width: 0;
    }

    .utility-left { justify-content: flex-start; }
    .utility-center { justify-content: center; }
    .utility-right { justify-content: flex-end; }

    .utility-bar .auth-corner,
    .utility-bar .thread-toggle {
      position: static;
      top: auto;
      right: auto;
      left: auto;
      z-index: auto;
      margin: 0;
    }

    .utility-bar .thread-toggle {
      display: none;
      padding: 8px 14px;
      font-size: 0.9rem;
      line-height: 1;
      gap: 6px;
      border-radius: 999px;
    }

    .utility-bar .lang-bar {
      margin: 0;
      gap: 6px;
      align-items: center;
    }

    .utility-bar .lang-btn {
      padding: 7px 14px;
      font-size: 0.9rem;
      line-height: 1;
      min-height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .utility-bar .auth-btn {
      padding: 8px 14px;
      font-size: 0.9rem;
      line-height: 1;
      min-height: 36px;
      white-space: nowrap;
    }

    .utility-bar .auth-btn span { font-size: 0.96rem; line-height: 1; }
    .utility-bar .auth-user-name {
      max-width: 96px;
      font-size: 0.88rem;
    }
    .utility-bar .auth-avatar {
      width: 34px;
      height: 34px;
      font-size: 1rem;
      box-shadow: 0 0 10px rgba(212,160,23,0.26);
    }

    .utility-bar .thread-toggle:hover,
    .utility-bar .auth-btn:hover,
    .utility-bar .lang-btn:hover {
      transform: translateY(-1px);
    }

    .auth-btn,
    .lang-btn,
    .thread-toggle,
    .thread-new-btn,
    .suggestion-chip,
    .quick-reply-chip,
    .pwa-btn {
      transition:
        background-color var(--dur-base) var(--ease-standard),
        border-color var(--dur-base) var(--ease-standard),
        color var(--dur-base) var(--ease-standard),
        transform var(--dur-fast) var(--ease-standard),
        box-shadow var(--dur-base) var(--ease-standard);
    }

    /* Motion scale normalization (fast/base/slow only) */
    .thread-overlay,
    #profile-panel-overlay,
    #profile-panel,
    #auth-modal,
    #mood-modal,
    .onboarding-card,
    .auth-card,
    .mood-card,
    .thread-sidebar,
    .thread-chip,
    .thread-delete-btn,
    .thread-confirm-btn,
    .intent-btn,
    .onboarding-cta,
    .pp-tab,
    .pp-choice-btn,
    .pp-save-btn,
    .pp-signout-btn,
    #send-btn,
    #user-input {
      transition-timing-function: var(--ease-standard);
    }

    .thread-overlay,
    #profile-panel-overlay,
    #auth-modal,
    #mood-modal {
      transition-duration: var(--dur-base);
    }

    #profile-panel,
    .thread-sidebar {
      transition-duration: var(--dur-slow);
    }

    .thread-chip,
    .thread-delete-btn,
    .thread-confirm-btn,
    .intent-btn,
    .onboarding-cta,
    .pp-tab,
    .pp-choice-btn,
    .pp-save-btn,
    .pp-signout-btn,
    #send-btn,
    #user-input {
      transition-duration: var(--dur-fast);
    }

    #chat-window,
    .votd-card,
    .thread-sidebar,
    .auth-card,
    .onboarding-card,
    #profile-panel {
      border: var(--border-soft);
      box-shadow: var(--shadow-soft);
    }

    #chat-window {
      background: var(--surface-1);
      border-radius: var(--radius-md);
      padding: var(--space-4);
      max-height: none;
      min-height: min(52vh, 620px);
      overflow: visible;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
    }

    /* Disable "scroll inside a box" feel for chat */
    #chat-window::-webkit-scrollbar { width: 0; height: 0; }

    .message { margin-bottom: 22px; }

    .sender-label {
      opacity: 0.56;
      margin-bottom: 6px;
    }

    .message.user .bubble,
    .message.krishna .bubble {
      border-radius: var(--radius-md);
      line-height: 1.7;
      font-size: 1.02rem;
      box-shadow: inset 0 1px 0 rgba(245,200,66,0.03);
    }

    .message.user .bubble {
      background: rgba(232,105,10,0.13);
      border-color: rgba(232,105,10,0.26);
      border-top-right-radius: 6px;
    }

    .message.krishna .bubble {
      background: rgba(40,22,2,0.58);
      border-color: rgba(212,160,23,0.2);
      border-top-left-radius: 6px;
      color: rgba(253,246,227,0.9);
    }

    body[data-script="devanagari"] .message.krishna .bubble,
    body[data-script="bengali"] .message.krishna .bubble,
    body[data-script="devanagari"] .message.user .bubble,
    body[data-script="bengali"] .message.user .bubble {
      letter-spacing: 0;
      line-height: 1.88;
      font-size: 1.05rem;
    }
    body[data-script="devanagari"] .votd-sanskrit,
    body[data-script="bengali"] .votd-sanskrit {
      line-height: 2;
      letter-spacing: 0;
    }

    .suggestion-chip,
    .quick-reply-chip {
      background: rgba(212,160,23,0.05);
      border-color: rgba(212,160,23,0.22);
      color: rgba(253,246,227,0.72);
    }

    .suggestion-chip:hover,
    .quick-reply-chip:hover {
      background: rgba(212,160,23,0.12);
      border-color: rgba(212,160,23,0.4);
      color: var(--gold-light);
      transform: translateY(-1px);
    }

    .quick-replies {
      border-top-color: rgba(212,160,23,0.07);
      margin-top: 8px;
      padding-top: 8px;
      gap: 6px;
    }
    .quick-reply-chip {
      background: rgba(212,160,23,0.045);
      border-color: rgba(212,160,23,0.16);
      color: rgba(253,246,227,0.66);
      font-size: 0.8rem;
      padding: 5px 11px;
      letter-spacing: 0.01em;
    }
    .quick-reply-chip:hover {
      background: rgba(212,160,23,0.1);
      border-color: rgba(212,160,23,0.3);
      color: rgba(253,246,227,0.82);
      transform: none;
    }

    main {
      display: flex;
      flex-direction: column;
    }

    #wa-optin { order: 1; }
    #chat-window { order: 2; }
    #suggestions {
      order: 3;
      margin-top: 14px;
      margin-bottom: 8px;
    }
    #suggestions.compact {
      gap: 6px;
      margin-top: 10px;
      margin-bottom: 6px;
    }
    #suggestions.compact .suggestion-chip {
      min-height: 40px;
      max-height: 40px;
      font-size: 0.8rem;
      padding: 0 11px;
      opacity: 0.82;
    }
    #suggestions.compact .suggestion-chip:nth-child(n+4) {
      display: none;
    }

    .input-area {
      order: 4;
      position: sticky;
      bottom: 8px;
      z-index: 2;
      padding-top: var(--space-2);
      padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
      margin-top: 10px;
      background: transparent;
      backdrop-filter: none;
    }

    #user-input {
      border-radius: var(--radius-sm);
      border-color: rgba(212,160,23,0.24);
      font-size: 1rem;
      padding: 13px 16px;
      min-height: 50px;
    }

    #send-btn {
      width: 50px;
      height: 50px;
      border-radius: var(--radius-sm);
      box-shadow: 0 8px 20px rgba(232,105,10,0.28);
    }

    #send-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 10px 22px rgba(232,105,10,0.34);
    }

    .votd-card {
      background: var(--surface-2);
      border-radius: var(--radius-md);
      padding: 26px 28px;
    }

    .votd-translation {
      color: rgba(253,246,227,0.8);
    }

    .auth-card,
    .onboarding-card {
      border-radius: var(--radius-lg);
    }

    .auth-input,
    .auth-input-phone,
    .onboarding-input,
    .pp-edit-input {
      border-color: rgba(212,160,23,0.24);
      border-radius: var(--radius-sm);
    }

    .pp-field { margin-bottom: 16px; }

    .pp-choice-btn {
      border-color: rgba(212,160,23,0.2);
      color: rgba(253,246,227,0.66);
    }

    .pp-choice-btn.active {
      border-color: rgba(212,160,23,0.42);
      box-shadow: inset 0 0 0 1px rgba(212,160,23,0.08);
    }

    footer {
      color: rgba(253,246,227,0.34);
      letter-spacing: 0.05em;
      padding: 22px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    }

    button:focus-visible,
    input:focus-visible,
    textarea:focus-visible,
    select:focus-visible {
      outline: none;
      box-shadow: var(--ring);
    }

    @media (max-width: 720px) {
      .divider {
        /* Prevent occasional glyph ghosting/duplication during scroll on mobile compositors */
        transform: translateZ(0);
        backface-visibility: hidden;
        contain: paint;
        margin-top: 2px;
        margin-bottom: 22px;
      }

      header { padding: 88px 16px 18px; }
      main { padding: 0 12px 34px; }
      #chat-window { padding: 16px 14px; max-height: none; min-height: 48vh; }
      .message.user .bubble, .message.krishna .bubble { max-width: 90%; font-size: 0.98rem; }
      .input-area { gap: 8px; padding-top: 10px; bottom: 6px; }
      #user-input { min-height: 48px; }
      #send-btn { width: 48px; height: 48px; }
      .votd-card { padding: 22px 18px; }
      .utility-bar {
        grid-template-columns: auto 1fr auto;
        padding: 8px 10px;
        gap: 8px;
      }
      .utility-bar .lang-bar {
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
      }
      .utility-bar .lang-btn {
        padding: 6px 10px;
        font-size: 0.84rem;
        min-height: 30px;
      }
      .utility-bar .thread-toggle,
      .utility-bar .auth-btn {
        min-height: 30px;
        padding: 6px 10px;
        font-size: 0.84rem;
      }
      .utility-bar .auth-user-name { display: none; }
      #mood-nudge {
        top: 66px;
        width: calc(100vw - 20px);
        border-radius: 14px;
        padding: 9px 12px;
        gap: 10px;
      }
      .mood-nudge-text { font-size: 0.84rem; }
      .mood-nudge-btn { font-size: 0.8rem; padding: 6px 11px; }
    }
	
	/* ════════════════════════════════════
   MODAL FIX — HIDE UTILITY BAR
════════════════════════════════════ */
body.modal-open .utility-bar {
  display: none !important;
}

/* Extra safety */
body.modal-open .utility-bar {
  pointer-events: none;
  opacity: 0;
}
