.sc-player, .sc-workspace {
  --sc-ink: #102924;
  --sc-secondary: #53675f;
  --sc-rule: #d9e1d6;
  --sc-lime: #d2f578;
  --sc-paper: #f2f5ee;
  min-width: 0;
}
.sc-player { width: 100%; max-width: 1120px; margin-inline: auto; display: grid; gap: 22px; }
.sc-context { display: none; }
.player[data-page="chat"]:has(#android-download:not([hidden])) #main-content:has(.sc-player) {
  display:flex; flex-direction:column;
}
.player:has(#android-download:not([hidden])) .sc-player {
  flex:1; min-height:0; grid-template-rows:minmax(0,1fr);
}
.player:has(#android-download:not([hidden])) .sc-player .sc-conversation {
  height:100%; min-height:0;
}
.sc-guest .auth-art { display:flex; flex-flow:column; justify-content:flex-end; align-items:flex-start; gap:16px; height:auto; padding:clamp(20px,3.5vw,36px); color:#fff; background:#17382e repeating-radial-gradient(ellipse at 120% -12%,transparent 0 18px,#8ab38740 19px,transparent 20px 32px); }
.sc-guest .auth-art .sc-avatar { width:62px; height:62px; border-radius:19px; background:#d2f578; color:#193a2b; }
.sc-guest .auth-art strong { font-size:clamp(1.6rem,3vw,2.4rem); letter-spacing:-.035em; }
.sc-guest .auth-symbol { display:none; }
.sc-player .sc-conversation, .sc-workspace .sc-conversation {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 195px;
  height: clamp(195px, calc(100vh - 184px), 760px);
  height: clamp(195px, calc(100dvh - 184px), 760px);
  margin: 0;
  padding: 0;
  border: 1px solid #ced9ce;
  border-radius: 22px;
  overflow: hidden;
  color: var(--sc-ink);
  background: white;
  box-shadow: 0 12px 30px -22px #123d2459;
}
.sc-conversation .sc-head {
  position: relative; overflow: hidden; isolation: isolate;
  background: #16392e;
  color: #fff;
  border: 0;
  padding: 20px clamp(16px, 3vw, 30px);
  display: flex; align-items: center; justify-content: flex-start; gap: 13px; flex: none;
}
.sc-head::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0 0 0 55%;
  background: repeating-radial-gradient(ellipse at 86% 125%,transparent 0 13px,#a6cc8738 14px,transparent 15px 22px);
  opacity: .58;
}
.sc-heading { min-width: 0; }
.sc-heading small { display: block; margin-bottom: 3px; font-size: .78rem; line-height: 1.35; letter-spacing: .08em; color: #c5d8ca; }
.sc-conversation .sc-heading h2 { color: #fff; font-size: clamp(1.2rem,2.5vw,1.5rem); line-height: 1.2; font-weight: 730; letter-spacing: -.025em; margin: 0; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.sc-avatar { width: 36px; height: 36px; flex: 0 0 auto; display: inline-grid; place-items: center; line-height: 1; font-size: 1rem; font-weight: 750; border-radius: 12px; }
.sc-avatar-user { color: #27493b; background: #e2eada; }
.sc-avatar-staff { color: #d4f883; background: #173c31; }
.sc-head > .sc-avatar { width: 48px; height: 48px; border-radius: 14px; font-size: 1.25rem; }
.sc-head > .sc-avatar-staff { color: #17382d; background: var(--sc-lime); }
.sc-head .sc-private, .sc-head #customer-balance { margin-left: auto; flex: 0 0 auto; border-radius: 99px; background: #264b3e; color: #e7f5df; font-size: .78rem; padding: 5px 10px; border: 1px solid #597063; line-height: 1.45; font-variant-numeric: tabular-nums; }
.sc-headset { position: relative; width: 56%; height: 45%; border: 2px solid currentColor; border-bottom: 0; border-radius: 20px 20px 3px 3px; }
.sc-headset::before, .sc-headset::after { content:""; position:absolute; width: 27%; height: 57%; border-radius: 3px; background: currentColor; bottom: -1px; }
.sc-headset::before { left: -2px; } .sc-headset::after { right: -2px; }
.sc-timeline { flex: 1 1 0; min-height: 0; position: relative; }
.sc-conversation .chat-log {
  background: var(--sc-paper);
  width: 100%; height: 100%; min-height: 0; overflow: auto; overflow-anchor: none;
  overscroll-behavior: contain; padding: 18px clamp(12px, 3.5vw, 30px);
  scrollbar-width: thin; scrollbar-color: #b3c5b4 transparent;
}
.sc-conversation .chat-log:focus-visible { outline-offset: -3px; }
.sc-conversation .messages { display:flex; flex-flow: column; align-items: stretch; gap: 15px; min-width: 0; }
.sc-day { display:flex; align-items:center; justify-content:center; gap:12px; color: #596c61; font-size: .76rem; line-height: 1.4; font-weight: 600; margin-block: 3px 1px; }
.sc-day::before, .sc-day::after { content:""; width: min(55px,12%); border-top: 1px solid #cdd8cb; }
.sc-conversation .message { width: 100%; max-width: none; display:flex; align-items:flex-start; gap: 9px; text-align: left; }
.sc-conversation .message.mine { flex-direction: row-reverse; text-align: left; }
.sc-conversation .message .sc-avatar { width: 30px; height: 30px; margin-top: 18px; border-radius: 10px; font-size: .85rem; }
.sc-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(78%, 40rem); }
.mine .sc-copy { align-items: flex-end; }
.sc-by { color: #55685e; display:flex; align-items: baseline; gap: 8px; max-width: 100%; min-width: 0; font-size: .78rem; line-height: 1.35; }
.sc-by span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-conversation .sc-by time { flex: none; display: inline; margin: 0; color: #607368; font-size: .75rem; font-variant-numeric: tabular-nums; }
.sc-conversation .message .bubble {
  max-width: 100%; margin: 3px 0 0; border: 1px solid #d8e1d6; border-radius: 3px 16px 16px 16px;
  color: var(--sc-ink); background: #fff; padding: 10px 14px;
  font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; box-shadow: 0 2px 4px #143a2310;
}
.sc-conversation .message.mine .bubble { border-radius:16px 3px 16px 16px; background:#244e40; border-color:#244e40; color:#fff; }
.sc-conversation .history-action { margin: 0 0 15px; }
.sc-conversation .history-action .btn, .sc-topics button { background:#fff; border:1px solid #c9d6c7; color:#204533; border-radius: 30px; min-height: 40px; line-height: 1.3; padding:7px 15px; font-size:.875rem; font-weight:650; }
.sc-topics button:hover, .sc-conversation .history-action .btn:hover { border-color:#4b6852; background:#e9efdF; }
.sc-new { position:absolute; right: 12px; bottom: 10px; padding: 7px 14px; min-height: 40px; border-radius: 30px; background:#d2f578; border: 1px solid #677d47; color:#183626; font-weight: 650; font-size: .875rem; box-shadow: 0 3px 10px #10292425; }
.sc-empty { width:100%; height: 100%; min-height: min-content; padding:15px 3px; display:flex; align-items:center; justify-content:center; flex-direction:column; text-align:center; }
.sc-emblem { position:relative; width:74px; height:62px; margin:0 0 14px; }
.sc-emblem i, .sc-emblem b { position:absolute; display:block; box-sizing:border-box; }
.sc-emblem i { width:47px; height:33px; background:#c6e990; border:1px solid #849e65; border-radius:13px 13px 3px 13px; right:2px; top:3px; transform:rotate(9deg); }
.sc-emblem b { width:49px; height:37px; left:3px; bottom:9px; border-radius:14px 14px 14px 3px; background:#20493b; transform:rotate(-7deg); box-shadow:0 0 0 3px var(--sc-paper); }
.sc-emblem b::after { content:''; position:absolute; top:14px; left:12px; width:5px; height:5px; border-radius:50%; background:#d2f578; box-shadow:9px 0 #d2f578,18px 0 #d2f578; }
.sc-empty h3 { margin:0; color:var(--sc-ink); font-size:clamp(1.13rem,3vw,1.4rem); font-weight:730; }
.sc-empty p { margin:5px 0 0; color:var(--sc-secondary); font-size:.9rem; line-height:1.55; }
.sc-topics { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin:16px 0 0; }
.sc-conversation .chat-foot { background:#fff; padding:12px clamp(10px,2.6vw,24px); border-top: 1px solid var(--sc-rule); flex: none; }
.sc-conversation .chat-compose { background: #f5f7f3; border:1px solid #c8d5ca; border-radius:14px; padding:5px; gap:6px; display:flex; align-items:flex-end; }
.sc-conversation .chat-compose:focus-within { border-color:#517859; box-shadow:0 0 0 2px #a6c99555; }
.sc-conversation .chat-compose textarea { flex:1; width:0; min-width:0; display:block; border:0; box-shadow:none; outline:none; background:transparent; padding:10px 7px; margin:0; color: var(--sc-ink); line-height:22px; font-size:1rem; min-height:42px; max-height:108px; resize:none; }
.sc-conversation .chat-compose textarea::placeholder { color:#64766a; }
.sc-conversation .chat-compose .sc-send { min-width:66px; min-height:42px; border-radius:9px; padding:9px 14px; background:var(--sc-lime); color:#153325; border:1px solid #b5d483; font-size:.91rem; font-weight:720; }
.sc-conversation .chat-compose .sc-send:hover { background:#c6eb6f; }
.sc-send .sc-sending,.sc-send:disabled span:first-child { display:none; }
.sc-send:disabled .sc-sending { display:inline; }
.sc-conversation .chat-foot .status { color:#884026; line-height:1.45; margin:6px 3px 0; }
.sc-workspace.workspace { display:grid; grid-template-columns: minmax(218px,.65fr) minmax(0,1.7fr); align-items:start; gap:18px; }
.sc-workspace .users-panel, .sc-workspace .adjust-panel { background:#fff; border:1px solid #cfdacf; color:var(--sc-ink); border-radius:18px; padding:16px; }
.sc-workspace .users-panel { min-width:0; }
.sc-directory summary { cursor:pointer; font-weight:700; line-height:1.4; padding:3px 2px; }
.sc-directory summary::marker { color:#70836f; }
#sc-client-count { display:inline-block; margin-left:4px; padding:2px 8px; font:600 .78rem/1.4 system-ui,sans-serif; border-radius:8px; background:#e6eddc; color:#2d503c; font-variant-numeric:tabular-nums; }
.sc-directory #user-search { display:block; width:100%; margin-block:14px 10px; padding:10px 12px; background:#f5f7f3; border:1px solid #d2ddcf; color:var(--sc-ink); font-size:1rem; border-radius:9px; }
.sc-directory .users-list { display:grid; grid-template-columns:minmax(0,1fr); gap:3px; max-height: min(62vh,650px); overflow-y:auto; margin:0; }
.sc-directory .user-row { display:flex; align-items:center; text-align:left; background:transparent; gap:10px; padding:10px 6px; color:var(--sc-ink); border-radius:10px; border:1px solid transparent; width:100%; min-width:0; }
.sc-directory .user-row .sc-avatar { width:34px; height:34px; }
.sc-directory .user-row.active { background:#eaf3dd; border-color:#cddebc; }
.sc-directory .user-row:hover { background:#f0f4ea; }
.sc-client-copy { flex:1; min-width:0; }
.sc-client-copy strong, .sc-client-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sc-directory .user-row time { align-self:flex-start; font-size:.75rem; color:#52675b; line-height:1.5; white-space:nowrap; font-variant-numeric:tabular-nums; }
.sc-directory .sc-client-copy small { color:#52675b; }
.sc-workspace #admin-thread { min-width:0; }
.sc-workspace .sc-conversation { height:clamp(300px,calc(100vh - 300px),680px); height:clamp(300px,calc(100dvh - 300px),680px); }
.sc-workspace .adjust-panel { margin-block:12px 0; }
.sc-workspace .adjust-panel summary { cursor:pointer; font-weight:700; }
.sc-workspace .adjust-panel[open] summary { margin-bottom:14px; }
.sc-workspace .adjust-grid { display:grid; grid-template-columns:minmax(120px,.7fr) minmax(0,1.4fr); gap:12px; }
.sc-workspace .adjust-panel .btn.primary { color:#fff; background:#234c3d; border-color:#234c3d; }
@media (min-width: 900px) {
  .sc-player { grid-template-columns:minmax(0,1fr) minmax(200px,255px); align-items:start; }
  .sc-context { display:block; border-radius:20px; background:#e2ebda; padding:24px; color:#203d30; border:1px solid #cad7c4; }
  .sc-context h2 { margin:0 0 24px; font-size:1.05rem; }
  .sc-context dl { margin:0; }
  .sc-context dl div + div { margin-top:16px; }
  .sc-context dt { color:#526859; font-size:.82rem; margin-bottom:3px; }
  .sc-context dd { margin:0; font-size:1rem; font-weight:650; overflow-wrap:anywhere; }
  .sc-context a { display:block; border-top:1px solid #c0cfbb; margin-top:22px; padding-top:15px; text-decoration:underline; text-underline-offset:4px; font-size:.9rem; font-weight:650; }
}
@media (max-width: 760px) {
  .sc-guest .auth-art { flex-flow:row; align-items:center; justify-content:flex-start; gap:13px; padding:20px; }
  .sc-guest .auth-art .sc-avatar { width:43px; height:43px; border-radius:13px; }
  .sc-guest .auth-art strong { font-size:1.3rem; }
  .sc-player .sc-conversation { height:clamp(180px,calc(100vh - 152px),850px); height:clamp(180px,calc(100dvh - 152px),850px); border-radius:16px; }
  .sc-workspace.workspace { grid-template-columns:minmax(0,1fr); gap:10px; }
  .sc-workspace .users-panel { padding:10px 14px; }
  .sc-workspace .adjust-grid { grid-template-columns:1fr; }
  .sc-directory .users-list { max-height:min(30vh,240px); }
  .sc-workspace .sc-conversation { height:clamp(260px,calc(100vh - 240px),680px); height:clamp(260px,calc(100dvh - 240px),680px); }
  .sc-conversation .sc-head { padding-block:13px; }
  .sc-head > .sc-avatar { width:40px; height:40px; }
}
@media (max-width: 360px) {
  .sc-head .sc-private { font-size:.72rem; padding-inline:7px; }
  .sc-copy { max-width:83%; }
  .sc-conversation .message { gap:6px; }
  .sc-conversation .message .sc-avatar { width:24px; height:24px; margin-top:19px; border-radius:7px; }
}
@media (max-height: 490px) {
  .sc-conversation .sc-head { padding-block:7px; }
  .sc-head > .sc-avatar { width:34px; height:34px; }
  .sc-heading small { display:none; }
  .sc-player .sc-conversation { min-height:160px; height:calc(100vh - 124px); height:calc(100dvh - 124px); }
  .sc-conversation .chat-log { padding-block:7px; }
  .sc-emblem { display:none; }
  .sc-empty { padding:4px; }
  .sc-topics { margin-top:7px; }
  .sc-conversation .chat-foot { padding-block:5px; }
}
