/* User-supplied dark morphing orb, scoped to the assistant only. */
  .szai-reference {
    position: relative;

    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    isolation: isolate;

    transform:
      translate(
        calc(var(--szai-mx) * 0.07),
        calc(var(--szai-my) * 0.07)
      );

    transition: transform 220ms ease-out;
  }


  /* =========================================================
     VERY SOFT COLORED AURA
     ========================================================= */

  .szai-reference::before {
    content: "";

    position: absolute;
    inset: -1%;

    border-radius:
      44% 56% 61% 39%
      / 58% 42% 58% 42%;

    background:
      radial-gradient(
        circle at 19% 32%,
        rgba(39, 206, 255, .15),
        transparent 26%
      ),

      radial-gradient(
        circle at 68% 18%,
        rgba(68, 93, 255, .16),
        transparent 29%
      ),

      radial-gradient(
        circle at 84% 56%,
        rgba(177, 62, 255, .16),
        transparent 27%
      ),

      radial-gradient(
        circle at 61% 87%,
        rgba(255, 65, 191, .13),
        transparent 27%
      ),

      radial-gradient(
        circle at 23% 76%,
        rgba(49, 255, 214, .11),
        transparent 28%
      );

    filter: blur(34px);

    opacity: .85;

    animation:
      szai-ref-auraShape 11s ease-in-out infinite,
      szai-ref-auraBreath 7s ease-in-out infinite alternate;

    z-index: -3;
  }


  /* =========================================================
     BLACK MORPHING BODY
     ========================================================= */

  .szai-reference__body {
    position: absolute;

    width: 94%;
    height: 94%;

    overflow: hidden;

    border-radius:
      46% 54% 61% 39%
      / 57% 40% 60% 43%;

    background:
      radial-gradient(
        circle at 27% 21%,
        rgba(88, 126, 255, .035),
        transparent 24%
      ),

      radial-gradient(
        circle at 77% 68%,
        rgba(176, 59, 255, .035),
        transparent 25%
      ),

      radial-gradient(
        circle at 33% 79%,
        rgba(31, 220, 255, .025),
        transparent 24%
      ),

      linear-gradient(
        145deg,
        #111218 0%,
        #08090c 46%,
        #030304 100%
      );

    box-shadow:
      inset 0 0 0 1px rgba(140, 150, 255, .055),
      inset 16px 12px 32px rgba(99, 109, 255, .025),
      inset -24px -22px 38px rgba(0,0,0,.74),
      0 20px 50px rgba(0,0,0,.20);

    animation:
      szai-ref-morph 11s cubic-bezier(.45,.05,.55,.95) infinite,
      szai-ref-floating 7s ease-in-out infinite;

    will-change:
      border-radius,
      transform;
  }


  /* =========================================================
     SUBTLE COLOR INSIDE BLACK BODY
     ========================================================= */

  .szai-reference__body::before {
    content: "";

    position: absolute;

    width: 88%;
    height: 88%;

    left: 6%;
    top: 6%;

    border-radius:
      63% 37% 54% 46%
      / 43% 61% 39% 57%;

    background:

      radial-gradient(
        circle at 16% 38%,
        rgba(37, 181, 255, .055),
        transparent 24%
      ),

      radial-gradient(
        circle at 43% 16%,
        rgba(77, 90, 255, .05),
        transparent 27%
      ),

      radial-gradient(
        circle at 81% 39%,
        rgba(169, 64, 255, .055),
        transparent 26%
      ),

      radial-gradient(
        circle at 69% 82%,
        rgba(255, 66, 192, .045),
        transparent 25%
      ),

      radial-gradient(
        circle at 23% 77%,
        rgba(50, 255, 211, .04),
        transparent 25%
      );

    filter: blur(25px);

    animation:
      szai-ref-innerMorph 9s ease-in-out infinite alternate,
      szai-ref-innerDrift 14s ease-in-out infinite alternate;

    pointer-events: none;
  }


  .szai-reference__body::after {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: inherit;

    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.018);

    pointer-events: none;
  }


  /* =========================================================
     LOGO
     ========================================================= */

  .szai-reference__holder {
    position: relative;

    width: 57%;
    height: 57%;

    display: grid;
    place-items: center;

    z-index: 5;

    transform:
      translate(
        calc(var(--szai-mx) * .13),
        calc(var(--szai-my) * .13)
      );

    transition: transform 220ms ease-out;

    animation: szai-ref-logoBreath 5.8s ease-in-out infinite;
  }

  .szai-reference__logo {
    width: 100%;
    height: 100%;

    overflow: visible;

    filter:
      drop-shadow(0 0 7px rgba(55, 208, 255, .18))
      drop-shadow(0 0 14px rgba(91, 88, 255, .17))
      drop-shadow(0 0 24px rgba(188, 57, 255, .10));

    animation: szai-ref-logoGlow 6s ease-in-out infinite alternate;
  }


  /* ШЕСТЕРЁНКА НЕ ВРАЩАЕТСЯ */

  .szai-reference__gear {
    transform-box: view-box;
    transform-origin: center;

    animation: szai-ref-gearBreath 7s ease-in-out infinite alternate;
  }

  .szai-reference__gear-path {
    
  }


  /* МОЛНИЯ */

  .szai-reference__bolt {
    

    transform-box: view-box;
    transform-origin: center;

    filter:
      drop-shadow(0 0 5px rgba(51, 213, 255, .44))
      drop-shadow(0 0 11px rgba(97, 86, 255, .38))
      drop-shadow(0 0 18px rgba(198, 71, 255, .24));

    animation:
      szai-ref-boltBreath 4.5s ease-in-out infinite alternate,
      szai-ref-boltFlicker 8s ease-in-out infinite;
  }


  /* =========================================================
     MORPH
     ========================================================= */

  @keyframes szai-ref-morph {

    0% {
      border-radius:
        46% 54% 61% 39%
        / 57% 40% 60% 43%;

      transform:
        scale(1)
        rotate(0deg);
    }

    17% {
      border-radius:
        58% 42% 47% 53%
        / 44% 61% 39% 56%;

      transform:
        scale(1.025,.985)
        rotate(1.4deg);
    }

    34% {
      border-radius:
        38% 62% 57% 43%
        / 63% 45% 55% 37%;

      transform:
        scale(.985,1.025)
        rotate(-2deg);
    }

    51% {
      border-radius:
        63% 37% 41% 59%
        / 47% 57% 43% 53%;

      transform:
        scale(1.03,.98)
        rotate(2.2deg);
    }

    68% {
      border-radius:
        41% 59% 66% 34%
        / 54% 38% 62% 46%;

      transform:
        scale(.99,1.03)
        rotate(-1.7deg);
    }

    84% {
      border-radius:
        55% 45% 39% 61%
        / 42% 64% 36% 58%;

      transform:
        scale(1.02,.99)
        rotate(1deg);
    }

    100% {
      border-radius:
        46% 54% 61% 39%
        / 57% 40% 60% 43%;

      transform:
        scale(1)
        rotate(0deg);
    }
  }


  @keyframes szai-ref-floating {
    0%,
    100% {
      translate: 0 0;
    }

    50% {
      translate: 0 -4px;
    }
  }


  @keyframes szai-ref-innerMorph {
    from {
      border-radius:
        63% 37% 54% 46%
        / 43% 61% 39% 57%;
    }

    to {
      border-radius:
        39% 61% 65% 35%
        / 59% 38% 62% 41%;
    }
  }


  @keyframes szai-ref-innerDrift {
    0% {
      transform:
        translate(-7%, -5%)
        rotate(-5deg)
        scale(.97);
    }

    50% {
      transform:
        translate(8%, 4%)
        rotate(7deg)
        scale(1.12);
    }

    100% {
      transform:
        translate(-2%, 9%)
        rotate(-3deg)
        scale(1.04);
    }
  }


  /* =========================================================
     NO ROTATION — ONLY VERY SOFT LIFE
     ========================================================= */

  @keyframes szai-ref-gearBreath {

    0% {
      transform: scale(.985);
      opacity: .82;
    }

    45% {
      transform: scale(1.01);
      opacity: 1;
    }

    100% {
      transform: scale(.995);
      opacity: .89;
    }
  }


  @keyframes szai-ref-boltBreath {

    from {
      transform: scale(.975);
    }

    to {
      transform: scale(1.028);
    }
  }


  @keyframes szai-ref-boltFlicker {

    0%,
    18%,
    32%,
    65%,
    82%,
    100% {
      opacity: .97;
    }

    21% {
      opacity: .82;
    }

    23% {
      opacity: .96;
    }

    69% {
      opacity: .86;
    }
  }


  @keyframes szai-ref-logoBreath {

    0%,
    100% {
      scale: 1;
    }

    50% {
      scale: 1.015;
    }
  }


  @keyframes szai-ref-logoGlow {

    0% {
      filter:
        drop-shadow(0 0 5px rgba(45,211,255,.15))
        drop-shadow(0 0 12px rgba(72,87,255,.15))
        drop-shadow(0 0 20px rgba(177,58,255,.08));
    }

    45% {
      filter:
        drop-shadow(0 0 8px rgba(58,219,255,.28))
        drop-shadow(0 0 16px rgba(95,87,255,.26))
        drop-shadow(0 0 26px rgba(202,65,255,.18));
    }

    100% {
      filter:
        drop-shadow(0 0 6px rgba(47,255,209,.20))
        drop-shadow(0 0 15px rgba(63,130,255,.22))
        drop-shadow(0 0 24px rgba(255,65,193,.14));
    }
  }


  @keyframes szai-ref-auraShape {

    0% {
      border-radius:
        44% 56% 61% 39%
        / 58% 42% 58% 42%;

      transform: rotate(0deg);
    }

    50% {
      border-radius:
        61% 39% 44% 56%
        / 39% 63% 37% 61%;

      transform: rotate(4deg);
    }

    100% {
      border-radius:
        44% 56% 61% 39%
        / 58% 42% 58% 42%;

      transform: rotate(0deg);
    }
  }


  @keyframes szai-ref-auraBreath {

    from {
      opacity: .6;
      scale: .96;
    }

    to {
      opacity: .92;
      scale: 1.05;
    }
  }



.szai-reference { --szai-mx:0px; --szai-my:0px; pointer-events:none; }
.szai-reference, .szai-reference * { box-sizing:border-box; }
.szai-reference__logo { display:block; max-width:none; }
.szai-reference__holder { margin:0; padding:0; }
.szai-reference__body {
  display:block;
  background:var(--sez-dark, #20252b);
  box-shadow:inset 0 0 0 1px rgb(255 255 255 / 5%), inset 12px 10px 28px rgb(255 255 255 / 2%), 0 12px 32px rgb(32 37 43 / 16%);
}
.szai-reference__body::before { display:block; }
.szai-reference__logo .szai-reference__gear-path { stroke:none; }
.szai-launcher, .szai-launcher.is-nudging { filter:none; }
.szai-blob { z-index:0; overflow:visible; background:none; box-shadow:none; animation:none; border:0; border-radius:0; }
.szai-blob::before, .szai-blob::after, .szai-welcome-orb::before, .szai-welcome-orb::after { content:none; }
.szai-orb:hover .szai-blob, .szai-orb:focus-visible .szai-blob { filter:none; transform:none; }
.szai-orb:focus-visible { outline:2px solid #785eff; outline-offset:5px; border-radius:35%; }
.szai-welcome-orb { display:block; width:190px; height:190px; overflow:visible; background:none; border:0; box-shadow:none; animation:none; }
.szai-mini { overflow:visible; }
.szai-mini .szai-reference { width:38px; height:38px; }
.szai-reference::before { filter:blur(12px); }
.szai-welcome-orb .szai-reference::before { filter:blur(22px); }
.szai-reference__body::before { filter:blur(10px); }
.szai-welcome-orb .szai-reference__body::before { filter:blur(20px); }
.szai-mini .szai-reference__logo { filter:drop-shadow(0 0 3px rgb(91 88 255 / 18%)); }
.szai-launcher, .szai-launcher.is-nudging {
  width:var(--szai-control-size, 68px);
  height:var(--szai-control-size, 68px);
  transition:width 1.25s cubic-bezier(.45,0,.2,1) .72s, opacity .3s ease;
}
.szai-launcher.is-nudging { width:calc(var(--szai-control-size, 68px) + 214px); transition-delay:0s; }
/* Theme's late-loaded quick-tools bundle also declares transition; keep width animation authoritative. */
#szai.szai-launcher { transition:width 1.25s cubic-bezier(.45,0,.2,1) .72s, opacity .3s ease, transform .25s ease; }
#szai.szai-launcher.is-nudging { transition-delay:0s; }
.szai-launcher .szai-reference__body { box-shadow:inset 0 0 0 1px rgb(255 255 255 / 5%), 0 5px 14px rgb(32 37 43 / 16%); }
.szai-reference__holder {
  position:absolute;
  left:21.5%;
  top:21.5%;
  width:57%;
  height:57%;
  transform:none;
  animation:szai-ref-morph 11s cubic-bezier(.45,.05,.55,.95) infinite, szai-ref-floating 7s ease-in-out infinite;
}
.szai-launcher .szai-reference__holder {
  left:calc((var(--szai-control-size, 68px) - 4px) * .215);
  top:calc(50% - (var(--szai-control-size, 68px) - 4px) * .285);
  width:calc((var(--szai-control-size, 68px) - 4px) * .57);
  height:calc((var(--szai-control-size, 68px) - 4px) * .57);
}
.szai-launcher .szai-reference__body,
.szai-launcher.is-nudging .szai-reference__body,
.szai-launcher .szai-reference__holder {
  --szai-r:var(--szai-control-size, 68px);
  animation:szai-launcher-shape 11s cubic-bezier(.45,.05,.55,.95) infinite, szai-ref-floating 7s ease-in-out infinite;
}
/* Radii follow control HEIGHT, never the expanded width: organic rectangle, not ellipse. */
@keyframes szai-launcher-shape {
  0%,100% { border-radius:calc(var(--szai-r)*.46) calc(var(--szai-r)*.38) calc(var(--szai-r)*.42) calc(var(--szai-r)*.31); transform:scale(1) rotate(0deg); }
  34% { border-radius:calc(var(--szai-r)*.36) calc(var(--szai-r)*.46) calc(var(--szai-r)*.32) calc(var(--szai-r)*.43); transform:scale(.985,1.025) rotate(-.6deg); }
  68% { border-radius:calc(var(--szai-r)*.43) calc(var(--szai-r)*.32) calc(var(--szai-r)*.46) calc(var(--szai-r)*.37); transform:scale(1.01,.99) rotate(.6deg); }
}
.szai-reference::before {
  inset:-15%;
  border-radius:50%;
  background:radial-gradient(circle at 24% 32%, rgb(50 208 255 / 28%), transparent 49%), radial-gradient(circle at 77% 64%, rgb(157 95 255 / 26%), transparent 51%), radial-gradient(circle at 42% 80%, rgb(246 101 206 / 18%), transparent 45%);
  filter:blur(12px);
  opacity:.7;
}
.szai-reference::after {
  content:"";
  position:absolute;
  z-index:-2;
  inset:-8%;
  border:2px solid rgb(132 155 255 / 17%);
  border-top-color:rgb(90 226 255 / 28%);
  border-bottom-color:rgb(219 131 247 / 24%);
  border-radius:50%;
  filter:blur(5px);
  pointer-events:none;
  animation:szai-ref-halo 8s ease-in-out infinite alternate;
}
@keyframes szai-ref-halo {
  from { scale:.96; opacity:.35; transform:translate(-2%,1%); }
  to { scale:1.1; opacity:.7; transform:translate(2%,-2%); }
}
.szai-orb__label {
  position:absolute;
  left:calc(var(--szai-control-size, 68px) + 4px);
  right:auto;
  top:50%;
  width:184px;
  max-width:184px;
  margin:0;
  padding:0;
  border-radius:0;
  background:none;
  box-shadow:none;
  pointer-events:none;
  white-space:normal;
  text-align:left;
  font-size:12px;
  line-height:1.4;
  opacity:0;
  visibility:hidden;
  transform:translate(3px,-50%);
  transform-origin:left center;
  transition:opacity .68s cubic-bezier(.4,0,.6,1), transform .72s cubic-bezier(.4,0,.2,1), visibility 0s linear .72s;
}
.szai-launcher.is-nudging .szai-blob { inset:2px; border-radius:0; animation:none; }
.szai-launcher.is-nudging .szai-orb__label {
  margin:0;
  opacity:1;
  visibility:visible;
  transform:translate(0,-50%);
  transition:opacity .9s cubic-bezier(.4,0,.2,1) .75s, transform 1s cubic-bezier(.4,0,.2,1) .7s, visibility 0s;
}
.szai-launcher .szai-reference::before { inset:auto; left:-8px; top:-8px; width:calc(var(--szai-control-size, 68px) + 16px); height:calc(var(--szai-control-size, 68px) + 16px); }
.szai-launcher .szai-reference::after { inset:auto; left:-5px; top:-5px; width:calc(var(--szai-control-size, 68px) + 10px); height:calc(var(--szai-control-size, 68px) + 10px); }
.szai-body--welcome { overflow-y:auto; overflow-x:hidden; background:#fff; }
.szai-body--welcome > * { flex-shrink:0; }
.szai-bot::before { display:none!important; content:none!important; }
.szai-reply-avatar {
  position:absolute;
  left:-40px;
  top:0;
  display:block;
  width:30px;
  height:30px;
  margin:0!important;
  pointer-events:none;
}
.szai-reply-avatar .szai-reference,
.szai-reply-avatar .szai-reference__body,
.szai-reply-avatar .szai-reference__holder { margin:0; }
.szai-reply-avatar .szai-reference::before { filter:blur(5px); opacity:.45; }
.szai-reply-avatar .szai-reference::after { filter:blur(3px); }
.szai-reply-avatar .szai-reference__logo { filter:drop-shadow(0 0 2px rgb(91 88 255 / 18%)); }
@media(max-width:600px) {
  .szai-reply-avatar { left:-34px; width:26px; height:26px; }
  .szai-launcher, .szai-launcher.is-nudging { --szai-control-size:58px; width:58px; height:58px; }
  .szai-welcome-orb { width:150px; height:150px; }
  .szai-mini .szai-reference { width:30px; height:30px; }
}
@media(max-height:650px) { .szai-welcome-orb { width:100px; height:100px; } }
@media(prefers-reduced-motion:reduce) {
  #szai.szai-launcher, #szai.szai-launcher.is-nudging { transition:none; }
  .szai-launcher, .szai-launcher.is-nudging, .szai-orb__label, .szai-launcher.is-nudging .szai-orb__label { transition:none; }
  .szai-reference, .szai-reference *, .szai-reference::before, .szai-reference::after, .szai-reference__body::before { animation:none!important; transition:none!important; transform:none!important; }
  .szai-reference animate, .szai-reference animateTransform { display:none; }
}
@media(min-width:601px) {
  body.sez-home:not(.sez-past-hero):not(.szai-open):not(.sez-menu-open):not(.sez-modal-open):not(.sez-footer-active) #szai {
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
}

/* Mobile chat uses the VISUAL viewport, including the on-screen keyboard. */
html.szai-mobile-lock { overflow:hidden!important; overscroll-behavior:none; }
html.szai-mobile-lock body {
  position:fixed!important;
  top:var(--szai-page-scroll, 0px)!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  overflow:hidden!important;
}
@media(max-width:600px), (pointer:coarse) and (max-width:1024px) {
  #szai-panel.szai-panel {
    position:fixed!important;
    inset:auto!important;
    top:var(--szai-visual-top, 0px)!important;
    left:var(--szai-visual-left, 0px)!important;
    right:auto!important;
    bottom:auto!important;
    width:var(--szai-visual-width, 100%)!important;
    max-width:100%!important;
    height:var(--szai-visual-height, 100dvh)!important;
    min-height:0!important;
    max-height:var(--szai-visual-height, 100dvh)!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
    transform:none!important;
    transition:opacity .18s ease!important;
  }
  #szai-panel :is(input,textarea,select) {
    font-size:16px!important;
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
    transform:none!important;
  }
  #szai-panel .szai-head {
    display:grid;
    grid-template-columns:30px minmax(0,1fr) auto 36px;
    min-height:54px;
    gap:7px;
    padding:7px 10px;
    padding-top:max(7px, env(safe-area-inset-top,0px));
    flex-shrink:0;
  }
  #szai-panel .szai-mini { width:30px; height:30px; min-width:0; }
  #szai-panel .szai-id { min-width:0; }
  #szai-panel .szai-id strong { font-size:12px; line-height:1.25; }
  #szai-panel .szai-manager { margin:0; padding:8px; max-width:100px; white-space:normal; font-size:9px; line-height:1.3; text-align:center; }
  #szai-panel .szai-x { width:36px; height:36px; }
  #szai-panel .szai-body {
    flex:1 1 0;
    min-height:0;
    min-width:0;
    width:100%;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    padding:12px;
  }
  #szai-panel .szai-body--welcome { justify-content:flex-start; gap:14px; }
  #szai-panel .szai-body--welcome .szai-welcome { margin-top:auto; }
  #szai-panel .szai-body--welcome .szai-start-marquee { margin-bottom:auto; }
  #szai-panel .szai-welcome-orb {
    width:clamp(64px, calc((var(--szai-visual-height,100dvh) - 260px) * .28), 150px);
    height:clamp(64px, calc((var(--szai-visual-height,100dvh) - 260px) * .28), 150px);
    margin-bottom:14px;
  }
  #szai-panel .szai-welcome h3 { font-size:22px; }
  #szai-panel .szai-welcome p { font-size:12px; }
  #szai-panel .szai-start-marquee { width:calc(100% + 24px); margin-inline:-12px; }
  #szai-panel .szai-foot {
    flex:0 0 auto;
    min-width:0;
    gap:7px;
    align-items:flex-end;
    padding:8px 10px max(8px, env(safe-area-inset-bottom,0px));
    background:#fff;
  }
  #szai-panel #szai-input {
    box-sizing:border-box!important;
    width:0!important;
    min-width:0!important;
    flex:1 1 0;
    min-height:44px;
    max-height:112px;
    line-height:22px!important;
    padding:10px 11px;
    overflow-x:hidden;
    scrollbar-width:none;
    resize:none;
  }
  #szai-panel #szai-input::-webkit-scrollbar { display:none; }
  #szai-panel :is(.szai-send,.szai-attach) { width:40px; height:44px; flex:0 0 40px; }
  #szai-panel .szai-msg { font-size:14px; line-height:1.5; max-width:calc(100% - 34px); }
  #szai-panel .szai-file-preview { flex-shrink:0; }
}

/* 5.5: stable mobile viewport and compact launcher.
 * The theme loads its quick-actions styles after the assistant, so the ID-level
 * rules below intentionally keep the mobile control from being reduced to 46px
 * or pushed on top of the product ticker. */
@media(max-width:767px), (pointer:coarse) and (max-width:1024px) {
  #szai.szai-launcher,
  #szai.szai-launcher.is-nudging {
    --szai-control-size:58px;
    right:max(12px, env(safe-area-inset-right, 0px))!important;
    bottom:max(76px, calc(62px + env(safe-area-inset-bottom, 0px)))!important;
    width:58px!important;
    height:58px!important;
    min-width:58px!important;
    min-height:58px!important;
    max-width:58px!important;
    max-height:58px!important;
    opacity:1;
    visibility:visible;
    transform:none;
  }

  body.szai-open #szai.szai-launcher {
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  #szai-panel.szai-panel {
    top:var(--szai-visual-top, 0px)!important;
    left:var(--szai-visual-left, 0px)!important;
    width:min(var(--szai-visual-width, 100vw), 100vw)!important;
    height:var(--szai-visual-height, 100dvh)!important;
    max-height:var(--szai-visual-height, 100dvh)!important;
    contain:layout paint;
  }

  #szai-panel .szai-head {
    grid-template-columns:30px minmax(0,1fr) minmax(74px,auto) 38px;
    min-height:56px;
    padding-right:max(9px, env(safe-area-inset-right, 0px));
    padding-left:max(9px, env(safe-area-inset-left, 0px));
  }

  #szai-panel .szai-id strong {
    display:block;
    overflow:hidden;
    font-size:12px;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  #szai-panel .szai-manager {
    min-height:38px;
    max-width:92px;
    padding:6px 7px;
    font-size:8.5px;
    line-height:1.2;
  }

  #szai-panel .szai-x {
    width:38px;
    height:38px;
  }

  #szai-panel .szai-body {
    scrollbar-gutter:stable;
    touch-action:pan-y;
  }

  #szai-panel .szai-body--welcome {
    justify-content:center;
    gap:12px;
    padding-block:16px;
  }

  #szai-panel .szai-body--welcome .szai-welcome,
  #szai-panel .szai-body--welcome .szai-start-marquee {
    margin-top:0;
    margin-bottom:0;
  }

  #szai-panel .szai-welcome-orb {
    width:clamp(92px, 28vw, 126px);
    height:clamp(92px, 28vw, 126px);
    margin-bottom:10px;
  }

  #szai-panel .szai-welcome h3 {
    font-size:21px;
    line-height:1.12;
  }

  #szai-panel .szai-welcome p {
    max-width:310px;
    font-size:11px;
    line-height:1.45;
  }

  #szai-panel .szai-start-marquee {
    max-height:76px;
    padding-bottom:2px;
  }

  #szai-panel .szai-start-message {
    min-height:31px;
    padding:7px 10px;
    font-size:9px;
  }

  #szai-panel .szai-foot {
    padding-right:max(9px, env(safe-area-inset-right, 0px));
    padding-bottom:max(9px, env(safe-area-inset-bottom, 0px));
    padding-left:max(9px, env(safe-area-inset-left, 0px));
  }

  #szai-panel #szai-input {
    height:44px;
    min-height:44px;
    max-height:min(112px, 22dvh);
    padding-block:10px;
    font-size:16px!important;
  }

  #szai-panel :is(.szai-send,.szai-attach) {
    width:42px;
    height:44px;
    flex-basis:42px;
    touch-action:manipulation;
  }

  #szai-panel .szai-card {
    flex-basis:min(78vw, 260px);
  }

  #szai-panel .szai-inline-lead {
    margin-bottom:4px;
  }
}

@media(max-width:360px) {
  #szai-panel .szai-head {
    grid-template-columns:28px minmax(0,1fr) 72px 36px;
    gap:5px;
    padding-inline:7px;
  }
  #szai-panel .szai-mini,
  #szai-panel .szai-mini .szai-reference { width:28px; height:28px; }
  #szai-panel .szai-id strong { font-size:11px; }
  #szai-panel .szai-manager { max-width:72px; padding-inline:5px; font-size:8px; }
  #szai-panel .szai-body { padding-inline:9px; }
  #szai-panel .szai-body--welcome { gap:10px; }
  #szai-panel .szai-welcome-orb { width:94px; height:94px; }
  #szai-panel .szai-welcome h3 { font-size:19px; }
  #szai-panel .szai-welcome p { font-size:10px; }
  #szai-panel .szai-foot { gap:5px; padding-inline:7px; }
  #szai-panel :is(.szai-send,.szai-attach) { width:38px; flex-basis:38px; }
}
