/* =========================================================================
 * ui-v2.css — UI v2(2026-11-10・docs/ui-design-rules.md)
 *
 * 「ドット絵の世界」と「使う道具」を分ける。道具(メニュー・ウィンドウ・設定)は白を基調にする。
 * 色・角丸はここの --co-* を使う。旧来の --bg 系の変数もここで白の値へ置き換え、
 * 既存の画面をまとめて新しい見た目へ寄せる(style.css より後に読む)。
 * ========================================================================= */
:root {
  --co-primary: #6c5ce7;
  --co-primary-hover: #5b4bd6;
  --co-primary-weak: #f1efff;
  --co-primary-line: #dcd6ff;
  --co-accent: #ffd166;
  --co-accent-weak: #fff6dd;
  --co-accent-ink: #8a5a00;
  --co-bg: #ffffff;
  --co-surface: #f7f7fb;
  --co-surface-2: #f1f1f7;
  --co-line: #ebebf2;
  --co-text: #1f1b2e;
  --co-text-2: #4a4660;
  --co-muted: #7b7791;
  --co-success: #12a150;
  --co-success-weak: #e8f8ef;
  --co-danger: #e5484d;
  --co-danger-weak: #fdecec;
  --co-info: #2563eb;
  --co-info-weak: #e8f0ff;
  --co-radius-sm: 8px;
  --co-radius: 12px;
  --co-radius-lg: 16px;
  --co-radius-win: 20px;
  --co-shadow-sm: 0 1px 2px rgba(31, 27, 46, .06);
  --co-shadow: 0 4px 16px rgba(31, 27, 46, .08);
  --co-shadow-lg: 0 16px 40px rgba(31, 27, 46, .16);
  --co-font: "Noto Sans JP", "M PLUS 1p", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --co-nav-w: 240px;
  --co-nav-w-collapsed: 72px;
  --co-panel-w: 320px;
  --co-header-h: 60px;   /* 全画面共通のヘッダーの高さ(スマホは下で 56px) */
  --co-room-bg: #000000; /* ルームの外側(描画領域の余白)。キャンバスの外側の塗り(game.js ROOM_OUTSIDE_BG)と同じ値 */
  /* 区分の札(参加者一覧とメンション候補で共通・白文字とのコントラスト比 4.5:1 以上) */
  --co-role-self: #5b3fd1;   /* あなた   6.8:1 */
  --co-role-owner: #a34d00;  /* オーナー 5.8:1 */
  --co-role-user: #1f5fbf;   /* ユーザー・メンバー 6.1:1 */
  --co-role-admin: #0f766e;  /* 管理者   5.5:1 */
  --co-role-npc: #475467;    /* NPC      7.7:1 */
  --co-role-guest: #7a4a2c;  /* ゲスト   7.4:1 */

  /* 旧来の変数を白の値へ(既存の部品をまとめて新しい見た目へ寄せる) */
  --bg: #ffffff;
  --bg-panel: #ffffff;
  --bg-card: #f7f7fb;
  --border: #ebebf2;
  --text: #1f1b2e;
  --text-dim: #7b7791;
  --primary: #6c5ce7;
  --primary-hover: #5b4bd6;
  --accent: #ffd166;
  --danger: #e5484d;
  --green: #12a150;
  --font-pixel: var(--co-font);
  --font-body: var(--co-font);
}
body { background: var(--co-bg); color: var(--co-text); font-family: var(--co-font); -webkit-font-smoothing: antialiased; }
.co-ic { width: 20px; height: 20px; flex: none; }

/* ---------- ボタン(既存の .btn を新しい見た目へ) ---------- */
.btn { font-family: var(--co-font); font-weight: 600; border: 0; border-radius: 10px; background: var(--co-surface-2); color: var(--co-text-2);
  box-shadow: none; padding: 9px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.btn:hover { background: #e7e6f0; }
.btn:active { transform: none; }
.btn.primary { background: var(--co-primary); color: #fff; border: 0; box-shadow: 0 1px 2px rgba(108, 92, 231, .35); }
.btn.primary:hover { background: var(--co-primary-hover); }
.btn.primary:active { box-shadow: none; }
.btn.danger { background: var(--co-danger); color: #fff; border: 0; box-shadow: none; }
.btn.danger:hover { background: #d63c41; }
.btn.ghost { background: transparent; color: var(--co-text-2); }
.btn.ghost:hover { background: var(--co-surface-2); }
.btn.small { font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.btn.wide { font-size: 14px; padding: 10px; }
.btn[disabled] { opacity: .45; }
.btn .co-ic { width: 18px; height: 18px; }

/* ---------- 入力欄 ---------- */
form label, .modal label { font-size: 13px; font-weight: 600; color: var(--co-text-2); }
form input, form select, form textarea, .modal input, .modal select, .modal textarea {
  background: #fff; border: 1px solid var(--co-line); border-radius: 10px; color: var(--co-text); font-family: var(--co-font); padding: 9px 12px; }
form input:focus, .modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--co-primary); box-shadow: 0 0 0 3px var(--co-primary-weak); }
.modal input[type="checkbox"], .modal input[type="radio"], form input[type="checkbox"], form input[type="radio"] { display: inline-block; width: auto; margin: 0 6px 0 0; accent-color: var(--co-primary); }
.modal input[type="color"] { padding: 2px; height: 36px; width: 56px; }

/* ---------- ウィンドウ(共通モーダル) ---------- */
.modal-backdrop { background: rgba(31, 27, 46, .42); }
.modal { background: #fff; border: 0; border-radius: var(--co-radius-win); box-shadow: var(--co-shadow-lg); padding: 24px; color: var(--co-text); }
.modal h3 { font-family: var(--co-font); font-size: 18px; font-weight: 700; margin-bottom: 16px; padding-right: 36px; }
.modal-actions { margin-top: 20px; }
.modal-note { color: var(--co-muted); }
.co-modal-x { position: absolute; top: 18px; right: 18px; width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--co-surface-2);
  color: var(--co-text-2); display: grid; place-items: center; cursor: pointer; }
.co-modal-x .co-ic { width: 16px; height: 16px; }
.modal { position: relative; }
/* モーダルの中で hidden を付けた要素は必ず隠す(.modal select { display: block } などが hidden を上書きしていた。
   例: ルームを作成のサイズのカードの下に、隠したはずの選択欄が出ていた) */
.modal [hidden] { display: none !important; }

/* ---------- 知らせ ---------- */
.toast { background: #1f1b2e; color: #fff; border: 0; border-radius: 12px; font-family: var(--co-font); font-weight: 600; box-shadow: var(--co-shadow-lg); }
/* 知らせは文字だけ(押すものは無い)。下の操作バーの上に重なっても、その下のボタンを押せるようにする */
.toast { pointer-events: none; }
/* ルームの中は下に操作バー(.toolbar)があるので、その上に出す */
body:has(#screen-room.active) .toast { bottom: 92px; }
@media (max-width: 860px) { body:has(#screen-room.active) .toast { bottom: 150px; } }
/* 「タップして通話の音声を再生」も下の操作バーの後ろに隠れていた(バーの層が上)。バーの上に出す */
#screen-room .rv-unlock { bottom: 96px; background: var(--co-primary); color: #fff; border: 0; border-radius: 999px; font-family: var(--co-font); font-weight: 700;
  box-shadow: var(--co-shadow-lg); }
@media (max-width: 860px) { #screen-room .rv-unlock { bottom: 154px; } }

/* =========================================================================
 * グローバルメニュー(js/shell.js が描く)
 * ========================================================================= */
#co-nav { display: none; }
body.co-has-shell #co-nav { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: var(--co-nav-w); z-index: 900;
  background: var(--co-surface); border-right: 1px solid var(--co-line); }
body.co-has-shell.co-shell-collapsed #co-nav { width: var(--co-nav-w-collapsed); }
body.co-has-shell .screen.active { margin-left: var(--co-nav-w); }
body.co-has-shell.co-shell-collapsed .screen.active { margin-left: var(--co-nav-w-collapsed); }
body.co-has-shell #screen-login.active, body.co-has-shell .auth-screen.active { margin-left: 0; }
.co-nav-scroll { height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; }
.co-logo { display: flex; align-items: center; height: 44px; padding: 0 6px; margin-bottom: 10px; border: 0; background: none; cursor: pointer; overflow: hidden; flex: none; }
.co-logo img { height: 32px; width: auto; display: block; image-rendering: pixelated; }
.co-shell-collapsed .co-logo { width: 24px; padding: 0; margin: 0 auto 10px; }
.co-shell-collapsed .co-logo img { max-width: none; }
.co-nav-item { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: none; width: 100%;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--co-text-2); cursor: pointer; text-align: left; position: relative; }
.co-nav-item:hover { background: var(--co-surface-2); color: var(--co-text); }
.co-nav-item.is-active { background: var(--co-primary-weak); color: var(--co-primary); }
.co-nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-nav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--co-primary); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; }
.co-nav-chev { width: 16px; height: 16px; color: var(--co-muted); transition: transform .15s; transform: rotate(-90deg); }
.co-nav-acc[aria-expanded="true"] .co-nav-chev { transform: rotate(0deg); }
.co-nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px 32px; }
.co-nav-sub[hidden] { display: none; }
.co-nav-sub .co-nav-item { min-height: 34px; font-size: 13px; font-weight: 500; }
.co-nav-item.is-locked { color: var(--co-muted); }
.co-lock { display: inline-flex; align-items: center; gap: 3px; flex: none; white-space: nowrap; height: 18px; padding: 0 6px; border-radius: 999px;
  background: var(--co-accent-weak); color: var(--co-accent-ink); font-size: 10.5px; font-weight: 800; }
.co-lock .co-ic { width: 11px; height: 11px; }
.co-nav-spacer { flex: 1; min-height: 12px; }
.co-nav-gift { background: var(--co-accent-weak); color: #8a5a00; }
.co-nav-gift:hover { background: #ffefc2; color: #8a5a00; }
.co-nav-gift.is-active { background: var(--co-accent); color: #3d2a00; }
.co-nav-sep { height: 1px; background: var(--co-line); margin: 8px 4px; flex: none; }
.co-nav-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--co-line);
  border: 0; cursor: pointer; text-align: left; font: inherit; width: 100%; }
.co-nav-avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--co-primary-weak); image-rendering: pixelated; flex: none; }
.co-nav-user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.co-nav-user-meta b { font-size: 13px; color: var(--co-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-nav-user-meta span { font-size: 12px; color: var(--co-muted); }
.co-nav-collapse { margin-top: 6px; }
.co-nav-usermenu { position: absolute; left: 12px; right: 12px; bottom: 112px; background: #fff; border-radius: 14px; box-shadow: var(--co-shadow-lg), 0 0 0 1px var(--co-line); padding: 6px; z-index: 2; }
.co-nav-usermenu[hidden] { display: none; }
.co-nav-usermenu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border: 0; background: none; border-radius: 9px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--co-text); cursor: pointer; }
.co-nav-usermenu button:hover { background: var(--co-surface); }
.co-shell-collapsed .co-nav-label, .co-shell-collapsed .co-nav-sub, .co-shell-collapsed .co-nav-chev, .co-shell-collapsed .co-lock,
.co-shell-collapsed .co-nav-user-meta { display: none; }
.co-shell-collapsed .co-nav-item { justify-content: center; padding: 0; }
.co-shell-collapsed .co-nav-count { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.co-shell-collapsed .co-nav-user { justify-content: center; padding: 6px; box-shadow: none; background: none; }
.co-shell-collapsed .co-nav-usermenu { left: 8px; right: auto; width: 200px; }

/* スマートフォン: メニューは引き出し(≡ で開く) */
#co-nav-backdrop { display: none; }
@media (max-width: 860px) {
  body.co-has-shell .screen.active, body.co-has-shell.co-shell-collapsed .screen.active { margin-left: 0; }
  body.co-has-shell #co-nav, body.co-has-shell.co-shell-collapsed #co-nav { width: 280px; transform: translateX(-100%); transition: transform .2s ease; z-index: 1200; }
  body.co-has-shell.co-drawer-open #co-nav { transform: none; box-shadow: var(--co-shadow-lg); }
  body.co-has-shell.co-drawer-open #co-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 1150; background: rgba(31, 27, 46, .42); }
  .co-shell-collapsed .co-nav-label, .co-shell-collapsed .co-nav-user-meta { display: block; }
  .co-shell-collapsed .co-nav-item { justify-content: flex-start; padding: 0 10px; }
  .co-nav-collapse { display: none; }
}

/* =========================================================================
 * メニューの横から出るパネル(メイトを探す・ダイレクトメール・ミーティング)
 * 中身は main.js の既存の描画(FIND / DM / MTG)。器だけを新しくする
 * ========================================================================= */
#console-panel.co-panel { position: fixed; left: var(--co-nav-w); top: 0; bottom: 0; width: var(--co-panel-w); right: auto; height: auto; max-height: none;
  z-index: 880; background: #fff; border: 0; border-right: 1px solid var(--co-line); border-radius: 0; box-shadow: 12px 0 32px rgba(31, 27, 46, .10);
  display: flex; flex-direction: column; color: var(--co-text); font-family: var(--co-font); animation: co-panel-in .18s ease; transform: none; }
body.co-shell-collapsed #console-panel.co-panel { left: var(--co-nav-w-collapsed); }
#console-panel.co-panel.hidden { display: none !important; }
@keyframes co-panel-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.co-panel-head { display: flex; align-items: center; gap: 8px; padding: 18px 16px 12px; }
.co-panel-head h2 { flex: 1; font-size: 17px; font-weight: 800; }
.co-panel-head .co-modal-x { position: static; }
#console-panel.co-panel .console-screen-wrap { flex: 1; min-height: 0; display: flex; padding: 0; height: auto; background: none; border: 0; }
#console-panel.co-panel .console-screen { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 20px; background: none; border: 0; color: var(--co-text);
  font-family: var(--co-font); font-size: 13px; box-shadow: none; height: auto; }
#console-panel.co-panel .console-scrollbar, #console-panel.co-panel .console-tabs, #console-panel.co-panel .console-actions,
#console-panel.co-panel .console-titlebar { display: none !important; }
@media (max-width: 860px) {
  #console-panel.co-panel, body.co-shell-collapsed #console-panel.co-panel { left: 0; width: 100%; z-index: 1250; }
}
/* パネルの中の既存の部品を白基調へ */
.co-panel .console-btn { font-family: var(--co-font); font-size: 13px; font-weight: 600; border: 0; border-radius: 9px; background: var(--co-surface-2); color: var(--co-text-2);
  padding: 7px 12px; cursor: pointer; box-shadow: none; }
.co-panel .console-btn:hover { background: #e7e6f0; }
.co-panel .console-btn.primary, .co-panel .mtg-tab-head .console-btn { background: var(--co-primary); color: #fff; }
.co-panel .console-empty { color: var(--co-muted); padding: 24px 4px; text-align: center; font-size: 13px; }
.co-panel input, .co-panel textarea, .co-panel select { font-family: var(--co-font); background: #fff; color: var(--co-text); border: 1px solid var(--co-line); border-radius: 10px;
  padding: 8px 10px; font-size: 13px; }
.co-panel input:focus, .co-panel textarea:focus { outline: none; border-color: var(--co-primary); box-shadow: 0 0 0 3px var(--co-primary-weak); }
.co-panel .mtg-tab-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.co-panel .mtg-tab-title { flex: 1; font-weight: 800; font-size: 14px; color: var(--co-text); }
.co-panel .mtg-item { padding: 12px; border-radius: 12px; background: var(--co-surface); margin-bottom: 8px; border: 0; cursor: pointer; color: var(--co-text); }
.co-panel .mtg-item:hover { background: var(--co-surface-2); }
.co-panel .mtg-item-title { font-weight: 700; }
.co-panel .mtg-item-when, .co-panel .mtg-item-room, .co-panel .mtg-item-members { font-size: 12px; color: var(--co-muted); }
.co-panel .find-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--co-surface-2); margin-bottom: 12px; }
.co-panel .find-tab { border: 0; background: none; border-radius: 9px; padding: 7px 4px; font: inherit; font-size: 12px; font-weight: 700; color: var(--co-muted); cursor: pointer; }
.co-panel .find-tab.active { background: #fff; color: var(--co-text); box-shadow: var(--co-shadow-sm); }

/* =========================================================================
 * バーチャルオフィス(ルーム一覧)
 * ========================================================================= */
#screen-rooms { background: #fff; }
#screen-rooms > .app-header { display: none; }
.rooms-main { max-width: 1280px; width: 100%; padding: 26px 28px 60px; margin: 0; display: block; flex: 1; }
.rooms-head { max-width: none; justify-content: flex-start; flex-wrap: nowrap; }
.rooms-tabs { width: auto; max-width: 100%; margin: 0; }
.room-search-wrap { flex: none; max-width: none; }
.room-list { max-width: none !important; justify-content: stretch; margin: 0; width: 100%; }
.rooms-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rooms-title { flex: 1; font-family: var(--co-font); font-size: 24px; font-weight: 800; color: var(--co-text); }
.co-icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: none; color: var(--co-text-2); display: grid; place-items: center; cursor: pointer; position: relative; }
.co-icon-btn:hover { background: var(--co-surface-2); }
.co-icon-btn .co-dotn { position: absolute; right: 6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--co-danger); box-shadow: 0 0 0 2px #fff; }
.rooms-controls { display: flex; flex-direction: column; gap: 10px; width: fit-content; max-width: 100%; margin-bottom: 18px; }
.rooms-bar { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.rooms-bar .rooms-controls { margin-bottom: 0; }
.rooms-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; min-height: 42px; }
.rooms-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(max-content, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--co-surface-2);
  border: 0; margin: 0; overflow-x: auto; scrollbar-width: none; }
.rooms-tabs::-webkit-scrollbar { display: none; }
/* スマホでは4つのタブが横に収まらず「お気に入り」が隠れていた(横スクロールに気づけない)。2列×2段で全部見せる */
@media (max-width: 600px) { .rooms-tabs { grid-auto-flow: row; grid-template-columns: 1fr 1fr; grid-auto-columns: auto; overflow-x: visible; } }
/* 2026-11-10: スマホの2列×2段に薄い灰色の仕切り線(縦1本・横1本)。線は枠の内側だけ(端から 8px あけてはみ出さない)。
   選択中のタブ(白)に接する線は消して、白い面だけで強調する */
@media (max-width: 600px) {
  .rooms-tabs { gap: 0; position: relative; }
  .rooms-tab { position: relative; }
  .rooms-tab::before, .rooms-tab::after { content: ''; position: absolute; pointer-events: none; background: #d9d7e4; }
  .rooms-tab:nth-child(odd)::after { right: 0; top: 8px; bottom: 8px; width: 1px; }
  .rooms-tab:nth-child(-n+2)::before { left: 8px; right: 8px; bottom: 0; height: 1px; }
  .rooms-tab:nth-child(even)::after, .rooms-tab:nth-child(n+3)::before { display: none; }
  .rooms-tab.active::before, .rooms-tab.active::after { display: none; }
  .rooms-tab:has(+ .rooms-tab.active):nth-child(odd)::after { display: none; }
  .rooms-tab.active { z-index: 1; }
}
.rooms-tab { height: 34px; padding: 0 16px; border: 0; border-radius: 9px; background: none; font-family: var(--co-font); font-size: 13px; font-weight: 700; color: var(--co-muted);
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-bottom: 0; }
.rooms-tab.active { background: #fff; color: var(--co-text); box-shadow: var(--co-shadow-sm); border: 0; }
.rooms-tab .co-ic { width: 15px; height: 15px; }
.room-search-wrap { position: relative; display: block; width: 100%; }
.room-search-wrap .co-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--co-muted); }
.room-search { width: 100% !important; height: 40px; margin: 0; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid transparent; background: var(--co-surface); font-family: var(--co-font);
  font-size: 14px; color: var(--co-text); outline: none; }
.room-search:focus { border-color: var(--co-primary); background: #fff; box-shadow: 0 0 0 3px var(--co-primary-weak); }
.usage-chip { background: transparent; border: 0; color: var(--co-muted); font-family: var(--co-font); font-size: 13px; padding: 0; }
.room-list { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important; }
.room-card { background: #fff; border: 0; border-radius: var(--co-radius-lg); box-shadow: var(--co-shadow-sm), 0 0 0 1px var(--co-line); overflow: visible; display: flex;
  flex-direction: column; transition: box-shadow .15s, transform .15s; color: var(--co-text); }
.room-card:hover { transform: translateY(-2px); box-shadow: var(--co-shadow), 0 0 0 1px var(--co-line); }
.room-card-preview { position: relative; border-radius: var(--co-radius-lg) var(--co-radius-lg) 0 0; overflow: hidden; background: #1a1626; cursor: pointer; border: 0; }
.room-card-count { left: 10px; right: auto; top: 10px; bottom: auto; background: rgba(255, 255, 255, .94); color: var(--co-text); font-family: var(--co-font); font-weight: 700;
  font-size: 12px; border: 0; border-radius: 999px; padding: 2px 9px; display: inline-flex; align-items: center; gap: 6px; }
.room-card-count::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--co-success); box-shadow: 0 0 0 3px rgba(18, 161, 80, .18); }
.room-card-count.is-empty::before { background: #b9b6c8; box-shadow: none; }
.room-card-count.is-full { background: #fff1c9; color: #8a5a00; }
.room-card-badge { display: none; }
.room-fav { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .94);
  display: grid; place-items: center; color: var(--co-muted); cursor: pointer; z-index: 2; }
.room-fav .co-ic { width: 18px; height: 18px; }
.room-fav.is-on { color: #e0a100; }
.room-fav.is-on .co-ic { fill: #ffd166; }
.room-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.room-card-title { display: flex; align-items: center; gap: 6px; }
.room-card-name { flex: 1; min-width: 0; font-family: var(--co-font); font-size: 15px; font-weight: 700; color: var(--co-text); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; cursor: pointer; }
.room-more-btn { width: 32px; height: 32px; border-radius: 9px; border: 0; background: none; color: var(--co-text-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.room-more-btn:hover { background: var(--co-surface-2); }
.room-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.room-tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px; font-family: var(--co-font); font-size: 11.5px; font-weight: 700;
  background: var(--co-surface-2); color: var(--co-text-2); border: 0; }
.room-tag .co-ic { width: 13px; height: 13px; }
.room-tag.type-public { background: #eef7ff; color: #1d6fb8; }
.room-tag.type-user { background: var(--co-surface-2); color: var(--co-text-2); }
.room-tag.vis-public { background: var(--co-success-weak); color: var(--co-success); }
.room-tag.vis-unlisted { background: var(--co-info-weak); color: var(--co-info); }
.room-tag.vis-invite { background: #f3e8ff; color: #7c3aed; }
.room-tag.vis-private { background: var(--co-surface-2); color: var(--co-muted); }
.room-tag.owner { background: var(--co-accent-weak); color: var(--co-accent-ink); }
.room-tag.open { background: var(--co-primary-weak); color: var(--co-primary); }
.room-tag.lock { background: var(--co-surface-2); color: var(--co-text-2); }
.room-tag.mtg { background: #fff1c9; color: #8a5a00; }
.room-creator, .room-id { font-family: var(--co-font); font-size: 12px; color: var(--co-muted); }
.room-card-body .btn.primary.wide { margin-top: auto; font-size: 14px; padding: 9px; }
.room-card-actions { display: none !important; }
.room-locked { display: grid; place-items: center; aspect-ratio: 560 / 260; background: #2b2540; color: #b8b0dd; font-size: 34px; font-weight: 800; }
.room-empty { color: var(--co-muted); font-family: var(--co-font); }
.room-pagination .btn.small { min-width: 34px; }
.room-pagination .btn.small.active { background: var(--co-primary); color: #fff; }
@media (max-width: 860px) {
  /* 上の余白は共通ヘッダーの分(浮いていたメニューのボタンの分の 64px は要らなくなった) */
  .rooms-main { padding: 16px 14px 40px; }
  .rooms-controls { width: 100%; }
}

/* ---------- フローティングメニュー(⋯) ---------- */
.room-more-menu, .co-menu { background: #fff; border: 0; border-radius: 14px; box-shadow: var(--co-shadow-lg), 0 0 0 1px var(--co-line); padding: 6px; min-width: 220px; }
.room-more-item, .co-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border: 0; background: none; border-radius: 9px;
  font-family: var(--co-font); font-size: 13px; font-weight: 600; color: var(--co-text); cursor: pointer; text-align: left; }
.room-more-item:hover, .co-menu-item:hover { background: var(--co-surface); }
.room-more-item .co-ic, .co-menu-item .co-ic { width: 18px; height: 18px; color: var(--co-text-2); }
.room-more-item.is-locked { color: var(--co-muted); }
.room-more-item.is-danger, .room-more-item.is-danger .co-ic { color: var(--co-danger); }
.co-menu-sep { height: 1px; background: var(--co-line); margin: 4px 6px; }

/* ---------- 鍵つき機能の案内(オートメーションなど) ---------- */
.co-lockpop { text-align: center; padding: 6px 4px 0; }
.co-lockpop-ic { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--co-primary-weak); color: var(--co-primary); }
.co-lockpop-ic .co-ic { width: 28px; height: 28px; }
.co-lockpop h4 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.co-lockpop p { margin: 0; color: var(--co-text-2); font-size: 14px; line-height: 1.7; }

/* ---------- 説明を選択肢に合わせて切り替える欄 ---------- */
.co-field-help { display: block; margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--co-muted); line-height: 1.6; }

/* ---------- 作成・編集の窓 ---------- */
.co-form-label { font-size: 13px; font-weight: 600; color: var(--co-text-2); margin: 0 0 6px; }
.vis-help, .modal .panel-note { font-size: 12px; color: var(--co-muted); margin: -6px 0 14px; line-height: 1.6; }
.co-size-cards { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 14px; scroll-snap-type: x proximity; }
.co-size-card { flex: 0 0 168px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 8px; border: 0; border-radius: 12px;
  background: #fff; box-shadow: 0 0 0 1px var(--co-line); cursor: pointer; font-family: var(--co-font); text-align: left; color: var(--co-text); }
.co-size-card canvas { width: 100%; aspect-ratio: 280 / 150; border-radius: 8px; background: #1a1626; image-rendering: pixelated; }
.co-size-card b { font-size: 13px; }
.co-size-card .co-size-note { font-size: 11px; color: var(--co-muted); }
.co-size-card.is-sel { box-shadow: 0 0 0 2px var(--co-primary); }
.co-size-card.is-disabled { cursor: not-allowed; opacity: .45; filter: grayscale(1); }
.wall-colors-wrap { margin: -6px 0 14px; }
.re-bedcolor { border-radius: 8px; }

/* ---------- メンバーを招待する ---------- */
.inv-h { font-size: 13px; font-weight: 800; color: var(--co-text-2); margin: 14px 0 8px; display: flex; gap: 6px; align-items: center; }
.inv-h span { font-size: 11px; color: #fff; background: var(--co-primary); border-radius: 999px; padding: 0 7px; }
.inv-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; margin-top: 8px; }
.inv-row, .modal label.inv-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--co-line); margin: 0 !important; font-weight: 400 !important; }
.inv-row:last-child { border-bottom: 0; }
.inv-pick { cursor: pointer; }
.inv-pick input { width: 18px !important; height: 18px; margin: 0 !important; }
.inv-av { width: 32px; height: 32px; border-radius: 9px; background: var(--co-primary-weak); image-rendering: pixelated; flex: none; }
.inv-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.inv-name b { font-size: 13px; color: var(--co-text); }
.inv-name span { font-size: 11px; color: var(--co-muted); font-family: ui-monospace, Menlo, monospace; }
.btn.danger.small, .modal-actions .btn.danger { color: #fff; }

/* ---------- お知らせ(ベル) ---------- */
.co-notice-list { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; }
.co-notice { display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--co-line); }
.co-notice:last-child { border-bottom: 0; }
.co-notice.is-new { background: #fbfaff; }
.co-notice-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--co-surface-2); color: var(--co-text-2); flex: none; }
.co-notice.is-new .co-notice-ic { background: var(--co-primary-weak); color: var(--co-primary); }
.co-notice-ic .co-ic { width: 18px; height: 18px; }
.co-notice-body { min-width: 0; font-size: 13px; }
.co-notice-body b { font-size: 14px; }
.co-notice-body p { margin: 2px 0 0; color: var(--co-text-2); }
.co-notice-meta { font-size: 11.5px; color: var(--co-muted); }
.co-empty-note { color: var(--co-muted); text-align: center; padding: 24px 0; font-size: 13px; }

/* =========================================================================
 * ルームの中(UI v2)。ドット絵の世界は暗い背景のまま、操作は白い部品で上に重ねる
 * ========================================================================= */
#screen-room.active { height: 100vh; overflow: hidden; }
#screen-room .room-body { flex: 1; height: 100vh; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 0; padding: 0; background: var(--co-room-bg); }
#screen-room.side-closed .room-body { grid-template-columns: minmax(0, 1fr); }
#screen-room.side-closed .room-sidebar { display: none; }
#screen-room .room-stage { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--co-room-bg); }
#screen-room .room-viewport { flex: 1; min-height: 0; border: 0; border-radius: 0; background: var(--co-room-bg); }
#screen-room .controls-hint { display: none; }
/* 上の帯(左: 退出・ルーム名 / 右: ステータス・⋯) */
.room-topbar { position: absolute; left: 14px; right: 14px; top: 14px; z-index: 8; display: flex; align-items: center; gap: 8px; padding: 0; background: none; border: 0;
  pointer-events: none; height: auto; min-height: 0; flex-wrap: nowrap; }
.room-topbar .header-left, .room-topbar .header-right { pointer-events: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.room-topbar .header-left { flex: 1; }
.room-topbar-legacy { display: none !important; }
.room-leave-btn { height: 38px; padding: 0 14px; border-radius: 12px; background: var(--co-danger); color: #fff; font-weight: 700; box-shadow: var(--co-shadow); }
.room-leave-btn:hover { background: #d63c41; color: #fff; }
.room-leave-btn .co-ic { width: 18px; height: 18px; color: #fff; }
.room-topbar .room-title-text { height: 38px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .95);
  box-shadow: var(--co-shadow); font-family: var(--co-font); font-size: 14px; font-weight: 700; color: var(--co-text); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-open-badge { height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, .95); color: var(--co-primary);
  font-family: var(--co-font); font-size: 13px; font-weight: 700; box-shadow: var(--co-shadow); border: 0; }
.room-open-badge.hidden { display: none; }
.room-open-badge .co-ic { width: 16px; height: 16px; }
.room-open-badge { cursor: help; }
.room-open-badge:focus-visible { outline: 3px solid var(--co-primary-line); outline-offset: 2px; }

/* ---------- ツールチップ(共通・2026-11-11) ----------
   .co-tip-host の中に .co-tooltip[role=tooltip] を置き、bindCoTooltip(main.js)で開け閉めする。
   PC はホバー・フォーカスで出し、タップ(クリック)で出したままにできる。外側のタップ・もう一度のタップ・Esc で閉じる */
.co-tip-host { position: relative; }
.co-tooltip { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 40; padding: 6px 10px; border-radius: 8px;
  background: #1f1b2e; color: #fff; font-family: var(--co-font); font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap;
  box-shadow: var(--co-shadow); pointer-events: none; }
.co-tooltip::before { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.co-tooltip[hidden] { display: none; }
.room-topbar .status-select-wrap { height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 12px; background: rgba(255, 255, 255, .95);
  box-shadow: var(--co-shadow); border: 0; }
.room-topbar .status-select-wrap select { border: 0; background: none; font-family: var(--co-font); font-size: 13px; font-weight: 700; color: var(--co-text); padding: 0; }
.room-topbar-more { width: 38px; height: 38px; padding: 0; border-radius: 12px; background: rgba(255, 255, 255, .95); box-shadow: var(--co-shadow); color: var(--co-text-2); }
.room-topbar-more .co-ic { width: 20px; height: 20px; }
/* 人数: 「⋯」の下に、黒地に薄い灰色で */
#screen-room .room-capacity { top: 62px; right: 14px; left: auto; z-index: 7; font-family: var(--co-font); font-size: 12px; font-weight: 600; color: #c8c4d8;
  background: rgba(20, 17, 32, .72); border: 0; padding: 6px 10px; display: inline-flex; align-items: center; gap: 6px; }
#screen-room .room-capacity::before { content: ''; width: 14px; height: 14px; background: currentColor; flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 19a6.5 6.5 0 0 1 13 0'/%3E%3Cpath d='M16 4.6a3.5 3.5 0 0 1 0 6.8'/%3E%3Cpath d='M18 13.4a6.5 6.5 0 0 1 3.5 5.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 19a6.5 6.5 0 0 1 13 0'/%3E%3Cpath d='M16 4.6a3.5 3.5 0 0 1 0 6.8'/%3E%3Cpath d='M18 13.4a6.5 6.5 0 0 1 3.5 5.6'/%3E%3C/svg%3E") center / contain no-repeat; }
#screen-room .room-capacity.is-full { color: #ffb4ad; }
#screen-room .room-capacity.hidden { display: none; }
/* 右のパネルをたたんだとき: いちばん右上に白い枠の「最大化」 */
.room-side-open { position: absolute; top: 14px; right: 14px; z-index: 9; width: 38px; height: 38px; border-radius: 12px; border: 2px solid #fff; background: rgba(20, 17, 32, .55);
  color: #fff; display: grid; place-items: center; cursor: pointer; }
.room-side-open.hidden { display: none; }
.room-side-open .co-ic { width: 18px; height: 18px; }
/* 最大化ボタンはヘッダーのボタン列の中へ移した(2026-11-10)。右に 62px あける指定は不要になった */
/* 画面下の中央: 入力欄(主役)と操作 */
#screen-room .toolbar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 8; width: min(900px, calc(100% - 28px)); margin: 0;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 8px; border-radius: 18px; background: rgba(255, 255, 255, .97); box-shadow: var(--co-shadow-lg); }
#screen-room .chat-input-wrap { flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; align-items: center; background: var(--co-surface); border-radius: 12px; padding: 0 6px 0 4px; height: 46px; }
#chat-input { flex: 1; min-width: 0; border: 0; background: none; font-family: var(--co-font); font-size: 14px; color: var(--co-text); padding: 0 8px; height: 100%; }
#chat-input:focus { box-shadow: none; }
#btn-send { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; flex: none; }
#btn-send .co-ic { width: 16px; height: 16px; }
#screen-room .toolbar-buttons { display: flex; gap: 2px; flex: none; align-items: center; }
#screen-room .tool-sep { width: 1px; height: 26px; background: var(--co-line); margin: 0 4px; }
#screen-room .tool-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--co-text-2); display: grid; place-items: center; font-size: 0; }
#screen-room .tool-btn:hover { background: var(--co-surface-2); }
#screen-room .tool-btn .co-ic { width: 22px; height: 22px; }
#screen-room .tool-btn.on { background: var(--co-primary-weak); color: var(--co-primary); border: 0; }
#screen-room .tool-btn.off { color: var(--co-danger); }
#screen-room .tool-btn.off::after { left: 10px; width: 24px; height: 2px; background: var(--co-danger); }
#screen-room .tool-btn.muted { background: var(--co-danger-weak); color: var(--co-danger); border: 0; }
#screen-room .tool-btn.loud::after, #screen-room .tool-btn.present::after { content: ''; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--co-accent); }
#screen-room .tool-btn.hidden { display: none; }
/* 白いフローティングメニュー(マイク・カメラ・画面共有・音量・リアクション) */
#screen-room .mode-popover { bottom: 70px; right: 8px; background: #fff; border: 0; border-radius: 14px; box-shadow: var(--co-shadow-lg), 0 0 0 1px var(--co-line); padding: 6px; min-width: 240px; }
#screen-room .mode-popover button { flex-direction: row; align-items: center; gap: 10px; font-family: var(--co-font); font-size: 13px; font-weight: 600; color: var(--co-text); padding: 9px 10px; border-radius: 9px; }
#screen-room .mode-popover button:hover { background: var(--co-surface); }
#screen-room .mode-popover button.sel { background: var(--co-primary-weak); outline: 0; color: var(--co-primary); }
#screen-room .mode-popover button .co-ic { width: 18px; height: 18px; color: inherit; flex: none; }
.mp-text { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.mp-sub { font-size: 11px; font-weight: 500; color: var(--co-muted); }
.sound-popover .sp-title { font-size: 12px; font-weight: 800; color: var(--co-muted); padding: 6px 10px 2px; }
.sound-popover .sp-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px; color: var(--co-text-2); }
.sound-popover .sp-row input[type="range"] { flex: 1; accent-color: var(--co-primary); }
.sound-popover .sp-row span:last-child { min-width: 40px; text-align: right; font-size: 12px; font-weight: 700; }
#screen-room .emoji-picker { display: grid; padding: 8px; min-width: 0; grid-template-columns: repeat(5, 40px); }
#screen-room .emoji-picker.hidden { display: none; }
#screen-room .emoji-picker button { width: 40px; height: 40px; font-size: 21px; justify-content: center; padding: 0; }
/* 右のパネル: チャット / 参加者 */
#screen-room .room-sidebar { width: auto; display: flex; flex-direction: column; gap: 0; min-height: 0; background: #fff; border-left: 1px solid var(--co-line); animation: co-side-in .2s ease; }
@keyframes co-side-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.room-side-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; }
.room-side-tabs { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--co-surface-2); }
.room-side-tab { height: 32px; border: 0; border-radius: 9px; background: none; font-family: var(--co-font); font-size: 13px; font-weight: 700; color: var(--co-muted); cursor: pointer; }
.room-side-tab.active { background: #fff; color: var(--co-text); box-shadow: var(--co-shadow-sm); }
.room-side-close { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--co-text-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.room-side-close:hover { background: var(--co-surface-2); }
.room-side-close .co-ic { width: 18px; height: 18px; }
#screen-room .sidebar-section { flex: 1; min-height: 0; background: none; border: 0; border-radius: 0; padding: 4px 12px 12px; overflow: hidden; }
#screen-room .sidebar-section[hidden] { display: none; }
#screen-room .sidebar-section h3 { display: none; }
#screen-room .chat-log { flex: 1; min-height: 0; overflow-y: auto; font-size: 12.5px; background: none; border: 0; padding: 0; }
#screen-room .participant-list { overflow-y: auto; }
#screen-room .participant-list li { font-size: 12.5px; padding: 6px 2px; border-bottom: 1px solid var(--co-line); }
#screen-room .p-face { width: 28px; height: 26px; background: var(--co-primary-weak); border-radius: 7px; }
#screen-room .hear-note { font-size: 11px; color: var(--co-muted); margin-top: 8px; }
@media (max-width: 860px) {
  #screen-room .room-body { grid-template-columns: minmax(0, 1fr); }
  #screen-room .room-sidebar { position: fixed; right: 0; top: 0; bottom: 0; width: min(320px, 86vw); z-index: 1000; box-shadow: var(--co-shadow-lg); }
  #screen-room:not(.side-open-mobile) .room-sidebar { display: none; }
  .room-topbar { left: 10px; top: 10px; }
  #screen-room .toolbar { flex-wrap: wrap; bottom: 10px; border-radius: 16px; }
  #screen-room .chat-input-wrap { flex-basis: 100%; order: 2; }
  #screen-room .toolbar-buttons { order: 1; width: 100%; justify-content: space-between; }
  .room-topbar .status-select-wrap { display: none; }
}
@media (max-width: 860px) {
  #screen-room:not(.side-open-mobile) .room-side-open { display: grid; }
}
.room-topbar #room-plan, .room-topbar #room-username { display: none !important; }
#screen-room .room-zoom { bottom: 96px; right: 14px; }
#screen-room .room-zoom-btn { background: #fff; color: var(--co-text-2); border: 0; box-shadow: var(--co-shadow); font-size: 20px; }

/* ---------- パネルの中: メイトを探す ---------- */
.co-panel .mate-section-t { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--co-muted); margin: 14px 0 6px; letter-spacing: .02em; }
.co-panel .mate-section-t .usage-chip { margin-left: auto; font-weight: 600; }
.co-panel .user-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; background: none; border: 0; color: var(--co-text); }
.co-panel .user-item.is-clickable { cursor: pointer; }
.co-panel .user-item:hover { background: var(--co-surface); }
.co-panel .user-item canvas { width: 36px; height: 36px; border-radius: 10px; background: var(--co-primary-weak); image-rendering: pixelated; flex: none; }
.co-panel .user-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.co-panel .user-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-panel .user-sub { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--co-muted); }
.co-panel .mate-status { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; }
.co-panel .mate-dot { width: 8px; height: 8px; border-radius: 50%; }
.co-panel .mate-msg, .co-panel .mate-del, .co-panel .mate-yes, .co-panel .mate-no { border: 0; border-radius: 8px; height: 26px; padding: 0 8px; font-family: var(--co-font);
  font-size: 11.5px; font-weight: 700; cursor: pointer; background: var(--co-surface-2); color: var(--co-text-2); display: inline-grid; place-items: center; }
.co-panel .mate-msg { background: var(--co-primary-weak); color: var(--co-primary); }
.co-panel .mate-msg .co-ic { width: 15px; height: 15px; }
.co-panel .mate-yes { background: var(--co-primary); color: #fff; }
.co-panel .mate-del { color: var(--co-danger); background: var(--co-danger-weak); }
.co-panel .find-search-controls { display: flex; gap: 6px; margin-bottom: 8px; }
.co-panel .find-search-controls input { flex: 1; min-width: 0; }
.co-panel .mate-note { font-size: 12px; border-radius: 10px; }
.co-panel .mate-note:empty { display: none; }

/* ---------- パネルの中: ダイレクトメール(ChatWork のように上から 名前・日時 → 本文) ---------- */
.dm-new { margin: 2px 0 12px; height: 40px; }
.dm-new .co-ic { width: 18px; height: 18px; }
.dm-list { display: flex; flex-direction: column; gap: 2px; }
.dm-convo { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; width: 100%;
  font-family: var(--co-font); color: var(--co-text); }
.dm-convo:hover { background: var(--co-surface); }
.dm-convo.is-unread .dm-convo-top b { color: var(--co-primary); }
.dm-av { width: 36px; height: 36px; border-radius: 10px; background: var(--co-primary-weak); image-rendering: pixelated; flex: none; display: grid; place-items: center; color: var(--co-primary); }
.dm-av .co-ic { width: 18px; height: 18px; }
.dm-convo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dm-convo-top { display: flex; align-items: baseline; gap: 6px; }
.dm-convo-top b { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-convo-time { font-size: 11px; color: var(--co-muted); flex: none; }
.dm-convo-last { font-size: 12px; color: var(--co-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--co-primary); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; flex: none; }
.dm-head { display: flex; align-items: center; gap: 8px; padding: 0 0 10px; border-bottom: 1px solid var(--co-line); margin-bottom: 8px; }
.dm-head b { font-size: 14px; }
.dm-back { width: 32px; height: 32px; border: 0; border-radius: 9px; background: var(--co-surface-2); color: var(--co-text-2); display: grid; place-items: center; cursor: pointer; }
.dm-back .co-ic { width: 16px; height: 16px; }
.dm-picker-q { width: 100%; margin-bottom: 8px; }
.dm-thread { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.dm-thread-body { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; }
.dm-msg { display: flex; gap: 10px; padding: 8px 4px; border-radius: 10px; }
.dm-msg:hover { background: #fbfaff; }
.dm-msg-main { flex: 1; min-width: 0; }
.dm-msg-head { display: flex; align-items: baseline; gap: 8px; }
.dm-msg-head b { font-size: 13px; }
.dm-msg-time { font-size: 11px; color: var(--co-muted); }
.dm-msg-text { font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; color: var(--co-text); }
.dm-file { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--co-surface); box-shadow: 0 0 0 1px var(--co-line);
  cursor: pointer; text-align: left; max-width: 100%; font-family: var(--co-font); color: var(--co-text); }
.dm-file:hover { box-shadow: 0 0 0 1px var(--co-primary-line); background: #fff; }
.dm-file.is-missing { cursor: default; opacity: .6; }
.dm-file-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--co-primary-weak); color: var(--co-primary); display: grid; place-items: center; flex: none; }
.dm-file-ic .co-ic { width: 18px; height: 18px; }
.dm-file-meta { display: flex; flex-direction: column; min-width: 0; }
.dm-file-meta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-file-meta span { font-size: 11.5px; color: var(--co-muted); }
.dm-compose { border-top: 1px solid var(--co-line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.dm-compose textarea { width: 100%; resize: none; min-height: 56px; }
.dm-compose-row { display: flex; align-items: center; gap: 8px; }
.dm-clip { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--co-surface-2); color: var(--co-text-2); cursor: pointer; }
.dm-clip .co-ic { width: 18px; height: 18px; }
.dm-hint { flex: 1; font-size: 11px; color: var(--co-muted); }
.dm-compose-row .btn .co-ic { width: 15px; height: 15px; }
.dm-attach { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--co-surface); }
.dm-attach.hidden { display: none; }
.dm-attach .dm-file-meta { flex: 1; }
.dm-attach-x { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--co-muted); cursor: pointer; display: grid; place-items: center; }
.dm-attach-x .co-ic { width: 15px; height: 15px; }
.co-panel .msg-system-note { font-size: 12px; color: var(--co-muted); padding: 8px 0; }
#console-panel.co-panel .console-screen:has(.dm-thread) { display: flex; flex-direction: column; }
#console-panel.co-panel .console-screen-wrap { margin: 0 !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: none !important; }
#console-panel.co-panel .console-screen { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: #fff !important; }

/* ---------- パネルの中: ミーティング ---------- */
.co-panel .mtg-back { margin-bottom: 10px; }
.co-panel .mtg-form { display: flex; flex-direction: column; gap: 12px; }
.co-panel .mtg-field { display: flex; flex-direction: column; gap: 5px; }
.co-panel .mtg-label { font-size: 12px; font-weight: 700; color: var(--co-text-2); }
.co-panel .mtg-input { width: 100%; height: 38px; }
.co-panel .mtg-members { display: flex; flex-direction: column; gap: 4px; }
.co-panel .mtg-detail-act { background: var(--co-primary); color: #fff; height: 38px; }
.co-panel .mtg-detail-title { font-size: 15px; font-weight: 800; margin: 4px 0 8px; color: var(--co-text); }
.co-panel .mtg-detail-row { font-size: 13px; color: var(--co-text-2); }
.co-panel .mtg-msg:empty { display: none; }

/* ---------- 窓(appWindow)の中: オープンルーム・お知らせ・入退出履歴 ---------- */
.app-window { background: #fff; border: 0; border-radius: var(--co-radius-win); box-shadow: var(--co-shadow-lg), 0 0 0 1px var(--co-line); color: var(--co-text); font-family: var(--co-font); }
.app-titlebar { background: #fff; border-bottom: 1px solid var(--co-line); border-radius: var(--co-radius-win) var(--co-radius-win) 0 0; padding: 12px 12px 12px 18px; }
.app-win-title { font-family: var(--co-font); font-size: 16px; font-weight: 800; color: var(--co-text); }
/* 窓の中身とタイトルバーに旧デザイン(.console の金色のタブ・ベージュの地・茶色の枠)が残っていたのを白に統一する */
.console.app-window { padding: 0; user-select: auto; overflow: hidden; }
.app-window .console-titlebar.app-titlebar { justify-content: space-between; margin: 0; border: 0; border-bottom: 1px solid var(--co-line);
  background: #fff; box-shadow: none; padding: 12px 12px 12px 18px; }
.app-window .app-window-body { background: #fff; border: 0; border-radius: 0; padding: 16px 18px; color: var(--co-text); font-family: var(--co-font); }
.app-window .app-window-body.ext-app-body, .app-window .app-window-body.vs-body { padding: 0; }
.app-titlebar .btn.ghost { width: 30px; height: 30px; padding: 0; border-radius: 8px; background: var(--co-surface-2); color: var(--co-text-2); }
.or-greet { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.or-greet-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--co-surface); }
.or-greet-name { flex: 1; font-weight: 700; font-size: 13px; }
.or-greet-state { font-size: 12px; color: var(--co-muted); }
.or-origin-rows { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }
.or-origin-row { display: flex; gap: 6px; align-items: center; }
.or-origin-row input { flex: 1; min-width: 0; }
.or-origin-add { align-self: flex-start; }
.en-freq-select { width: 100%; }
.en-freq-help { margin: 0 0 6px; }

/* ---------- マイページ(UI v2) ---------- */
.mp-tc-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 6px 0 12px; }
.mp-tc-month { width: auto; }
.mp-tc-stat { display: flex; flex-direction: column; line-height: 1.3; }
.mp-tc-stat b { font-size: 22px; font-weight: 800; }
.mp-tc-stat span { font-size: 12px; color: var(--co-muted); }
#screen-mypage .mp-back { display: none; }

/* ---------- オートメーション: 画面の左ナビはグローバルメニュー(オートメーションの子)へ統合 ----------
   画面の中の左ナビは出さず、実行ポイントだけ右下に小さく残す */
body.co-has-shell #screen-automation .ap-root.ap-has-nav { padding-left: 0; }
body.co-has-shell #screen-automation .ap-nav { position: fixed; left: auto; right: 16px; top: auto; bottom: 16px; width: auto; height: auto; background: none; border: 0;
  box-shadow: none; overflow: visible; z-index: 40; }
body.co-has-shell #screen-automation .ap-nav-head, body.co-has-shell #screen-automation .ap-nav-list { display: none; }
/* 編集・実行の画面では出さない(右の設定パネルの入力欄に重ねない。移動はグローバルメニューから) */
body.co-has-shell #screen-automation .ap-root.is-editing .ap-nav { display: none; }
/* 編集画面は全面に固定した層(automation.css の .ap-editor { inset: 0 })。グローバルメニューの右から始める(メニューの下に潜らせない) */
body.co-has-shell #screen-automation .ap-root.is-editing .ap-editor { left: var(--co-nav-w); }
body.co-has-shell.co-shell-collapsed #screen-automation .ap-root.is-editing .ap-editor { left: var(--co-nav-w-collapsed); }
@media (max-width: 860px) { body.co-has-shell #screen-automation .ap-root.is-editing .ap-editor { left: 0; } }
body.co-has-shell #screen-automation .ap-points { background: #fff; border-radius: 14px; box-shadow: var(--co-shadow-lg), 0 0 0 1px var(--co-line); padding: 8px 12px; }
body.co-has-shell #screen-automation .ap-points.is-collapsed .ap-points-text { display: flex; }
/* ---------- コミュニティ・管理画面: 「戻る」はグローバルメニューへ ---------- */
body.co-has-shell #btn-community-rooms, body.co-has-shell #btn-community-mypage, body.co-has-shell #btn-admin-back { display: none; }
/* コミュニティの主ボタンも紫(操作は紫に統一)。カテゴリの色分けはそのまま */
#screen-community .cm3-btn-primary { background: var(--co-primary); box-shadow: none; }
#screen-community .cm3-btn-primary:hover { background: var(--co-primary-hover); }
#screen-community .cm3-btn-ghost { color: var(--co-primary); border-color: var(--co-primary-line); }
/* ---------- 管理画面(タブは下線のタブ・白基調) ---------- */
#screen-admin { background: #fff; }
#screen-admin > .app-header { background: #fff; border-bottom: 1px solid var(--co-line); }
#screen-admin .room-title-text { font-family: var(--co-font); font-size: 20px; font-weight: 800; color: var(--co-text); }
.admin-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--co-line); background: #fff; padding: 0 16px; scrollbar-width: thin; }
.admin-tab { height: 42px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; font-family: var(--co-font); font-size: 13px;
  font-weight: 600; color: var(--co-muted); white-space: nowrap; cursor: pointer; }
.admin-tab.active { color: var(--co-primary); border-bottom-color: var(--co-primary); background: none; }
.admin-panel h3, .panel-head h3 { font-family: var(--co-font); font-weight: 800; }
@media (max-width: 860px) {
  #screen-room:not(.side-open-mobile) #btn-side-open { display: grid !important; }
  #screen-room .room-zoom { bottom: 150px; right: 10px; }
  .room-topbar .room-title-text { max-width: 30vw; }
}
.room-mtg-soon { height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 12px; background: #fff1c9; color: #8a5a00;
  font-family: var(--co-font); font-size: 12.5px; font-weight: 700; box-shadow: var(--co-shadow); cursor: pointer; white-space: nowrap; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
.room-mtg-soon.hidden { display: none; }
.room-mtg-soon .co-ic { width: 16px; height: 16px; }
/* 窓の中の文字色: 旧デザインの茶色(#4a3608 / #6b5a2e / #8a7f6a)を UI v2 の色へ。窓(.app-window)の中だけに効かせる */
.app-window .ah-empty, .app-window .ah-page, .app-window .app-win-note, .app-window .bd-confirm-note, .app-window .bd-empty, .app-window .bd-readers-page, .app-window .en-section-title, .app-window .en-view-date, .app-window .en-view-head, .app-window .ext-app-hint, .app-window .ext-app-msg, .app-window .mtg-done-room, .app-window .mtg-done-when, .app-window .tc-empty, .app-window .tc-map-dist, .app-window .tc-map-key, .app-window .tc-map-note, .app-window .tc-msg, .app-window .tc-note, .app-window .tc-pc-note, .app-window .tc-rec-page, .app-window .tc-started, .app-window .vs-sec h4, .app-window .vs-tab, .app-window .vs-tile-label, .app-window .wb-empty { color: var(--co-text-2); }
.app-window .ah-item-num, .app-window .ah-label, .app-window .ah-row-label, .app-window .bd-card-meta, .app-window .bd-comment-meta, .app-window .bd-count, .app-window .bd-detail-meta, .app-window .bd-flag-read, .app-window .bd-label, .app-window .bd-pick-note, .app-window .bd-pick-num, .app-window .bd-reader-when, .app-window .bd-readers-count, .app-window .en-note, .app-window .en-view-note, .app-window .mtg-done-url, .app-window .mtg-label, .app-window .mtg-member-num, .app-window .tc-auto-note, .app-window .tc-now-label, .app-window .tc-rec-label, .app-window .tc-rec-num, .app-window .tc-rec-open, .app-window .tc-rec-room, .app-window .vs-note, .app-window .wb-access-desc, .app-window .wb-row-meta { color: var(--co-muted); }
.app-window .ah-unknown, .app-window .bd-comment-edited, .app-window .bd-read-note { color: var(--co-muted); }


/* =========================================================================
 * 全画面共通のヘッダー(2026-11-10・#co-header。中身は js/shell.js)
 *   [メニュー(スマホだけ)] 画面名 ……… [お知らせ]
 * 画面ごとのヘッダー(マイページ・コミュニティ・管理画面・ルームの URL エラー)は、メニューがあるときは隠す(二重にしない)。
 * ルームの中だけはドット絵の上の操作バー(.room-topbar)がヘッダー(同じ並び: [メニュー] 退出・ルーム名 ……… ⋯ [お知らせ])。
 * ========================================================================= */
#co-header { display: none; }
/* 重なり: 画面の中身(固定の部品は 60 まで)より上、可動ウィンドウ(--z-window 120)より下。
   ウィンドウを上へ動かしてもタイトルバーがヘッダーの下に隠れない。メニュー(900)・横のパネル(880)・引き出し(1200)・モーダルはヘッダーより上 */
body.co-has-header #co-header { display: flex; position: fixed; top: 0; right: 0; left: var(--co-nav-w); height: var(--co-header-h); z-index: 110;
  align-items: center; gap: 12px; padding: 0 20px 0 28px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--co-line);
  -webkit-backdrop-filter: saturate(180%) blur(8px); backdrop-filter: saturate(180%) blur(8px); }
body.co-has-header.co-shell-collapsed #co-header { left: var(--co-nav-w-collapsed); }
.co-header-menu, .room-nav-toggle { display: none; flex: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--co-text-2);
  place-items: center; cursor: pointer; padding: 0; }
.co-header-menu:hover { background: var(--co-surface-2); }
.co-header-title { flex: 0 1 auto; min-width: 0; margin: 0; font-family: var(--co-font); font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--co-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-header-spacer { flex: 1 1 auto; min-width: 8px; }
.co-header-bell { flex: none; }
/* 画面の中身はヘッダーの下から */
body.co-has-header .screen.active { padding-top: var(--co-header-h); }
body.co-has-header #screen-login.active, body.co-has-header .auth-screen.active { padding-top: 0; }
/* 画面ごとの旧ヘッダーを隠す(メニューの無い経路では従来どおり出る) */
body.co-has-header #screen-mypage .mp-header, body.co-has-header #screen-community .cm3-header,
body.co-has-header #screen-room-error > .app-header { display: none; }
body.co-has-header #screen-mypage .mp-side { top: calc(var(--co-header-h) + 20px); }
/* 管理画面: 画面名は共通ヘッダー。旧ヘッダーは配信中の版の札だけを残す細い行にする */
body.co-has-header #screen-admin > .app-header { min-height: 0; padding: 8px 16px 0; border: 0; background: #fff; justify-content: flex-end; }
body.co-has-header #screen-admin > .app-header .header-left, body.co-has-header #screen-admin #admin-username { display: none; }
/* オートメーション: 一覧の見出しは共通ヘッダーと同じ文言なので出さない(説明文と主ボタンは残す) */
body.co-has-header #screen-automation .ap-panel-head > div > .ap-h2 { display: none; }
/* 編集・実行の詳細は全面に固定した層。共通ヘッダーの下から始める(保存の状態・反映・ON/OFF はヘッダーの下の操作バー) */
body.co-has-header #screen-automation .ap-root.is-editing .ap-editor { top: var(--co-header-h); }
body.co-has-header #screen-automation .ap-root.is-editing { height: calc(100vh - var(--co-header-h)); height: calc(100dvh - var(--co-header-h)); }
/* スマホ: メニューを開くボタンはヘッダーの中の左端(浮かせない)。画面名とは 4px あける */
@media (max-width: 860px) {
  :root { --co-header-h: 56px; }
  body.co-has-header #co-header, body.co-has-header.co-shell-collapsed #co-header { left: 0; padding: 0 8px 0 6px; gap: 4px; }
  body.co-has-shell .co-header-menu, body.co-has-shell .room-nav-toggle { display: grid; }
  .co-header-title { font-size: 17px; }
}
/* ルームの中の操作バー: スマホのメニューを開くボタン(左端)とお知らせ(右端)。ドット絵の上なので白い面に置く */
.room-nav-toggle, .room-topbar .room-notices { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .95); box-shadow: var(--co-shadow);
  color: var(--co-text-2); }
.room-topbar .room-notices { display: grid; place-items: center; flex: none; }
.room-nav-toggle .co-ic, .room-topbar .room-notices .co-ic { width: 20px; height: 20px; }
@media (max-width: 860px) {
  .room-topbar .header-left, .room-topbar .header-right { gap: 6px; }
  .room-topbar .room-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 38px; }
}

/* =========================================================================
 * 入室時お知らせ設定: 表示切り替えの予約(2026-11-10・main.js の renderEntryNoticeSchedule)
 * ========================================================================= */
.en-sched { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--co-line); display: flex; flex-direction: column; gap: 10px; }
.en-sched .en-sched-msg:empty { display: none; }
.en-sched .en-sched-msg.is-ok { color: var(--co-success); }
.en-sched-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.en-sched-label { font-size: 13px; font-weight: 700; color: var(--co-text-2); }
.en-sched-at { flex: 1 1 200px; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--co-line); border-radius: 10px; background: #fff;
  font-family: var(--co-font); font-size: 14px; color: var(--co-text); }
.en-sched-at:focus { outline: none; border-color: var(--co-primary); box-shadow: 0 0 0 3px var(--co-primary-weak); }
.en-sched-submit { flex: none; height: 38px; min-width: 96px; }
.en-sched-editing { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--co-accent-weak); color: var(--co-accent-ink);
  font-size: 13px; font-weight: 700; }
.en-sched-editing[hidden] { display: none; }
.en-sched-editing-ic .co-ic { width: 16px; height: 16px; }
.en-sched-editing-text { flex: 1; min-width: 0; }
.en-sched-cancel { flex: none; background: #fff; }
.en-sched.is-editing .en-sched-at { border-color: var(--co-accent); }
.en-sched-list { display: flex; flex-direction: column; border-radius: 12px; background: var(--co-surface); overflow: hidden; }
.en-sched-item { display: grid; grid-template-columns: minmax(118px, auto) minmax(0, 1fr) 34px 34px; align-items: center; gap: 6px; padding: 6px 8px 6px 12px;
  border-top: 1px solid var(--co-line); font-size: 13px; color: var(--co-text); }
.en-sched-item:first-child { border-top: 0; }
.en-sched-head { font-size: 11.5px; font-weight: 700; color: var(--co-muted); padding-top: 8px; padding-bottom: 6px; }
.en-sched-item.is-editing { background: var(--co-accent-weak); }
.en-sched-item.is-ended .en-sched-date, .en-sched-item.is-ended .en-sched-text { color: var(--co-muted); }
.en-sched-when { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.en-sched-date { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.en-sched-chip { align-self: flex-start; height: 18px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; }
.en-sched-chip.is-active { background: var(--co-success-weak); color: var(--co-success); }
.en-sched-chip.is-scheduled { background: var(--co-primary-weak); color: var(--co-primary); }
.en-sched-chip.is-ended { background: var(--co-surface-2); color: var(--co-muted); }
/* お知らせ内容は1行。長いときは末尾を「…」 */
.en-sched-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en-sched-icon { width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--co-text-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.en-sched-icon:hover { background: #fff; color: var(--co-text); }
.en-sched-icon .co-ic { width: 18px; height: 18px; }
.en-sched-del:hover { color: var(--co-danger); }
.en-sched-empty { padding: 14px 12px; font-size: 13px; color: var(--co-muted); }
/* ページ送り(一覧の下の中央): ◀ [1] [2] [3] ▶ */
.en-sched-pager { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; }
.en-sched-pager:empty { display: none; }
.en-sched-page { min-width: 34px; height: 34px; padding: 0 8px; border: 0; border-radius: 9px; background: var(--co-surface-2); color: var(--co-text-2);
  font-family: var(--co-font); font-size: 13px; font-weight: 700; cursor: pointer; display: inline-grid; place-items: center; }
.en-sched-page.is-current { background: var(--co-primary); color: #fff; }
.en-sched-page:disabled { opacity: .4; cursor: default; }
.en-sched-page .co-ic { width: 16px; height: 16px; }
.en-sched-warn { display: inline-block; margin-top: 8px; color: var(--co-danger); font-size: 13px; }
@media (max-width: 480px) {
  .en-sched-item { grid-template-columns: minmax(0, 1fr) 34px 34px; grid-template-areas: 'when edit del' 'text text text'; padding: 8px 6px 8px 10px; }
  .en-sched-head { display: none; }
  .en-sched-when { grid-area: when; flex-direction: row; align-items: center; gap: 6px; }
  .en-sched-text { grid-area: text; }
  .en-sched-edit { grid-area: edit; }
  .en-sched-del { grid-area: del; }
  .en-sched-submit { flex: 1 1 100%; }
}

/* =========================================================================
 * 区分の札(2026-11-10・参加者一覧の .p-npc-tag とメンション候補の .mention-tag で共通)
 * 色を変えるときはここと :root の --co-role-* だけを直す(両方の画面に効く)
 * ========================================================================= */
.co-role-tag { display: inline-flex; align-items: center; flex: none; height: 18px; padding: 0 7px; border: 0; border-radius: 6px; background: var(--co-role-user);
  color: #fff; font-family: var(--co-font); font-size: 10.5px; font-weight: 700; line-height: 1; letter-spacing: .02em; white-space: nowrap; }
/* 古い札の色(style.css の .p-npc-tag.member / .mention-tag など、同じ強さの指定)より必ず白文字・枠なしにする */
.co-role-tag[class] { color: #fff; border: 0; }
.co-role-tag.is-self { background: var(--co-role-self); }
.co-role-tag.is-owner { background: var(--co-role-owner); }
.co-role-tag.is-user { background: var(--co-role-user); }
.co-role-tag.is-admin { background: var(--co-role-admin); }
.co-role-tag.is-npc { background: var(--co-role-npc); }
.co-role-tag.is-guest { background: var(--co-role-guest); }
/* 1人に「あなた」「オーナー」など複数付いても、札ごとに読めるよう間をあける */
#screen-room .participant-list li { gap: 6px; }
#screen-room .participant-list .co-role-tag + .co-role-tag { margin-left: -2px; }
.mention-list .mention-tag.co-role-tag { margin-left: auto; }

/* =========================================================================
 * スマホのルーム画面(2026-11-10): 上から ヘッダー / ルーム / チャット入力 の3段を、縦にスクロールせず1画面に収める
 *  * 高さは実際に見えている高さ(--co-app-h: main.js が visualViewport から入れる。無ければ 100dvh)
 *    → Safari のアドレスバー・下のツールバー・ソフトウェアキーボードで見える高さが変わっても、入力欄は画面の中
 *  * ルームの枠は残った高さ。game.js のカメラが枠に合わせて縮小・拡大し、中央に置く(縦横比はそのまま)
 *  * iPhone のセーフエリア(切り欠き・ホームバー)は env(safe-area-inset-*) で避ける
 * PC(861px 以上)は変えない
 * ========================================================================= */
/* 2026-11-12 見直し: 高さを数値(--co-app-h)で決めず、固定配置の上端・下端(top: 0 / bottom: 0)に合わせる。
   iOS 26 の Safari は、下のツールバーの裏まで含んだ高さを innerHeight・100svh で返すことがあり、その高さで組むと
   入力欄がツールバーの下(固定配置が描かれない所)へ出て隠れていた。bottom: 0 はブラウザ自身が「固定配置の下端」と
   決めた位置(ほかのサイトの下の固定メニューと同じ位置)なので、ツールバーの表示・非表示・回転に追従する。
   キーボードを出している間だけ、見えている高さ(visualViewport)で組む(html.co-kbd)。
   それでも入力欄が見えている範囲の外へ出たときは、main.js が実際の位置を測って下の余白(--co-room-fix)を足す */
@media (max-width: 860px) {
  #screen-room.active { position: fixed; left: 0; right: 0; top: 0; bottom: 0; height: auto;
    margin: 0; padding: 0 0 var(--co-room-fix, 0px); box-sizing: border-box; overflow: hidden; overscroll-behavior: none; }
  html.co-kbd #screen-room.active { top: var(--co-vv-top, 0px); bottom: auto; height: var(--co-app-h, 100dvh); }
  #screen-room .room-body { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
  #screen-room .room-stage { flex: 1 1 auto; height: 100%; min-height: 0; }
  /* ① ヘッダー(ドット絵に重ねず、上の段として置く) */
  #screen-room .room-topbar, #screen-room.side-closed .room-topbar { position: relative; left: auto; right: auto; top: auto; flex: none; z-index: 8;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) calc(env(safe-area-inset-right, 0px) + 8px) 8px calc(env(safe-area-inset-left, 0px) + 8px);
    background: var(--co-room-bg); }
  /* ② ルーム(残りの高さ。足りないときはここを縮める) */
  #screen-room .room-viewport { flex: 1 1 0; min-height: 0; }
  /* ③ チャット入力(下の段。下のツールバー・ホームバーに隠れない) */
  #screen-room .toolbar { position: relative; left: auto; bottom: auto; transform: none; flex: none; width: auto; z-index: 8;
    margin: 0 calc(env(safe-area-inset-right, 0px) + 8px) calc(env(safe-area-inset-bottom, 0px) + 8px) calc(env(safe-area-inset-left, 0px) + 8px); }
  /* キーボードを出している間は下のセーフエリア(ホームバー)の上にキーボードがあるので、余白を足さない */
  html.co-kbd #screen-room .toolbar { margin-bottom: 8px; }
  /* 重ねていた部品は、段の中の位置へ */
  #screen-room .room-zoom { bottom: 10px; right: 10px; }
  #screen-room .room-capacity { top: 8px; right: 10px; }
  #screen-room .video-panel { top: 8px; }
  #screen-room .room-stage > .video-panel { top: calc(env(safe-area-inset-top, 0px) + 62px); }
  /* 最大化ボタンもヘッダーの段の中(ほかのボタンと同じ 38px・中心をそろえる) */
  #screen-room .room-topbar .room-side-open { position: static; flex: none; }
  /* 1行のまま(折り返さない)。狭いときはルーム名だけが縮んで「…」になる。ボタンは縮めない */
  #screen-room .room-topbar .header-left, #screen-room .room-topbar .header-right { flex-wrap: nowrap; }
  #screen-room .room-topbar .header-left > *, #screen-room .room-topbar .header-right > * { flex-shrink: 0; }
  #screen-room .room-topbar .header-left > #room-title { flex: 0 1 auto; min-width: 2.5em; max-width: none; }
  #screen-room .room-topbar .header-left > .room-mtg-soon { flex-shrink: 1; min-width: 0; }
  /* 「オープンルーム」は地球のアイコンだけ(文字は aria-label と、タップで出す説明に残す) */
  #screen-room .room-open-badge { width: 38px; padding: 0; justify-content: center; gap: 0; }
  #screen-room .room-open-badge .room-open-badge-text { display: none; }
}
@media (max-width: 360px) {
  #screen-room .room-leave-btn { padding: 0 10px; }
}
/* 縦向きでは「アドレスバーと下のツールバーを出した状態の高さ」(100svh)を上限にする。
   iOS 26 の Safari は下のツールバーがページの上に浮くので、見えている高さの値にツールバーの裏まで入ることがある。
   このページはルームの中で縦にスクロールしない(ツールバーが引っ込まない)ので、100svh より高くする必要はない */
/* (2026-11-12: 縦向きの「100svh を上限にする」は外した。iOS 26 の Safari では 100svh にもツールバーの裏が入ることがあり、
   入力欄が隠れる原因の1つになっていたため。上下は固定配置の上端・下端と実測の補正で決める) */
/* 横向き(高さが低い)ではチャット入力と操作を1行にして、ルームの高さを残す */
@media (max-width: 860px) and (min-width: 560px) and (max-height: 500px) {
  #screen-room .toolbar { flex-wrap: nowrap; }
  #screen-room .chat-input-wrap { flex: 1 1 auto; order: 1; }
  #screen-room .toolbar-buttons { order: 2; width: auto; }
}
/* 最大化ボタン: ヘッダーの右端のボタン列に置く(PC・スマホとも)。大きさは隣のボタンと同じ 38px */
.room-topbar .room-side-open { position: static; top: auto; right: auto; width: 38px; height: 38px; box-sizing: border-box; flex: none; }

/* ---------- 「家具を読み込んでいます」(2026-11-11) ----------
   原因: 文字色が var(--text) のままで、UI v2 で --text が濃い色(#1f1b2e)になったため、濃い半透明の地の上で読めなかった。
   黒いルームの上でも読めるよう、白い文字 + 濃い半透明の地。PC・スマホ共通。操作は妨げない(pointer-events: none) */
.room-viewport .furn-loading { top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 8px 16px; border-radius: 12px;
  background: rgba(20, 18, 32, .78); border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-family: var(--co-font);
  font-size: 13px; font-weight: 600; line-height: 1.5; letter-spacing: .02em; font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35); max-width: calc(100% - 32px); }

/* ---------- MY INFO のカード(2026-11-11) ----------
   原因: 旧デザイン(暗い地)の文字色 #e8e8e8(値)・#9a9a9a(項目名)・#fff(名前)のまま、白い窓に載っていた。
   値は本文の濃い色、項目名は一段薄い色 + 小さめ・太字で区別する(どちらも白地に 4.5:1 以上) */
.myinfo-card { color: var(--co-text); font-size: 13px; }
.myinfo-card .mi-name { color: var(--co-text); }
.myinfo-card .mi-row { padding: 3px 0; }
.myinfo-card .mi-label { color: #5f5b75; font-size: 11.5px; font-weight: 600; }
.myinfo-card .mi-value { color: var(--co-text); }
.myinfo-card .mi-room-link { color: var(--co-info); }
.myinfo-card .mi-room-link:hover { color: #1d4ed8; }

/* =========================================================================
 * 共通ウィンドウ(2026-11-11・docs/ui-design-rules.md「ウィンドウ」)
 *  * ヘッダー: 白・下に 1px の線・タイトル 16px 太字・右上にボタン(.co-win-btn)
 *  * 閉じるボタン: 30×30・角丸 8px・薄いグレー(--co-surface-2)の地・濃いグレー(--co-text-2)の × アイコン。ホバーで一段濃く
 *  * 本文だけがウィンドウの内側で縦にスクロールする(スクロールバーは角丸の内側。ウィンドウ全体はスクロールさせない)
 *  * ボタン列(.modal-actions)は下に固定
 * ========================================================================= */
.co-win-btn, .co-modal-x { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: var(--co-surface-2); color: var(--co-text-2);
  display: inline-grid; place-items: center; cursor: pointer; flex: none; box-shadow: none; min-width: 0; line-height: 1; transition: background .15s, color .15s; }
.co-win-btn:hover, .co-modal-x:hover { background: #e4e3ee; color: var(--co-text); }
.co-win-btn:active, .co-modal-x:active { background: #dad8e8; }
.co-win-btn:focus-visible, .co-modal-x:focus-visible { outline: 3px solid var(--co-primary-line); outline-offset: 1px; }
.co-win-btn .co-ic, .co-modal-x .co-ic { width: 16px; height: 16px; }
.app-win-btns { gap: 6px; align-items: center; }
.app-titlebar .app-win-btns .co-win-btn { padding: 0; min-width: 0; line-height: 1; }

/* 共通モーダル(#modal-backdrop)と重ねる確認(.modal-stacked)は、ヘッダー / 本文(スクロール) / ボタン列 の3段 */
#modal-backdrop > .modal, .modal-stacked > .modal { display: flex; flex-direction: column; padding: 0; overflow: hidden;
  max-height: min(88vh, calc(var(--co-app-h, 100dvh) - 24px)); }
#modal-backdrop > .modal > h3, .modal-stacked > .modal > h3 { flex: none; margin: 0; padding: 14px 60px 14px 20px; border-bottom: 1px solid var(--co-line);
  font-size: 16px; font-weight: 800; line-height: 1.5; }
#modal-backdrop > .modal > #modal-body, .modal-stacked > .modal > .modal-message { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 20px; }
#modal-backdrop > .modal > .modal-actions, .modal-stacked > .modal > .modal-actions { flex: none; margin: 0; padding: 12px 20px 16px; border-top: 1px solid var(--co-line); background: #fff; }
#modal-backdrop > .modal > .co-modal-x { top: 11px; right: 12px; }
@media (max-width: 640px) {
  #modal-backdrop, .modal-stacked { padding: calc(env(safe-area-inset-top, 0px) + 8px) 8px calc(env(safe-area-inset-bottom, 0px) + 8px); box-sizing: border-box; }
  #modal-backdrop > .modal, .modal-stacked > .modal { width: 100%; max-width: 100%; max-height: 100%; }
  #modal-backdrop > .modal > #modal-body, .modal-stacked > .modal > .modal-message { padding: 14px 16px; }
  #modal-backdrop > .modal > .modal-actions, .modal-stacked > .modal > .modal-actions { padding: 10px 16px 14px; }
}

/* 保存・キャンセル(共通): メインの操作を横幅いっぱい、その下にキャンセル(.co-actions-stack)。
   設定の窓(入室時お知らせ設定・ミーティングを作成・タイムレコーダー)で使う。高さは 44px でそろえる */
.co-actions-stack { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 16px; }
.co-actions-stack > .btn { width: 100%; min-height: 44px; font-size: 14px; border-radius: 10px; justify-content: center; flex: none; margin: 0; }
.co-actions-stack > .btn.co-cancel { background: var(--co-surface-2); color: var(--co-text-2); }
.co-actions-stack > .btn.co-cancel:hover { background: #e4e3ee; color: var(--co-text); }

/* ---------- 「メイトを探す」(2026-11-11) ----------
   タブ: 文字を省略しない(折り返さず、入りきらないときはタブの帯だけを横にスクロール)。
   原因: 3等分のグリッド(minmax(0, 1fr))で「リクエスト・ブロック」が列の幅で切れていた */
.co-panel .find-tabs { display: flex; grid-template-columns: none; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.co-panel .find-tabs::-webkit-scrollbar { display: none; }
.co-panel .find-tab { flex: 1 0 auto; width: auto; overflow: visible; white-space: nowrap; padding: 7px 10px; }   /* 旧 .find-tab の width: 100% を打ち消す */
/* 一覧のアバター: 参加者一覧と同じ「顔と上半身」。幅だけ決めて、高さは描いた縦横比のまま(つぶさない) */
.co-panel .user-item canvas.user-face { width: 36px; height: auto; border-radius: 10px; background: var(--co-primary-weak); }
/* 検索欄: 入力欄と「検索」ボタンの高さをそろえる。プレースホルダーは省略しない長さ */
.co-panel .find-search-controls { align-items: stretch; }
.co-panel .find-search-controls input { height: 40px; box-sizing: border-box; font-size: 14px; }
.co-panel .find-search-controls button { height: 40px; flex: none; padding: 0 16px; border: 0; border-radius: 10px; background: var(--co-primary); color: #fff; font-weight: 700; font-family: var(--co-font); cursor: pointer; }
/* 送ったリクエストの「取消」(赤) */
.co-panel .console-btn.mate-cancel { background: var(--co-danger); color: #fff; margin-left: 6px; }
.co-panel .console-btn.mate-cancel:hover { background: #d63c41; }
.co-panel .console-btn.mate-cancel:disabled { opacity: .6; }

/* ---------- ミーティングの予定(2026-11-11) ----------
   日付・時刻の入力欄が縦に長かった原因: 横並び用の flex: 1 1 140px(幅)が、パネルの中では縦並び(column)の
   .mtg-field に効いて「高さ 140px」になっていた。日時の欄は横並び・高さ 40px にそろえる(PC・スマホ・Safari 共通) */
.mtg-form .mtg-field:has(.mtg-date) { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
.mtg-form .mtg-field:has(.mtg-date) .mtg-label { flex: 1 1 100%; }
.mtg-form .mtg-input { height: 40px; min-height: 40px; box-sizing: border-box; padding: 0 10px; line-height: 38px; font-size: 14px; margin: 0;
  border: 1px solid var(--co-line); border-radius: 10px; background: #fff; color: var(--co-text); }
.mtg-form .mtg-input:focus { outline: none; border-color: var(--co-primary); box-shadow: 0 0 0 3px var(--co-primary-weak); }
.mtg-form .mtg-input.mtg-date { flex: 1 1 150px; width: auto; min-width: 0; }
.mtg-form .mtg-input.mtg-time { flex: 0 1 110px; width: auto; min-width: 0; }
.mtg-form .mtg-input[type="date"], .mtg-form .mtg-input[type="time"] { -webkit-appearance: none; appearance: none; display: block; text-align: left; }
.mtg-form .mtg-input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.mtg-form .mtg-field { gap: 6px; }
.mtg-form .mtg-label { font-size: 12px; font-weight: 700; color: var(--co-text-2); line-height: 1.4; margin: 0; }
/* 参加メンバー(メイト): 顔 + 名前。選んだ人は紫の地で分かる */
.mtg-form .mtg-members { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; border: 1px solid var(--co-line);
  border-radius: 10px; padding: 6px; background: #fff; }
.mtg-form .mtg-members[hidden] { display: none; }
.mtg-form .mtg-member { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; color: var(--co-text); font-size: 13px; margin: 0; font-weight: 500; }
.mtg-form .mtg-member:hover { background: var(--co-surface); }
.mtg-form .mtg-member.is-checked { background: var(--co-primary-weak); }
.mtg-form .mtg-member input[type="checkbox"] { margin: 0; flex: none; accent-color: var(--co-primary); width: 16px; height: 16px; }
.mtg-form .mtg-member-face { width: 28px; height: auto; border-radius: 7px; background: var(--co-primary-weak); image-rendering: pixelated; flex: none; }
.mtg-form .mtg-member-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mtg-form .mtg-member-help { margin: 2px 0 0; font-size: 11.5px; line-height: 1.6; color: #5f5b75; text-align: left; }
.mtg-form .mtg-member-help.is-empty { font-size: 12.5px; color: var(--co-text-2); }
.mtg-form .mtg-room-note { margin: 2px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--co-accent-ink); }
.mtg-form .mtg-room-note[hidden] { display: none; }
.mtg-form .mtg-actions { margin-top: 4px; }
.mtg-detail-url { font-size: 12px; color: var(--co-text-2); word-break: break-all; }

/* 掲示板の「一覧へ戻る」「スレッドへ戻る」(2026-11-11): 窓の下に横幅いっぱいの控えめなボタン(共通の .co-actions-stack) */
.bd-back-bottom { margin-top: 14px; }

/* =========================================================================
 * 家具の配置を編集(2026-11-11)
 *  PC: 窓を広く(最大 1180px)・左の一覧の列を 340px に広げる(以前は 190px で、家具の一覧が横にあふれていた)。
 *      家具はグリッドで縦にスクロール(横スクロールにしない)。カテゴリは折り返す。プレビューは残りの幅(縦横比はそのまま)
 *  スマホ: 一覧 → プレビュー の縦並び。家具は縦スクロールのグリッド。カテゴリの帯だけ横スクロール。
 *      窓は画面の幅に収め、ページ全体は横にスクロールさせない。保存・キャンセルは窓の下に固定(.modal-actions)
 * ========================================================================= */
#modal-backdrop > .modal.wide:has(.re2) { width: min(1180px, 96vw); }
.modal .re2 { min-width: 0; }
.modal .re2-main { gap: 16px; min-width: 0; }
.modal .re2-catalog-wrap { width: 340px; flex: 0 0 340px; min-width: 0; }
.modal .re2-tabs { flex-wrap: nowrap; gap: 6px; }
.modal .re2-tab { flex: 1 1 0; min-width: 0; white-space: nowrap; padding: 8px 6px; font-size: 13px; font-weight: 700; border-radius: 10px;
  border: 1px solid var(--co-line); background: var(--co-surface); color: var(--co-text-2); }
.modal .re2-tab.sel { border-color: var(--co-primary); background: var(--co-primary-weak); color: var(--co-primary); }
.modal .re2-tab[hidden] { display: none !important; }
.modal .re2-catalog { border: 1px solid var(--co-line); border-radius: 12px; background: #fff; padding: 8px; max-height: 520px; overflow-y: auto; overflow-x: hidden; }
.modal .re2-catalog:not(.re2-png-catalog):not(.re2-npc-catalog) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.modal .re2-catalog.re2-png-catalog { display: flex; flex-direction: column; gap: 8px; grid-auto-flow: row; grid-template-columns: none; }
.modal .re2-catalog.re2-png-catalog.hidden, .modal .re2-catalog.hidden { display: none; }
.modal .re2-png-catalog .fcat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.modal .re2-png-catalog .fcat-tab { padding: 5px 11px; font-size: 12px; border: 1px solid var(--co-line); background: var(--co-surface); color: var(--co-text-2); white-space: nowrap; flex: none; }
.modal .re2-png-catalog .fcat-tab.sel { border-color: var(--co-primary); background: var(--co-primary-weak); color: var(--co-primary); font-weight: 700; }
.modal .re2-png-catalog .fcat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.modal .re2-png-catalog .fcat-item { min-width: 0; padding: 8px 6px 7px; gap: 5px; border: 1px solid var(--co-line); background: var(--co-surface); border-radius: 10px; }
.modal .re2-png-catalog .fcat-item.sel { border-color: var(--co-primary); background: var(--co-primary-weak); box-shadow: 0 0 0 1px var(--co-primary) inset; }
.modal .re2-png-catalog .fcat-thumb { width: 72px; height: 60px; background: #fff; }
.modal .re2-png-catalog .fcat-name { font-size: 11.5px; color: var(--co-text); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.modal .re2-stage { flex: 1 1 auto; min-width: 0; }
.modal .re2-stage .re-preview { width: 100%; height: auto; max-height: 62vh; object-fit: contain; }
.modal .re-png-bar { flex-wrap: wrap; min-width: 0; }
@media (max-width: 900px) and (min-width: 641px) {
  .modal .re2-catalog-wrap { width: 280px; flex-basis: 280px; }
  .modal .re2-png-catalog .fcat-grid { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); }
}
@media (max-width: 640px) {
  #modal-backdrop > .modal > #modal-body:has(.re2) { overflow-x: hidden; }
  .modal .re2-main { flex-direction: column; gap: 12px; }
  .modal .re2-catalog-wrap { width: 100%; flex: none; }
  .modal .re2 .re-bar { gap: 8px; }
  .modal .re2 .re-bar > * { min-width: 0; max-width: 100%; }
  .modal .re2-catalog { max-height: 42vh; }
  .modal .re2-catalog:not(.re2-png-catalog):not(.re2-npc-catalog) { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .modal .re2-catalog-wrap .re2-catalog.re2-png-catalog { overflow-x: hidden; overflow-y: auto; max-height: 42vh; grid-auto-flow: row; grid-auto-columns: auto; }
  /* カテゴリの帯だけ横スクロール(折り返すと一覧が下へ押し出される) */
  .modal .re2-png-catalog .fcat-tabs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 2px; scrollbar-width: thin; }
  .modal .re2-png-catalog .fcat-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .modal .re2-png-catalog .fcat-thumb { width: 64px; height: 52px; }
  .modal .re2-png-card { width: auto; }
  .modal .re2-stage .re-preview { max-height: 46vh; }
  .modal .re-png-bar { position: static; }
}

/* ---- AI タスクの承認(2026-11-11・AI-AGENT-1) ---- */
.co-agent-approval .modal { max-width: 520px; }
.co-agent-approval-args { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.co-agent-approval-args th, .co-agent-approval-args td { text-align: left; vertical-align: top; padding: 6px 8px;
  border-bottom: 1px solid var(--co-line, #e5e7eb); word-break: break-word; }
.co-agent-approval-args th { width: 32%; color: var(--co-muted, #6b7280); font-weight: 600; }
.co-agent-approval-prompt { color: var(--co-muted, #6b7280); font-size: 13px; }

/* 起動中(2026-11-14): ログインの状態を確かめ終わるまで。ログイン画面を先に見せない */
#screen-boot.active { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh;
  background: var(--co-bg, #f7f6fb); margin-left: 0; padding-top: 0; }
#screen-boot .boot-splash { display: flex; flex-direction: column; align-items: center; gap: 18px; }
#screen-boot .boot-logo { width: 200px; height: auto; opacity: .92; }
#screen-boot .boot-spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(109, 74, 255, .18);
  border-top-color: var(--co-primary, #6d4aff); animation: co-boot-spin .9s linear infinite; }
@keyframes co-boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #screen-boot .boot-spinner { animation-duration: 2.4s; } }
