/* HeyTia 2.5.0 — one stage, one Tia, responsive video-call layout. */
:root{--ht-ui:#061126;--ht-ui2:#0a1830;--ht-border:rgba(102,198,255,.28);--ht-cyan:#69e9ff;--ht-green:#57efb7;--ht-violet:#ec74ff;--ht-text:#eef8ff;--ht-muted:#9eb5ca}
html,body{overflow:hidden!important;overscroll-behavior:none}
.heytia-tia-shell{position:fixed;inset:0;z-index:20;color:var(--ht-text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;pointer-events:none;overflow:hidden!important;max-width:100vw!important}
.heytia-tia-shell *{box-sizing:border-box}
.heytia-tia-shell .rbki-live-wrapper{position:fixed!important;inset:0!important;z-index:20;pointer-events:none;max-width:none!important;width:100vw!important;height:100svh!important;background:transparent!important;overflow:hidden!important}
.heytia-tia-shell .rbki-voice-toolbar,.heytia-tia-shell .rbki-avatar-test-panel,.heytia-tia-shell .rbki-tia-build-marker,.heytia-tia-shell .rbki-voice-diagnostic{display:none!important}
.heytia-tia-shell .rbki-orb-wrap{position:fixed!important;inset:0!important;z-index:20;pointer-events:none;background:transparent!important;overflow:hidden!important}

/* Normal stage: the original renderer is only the animated Tia layer. Dark pixels blend into the one theme background. */
.heytia-tia-shell .rbki-orb-stage{position:absolute!important;left:50%!important;bottom:86px!important;top:auto!important;width:min(820px,52vw)!important;height:min(82svh,850px)!important;transform:translateX(-50%)!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:hidden!important;transition:left .32s ease,width .32s ease,height .32s ease,bottom .32s ease,top .32s ease,transform .32s ease!important;isolation:auto!important;mix-blend-mode:screen!important;-webkit-mask-image:radial-gradient(ellipse 61% 66% at 50% 49%,#000 0 69%,rgba(0,0,0,.9) 77%,rgba(0,0,0,.35) 88%,transparent 100%)!important;mask-image:radial-gradient(ellipse 61% 66% at 50% 49%,#000 0 69%,rgba(0,0,0,.9) 77%,rgba(0,0,0,.35) 88%,transparent 100%)!important}
.heytia-tia-shell .rbki-orb-stage .rbki-tia-tech-loop-v272,.heytia-tia-shell .rbki-orb-stage .rbki-tia-tech-bg-v272{display:none!important}
.heytia-tia-shell .rbki-orb-stage .rbki-tia-avatar-v22,.heytia-tia-shell .rbki-orb-stage .rbki-tia-lipsync-v230,.heytia-tia-shell .rbki-orb-stage .rbki-tia-speaking-v239,.heytia-tia-shell .rbki-orb-stage .rbki-tia-avatar-v240{background:transparent!important}
.heytia-tia-shell .rbki-orb-stage .rbki-tia-video,.heytia-tia-shell .rbki-orb-stage .rbki-tia-speaking-frame-v239,.heytia-tia-shell .rbki-orb-stage .rbki-tia-lipsync-v230 img,.heytia-tia-shell .rbki-orb-stage canvas{object-fit:cover!important;object-position:center 42%!important;background:transparent!important;filter:saturate(1.04) contrast(1.02)!important}

/* Status belongs to Tia and stays compact. */
.heytia-statebar{position:fixed;z-index:76;left:50%;bottom:101px;transform:translateX(-50%);width:min(430px,calc(100vw - 30px));display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:9px;padding:9px 13px;border-radius:14px;border:1px solid var(--ht-border);background:rgba(3,12,31,.86);backdrop-filter:blur(18px);box-shadow:0 14px 42px rgba(0,0,0,.28);pointer-events:auto}
.heytia-state-dot{width:9px;height:9px;border-radius:50%;background:#45ef8d;color:#45ef8d;box-shadow:0 0 12px currentColor}.heytia-state-name{font-size:11px;letter-spacing:.12em;color:#53f0b1}.heytia-status{font-size:11px;color:#b4c8da;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.heytia-statebar[data-state="connecting"] .heytia-state-dot,.heytia-statebar[data-state="thinking"] .heytia-state-dot{background:#ffd76b;color:#ffd76b}.heytia-statebar[data-state="connecting"] .heytia-state-name,.heytia-statebar[data-state="thinking"] .heytia-state-name{color:#ffd76b}.heytia-statebar[data-state="listening"] .heytia-state-dot{background:#58e8ff;color:#58e8ff}.heytia-statebar[data-state="listening"] .heytia-state-name{color:#58e8ff}.heytia-statebar[data-state="searching"] .heytia-state-dot{background:#8bc4ff;color:#8bc4ff}.heytia-statebar[data-state="searching"] .heytia-state-name{color:#8bc4ff}.heytia-statebar[data-state="speaking"],.heytia-statebar[data-state="emotional"]{border-color:rgba(231,105,255,.33)}.heytia-statebar[data-state="speaking"] .heytia-state-dot,.heytia-statebar[data-state="emotional"] .heytia-state-dot{background:#e969ff;color:#e969ff}.heytia-statebar[data-state="speaking"] .heytia-state-name,.heytia-statebar[data-state="emotional"] .heytia-state-name{color:#e969ff}.heytia-statebar[data-state="error"] .heytia-state-dot{background:#ff667b;color:#ff667b}.heytia-statebar[data-state="error"] .heytia-state-name{color:#ff7b8e}

.heytia-controls{position:fixed;z-index:78;left:50%;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:flex-start;justify-content:center;gap:clamp(13px,2.2vw,28px);padding:10px 15px 9px;border-radius:22px;background:linear-gradient(180deg,rgba(4,14,34,.46),rgba(2,9,25,.94));border:1px solid rgba(100,178,255,.22);backdrop-filter:blur(20px);box-shadow:0 18px 60px rgba(0,0,0,.3);pointer-events:auto;max-width:calc(100vw - 18px)}
.heytia-ctrl{appearance:none;border:0;background:none;color:var(--ht-text);display:grid;justify-items:center;gap:5px;min-width:68px;padding:0;cursor:pointer;font:500 12px/1.1 inherit;position:relative}.heytia-ctrl .ico{width:47px;height:47px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(110,199,255,.56);background:linear-gradient(180deg,rgba(8,25,55,.96),rgba(2,10,28,.98));box-shadow:0 0 24px rgba(45,180,255,.1),inset 0 0 18px rgba(60,180,255,.06);font-size:18px;transition:.2s ease}.heytia-ctrl:hover .ico{transform:translateY(-2px)}.heytia-talk.is-on .ico{border-color:#56e8ff;box-shadow:0 0 30px rgba(54,220,255,.3),inset 0 0 20px rgba(60,210,255,.12)}.heytia-see.is-on .ico{border-color:#59f0c8;box-shadow:0 0 30px rgba(89,240,200,.24)}.heytia-out .ico{border-color:rgba(224,91,255,.7);color:#f0b7ff}.heytia-badge{position:absolute;width:8px;height:8px;border-radius:50%;background:#ff64f4;box-shadow:0 0 12px #ff64f4;right:8px;top:3px}

.heytia-panel{pointer-events:auto}.heytia-panel[hidden]{display:none!important}
.heytia-output{position:fixed;z-index:90;right:24px;top:84px;width:min(430px,calc(100vw - 28px));max-height:calc(100svh - 190px);overflow:auto;padding:16px;border-radius:18px;border:1px solid rgba(114,188,255,.27);background:rgba(2,10,28,.96);backdrop-filter:blur(18px);box-shadow:0 24px 80px rgba(0,0,0,.5);text-align:left}.heytia-output-body{font-size:14px;line-height:1.55}.heytia-output-body p{margin:0 0 12px}.heytia-output-body a{color:#72e1ff;text-decoration:none;border-bottom:1px solid rgba(114,225,255,.35)}
.heytia-actions{display:flex;gap:9px;justify-content:flex-end;margin-top:9px}.heytia-actions button,.heytia-cam-switch{border:1px solid rgba(130,194,255,.27);background:#07152c;color:#dceeff;border-radius:10px;padding:8px 11px;cursor:pointer;font:500 12px/1 inherit}.heytia-actions .primary{border-color:rgba(64,214,255,.55);background:#0a2440}

/* Camera card; desktop = right side of a balanced video call. */
.heytia-camera{position:fixed;z-index:74;right:3.5vw;left:auto;top:14svh;width:min(42vw,700px);height:min(65svh,660px);padding:11px;border-radius:20px;border:1px solid rgba(92,209,255,.33);background:rgba(2,10,28,.92);backdrop-filter:blur(18px);box-shadow:0 28px 90px rgba(0,0,0,.44);text-align:left;display:flex;flex-direction:column;overflow:hidden}
.heytia-camera-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 3px 9px;color:#cdeeff;font-size:11px;letter-spacing:.04em;flex:0 0 auto}.heytia-camera-tools{display:flex;align-items:center;gap:8px}.heytia-live-eye{display:inline-flex;align-items:center;gap:7px;color:#61efc7;white-space:nowrap}.heytia-live-eye:before{content:"";width:8px;height:8px;border-radius:50%;background:#61efc7;box-shadow:0 0 10px #61efc7}.heytia-call-label{color:#a7bfd5;white-space:nowrap}.heytia-cam-switch{display:inline-flex;align-items:center;gap:6px;padding:7px 9px;background:rgba(7,21,44,.95)}.heytia-cam-switch span:first-child{font-size:17px;line-height:.7;color:#7ee9ff}.heytia-camera video{display:block;width:100%;min-height:0;flex:1 1 auto;object-fit:cover;object-position:center;border-radius:14px;background:#01040b}.heytia-camera-status{margin-top:7px;color:#a9bdd2;font-size:11px;min-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:0 0 auto}

/* Desktop split: Tia and camera are peers, not stacked widgets. */
.heytia-tia-shell.is-camera-on .rbki-orb-stage{left:26%!important;top:12svh!important;bottom:auto!important;width:min(46vw,760px)!important;height:min(69svh,700px)!important;transform:translateX(-50%)!important;mix-blend-mode:screen!important;-webkit-mask-image:radial-gradient(ellipse 64% 72% at 50% 48%,#000 0 72%,rgba(0,0,0,.88) 80%,transparent 100%)!important;mask-image:radial-gradient(ellipse 64% 72% at 50% 48%,#000 0 72%,rgba(0,0,0,.88) 80%,transparent 100%)!important}
.heytia-tia-shell.is-camera-on .heytia-statebar{left:26%;bottom:103px}.heytia-tia-shell.is-camera-on .heytia-controls{left:50%}

@media(max-width:1050px) and (min-width:761px){
 .heytia-tia-shell .rbki-orb-stage{width:min(760px,62vw)!important}
 .heytia-camera{right:2vw;width:45vw}.heytia-tia-shell.is-camera-on .rbki-orb-stage{left:25%!important;width:47vw!important}.heytia-tia-shell.is-camera-on .heytia-statebar{left:25%}
}

/* Phone portrait: normal = Tia fills the useful area. Camera mode = Tia above, camera below, both full width. */
@media(max-width:760px){
 .heytia-tia-shell{width:100vw!important;height:100svh!important;overflow:hidden!important}
 .heytia-tia-shell .rbki-orb-stage{left:50%!important;top:11svh!important;bottom:auto!important;width:96vw!important;height:61svh!important;transform:translateX(-50%)!important;mix-blend-mode:screen!important;-webkit-mask-image:radial-gradient(ellipse 69% 70% at 50% 48%,#000 0 72%,rgba(0,0,0,.87) 80%,rgba(0,0,0,.35) 90%,transparent 100%)!important;mask-image:radial-gradient(ellipse 69% 70% at 50% 48%,#000 0 72%,rgba(0,0,0,.87) 80%,rgba(0,0,0,.35) 90%,transparent 100%)!important}
 .heytia-tia-shell .rbki-orb-stage .rbki-tia-video,.heytia-tia-shell .rbki-orb-stage .rbki-tia-speaking-frame-v239,.heytia-tia-shell .rbki-orb-stage .rbki-tia-lipsync-v230 img{object-position:center 39%!important}
 .heytia-statebar{left:10px;right:10px;bottom:88px;transform:none;width:auto;padding:8px 11px;border-radius:13px}
 .heytia-controls{bottom:max(8px,env(safe-area-inset-bottom));gap:7px;padding:8px 8px 7px;border-radius:18px;width:calc(100vw - 18px);justify-content:space-evenly}
 .heytia-ctrl{min-width:62px;font-size:11px}.heytia-ctrl .ico{width:44px;height:44px}
 .heytia-output{left:9px;right:9px;top:auto;bottom:85px;width:auto;max-height:55svh;padding:14px}

 .heytia-camera{left:9px!important;right:9px!important;top:47svh!important;bottom:auto!important;width:auto!important;height:38svh!important;padding:8px;border-radius:16px}
 .heytia-camera-head{font-size:10px;padding:1px 2px 6px}.heytia-camera-tools{gap:5px}.heytia-call-label{display:none}.heytia-cam-switch{padding:6px 8px;border-radius:9px}.heytia-cam-switch .switch-label{display:none}.heytia-camera video{border-radius:11px;object-fit:cover}.heytia-actions{margin-top:5px}.heytia-actions button{padding:7px 9px;font-size:11px}.heytia-camera-status{font-size:10px;margin-top:4px}
 .heytia-tia-shell.is-camera-on .rbki-orb-stage{left:50%!important;top:6svh!important;bottom:auto!important;width:100vw!important;height:39svh!important;transform:translateX(-50%)!important;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 8%,#000 89%,transparent 100%)!important;mask-image:linear-gradient(to bottom,transparent 0,#000 8%,#000 89%,transparent 100%)!important}
 .heytia-tia-shell.is-camera-on .rbki-orb-stage .rbki-tia-video,.heytia-tia-shell.is-camera-on .rbki-orb-stage .rbki-tia-speaking-frame-v239,.heytia-tia-shell.is-camera-on .rbki-orb-stage .rbki-tia-lipsync-v230 img{object-fit:cover!important;object-position:center 37%!important}
 .heytia-tia-shell.is-camera-on .heytia-statebar{left:10px;right:10px;bottom:auto;top:39svh;transform:none;width:auto;z-index:79}
 .heytia-tia-shell.is-camera-on .heytia-controls{left:50%;bottom:max(7px,env(safe-area-inset-bottom));z-index:82}
}

/* Very narrow phones: keep everything inside the viewport. */
@media(max-width:420px){
 .heytia-statebar{grid-template-columns:auto auto minmax(0,1fr)}.heytia-status{font-size:10px}.heytia-controls{padding-left:5px;padding-right:5px}.heytia-ctrl{min-width:58px}.heytia-camera{top:46svh!important;height:39svh!important}
 .heytia-tia-shell.is-camera-on .rbki-orb-stage{height:38svh!important}.heytia-tia-shell.is-camera-on .heytia-statebar{top:38svh}
}

/* =========================================================
   HeyTia 2.5.1 — coherent responsive call layout
   ========================================================= */
@media (min-width: 901px){
  .heytia-tia-shell .rbki-orb-stage{
    left:50%!important; top:9svh!important; bottom:auto!important;
    width:min(760px,48vw)!important; height:72svh!important;
    transform:translateX(-50%)!important;
  }
  .heytia-tia-shell.is-camera-on .rbki-orb-stage{
    left:27%!important; top:13svh!important; width:46vw!important; height:62svh!important;
    border:1px solid rgba(92,209,255,.26)!important; border-radius:22px!important;
    -webkit-mask-image:none!important; mask-image:none!important; overflow:hidden!important;
  }
  .heytia-camera{
    right:3vw!important; top:13svh!important; width:44vw!important; height:62svh!important;
  }
  .heytia-tia-shell.is-camera-on .heytia-statebar{left:27%!important;bottom:108px!important}
}

@media (max-width: 900px){
  .heytia-tia-shell .rbki-orb-stage{
    left:50%!important; top:7svh!important; bottom:auto!important;
    width:100vw!important; height:70svh!important; transform:translateX(-50%)!important;
    -webkit-mask-image:none!important; mask-image:none!important;
  }
  .heytia-tia-shell .rbki-orb-stage .rbki-tia-video,
  .heytia-tia-shell .rbki-orb-stage .rbki-tia-speaking-frame-v239,
  .heytia-tia-shell .rbki-orb-stage .rbki-tia-face-v288{
    object-fit:cover!important; object-position:center 40%!important;
  }
  .heytia-statebar{left:12px!important;right:12px!important;bottom:91px!important;top:auto!important;transform:none!important;width:auto!important}
  .heytia-controls{left:50%!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto!important;min-width:min(390px,calc(100vw - 24px))!important}

  /* Camera mode = two deliberate video-call tiles stacked vertically. */
  .heytia-tia-shell.is-camera-on .rbki-orb-stage{
    left:12px!important; right:12px!important; top:8svh!important; width:auto!important;
    height:31svh!important; transform:none!important; border:1px solid rgba(92,209,255,.28)!important;
    border-radius:18px!important; overflow:hidden!important; -webkit-mask-image:none!important; mask-image:none!important;
  }
  .heytia-tia-shell.is-camera-on .rbki-orb-stage .rbki-tia-video,
  .heytia-tia-shell.is-camera-on .rbki-orb-stage .rbki-tia-speaking-frame-v239,
  .heytia-tia-shell.is-camera-on .rbki-orb-stage .rbki-tia-face-v288{
    object-fit:cover!important; object-position:center 39%!important;
  }
  .heytia-camera{
    left:12px!important; right:12px!important; top:41svh!important; bottom:auto!important;
    width:auto!important; height:36svh!important; padding:8px!important; border-radius:18px!important;
  }
  .heytia-camera video{object-fit:cover!important;object-position:center!important;min-height:0!important}
  .heytia-tia-shell.is-camera-on .heytia-statebar{
    left:12px!important;right:12px!important;top:auto!important;bottom:91px!important;transform:none!important;width:auto!important;z-index:80!important
  }
  .heytia-tia-shell.is-camera-on .heytia-controls{bottom:max(8px,env(safe-area-inset-bottom))!important;z-index:82!important}
}

@media (max-width: 480px){
  .heytia-tia-shell .rbki-orb-stage{top:7svh!important;height:69svh!important}
  .heytia-tia-shell.is-camera-on .rbki-orb-stage{top:7svh!important;height:30svh!important}
  .heytia-camera{top:39svh!important;height:38svh!important}
  .heytia-camera-head{min-height:30px!important}
  .heytia-cam-switch{display:inline-flex!important;min-width:38px!important;justify-content:center!important}
  .heytia-cam-switch .switch-label{display:none!important}
  .heytia-actions{display:flex!important;justify-content:flex-end!important;gap:7px!important}
  .heytia-camera-status{max-height:30px!important;white-space:normal!important;line-height:1.25!important;overflow:hidden!important}
}
