/* SomaTech AI chat — full modern chatbot UI */
.st-chat-root {
  --st-orange: #ff4d00;
  --st-orange-2: #ff7a33;
  --st-orange-soft: rgba(255, 77, 0, 0.12);
  --st-bg: #0c0c0e;
  --st-bg-2: #141418;
  --st-bg-3: #1c1c22;
  --st-border: rgba(255, 255, 255, 0.08);
  --st-text: #f4f4f5;
  --st-muted: #a1a1aa;
  --st-radius: 18px;
  --st-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--st-text);
}
.st-chat-root *,
.st-chat-root *::before,
.st-chat-root *::after { box-sizing: border-box; }

/* ——— FAB ——— */
.st-chat-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 5.15rem;
  height: 5.15rem;
  border-radius: 999px;
  border: 3px solid #fff;
  background: linear-gradient(145deg, var(--st-orange-2) 0%, var(--st-orange) 50%, #d94000 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .12rem;
  box-shadow: 0 16px 40px rgba(255, 77, 0, 0.5);
  z-index: 2147483001;
  animation: st-fab-pulse 2.6s ease-out infinite;
  transition: transform .22s ease, box-shadow .22s ease;
}
.st-chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 20px 50px rgba(255, 77, 0, 0.65);
  animation: none;
}
.st-chat-fab:active { transform: scale(0.97); }
.st-chat-fab svg { width: 1.9rem; height: 1.9rem; fill: currentColor; }
.st-fab-label {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
}
.st-fab-badge {
  position: absolute;
  top: -.15rem;
  right: -.15rem;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 .32rem;
  border-radius: 999px;
  background: #fff;
  color: var(--st-orange);
  font-size: .68rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--st-orange);
}
@keyframes st-fab-pulse {
  0% { box-shadow: 0 16px 40px rgba(255,77,0,.5), 0 0 0 0 rgba(255,77,0,.4); }
  70% { box-shadow: 0 16px 40px rgba(255,77,0,.5), 0 0 0 18px rgba(255,77,0,0); }
  100% { box-shadow: 0 16px 40px rgba(255,77,0,.5), 0 0 0 0 rgba(255,77,0,0); }
}

/* ——— Panel shell ——— */
.st-chat-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(38rem, 52vw);
  height: min(42rem, 58vh);
  min-width: min(22rem, 94vw);
  min-height: min(22rem, 52vh);
  background: var(--st-bg);
  color: var(--st-text);
  border: 1px solid var(--st-border);
  border-radius: 22px;
  box-shadow: var(--st-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483002;
}
.st-chat-panel.open {
  display: flex;
  animation: st-panel-in .28s cubic-bezier(.2, .85, .25, 1) both;
}
@keyframes st-panel-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.st-chat-panel.fullscreen {
  right: 0; left: 0; top: 0; bottom: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  border-radius: 0; border: none;
}

/* idle progress */
.st-idle-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}
.st-idle-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--st-orange), var(--st-orange-2));
  transition: width .45s linear;
}

/* ——— Header ——— */
.st-chat-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .95rem 1.1rem;
  background: linear-gradient(180deg, #1a1a20 0%, var(--st-bg-2) 100%);
  border-bottom: 1px solid var(--st-border);
  flex-shrink: 0;
}
.st-chat-header .brand {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--st-orange-2), var(--st-orange));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .78rem;
  letter-spacing: .06em;
  box-shadow: 0 6px 18px rgba(255, 77, 0, 0.35);
  flex-shrink: 0;
}
.st-chat-header .meta { flex: 1; min-width: 0; }
.st-chat-header .meta strong {
  display: block;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.st-chat-header .meta span {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  color: var(--st-muted);
  margin-top: .12rem;
}
.st-status-dot {
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  display: inline-block;
}
.st-icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 11px;
  border: 1px solid var(--st-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--st-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, transform .15s;
  flex-shrink: 0;
}
.st-icon-btn:hover {
  background: var(--st-orange-soft);
  border-color: rgba(255, 77, 0, 0.55);
  color: var(--st-orange-2);
}
.st-icon-btn:active { transform: scale(0.94); }
.st-icon-btn svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }

/* ——— Mode tabs ——— */
.st-chat-modes {
  display: flex;
  gap: .45rem;
  padding: .65rem .95rem;
  background: var(--st-bg-2);
  border-bottom: 1px solid var(--st-border);
  flex-shrink: 0;
}
.st-chat-modes button {
  flex: 1;
  padding: .52rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--st-border);
  background: transparent;
  color: var(--st-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .18s ease;
}
.st-chat-modes button:hover {
  color: var(--st-text);
  border-color: rgba(255, 255, 255, 0.18);
}
.st-chat-modes button.active {
  background: var(--st-orange-soft);
  color: var(--st-orange-2);
  border-color: rgba(255, 77, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.1);
}

/* ——— Messages ——— */
.st-chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.15rem 1.1rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background:
    radial-gradient(900px 320px at 0% 0%, rgba(255, 77, 0, 0.07), transparent 55%),
    radial-gradient(700px 280px at 100% 100%, rgba(255, 122, 51, 0.05), transparent 50%),
    var(--st-bg);
  scroll-behavior: smooth;
}
.st-chat-messages::-webkit-scrollbar { width: 6px; }
.st-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

/* row with avatar + bubble */
.st-row {
  display: flex;
  align-items: flex-end;
  gap: .65rem;
  max-width: min(92%, 42rem);
  animation: st-msg-in .28s ease;
}
.st-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.st-row.bot { align-self: flex-start; }
.st-row.sys {
  align-self: center;
  max-width: 92%;
}
@keyframes st-msg-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.st-avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .04em;
  flex-shrink: 0;
  user-select: none;
}
.st-row.bot .st-avatar {
  background: linear-gradient(145deg, var(--st-orange-2), var(--st-orange));
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 77, 0, 0.4);
}
.st-row.user .st-avatar {
  background: linear-gradient(145deg, #3f3f46, #27272a);
  color: #e4e4e7;
  border: 1px solid var(--st-border);
}

.st-msg {
  padding: .95rem 1.15rem;
  border-radius: 20px;
  font-size: .94rem;
  line-height: 1.65;
  word-break: break-word;
  white-space: normal;
  letter-spacing: .005em;
}
.st-msg.pre {
  white-space: pre-wrap;
}
.st-row.bot .st-msg {
  background: linear-gradient(160deg, #22222a 0%, var(--st-bg-3) 100%);
  color: var(--st-text);
  border: 1px solid var(--st-border);
  border-bottom-left-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.st-row.user .st-msg {
  background: linear-gradient(145deg, var(--st-orange-2), var(--st-orange));
  color: #fff;
  border-bottom-right-radius: 8px;
  box-shadow: 0 8px 22px rgba(255, 77, 0, 0.32);
}

/* Rich content inside bot/user bubbles */
.st-msg p {
  margin: 0 0 .65rem;
}
.st-msg p:last-child { margin-bottom: 0; }
.st-msg strong, .st-msg b {
  font-weight: 700;
  color: inherit;
}
.st-row.bot .st-msg strong {
  color: var(--st-orange-2);
  text-shadow: 0 0 24px rgba(255, 77, 0, 0.15);
}
.st-row.user .st-msg strong { color: #fff; }
.st-msg em { font-style: italic; opacity: .92; }
.st-msg h1, .st-msg h2, .st-msg h3, .st-msg h4 {
  margin: .75rem 0 .45rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.35;
}
.st-row.bot .st-msg h1,
.st-row.bot .st-msg h2,
.st-row.bot .st-msg h3,
.st-row.bot .st-msg h4 { color: var(--st-orange-2); }
.st-msg ul, .st-msg ol {
  margin: .45rem 0 .7rem;
  padding-left: 1.15rem;
}
.st-msg li {
  margin: .28rem 0;
  padding-left: .15rem;
  line-height: 1.55;
}
.st-msg li::marker {
  color: var(--st-orange);
  font-weight: 700;
}
.st-msg ul {
  list-style: none;
  padding-left: 1rem;
}
.st-msg ul > li {
  position: relative;
}
.st-msg ul > li::before {
  content: "";
  position: absolute;
  left: -0.85rem;
  top: .55em;
  width: .38rem;
  height: .38rem;
  border-radius: 99px;
  background: linear-gradient(145deg, var(--st-orange-2), var(--st-orange));
}
.st-msg ol {
  list-style: none;
  counter-reset: st-n;
  padding-left: 1.35rem;
}
.st-msg ol > li {
  position: relative;
  counter-increment: st-n;
}
.st-msg ol > li::before {
  content: counter(st-n);
  position: absolute;
  left: -1.35rem;
  top: .1em;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 99px;
  background: rgba(255, 77, 0, 0.18);
  color: var(--st-orange-2);
  font-size: .68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-row.user .st-msg ul > li::before { background: rgba(255, 255, 255, 0.55); }
.st-row.user .st-msg ol > li::before {
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
}
.st-msg code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82em;
  background: rgba(0, 0, 0, 0.3);
  padding: .14rem .4rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.st-row.user .st-msg code { background: rgba(0, 0, 0, 0.22); }
.st-msg pre {
  margin: .55rem 0;
  padding: .75rem .9rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  border: 1px solid var(--st-border);
}
.st-msg pre code {
  background: none;
  border: none;
  padding: 0;
}
.st-msg a {
  color: var(--st-orange-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.st-row.user .st-msg a { color: #fff; }
.st-msg blockquote {
  margin: .55rem 0;
  padding: .35rem 0 .35rem .85rem;
  border-left: 3px solid var(--st-orange);
  color: var(--st-muted);
  font-style: italic;
}
.st-msg hr {
  border: none;
  border-top: 1px solid var(--st-border);
  margin: .75rem 0;
}
.st-msg table {
  width: 100%;
  border-collapse: collapse;
  margin: .55rem 0;
  font-size: .84rem;
}
.st-msg th, .st-msg td {
  border: 1px solid var(--st-border);
  padding: .4rem .55rem;
  text-align: left;
}
.st-msg th {
  background: rgba(255, 77, 0, 0.12);
  color: var(--st-orange-2);
  font-weight: 700;
}

.st-meta {
  display: block;
  margin-top: .35rem;
  font-size: .68rem;
  opacity: .7;
  font-weight: 500;
}

/* attachments */
.st-atts {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .55rem;
}
.st-att-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.st-row.user .st-att-chip {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.95);
}
.st-row.bot .st-att-chip {
  background: var(--st-orange-soft);
  color: var(--st-orange-2);
}
.st-att-chip .ico {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  display: inline-flex;
}

/* audio */
.st-msg audio {
  width: min(100%, 17rem);
  margin-top: .65rem;
  display: block;
  height: 2.45rem;
  border-radius: 999px;
  filter: none;
}

/* system / date dividers */
.st-sys {
  align-self: center;
  text-align: center;
  font-size: .72rem;
  color: var(--st-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--st-border);
  border-radius: 999px;
  padding: .35rem .85rem;
  max-width: 90%;
}

/* typing */
.st-typing-row { align-self: flex-start; }
.st-typing-card {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem 1rem .7rem .65rem;
  background: var(--st-bg-3);
  border: 1px solid var(--st-border);
  border-radius: 18px;
  border-bottom-left-radius: 6px;
}
.st-typing-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--st-orange-2), var(--st-orange));
  color: #fff;
  font-size: .62rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-dots {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  height: 1.15rem;
}
.st-dots i {
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: var(--st-orange);
  opacity: .4;
  display: inline-block;
  animation: st-bounce 1.15s ease-in-out infinite;
}
.st-dots i:nth-child(2) { animation-delay: .15s; }
.st-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes st-bounce {
  0%, 70%, 100% { transform: translateY(0); opacity: .4; }
  35% { transform: translateY(-6px); opacity: 1; }
}

/* entrance */
.st-enter {
  animation: st-msg-in .3s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes st-msg-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.st-row.user.st-enter { animation-name: st-msg-in-right; }
@keyframes st-msg-in-right {
  from { opacity: 0; transform: translate(14px, 10px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* ——— Composer ——— */
.st-chat-composer {
  border-top: 1px solid var(--st-border);
  background: var(--st-bg-2);
  padding: .85rem .95rem .95rem;
  flex-shrink: 0;
}
.st-previews {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .65rem;
}
.st-previews:empty { display: none; }
.st-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .7rem;
  border-radius: 999px;
  background: var(--st-orange-soft);
  color: var(--st-orange-2);
  font-size: .74rem;
  font-weight: 600;
  border: 1px solid rgba(255, 77, 0, 0.25);
  max-width: 13rem;
}
.st-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.st-chip button {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  cursor: pointer;
  font-size: .85rem;
  line-height: 1;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.st-chip button:hover { background: rgba(255, 77, 0, 0.35); color: #fff; }

.st-input-row {
  display: flex;
  align-items: flex-end;
  gap: .55rem;
  background: var(--st-bg-3);
  border: 1px solid var(--st-border);
  border-radius: 18px;
  padding: .45rem .45rem .45rem .85rem;
  transition: border-color .18s, box-shadow .18s;
}
.st-input-row:focus-within {
  border-color: rgba(255, 77, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.12);
}
.st-input-row textarea {
  flex: 1;
  resize: none;
  min-height: 2.55rem;
  max-height: 8.5rem;
  padding: .55rem 0;
  border: none;
  background: transparent;
  color: var(--st-text);
  font: inherit;
  font-size: .95rem;
  line-height: 1.45;
  outline: none;
}
.st-input-row textarea::placeholder { color: var(--st-muted); }

.st-send {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 13px;
  border: none;
  background: linear-gradient(145deg, var(--st-orange-2), var(--st-orange));
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(255, 77, 0, 0.35);
  transition: transform .15s, opacity .15s, box-shadow .15s;
  flex-shrink: 0;
}
.st-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 77, 0, 0.45);
}
.st-send:active:not(:disabled) { transform: scale(0.95); }
.st-send:disabled { opacity: .55; cursor: not-allowed; }
.st-send svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.st-send.st-sending svg { display: none; }
.st-send.st-sending::after {
  content: "";
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: st-spin .7s linear infinite;
  display: block;
}
@keyframes st-spin { to { transform: rotate(360deg); } }

.st-toolbar {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .65rem;
}
.st-toolbar .hint {
  margin-left: auto;
  font-size: .68rem;
  color: var(--st-muted);
  font-weight: 500;
}
.st-rec {
  color: var(--st-orange-2) !important;
  border-color: rgba(255, 77, 0, 0.75) !important;
  background: var(--st-orange-soft) !important;
  animation: st-rec-pulse 1.15s ease infinite;
}
@keyframes st-rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0.35); }
  50% { box-shadow: 0 0 0 9px rgba(255, 77, 0, 0); }
}

/* ——— Voice bar (recording) + review ——— */
.st-voice-bar,
.st-voice-review {
  background: var(--st-bg-3);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: .85rem 1rem;
  margin-bottom: .65rem;
}
.st-voice-bar[hidden],
.st-voice-review[hidden] { display: none !important; }

.st-voice-bar-main {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.st-rec-dot {
  width: .85rem;
  height: .85rem;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
  flex-shrink: 0;
  animation: st-rec-pulse 1.1s ease infinite;
}
.st-voice-bar-text {
  flex: 1;
  min-width: 8rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.st-voice-bar-text strong {
  font-size: .82rem;
  font-weight: 700;
}
.st-voice-bar-text span {
  font-size: .78rem;
  color: var(--st-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.st-rec-done {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.st-rec-done svg,
.st-voice-actions .st-btn svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}
.st-icon-danger {
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
.st-icon-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fff !important;
}

.st-wave {
  display: flex;
  align-items: flex-end;
  gap: .22rem;
  height: 1.5rem;
  margin-top: .65rem;
}
.st-wave i {
  flex: 1;
  min-width: .22rem;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--st-orange-2), var(--st-orange));
  animation: st-wave 0.9s ease-in-out infinite;
  height: 35%;
}
.st-wave i:nth-child(2) { animation-delay: .1s; height: 70%; }
.st-wave i:nth-child(3) { animation-delay: .2s; height: 45%; }
.st-wave i:nth-child(4) { animation-delay: .3s; height: 90%; }
.st-wave i:nth-child(5) { animation-delay: .15s; height: 55%; }
.st-wave i:nth-child(6) { animation-delay: .25s; height: 80%; }
.st-wave i:nth-child(7) { animation-delay: .05s; height: 40%; }
.st-wave i:nth-child(8) { animation-delay: .35s; height: 65%; }
@keyframes st-wave {
  0%, 100% { transform: scaleY(0.55); opacity: .65; }
  50% { transform: scaleY(1.15); opacity: 1; }
}

.st-voice-review-head {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  margin-bottom: .65rem;
}
.st-voice-review-head strong { font-size: .88rem; }
.st-voice-hint {
  font-size: .72rem;
  color: var(--st-muted);
  line-height: 1.4;
}

/* Custom audio player (review + bot voice) */
.st-player {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--st-border);
  border-radius: 14px;
  padding: .7rem .85rem;
  margin-bottom: .75rem;
}
.st-player audio { display: none; }
.st-hidden { display: none !important; }
.st-player-btn {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(145deg, var(--st-orange-2), var(--st-orange));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 77, 0, 0.35);
  transition: transform .15s, filter .15s;
}
.st-player-btn:hover { filter: brightness(1.08); }
.st-player-btn:active { transform: scale(0.94); }
.st-player-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: #fff;
}
.st-player-btn-sm {
  width: 2.1rem;
  height: 2.1rem;
}
.st-player-btn-sm svg {
  width: .95rem;
  height: .95rem;
}
.st-player-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.st-player-track {
  height: .35rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  overflow: hidden;
}
.st-player-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--st-orange-2), var(--st-orange));
  transition: width .12s linear;
}
.st-player-times {
  display: flex;
  justify-content: space-between;
  font-size: .68rem;
  color: var(--st-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.st-playing .st-player-track {
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.12);
}
.st-bot-audio {
  margin-top: .55rem;
  padding-top: .55rem;
  border-top: 1px dashed var(--st-border);
}
.st-bot-audio .st-player {
  margin-bottom: 0;
  padding: .55rem .7rem;
}

.st-voice-actions {
  display: flex;
  gap: .55rem;
  justify-content: flex-end;
}
.st-voice-actions .st-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.st-btn {
  border-radius: 999px;
  padding: .55rem 1.05rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.st-btn:active { transform: scale(0.97); }
.st-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.st-btn-primary {
  background: linear-gradient(145deg, var(--st-orange-2), var(--st-orange));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(255, 77, 0, 0.3);
}
.st-btn-primary:hover { filter: brightness(1.06); }
.st-btn-ghost {
  background: transparent;
  color: var(--st-muted);
  border-color: var(--st-border);
}
.st-btn-ghost:hover {
  color: var(--st-text);
  border-color: rgba(255, 255, 255, 0.22);
}

/* mobile voice UI */
@media (max-width: 720px) {
  .st-voice-bar-main { gap: .5rem; }
  .st-voice-actions { flex-direction: column-reverse; }
  .st-voice-actions .st-btn { width: 100%; text-align: center; }
}

/* mobile: always full-screen overlay on top of the site (any phone size) */
@media (max-width: 720px), (max-height: 520px) {
  .st-chat-fab {
    right: 5.5rem;
    bottom: calc(1.35rem + env(safe-area-inset-bottom, 0px));
    width: 4.45rem;
    height: 4.45rem;
  }
  .st-chat-fab svg { width: 1.55rem; height: 1.55rem; }
  .st-fab-label { font-size: .55rem; }

  /* Force edge-to-edge overlay above the whole site */
  .st-chat-panel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    z-index: 2147483002 !important;
  }
  .st-chat-panel.open {
    animation: st-panel-full-in .22s ease both;
  }
  @keyframes st-panel-full-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
  .st-chat-panel.fullscreen { border-radius: 0 !important; }

  .st-chat-header {
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
  }
  .st-chat-composer {
    padding-bottom: calc(0.95rem + env(safe-area-inset-bottom, 0px));
  }
  .st-row { max-width: 96%; }
  .st-avatar { width: 1.75rem; height: 1.75rem; }
  .st-chat-modes button {
    font-size: .68rem;
    padding: .48rem .55rem;
  }
}

/* very small phones / landscape */
@media (max-width: 380px) {
  .st-chat-fab {
    width: 4.15rem;
    height: 4.15rem;
    right: 5.15rem;
    bottom: calc(1.15rem + env(safe-area-inset-bottom, 0px));
  }
  .st-chat-header .meta strong { font-size: .9rem; }
  .st-msg { font-size: .88rem; }
}

/* tablets portrait — still prefer full overlay when height is limited */
@media (min-width: 721px) and (max-width: 1024px) and (max-height: 800px) {
  .st-chat-panel.open {
    width: min(100vw, 40rem);
    height: min(100dvh, 48rem);
  }
}


/* ——— Interaction polish ——— */
.st-input-row textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.15);
}
.st-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}
.st-chat-messages {
  scroll-behavior: smooth;
}
.st-chat-messages::-webkit-scrollbar { width: 8px; }
.st-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}
.st-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 77, 0, 0.35);
}
.st-msg.st-enter { animation: st-msg-in .28s cubic-bezier(.2, .8, .2, 1) both; }
.st-sys.st-enter { animation: st-msg-in .22s ease both; }
.st-typing-card {
  animation: st-msg-in .2s ease both;
}
.st-btn:active, .st-icon-btn:active, .st-send:active, .st-player-btn:active {
  transform: scale(0.96);
}
