.chatHubPage {
  --chat-workspace-height: clamp(408px, 56dvh, 600px);
  padding-bottom: 24px;
  display: grid;
  gap: 10px;
}

.chatHubHeader {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.chatHubTopRow.compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.chatHubActionRow,
.chatHubMiniStats {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chatHubMiniStats {
  min-width: 0;
  justify-content: center;
  padding: 5px 6px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(24, 30, 56, 0.72), rgba(18, 23, 43, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chatMiniStat {
  min-width: 50px;
  padding: 6px 8px;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.chatMiniStat.warm {
  background:
    radial-gradient(90px 40px at 50% 0%, rgba(245, 243, 194, 0.12), transparent 72%),
    transparent;
}

.chatMiniStat + .chatMiniStat {
  border-left: 1px solid rgba(150, 168, 255, 0.10);
}

.chatMiniStatValue {
  color: rgba(245, 248, 255, 0.98);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.chatMiniStatLabel {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
}

.chatHubTabs {
  display: grid;
  gap: 8px;
}

.chatHubModeChip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  width: fit-content;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 248, 255, 0.94);
  font-size: 11.5px;
  font-weight: 900;
  justify-self: start;
}

.chatHubTabGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chatHubTabCard {
  -webkit-appearance: none;
  appearance: none;
  min-height: 60px;
  padding: 8px 6px;
  border-radius: 16px;
  border: 1px solid rgba(150, 168, 255, 0.10);
  background: linear-gradient(180deg, rgba(25, 31, 58, 0.90), rgba(16, 21, 42, 0.94));
  color: rgba(187, 198, 230, 0.80);
  display: grid;
  place-items: center;
  gap: 5px;
  cursor: pointer;
}

.chatHubTabCard.active {
  color: rgba(245, 243, 194, 0.98);
  border-color: rgba(245, 243, 194, 0.16);
  background:
    radial-gradient(140px 60px at 50% 0%, rgba(245, 243, 194, 0.14), transparent 72%),
    linear-gradient(180deg, rgba(28, 34, 62, 0.94), rgba(17, 22, 43, 0.96));
}

.chatHubTabIcon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(150, 168, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.chatHubTabCard.active .chatHubTabIcon {
  border-color: rgba(245, 243, 194, 0.14);
  background: rgba(245, 243, 194, 0.10);
}

.chatHubTabText {
  font-size: 11.5px;
  font-weight: 900;
}

.chatHubSearch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background: linear-gradient(180deg, rgba(17, 20, 40, 0.96), rgba(14, 18, 36, 0.98));
}

.chatHubSearchIcon {
  color: var(--faint);
  font-size: 13px;
}

.chatHubSearchInput {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: rgba(238, 242, 255, 0.94);
  font-size: 13px;
}

.chatHubNotice {
  display: none;
}

.chatHubNotice.visible {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 243, 194, 0.14);
  background: rgba(245, 243, 194, 0.08);
  color: rgba(245, 243, 194, 0.96);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.5;
}

.chatHubContent {
  min-width: 0;
}

.chatManageStack {
  display: grid;
  gap: 12px;
}

.chatManageToolbar,
.chatManageEditor {
  border-radius: 18px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background:
    radial-gradient(160px 96px at 0% 0%, rgba(245, 243, 194, 0.07), transparent 72%),
    linear-gradient(180deg, rgba(22, 27, 50, 0.98), rgba(15, 18, 35, 0.98));
  box-shadow: 0 14px 30px rgba(5, 9, 24, 0.18);
}

.chatManageToolbar {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.chatManageToolbarTitle,
.chatManageEditorTitle {
  color: rgba(245, 248, 255, 0.98);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.chatManageToolbarSub {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.chatManageActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chatManageEditor > .chatManageActions {
  padding-top: 4px;
}

.chatManageBtn {
  -webkit-appearance: none;
  appearance: none;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(238, 242, 255, 0.92);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    opacity 140ms ease;
}

.chatManageBtn:hover {
  border-color: rgba(150, 168, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.chatManageBtn.primary {
  border-color: rgba(245, 243, 194, 0.20);
  background:
    radial-gradient(120px 60px at 50% 0%, rgba(245, 243, 194, 0.12), transparent 72%),
    rgba(245, 243, 194, 0.07);
  color: rgba(245, 243, 194, 0.98);
}

.chatManageBtn.ghost {
  background: rgba(255, 255, 255, 0.03);
}

.chatManageBtn.danger {
  border-color: rgba(255, 179, 191, 0.14);
  background: rgba(255, 179, 191, 0.06);
  color: rgba(255, 205, 213, 0.98);
}

.chatManageBtn.disabled,
.chatManageBtn:disabled {
  opacity: 0.52;
  cursor: default;
  pointer-events: none;
}

.chatManageEditor {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.chatManageEditorGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chatManageField {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.chatManageField.wide {
  grid-column: 1 / -1;
}

.chatManageLabel {
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.2;
}

.chatManageInput,
.chatManageTextarea,
.chatManageSelect {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(150, 168, 255, 0.12);
  border-radius: 12px;
  background: rgba(10, 14, 28, 0.50);
  color: rgba(238, 242, 255, 0.96);
  font: inherit;
  font-size: 13px;
}

.chatManageInput,
.chatManageSelect {
  min-height: 42px;
  padding: 0 12px;
}

.chatManageTextarea {
  min-height: 128px;
  padding: 12px 13px;
  line-height: 1.55;
  resize: vertical;
}

.chatManageInput::placeholder,
.chatManageTextarea::placeholder {
  color: rgba(157, 169, 207, 0.72);
}

.chatManageInput:focus,
.chatManageTextarea:focus,
.chatManageSelect:focus {
  border-color: rgba(141, 178, 255, 0.34);
  box-shadow: 0 0 0 3px rgba(141, 178, 255, 0.10);
}

.chatManageSection {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(150, 168, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
}

.chatManageSectionHead {
  display: grid;
  gap: 4px;
}

.chatManageSectionTitle,
.chatPromptEditorTitle {
  color: rgba(245, 248, 255, 0.98);
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.3;
}

.chatManageSectionSub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.chatPromptPicker {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-right: 2px;
}

.chatPromptPickerItem {
  -webkit-appearance: none;
  appearance: none;
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(150, 168, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
}

.chatPromptPickerItem.active {
  border-color: rgba(245, 243, 194, 0.20);
  background:
    radial-gradient(120px 60px at 0% 0%, rgba(245, 243, 194, 0.08), transparent 72%),
    rgba(255, 255, 255, 0.05);
}

.chatPromptPickerTitle {
  color: rgba(245, 248, 255, 0.96);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.3;
}

.chatPromptPickerMeta,
.chatPromptPickerDesc {
  color: rgba(185, 194, 226, 0.82);
  font-size: 11.5px;
  line-height: 1.5;
}

.chatPromptPickerEmpty {
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(150, 168, 255, 0.12);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.chatPromptEditorCard {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(150, 168, 255, 0.10);
  background: rgba(10, 14, 28, 0.34);
}

.chatPromptEditorHead {
  display: grid;
  gap: 8px;
}

.chatPromptBadge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(238, 242, 255, 0.86);
  font-size: 10.5px;
  font-weight: 900;
}

.chatPromptBadge.warm {
  border-color: rgba(245, 243, 194, 0.18);
  background: rgba(245, 243, 194, 0.10);
  color: rgba(245, 243, 194, 0.98);
}

.chatManagePromptGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chatManageBadgeRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chatManageStack .empty {
  padding: 24px 12px 18px;
  border-radius: 14px;
  border: 1px dashed rgba(150, 168, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  gap: 10px;
}

.chatManageStack .emptyIcon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.chatManageStack .emptyTitle {
  font-size: 18px;
}

.chatManageStack .emptySub {
  max-width: 28rem;
  font-size: 12px;
  line-height: 1.6;
}

.chatManageStack .btnPrimary {
  margin-top: 2px;
  min-height: 42px;
  padding: 0 16px;
}

.chatStoryLayout {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.chatStorySidebar {
  padding: 8px 5px;
  border-radius: 18px;
  border: 1px solid rgba(150, 168, 255, 0.10);
  background: linear-gradient(180deg, rgba(15, 19, 37, 0.98), rgba(13, 16, 32, 0.98));
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: var(--chat-workspace-height);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.chatStorySidebar::-webkit-scrollbar,
.chatStoryList::-webkit-scrollbar {
  width: 6px;
}

.chatStorySidebar::-webkit-scrollbar-thumb,
.chatStoryList::-webkit-scrollbar-thumb {
  background: rgba(150, 168, 255, 0.18);
  border-radius: 999px;
}

.chatRailItem {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  padding: 3px 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 5px;
  cursor: pointer;
}

.chatRailItem.active {
  padding: 7px 0 8px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.chatRailAvatar,
.chatPersonaAvatar,
.chatStageCover,
.chatStoryThumb {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(112px 92px at 16% 12%, var(--chat-tile-a), transparent 72%),
    radial-gradient(144px 110px at 88% 18%, var(--chat-tile-c), transparent 74%),
    linear-gradient(180deg, rgba(37, 45, 84, 0.98), rgba(17, 22, 43, 0.96));
  border: 1px solid rgba(150, 168, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chatRailAvatar.round,
.chatPersonaAvatar.round {
  border-radius: 999px;
}

.chatRailAvatar {
  width: 44px;
  height: 44px;
}

.chatRailItem.active .chatRailAvatar {
  border-color: rgba(245, 243, 194, 0.16);
  box-shadow: 0 0 0 2px rgba(245, 243, 194, 0.08);
}

.chatVisualTone,
.chatPresetTone {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%, rgba(7, 10, 22, 0.20) 100%),
    radial-gradient(140px 110px at 84% 86%, var(--chat-tile-b), transparent 74%);
}

.chatVisualImg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chatVisualFallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.chatVisualFallback.hidden {
  display: none;
}

.chatVisualInitial {
  color: rgba(247, 250, 255, 0.98);
  font-size: 24px;
  font-weight: 900;
}

.chatRailBadge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(245, 243, 194, 0.16);
  background: rgba(17, 21, 40, 0.76);
  color: rgba(245, 243, 194, 0.98);
  font-size: 9px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chatRailHint {
  width: 100%;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chatRailItem.active .chatRailHint {
  color: rgba(238, 242, 255, 0.82);
}

.chatStoryStage,
.chatStoryEmpty,
.chatPersonaCard,
.chatPresetCard {
  border: 1px solid rgba(150, 168, 255, 0.12);
  background: linear-gradient(180deg, rgba(23, 28, 52, 0.98), rgba(16, 19, 37, 0.98));
  border-radius: 18px;
}

.chatStoryStage {
  min-width: 0;
  min-height: 0;
  height: var(--chat-workspace-height);
  padding: 10px;
  display: grid;
  gap: 10px;
  align-content: start;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.chatStageHero {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 80px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background:
    radial-gradient(120px 80px at 0% 0%, rgba(245, 243, 194, 0.08), transparent 72%),
    linear-gradient(180deg, rgba(21, 26, 49, 0.96), rgba(15, 18, 34, 0.98));
}

.chatStageCover {
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.chatStageHeroBody {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.chatStageEyebrow {
  color: rgba(187, 198, 230, 0.72);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.chatStageMeta {
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.chatStageName {
  min-width: 0;
  color: rgba(245, 248, 255, 0.98);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatStageActions.fixed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chatStageAction {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(238, 242, 255, 0.92);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.chatStageAction.primary {
  color: rgba(245, 243, 194, 0.98);
  border-color: rgba(245, 243, 194, 0.18);
  background:
    radial-gradient(120px 60px at 50% 0%, rgba(245, 243, 194, 0.12), transparent 72%),
    rgba(255, 255, 255, 0.04);
}

.chatStageAction.danger {
  color: rgba(255, 198, 206, 0.96);
}

.chatStageAction.disabled {
  opacity: 0.56;
  cursor: default;
}

.chatPersonaMeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chatChip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(150, 168, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(238, 242, 255, 0.86);
  font-size: 10.5px;
  font-weight: 900;
}

.chatChip.warm {
  border-color: rgba(245, 243, 194, 0.18);
  background: rgba(245, 243, 194, 0.10);
  color: rgba(245, 243, 194, 0.98);
}

.chatStoryList {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  align-content: start;
  padding-right: 2px;
}

.chatStoryCard {
  padding: 11px;
  border-radius: 18px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 12px;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  cursor: pointer;
}

.chatStoryCard.active {
  border-color: rgba(245, 243, 194, 0.18);
  background:
    radial-gradient(120px 60px at 0% 0%, rgba(245, 243, 194, 0.08), transparent 72%),
    rgba(255, 255, 255, 0.05);
}

.chatStoryCardMedia {
  display: flex;
  align-items: center;
}

.chatStoryThumb {
  width: 60px;
  height: 78px;
  border-radius: 16px;
}

.chatStoryCardBody {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.chatStoryCardTools {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.chatStoryCardHead,
.chatStoryCardFoot,
.chatPresetHead,
.chatPersonaActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chatStoryCardTitle,
.chatPresetTitle,
.chatPersonaTitle {
  min-width: 0;
  color: rgba(245, 248, 255, 0.98);
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatStoryCardMark {
  color: rgba(245, 243, 194, 0.92);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.chatStoryCardPreview,
.chatPersonaSub,
.chatPresetHint {
  color: rgba(185, 194, 226, 0.84);
  font-size: 13px;
  line-height: 1.55;
}

.chatStoryCardPreview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
}

.chatStoryCardTime,
.chatPresetCount {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 800;
}

.chatStoryTool,
.chatStoryEnter {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(150, 168, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(238, 242, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  min-height: 30px;
  padding: 0 11px;
}

.chatStoryTool {
  display: none;
}

.chatStoryCard.active .chatStoryTool,
.chatStoryCard:hover .chatStoryTool,
.chatStoryCard:focus-within .chatStoryTool {
  display: inline-flex;
}

.chatStoryEnter {
  border-color: rgba(245, 243, 194, 0.18);
  color: rgba(245, 243, 194, 0.98);
  background: rgba(245, 243, 194, 0.08);
}

.chatStoryTool.danger {
  color: rgba(255, 198, 206, 0.96);
}

.chatStoryEmpty {
  padding: 16px;
  display: grid;
  gap: 12px;
  min-height: 0;
  align-content: start;
}

.chatStoryHubEmpty {
  padding: 20px 16px;
  gap: 12px;
}

.chatStoryEmptyTitle {
  color: rgba(245, 248, 255, 0.98);
  font-size: 15px;
  font-weight: 900;
}

.chatStoryEmptySub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.58;
}

.chatStoryEmptyActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.chatPersonaGrid,
.chatPresetGrid {
  display: grid;
  gap: 10px;
}

.chatPersonaCard {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  align-items: start;
}

.chatPersonaAvatar {
  width: 56px;
  height: 56px;
}

.chatPersonaBody {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}

.chatPresetCard {
  position: relative;
  overflow: hidden;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.chatPersonaCard.current,
.chatPresetCard.current {
  border-color: rgba(245, 243, 194, 0.18);
  background:
    radial-gradient(160px 80px at 0% 0%, rgba(245, 243, 194, 0.08), transparent 72%),
    linear-gradient(180deg, rgba(25, 31, 57, 0.98), rgba(16, 19, 37, 0.98));
  box-shadow: 0 0 0 1px rgba(245, 243, 194, 0.08);
}

.chatPresetBody {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.chatPresetMetaLine {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chatPresetPromptNames {
  color: rgba(185, 194, 226, 0.78);
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chatPersonaSub,
.chatPresetHint {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chatPersonaActions.compact {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.chatPersonaActions.compact .chatManageBtn {
  flex: 0 0 auto;
}

.chatPresetList {
  display: grid;
  gap: 8px;
}

.chatPresetItem {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px 11px;
  color: rgba(238, 242, 255, 0.90);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.45;
}

@media (max-width: 420px) {
  .chatMiniStat {
    min-width: 44px;
    padding: 4px 6px;
  }

  .chatMiniStatValue {
    font-size: 14px;
  }

  .chatStoryLayout {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 5px;
  }

  .chatStorySidebar {
    padding: 6px 3px;
  }

  .chatRailAvatar {
    width: 40px;
    height: 40px;
  }

  .chatRailItem.active {
    padding: 5px 0;
  }

  .chatRailHint {
    display: none;
  }

  .chatRailItem.active .chatRailHint {
    display: -webkit-box;
  }

  .chatHubTabCard {
    min-height: 50px;
  }

  .chatManageToolbar,
  .chatManageEditor {
    padding: 10px;
    gap: 8px;
  }

  .chatManageEditorGrid {
    gap: 8px;
  }

  .chatManageSection {
    padding: 10px;
    gap: 8px;
  }

  .chatManagePromptGrid {
    grid-template-columns: 1fr;
  }

  .chatPromptPicker {
    max-height: 240px;
  }

  .chatManageBtn {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }

  .chatStageHero {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .chatStageCover {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .chatStoryCard {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    padding: 8px;
    gap: 8px;
  }

  .chatPersonaCard {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
  }

  .chatPersonaAvatar {
    width: 48px;
    height: 48px;
  }

  .chatPresetCard {
    padding: 10px;
  }

  .chatStoryThumb {
    width: 50px;
    height: 64px;
  }

  .chatStoryCardTools {
    gap: 5px;
  }

  .chatStoryTool,
  .chatStoryEnter {
    min-height: 26px;
    padding: 0 8px;
  }
}

@media (max-width: 760px) {
  .chatManagePromptGrid,
  .chatManageEditorGrid {
    grid-template-columns: 1fr;
  }

  .chatManageEditor > .chatManageActions {
    position: sticky;
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 3;
    margin: 2px -2px -2px;
    padding: 10px 2px 2px;
    background:
      linear-gradient(180deg, rgba(16, 20, 39, 0), rgba(16, 20, 39, 0.92) 28%, rgba(16, 20, 39, 0.98) 100%);
    backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  }
}

@media (min-width: 900px) {
  .chatHubPage {
    --chat-workspace-height: clamp(520px, 66dvh, 740px);
    gap: 10px;
  }

  .chatHubHeader {
    gap: 10px;
  }

  .chatHubTopRow.compact {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .chatHubMiniStats {
    justify-content: flex-start;
  }

  .chatMiniStat {
    min-width: 68px;
  }

  .chatHubTabGrid {
    max-width: 540px;
  }

  .chatManageToolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
  }

  .chatManageToolbarTitle,
  .chatManageToolbarSub {
    grid-column: 1;
  }

  .chatManageToolbar .chatManageActions {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-content: flex-end;
    align-self: center;
  }

  .chatStoryLayout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .chatStorySidebar {
    position: sticky;
    top: 10px;
    gap: 10px;
  }

  .chatRailAvatar {
    width: 54px;
    height: 54px;
  }

  .chatStoryStage {
    padding: 12px;
  }

  .chatStageHero {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 84px;
  }

  .chatStageCover {
    width: 64px;
    height: 64px;
  }

  .chatStoryList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chatStoryThumb {
    width: 64px;
    height: 82px;
  }

  .chatPersonaGrid,
  .chatPresetGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.chatStoryLayout {
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
}

.chatStorySidebar {
  padding: 10px 8px;
  border-radius: 24px;
  border-color: rgba(185, 198, 255, 0.18);
  background:
    radial-gradient(120px 220px at 50% 0%, rgba(124, 211, 255, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(16, 20, 44, 0.98), rgba(9, 14, 32, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 42px rgba(4, 8, 22, 0.24);
}

.chatRailItem {
  min-height: 84px;
  padding: 7px 4px;
  border-radius: 22px;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.chatRailItem:hover,
.chatRailItem:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.chatRailItem.active {
  padding: 8px 4px;
  background:
    radial-gradient(80px 70px at 50% 16%, rgba(245, 243, 194, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 24px rgba(4, 8, 22, 0.22);
}

.chatRailAvatar {
  width: 58px;
  height: 58px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(4, 8, 22, 0.26);
}

.chatRailHint {
  display: -webkit-box;
  min-height: 24px;
  font-size: 10px;
  color: rgba(221, 229, 255, 0.72);
}

.chatStoryStage {
  padding: 14px;
  border-radius: 26px;
  border-color: rgba(185, 198, 255, 0.18);
  background:
    radial-gradient(420px 220px at 8% 0%, rgba(245, 243, 194, 0.10), transparent 72%),
    radial-gradient(360px 220px at 96% 8%, rgba(84, 211, 194, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(24, 29, 58, 0.98), rgba(13, 17, 38, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 24px 56px rgba(4, 8, 22, 0.22);
}

.chatStageHero {
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 122px;
  padding: 14px;
  border-radius: 24px;
  border-color: rgba(245, 243, 194, 0.18);
  background:
    radial-gradient(260px 130px at 10% 0%, rgba(245, 243, 194, 0.14), transparent 72%),
    linear-gradient(135deg, rgba(44, 53, 96, 0.84), rgba(15, 19, 40, 0.96) 64%, rgba(12, 41, 48, 0.72));
  box-shadow: 0 18px 42px rgba(4, 8, 22, 0.24);
}

.chatStageCover {
  width: 92px;
  height: 104px;
  border-radius: 22px;
  box-shadow: 0 18px 34px rgba(4, 8, 22, 0.30);
}

.chatStageName {
  font-size: clamp(22px, 2.4vw, 30px);
  white-space: normal;
}

.chatStageMeta {
  font-size: 12px;
  color: rgba(219, 227, 255, 0.78);
}

.chatStageActions.fixed {
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
}

.chatStageAction {
  min-height: 48px;
  border-radius: 18px;
}

.chatStoryList {
  gap: 12px;
}

.chatStoryCard {
  grid-template-columns: 76px minmax(0, 1fr) auto;
  min-height: 128px;
  padding: 12px;
  border-radius: 24px;
  border-color: rgba(185, 198, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.028)),
    rgba(9, 14, 32, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 34px rgba(4, 8, 22, 0.18);
}

.chatStoryCard.active {
  border-color: rgba(245, 243, 194, 0.28);
  background:
    radial-gradient(220px 110px at 0% 0%, rgba(245, 243, 194, 0.14), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
}

.chatStoryThumb {
  width: 76px;
  height: 100px;
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(4, 8, 22, 0.26);
}

.chatStoryCardTitle {
  font-size: 16px;
}

.chatStoryCardPreview {
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 3;
}

.chatStoryCardTools {
  align-self: stretch;
  align-content: space-between;
}

.chatStoryTool,
.chatStoryEnter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.chatStoryEnter {
  min-width: 66px;
  box-shadow: 0 10px 22px rgba(4, 8, 22, 0.18);
}

@media (min-width: 900px) {
  .chatStoryLayout {
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 14px;
  }

  .chatRailAvatar {
    width: 64px;
    height: 64px;
  }

  .chatStoryList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .chatStoryLayout {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
  }

  .chatStorySidebar {
    padding: 8px 6px;
  }

  .chatRailItem {
    min-height: 78px;
  }

  .chatRailAvatar {
    width: 52px;
    height: 52px;
  }

  .chatStageHero {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 104px;
    padding: 12px;
  }

  .chatStageCover {
    width: 72px;
    height: 86px;
  }

  .chatStageName {
    font-size: 20px;
  }

  .chatStoryCard {
    grid-template-columns: 62px minmax(0, 1fr);
    min-height: 156px;
    align-items: start;
    grid-template-rows: auto auto;
  }

  .chatStoryThumb {
    width: 62px;
    height: 82px;
  }

  .chatStoryCardTools {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    justify-items: stretch;
    align-self: auto;
    align-content: start;
    margin-top: 2px;
  }
}

/* Chat selector redesign: role film rail + story branch console. */
.chatHubContent.tab-story {
  min-width: 0;
}

.chatHubContent.tab-story .chatStoryLayout {
  --story-rail-width: 112px;
  grid-template-columns: var(--story-rail-width) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.chatHubContent.tab-story .chatStorySidebar {
  position: sticky;
  top: 12px;
  max-height: var(--chat-workspace-height);
  padding: 12px 10px;
  border-radius: 28px;
  border: 1px solid rgba(224, 219, 196, 0.16);
  background:
    radial-gradient(150px 260px at 50% 0%, rgba(73, 190, 177, 0.18), transparent 72%),
    linear-gradient(180deg, rgba(33, 34, 42, 0.98), rgba(18, 21, 30, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 46px rgba(3, 7, 18, 0.24);
}

.chatHubContent.tab-story .chatRailItem {
  width: 100%;
  min-height: 106px;
  padding: 9px 6px 10px;
  border-radius: 24px;
  outline: none;
}

.chatHubContent.tab-story .chatRailItem:hover,
.chatHubContent.tab-story .chatRailItem:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.chatHubContent.tab-story .chatRailItem.active {
  background:
    radial-gradient(90px 80px at 50% 12%, rgba(255, 224, 145, 0.18), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 26px rgba(3, 7, 18, 0.22);
}

.chatHubContent.tab-story .chatRailAvatar {
  width: 68px;
  height: 68px;
  border-radius: 24px;
}

.chatHubContent.tab-story .chatRailAvatar.round {
  border-radius: 24px;
}

.chatHubContent.tab-story .chatRailBadge {
  top: 8px;
  right: 8px;
  border-color: rgba(255, 224, 145, 0.28);
  background: rgba(41, 34, 25, 0.86);
  color: rgba(255, 229, 164, 0.98);
}

.chatHubContent.tab-story .chatRailHint {
  min-height: 28px;
  color: rgba(231, 235, 242, 0.76);
  font-size: 10.5px;
  line-height: 1.25;
}

.chatHubContent.tab-story .chatStoryStage {
  height: var(--chat-workspace-height);
  padding: 16px;
  gap: 14px;
  border-radius: 30px;
  border: 1px solid rgba(224, 219, 196, 0.16);
  background:
    radial-gradient(520px 260px at 10% 0%, rgba(255, 224, 145, 0.13), transparent 72%),
    radial-gradient(420px 240px at 94% 4%, rgba(73, 190, 177, 0.15), transparent 70%),
    linear-gradient(180deg, rgba(31, 32, 40, 0.98), rgba(15, 18, 27, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 28px 62px rgba(3, 7, 18, 0.22);
}

.chatHubContent.tab-story .chatStageHero {
  grid-template-columns: 116px minmax(0, 1fr);
  min-height: 152px;
  padding: 16px;
  border-radius: 28px;
  border: 1px solid rgba(255, 224, 145, 0.18);
  background:
    radial-gradient(320px 160px at 6% 0%, rgba(255, 224, 145, 0.18), transparent 72%),
    radial-gradient(260px 180px at 96% 96%, rgba(73, 190, 177, 0.14), transparent 74%),
    linear-gradient(135deg, rgba(54, 51, 48, 0.92), rgba(24, 26, 35, 0.98) 62%, rgba(19, 47, 45, 0.78));
  box-shadow: 0 20px 44px rgba(3, 7, 18, 0.24);
}

.chatHubContent.tab-story .chatStageCover {
  width: 116px;
  height: 132px;
  border-radius: 26px;
  border-color: rgba(255, 224, 145, 0.20);
  box-shadow: 0 18px 34px rgba(3, 7, 18, 0.30);
}

.chatHubContent.tab-story .chatStageEyebrow {
  color: rgba(255, 224, 145, 0.84);
  font-size: 11px;
  letter-spacing: 0;
}

.chatHubContent.tab-story .chatStageName {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.12;
  white-space: normal;
}

.chatHubContent.tab-story .chatStageMeta {
  max-width: 42rem;
  color: rgba(226, 232, 240, 0.80);
  font-size: 12.5px;
}

.chatHubContent.tab-story .chatStageActions.fixed {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 10px;
}

.chatHubContent.tab-story .chatStageAction {
  min-height: 50px;
  border-radius: 18px;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.chatHubContent.tab-story .chatStageAction:hover:not(:disabled) {
  transform: translateY(-1px);
}

.chatHubContent.tab-story .chatStageAction.primary {
  border-color: rgba(255, 224, 145, 0.28);
  color: rgba(255, 235, 178, 0.98);
  background:
    radial-gradient(140px 80px at 50% 0%, rgba(255, 224, 145, 0.17), transparent 74%),
    rgba(255, 255, 255, 0.055);
}

.chatHubContent.tab-story .chatStageAction.ghost {
  border-color: rgba(73, 190, 177, 0.22);
  color: rgba(198, 246, 239, 0.94);
}

.chatHubContent.tab-story .chatStageAction.danger {
  border-color: rgba(255, 124, 124, 0.22);
  background:
    radial-gradient(140px 80px at 50% 0%, rgba(255, 124, 124, 0.12), transparent 74%),
    rgba(255, 255, 255, 0.035);
  color: rgba(255, 205, 205, 0.98);
}

.chatHubContent.tab-story .chatStoryList {
  gap: 14px;
  padding: 2px 4px 8px 2px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chatHubContent.tab-story .chatStoryCard {
  position: relative;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 190px;
  padding: 14px;
  align-items: stretch;
  border-radius: 28px;
  border-color: rgba(224, 219, 196, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.028)),
    rgba(18, 21, 30, 0.72);
}

.chatHubContent.tab-story .chatStoryCard.active {
  border-color: rgba(255, 224, 145, 0.30);
  background:
    radial-gradient(240px 120px at 0% 0%, rgba(255, 224, 145, 0.15), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.034));
}

.chatHubContent.tab-story .chatStoryCardMedia {
  position: relative;
  align-items: stretch;
}

.chatStoryCardIndex {
  position: absolute;
  z-index: 2;
  top: -6px;
  left: -6px;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 224, 145, 0.22);
  background: rgba(24, 26, 35, 0.88);
  color: rgba(255, 235, 178, 0.98);
  font-size: 11px;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chatHubContent.tab-story .chatStoryThumb {
  width: 88px;
  height: 124px;
  border-radius: 24px;
}

.chatHubContent.tab-story .chatStoryCardBody {
  align-content: start;
  gap: 8px;
}

.chatHubContent.tab-story .chatStoryCardTitle {
  font-size: 16px;
  white-space: normal;
}

.chatHubContent.tab-story .chatStoryCardPreview {
  min-height: 58px;
  color: rgba(218, 225, 236, 0.84);
  font-size: 13px;
  line-height: 1.52;
  -webkit-line-clamp: 3;
}

.chatHubContent.tab-story .chatStoryCardTime {
  color: rgba(175, 184, 201, 0.78);
}

.chatHubContent.tab-story .chatStoryCardTools {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  justify-items: stretch;
  align-self: end;
  gap: 8px;
}

.chatHubContent.tab-story .chatStoryTool,
.chatHubContent.tab-story .chatStoryEnter {
  display: inline-flex;
  min-height: 38px;
  border-radius: 15px;
}

.chatHubContent.tab-story .chatStoryTool.danger {
  border-color: rgba(255, 124, 124, 0.18);
  background: rgba(255, 124, 124, 0.055);
}

.chatHubContent.tab-story .chatStoryEnter {
  border-color: rgba(255, 224, 145, 0.24);
  background: rgba(255, 224, 145, 0.10);
}

@media (min-width: 1220px) {
  .chatHubContent.tab-story .chatStoryList {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .chatHubContent.tab-story .chatStoryLayout {
    --story-rail-width: 96px;
    gap: 10px;
  }

  .chatHubContent.tab-story .chatStageHero {
    grid-template-columns: 84px minmax(0, 1fr);
    min-height: 122px;
  }

  .chatHubContent.tab-story .chatStageCover {
    width: 84px;
    height: 104px;
  }

  .chatHubContent.tab-story .chatStoryList {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .chatHubContent.tab-story .chatStoryLayout {
    --story-rail-width: 74px;
    gap: 8px;
  }

  .chatHubContent.tab-story .chatStorySidebar {
    padding: 8px 6px;
    border-radius: 22px;
  }

  .chatHubContent.tab-story .chatRailItem {
    min-height: 82px;
    padding: 7px 4px;
  }

  .chatHubContent.tab-story .chatRailAvatar {
    width: 54px;
    height: 54px;
    border-radius: 19px;
  }

  .chatHubContent.tab-story .chatRailHint {
    display: none;
  }

  .chatHubContent.tab-story .chatRailItem.active .chatRailHint {
    display: -webkit-box;
    min-height: 20px;
    font-size: 9px;
  }

  .chatHubContent.tab-story .chatStoryStage {
    padding: 10px;
    gap: 10px;
    border-radius: 24px;
  }

  .chatHubContent.tab-story .chatStageHero {
    grid-template-columns: 66px minmax(0, 1fr);
    min-height: 98px;
    padding: 10px;
    border-radius: 22px;
  }

  .chatHubContent.tab-story .chatStageCover {
    width: 66px;
    height: 78px;
    border-radius: 18px;
  }

  .chatHubContent.tab-story .chatStageName {
    font-size: 20px;
  }

  .chatHubContent.tab-story .chatStageMeta {
    font-size: 11px;
  }

  .chatHubContent.tab-story .chatStageActions.fixed {
    grid-template-columns: 1fr 1fr;
  }

  .chatHubContent.tab-story .chatStageActions.fixed .chatStageAction.primary {
    grid-column: 1 / -1;
  }

  .chatHubContent.tab-story .chatStageAction {
    min-height: 42px;
    border-radius: 15px;
    font-size: 11px;
  }

  .chatHubContent.tab-story .chatStoryCard {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 168px;
    padding: 10px;
    gap: 10px;
    border-radius: 22px;
  }

  .chatHubContent.tab-story .chatStoryThumb {
    width: 68px;
    height: 92px;
    border-radius: 18px;
  }

  .chatHubContent.tab-story .chatStoryCardTitle {
    font-size: 14.5px;
  }

  .chatHubContent.tab-story .chatStoryCardPreview {
    min-height: 42px;
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .chatStoryCardIndex {
    top: -5px;
    left: -5px;
    min-width: 30px;
    height: 24px;
    font-size: 10px;
  }
}

/* fix: 2026-05-27 - keep chat hub avatars and covers centered inside clipped frames. */
.chatRailAvatar,
.chatPersonaAvatar,
.chatStageCover,
.chatStoryThumb {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.chatRailAvatar img,
.chatPersonaAvatar img,
.chatStageCover img,
.chatStoryThumb img,
.chatVisualImg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
