:root {
  --sc-pink: #ef5a7d;
  --sc-pink-strong: #eb476e;
  --sc-text: #252525;
  --sc-muted: #8c8c8c;
  --sc-line: #e6e6e6;
  --sc-panel: #fff;
  --sc-stage: #fafafa;
  --sc-soft: #f4f4f4;
}
.sc-chat-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 20px 0; }
.sc-chat-suggestions button { border: 1px solid rgba(230,96,123,.25); border-radius: 999px; padding: 7px 11px; color: #9c4860; background: rgba(255,255,255,.9); font-size: 12px; cursor: pointer; }
.sc-chat-suggestions button:hover { color: #fff; background: #e6607b; }
.sc-composer.is-disabled { opacity: .55; pointer-events: none; }
.sc-composer.is-sending { opacity: .78; }
.sc-composer.is-sending .sc-send-btn { cursor: wait; }
.sc-message-row.is-pending .sc-message-bubble { color: var(--sc-muted); }
.sc-message-row.is-pending .sc-message-bubble::after { content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 7px; vertical-align: middle; background: var(--sc-pink); border-radius: 50%; animation: sc-chat-pulse .85s ease-in-out infinite alternate; }
.sc-message-row.is-error .sc-message-bubble { color: #a44358; background: #fff0f3; border: 1px solid #ffd3dd; }
@keyframes sc-chat-pulse { to { opacity: .2; transform: scale(.72); } }

html,
body {
  overflow: hidden;
}

body {
  color: var(--sc-text);
  background: var(--sc-stage);
}

#logo,
#logoLS {
  object-fit: contain;
}

#mainContainer {
  padding: 0 !important;
  overflow: hidden;
}

.sc-chat-workspace,
.sc-chat-workspace * {
  box-sizing: border-box;
}

.sc-chat-workspace button,
.sc-chat-workspace input {
  font: inherit;
}

.sc-chat-workspace button {
  border: 0;
}

.sc-chat-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 24%) minmax(440px, 1fr) minmax(310px, 25%);
  height: calc(100vh - var(--header-height, 80px));
  min-height: 620px;
  background: var(--sc-stage);
  border-top: 1px solid var(--sc-line);
}

.sc-chat-history,
.sc-chat-profile,
.sc-chat-center {
  min-width: 0;
  min-height: 0;
  background: var(--sc-panel);
}

.sc-chat-history {
  border-right: 1px solid var(--sc-line);
  padding: 28px 18px;
}

.sc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin: 0 4px 22px;
}

.sc-panel-head h1,
.sc-panel-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
}

.sc-panel-close,
.sc-profile-mobile-head {
  display: none;
}

.sc-history-list {
  display: grid;
  gap: 8px;
}

.sc-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 8px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 9px 14px;
  color: var(--sc-text);
  text-align: left;
  background: transparent;
  border-radius: 38px;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.sc-history-item:hover {
  background: #f7f7f7;
  transform: translateX(2px);
}

.sc-history-item.active {
  background: #f1f1f1;
}

.sc-avatar {
  display: block;
  width: 58px;
  height: 58px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #f1f1f1;
  border-radius: 50%;
}

.sc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 10%;
  transform: scale(4.1);
  transform-origin: 50% 8%;
}

.sc-avatar.sc-chat-portrait-avatar img {
  object-fit: cover;
  object-position: center top;
  transform: none;
}

.sc-history-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.sc-history-copy strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-history-copy small {
  color: var(--sc-muted);
  font-size: 12px;
}

.sc-unread-dot {
  width: 7px;
  height: 7px;
  background: var(--sc-pink);
  border-radius: 50%;
  opacity: 0;
}

.sc-history-item:not(.active) .sc-unread-dot {
  opacity: 1;
}

.sc-chat-center {
  position: relative;
  display: flex;
  flex-direction: column;
}

.sc-conversation-head {
  display: flex;
  height: 84px;
  flex: 0 0 84px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: var(--sc-panel);
  border-bottom: 1px solid var(--sc-line);
}

.sc-active-person {
  display: flex;
  align-items: center;
  gap: 13px;
}

.sc-active-person .sc-avatar {
  width: 54px;
  height: 54px;
}

.sc-active-person > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sc-active-person strong {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.sc-active-person small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sc-muted);
  font-size: 12px;
}

.sc-active-person small i {
  width: 7px;
  height: 7px;
  background: #2bdc83;
  border-radius: 50%;
}

.sc-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-call-btn,
.sc-mobile-panel-btn,
.sc-profile-actions > button:not(.sc-request-btn) {
  display: inline-flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #151515;
  background: #fff;
  border: 1px solid #ededed !important;
  border-radius: 25px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .14);
  cursor: pointer;
}

.sc-call-btn {
  min-width: 105px;
  padding: 0 20px;
  font-size: 17px;
}

.sc-call-btn .icon {
  font-size: 19px;
}

.sc-mobile-panel-btn {
  display: none;
  width: 44px;
  height: 44px;
  box-shadow: none;
}

.sc-message-stage {
  flex: 1 1 auto;
  overflow: auto;
  padding: 28px 30px;
  background: var(--sc-stage);
}

.sc-message-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.sc-message-avatar {
  display: none;
  width: 42px;
  height: 42px;
}

.sc-message-bubble {
  max-width: min(680px, 78%);
  padding: 15px 20px;
  color: #4e4e4e;
  font-size: 16px;
  line-height: 1.55;
  background: #e9e9e9;
  border-radius: 7px 24px 24px 24px;
}

.sc-message-row.is-user {
  justify-content: flex-end;
}

.sc-message-row.is-user .sc-message-bubble {
  color: #fff;
  background: var(--sc-pink);
  border-radius: 24px 7px 24px 24px;
}

.sc-greeting-bubble {
  max-width: none;
  white-space: nowrap;
}

.sc-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 64px;
  height: 74px;
  flex: 0 0 74px;
  align-items: center;
  margin: 0 22px 22px;
  padding-left: 20px;
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 38px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .08);
}

.sc-composer input {
  min-width: 0;
  color: var(--sc-text);
  background: transparent;
  border: 0;
  outline: 0;
}

.sc-composer input::placeholder {
  color: #8c8c8c;
  font-style: italic;
}

.sc-char-count {
  padding: 0 16px;
  color: #999;
  font-size: 13px;
}

.sc-send-btn {
  width: 64px;
  height: 72px;
  color: #fff;
  font-size: 26px;
  background: var(--sc-pink);
  border-radius: 0 36px 36px 0;
}

.sc-chat-profile {
  position: relative;
  overflow: auto;
  padding: 18px 22px 30px;
  border-left: 1px solid var(--sc-line);
}

.sc-profile-summary {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.sc-profile-summary > img {
  width: 120px;
  height: 136px;
  object-fit: cover;
  object-position: center top;
  background: #f4f4f4;
  border-radius: 20px;
}

.sc-profile-summary h2 {
  margin: 8px 0 10px;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.2;
}

.sc-profile-summary p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--sc-muted);
  font-size: 15px;
}

.sc-profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 52px;
  gap: 10px;
  margin: 16px 0 26px;
}

.sc-profile-actions > button:not(.sc-request-btn) {
  width: 52px;
  height: 52px;
  font-size: 21px;
}

.sc-request-btn {
  display: flex;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  background: var(--sc-pink);
  border-radius: 27px;
  cursor: pointer;
}

.sc-media-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  background: #f1f1f1;
  border-radius: 28px;
}

.sc-media-tabs button {
  height: 44px;
  color: #8b8b8b;
  background: transparent;
  border-radius: 23px;
  cursor: pointer;
}

.sc-media-tabs button.active {
  color: #171717;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
}

.sc-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
  padding-bottom: 70px;
}

.sc-media-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: .72;
  overflow: hidden;
  padding: 0;
  background: #efefef;
  border-radius: 14px;
  cursor: pointer;
}

.sc-media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.sc-media-card.locked img {
  filter: blur(10px);
  transform: scale(1.08);
}

.sc-media-card > .icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #262626;
  background: rgba(255, 255, 255, .88);
  border-radius: 50%;
}

.sc-media-grid.show-videos .sc-media-card::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: '\25B6';
  color: #fff;
  font-size: 28px;
  transform: translate(-50%, -50%);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.sc-delete-chat {
  position: sticky;
  bottom: 0;
  left: 50%;
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  margin: -55px auto 0;
  padding: 0 18px;
  color: #232323;
  background: rgba(255, 255, 255, .94);
  border: 1px solid #d4d4d4 !important;
  border-radius: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.sc-panel-backdrop {
  display: none;
}

/* Dark mode */
body.dark-mode {
  --sc-text: #f4f4f4;
  --sc-muted: #a9a9a9;
  --sc-line: #3b3b3b;
  --sc-panel: #242424;
  --sc-stage: #1e1e1e;
  --sc-soft: #313131;
  background: #1e1e1e;
}

body.dark-mode .sc-history-item:hover,
body.dark-mode .sc-history-item.active,
body.dark-mode .sc-message-bubble {
  background: #343434;
}

body.dark-mode .sc-message-row.is-error .sc-message-bubble {
  color: #ff9caf;
  background: #442c32;
  border-color: #67404a;
}

body.dark-mode .sc-call-btn,
body.dark-mode .sc-mobile-panel-btn,
body.dark-mode .sc-profile-actions > button:not(.sc-request-btn),
body.dark-mode .sc-composer,
body.dark-mode .sc-media-tabs button.active,
body.dark-mode .sc-delete-chat {
  color: #f5f5f5;
  background: #2e2e2e;
  border-color: #454545 !important;
}

body.dark-mode .sc-composer input {
  color: #f5f5f5;
}

body.dark-mode .sc-media-tabs,
body.dark-mode .sc-profile-summary > img {
  background: #333;
}

body.dark-mode #logo {
  content: url('https://hrai.ky2g3muj.work/tbnn/releases/20260718-v1/resources/images/nana/tbnana-logo-v7-generated-dark.png?v=20260718-v1');
}

@media (max-width: 1399px) {
  .sc-chat-workspace {
    grid-template-columns: minmax(210px, 23%) minmax(400px, 1fr) minmax(285px, 27%);
  }

  .sc-profile-summary {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .sc-profile-summary > img {
    width: 92px;
    height: 108px;
  }

  .sc-profile-summary h2 {
    font-size: 23px;
  }
}

@media (max-width: 991.98px) {
  html,
  body {
    overflow: hidden;
  }

  #mainContainer {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .sc-chat-workspace {
    display: block;
    height: calc(100dvh - var(--header-height, 70px) - 78px);
    min-height: 0;
  }

  .sc-chat-center {
    width: 100%;
    height: 100%;
  }

  .sc-chat-history,
  .sc-chat-profile {
    position: fixed;
    z-index: 1200;
    top: var(--header-height, 70px);
    bottom: 78px;
    width: min(88vw, 390px);
    transition: transform .24s ease;
  }

  .sc-chat-history {
    left: 0;
    transform: translateX(-105%);
    box-shadow: 8px 0 28px rgba(0, 0, 0, .18);
  }

  .sc-chat-profile {
    right: 0;
    transform: translateX(105%);
    box-shadow: -8px 0 28px rgba(0, 0, 0, .18);
  }

  body.chat-history-open .sc-chat-history,
  body.chat-profile-open .sc-chat-profile {
    transform: translateX(0);
  }

  .sc-panel-backdrop {
    position: fixed;
    z-index: 1190;
    inset: var(--header-height, 70px) 0 78px;
    background: rgba(0, 0, 0, .35);
  }

  body.chat-history-open .sc-panel-backdrop,
  body.chat-profile-open .sc-panel-backdrop {
    display: block;
  }

  .sc-panel-close,
  .sc-profile-mobile-head,
  .sc-mobile-panel-btn {
    display: flex;
  }

  .sc-panel-close {
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: var(--sc-text);
    background: transparent;
  }

  .sc-profile-mobile-head {
    margin-bottom: 16px;
  }

  .sc-conversation-head {
    height: 72px;
    flex-basis: 72px;
    padding: 9px 12px;
  }

  .sc-active-person {
    gap: 9px;
  }

  .sc-active-person .sc-avatar {
    width: 46px;
    height: 46px;
  }

  .sc-active-person strong {
    font-size: 17px;
  }

  .sc-call-btn {
    min-width: 46px;
    width: 46px;
    height: 46px;
    padding: 0;
  }

  .sc-call-btn span:last-child {
    display: none;
  }

  .sc-message-stage {
    padding: 22px 14px;
  }

  .sc-message-avatar {
    display: block;
  }

  .sc-message-bubble {
    max-width: calc(100% - 56px);
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .sc-message-row:not(.is-user) > div:not(.sc-message-bubble) {
    min-width: 0;
    max-width: calc(100% - 54px);
  }

  .sc-message-row:not(.is-user) > div:not(.sc-message-bubble) .sc-message-bubble {
    max-width: 100%;
  }

  .sc-greeting-bubble {
    width: max-content;
    font-size: clamp(11px, 3.6vw, 14px);
    padding-right: clamp(11px, 4vw, 20px);
    padding-left: clamp(11px, 4vw, 20px);
  }

  .sc-composer {
    grid-template-columns: minmax(0, 1fr) 48px;
    height: 58px;
    flex-basis: 58px;
    margin: 0 10px 10px;
    padding-left: 16px;
  }

  .sc-char-count {
    display: none;
  }

  .sc-send-btn {
    width: 48px;
    height: 56px;
    font-size: 21px;
  }
}

@media (max-width: 420px) {
  .sc-mobile-panel-btn {
    width: 38px;
    height: 38px;
  }

  .sc-active-person small {
    display: none;
  }

  .sc-head-actions {
    gap: 5px;
  }
}

/* Two-pane character video chat */
.sc-chat-workspace {
  grid-template-columns: minmax(360px, 42%) minmax(520px, 58%);
  min-height: 560px;
}

.sc-character-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
  border-right: 1px solid var(--sc-line);
}

.sc-character-stage.sc-character-scrubber {
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.sc-character-stage.sc-character-scrubber.is-scrubbing {
  cursor: grabbing;
}

.sc-character-stage::before {
  display: none;
  content: none;
}

.sc-character-stage::after {
  position: absolute;
  z-index: 0;
  top: 58%;
  left: 52%;
  content: 'SUCHANG';
  pointer-events: none;
  color: rgba(31, 27, 29, .2);
  font-size: clamp(60px, 6.4vw, 104px);
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  letter-spacing: .08em;
  text-shadow: 0 10px 32px rgba(72, 26, 40, .06);
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-11deg);
}

.sc-stage-decor {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sc-stage-index {
  position: absolute;
  top: 26px;
  right: 54px;
  color: rgba(239, 90, 125, .09);
  font-size: 58px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.08em;
}

.sc-stage-eyebrow {
  position: absolute;
  top: 32px;
  right: 24px;
  color: rgba(116, 78, 88, .38);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2em;
  writing-mode: vertical-rl;
}

.sc-stage-caption {
  position: absolute;
  bottom: 70px;
  left: 40px;
  width: 148px;
  padding-top: 10px;
  color: rgba(116, 78, 88, .42);
  font-size: 8px;
  font-weight: 650;
  line-height: 1.65;
  letter-spacing: .14em;
  border-top: 1px solid rgba(239, 90, 125, .24);
}

.sc-stage-dots {
  position: absolute;
  top: 32%;
  right: 21px;
  width: 45px;
  height: 72px;
  opacity: .38;
  background-image: radial-gradient(circle, rgba(239, 90, 125, .42) 1.2px, transparent 1.3px);
  background-size: 10px 10px;
}

.sc-character-hanzi {
  position: absolute;
  z-index: 1;
  top: 37%;
  pointer-events: none;
  color: rgba(239, 90, 125, .28);
  font-size: clamp(70px, 7.4vw, 112px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 14px 34px rgba(98, 37, 54, .08);
  transform: translateY(-50%) rotate(-10deg);
}

.sc-character-hanzi.is-left {
  top: 44%;
  left: calc(50% - clamp(124px, 12vw, 180px));
}
.sc-character-hanzi.is-right { right: calc(50% - clamp(124px, 12vw, 180px)); }

.sc-character-copy {
  position: absolute;
  z-index: 3;
  top: 34px;
  left: 40px;
}

.sc-character-copy h1 {
  margin: 14px 0 4px;
  color: var(--sc-pink);
  font-size: clamp(32px, 3vw, 52px);
  font-weight: 700;
  letter-spacing: -.04em;
}

.sc-character-copy p {
  margin: 0;
  color: #8c747b;
  font-size: 15px;
}

.sc-online-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: #705e64;
  font-size: 12px;
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(96, 54, 67, .08);
  backdrop-filter: blur(10px);
}

.sc-online-pill i {
  width: 7px;
  height: 7px;
  background: #2bdc83;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(43, 220, 131, .13);
}

.sc-character-video-wrap {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sc-character-video-wrap::before {
  position: absolute;
  z-index: 1;
  top: 20%;
  bottom: 11%;
  left: 50%;
  width: 22%;
  content: '';
  pointer-events: none;
  background: rgba(26, 18, 21, .1);
  border-radius: 50%;
  filter: blur(30px);
  transform: translateX(-50%);
}

.sc-character-video {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  max-width: none;
  height: 99%;
  aspect-ratio: 9 / 16;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center bottom;
  filter:
    drop-shadow(14px 18px 12px rgba(52, 35, 41, .22))
    drop-shadow(0 28px 24px rgba(111, 55, 73, .1));
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 90%, transparent 100%);
  transform: none;
  transition: opacity .18s ease, visibility .18s ease;
}

.sc-character-action-video {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sc-character-stage.is-action-playing {
  cursor: default;
}

.sc-character-stage.is-action-playing .sc-character-video[data-alpha-character-video] {
  opacity: 0;
  visibility: hidden;
}

.sc-character-stage.is-action-playing .sc-character-action-video {
  opacity: 1;
  visibility: visible;
}

.sc-kiss-action-btn {
  position: absolute;
  z-index: 5;
  top: 40%;
  right: 24px;
  display: inline-flex;
  min-width: 78px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  cursor: pointer;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  background: linear-gradient(135deg, #ef5a7d, #ff7295);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(213, 66, 101, .25);
  transform: translateY(-50%);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.sc-kiss-action-btn:hover {
  box-shadow: 0 15px 34px rgba(213, 66, 101, .34);
  transform: translateY(-50%) scale(1.04);
}

.sc-kiss-action-btn:disabled {
  cursor: default;
  opacity: .72;
}

.sc-kiss-action-btn .icon {
  font-size: 14px;
}

.sc-kiss-action-mobile {
  display: none;
}

.sc-character-glow {
  position: absolute;
  z-index: 1;
  bottom: 3%;
  left: 50%;
  width: 64%;
  height: 12%;
  display: block;
  background: rgba(224, 137, 158, .14);
  border-radius: 50%;
  filter: blur(30px);
  transform: translateX(-50%);
}

.sc-character-stats {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 36px;
  width: 120px;
  margin: 0;
  padding: 14px 15px;
  pointer-events: none;
  color: #392f32;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(111, 55, 73, .11);
  backdrop-filter: blur(13px);
  transform: none;
}

.sc-character-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(116, 78, 88, .1);
}

.sc-character-stats > div:last-child {
  border-bottom: 0;
}

.sc-character-stats dt {
  color: #927d83;
  font-size: 10px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.sc-character-stats dd {
  margin: 0;
  color: var(--sc-pink);
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
}

.sc-character-stats dd small {
  color: #6f6065;
  font-size: 9px;
  font-weight: 600;
}

.sc-character-scrub-hint {
  position: absolute;
  z-index: 3;
  right: 28px;
  bottom: 286px;
  display: flex;
  width: 112px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 10px;
  pointer-events: none;
  color: #806d73;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(111, 55, 73, .08);
  backdrop-filter: blur(10px);
}

.sc-character-scrub-hint i {
  position: relative;
  width: 29px;
  height: 10px;
  display: block;
  animation: sc-scrub-hint 1.5s ease-in-out infinite alternate;
}

.sc-character-scrub-hint i::before,
.sc-character-scrub-hint i::after {
  position: absolute;
  top: 2px;
  width: 6px;
  height: 6px;
  content: '';
  border-top: 1.5px solid var(--sc-pink);
  border-left: 1.5px solid var(--sc-pink);
}

.sc-character-scrub-hint i::before {
  left: 1px;
  transform: rotate(-45deg);
}

.sc-character-scrub-hint i::after {
  right: 1px;
  transform: rotate(135deg);
}

@keyframes sc-scrub-hint {
  from { transform: translateX(-3px); }
  to { transform: translateX(3px); }
}

.sc-character-note {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 24px;
  display: flex;
  min-width: 190px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #392f32;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(111, 55, 73, .13);
  backdrop-filter: blur(14px);
}

.sc-character-note > .icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--sc-pink);
  border-radius: 50%;
}

.sc-character-note > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sc-character-note strong {
  font-size: 14px;
}

.sc-character-note small {
  color: #8f7b81;
  font-size: 11px;
}

.sc-chat-center {
  background: var(--sc-panel);
}

.sc-conversation-head {
  height: 90px;
  flex-basis: 90px;
  padding: 15px 34px;
}

.sc-message-stage {
  padding: 28px 34px;
  background:
    linear-gradient(rgba(250, 250, 250, .94), rgba(250, 250, 250, .94)),
    radial-gradient(circle at 20% 20%, rgba(239, 90, 125, .09), transparent 30%);
}

.sc-chat-date {
  width: max-content;
  margin: 0 auto 26px;
  padding: 5px 12px;
  color: var(--sc-muted);
  font-size: 11px;
  background: rgba(0, 0, 0, .035);
  border-radius: 999px;
}

.sc-mobile-character-bg {
  display: none;
}

.sc-message-avatar {
  display: block;
  width: 42px;
  height: 42px;
}

.sc-message-sender {
  margin: 0 0 6px 3px;
  color: var(--sc-muted);
  font-size: 12px;
}

.sc-composer {
  grid-template-columns: 44px minmax(0, 1fr) auto 60px;
  margin: 0 28px 24px;
  padding-left: 8px;
}

.sc-send-btn {
  display: grid;
  width: 58px;
  height: 58px;
  align-self: center;
  justify-self: end;
  place-items: center;
  margin-right: 6px;
  padding: 0;
  border-radius: 50%;
}

.sc-send-btn .icon {
  font-size: 31px;
  line-height: 1;
}

.sc-add-btn {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--sc-pink);
  font-size: 18px;
  background: #fff2f5;
  border-radius: 50%;
}

body.dark-mode .sc-character-stage {
  background: #1e1e1e;
  border-color: #343434;
}

body.dark-mode .sc-character-stage::before {
  display: none;
}

body.dark-mode .sc-character-stage::after {
  color: rgba(255, 255, 255, .14);
  text-shadow: 0 12px 36px rgba(0, 0, 0, .28);
}

body.dark-mode .sc-character-hanzi {
  color: rgba(255, 107, 141, .2);
  text-shadow: 0 16px 38px rgba(0, 0, 0, .32);
}

body.dark-mode .sc-character-video {
  filter:
    drop-shadow(16px 20px 13px rgba(0, 0, 0, .58))
    drop-shadow(-4px 6px 20px rgba(236, 95, 120, .12));
}

body.dark-mode .sc-kiss-action-btn {
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
}

body.dark-mode .sc-character-video-wrap::before {
  background: rgba(0, 0, 0, .28);
}

body.dark-mode .sc-character-stats {
  color: #f6eef1;
  background: rgba(35, 31, 33, .7);
  border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
}

body.dark-mode .sc-character-stats > div {
  border-bottom-color: rgba(255, 255, 255, .08);
}

body.dark-mode .sc-character-stats dt,
body.dark-mode .sc-character-stats dd small {
  color: #bcaeb3;
}

body.dark-mode .sc-character-scrub-hint {
  color: #c8bac0;
  background: rgba(35, 31, 33, .62);
  border-color: rgba(255, 255, 255, .09);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

body.dark-mode .sc-stage-index {
  color: rgba(255, 255, 255, .045);
}

body.dark-mode .sc-stage-eyebrow,
body.dark-mode .sc-stage-caption {
  color: rgba(255, 255, 255, .22);
}

body.dark-mode .sc-stage-caption {
  border-color: rgba(255, 255, 255, .09);
}

body.dark-mode .sc-character-note {
  color: #fff;
}

body.dark-mode .sc-character-copy h1 {
  color: var(--sc-pink);
}

body.dark-mode .sc-character-copy p,
body.dark-mode .sc-character-note small,
body.dark-mode .sc-online-pill {
  color: #c6b8bd;
}

body.dark-mode .sc-online-pill,
body.dark-mode .sc-character-note {
  background: rgba(40, 34, 36, .7);
  border-color: rgba(255, 255, 255, .1);
}

body.dark-mode .sc-message-stage {
  background:
    linear-gradient(rgba(30, 30, 30, .95), rgba(30, 30, 30, .95)),
    radial-gradient(circle at 20% 20%, rgba(239, 90, 125, .12), transparent 30%);
}

body.dark-mode .sc-message-bubble {
  color: #f2f2f2;
}

body.dark-mode .sc-add-btn {
  color: #ff7897;
  background: #453138;
}

body.dark-mode #logo,
body.dark-mode #logoLS {
  content: url('https://hrai.ky2g3muj.work/tbnn/releases/20260718-v1/resources/images/nana/tbnana-logo-v7-generated-dark.png?v=20260718-v1');
}

@media (max-width: 1199px) {
  .sc-chat-workspace {
    grid-template-columns: minmax(320px, 40%) minmax(460px, 60%);
  }

  .sc-character-copy {
    top: 24px;
    left: 26px;
  }

  .sc-character-note {
    right: 16px;
    bottom: 16px;
    min-width: 0;
  }
}

@media (max-width: 991.98px) {
  .sc-chat-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 38%) minmax(0, 62%);
  }

  .sc-chat-center {
    width: auto;
    height: 100%;
  }

  .sc-character-copy h1 {
    font-size: 30px;
  }

  .sc-character-note {
    display: none;
  }

  .sc-composer {
    grid-template-columns: 40px minmax(0, 1fr) 54px;
    margin: 0 10px 10px;
  }

  .sc-send-btn {
    width: 52px;
    height: 52px;
    margin-right: 4px;
  }
}

@media (max-width: 767px) {
  #header {
    display: none !important;
  }

  #mainContainer {
    padding-top: 0 !important;
  }

  .sc-chat-workspace {
    display: block;
    height: calc(100dvh - 78px);
  }

  .sc-chat-workspace .sc-chat-suggestions {
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 12px 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .sc-chat-workspace .sc-chat-suggestions::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .sc-chat-workspace .sc-chat-suggestions button {
    flex: 0 0 auto;
    font-size: 10px;
    line-height: 1.2;
    padding: 5px 7px;
    white-space: nowrap;
  }

  .sc-character-stage {
    display: none;
  }

  .sc-conversation-head {
    height: 54px;
    flex-basis: 54px;
    padding: 5px 12px;
  }

  .sc-active-person {
    gap: 8px;
  }

  .sc-active-person .sc-avatar {
    width: 36px;
    height: 36px;
  }

  .sc-active-person strong {
    font-size: 15px;
  }

  .sc-call-btn {
    min-width: 38px;
    width: 38px;
    height: 38px;
  }

  .sc-call-btn .icon {
    font-size: 17px;
  }

  .sc-message-stage {
    position: relative;
    isolation: isolate;
    padding: 18px 14px;
  }

  .sc-message-stage.sc-character-scrubber {
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
  }

  .sc-mobile-character-bg {
    position: absolute;
    z-index: -1;
    inset: 0;
    display: flex;
    overflow: hidden;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
  }

  .sc-mobile-character-bg::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    content: '';
    background: linear-gradient(90deg, rgba(250, 250, 250, .28) 0%, rgba(250, 250, 250, .05) 50%, rgba(250, 250, 250, .28) 100%);
  }

  .sc-mobile-character-hanzi {
    position: absolute;
    z-index: 0;
    top: 30%;
    pointer-events: none;
    color: rgba(239, 90, 125, .18);
    font-size: clamp(54px, 14vw, 68px);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 12px 28px rgba(98, 37, 54, .07);
    transform: translateY(-50%) rotate(-10deg);
  }

  .sc-mobile-character-hanzi.is-left {
    top: 40%;
    left: calc(50% - 112px);
  }
  .sc-mobile-character-hanzi.is-right { right: calc(50% - 112px); }

  .sc-mobile-scrub-arrows {
    position: absolute;
    z-index: 0;
    top: 43%;
    right: 18px;
    left: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    color: rgba(239, 90, 125, .5);
  }

  .sc-mobile-scrub-arrows em {
    color: rgba(116, 78, 88, .38);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .16em;
  }

  .sc-mobile-scrub-side {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .sc-mobile-scrub-arrows i {
    width: 18px;
    height: 18px;
    display: block;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
  }

  .sc-mobile-scrub-arrows .is-left {
    transform: rotate(-45deg);
    animation: sc-mobile-arrow-left 1.25s ease-in-out infinite alternate;
  }

  .sc-mobile-scrub-arrows .is-right {
    transform: rotate(135deg);
    animation: sc-mobile-arrow-right 1.25s ease-in-out infinite alternate;
  }

  @keyframes sc-mobile-arrow-left {
    from { transform: translateX(3px) rotate(-45deg); }
    to { transform: translateX(-4px) rotate(-45deg); }
  }

  @keyframes sc-mobile-arrow-right {
    from { transform: translateX(-3px) rotate(135deg); }
    to { transform: translateX(4px) rotate(135deg); }
  }

  .sc-mobile-character-bg video {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: none;
    height: 102%;
    object-fit: contain;
    object-position: center bottom;
    opacity: .42;
    filter:
      drop-shadow(9px 13px 9px rgba(52, 35, 41, .2))
      drop-shadow(0 20px 18px rgba(111, 55, 73, .08));
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .55) 20%, #000 40%, #000 60%, rgba(0, 0, 0, .55) 80%, transparent 100%),
      linear-gradient(to bottom, #000 0%, #000 90%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .55) 20%, #000 40%, #000 60%, rgba(0, 0, 0, .55) 80%, transparent 100%),
      linear-gradient(to bottom, #000 0%, #000 90%, transparent 100%);
    mask-composite: intersect;
    transition: opacity .18s ease, visibility .18s ease;
  }

  .sc-mobile-character-bg .sc-mobile-character-action-video {
    position: absolute;
    opacity: 0;
    visibility: hidden;
  }

  .sc-message-stage.is-action-playing .sc-mobile-character-bg video[data-alpha-character-video] {
    opacity: 0;
    visibility: hidden;
  }

  .sc-message-stage.is-action-playing .sc-mobile-character-bg .sc-mobile-character-action-video {
    opacity: .42;
    visibility: visible;
  }

  .sc-kiss-action-desktop {
    display: none;
  }

  .sc-kiss-action-mobile {
    top: 54%;
    right: 12px;
    display: inline-flex;
    min-width: 68px;
    min-height: 36px;
    padding: 0 12px;
    font-size: 10px;
  }

  body.dark-mode .sc-mobile-scrub-arrows {
    color: rgba(255, 112, 146, .56);
  }

  body.dark-mode .sc-mobile-character-hanzi {
    color: rgba(255, 107, 141, .2);
    text-shadow: 0 14px 32px rgba(0, 0, 0, .3);
  }

  body.dark-mode .sc-mobile-character-bg video {
    filter:
      drop-shadow(10px 14px 10px rgba(0, 0, 0, .52))
      drop-shadow(-3px 4px 15px rgba(236, 95, 120, .1));
  }

  body.dark-mode .sc-mobile-scrub-arrows em {
    color: rgba(255, 255, 255, .2);
  }

  .sc-chat-date {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
  }

  .sc-message-row {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
  }

  .sc-composer {
    position: relative;
    z-index: 3;
    grid-template-columns: minmax(0, 1fr) 46px;
    height: 50px;
    flex-basis: 50px;
    overflow: hidden;
    margin: 0 10px 8px;
    padding-left: 14px;
    border-radius: 26px;
  }

  .sc-add-btn {
    display: none;
  }

  .sc-send-btn {
    width: 44px;
    height: 44px;
    margin-right: 2px;
    font-size: 20px;
    border-radius: 50%;
  }

  .sc-send-btn .icon {
    font-size: 24px;
  }

  body.dark-mode .sc-mobile-character-bg::after {
    background: linear-gradient(90deg, rgba(30, 30, 30, .56) 0%, rgba(30, 30, 30, .16) 50%, rgba(30, 30, 30, .56) 100%);
  }
}

/* xAI realtime voice call */
.sc-call-btn.is-active {
  color: #fff;
  background: var(--sc-pink);
  border-color: var(--sc-pink) !important;
  box-shadow: 0 8px 22px rgba(239, 90, 125, .3);
}

.sc-voice-call[hidden] {
  display: none !important;
}

.sc-voice-call {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 250, 252, .88);
  backdrop-filter: blur(18px);
}

.sc-voice-call-card {
  display: flex;
  width: min(420px, 100%);
  min-height: 520px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 42px 28px 34px;
  color: #2b2527;
  background:
    radial-gradient(circle at 50% 18%, rgba(239, 90, 125, .16), transparent 34%),
    rgba(255, 255, 255, .92);
  border: 1px solid rgba(239, 90, 125, .18);
  border-radius: 36px;
  box-shadow: 0 24px 70px rgba(92, 48, 61, .18);
}

.sc-voice-avatar {
  display: block;
  width: 124px;
  height: 124px;
  overflow: hidden;
  background: #fff2f5;
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 14px 38px rgba(151, 72, 95, .2);
}

.sc-voice-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.sc-voice-name {
  margin-top: 20px;
  font-size: 26px;
  font-weight: 700;
}

.sc-voice-status {
  margin-top: 6px;
  color: #9a7c84;
  font-size: 14px;
}

.sc-voice-bars {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 5px;
  margin: 22px 0 12px;
}

.sc-voice-bars i {
  width: 5px;
  height: 9px;
  background: var(--sc-pink);
  border-radius: 4px;
  opacity: .55;
}

.sc-voice-call[data-state="listening"] .sc-voice-bars i,
.sc-voice-call[data-state="speaking"] .sc-voice-bars i,
.sc-voice-call[data-state="thinking"] .sc-voice-bars i {
  animation: sc-voice-bar .8s ease-in-out infinite alternate;
}

.sc-voice-bars i:nth-child(2) { animation-delay: -.55s !important; }
.sc-voice-bars i:nth-child(3) { animation-delay: -.25s !important; }
.sc-voice-bars i:nth-child(4) { animation-delay: -.65s !important; }
.sc-voice-bars i:nth-child(5) { animation-delay: -.35s !important; }

@keyframes sc-voice-bar {
  from { height: 8px; opacity: .45; }
  to { height: 34px; opacity: 1; }
}

.sc-voice-caption {
  width: 100%;
  min-height: 56px;
  margin: 0;
  overflow: hidden;
  color: #61545a;
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sc-voice-call[data-state="error"] .sc-voice-status,
.sc-voice-call[data-state="error"] .sc-voice-caption {
  color: #b33a55;
}

.sc-voice-actions {
  display: flex;
  gap: 32px;
  margin-top: 22px;
}

.sc-voice-actions button {
  display: flex;
  width: 72px;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  color: #5c5054;
  background: transparent;
  cursor: pointer;
}

.sc-voice-actions button .icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  font-size: 24px;
  background: #f3eef0;
  border-radius: 50%;
}

.sc-voice-actions button small {
  font-size: 12px;
}

.sc-voice-actions .sc-voice-hangup .icon {
  color: #fff;
  background: #ee4e68;
  transform: rotate(135deg);
}

.sc-voice-actions .sc-voice-mute.is-muted .icon {
  color: #fff;
  background: #2f2a2c;
}

body.dark-mode .sc-voice-call {
  background: rgba(23, 20, 21, .9);
}

body.dark-mode .sc-voice-call-card {
  color: #fff;
  background:
    radial-gradient(circle at 50% 18%, rgba(239, 90, 125, .2), transparent 34%),
    rgba(43, 37, 39, .96);
  border-color: rgba(255, 255, 255, .09);
}

body.dark-mode .sc-voice-status,
body.dark-mode .sc-voice-caption,
body.dark-mode .sc-voice-actions button {
  color: #cbbdc2;
}

body.dark-mode .sc-voice-actions button .icon {
  background: #4b4144;
}

body.dark-mode .sc-voice-actions .sc-voice-hangup .icon {
  background: #ee4e68;
}

@media (max-width: 767px) {
  .sc-voice-call {
    position: fixed;
    z-index: 1400;
    inset: 0 0 78px;
    padding: 0;
    background: #fff;
  }

  .sc-voice-call-card {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sc-voice-avatar {
    width: 116px;
    height: 116px;
  }

body.dark-mode .sc-voice-call {
    background: #252122;
  }
}

.sc-character-video,
.sc-mobile-character-bg video {
  object-fit: cover !important;
  object-position: 50% 22% !important;
}

[data-character-action-button][hidden],
.sc-character-scrub-hint[hidden],
.sc-mobile-scrub-arrows[hidden] {
  display: none !important;
}
