/* 随机匹配：选性别 → 排队 → 聊天 */
.jh-match{display:flex;flex-direction:column;align-items:center;padding:10px 4px 6px;}
.jh-match-hero{width:96px;height:96px;border-radius:50%;display:grid;place-items:center;font-size:38px;color:#fff;
  background:radial-gradient(circle at 30% 30%,rgba(157,178,255,.55),rgba(245,166,214,.35));}
.jh-match-title{margin-top:16px;font-size:17px;font-weight:700;color:var(--color-foreground,#edf1ff);}
.jh-match-desc{margin-top:8px;font-size:12.5px;line-height:1.7;text-align:center;color:var(--color-muted-foreground,#a6aec8);}
.jh-gender{display:flex;gap:10px;margin-top:20px;width:100%;}
.jh-gender-item{flex:1;height:40px;border-radius:14px;border:1px solid rgba(86,100,140,.42);cursor:pointer;
  background:rgba(157,178,255,.08);color:var(--color-muted-foreground,#a6aec8);font-size:13px;font-weight:600;}
.jh-gender-item.is-on{background:rgba(157,178,255,.24);color:var(--color-primary,#9db2ff);border-color:rgba(157,178,255,.5);}
.jh-match-hint{margin-top:12px;font-size:12px;color:var(--color-muted-foreground,#a6aec8);}
.jh-match-hint b{color:var(--color-primary,#9db2ff);}
.jh-match-btn{margin-top:20px;width:100%;height:46px;flex:0 0 auto;}

.jh-pulse{margin-top:26px;width:120px;height:120px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:34px;
  background:radial-gradient(circle,rgba(157,178,255,.45),rgba(245,166,214,.2));
  animation:jhPulse 1.6s ease-in-out infinite;}
@keyframes jhPulse{0%,100%{transform:scale(.92);opacity:.85}50%{transform:scale(1.06);opacity:1}}

.jh-match-chat{display:flex;flex-direction:column;gap:8px;}
.jh-peer{display:flex;align-items:center;gap:10px;}
.jh-peer-main{flex:1;min-width:0;}
.jh-peer-name{font-size:14px;font-weight:600;color:var(--color-foreground,#edf1ff);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.jh-peer-sub{margin-top:2px;font-size:11.5px;color:var(--color-muted-foreground,#a6aec8);}
.jh-mini{flex:0 0 auto;height:32px;padding:0 12px;font-size:12px;border-radius:16px;}
.jh-ended{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:12px;font-size:12px;
  background:rgba(255,107,107,.14);color:#ff9b9b;}
.jh-link{border:none;background:none;color:var(--color-primary,#9db2ff);font-size:12px;cursor:pointer;text-decoration:underline;}

.jh-icon-btn{flex:0 0 36px;height:36px;border-radius:12px;border:none;cursor:pointer;font-size:16px;
  background:rgba(157,178,255,.12);color:var(--color-foreground,#edf1ff);}

/* ---------------- 随机匹配聊天：与聊天室同一套布局与样式 ---------------- */
.jh-match-chat{display:flex;flex-direction:column;gap:10px;min-height:0;flex:1;}
.jh-match-msgs{flex:1 1 auto;min-height:200px;max-height:52vh;padding:4px 2px;gap:12px;overflow-y:auto;overscroll-behavior:contain;}
.jh-match-chat .chatroom-composer{padding:8px;gap:6px;border:1px solid var(--color-border);border-radius:14px;background:var(--color-surface-2);}
.jh-match-chat .chatroom-rich-input{min-height:38px;max-height:100px;padding:9px 12px;border-radius:10px;background:var(--color-surface);border:1px solid var(--color-border);}
.jh-match-chat .chatroom-composer.voice-mode .chatroom-rich-input{display:none;}
.jh-match-chat .chatroom-composer.voice-mode .chatroom-hold{display:block;}
.jh-match-chat .chatroom-emoji-panel{left:8px;right:8px;bottom:58px;}
.jh-match-chat .cm-text .jh-msg-img{max-width:min(200px,100%);max-height:260px;width:auto;height:auto;border-radius:12px;display:block;}
.jh-match-chat .cm-text.is-plain{padding:0;background:none!important;}
.jh-match-chat .cm-text .jh-voice{padding:8px 12px;}
.jh-match-chat .jh-empty{flex:1;display:grid;place-items:center;padding:24px 0;}

/* ---------- 随机匹配独立页面（/match） ---------- */
body.jh-match-page .jh-sheet-host{align-items:stretch;z-index:120;}
body.jh-match-page .jh-sheet-mask{display:none;}
body.jh-match-page .jh-sheet-card{
  width:100%;max-width:none;height:100dvh;max-height:100dvh;border:0;border-radius:0;
  background:var(--color-background);padding-top:env(safe-area-inset-top,0px);
}
body.jh-match-page .jh-sheet-head{
  flex:0 0 auto;padding:10px;border-bottom:1px solid var(--color-border);
  background:var(--color-surface);
}
body.jh-match-page .jh-back{
  display:grid;place-items:center;width:40px;height:40px;border:0;background:none;
  color:var(--color-foreground);border-radius:12px;cursor:pointer;
}
body.jh-match-page .jh-back:active{background:var(--color-surface-2);}
body.jh-match-page .jh-sheet-head b{font-size:18px;font-weight:750;}
body.jh-match-page .jh-head-pad{width:40px;height:40px;}
body.jh-match-page .jh-sheet-body{
  flex:1 1 auto;min-height:0;display:flex;flex-direction:column;
  padding:16px 16px calc(16px + env(safe-area-inset-bottom,0px));
}
body.jh-match-page .jh-match{display:flex;flex-direction:column;flex:1;min-height:0;justify-content:center;}
body.jh-match-page .jh-match-chat{flex:1;min-height:0;}
body.jh-match-page .jh-match-msgs{max-height:none;min-height:0;}
body.jh-match-page .tabbar{display:none!important;}
@media (min-width:861px){
  body.jh-match-page .jh-sheet-card{max-width:680px;margin:0 auto;border-left:1px solid var(--color-border);border-right:1px solid var(--color-border);}
}
