    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

    :root {
      --bg:      #1a0533;
      --surface: #2a0d4a;
      --primary: #ff6bba;
      --p2:      #ffb347;
      --p3:      #6bc5ff;
      --success: #5cffa0;
      --danger:  #ff5f7e;
      --warn:    #ffe066;
      --text:    #fff5ff;
      --muted:   rgba(255,235,255,0.55);
      --border:  rgba(255,200,255,0.14);
    }

    html, body {
      height: 100%;
      background: var(--bg);
      color: var(--text);
      font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
      overflow: hidden;
      -webkit-tap-highlight-color: transparent;
    }

    /* ── Animated bubbly background ─────────────────────────── */
    body::before {
      content: '';
      position: fixed; inset: 0;
      background:
        radial-gradient(ellipse 60% 50% at 10% 20%, rgba(255,107,186,.22) 0%, transparent 65%),
        radial-gradient(ellipse 50% 55% at 90% 80%, rgba(107,197,255,.18) 0%, transparent 65%),
        radial-gradient(ellipse 55% 40% at 55% 5%,  rgba(255,179,71,.12) 0%, transparent 65%);
      pointer-events: none;
      z-index: 0;
      animation: shift-bg 12s ease-in-out infinite alternate;
    }
    @keyframes shift-bg {
      0%   { transform: scale(1)    translateX(0);   }
      50%  { transform: scale(1.06) translateX(12px); }
      100% { transform: scale(1)    translateX(0);   }
    }

    /* ── Floating decorative blobs ──────────────────────────── */
    body::after {
      content: '✦ ✧ ✦';
      position: fixed; bottom: 22px; width: 100%; text-align: center;
      font-size: 14px; color: rgba(255,200,255,.2);
      letter-spacing: 18px; pointer-events: none; z-index: 0;
      animation: twinkle 3s ease-in-out infinite alternate;
    }
    @keyframes twinkle {
      0%   { opacity: .2; }
      100% { opacity: .55; }
    }

    /* ── Screens ─────────────────────────────────────────────── */
    .screen {
      position: fixed; inset: 0; z-index: 1;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      padding: 28px 24px;
      opacity: 0; pointer-events: none;
      transition: opacity .4s cubic-bezier(.34,1.56,.64,1), transform .4s cubic-bezier(.34,1.56,.64,1);
      transform: translateY(20px) scale(.97);
    }
    .screen.active {
      opacity: 1; pointer-events: all;
      transform: translateY(0) scale(1);
    }

    /* ── HOME ────────────────────────────────────────────────── */
    .home-logo {
      font-size: 52px; font-weight: 900; letter-spacing: -1px;
      background: linear-gradient(130deg, var(--primary) 0%, var(--p2) 55%, var(--p3) 100%);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-bottom: 6px;
      animation: logo-float 3.2s ease-in-out infinite;
      filter: drop-shadow(0 0 18px rgba(255,107,186,.4));
    }
    @keyframes logo-float {
      0%,100% { transform: translateY(0) rotate(-1deg); }
      50%      { transform: translateY(-7px) rotate(1deg); }
    }

    .home-emoji {
      font-size: 40px; margin-bottom: 10px;
      animation: wiggle 2.4s ease-in-out infinite;
      display: block;
    }
    @keyframes wiggle {
      0%,100% { transform: rotate(-8deg) scale(1);    }
      25%      { transform: rotate(8deg)  scale(1.08); }
      50%      { transform: rotate(-5deg) scale(1.04); }
      75%      { transform: rotate(6deg)  scale(1.06); }
    }

    .home-tagline {
      font-size: 15px; font-weight: 600; color: var(--muted); text-align: center;
      max-width: 240px; line-height: 1.6; margin-bottom: 34px;
    }

    .btn-start {
      display: flex; align-items: center; justify-content: center; gap: 10px;
      padding: 18px 50px; border: none; border-radius: 100px; cursor: pointer;
      background: linear-gradient(130deg, #ff6bba, #ffb347);
      color: #fff; font-size: 18px; font-weight: 800;
      font-family: inherit;
      box-shadow: 0 6px 28px rgba(255,107,186,.5), 0 2px 0 rgba(255,255,255,.15) inset;
      transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
      min-width: 210px;
      letter-spacing: .2px;
    }
    .btn-start:hover  { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 36px rgba(255,107,186,.6); }
    .btn-start:active { transform: scale(.93) translateY(1px); box-shadow: 0 3px 14px rgba(255,107,186,.4); }

    #mic-error {
      display: none; margin-top: 18px;
      font-size: 13px; font-weight: 700; color: var(--danger);
      text-align: center; max-width: 250px;
      background: rgba(255,95,126,.12); padding: 10px 16px; border-radius: 14px;
      border: 1px solid rgba(255,95,126,.3);
    }
    #socket-status {
      display: none; margin-top: 14px;
      font-size: 12px; font-weight: 700; color: var(--warn); text-align: center;
    }
    .home-note {
      margin-top: 28px; font-size: 12px; font-weight: 600;
      color: rgba(255,200,255,.3);
      text-align: center; max-width: 240px; line-height: 1.65;
    }

    /* ── SEARCHING ───────────────────────────────────────────── */
    .search-avatar {
      position: relative; width: 112px; height: 112px; margin-bottom: 32px;
    }
    .search-avatar .pulse {
      position: absolute; inset: 0; border-radius: 50%;
      border: 3px solid var(--primary); opacity: 0;
      animation: search-pulse 2.4s ease-out infinite;
    }
    .search-avatar .pulse:nth-child(2) {
      border-color: var(--p2); animation-delay: .8s;
    }
    .search-avatar .pulse:nth-child(3) {
      border-color: var(--p3); animation-delay: 1.6s;
    }
    @keyframes search-pulse {
      0%   { transform: scale(1);   opacity: .7; }
      100% { transform: scale(2.1); opacity: 0;  }
    }
    .search-avatar .core {
      position: absolute; inset: 0; border-radius: 50%; z-index: 1;
      background: linear-gradient(135deg, #ff6bba, #ffb347);
      display: flex; align-items: center; justify-content: center;
      font-size: 46px;
      box-shadow: 0 6px 28px rgba(255,107,186,.45);
      animation: core-spin-scale 2s ease-in-out infinite alternate;
    }
    @keyframes core-spin-scale {
      0%   { transform: scale(1)    rotate(-4deg); }
      100% { transform: scale(1.07) rotate(4deg);  }
    }

    .search-title {
      font-size: 22px; font-weight: 800; margin-bottom: 6px;
      background: linear-gradient(130deg, var(--primary), var(--p3));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .search-subtitle { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
    .search-pos {
      font-size: 13px; font-weight: 800; color: var(--p2);
      min-height: 20px; margin-bottom: 28px;
    }

    .dots { display: flex; gap: 10px; margin-bottom: 34px; }
    .dots span {
      width: 10px; height: 10px; border-radius: 50%;
      animation: dot-bounce 1.3s ease-in-out infinite;
    }
    .dots span:nth-child(1) { background: var(--primary); }
    .dots span:nth-child(2) { background: var(--p2); animation-delay: .18s; }
    .dots span:nth-child(3) { background: var(--p3); animation-delay: .36s; }
    @keyframes dot-bounce {
      0%,80%,100% { transform: translateY(0);    opacity: .5; }
      40%          { transform: translateY(-14px); opacity: 1;  }
    }

    .btn-cancel {
      padding: 12px 34px;
      background: rgba(255,200,255,.08);
      color: var(--muted); border: 2px solid var(--border);
      border-radius: 100px; font-size: 14px; font-weight: 700;
      font-family: inherit; cursor: pointer;
      transition: all .18s cubic-bezier(.34,1.56,.64,1);
    }
    .btn-cancel:hover { background: rgba(255,200,255,.15); color: var(--text); transform: scale(1.04); }
    .btn-cancel:active { transform: scale(.95); }

    /* ── CALL ────────────────────────────────────────────────── */
    .call-avatar-wrap {
      position: relative; width: 130px; height: 130px; margin-bottom: 28px;
    }
    .call-ring {
      position: absolute; border-radius: 50%; opacity: 0;
      transition: transform .1s ease, opacity .1s ease;
    }
    .call-ring.r1 { inset: -16px; border: 3px solid rgba(255,107,186,.5); }
    .call-ring.r2 { inset: -31px; border: 3px solid rgba(255,179,71,.4);  }
    .call-ring.r3 { inset: -46px; border: 3px solid rgba(107,197,255,.3); }

    .ringing .call-ring.r1 { animation: ring-pulse 2s ease-out infinite; }
    .ringing .call-ring.r2 { animation: ring-pulse 2s ease-out .6s infinite; }
    .ringing .call-ring.r3 { animation: ring-pulse 2s ease-out 1.2s infinite; }

    .speaking .call-ring.r1 { animation: speak-ring 1.5s ease-out infinite; }
    .speaking .call-ring.r2 { animation: speak-ring 1.5s ease-out .35s infinite; }
    .speaking .call-ring.r3 { animation: speak-ring 1.5s ease-out .7s infinite; }

    @keyframes ring-pulse {
      0%   { opacity: .6;  transform: scale(1);    }
      100% { opacity: 0;   transform: scale(1.15); }
    }
    @keyframes speak-ring {
      0%   { opacity: .75; transform: scale(1);    }
      50%  { opacity: .9;  }
      100% { opacity: 0;   transform: scale(1.25); }
    }

    .call-avatar {
      position: absolute; inset: 0; border-radius: 50%; z-index: 2;
      background: linear-gradient(145deg, var(--surface), #3a1060);
      border: 3px solid rgba(255,200,255,.2);
      display: flex; align-items: center; justify-content: center;
      font-size: 54px;
      box-shadow: 0 8px 32px rgba(255,107,186,.25);
    }

    .call-name {
      font-size: 22px; font-weight: 800; margin-bottom: 8px;
      background: linear-gradient(130deg, #fff5ff, var(--primary));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .call-badge {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 5px 15px; border-radius: 100px; font-size: 12px; font-weight: 800;
      margin-bottom: 14px;
    }
    .call-badge::before {
      content: ''; width: 7px; height: 7px;
      border-radius: 50%; background: currentColor;
    }
    .call-badge.connecting { background: rgba(255,224,102,.18); color: var(--warn);    border: 1px solid rgba(255,224,102,.35); }
    .call-badge.connected  { background: rgba(92,255,160,.18);  color: var(--success); border: 1px solid rgba(92,255,160,.35);  }
    .call-badge.error      { background: rgba(255,95,126,.18);  color: var(--danger);  border: 1px solid rgba(255,95,126,.35);  }

    .call-timer {
      font-size: 38px; font-weight: 800; letter-spacing: 4px;
      font-variant-numeric: tabular-nums; margin-bottom: 42px;
      background: linear-gradient(130deg, #fff5ff, var(--p3));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .call-timer.low {
      background: none;
      -webkit-text-fill-color: var(--danger);
      animation: low-pulse 1s ease-in-out infinite;
    }
    @keyframes low-pulse {
      0%,100% { opacity: 1; transform: scale(1); }
      50%     { opacity: .55; transform: scale(1.06); }
    }

    .call-controls { display: flex; gap: 26px; align-items: center; }
    .ctrl-btn {
      display: flex; flex-direction: column; align-items: center; gap: 8px;
      cursor: pointer; border: none; background: none; color: var(--muted);
      font-family: inherit;
    }
    .ctrl-icon {
      width: 60px; height: 60px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 24px;
    }
    .ctrl-btn:active .ctrl-icon { transform: scale(.88); }
    .ctrl-btn:hover  .ctrl-icon { transform: scale(1.1) rotate(-5deg); }

    .ctrl-icon.next {
      background: linear-gradient(135deg, rgba(107,197,255,.25), rgba(124,92,252,.2));
      border: 2px solid rgba(107,197,255,.35);
      box-shadow: 0 4px 16px rgba(107,197,255,.2);
    }
    .ctrl-icon.end {
      width: 70px; height: 70px; font-size: 26px;
      background: linear-gradient(135deg, #ff5f7e, #ff3355);
      box-shadow: 0 6px 24px rgba(255,95,126,.55);
      border: none;
    }
    .ctrl-icon.mute {
      background: rgba(255,200,255,.1);
      border: 2px solid var(--border);
    }
    .ctrl-icon.mute.active {
      background: rgba(255,95,126,.22);
      border-color: rgba(255,95,126,.45);
    }
    .ctrl-label { font-size: 11px; font-weight: 800; letter-spacing: .3px; }

    /* ── Call ended overlay ──────────────────────────────────── */
    .ended-overlay {
      position: fixed; inset: 0; z-index: 20;
      background: rgba(26,5,51,.93);
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      opacity: 0; pointer-events: none;
      transition: opacity .3s;
    }
    .ended-overlay.visible { opacity: 1; pointer-events: all; }
    .ended-overlay .e-icon {
      font-size: 64px; margin-bottom: 16px;
      animation: logo-float 2s ease-in-out infinite;
    }
    .ended-overlay .e-msg {
      font-size: 22px; font-weight: 900; margin-bottom: 8px;
      background: linear-gradient(130deg, var(--primary), var(--p3));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .ended-overlay .e-sub { font-size: 14px; font-weight: 600; color: var(--muted); }

    /* ── Lucide icons ────────────────────────────────────────── */
    .home-emoji svg          { width: 48px; height: 48px; color: var(--primary); stroke-width: 2px; }
    .search-avatar .core svg { width: 44px; height: 44px; color: #fff; stroke-width: 2px; }
    .call-avatar svg         { width: 50px; height: 50px; color: rgba(255,200,255,.65); stroke-width: 2px; }
    .ctrl-icon svg           { width: 24px; height: 24px; stroke-width: 2.2px; }
    .ctrl-icon.end svg       { width: 26px; height: 26px; color: #fff; stroke-width: 2.2px; }
    .e-icon svg              { width: 60px; height: 60px; color: var(--primary); stroke-width: 1.8px; }
    .btn-start svg           { width: 20px; height: 20px; color: #fff; stroke-width: 2.5px; flex-shrink: 0; }
    #mic-error svg, #socket-status svg { width: 14px; height: 14px; display: inline; vertical-align: -2px; stroke-width: 2.5px; }

    /* ── Report button ──────────────────────────────────────────── */
    .report-wrap { margin-top: 20px; }
    .btn-report {
      display: flex; align-items: center; gap: 6px;
      padding: 7px 20px; border-radius: 100px;
      background: rgba(255,95,126,.07);
      border: 1px solid rgba(255,95,126,.22);
      color: rgba(255,95,126,.6);
      font-size: 12px; font-weight: 800;
      font-family: inherit; cursor: pointer;
      transition: all .18s cubic-bezier(.34,1.56,.64,1);
      letter-spacing: .3px;
    }
    .btn-report svg { width: 13px; height: 13px; stroke-width: 2.2px; }
    .btn-report:hover  { background: rgba(255,95,126,.16); border-color: rgba(255,95,126,.5); color: var(--danger); transform: scale(1.04); }
    .btn-report:active { transform: scale(.93); }

    /* ── Report bottom sheet ────────────────────────────────────── */
    .report-backdrop {
      position: fixed; inset: 0; z-index: 40;
      background: rgba(10,0,20,.72); backdrop-filter: blur(5px);
      opacity: 0; pointer-events: none; transition: opacity .3s;
    }
    .report-backdrop.open { opacity: 1; pointer-events: all; }
    .report-sheet {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 41;
      background: var(--surface); border: 1px solid var(--border); border-bottom: none;
      border-radius: 24px 24px 0 0; padding: 8px 20px 40px;
      transform: translateY(100%); transition: transform .35s cubic-bezier(.34,1.1,.64,1);
    }
    .report-sheet.open { transform: translateY(0); }
    .sheet-handle {
      width: 36px; height: 4px; border-radius: 2px;
      background: rgba(255,200,255,.2); margin: 0 auto 20px;
    }
    .sheet-title {
      font-size: 16px; font-weight: 900; margin-bottom: 4px;
      display: flex; align-items: center; gap: 8px; color: var(--text);
    }
    .sheet-title svg { width: 18px; height: 18px; color: var(--danger); stroke-width: 2.2px; }
    .sheet-sub { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 20px; }
    .reason-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
    .reason-chip {
      padding: 8px 16px; border-radius: 100px;
      background: rgba(255,255,255,.05); border: 1.5px solid var(--border);
      color: var(--muted); font-size: 13px; font-weight: 700;
      font-family: inherit; cursor: pointer;
      transition: all .15s cubic-bezier(.34,1.56,.64,1);
      -webkit-tap-highlight-color: transparent;
    }
    .reason-chip:hover  { border-color: rgba(255,95,126,.4); color: var(--text); }
    .reason-chip:active { transform: scale(.93); }
    .reason-chip.selected { background: rgba(255,95,126,.18); border-color: rgba(255,95,126,.6); color: var(--danger); }
    .btn-send-report {
      width: 100%; padding: 14px; border: none; border-radius: 14px; cursor: pointer;
      background: linear-gradient(130deg, #ff5f7e, #ff3355);
      color: #fff; font-size: 15px; font-weight: 800; font-family: inherit;
      box-shadow: 0 6px 22px rgba(255,95,126,.4);
      transition: transform .15s, box-shadow .2s, opacity .2s;
      margin-bottom: 10px;
    }
    .btn-send-report:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
    .btn-send-report:not(:disabled):hover  { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,95,126,.5); }
    .btn-send-report:not(:disabled):active { transform: scale(.96); }
    .btn-cancel-report {
      width: 100%; padding: 11px; border-radius: 14px;
      background: none; border: 1.5px solid var(--border);
      color: var(--muted); font-size: 14px; font-weight: 700;
      font-family: inherit; cursor: pointer; transition: all .15s;
    }
    .btn-cancel-report:hover  { background: rgba(255,255,255,.05); color: var(--text); }
    .btn-cancel-report:active { transform: scale(.96); }

    /* ── Thanks for reporting overlay ───────────────────────────── */
    .thanks-overlay {
      position: fixed; inset: 0; z-index: 50;
      background: rgba(26,5,51,.95);
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      opacity: 0; pointer-events: none; transition: opacity .3s;
    }
    .thanks-overlay.visible { opacity: 1; pointer-events: all; }
    .thanks-check {
      width: 72px; height: 72px; border-radius: 50%;
      background: rgba(92,255,160,.12); border: 2px solid rgba(92,255,160,.4);
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 20px;
    }
    .thanks-overlay.visible .thanks-check { animation: check-pop .5s cubic-bezier(.34,1.56,.64,1); }
    @keyframes check-pop {
      0%   { transform: scale(0); opacity: 0; }
      100% { transform: scale(1); opacity: 1; }
    }
    .thanks-check svg { width: 36px; height: 36px; color: var(--success); stroke-width: 2.5px; }
    .thanks-title {
      font-size: 22px; font-weight: 900; margin-bottom: 8px;
      background: linear-gradient(130deg, var(--success), var(--p3));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .thanks-sub { font-size: 14px; font-weight: 600; color: var(--muted); text-align: center; max-width: 220px; line-height: 1.6; }

    /* ── Google auth / profile ───────────────────────────────── */
    .auth-topbar {
      position: absolute; top: 18px; left: 20px; right: 20px; z-index: 5;
      display: flex; align-items: center; gap: 10px;
    }
    .auth-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

    .btn-google {
      display: flex; align-items: center; justify-content: center; gap: 10px;
      padding: 9px 18px; border-radius: 100px; cursor: pointer;
      background: #fff; color: #3c4043; font-size: 13px; font-weight: 700;
      font-family: inherit; border: none; width: auto;
      box-shadow: 0 2px 10px rgba(0,0,0,.3);
      transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
    }
    .btn-google svg { width: 15px; height: 15px; }
    .btn-google:hover  { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
    .btn-google:active { transform: scale(.96); }

    .auth-signed { display: flex; align-items: center; }
    .auth-chip {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 16px; border-radius: 100px;
      background: rgba(92,255,160,.1); border: 1px solid rgba(92,255,160,.3);
      font-size: 13px; font-weight: 800; color: var(--success);
      white-space: nowrap;
    }
    .auth-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
    .btn-signout {
      padding: 8px 16px; border-radius: 100px; cursor: pointer;
      background: none; border: 1.5px solid var(--border); color: var(--muted);
      font-size: 12px; font-weight: 800; font-family: inherit;
      transition: all .15s; white-space: nowrap;
    }
    .btn-signout:hover  { background: rgba(255,255,255,.05); color: var(--text); }
    .btn-signout:active { transform: scale(.95); }

    .profile-form {
      display: flex; flex-direction: column; gap: 10px; width: 100%;
      background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
      padding: 18px;
    }
    .profile-title { font-size: 15px; font-weight: 900; color: var(--text); }
    .profile-sub { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.5; margin-bottom: 4px; }
    .profile-input {
      width: 100%; padding: 11px 14px; border-radius: 12px;
      background: rgba(255,255,255,.05); border: 1.5px solid var(--border);
      color: var(--text); font-size: 14px; font-weight: 700; font-family: inherit;
      outline: none;
    }
    .profile-input:focus { border-color: rgba(107,197,255,.5); }
    .profile-input option { background: #2a0d4a; color: #fff; }
    #profile-error { font-size: 12px; font-weight: 700; color: var(--danger); display: none; }
    .btn-save-profile {
      width: 100%; padding: 12px; border: none; border-radius: 14px; cursor: pointer;
      background: linear-gradient(130deg, #ff6bba, #ffb347);
      color: #fff; font-size: 14px; font-weight: 800; font-family: inherit;
      box-shadow: 0 4px 18px rgba(255,107,186,.4);
      transition: transform .15s, box-shadow .2s;
    }
    .btn-save-profile:hover  { transform: translateY(-2px); }
    .btn-save-profile:active { transform: scale(.96); }

    .call-partner-meta {
      font-size: 13px; font-weight: 700; color: var(--muted);
      margin-bottom: 6px; min-height: 18px;
    }
