/* チャラオAI マッチング プロトタイプ 共通スタイル（LINE風） */

:root {
  --green: #06c755;
  --green-dark: #05a648;
  --bubble-me: #8de049;
  --chat-bg: #7494c0;
  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #222428;
  --sub: #7a8087;
  --line: #e4e7ec;
  --accent: #5b6ef5;
  --danger: #e5484d;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* --- topbar --- */
.topbar {
  background: #1f2733;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar .brand { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.topbar .brand span { color: var(--green); }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a {
  color: #b8c0cc;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.topbar nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.topbar nav a.active { background: rgba(6, 199, 85, 0.18); color: #6ee7a0; font-weight: 600; }
.topbar .user { font-size: 12px; color: #b8c0cc; }
.topbar .logout {
  background: none; border: 1px solid #3a4657; color: #b8c0cc;
  border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12px;
}
.topbar .logout:hover { border-color: #6a7688; color: #fff; }

.container { max-width: 1100px; margin: 20px auto; padding: 0 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

/* --- card --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 18px;
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 4px; font-size: 15px; }
.card .desc { color: var(--sub); font-size: 12px; margin: 0 0 14px; }

/* --- buttons / inputs --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--green); color: #fff; border: none;
  border-radius: 10px; padding: 9px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, opacity 0.15s;
}
.btn:hover { background: var(--green-dark); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.secondary:hover { background: #f6f7f9; }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: #4a5ce4; }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #f3c4c6; }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

input[type="text"], input[type="password"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--green); }

/* --- chat --- */
.chat-wrap {
  background: var(--chat-bg);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: 620px;
  overflow: hidden;
}
.chat-header {
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.chat-area { flex: 1; overflow-y: auto; padding: 14px 14px 8px; }
.msg-row { display: flex; margin-bottom: 10px; align-items: flex-end; gap: 8px; }
.msg-row.me { flex-direction: row-reverse; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px; flex-shrink: 0;
  position: relative;
}
.avatar.has-img { overflow: visible; }
.avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover; display: block;
}
.avatar.twin::after {
  content: "AI";
  position: absolute; bottom: -4px; right: -6px;
  background: #1f2733; color: #6ee7a0;
  font-size: 8px; font-weight: 700; padding: 1px 4px; border-radius: 6px;
  border: 1px solid #6ee7a0;
}
.msg-body { max-width: 68%; }
.msg-name { font-size: 11px; color: rgba(255, 255, 255, 0.9); margin: 0 0 3px 4px; }
.bubble {
  background: #fff;
  border-radius: 16px;
  padding: 9px 13px;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}
.msg-row.me .bubble { background: var(--bubble-me); }
.msg-time { font-size: 10px; color: rgba(255, 255, 255, 0.75); margin: 0 6px; flex-shrink: 0; }
.msg-system {
  text-align: center; margin: 12px 0;
}
.msg-system span {
  background: rgba(0, 0, 0, 0.25); color: #fff;
  font-size: 11px; padding: 4px 12px; border-radius: 12px;
}
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i {
  width: 6px; height: 6px; background: #b9bec7; border-radius: 50%;
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.chat-input {
  display: flex; gap: 8px; padding: 10px;
  background: #fff; border-top: 1px solid var(--line);
}
.chat-input textarea {
  flex: 1; resize: none; height: 42px; padding: 10px 12px; border-radius: 21px;
}
.chat-input .btn { border-radius: 21px; }

/* --- profile panel --- */
.panel-section { margin-bottom: 16px; }
.panel-section h3 { font-size: 12px; color: var(--sub); margin: 0 0 8px; letter-spacing: 0.04em; }
.coverage-bar {
  height: 8px; background: #edf0f4; border-radius: 4px; overflow: hidden;
}
.coverage-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #4ad98a); border-radius: 4px; transition: width 0.6s; }
.target-dim {
  background: #eef1ff; color: var(--accent);
  border-radius: 10px; padding: 8px 12px; font-size: 12px;
}
.slot-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.slot-item {
  background: #f7f8fa; border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 10px; font-size: 12px;
  animation: slotIn 0.4s ease;
}
@keyframes slotIn { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.slot-item .quote { color: var(--sub); font-size: 11px; margin-top: 2px; }
.kind-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  border-radius: 6px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px;
}
.kind-belief { background: #e8ebff; color: #4a5ce4; }
.kind-desire { background: #ffe9ec; color: #d6455c; }
.kind-preference { background: #e2f6ea; color: #0f9d58; }
.kind-episode { background: #fff3dc; color: #b26a00; }
.kind-style { background: #f0e6fa; color: #8b3fd1; }
.kind-value { background: #e0f2fe; color: #0369a1; }

/* --- スマホ表示（PWA はホーム画面から縦持ちで使われる前提） --- */
/* iPhone のノッチ・ホームバー（viewport-fit=cover を各HTMLで指定済み） */
.topbar { padding-top: env(safe-area-inset-top); height: auto; min-height: 52px; }
.chat-input { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

@media (max-width: 640px) {
  .topbar { min-height: 48px; padding-left: 12px; padding-right: 12px; gap: 10px; }
  .topbar .brand { font-size: 13px; white-space: nowrap; }
  .topbar .brand small { display: none; }
  .topbar nav { gap: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
  .topbar .user { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .logout { padding: 4px 8px; font-size: 11px; white-space: nowrap; }

  .container { margin: 14px auto; padding: 0 12px; }
  .card { padding: 14px; }
  .card h2 { font-size: 14px; }

  /* インタビュー画面: 左チャット + 右パネルの2カラムを縦積みにする（HTML側のインラインgridを上書き） */
  #main-grid { grid-template-columns: 1fr !important; }
  .chat-wrap { height: calc(100vh - 250px); min-height: 360px; }
  .msg-body { max-width: 80%; }

  /* シナリオカードは横2枚だと文字が潰れるので縦積み・全幅に */
  .card-row { grid-template-columns: 1fr !important; margin-left: 0 !important; max-width: 100% !important; }
  .quick-replies { margin-left: 0; }
  .quick-reply { font-size: 14px; padding: 8px 14px; }

  /* iOS Safari は font-size 16px 未満の入力欄にフォーカスすると勝手に拡大する。PWAでは特に鬱陶しいので16pxに固定 */
  input[type="text"], input[type="password"], textarea { font-size: 16px; }
  .chat-input textarea { height: 46px; }

  /* キャラ選択モーダル */
  .modal { width: min(560px, 94vw); max-height: 90vh; }
  .modal-body { padding: 16px 14px 6px; }
  .modal-actions { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .char-card .char-img { width: 66px; height: 66px; }
  .char-card .char-tagline { min-height: 0; }
  .person-row { flex-wrap: wrap; }
}

/* --- オフライン表示バー（PWA） --- */
#offline-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: #8a5a21; color: #fff; font-size: 12px; text-align: center;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}

/* --- quick replies（最初の質問への短い答え。タップでそのまま送信） --- */
.quick-replies { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px 44px; }
.quick-reply {
  background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 16px;
  padding: 6px 12px; font-size: 12.5px; font-family: inherit; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.quick-reply:hover { border-color: var(--green); background: #f2fbf5; }
.quick-reply:active { transform: translateY(1px); }

/* --- character cards（インタビュアー選択・他己紹介の顔ぶれ） --- */
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 720px) { .char-grid { grid-template-columns: repeat(2, 1fr); } }
.char-card {
  background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 12px 10px 10px;
  text-align: center; cursor: pointer; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  outline: none;
}
.char-card:hover, .char-card:focus-visible { border-color: #b9c2ce; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.char-card.selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(6,199,85,0.18); }
.char-card .char-img {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 8px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 30px;
}
.char-card .char-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.char-card .char-name { font-weight: 700; font-size: 14px; }
.char-card .char-name small { display: block; font-weight: 500; font-size: 10.5px; color: var(--sub); margin-top: 1px; }
.char-card .char-tagline { font-size: 11.5px; color: var(--sub); line-height: 1.5; margin-top: 6px; min-height: 34px; }
.char-card .char-tags { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.char-card .char-tags span { background: #f1f3f7; color: #4a5260; font-size: 10px; border-radius: 6px; padding: 2px 6px; }
.char-card.compact { padding: 8px 6px; }
.char-card.compact .char-img { width: 56px; height: 56px; font-size: 20px; }
.char-card.compact .char-name { font-size: 12px; }
.mode-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.mode-toggle label { padding: 6px 12px; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.mode-toggle label + label { border-left: 1px solid var(--line); }
.mode-toggle input { accent-color: var(--green); }
.mode-toggle label.on { background: #e2f6ea; color: #0f7a46; font-weight: 700; }
.badge-mode { background: #fff3dc; color: #b26a00; font-size: 10px; font-weight: 700; border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: 1px; }

/* --- candidates / lists --- */
.person-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.person-row:last-child { border-bottom: none; }
.person-row .info { flex: 1; min-width: 0; }
.person-row .name { font-weight: 700; font-size: 14px; }
.person-row .tagline { color: var(--sub); font-size: 12px; margin-top: 2px; }
.badge-seed {
  background: #eef1ff; color: var(--accent); font-size: 10px; font-weight: 700;
  border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: 1px;
}
.score-pill {
  font-weight: 800; font-size: 15px; color: var(--green-dark);
  min-width: 52px; text-align: center;
}
.score-pill small { display: block; font-size: 9px; color: var(--sub); font-weight: 600; }

/* --- meters --- */
.axis-row { margin-bottom: 12px; }
.axis-row .axis-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.axis-row .axis-head b { font-size: 13px; }
.axis-bar { height: 10px; background: #edf0f4; border-radius: 5px; overflow: hidden; }
.axis-bar i { display: block; height: 100%; background: linear-gradient(90deg, #5b6ef5, #8b9cff); border-radius: 5px; transition: width 0.9s ease; }
.axis-note { font-size: 11px; color: var(--sub); margin-top: 4px; }
.axis-note .q { color: #4a5ce4; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: #e2f6ea; color: #0f7a46; font-size: 12px; font-weight: 600;
  border-radius: 20px; padding: 5px 12px;
}
.chip.diff { background: #fff0f0; color: #c04747; }

/* --- gauge --- */
.gauge-wrap { display: flex; flex-direction: column; align-items: center; }
.gauge-score { font-size: 40px; font-weight: 800; fill: var(--text); }
.gauge-label { font-size: 11px; fill: var(--sub); }

/* --- group support meter --- */
.support-meter { display: flex; align-items: center; gap: 10px; }
.support-meter .bar { flex: 1; height: 10px; background: rgba(255,255,255,0.25); border-radius: 5px; overflow: hidden; }
.support-meter .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd76b, #ff9f43); transition: width 0.8s; }
.phase-label {
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,0.25); border-radius: 10px; padding: 3px 10px;
}
.member-avatars { display: flex; gap: 6px; }
.member-avatars .avatar { width: 30px; height: 30px; font-size: 12px; border: 2px solid rgba(255,255,255,0.7); transition: opacity 0.8s; }

/* --- modal --- */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 20, 30, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: #fff; border-radius: 16px;
  width: min(560px, 92vw); max-height: 86vh;
  /* 本文だけスクロールし、操作ボタン（.modal-actions）は常に見える位置に固定する。
     スマホでは項目が画面に収まらないので、これが無いと送信ボタンまでスクロールが必要になる */
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 24px 24px 8px; }
.modal-actions {
  flex-shrink: 0; display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap;
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: #fff;
}
.modal h2 { margin: 0 0 6px; font-size: 17px; }

.hidden { display: none !important; }

/* --- questionnaire (GT 自己申告) --- */
.q-lead {
  font-size: 12.5px; line-height: 1.7; color: var(--text);
  background: #f7f8fa; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; white-space: pre-line;
}
/* 共通の問いは本文スクロール中も見えるよう上に貼り付ける。
   sticky の top:0 はスクロール枠の**パディングボックス**基準なので、本文の上パディングが残っていると
   その隙間から前の項目が覗く。GTモーダルだけ上パディングを外し、代わりに .q-lead に余白を持たせる */
#gt-modal .modal-body { padding-top: 0; }
.q-lead { margin-top: 16px; }
.q-question {
  position: sticky; top: 0; z-index: 1; background: #fff;
  font-size: 13px; font-weight: 700; padding: 10px 0 6px; margin: 0;
  border-bottom: 1px solid var(--line);
}
.q-item { padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.q-item .q-text { font-size: 14px; line-height: 1.65; margin-bottom: 8px; }
.q-item .q-num {
  display: inline-block; min-width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 11px; background: #eef1f5; color: var(--sub); font-size: 11px; font-weight: 700;
  margin-right: 8px; vertical-align: 1px;
}
.q-item.answered .q-num { background: var(--green); color: #fff; }
.q-scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.q-opt {
  appearance: none; -webkit-appearance: none; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 2px; cursor: pointer; font-family: inherit; color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; min-height: 54px;
}
.q-opt:hover { background: #f6f7f9; }
.q-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.q-opt.on { background: var(--green); border-color: var(--green); color: #fff; }
.q-opt .q-opt-num { font-size: 12px; font-weight: 700; }
.q-opt .q-opt-label { font-size: 10px; line-height: 1.25; text-align: center; color: var(--sub); }
.q-opt.on .q-opt-label { color: #fff; }
@media (max-width: 640px) {
  .q-item .q-text { font-size: 14.5px; }
  .q-opt { min-height: 58px; padding: 6px 1px; }
  .q-opt .q-opt-label { font-size: 9.5px; }
}

/* --- stars --- */
.stars { display: inline-flex; gap: 3px; font-size: 22px; cursor: pointer; user-select: none; }
.stars span { color: #d5dae2; transition: color 0.1s; }
.stars span.on { color: #ffb400; }

/* --- toast --- */
#toast-box { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #1f2733; color: #fff; font-size: 12.5px;
  border-radius: 10px; padding: 10px 14px; max-width: 320px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  animation: toastIn 0.3s ease;
}
.toast b { color: #6ee7a0; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- overlay (judge演出) --- */
.judge-overlay {
  position: fixed; inset: 0; background: rgba(15, 20, 30, 0.82);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 150; color: #fff; gap: 18px;
}
.judge-overlay .big { font-size: 19px; font-weight: 700; }
.judge-overlay .count { font-size: 13px; color: #9fb0c8; font-variant-numeric: tabular-nums; }
.judge-overlay .spin {
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.15); border-top-color: var(--green);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- login --- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1f2733 0%, #2c3e50 60%, #0f7a46 130%);
}
.login-card {
  background: #fff; border-radius: 20px; padding: 34px; width: min(400px, 92vw);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.login-card h1 { font-size: 20px; margin: 0 0 2px; }
.login-card h1 span { color: var(--green); }
.login-card .sub { color: var(--sub); font-size: 12px; margin-bottom: 22px; }
.login-card label { display: block; font-size: 12px; font-weight: 600; margin: 14px 0 6px; }
.error-text { color: var(--danger); font-size: 12px; margin-top: 10px; min-height: 16px; }

.section-title { font-size: 16px; font-weight: 700; margin: 26px 0 12px; }
.muted { color: var(--sub); font-size: 12px; }
.vs-head { display: flex; align-items: center; justify-content: center; gap: 26px; padding: 10px 0 16px; }
.vs-head .p { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; }
.vs-head .p .avatar { width: 54px; height: 54px; font-size: 22px; }
.vs-head .vs { font-size: 13px; font-weight: 800; color: var(--sub); }

/* --- presence / notifications --- */
/* トップバー「ホーム」の未読バッジ（common.js の renderUnreadBadge が付け外しする） */
.nav-badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800;
  border-radius: 9px; padding: 0 5px; margin-left: 6px; vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}
/* 🔔 通知許可ボタン（許可が未決のときだけ common.js が表示する） */
.topbar .bell { white-space: nowrap; }
/* 相手のオンライン/在室ドット: on=在室中 / away=オンライン（別の画面） / off=オフライン */
.presence-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #b8c0cc; vertical-align: 0; margin-right: 4px; flex-shrink: 0;
}
.presence-dot.on { background: #06c755; box-shadow: 0 0 0 2px rgba(6, 199, 85, 0.22); }
.presence-dot.away { background: #f5a623; }
.presence-dot.off { background: #b8c0cc; }
/* ルーム一覧の未読数（赤丸） */
.unread-badge {
  display: inline-block; min-width: 20px; height: 20px; line-height: 20px; text-align: center;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 10px; padding: 0 6px; margin-left: 8px; vertical-align: 2px;
  font-variant-numeric: tabular-nums;
}
/* 相手がいまその部屋にいる行は強調（背景色）。人が待っている部屋を一覧で一目で拾えるように */
.room-row { border-radius: 10px; transition: background 0.3s; }
.room-row.partner-here { background: #f0fbf4; border-bottom-color: #cdeeda; box-shadow: inset 3px 0 0 var(--green); padding-left: 10px; }
/* 相手が「もう一方の部屋」にいるときの案内バナー（group.html）。通常バナーより暖色で強く */
#room-banner.strong { background: #fff1e8; border-bottom-color: #f5c6a5; color: #8a3b00; font-weight: 600; }
#room-banner.strong .btn { background: #e0641b; }
#room-banner.strong .btn:hover { background: #c5540f; }
@media (max-width: 640px) {
  .nav-badge { min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; margin-left: 4px; }
  .topbar .bell { padding: 4px 6px; font-size: 11px; }
  .room-row.partner-here { padding-left: 8px; }
}
