/* ══ HOME ══ */
.home-qq-banner { display:flex; align-items:center; gap:12px; padding:12px 16px; border-radius:14px; background:rgba(200,169,126,0.06); border:1px solid rgba(200,169,126,0.14); margin-bottom:20px; }
.home-qq-icon { width:38px; height:38px; border-radius:11px; background:rgba(200,169,126,0.10); display:flex; align-items:center; justify-content:center; flex:0 0 auto; border:1px solid rgba(200,169,126,0.16); }
.home-qq-icon svg { width:24px; height:24px; }
.home-qq-text { font-size:13px; font-weight:700; color:var(--accent); }
.empty { text-align:center; padding:36px 20px; border-radius:12px; border:1.5px dashed var(--border); background:rgba(255,255,255,0.015); }
.empty-illus { width:56px; height:56px; margin:0 auto 14px; color:var(--text-muted); opacity:.45; display:flex; align-items:center; justify-content:center; }
.empty-illus svg { width:26px; height:26px; stroke:currentColor; fill:none; }
.empty-title { font-weight:700; color:var(--text-dim); font-size:14px; }
.empty-sub { color:var(--text-muted); margin-top:5px; line-height:1.5; font-size:12px; }
.arc-empty { margin:12px 0; }

/* ══ REC CARDS (首页推荐) ══ */
.rec-section { margin-bottom:28px; }
.rec-section-title { font-size:10px; letter-spacing:3px; color:var(--text-muted); text-transform:uppercase; font-family:'Space Mono',monospace; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.rec-section-title::after { content:''; flex:1; height:1px; background:var(--border); }
.rec-hero { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; }
.rec-card { border-radius:14px; padding:18px; cursor:pointer; transition:all .2s; border:1px solid var(--border); position:relative; overflow:hidden; }
.rec-card:hover { transform:translateY(-3px); box-shadow:var(--s3); }
.rec-card .emoji { font-size:36px; margin-bottom:10px; display:block; }
.rec-card .name { font-size:14px; font-weight:700; margin-bottom:5px; color:var(--text); }
.rec-card .desc { font-size:11px; opacity:.7; line-height:1.5; color:var(--text-dim); }
.rec-card .glow { position:absolute; width:100px; height:100px; border-radius:50%; filter:blur(40px); top:-20px; right:-20px; opacity:.25; }
.rec-char { background:linear-gradient(135deg,#1a1830,#181a30); }
.rec-char .glow { background:var(--accent2); }
.rec-world { background:linear-gradient(135deg,#1a2818,#281a18); }
.rec-world .glow { background:#9ec87e; }

/* ══ ARCHIVE ══ */
.arc-panel-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:10px; }
.arc-panel-header__left { display:flex; align-items:center; gap:8px; }
.arc-panel-header__title { font-size:14px; font-weight:700; color:var(--text); }
.arc-panel-header__count { background:var(--surface2); border:1px solid var(--border); border-radius:20px; font-size:10px; color:var(--text-dim); padding:2px 8px; font-family:'Space Mono',monospace; }
.arc-panel-header__btn { min-height:34px; padding:6px 13px; font-size:12px; }
.panel--split { overflow:hidden; display:flex; flex:1; min-height:0; height:calc(100vh - 112px); }
.panel--split .arc-page-split {
  display:grid;
  grid-template-columns:0.5fr 1.5fr;
  gap:26px;
  position:relative;
  align-items:stretch;
  flex:1;
  min-height:0;
  height:100%;
  background:transparent;
  border:none;
  border-radius:0;
  padding:0;
  box-shadow:none;
}
  .panel--split .arc-page-split::after {
  content:'';
  position:absolute;
  top:16px; bottom:16px; left:25%;
  width:2px;
  background:linear-gradient(180deg, rgba(200,169,126,0.55), rgba(158,126,200,0.55));
  border-radius:999px;
  filter:drop-shadow(0 0 6px rgba(200,169,126,0.28));
  transform:translateX(-50%);
  pointer-events:none;
}
.arc-page-split__main,
.arc-page-split__aside {
  min-height:0;
  max-height:100%;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding-right:2px;
}
.arc-page-split__main { background:transparent; border-radius:0; padding:0; }

/* When inside split panel, reduce section padding so headers align with aside */
.panel--split .arc-page-split__main .section-panel { padding:12px 20px; }
.arc-page-split__aside {
  border: none;
  border-radius:0;
  background: transparent;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  padding:0 12px;
  box-shadow:none;
}
.arc-placeholder { text-align:center; color:var(--text-muted); max-width:360px; }
.arc-placeholder__title { font-size:15px; font-weight:800; color:var(--text-dim); margin-bottom:8px; letter-spacing:0.5px; }
.arc-placeholder__sub { font-size:12px; line-height:1.6; }
@media(max-width:1200px){
  .panel--split .arc-page-split {
    grid-template-columns:1fr;
    padding:12px;
  }
  .panel--split .arc-page-split::after { display:none; }
}
.arc-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.arc-grid--discover { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); }

/* Make chat items inside arc-grid match archive-card appearance */
#chatGridFriends .chat-contact-card,
.arc-grid #chatGridFriends .chat-contact-card {
  background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; cursor:pointer; transition:all .2s; padding:0; display:block;
}
#chatGridFriends .chat-contact-card .chat-contact__avatar { width:48px; height:48px; border-radius:10px; margin:0; }
#chatGridFriends .chat-contact-card .chat-contact__body { padding:10px 12px 14px; }
#chatGridFriends .chat-contact-card .chat-contact__name { font-size:13px; font-weight:700; color:var(--text); }
#chatGridFriends .chat-contact-card .chat-contact__last { font-size:12px; color:var(--text-muted); }
#chatGridFriends .chat-contact-card .chat-contact__time { font-size:11px; color:var(--text-muted); }

/* Ensure arc-grid layout applies to the chat grid container */
#chatGridFriends { display:flex; flex-direction:column; gap:12px; padding:10px 10px; }

/* Long-strip style for B-area chat items */
#chatGridFriends .chat-contact-card {
  display:flex; align-items:center; gap:10px;
  padding:8px 16px; border-radius:12px; border:1px solid var(--border);
  background:var(--surface); box-shadow:var(--s1); margin:0; transition:all .12s ease;
}
#chatGridFriends .chat-contact-card:hover { transform:translateY(-2px); box-shadow:var(--s2); }
#chatGridFriends .chat-contact__avatar { width:40px; height:40px; border-radius:10px; flex-shrink:0; margin:0; background:var(--accent); display:flex; align-items:center; justify-content:center; color:var(--text-inverse, #fff); font-weight:700; line-height:0; overflow:hidden; }
#chatGridFriends .chat-contact__avatar svg,
#chatGridFriends .chat-contact__avatar img,
#chatGridFriends .chat-contact__avatar .icon { display:block; width:60%; height:60%; max-width:100%; max-height:100%; margin:auto; }
#chatGridFriends .chat-contact__body { flex:1; min-width:0; padding:0; display:flex; flex-direction:column; }
#chatGridFriends .chat-contact__name { font-size:13px; font-weight:700; color:var(--text); }
#chatGridFriends .chat-contact__last { font-size:12px; color:var(--text-muted); margin-top:4px; }
#chatGridFriends .chat-contact__meta { display:flex; align-items:center; gap:8px; justify-content:space-between; margin-top:6px; }
#chatGridFriends .chat-contact__time { font-size:11px; color:var(--text-muted); white-space:nowrap; flex-shrink:0; }
#chatGridFriends .chat-contact__unread { background:var(--accent); color:var(--text-inverse, #0c0c10); border-radius:14px; padding:2px 7px; font-size:11px; font-weight:700; }

/* Mirror styles for the canonical chat all-grid to maintain compatibility */
#chatGridAll .chat-contact-card,
.arc-grid #chatGridAll .chat-contact-card {
  background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; cursor:pointer; transition:all .2s; padding:0; display:block;
}
#chatGridAll .chat-contact-card .chat-contact__avatar { width:48px; height:48px; border-radius:10px; margin:0; }
#chatGridAll .chat-contact-card .chat-contact__body { padding:10px 12px 14px; }
#chatGridAll .chat-contact-card .chat-contact__name { font-size:13px; font-weight:700; color:var(--text); }
#chatGridAll .chat-contact-card .chat-contact__last { font-size:12px; color:var(--text-muted); }
#chatGridAll .chat-contact-card .chat-contact__time { font-size:11px; color:var(--text-muted); }

/* Ensure arc-grid layout applies to the chat grid container */
#chatGridAll { display:flex; flex-direction:column; gap:12px; padding:10px 10px; }

/* Long-strip style for B-area chat items */
#chatGridAll .chat-contact-card {
  display:flex; align-items:center; gap:10px;
  padding:8px 16px; border-radius:12px; border:1px solid var(--border);
  background:var(--surface); box-shadow:var(--s1); margin:0; transition:all .12s ease;
}
#chatGridAll .chat-contact-card:hover { transform:translateY(-2px); box-shadow:var(--s2); }
#chatGridAll .chat-contact__avatar { width:40px; height:40px; border-radius:10px; flex-shrink:0; margin:0; background:var(--accent); display:flex; align-items:center; justify-content:center; color:var(--text-inverse, #fff); font-weight:700; line-height:0; overflow:hidden; }
#chatGridAll .chat-contact__avatar svg,
#chatGridAll .chat-contact__avatar img,
#chatGridAll .chat-contact__avatar .icon { display:block; width:60%; height:60%; max-width:100%; max-height:100%; margin:auto; }
#chatGridAll .chat-contact__body { flex:1; min-width:0; padding:0; display:flex; flex-direction:column; }
#chatGridAll .chat-contact__name { font-size:13px; font-weight:700; color:var(--text); }
#chatGridAll .chat-contact__last { font-size:12px; color:var(--text-muted); margin-top:4px; }
#chatGridAll .chat-contact__meta { display:flex; align-items:center; gap:8px; justify-content:space-between; margin-top:6px; }
#chatGridAll .chat-contact__time { font-size:11px; color:var(--text-muted); white-space:nowrap; flex-shrink:0; }
#chatGridAll .chat-contact__unread { background:var(--accent); color:var(--text-inverse, #0c0c10); border-radius:14px; padding:2px 7px; font-size:11px; font-weight:700; }

/* small pill tag example (if markup contains .chat-tag) */
.chat-tag { background:rgba(158,126,200,0.12); color:var(--accent3); border-radius:999px; padding:4px 8px; font-size:12px; font-weight:700; }

/* Tighter spacing for aside */
.arc-page-split__aside { padding-left:22px; padding-right:22px; }

/* When chat list is shown in archive aside, hide the duplicate header in the chat page */
#page-chat .section-panel#chat-section-groups .arc-panel-header { display:none; }

/* Hover lift for interactive cards */
.archive-card,
.dc-card,
.persona-card,
.tpl-card,
.chat-contact-card {
  transition:transform .22s var(--esp), box-shadow .25s var(--esp), border-color .2s var(--esp);
}
@media(hover:hover){
  .archive-card:hover,
  .dc-card:hover,
  .persona-card:hover,
  .tpl-card:hover,
  .chat-contact-card:hover {
    transform:translateY(-4px) scale(1.01);
    box-shadow:var(--s3);
    border-color:rgba(200,169,126,0.22);
  }
}

/* Archive card */
.archive-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; cursor:pointer; transition:all .2s; animation:fadeUp .35s both; }
.archive-card:hover { border-color:rgba(200,169,126,0.22); }
.archive-card__cover { height:84px; display:flex; align-items:center; justify-content:center; position:relative; }
.archive-card__kind-badge { position:absolute; top:7px; right:7px; background:rgba(0,0,0,0.45); border:1px solid rgba(255,255,255,0.10); border-radius:5px; font-size:9px; padding:2px 6px; color:rgba(255,255,255,0.80); font-family:'Space Mono',monospace; }
.archive-card__body { padding:9px 11px; }
.archive-card__name { font-size:12px; font-weight:700; color:var(--text); margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.archive-card__sub { font-size:10px; color:var(--text-muted); margin-bottom:7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.archive-card__meta { font-size:9px; color:var(--text-muted); margin-bottom:6px; font-family:'Space Mono',monospace; }
.archive-card__actions { display:flex; gap:4px; flex-wrap:wrap; }
.archive-card__btn { padding:3px 8px; border-radius:6px; font-size:10px; font-weight:600; border:1px solid var(--border); background:var(--surface2); color:var(--text-dim); cursor:pointer; font-family:inherit; transition:all .15s; }
.archive-card__btn--edit:hover { border-color:rgba(200,169,126,0.35); color:var(--accent); }
.archive-card__btn--chat:hover { border-color:rgba(126,200,160,0.35); color:var(--money); }
.archive-card__btn--del:hover { border-color:rgba(200,126,126,0.35); color:var(--danger); }
.archive-card__btn--set:hover { border-color:rgba(126,158,200,0.35); color:var(--accent2); }
.archive-group__empty { color:var(--text-muted); font-size:13px; padding:18px 0; text-align:center; }

/* Selected archive card (when filtering chats) */
.archive-card.archive-card--selected { box-shadow: 0 10px 30px rgba(0,0,0,0.12); border-color: rgba(123,108,255,0.85); transform:translateY(-2px); }

/* arc tabs (角色/世界/发现) */
.arc-tabs { display:flex; gap:5px; margin-bottom:16px; padding:3px; background:var(--surface); border-radius:11px; border:1px solid var(--border); width:fit-content; }
.arc-tab { padding:6px 14px; border-radius:8px; border:none; background:transparent; font-size:12px; font-weight:600; color:var(--text-muted); cursor:pointer; display:flex; align-items:center; gap:5px; transition:all .15s; font-family:inherit; }
.arc-tab:hover { color:var(--text); }
.arc-tab--active { background:var(--surface2); color:var(--accent); }
.arc-tab svg { width:13px; height:13px; stroke:currentColor; fill:none; }

/* Archive · attach world characters */
.world-attach { margin-top:18px; padding:14px; border-radius:12px; border:1.5px dashed var(--frame-dash); background:rgba(255,255,255,0.02); }
.attach-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px; }
.attach-title { font-size:13px; font-weight:700; color:var(--text); }
.attach-sub { font-size:11px; color:var(--text-muted); margin-top:3px; line-height:1.5; }
.attach-count { padding:5px 10px; border-radius:10px; background:var(--surface2); border:1px solid var(--border); color:var(--text-muted); font-size:11px; font-family:'Space Mono',monospace; }
.attach-selected { display:flex; flex-wrap:wrap; gap:8px; padding:10px; border-radius:10px; border:1px dashed var(--frame-dash); background:rgba(255,255,255,0.02); margin-bottom:12px; min-height:44px; }

.dash-stack { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.dash-stack--compact { gap:8px; }
.dash-tile { display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:12px; border:1px dashed var(--frame-dash); background:var(--surface); color:var(--text); cursor:pointer; transition:all .18s var(--esm, ease); min-width:0; }
.dash-tile--compact { padding:10px 12px; }
.dash-tile:hover { border-color:rgba(200,169,126,0.28); box-shadow:var(--s2); transform:translateY(-1px); }
.dash-plus { width:26px; height:26px; border-radius:9px; background:rgba(200,169,126,0.16); border:1px solid rgba(200,169,126,0.24); display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--accent); flex-shrink:0; }
.dash-label { font-size:12px; font-weight:600; color:var(--text); }

.picker-panel { margin-top:10px; padding:12px; border-radius:10px; border:1px solid var(--border); background:var(--surface2); }
.picker-title { font-size:12px; font-weight:700; margin-bottom:8px; color:var(--text); }
.checklist { display:flex; flex-direction:column; gap:6px; margin-bottom:6px; }
.checkitem { display:flex; align-items:center; gap:8px; padding:7px 10px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:12px; cursor:pointer; transition:all .15s; }
.checkitem:hover { border-color:rgba(200,169,126,0.24); }
.checkitem input { accent-color: var(--accent); }

.char-chip { display:flex; align-items:center; gap:8px; padding:6px 9px; border-radius:9px; background:var(--surface); border:1px solid var(--border); color:var(--text); font-size:12px; }
.chip-avatar { width:26px; height:26px; border-radius:8px; background:linear-gradient(135deg,rgba(200,169,126,0.20),rgba(158,126,200,0.18)); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--text); overflow:hidden; flex-shrink:0; }
.chip-avatar img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.chip-name { font-weight:600; }
.chip-remove { background:none; border:none; color:var(--text-muted); font-size:16px; cursor:pointer; padding:0 4px; transition:color .15s; }
.chip-remove:hover { color:var(--accent); }

/* Discover */
.discover-search-wrap { margin-bottom:10px; }
.discover-search { display:flex; align-items:center; gap:8px; background:var(--surface2); border:1px solid var(--border); border-radius:10px; padding:8px 13px; max-width:300px; }
.discover-search:focus-within { border-color:rgba(200,169,126,0.40); }
.discover-search__icon { color:var(--text-muted); flex-shrink:0; }
.discover-search__input { background:none; border:none; outline:none; color:var(--text); font-size:12px; font-family:inherit; width:100%; }
.discover-search__input::placeholder { color:var(--text-muted); }
.discover-filters { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.discover-filter-group { display:flex; gap:4px; }
.discover-chip { padding:4px 11px; border-radius:20px; border:1px solid var(--border); background:transparent; font-size:11px; color:var(--text-muted); cursor:pointer; font-family:inherit; transition:all .15s; }
.discover-chip:hover { color:var(--text); }
.discover-chip--active { border-color:var(--accent); color:var(--accent); background:rgba(200,169,126,0.07); }
.discover-tags { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:12px; }
.discover-tag { padding:3px 10px; border-radius:20px; border:1px solid var(--border); background:transparent; font-size:10px; color:var(--text-muted); cursor:pointer; font-family:inherit; transition:all .15s; }
.discover-tag:hover { color:var(--text); }
.discover-tag--active { border-color:var(--accent3); color:var(--accent3); background:rgba(158,126,200,0.07); }
.dc-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; cursor:pointer; transition:all .2s; }
.dc-card:hover { border-color:rgba(200,169,126,0.20); transform:translateY(-2px); box-shadow:var(--s2); }
.dc-card__cover { height:76px; display:flex; align-items:flex-end; padding:7px; position:relative; }
.dc-card__kind { padding:2px 6px; background:rgba(0,0,0,0.45); border-radius:5px; font-size:9px; color:rgba(255,255,255,0.80); font-family:'Space Mono',monospace; }
.dc-card__tag { position:absolute; top:7px; right:7px; padding:2px 6px; background:rgba(0,0,0,0.38); border-radius:5px; font-size:9px; color:rgba(255,255,255,0.75); }
.dc-card__body { padding:9px 11px; }
.dc-card__name { font-size:12px; font-weight:700; color:var(--text); margin-bottom:2px; }
.dc-card__desc { font-size:10px; color:var(--text-muted); margin-bottom:5px; line-height:1.4; }
.dc-card__author { font-size:9px; color:var(--text-muted); margin-bottom:5px; font-family:'Space Mono',monospace; }
.dc-card__stats { display:flex; gap:7px; margin-bottom:6px; flex-wrap:wrap; }
.dc-card__stat { font-size:9px; color:var(--text-muted); font-family:'Space Mono',monospace; }
.dc-card__actions { display:flex; gap:4px; }
.dc-card__btn { padding:3px 8px; border-radius:6px; font-size:10px; font-weight:600; border:1px solid var(--border); background:var(--surface2); color:var(--text-dim); cursor:pointer; font-family:inherit; transition:all .15s; }
.dc-card__btn--chat:hover { border-color:rgba(200,169,126,0.35); color:var(--accent); }
.dc-card__btn--save:hover { border-color:rgba(158,126,200,0.35); color:var(--accent3); }

/* Template cards */
.tpl-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; transition:all .2s; color:var(--text); }
.tpl-card::before { display:none; }
@media(hover:hover){.tpl-card:hover{transform:translateY(-2px);box-shadow:var(--s2);border-color:rgba(200,169,126,0.18)}}
.tpl-cover { height:90px; border-bottom:1px solid var(--border); position:relative; display:flex; align-items:center; justify-content:center; }
.tpl-card[data-kind="character"] .tpl-cover { background:linear-gradient(135deg,rgba(200,169,126,0.12),rgba(158,126,200,0.08)); }
.tpl-card[data-kind="world"] .tpl-cover { background:linear-gradient(135deg,rgba(158,126,200,0.12),rgba(126,158,200,0.08)); }
.tpl-letter { background:var(--surface2); border:1.5px solid var(--border); color:var(--accent); width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:700; font-family:'Space Mono',monospace; }
.tpl-body { padding:10px; }
.tpl-title { font-weight:700; color:var(--text); font-size:13px; margin-bottom:3px; }
.tpl-meta { font-size:10px; color:var(--text-muted); margin-bottom:3px; font-family:'Space Mono',monospace; }
.tpl-desc { font-size:11px; color:var(--text-dim); line-height:1.4; margin-bottom:6px; }
.tpl-note { font-size:10px; color:var(--text-muted); margin-top:4px; }
.tpl-tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.tpl-tag { border-radius:20px; font-size:10px; padding:2px 8px; }
.tpl-tag--blue { background:rgba(126,158,200,0.15); color:var(--accent2); border:1px solid rgba(126,158,200,0.22); }
.tpl-tag--pink { background:rgba(200,126,169,0.12); color:#c87ea9; border:1px solid rgba(200,126,169,0.20); }
.tpl-tag--gray { background:rgba(107,103,96,0.22); color:var(--text-dim); border:1px solid var(--border); }
.tpl-actions { padding:8px 10px; display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.tile-btn { border-radius:8px; border:1px solid var(--border); background:var(--surface2); font-weight:600; color:var(--text-dim); cursor:pointer; padding:7px 5px; font-size:11px; text-align:center; transition:all .15s; font-family:inherit; display:flex; align-items:center; justify-content:center; line-height:1.3; }
.tile-btn:hover { border-color:rgba(200,169,126,0.28); color:var(--accent); }
.tile-btn--primary { background:linear-gradient(135deg,var(--accent),var(--accent3)); border:none; color:#0c0c10; }
.tile-btn--primary:hover { filter:brightness(1.08); }
.tpl-footer { border-top:1px solid var(--border); padding:7px 10px; display:flex; gap:7px; align-items:center; }
.tpl-dot { width:7px; height:7px; border-radius:50%; background:var(--accent); opacity:.45; flex-shrink:0; }
.tpl-footer-text { font-size:10px; color:var(--text-muted); font-family:'Space Mono',monospace; }

/* ══ CHAT LIST ══ */
.ct-tabs { display:flex; gap:4px; margin-bottom:12px; padding:3px; background:var(--surface); border-radius:11px; border:1px solid var(--border); width:fit-content; }
.ct-tab { padding:6px 13px; border-radius:8px; border:none; background:transparent; font-size:12px; font-weight:600; color:var(--text-muted); cursor:pointer; display:flex; align-items:center; gap:5px; transition:all .15s; font-family:inherit; }
.ct-tab:hover { color:var(--text); }
.ct-tab--on { background:var(--surface2); color:var(--accent); }
.ct-tab svg { width:13px; height:13px; stroke:currentColor; fill:none; }
.chat-contact-list { display:flex; flex-direction:column; gap:5px; }
.chat-contact-card { background:var(--surface); border:1px solid var(--border); border-radius:11px; padding:11px 13px; display:flex; align-items:center; gap:11px; cursor:pointer; transition:all .15s; }
.chat-contact-card:hover { border-color:rgba(200,169,126,0.20); background:var(--surface2); }
.chat-contact__avatar { width:40px; height:40px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:700; color:#fff; flex-shrink:0; position:relative; }
.chat-contact__dot { position:absolute; bottom:2px; right:2px; width:8px; height:8px; border-radius:50%; background:var(--text-muted); border:2px solid var(--surface); }
.chat-contact__dot--online { background:var(--money); }
.chat-contact__body { flex:1; min-width:0; }
.chat-contact__row1 { display:flex; align-items:center; justify-content:space-between; margin-bottom:2px; }
.chat-contact__name { font-size:13px; font-weight:700; color:var(--text); }
.chat-contact__time { font-size:10px; color:var(--text-muted); font-family:'Space Mono',monospace; }
.chat-contact__row2 { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.chat-contact__last { font-size:11px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-contact__unread { background:var(--accent); color:#0c0c10; border-radius:20px; font-size:10px; font-weight:700; padding:2px 6px; flex-shrink:0; font-family:'Space Mono',monospace; }
.persona-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; }
.persona-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; transition:all .2s; }
.persona-card:hover { border-color:rgba(200,169,126,0.20); transform:translateY(-1px); }
.persona-card--active { border-color:rgba(200,169,126,0.35); }
.persona-card__cover { height:72px; display:flex; align-items:center; justify-content:center; position:relative; }
.persona-card__initial { font-size:24px; font-weight:700; color:#fff; }
.persona-card__active-badge { position:absolute; top:5px; right:5px; background:rgba(200,169,126,0.85); color:#0c0c10; border-radius:5px; font-size:9px; padding:2px 5px; font-family:'Space Mono',monospace; font-weight:700; }
.persona-card__body { padding:9px 11px; }
.persona-card__name { font-size:12px; font-weight:700; color:var(--text); margin-bottom:2px; }
.persona-card__bio { font-size:10px; color:var(--text-muted); margin-bottom:5px; }
.persona-card__actions { display:flex; gap:4px; flex-wrap:wrap; }
.persona-card__meta { font-size:10px; color:var(--text-muted); margin-bottom:5px; display:flex; gap:8px; flex-wrap:wrap; }
.persona-card__tags { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
.persona-tag { display:inline-flex; align-items:center; padding:3px 8px; border-radius:999px; background:rgba(158,126,200,0.08); border:1px solid rgba(158,126,200,0.18); color:var(--accent3); font-size:10px; font-weight:600; }

/* Persona modal form */
.persona-form { display:flex; flex-direction:column; gap:14px; padding:4px 2px; }
.persona-form__row { display:flex; flex-direction:column; gap:6px; }
.persona-form__label { font-size:12px; font-weight:700; color:var(--text); }
.persona-form__input,.persona-form__textarea { width:100%; background:var(--surface2); border:1px solid var(--border); border-radius:10px; color:var(--text); padding:10px 12px; font-family:inherit; font-size:13px; outline:none; transition:border-color .18s, box-shadow .18s; }
.persona-form__select { width:100%; background:var(--surface2); border:1px solid var(--border); border-radius:10px; color:var(--text); padding:10px 12px; font-family:inherit; font-size:13px; outline:none; transition:border-color .18s, box-shadow .18s; }
.persona-form__select:focus { border-color:rgba(200,169,126,0.45); box-shadow:0 0 0 3px rgba(200,169,126,0.10); }
.persona-form__multi { display:flex; gap:8px; flex-wrap:wrap; }
.persona-form__mini { flex:1; min-width:110px; }
.persona-form__input:focus,.persona-form__textarea:focus { border-color:rgba(200,169,126,0.45); box-shadow:0 0 0 3px rgba(200,169,126,0.10); }
.persona-form__textarea { min-height:90px; resize:vertical; }
.persona-color-row,.persona-tone-row { display:flex; flex-wrap:wrap; gap:8px; }
.persona-color-btn { width:36px; height:36px; border-radius:10px; border:1px solid var(--border); background:var(--surface2); padding:4px; cursor:pointer; transition:border-color .15s, box-shadow .15s, transform .15s; }
.persona-color-btn span { display:block; width:100%; height:100%; border-radius:8px; }
.persona-color-btn--active { border-color:rgba(200,169,126,0.50); box-shadow:0 0 0 3px rgba(200,169,126,0.12); transform:translateY(-1px); }
.persona-tone-btn { padding:8px 12px; border-radius:10px; border:1px solid var(--border); background:var(--surface2); color:var(--text-dim); font-weight:600; font-size:12px; cursor:pointer; transition:all .15s; }
.persona-tone-btn:hover { border-color:rgba(200,169,126,0.32); color:var(--text); }
.persona-tone-btn--active { background:rgba(200,169,126,0.14); border-color:rgba(200,169,126,0.55); color:var(--accent); }
.persona-tag-group { display:flex; flex-direction:column; gap:6px; padding:8px 10px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.persona-tag-group__title { font-size:11px; font-weight:700; color:var(--text-muted); letter-spacing:0.4px; }

/* ══ ACCOUNT ══ */
.panel-account { display:flex; justify-content:flex-start; align-items:flex-start; }
.panel.panel-account { overflow-y:auto; }
.account-stack { width:min(520px,100%); display:flex; flex-direction:column; gap:6px; margin:0; }
.panel-account .section { margin-top:9px; }
.panel-account .profile { margin-bottom:7px; }
.panel-account .stat-grid { margin:7px 0; }
.avatar-row { display:flex; align-items:center; gap:18px; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:20px; margin-bottom:16px; }
.big-avatar { width:68px; height:68px; border-radius:16px; background:linear-gradient(135deg,rgba(200,169,126,0.18),rgba(158,126,200,0.15)); display:flex; align-items:center; justify-content:center; font-size:32px; border:1px solid rgba(200,169,126,0.15); }
.profile-avatar { width:68px; height:68px; border-radius:18px; background:linear-gradient(135deg,rgba(200,169,126,0.18),rgba(158,126,200,0.15)); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.profile-avatar-text { font-size:26px; font-weight:700; color:var(--accent); }
.profile { display:flex; gap:16px; align-items:flex-start; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:20px; margin-bottom:16px; }
.profile-main { flex:1; }
.profile-name-row { display:flex; align-items:center; gap:8px; }
.profile-name,.avatar-info .name { font-size:18px; font-weight:700; color:var(--text); }
.avatar-info .id { font-size:11px; color:var(--text-muted); font-family:'Space Mono',monospace; margin-top:3px; }
.profile-sub,.profile-uid { font-size:12px; color:var(--text-muted); margin-top:2px; }
.profile-uid { font-family:'Space Mono',monospace; font-size:11px; }
.profile-edit-btn { background:none; border:none; cursor:pointer; color:var(--text-muted); padding:2px; transition:color .15s; display:flex; align-items:center; }
.profile-edit-btn:hover { color:var(--accent); }
.profile-inline-editor { display:flex; gap:7px; align-items:center; margin-top:7px; }
.profile-inline-editor:not(.hidden) { animation:renameSlide .26s var(--esp, cubic-bezier(.25,.8,.25,1)) both; }
.profile-inline-editor.hidden { display:none; }
.profile-inline-input { background:var(--surface2); border:1px solid var(--border); border-radius:9px; color:var(--text); font-size:13px; padding:7px 11px; font-family:inherit; outline:none; flex:1; }
.profile-inline-input:focus { border-color:rgba(200,169,126,0.45); }
.profile-inline-action { padding:5px 11px; border-radius:8px; border:1px solid var(--border); background:var(--surface2); color:var(--text-dim); cursor:pointer; font-family:inherit; font-size:12px; font-weight:600; transition:all .15s; }
.profile-inline-action:hover { border-color:rgba(200,169,126,0.35); color:var(--accent); }
.profile-inline-action--ghost:hover { color:var(--text-muted); border-color:var(--border); }

@keyframes renameSlide { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
.stat-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:14px; }
.stat-label { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:1px; color:var(--text-muted); font-family:'Space Mono',monospace; margin-bottom:5px; }
.stat-value { font-size:26px; font-weight:700; color:var(--text); }
.stat-value--brand { background:linear-gradient(135deg,var(--accent),var(--accent3)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.stat-sub { font-size:11px; color:var(--text-muted); margin-top:4px; line-height:1.4; }
.benefit-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.benefit-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:13px; }
.benefit-card--pending { background:var(--surface); border-style:solid; }
.benefit-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; }
.benefit-title { font-weight:700; color:var(--text); font-size:12px; }
.benefit-list { display:flex; flex-direction:column; gap:7px; }
.benefit-item { display:flex; gap:9px; padding:9px; border-radius:10px; border:1px solid var(--border); background:var(--surface2); align-items:flex-start; }
.benefit-dot { width:9px; height:9px; margin-top:3px; border-radius:50%; background:rgba(126,200,160,0.65); flex-shrink:0; }
.benefit-dot--pending { background:rgba(107,103,96,0.50); }
.benefit-content { flex:1; min-width:0; }
.benefit-name { font-weight:700; color:var(--text); font-size:12px; }
.benefit-meta { margin-top:2px; font-size:10px; color:var(--text-muted); line-height:1.4; font-family:'Space Mono',monospace; }
.benefit-tags { margin-top:5px; display:flex; flex-wrap:wrap; gap:4px; }
.benefit-empty { color:var(--text-muted); font-size:12px; padding:6px 0; }
.inline-badge { padding:2px 8px; border-radius:20px; font-size:10px; font-weight:600; }
.inline-badge--money { background:rgba(126,200,160,0.10); color:var(--money); border:1px solid rgba(126,200,160,0.20); }
.inline-badge--muted { background:rgba(107,103,96,0.12); color:var(--text-muted); border:1px solid var(--border); }
.mini-badge { padding:2px 7px; background:rgba(200,169,126,0.08); border:1px solid rgba(200,169,126,0.16); color:var(--accent); border-radius:20px; font-size:9px; font-family:'Space Mono',monospace; }
.chip { background:rgba(200,169,126,0.08); border:1px solid rgba(200,169,126,0.16); color:var(--accent); border-radius:20px; padding:2px 9px; font-size:11px; }
.settings-group { background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; margin-bottom:10px; }
.settings-list { border-radius:12px; overflow:hidden; border:1px solid var(--border); margin-bottom:10px; }
.settings-row,.settings-item {
  background:var(--surface); border:none; border-bottom:1px solid var(--border);
  color:var(--text); padding:13px 16px; display:flex; align-items:center; gap:11px;
  cursor:pointer; transition:background .15s; width:100%; text-align:left; font-family:inherit; font-size:13px;
}
.settings-row:last-child,.settings-item:last-child { border-bottom:none; }
.settings-row:hover,.settings-item:hover { background:var(--surface2); }
.settings-row__icon { font-size:16px; width:26px; text-align:center; color:var(--text-muted); flex-shrink:0; }
.settings-row__main { flex:1; min-width:0; }
.settings-row__title,.settings-item .label { font-weight:500; font-size:13px; color:var(--text); display:flex; align-items:center; gap:8px; }
.settings-row__sub { font-size:11px; color:var(--text-muted); margin-top:1px; }
.settings-row__value { font-size:12px; color:var(--text-muted); font-family:'Space Mono',monospace; }
.settings-row__chevron,.settings-item .chevron { color:var(--text-muted); font-size:14px; }
.settings-row--danger .settings-row__title { color:var(--danger); }
.settings-row--danger:hover { background:rgba(200,126,126,0.05); }
.history-list-panel { border-top:1px solid var(--border); }
.pill-row { display:flex; flex-wrap:wrap; gap:5px; margin:9px 0; }
.pill-btn { padding:5px 12px; border-radius:20px; border:1px solid var(--border); background:var(--surface2); color:var(--text-dim); font-size:11px; cursor:pointer; font-family:inherit; transition:all .15s; }
.pill-btn:hover { border-color:rgba(200,169,126,0.35); color:var(--accent); }
.pill-btn.is-selected { background:rgba(200,169,126,0.10); border-color:rgba(200,169,126,0.28); color:var(--accent); }
.price-table { width:100%; border-collapse:collapse; font-size:12px; color:var(--text); }
.price-table th { background:var(--surface2); color:var(--text-muted); padding:7px 9px; text-align:left; border-bottom:1px solid var(--border); }
.price-table td { padding:7px 9px; border-bottom:1px solid var(--border); }
.purchase-tabs { display:flex; border-bottom:1px solid var(--border); margin-bottom:12px; }
.purchase-tab { padding:7px 13px; border:none; background:none; color:var(--text-muted); cursor:pointer; font-size:12px; font-weight:600; border-bottom:2px solid transparent; transition:all .15s; font-family:inherit; }
.purchase-tab.is-active { color:var(--accent); border-bottom-color:var(--accent); }
.purchase-panel { background:var(--surface2); border:1px solid var(--border); border-radius:11px; padding:12px; margin-bottom:9px; }
.purchase-panel__title { font-weight:700; color:var(--text); margin-bottom:3px; font-size:13px; }
.purchase-panel__meta { font-size:11px; color:var(--text-muted); margin-bottom:7px; }
.purchase-panel__price { font-size:18px; font-weight:700; color:var(--accent); }
.plan-card { background:var(--surface); border:1px solid var(--border); border-radius:11px; padding:11px; }
.flash-money { animation:flashGold .6s ease; }
.flash-brand { animation:flashPurple .6s ease; }
@keyframes flashGold{0%,100%{background:transparent}50%{background:rgba(200,169,126,0.14)}}
@keyframes flashPurple{0%,100%{background:transparent}50%{background:rgba(158,126,200,0.14)}}

