/* ==========================================================================
   镜花水月 · 网页端 UI 框架层
   组件库：Bootstrap 5.3（/vendor/bootstrap）+ Bootstrap Icons
   主题：对齐 Android App（ui/theme/Theme.kt）的配色、圆角、间距与导航结构
   加载顺序：bootstrap.min.css → app.css → … → ui.css（本文件最后加载）
   ========================================================================== */

/* ---------- 1. 设计令牌：对齐 App Theme.kt ---------- */
:root{
  --color-on-primary:#18234f;
  --color-primary-container:#2a3560;
  --color-on-primary-container:#e4e9ff;
  --color-tertiary:#f5a6d6;
  --color-tertiary-container:#4a2439;
  --color-on-tertiary-container:#ffd8ec;

  --radius-sm:12px;
  --radius-md:14px;
  --radius-lg:18px;
  --radius-xl:22px;
  --radius-2xl:28px;

  --shadow-sm:0 1px 3px rgba(0,0,0,.28);
  --shadow-md:0 8px 24px rgba(0,0,0,.30);
  --shadow-lg:0 22px 52px rgba(0,0,0,.46);
  --card-shadow:0 6px 20px rgba(0,0,0,.18);
  --gutter:16px;
}
html[data-theme="light"]{
  --color-on-primary:#ffffff;
  --color-primary-container:#e8ebff;
  --color-on-primary-container:#1d2a66;
  --color-tertiary:#f07ac0;
  --color-tertiary-container:#fde6f3;
  --color-on-tertiary-container:#4a1230;

  --shadow-sm:0 1px 2px rgba(15,23,42,.06);
  --shadow-md:0 8px 22px rgba(15,23,42,.10);
  --shadow-lg:0 22px 44px rgba(15,23,42,.16);
  --card-shadow:0 4px 16px rgba(15,23,42,.07);
}

/* ---------- 2. Bootstrap 变量主题化（按钮 / 卡片 / 表单 / 导航共享） ---------- */
html[data-bs-theme="dark"]{
  --bs-body-bg:#0b1020;
  --bs-body-color:#edf1ff;
  --bs-emphasis-color:#edf1ff;
  --bs-secondary-color:#a6aec8;
  --bs-tertiary-color:#8a94b2;
  --bs-secondary-bg:#1b2340;
  --bs-tertiary-bg:#1f2740;
  --bs-border-color:rgba(255,255,255,.085);
  --bs-border-color-translucent:rgba(255,255,255,.085);
  --bs-primary:#9db2ff;
  --bs-primary-rgb:157,178,255;
  --bs-link-color:#9db2ff;
  --bs-link-hover-color:#c6d3ff;
  --bs-border-radius:14px;
  --bs-border-radius-sm:12px;
  --bs-border-radius-lg:18px;
  --bs-border-radius-xl:22px;
  --bs-border-radius-xxl:28px;
  --bs-card-bg:#141a2e;
  --bs-card-color:#edf1ff;
  --bs-card-border-color:rgba(255,255,255,.075);
  --bs-card-border-radius:22px;
  --bs-card-inner-border-radius:21px;
  --bs-card-cap-bg:transparent;
  --bs-nav-pills-border-radius:999px;
}
html[data-bs-theme="light"]{
  --bs-body-bg:#f7f8fe;
  --bs-body-color:#1a1f3d;
  --bs-emphasis-color:#1a1f3d;
  --bs-secondary-color:#636b8a;
  --bs-tertiary-color:#7a829e;
  --bs-secondary-bg:#edf0fb;
  --bs-tertiary-bg:#e8ecf8;
  --bs-border-color:#e2e6f5;
  --bs-border-color-translucent:#e2e6f5;
  --bs-primary:#5b7cfa;
  --bs-primary-rgb:91,124,250;
  --bs-link-color:#4a67e8;
  --bs-link-hover-color:#3450c8;
  --bs-border-radius:14px;
  --bs-border-radius-sm:12px;
  --bs-border-radius-lg:18px;
  --bs-border-radius-xl:22px;
  --bs-border-radius-xxl:28px;
  --bs-card-bg:#ffffff;
  --bs-card-color:#1a1f3d;
  --bs-card-border-color:rgba(15,23,42,.07);
  --bs-card-border-radius:22px;
  --bs-card-inner-border-radius:21px;
  --bs-card-cap-bg:transparent;
  --bs-nav-pills-border-radius:999px;
}

/* ---------- 3. 页面底色：App 的竖向渐变 ---------- */
html{background:var(--color-background);}
body{
  background:
    radial-gradient(1100px 520px at 50% -240px, color-mix(in srgb,var(--color-primary) 14%, transparent), transparent 70%),
    linear-gradient(180deg, var(--color-background) 0%, color-mix(in srgb,var(--color-surface) 55%, var(--color-background)) 55%, var(--color-background) 100%);
  background-attachment:fixed;
}
.page-scroll::-webkit-scrollbar{width:8px;}
.page-scroll::-webkit-scrollbar-thumb{border:2px solid transparent;}

/* ---------- 4. 按钮：使用 Bootstrap 按钮组件变量 ---------- */
.btn{
  --bs-btn-border-radius:14px;
  --bs-btn-font-weight:600;
  --bs-btn-font-size:14.5px;
  --bs-btn-padding-y:.58rem;
  --bs-btn-padding-x:1.05rem;
  min-height:42px;
  letter-spacing:.01em;
}
.btn-primary{
  --bs-btn-color:var(--color-on-primary);
  --bs-btn-bg:var(--color-primary);
  --bs-btn-border-color:var(--color-primary);
  --bs-btn-hover-color:var(--color-on-primary);
  --bs-btn-hover-bg:color-mix(in srgb,var(--color-primary) 88%,#ffffff);
  --bs-btn-hover-border-color:color-mix(in srgb,var(--color-primary) 88%,#ffffff);
  --bs-btn-active-color:var(--color-on-primary);
  --bs-btn-active-bg:color-mix(in srgb,var(--color-primary) 78%,#ffffff);
  --bs-btn-active-border-color:color-mix(in srgb,var(--color-primary) 78%,#ffffff);
  --bs-btn-disabled-color:var(--color-on-primary);
  --bs-btn-disabled-bg:var(--color-primary);
  --bs-btn-disabled-border-color:var(--color-primary);
  box-shadow:0 8px 20px color-mix(in srgb,var(--color-primary) 22%, transparent);
}
.btn-ghost,.btn-outline-secondary{
  --bs-btn-color:var(--color-muted-foreground);
  --bs-btn-bg:var(--color-surface-2);
  --bs-btn-border-color:transparent;
  --bs-btn-hover-color:var(--color-foreground);
  --bs-btn-hover-bg:var(--color-surface-3);
  --bs-btn-hover-border-color:transparent;
  --bs-btn-active-color:var(--color-foreground);
  --bs-btn-active-bg:var(--color-surface-3);
  --bs-btn-active-border-color:transparent;
  background:var(--color-surface-2);
  border:1px solid transparent;
  box-shadow:none;
}
.btn-ghost:hover{background:var(--color-surface-3);}
.btn-sm{min-height:34px;--bs-btn-font-size:13px;--bs-btn-padding-y:.32rem;--bs-btn-padding-x:.7rem;border-radius:11px;}
.btn:focus-visible{outline:2px solid var(--color-ring);outline-offset:2px;}

.icon-btn{width:38px;height:38px;border-radius:12px;}
.icon-btn:hover{background:var(--color-surface-2);}
.page-head-btn,.page-back-btn{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;color:var(--color-foreground);}
.page-head-btn:hover,.page-back-btn:hover{background:var(--color-surface-2);}

/* ---------- 5. 表单：Bootstrap form-control 主题化 ---------- */
.form-control,.form-select,.field input,.field textarea,.field select{
  min-height:46px;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid transparent;
  background:var(--color-surface-2);
  color:var(--color-foreground);
  font-size:15px;
  line-height:1.5;
  box-shadow:none;
}
.form-control::placeholder,.field input::placeholder,.field textarea::placeholder{color:var(--color-subtle-foreground);}
.form-control:focus,.form-select:focus,.field input:focus,.field textarea:focus,.field select:focus{
  border-color:color-mix(in srgb,var(--color-primary) 60%, transparent);
  background:var(--color-surface-2);
  color:var(--color-foreground);
  box-shadow:0 0 0 3px var(--color-primary-soft);
}
.form-select,.field select{appearance:none;background-image:none;}
.field{margin-bottom:14px;}
.field-label{margin-bottom:6px;font-size:13px;font-weight:600;color:var(--color-muted-foreground);}

/* ---------- 6. 卡片：Bootstrap .card + App 圆角/阴影 ---------- */
.card{
  --bs-card-spacer-y:14px;
  --bs-card-spacer-x:16px;
  --bs-card-border-width:1px;
  --bs-card-bg:var(--color-surface);
  --bs-card-border-color:var(--color-border);
  --bs-card-border-radius:22px;
  --bs-card-inner-border-radius:21px;
  box-shadow:var(--card-shadow);
  overflow:hidden;
}
.big-cards .app-card{
  border-radius:22px;
  border:1px solid var(--color-border);
  background:var(--color-surface);
  box-shadow:var(--card-shadow);
  transition:transform var(--dur-base) var(--ease),box-shadow var(--dur-base),border-color var(--dur-base);
}
.big-cards .app-card:hover{
  transform:translateY(-3px);
  border-color:var(--color-border-strong);
  box-shadow:var(--shadow-md);
}
.app-list:not(.big-cards) .app-card{
  background:transparent;border:0;box-shadow:none;border-radius:18px;overflow:visible;
}
.app-list:not(.big-cards) .app-thumb{border-radius:16px;}
.big-cards .app-body{padding:14px 16px 16px;}
.big-cards .app-title{font-size:16.5px;font-weight:700;}
.big-cards .app-meta{gap:12px;font-size:12px;}
.big-cards .app-intro{font-size:13px;line-height:1.6;margin-top:8px;}
.big-cards .app-tags span{
  padding:3px 9px;
  border-radius:999px;
  background:var(--color-surface-2);
  color:var(--color-subtle-foreground);
  font-size:11px;
}
.big-cards .app-tags::after{background:linear-gradient(90deg,transparent,var(--color-surface) 62%);}
.off-card{border-radius:22px;border:1px solid var(--color-border);box-shadow:var(--card-shadow);}
.chatroom-card{border-radius:20px;border:1px solid var(--color-border);box-shadow:var(--card-shadow);}
.guide-box{border-radius:22px;background:var(--color-surface);border:1px solid var(--color-border);}
#exploreGrid{max-width:780px;}

/* ---------- 7. 页头：App PageHeader ---------- */
.ex-head{padding:calc(10px + var(--safe-top)) var(--gutter) 0;}
.ex-head-top{min-height:48px;gap:4px;}
.ex-head-top h1{margin:0;flex:1;min-width:0;font-size:22px;font-weight:750;letter-spacing:-.02em;}
.ex-lead{margin:4px 0 12px;font-size:13.5px;line-height:1.55;color:var(--color-muted-foreground);}
.pf-head{padding:calc(10px + var(--safe-top)) var(--gutter) 6px;gap:6px;min-height:48px;}
.pf-head h1{font-size:22px;font-weight:750;letter-spacing:-.02em;}
.lv-head{padding:calc(10px + var(--safe-top)) var(--gutter) 6px;gap:6px;min-height:48px;}
.lv-head h1{font-size:22px;font-weight:750;}
.sh-head{padding:calc(10px + var(--safe-top)) var(--gutter) 6px;gap:6px;min-height:48px;}
.sh-head h1{font-size:22px;font-weight:750;}
.chatroom-head{padding:calc(10px + var(--safe-top)) var(--gutter) 10px;gap:8px;}
.chatroom-head h1{font-size:22px;font-weight:750;letter-spacing:-.02em;}
.chatroom-head p{font-size:12.5px;color:var(--color-muted-foreground);}

/* ---------- 8. 分段控件：Bootstrap nav-pills 胶囊化 ---------- */
.ex-rank{margin-top:10px;}
.rank-tabs{
  display:flex;gap:2px;margin:0;padding:4px;
  border:0;border-radius:999px;
  background:var(--color-surface-2);
  overflow-x:auto;scrollbar-width:none;
}
.rank-tabs::-webkit-scrollbar{display:none;}
.rank-tab{
  position:static;flex:0 0 auto;margin:0;
  padding:7px 14px;border-radius:999px;
  font-size:13.5px;font-weight:600;
  color:var(--color-muted-foreground);
  background:transparent;
  transition:background var(--dur-base),color var(--dur-base);
}
.rank-tab::after{display:none!important;}
.rank-tab:hover{color:var(--color-foreground);background:color-mix(in srgb,var(--color-foreground) 6%,transparent);}
.rank-tab.is-active{
  background:var(--color-surface);
  color:var(--color-foreground);
  box-shadow:0 2px 8px rgba(0,0,0,.22);
}
.cr-tabs{
  margin:12px var(--gutter) 0;padding:4px;gap:2px;
  border:0;border-radius:999px;background:var(--color-surface-2);
}
.cr-tab{
  position:static;padding:7px 14px;border-radius:999px;
  font-size:13.5px;font-weight:600;color:var(--color-muted-foreground);
}
.cr-tab::after{display:none!important;}
.cr-tab.is-active{background:var(--color-surface);color:var(--color-foreground);box-shadow:0 2px 8px rgba(0,0,0,.22);}
.rec-filters{
  display:inline-flex;gap:2px;margin:2px var(--gutter) 10px;padding:4px;
  border:1px solid transparent;border-radius:999px;background:var(--color-surface-2);
}
.rec-filter{
  height:30px;padding:0 14px;border:0;border-radius:999px;
  background:transparent;color:var(--color-muted-foreground);
  font-size:13px;font-weight:600;
}
.rec-filter.is-on{background:var(--color-surface);color:var(--color-foreground);box-shadow:0 2px 8px rgba(0,0,0,.22);}
.mini-tabs{background:var(--color-surface-2);border-radius:999px;padding:3px;}
.mini-tabs button{height:28px;border-radius:999px;padding:0 11px;font-size:12.5px;}
.mini-tabs button.is-active{background:var(--color-surface);color:var(--color-foreground);box-shadow:0 2px 6px rgba(0,0,0,.2);}

/* ---------- 9. 底部导航：App JinghuaBottomBar（浮动胶囊 + 中间匹配） ---------- */
@media (max-width:860px){
  .page-scroll{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px));}
  .tabbar{
    display:flex;position:fixed;left:12px;right:12px;bottom:calc(10px + var(--safe-bottom));
    height:68px;min-height:0;align-items:center;gap:0;
    padding:0 6px;border-radius:28px;
    border:1px solid var(--color-border);
    background:color-mix(in srgb,var(--color-surface) 94%,transparent);
    backdrop-filter:blur(22px) saturate(1.2);
    box-shadow:0 14px 30px rgba(0,0,0,.35);
    z-index:61;
  }
  html[data-theme="light"] .tabbar{
    box-shadow:0 8px 22px rgba(23,32,64,.12);
  }
  .tab-item{
    flex:1;height:100%;gap:2px;justify-content:center;padding:0;
    border-radius:20px;color:var(--color-subtle-foreground);
  }
  .tab-item svg{
    width:42px;height:25px;padding:3px 10px;border-radius:13px;
    box-sizing:border-box;transition:background var(--dur-base),color var(--dur-base);
  }
  .tab-item span{font-size:10.5px;font-weight:600;line-height:1;}
  .tab-item.is-active{color:var(--color-primary);}
  .tab-item.is-active svg{background:var(--color-primary-container);color:var(--color-primary);}
  .tab-match{
    flex:0 0 auto;min-width:98px;height:50px;margin:0;padding:0 14px;
    flex-direction:row;gap:6px;border-radius:25px;
    color:#fff;background:linear-gradient(135deg,var(--color-primary),var(--color-tertiary));
    box-shadow:0 10px 22px color-mix(in srgb,var(--color-primary) 35%, transparent);
    transform:none;
  }
  .tab-match .match-orb{
    width:auto;height:auto;border:0;border-radius:0;
    background:none;box-shadow:none;display:inline-flex;
  }
  .tab-match>span:last-child{color:#fff;font-size:14px;font-weight:750;line-height:1;margin:0;}
}

/* ---------- 10. 聊天页 ---------- */
.chat-head{
  background:color-mix(in srgb,var(--color-background) 82%, transparent);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--color-border);
  min-height:56px;padding-top:calc(8px + var(--safe-top));
}
.chat-title h2{font-size:16.5px;font-weight:700;}
.chat-title p{font-size:12px;color:var(--color-muted-foreground);}
.mode-bar{padding:6px 14px 8px;gap:6px;}
.mode-chip{height:30px;padding:0 13px;border-radius:999px;font-size:12.5px;font-weight:600;background:var(--color-surface-2);color:var(--color-muted-foreground);}
.mode-chip.is-active{background:var(--color-primary-container);color:var(--color-primary);}
.composer-wrap{padding:8px 12px calc(12px + var(--safe-bottom));background:transparent;}
.composer{
  border-radius:22px;background:var(--color-surface);
  border:1px solid var(--color-border);
  box-shadow:0 10px 28px rgba(0,0,0,.28);
  padding:10px 10px 8px 14px;
}
.composer.is-focus{border-color:color-mix(in srgb,var(--color-primary) 55%,transparent);box-shadow:0 0 0 3px var(--color-primary-soft),0 10px 28px rgba(0,0,0,.28);}
.composer-bar{gap:6px;}
.composer-bar .model-btn,.composer-bar .tool-btn{border-radius:999px;background:var(--color-surface-2);}
.send-btn{border-radius:50%;}
/* ---------- 聊天列表：卡片式布局 ---------- */
#pageRecords .ex-head-top h1{font-size:18px;font-weight:650;letter-spacing:0;}
.rec-list{display:flex;flex-direction:column;gap:10px;padding:6px var(--gutter) 0;}
.rec-row{
  display:flex;align-items:center;gap:12px;width:100%;
  padding:12px;margin:0;text-align:left;
  background:var(--color-surface);
  border:1px solid var(--color-border);
  border-radius:18px;
  box-shadow:none;
  transition:background var(--dur-base),border-color var(--dur-base),transform var(--dur-base);
}
.rec-row:hover{background:var(--color-surface);border-color:var(--color-border-strong);transform:none;}
.rec-row:active{transform:scale(.994);background:var(--color-surface-2);}
.rec-thumb{width:54px;height:54px;flex:0 0 54px;border-radius:16px;overflow:hidden;background:var(--color-surface-2);}
.rec-thumb img{display:block;width:100%;height:100%;object-fit:cover;}
.rec-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px;}
.rec-top{display:flex;align-items:center;gap:6px;min-width:0;}
.rec-top b{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:600;color:var(--color-foreground);letter-spacing:0;}
.rec-top time{margin-left:auto;flex:none;font-size:11.5px;color:var(--color-subtle-foreground);}
.rec-pin{flex:none;font-size:12px;color:var(--color-primary);}
.rec-sub{display:flex;align-items:center;gap:8px;min-width:0;font-size:11.5px;color:var(--color-muted-foreground);}
.rec-chip{max-width:60%;padding:2px 8px;border-radius:999px;background:var(--color-surface-2);color:var(--color-subtle-foreground);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rec-go{flex:0 0 18px;display:grid;place-items:center;color:var(--color-subtle-foreground);font-size:14px;}
.side-search{height:40px;border-radius:14px;background:var(--color-surface-2);padding:0 12px;}
.side-search input{font-size:14px;}

/* ---------- 11. 聊天室（含匹配聊天） ---------- */
.chatroom-page{background:transparent;}
.chatroom-body{background:transparent;}
.chatroom-msg .cm-text{
  border-radius:16px;
  padding:10px 13px;
  background:var(--color-surface-2);
  font-size:14px;
}
.chatroom-msg.me .cm-text{
  background:linear-gradient(135deg,var(--color-primary),color-mix(in srgb,var(--color-primary) 70%,var(--color-tertiary)));
  color:var(--color-on-primary);
}
.chatroom-msg .cm-avatar{box-shadow:0 2px 8px rgba(0,0,0,.2);}
.chatroom-composer{
  background:transparent;
  border-top:1px solid var(--color-border);
  padding:10px 14px calc(12px + var(--safe-bottom));
}
.chatroom-rich-input,.chatroom-composer textarea{
  border-radius:18px;background:var(--color-surface);border:1px solid var(--color-border);
}
.chatroom-send{border-radius:999px;}
.chatroom-mode,.chatroom-tool{border-radius:50%;background:var(--color-surface-2);}

/* ---------- 12. 个人中心（App ProfileScreen） ---------- */
#pageMine{
  background:linear-gradient(180deg,
    color-mix(in srgb,var(--color-primary-container) 52%, transparent) 0,
    transparent 360px);
}
.mine-page{padding:0 var(--gutter) calc(24px + var(--safe-bottom));}
.mine-topbar{
  display:flex;align-items:center;justify-content:flex-start;gap:2px;
  min-height:48px;padding:calc(8px + var(--safe-top)) 0 2px;
}
.mine-topbar h1{flex:1;min-width:0;margin:0;font-size:22px;font-weight:750;letter-spacing:-.02em;}
.mine-topbar>.page-head-btn{margin-right:0;}
.mine-hero{margin:8px 0 4px;gap:16px;text-align:left;}
.mine-avatar{
  width:74px;height:74px;font-size:27px;
  border:2px solid color-mix(in srgb,var(--color-primary) 45%,transparent);
  box-shadow:0 10px 26px rgba(0,0,0,.26);
}
.mine-name-row b{font-size:22px;font-weight:750;letter-spacing:-.01em;}
.mine-level{
  padding:3px 9px;border-radius:999px;font-size:11px;font-weight:600;
  background:var(--color-primary-container);color:var(--color-primary);
}
.mine-progress{height:6px;background:color-mix(in srgb,var(--color-foreground) 10%, transparent);}
.mine-progress i{background:linear-gradient(90deg,var(--color-primary),var(--color-secondary));}
.mine-progress-row span{color:var(--color-primary);font-weight:600;}
.mine-hero-info>i{font-size:11.5px;color:var(--color-muted-foreground);}
.mine-page .mine-stats{margin:16px 0 14px;}
.mine-page .mine-stat b{font-size:20px;font-weight:750;}
.mine-points-card{
  border-radius:20px;background:var(--color-surface);
  border:1px solid var(--color-border);
  box-shadow:var(--card-shadow);
  padding:15px 16px;margin-bottom:18px;
}
.mine-points-ico{background:var(--color-tertiary-container);color:var(--color-on-tertiary-container);}
.mine-grid{gap:20px 6px;margin:0 0 18px;}
.mine-grid-item svg{width:26px;height:26px;color:var(--color-primary);}
.mine-grid-item span{font-size:12px;color:var(--color-foreground);}
.mine-invite{
  border-radius:20px;background:var(--color-surface);
  border:1px solid var(--color-border);
  box-shadow:var(--card-shadow);
  padding:16px;
}
.mine-invite-ico{background:var(--color-secondary-soft,var(--color-primary-soft));color:var(--color-secondary);}

/* ---------- 13. 二级页：个人资料 / 邀请 / 等级 ---------- */
.pf-page{padding-bottom:calc(28px + var(--safe-bottom));}
.pf-avatar{box-shadow:0 12px 30px rgba(0,0,0,.28);border:3px solid color-mix(in srgb,var(--color-primary) 35%,transparent);}
.pf-avatar-badge{box-shadow:0 4px 12px rgba(0,0,0,.25);}
.pf-points-card{
  border-radius:20px;background:var(--color-surface);
  border:1px solid var(--color-border);box-shadow:var(--card-shadow);
}
.pf-list{
  background:var(--color-surface);
  border:1px solid var(--color-border);
  border-radius:20px;
  box-shadow:var(--card-shadow);
  overflow:hidden;
}
.pf-row{padding:14px 14px;}
.pf-row:last-child{border-bottom:0;}
.pf-reset-btn,.pf-logout-btn{border-radius:16px;min-height:46px;}
.iv-card,.iv-hero{border-radius:20px;}
.iv-btn{border-radius:14px;min-height:42px;}
.lv-page .lv-card,.lv-page .lv-hero{border-radius:20px;}

/* ---------- 14. 钱包 / 签到（sh-*） ---------- */
.sh-page .sh-hero,.sh-page .sh-panel,.sh-page .sh-my-cards,
.sh-page .sh-ck-board,.sh-page .sh-ck-note,.sh-page .sh-soon{
  border-radius:22px;
}
.sh-pay-btn{border-radius:16px;min-height:48px;font-weight:700;}
.sh-panel-title{font-size:15px;font-weight:700;}
.sh-head h1{letter-spacing:-.02em;}

/* ---------- 15. 弹层：App 底部 Sheet ---------- */
.sheet-scrim{background:rgba(4,7,14,.60);backdrop-filter:blur(3px);}
.sheet{
  border-radius:28px 28px 0 0;
  background:color-mix(in srgb,var(--color-surface) 97%,transparent);
  border:1px solid var(--color-border);
  border-bottom:0;
  box-shadow:none;
  backdrop-filter:blur(24px);
}
.sheet.is-open{box-shadow:0 -22px 60px rgba(0,0,0,.5);}
.sheet-head{
  position:relative;
  padding:20px 18px 12px;
  border-bottom:1px solid var(--color-border);
}
.sheet-head::before{
  content:"";position:absolute;left:50%;top:8px;transform:translateX(-50%);
  width:36px;height:4px;border-radius:999px;
  background:var(--color-border-strong);
}
.sheet-head h3{font-size:16px;font-weight:700;}
.sheet-body{padding:16px 18px calc(20px + var(--safe-bottom));}
.sheet-sub{margin:2px 0 8px;font-size:12px;font-weight:700;letter-spacing:.06em;color:var(--color-subtle-foreground);text-transform:none;}
.sheet-note{font-size:12px;line-height:1.6;color:var(--color-subtle-foreground);}
.setting-row{min-height:52px;padding:10px 2px;border-bottom:1px solid var(--color-border);}
.setting-row>span:first-child{font-size:14px;color:var(--color-muted-foreground);}
.setting-val{font-size:13.5px;color:var(--color-foreground);}
.switch{width:44px;height:26px;}
.switch i::after{width:20px;height:20px;top:3px;left:3px;}
.switch input:checked + i::after{transform:translateX(18px);}

/* ---------- 16. 侧边抽屉：App DrawerContent ---------- */
.ex-drawer{width:min(84vw,316px);border-radius:0 28px 28px 0;box-shadow:var(--shadow-lg);}
.ex-drawer-profile{
  display:grid;grid-template-columns:56px minmax(0,1fr);
  grid-template-areas:"avatar name" "avatar pts";
  column-gap:12px;row-gap:6px;align-items:center;
  padding:20px 40px 18px 16px;
}
.ex-drawer-avatar{grid-area:avatar;width:56px;height:56px;font-size:22px;box-shadow:0 8px 20px rgba(0,0,0,.25);}
.ex-drawer-name{grid-area:name;align-self:end;justify-self:start;margin:0;padding:0;text-align:left;font-size:18px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ex-drawer-pts{
  grid-area:pts;align-self:start;
  display:inline-flex;align-items:center;gap:6px;justify-self:start;
  padding:4px 10px;border-radius:999px;
  background:linear-gradient(90deg,color-mix(in srgb,var(--color-primary-container) 90%,transparent),color-mix(in srgb,var(--color-tertiary-container) 70%,transparent));
  color:var(--color-on-primary-container);font-size:12px;font-weight:600;
}
.ex-drawer-pts .cur{opacity:.8;font-weight:400;}
.ex-drawer-menu{gap:2px;padding:0 10px;}
.ex-drawer-item{height:48px;gap:14px;padding:0 12px;font-size:15px;border-radius:14px;font-weight:600;}
.ex-drawer-item .di{color:var(--color-primary);}
.ex-drawer-item.danger{color:var(--color-destructive);}
.ex-drawer-item.danger .di{color:var(--color-destructive);}
.ex-drawer-close{background:var(--color-surface-2);border-radius:12px;}

/* ---------- 17. 登录页 ---------- */
.auth-card{
  border-radius:28px;
  padding:26px 22px 20px;
  background:color-mix(in srgb,var(--color-surface) 92%,transparent);
  border:1px solid var(--color-border);
  box-shadow:var(--shadow-lg);
  backdrop-filter:blur(24px);
}
.auth-card .brand h1{font-size:23px;font-weight:750;letter-spacing:-.01em;}
.auth-card .brand p{font-size:12.5px;color:var(--color-muted-foreground);}
.seg-tabs{border-radius:999px;padding:4px;background:var(--color-surface-2);}
.seg-tab{border-radius:999px;height:36px;font-size:14px;}
.seg-tab.is-active{color:var(--color-foreground);}
.seg-indicator{border-radius:999px;background:var(--color-surface);box-shadow:0 2px 8px rgba(0,0,0,.22);}
html[data-theme="light"] .seg-tab.is-active{color:var(--color-primary);}

/* ---------- 18. 移动端间距对齐（与 16px 页头对齐） ---------- */
@media (max-width:860px){
  .ex-block{padding-left:var(--gutter);padding-right:var(--gutter);}
  .official-row{margin-left:calc(-1 * var(--gutter));margin-right:calc(-1 * var(--gutter));padding-left:var(--gutter);padding-right:var(--gutter);}
  .cr-pane{padding-left:var(--gutter);padding-right:var(--gutter);}
  .rec-search,.side-search.rec-search{margin-left:var(--gutter);margin-right:var(--gutter);}
  .rec-list{padding-left:var(--gutter);padding-right:var(--gutter);}
  body.chatroom-open .chatroom-page{padding-bottom:0;}
  body.chatroom-open .page-scroll{padding-bottom:0;}
}

/* ---------- 19. 桌面端：左侧栏与内容宽度 ---------- */
@media (min-width:861px){
  .page-scroll{max-width:1180px;margin:0 auto;width:100%;padding:18px 30px 46px;}
  .ex-head{padding-left:0;padding-right:0;}
  .ex-head-top{min-height:52px;}
  .ex-head-top h1{font-size:24px;}
  .desk-side{width:264px;padding:20px 16px 16px;}
  .desk-brand img{border-radius:12px;}
  .desk-new{
    height:44px;border-radius:14px;
    background:var(--color-primary);color:var(--color-on-primary);
    box-shadow:0 8px 20px color-mix(in srgb,var(--color-primary) 22%,transparent);
  }
  .desk-match{
    height:44px;border-radius:14px;
    background:linear-gradient(135deg,var(--color-primary),var(--color-tertiary));
    color:#fff;box-shadow:0 10px 22px color-mix(in srgb,var(--color-primary) 30%,transparent);
  }
  .desk-nav-item{min-height:42px;border-radius:13px;font-size:14px;}
  .desk-nav-item.is-active{background:var(--color-primary-container);color:var(--color-primary);}
  .desk-user{border-radius:16px;background:var(--color-surface-2);}
  .desk-actions button{border-radius:11px;height:36px;}
  .main-view{padding-left:264px;}
  .tabbar{display:none!important;}
  .chat-head,.mode-bar,.stream,.composer-wrap{max-width:1040px;}
  .mine-page{max-width:760px;margin:0 auto;}
  .pf-page{max-width:720px;margin:0 auto;}
  .rec-list{max-width:820px;margin:0 auto;}
}

/* ---------- 18. “开发中”页：专业图标替代自绘插画 ---------- */
.sh-soon{padding-top:calc(var(--space-5) + 12px);}
.sh-soon-icon{
  width:104px;height:104px;border-radius:30px;display:grid;place-items:center;
  background:linear-gradient(135deg,
    var(--color-primary-soft),
    color-mix(in srgb,var(--color-accent) 18%,var(--color-primary-soft)));
  color:var(--color-primary);
}
.sh-soon-icon i{font-size:46px;line-height:1;}

/* ---------- 19. 随机匹配：心形图标 ---------- */
.jh-match-hero i{font-size:44px;line-height:1;}
.jh-pulse span i{font-size:32px;line-height:1;}

/* ---------- 20. 功能按钮统一使用图标字体 ---------- */
.jh-icon-btn i{font-size:18px;line-height:1;}
.agent-emoji-btn i,.agent-img-btn i,.agent-chat-menu i{font-size:18px;line-height:1;}

/* ---------- 21. 聊天室列表：紧凑横向卡片 ---------- */
.chatroom-head{
  display:flex;align-items:center;gap:10px;
  height:auto!important;min-height:0!important;
  padding:calc(12px + var(--safe-top)) var(--gutter) 10px!important;
  border-bottom:0!important;background:transparent!important;backdrop-filter:none!important;
}
.chatroom-head>div{flex:1;min-width:0;}
.chatroom-head h1{font-size:19px!important;font-weight:700!important;letter-spacing:0!important;margin:0!important;}
.chatroom-head p{font-size:12px!important;margin:2px 0 0!important;color:var(--color-muted-foreground)!important;}
.chatroom-head .icon-btn{
  width:36px!important;height:36px!important;border-radius:12px!important;font-size:20px!important;
  background:var(--color-surface)!important;border:1px solid var(--color-border)!important;
}
.chatroom-list{
  display:flex!important;flex-direction:column!important;gap:10px!important;
  padding:8px var(--gutter) 0!important;background:transparent!important;align-content:stretch!important;
}
.chatroom-card{
  display:flex!important;flex-direction:row!important;align-items:center!important;
  gap:12px!important;width:100%!important;margin:0!important;padding:12px!important;
  text-align:left!important;position:relative;
  background:var(--color-surface)!important;
  border:1px solid var(--color-border)!important;
  border-radius:18px!important;
  box-shadow:none!important;
  transition:background var(--dur-base),border-color var(--dur-base),transform var(--dur-base);
}
.chatroom-card:hover{transform:none!important;border-color:var(--color-border-strong)!important;background:var(--color-surface)!important;}
.chatroom-card:active{transform:scale(.994);background:var(--color-surface-2)!important;}
.chatroom-avatar{width:52px!important;height:52px!important;flex:0 0 52px!important;border-radius:16px!important;font-size:18px!important;}
.chatroom-card-main{flex:1 1 auto!important;min-width:0!important;display:flex!important;flex-direction:column!important;gap:3px!important;}
.chatroom-title-row{display:flex!important;align-items:baseline!important;gap:8px!important;min-width:0;}
.chatroom-title-row b{flex:1 1 auto!important;min-width:0;font-size:15px!important;font-weight:600!important;color:var(--color-foreground);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.chatroom-title-row time{flex:none;font-size:11px;color:var(--color-subtle-foreground);}
.chatroom-card-main .chatroom-desc{font-size:12px!important;color:var(--color-muted-foreground)!important;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.chatroom-card-main .chatroom-last{font-size:11.5px!important;color:var(--color-subtle-foreground)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.chatroom-card-side{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:4px;color:var(--color-subtle-foreground);}
.chatroom-card-side>i{font-size:13px;}
.chatroom-unread{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--color-danger,#e5484d);color:#fff;font-size:11px;font-style:normal;font-weight:600;display:grid;place-items:center;}
.chatroom-at-badge{font-size:10.5px;line-height:1.6;padding:0 6px;border-radius:999px;background:color-mix(in srgb,var(--color-primary) 14%,transparent);color:var(--color-primary);white-space:nowrap;}
.chatroom-empty{padding:48px 24px;text-align:center;color:var(--color-muted-foreground);font-size:13px;}

/* 覆盖浅色主题里遗留的硬编码阴影/背景 */
html[data-theme="light"] .chatroom-card,
html[data-theme="dark"] .chatroom-card{
  background:var(--color-surface)!important;
  border-color:var(--color-border)!important;
  box-shadow:none!important;
}
html[data-theme="light"] .chatroom-list,
html[data-theme="dark"] .chatroom-list{background:transparent!important;}
.chatroom-title-row .chatroom-unread{flex:none;margin-left:2px;}

/* ---------- 品牌 Logo：随主题自动切换（深色底用白字版，浅色底用黑字版） ---------- */
.brand-mark{
  display:block;width:100%;height:100%;
  background:url("/icons/logo-white.png") center/contain no-repeat;
}
html[data-theme="light"] .brand-mark{background-image:url("/icons/logo-black.png");}
.boot-screen .boot-mark{width:132px;height:132px;margin-bottom:4px;}
.brand-logo .brand-mark{width:100%;height:100%;}
.desk-brand .desk-mark{width:38px;height:38px;flex:0 0 38px;}
