@font-face {
  font-family: 'DotGothic16';
  src: url('/fonts/DotGothic16-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --wall: #232741;
  --ink: #0f1120;
  --accent: #ffb84d;
  --t-hi: rgba(255, 255, 255, 0.9);
  --t-mid: rgba(255, 255, 255, 0.55);
  --t-low: rgba(255, 255, 255, 0.3);
  --st-working: #6dd672;
  --st-meeting: #5aa7e8;
  --st-break: #e8b45a;
  --st-away: #8b90a0;
  --st-error: #e8635a;
  --st-offline: #4a4f5e;
  --st-idle: #7aa0b0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  background: #141729;
  font-family: 'DotGothic16', monospace;
  display: flex;
  flex-direction: column;
}

button, input { font-family: inherit; }

/* ---- ヘッダ ---- */
header {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: var(--ink);
  border-bottom: 2px solid #2a2f4d;
  flex: none;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--t-hi); font-size: 18px; letter-spacing: 1px; }
.logo .px { width: 14px; height: 14px; background: var(--accent); box-shadow: 4px 4px 0 #0a0c16; }
.hspace { flex: 1; }
.hstat { color: var(--t-mid); font-size: 15px; }
.hstat b { color: var(--t-hi); font-weight: normal; }
.clock { font-family: monospace, 'DotGothic16'; color: var(--t-hi); font-size: 16px; letter-spacing: 1px; }
.conn { display: flex; align-items: center; gap: 6px; color: var(--t-mid); font-size: 13px; }
.conn .dot { width: 8px; height: 8px; background: var(--st-working); }
.conn.bad .dot { background: var(--st-error); }
.hbtn { margin-left: 14px; background: #1c2038; border: 2px solid #2a2f4d; color: var(--t-mid); font-size: 14px; padding: 4px 8px; cursor: pointer; }

/* キャラ詳細パネル（24hタイムライン・稼働時間） */
.detail {
  position: absolute; left: 16px; top: 16px; width: 288px;
  background: rgba(15, 17, 32, 0.96); border: 2px solid #2a2f4d; box-shadow: 6px 6px 0 #0a0c16;
  display: none; z-index: 8;
}
.detail.open { display: block; }
.detail h2 {
  font-size: 14px; color: var(--t-hi); font-weight: normal; letter-spacing: 1px;
  padding: 10px 14px; border-bottom: 2px solid #2a2f4d; display: flex; align-items: center;
}
.detail h2 .close { margin-left: auto; width: 26px; height: 26px; flex: none; background: #22242f; border: 2px solid #3d445e; color: var(--t-hi); font-size: 13px; cursor: pointer; line-height: 1; }
.detail h2 .close:hover { background: #e8635a; border-color: #e8635a; color: #fff; }
.detail-body { padding: 12px 14px; font-size: 12px; color: var(--t-mid); line-height: 1.9; }
.detail-body .cur { display: flex; align-items: center; gap: 7px; color: var(--t-hi); font-size: 13px; margin-bottom: 4px; }
.detail-body .cur .cd { width: 8px; height: 8px; flex: none; }
.detail-body .big { color: var(--t-hi); font-size: 15px; }
.detail-body .tl { display: flex; height: 16px; margin: 8px 0 4px; border: 1px solid #2a2f4d; overflow: hidden; }
.detail-body .tlseg { height: 100%; }
.detail-body .tlax { display: flex; justify-content: space-between; color: var(--t-low); font-size: 10px; font-family: monospace; }
.detail-body .brk { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.detail-body .brk .d { width: 8px; height: 8px; flex: none; }
.hbtn:hover { border-color: var(--accent); }
/* ヘッダボタンのホバーで即座にメニュー名を表示（data-tip）。ネイティブtitleより速く見やすい */
.hbtn { position: relative; }
.hbtn::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 7px); right: 0;
  background: rgba(15, 17, 32, 0.97); border: 2px solid #2a2f4d; color: var(--t-hi);
  font-size: 11px; white-space: nowrap; padding: 4px 8px; box-shadow: 3px 3px 0 #0a0c16;
  opacity: 0; pointer-events: none; transform: translateY(-2px); transition: opacity 0.12s, transform 0.12s; z-index: 30;
}
.hbtn:hover::after { opacity: 1; transform: translateY(0); }
body.shot .hbtn::after { display: none; }

/* 接続断: キャンバスの彩度を落とす（表示が固まっているサイン） */
canvas#cv.stale { filter: saturate(0.35) brightness(0.8); transition: filter 0.4s; }

/* スクリーンショットモード: UIを隠しCanvasだけ */
body.shot header, body.shot .mybar, body.shot .boardbtn, body.shot .zoombtn, body.shot .panel,
body.shot .banner, body.shot .hbtn, body.shot #loading { display: none !important; }
body.shot .stage { padding: 0; }

/* サイネージモード: フルスクリーン+大時計オーバーレイ */
body.signage header, body.signage .mybar, body.signage .boardbtn, body.signage .zoombtn, body.signage .hbtn { display: none; }
.signage-clock { display: none; }
body.signage .signage-clock {
  display: block; position: fixed; top: 20px; right: 28px; z-index: 20;
  font-family: 'DotGothic16', monospace; color: var(--t-hi); font-size: 30px;
  text-shadow: 3px 3px 0 #0a0c16; letter-spacing: 2px; text-align: right; line-height: 1.3;
}
body.signage .stage { height: 100vh; }

/* ---- 接続断バナー ---- */
.banner {
  display: none;
  background: #3d2626;
  color: #e8b0a8;
  font-size: 13px;
  padding: 6px 20px;
  border-bottom: 2px solid #5a3535;
}
.banner.show { display: block; }

/* ---- ステージ ---- */
.stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
canvas#cv { image-rendering: pixelated; background: var(--wall); max-width: 100%; height: auto; touch-action: none; will-change: transform; }

/* ---- 在席ボードパネル ---- */
.panel {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 300px;
  max-height: calc(100% - 32px);
  background: rgba(15, 17, 32, 0.94);
  border: 2px solid #2a2f4d;
  box-shadow: 6px 6px 0 #0a0c16;
  display: none;
  flex-direction: column;
}
.panel.open { display: flex; }
.panel h2 {
  font-size: 14px; color: var(--t-hi); font-weight: normal; letter-spacing: 2px;
  padding: 12px 14px 10px; border-bottom: 2px solid #2a2f4d;
  display: flex; align-items: center;
}
.panel h2 span { color: var(--t-low); margin-left: 8px; letter-spacing: 0; }
.panel h2 .close { margin-left: auto; width: 26px; height: 26px; flex: none; background: #22242f; border: 2px solid #3d445e; color: var(--t-hi); font-size: 13px; cursor: pointer; line-height: 1; }
.panel h2 .close:hover { background: #e8635a; border-color: #e8635a; color: #fff; }
.rows { flex: 1; padding: 6px 0; overflow-y: auto; }
.row { display: flex; align-items: center; gap: 9px; padding: 6px 14px; font-size: 13px; }
.row .d { width: 8px; height: 8px; flex: none; }
.row .nm { color: var(--t-hi); white-space: nowrap; }
.row .lb { color: var(--t-low); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .ago { margin-left: auto; color: var(--t-mid); font-size: 11px; font-family: monospace; flex: none; }
.row.off .nm, .row.off .lb { color: var(--t-low); }
.aibadge { font-size: 9px; color: #8fb7ff; border: 1px solid #3d4a77; padding: 0 3px; line-height: 12px; flex: none; }
.cmts { border-top: 2px solid #2a2f4d; padding: 9px 14px 7px; }
.cmts .ct { font-size: 11px; color: var(--t-mid); letter-spacing: 2px; margin-bottom: 7px; }
.crow { display: flex; gap: 7px; align-items: baseline; font-size: 11px; margin-bottom: 6px; }
.crow .cn { color: var(--t-hi); flex: none; }
.crow .cx { color: var(--t-mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow .ago { margin-left: auto; color: var(--t-low); font-size: 10px; font-family: monospace; flex: none; }
.legend {
  border-top: 2px solid #2a2f4d; padding: 10px 14px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 4px;
}
.legend .lg { display: flex; align-items: center; gap: 5px; color: var(--t-mid); font-size: 10px; }
.legend .d { width: 7px; height: 7px; }

.boardbtn {
  position: absolute; right: 16px; top: 16px;
  background: rgba(15, 17, 32, 0.94); border: 2px solid #2a2f4d; box-shadow: 4px 4px 0 #0a0c16;
  color: var(--t-mid); font-size: 12px; padding: 8px 12px; cursor: pointer;
}
/* 地図のズームを戻すボタン（ズーム中のみ表示） */
.zoombtn {
  position: absolute; right: 16px; top: 54px; display: none;
  background: rgba(15, 17, 32, 0.94); border: 2px solid var(--accent); box-shadow: 4px 4px 0 #0a0c16;
  color: var(--accent); font-size: 12px; padding: 8px 12px; cursor: pointer; z-index: 6;
}
.zoombtn.show { display: block; }

/* ---- 会議室チャット（会議中のみ表示） ---- */
.mchat {
  position: absolute; right: 16px; bottom: 16px; width: 300px; max-height: min(60%, 420px);
  display: none; flex-direction: column;
  background: rgba(15, 17, 32, 0.96); border: 2px solid var(--st-meeting); box-shadow: 6px 6px 0 #0a0c16;
  z-index: 9;
}
.mchat.show { display: flex; }
.mchat-head {
  display: flex; align-items: center; gap: 7px; padding: 9px 12px;
  color: var(--t-hi); font-size: 13px; letter-spacing: 1px; border-bottom: 2px solid #2a2f4d;
}
.mchat-head .mdot { width: 8px; height: 8px; background: var(--st-meeting); flex: none; }
.mchat-log { flex: 1; overflow-y: auto; padding: 8px 12px; min-height: 90px; }
.mchat-log .mempty { color: var(--t-low); font-size: 12px; text-align: center; padding: 12px 0; }
.mrow { font-size: 12px; line-height: 1.6; margin-bottom: 6px; word-break: break-word; }
.mrow .mn { color: #8fb7ff; margin-right: 6px; }
.mrow .mx { color: var(--t-hi); }
.mrow .mt { color: var(--t-low); font-size: 10px; font-family: monospace; margin-left: 6px; }
.mchat-input { display: flex; gap: 6px; padding: 8px 10px; border-top: 2px solid #2a2f4d; }
.mchat-input input {
  flex: 1; min-width: 0; background: #1c2038; border: 2px solid #2a2f4d; color: var(--t-hi);
  font-size: 13px; padding: 7px 8px; outline: none;
}
.mchat-input input:focus { border-color: #3d4a77; }
.mchat-input button {
  background: var(--st-meeting); color: #0a1420; border: 2px solid var(--st-meeting);
  font-size: 13px; padding: 7px 12px; cursor: pointer; flex: none;
}
.mchat-input button:disabled { opacity: 0.5; cursor: default; }

/* ---- マイステータスバー ---- */
.mybar {
  min-height: 56px;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: var(--ink);
  border-top: 2px solid #2a2f4d;
  flex-wrap: wrap;
  flex: none;
}
.mybar.show { display: flex; }
.me { color: var(--t-mid); font-size: 13px; flex: none; }
.me b { color: var(--t-hi); font-weight: normal; }
.stbtn {
  font-size: 13px; padding: 7px 12px; background: #1c2038; color: var(--t-mid);
  border: 2px solid #2a2f4d; cursor: pointer; flex: none;
}
.stbtn.active { background: var(--accent); color: #1a1204; border-color: var(--accent); box-shadow: 3px 3px 0 #0a0c16; }
.dndbtn {
  font-size: 12px; padding: 7px 10px; background: #1c2038; color: var(--t-mid);
  border: 2px solid #2a2f4d; cursor: pointer; flex: none;
}
.dndbtn.active { background: #c8352e; color: #fff; border-color: #e8635a; }
/* ？？？（お遊びの隠しボタン） */
.secretbtn {
  font-size: 13px; padding: 7px 10px; background: #17131f; color: #5a5f7e; letter-spacing: 1px;
  border: 2px dashed #3a3050; cursor: pointer; flex: none;
}
.secretbtn:hover { color: var(--accent); border-color: var(--accent); border-style: solid; }
/* ヘッダのオフィス雰囲気メーター */
.mood-meter { font-size: 12px; color: var(--t-mid); background: #1c2038; border: 2px solid #2a2f4d; padding: 3px 9px; margin-left: 10px; flex: none; }
/* 呼ばれ通知トースト */
.poke-toast {
  position: absolute; left: 50%; top: 60px; transform: translateX(-50%) translateY(-12px);
  background: var(--accent); color: #1a1204; border: 2px solid #d89a30; box-shadow: 4px 4px 0 #0a0c16;
  padding: 10px 18px; font-size: 14px; z-index: 18; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.poke-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* 在席ボードのフィルタ */
.filters { display: flex; gap: 6px; margin-bottom: 8px; }
.fchip {
  font-size: 11px; padding: 4px 10px; background: #1c2038; color: var(--t-mid);
  border: 2px solid #2a2f4d; cursor: pointer;
}
.fchip.active { background: var(--accent); color: #1a1204; border-color: var(--accent); }
/* 詳細パネルの行（接続鮮度・セッション内訳） */
.detail-body .drow { font-size: 12px; color: var(--t-mid); margin: 6px 0; }
.detail-body .pokebtn { margin: 8px 0 4px; padding: 6px 14px; }
/* タスクリンク（E3） */
.detail-body .tasklink { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); word-break: break-all; }
.detail-body .tasklink:hover { color: #ffd08a; }
/* 呼ぶ＋一言（D2） */
.pokewrap { display: flex; gap: 6px; margin: 8px 0 4px; align-items: center; }
.pokewrap .pokemsg { flex: 1; min-width: 0; background: #1c2038; border: 2px solid #2a2f4d; color: var(--t-hi); font-family: inherit; font-size: 12px; padding: 5px 8px; }
.pokewrap .pokemsg:focus { outline: none; border-color: var(--accent); }
/* 呼ぶボタンは基底 .cta の width:100%/大きな文字を上書きし、内容幅に収める（入力欄を潰さない） */
.pokewrap .pokebtn { flex: none; width: auto; margin: 0; padding: 6px 12px; font-size: 13px; letter-spacing: 1px; }
/* 今日の記録（E1/E2） */
.rec-card { margin: 0; max-height: min(90vh, 760px); overflow-y: auto; width: min(92vw, 560px);
  background: var(--ink); border: 2px solid #2a2f4d; box-shadow: 8px 8px 0 #0a0c16; padding: 28px 32px 32px; }
.rec-lead { font-size: 12px; color: var(--t-mid); margin: 2px 0 12px; }
.rec-sec { font-size: 12px; color: var(--accent); font-weight: bold; margin: 14px 0 8px; }
.recrow { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.recnm { flex: none; width: 84px; font-size: 12px; color: var(--t-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recbar { flex: 1; display: flex; height: 12px; background: #1c2038; border-radius: 2px; overflow: hidden; }
.recseg { height: 100%; }
.recseg.w { background: var(--st-working); }
.recseg.m { background: var(--st-meeting); }
.recseg.b { background: var(--st-break); }
.rectot { flex: none; width: 42px; text-align: right; font-size: 11px; color: var(--t-mid); }
.rectrack { flex: 1; position: relative; height: 12px; background: #1c2038; border-radius: 2px; overflow: hidden; }
/* 記録モーダルのタイムライン帯。詳細パネルの .detail-body .tlseg（フレックス）と衝突しないよう
   必ず .rectrack 配下にスコープする（グローバル .tlseg 禁止） */
.rectrack .tlseg { position: absolute; top: 0; height: 100%; }
.rec-legend { display: flex; gap: 14px; margin-top: 12px; }
.reclg { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--t-mid); }
.reclgd { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.fld { display: flex; align-items: center; gap: 7px; }
.fld label { color: var(--t-low); font-size: 12px; flex: none; }
.fld input {
  background: #1c2038; border: 2px solid #2a2f4d; color: var(--t-hi);
  font-size: 13px; padding: 6px 8px; outline: none;
}
.fld input:focus { border-color: #3d4a77; }
.cnt { color: var(--t-low); font-size: 11px; font-family: monospace; }
.memo-set {
  font-size: 13px; padding: 7px 12px; background: var(--accent); color: #1a1204;
  border: 2px solid var(--accent); box-shadow: 3px 3px 0 #0a0c16; cursor: pointer; flex: none;
}
.memo-set.done { box-shadow: none; transform: translate(2px, 2px); }
.send {
  font-size: 13px; padding: 7px 14px; background: var(--accent); color: #1a1204;
  border: 2px solid var(--accent); box-shadow: 3px 3px 0 #0a0c16; cursor: pointer; flex: none;
}
.send:disabled { background: #1c2038; color: var(--t-low); border-color: #2a2f4d; box-shadow: none; cursor: not-allowed; }
.leave {
  margin-left: auto; font-size: 12px; padding: 7px 12px; background: none;
  color: var(--t-mid); border: 2px solid #2a2f4d; cursor: pointer; flex: none;
}
/* リアクション（絵文字） */
.emote-wrap { position: relative; flex: none; }
.emote-btn {
  font-size: 15px; line-height: 1; padding: 6px 9px; background: #1c2038;
  border: 2px solid #2a2f4d; cursor: pointer;
}
.emote-btn:hover { border-color: var(--accent); }
.emote-pop {
  display: none; position: absolute; bottom: 46px; left: 0; z-index: 15;
  background: var(--ink); border: 2px solid #2a2f4d; box-shadow: 4px 4px 0 #0a0c16;
  padding: 6px; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 168px;
}
.emote-pop.open { display: grid; }
.emote-item { font-size: 18px; line-height: 1; padding: 6px; background: none; border: none; cursor: pointer; }
.emote-item:hover { background: #2a2f4d; }
/* 在席ボードの未読バッジ */
.unread {
  display: none; margin-left: 6px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #e8635a; color: #fff; font-size: 10px; line-height: 16px;
  text-align: center; vertical-align: middle;
}
.unread.show { display: inline-block; }

/* ---- ツールチップ ---- */
.tip {
  position: absolute; display: none;
  background: rgba(15, 17, 32, 0.96); border: 2px solid #3d4a77; box-shadow: 4px 4px 0 #0a0c16;
  padding: 9px 12px; font-size: 12px; color: var(--t-mid); line-height: 1.7;
  pointer-events: none; z-index: 5; max-width: 320px;
}
.tip .nm { color: var(--t-hi); font-size: 13px; }

/* ---- ローディング ---- */
.loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: var(--t-mid); font-size: 14px;
}
.loading .px { width: 18px; height: 18px; background: var(--accent); box-shadow: 5px 5px 0 #0a0c16; }
.loading.hide { display: none; }

/* ---- 出社ページ ---- */
.checkin-body { align-items: center; justify-content: center; }
.card {
  width: min(640px, calc(100vw - 32px));
  background: var(--ink); border: 2px solid #2a2f4d; box-shadow: 8px 8px 0 #0a0c16;
  padding: 36px 44px 40px; margin: 24px auto;
}
.card h1 { font-size: 22px; color: var(--t-hi); font-weight: normal; letter-spacing: 2px; margin-bottom: 6px; display: flex; align-items: center; gap: 12px; }
.card h1 .px { width: 14px; height: 14px; background: var(--accent); box-shadow: 4px 4px 0 #0a0c16; flex: none; }
.lead { font-size: 13px; color: var(--t-mid); margin-bottom: 26px; line-height: 1.8; }
.cfld { margin-bottom: 20px; }
.cfld label { display: block; font-size: 12px; color: var(--t-mid); letter-spacing: 2px; margin-bottom: 7px; }
.cfld input {
  width: 100%; font-size: 15px; color: var(--t-hi);
  background: #1c2038; border: 2px solid #2a2f4d; padding: 10px 12px; outline: none;
}
.cfld .hint { font-size: 11px; color: var(--t-low); margin-top: 5px; }
.cols { display: flex; gap: 20px; flex-wrap: wrap; }
.cols .cfld { flex: 1; min-width: 200px; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 8px 0 26px; }
.ch {
  position: relative; aspect-ratio: 1; background: #1c2038; border: 2px solid #2a2f4d;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.ch canvas { image-rendering: pixelated; width: 39px; height: 78px; }
.ch.sel { border-color: var(--accent); background: #242038; box-shadow: 3px 3px 0 #0a0c16; }
.cta {
  width: 100%; font-size: 16px; letter-spacing: 4px; padding: 14px;
  background: var(--accent); color: #1a1204; border: 2px solid var(--accent);
  box-shadow: 4px 4px 0 #0a0c16; cursor: pointer;
}
.cta:disabled { background: #1c2038; color: var(--t-low); border-color: #2a2f4d; box-shadow: none; cursor: not-allowed; }
.err { display: none; background: #3d2626; color: #e8b0a8; font-size: 13px; padding: 10px 12px; margin-bottom: 16px; border: 2px solid #5a3535; }
.err.show { display: block; }
.foot { margin-top: 16px; font-size: 11px; color: var(--t-low); text-align: center; line-height: 1.8; }

/* ---- 出社バー（未出社時） ---- */
.joinbar {
  min-height: 56px; display: none; align-items: center; gap: 14px;
  padding: 8px 20px; background: var(--ink); border-top: 2px solid #2a2f4d; flex: none;
}
.joinbar.show { display: flex; }
.joinlead { color: var(--t-mid); font-size: 13px; }
.joinlead-mobile { display: none; color: var(--t-low); font-size: 12px; }
.joinbtn {
  font-size: 14px; letter-spacing: 2px; padding: 9px 22px; cursor: pointer;
  background: var(--accent); color: #1a1204; border: 2px solid var(--accent); box-shadow: 3px 3px 0 #0a0c16;
}

/* ---- 出社モーダル ---- */
.modal {
  position: fixed; inset: 0; z-index: 20; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(6, 8, 18, 0.78);
}
/* 入場ゲート: 認証するまでオフィスを一切見せない（背景は完全不透明・2026-07-11） */
.modal.gate { background: #0f1120; }
body.gated header, body.gated .stage, body.gated .joinbar,
body.gated .banner, body.gated .mybar { visibility: hidden; }
.modal.open { display: flex; }
.modal-card { margin: 0; max-height: min(90vh, 760px); overflow-y: auto; }
.modal-title {
  font-size: 20px; color: var(--t-hi); font-weight: normal; letter-spacing: 2px;
  margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
}
.modal-title .px { width: 14px; height: 14px; background: var(--accent); box-shadow: 4px 4px 0 #0a0c16; flex: none; }
.modal-title .close {
  margin-left: auto; width: 32px; height: 32px; flex: none;
  background: #2a2f4d; border: 2px solid #4a5480; color: var(--t-hi);
  font-size: 15px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.modal-title .close:hover { background: #e8635a; border-color: #e8635a; color: #fff; }
.modal-or { text-align: center; font-size: 11px; color: var(--t-low); letter-spacing: 2px; margin: 16px 0 10px; }

/* ---- 更新情報（左上PC） ---- */
.changelog-card {
  width: min(560px, calc(100vw - 32px));
  background: var(--ink); border: 2px solid #2a2f4d; box-shadow: 8px 8px 0 #0a0c16;
  padding: 28px 32px 32px;
}
.changelog-lead { font-size: 12px; color: var(--t-low); margin-bottom: 18px; line-height: 1.7; }
.changelog-body { display: flex; flex-direction: column; gap: 20px; }
.cl-date {
  font-size: 13px; color: var(--accent); letter-spacing: 1px; margin-bottom: 9px;
  padding-bottom: 5px; border-bottom: 1px solid #2a2f4d;
}
.cl-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.cl-list li { font-size: 13px; color: var(--t-mid); line-height: 1.7; }

/* ---- 会議メモ（共有ホワイトボード） ---- */
.memo-card { width: min(680px, calc(100vw - 32px)); }
.memo-badge {
  display: inline-block; font-size: 13px; padding: 7px 14px; margin-bottom: 10px;
  border: 2px solid; letter-spacing: 1px;
}
.memo-badge.edit { color: #bff0c4; background: rgba(60,120,70,0.28); border-color: #4f9a5c; }
.memo-badge.view { color: #cfd3e0; background: rgba(90,100,130,0.22); border-color: #4a5170; }
.memo-meta { font-size: 11px; color: var(--t-low); margin-bottom: 10px; }
.memo-text {
  width: 100%; height: 300px; max-height: 55vh; resize: vertical; overflow-y: auto;
  background: #f4f2ea; color: #23202c; border: 2px solid #2a2f4d; padding: 12px 14px;
  font-size: 14px; line-height: 1.7; outline: none; box-sizing: border-box;
  font-family: inherit; white-space: pre-wrap; word-break: break-word;
}
.memo-text:read-only { background: #e6e4dc; color: #3a3742; cursor: default; }
.memo-text:focus { border-color: #3d4a77; }
.memo-actions { display: flex; gap: 10px; margin-top: 14px; }
.memo-actions .cta { width: auto; flex: 1; padding: 11px; font-size: 14px; letter-spacing: 2px; }
.memo-hint { margin-top: 10px; font-size: 12px; color: var(--t-low); min-height: 16px; }
.memo-hint.err { color: #e8a8a0; }
.cta.ghost { background: none; color: var(--t-mid); border-color: #2a2f4d; box-shadow: none; font-size: 14px; }
.cta.ghost:hover { border-color: #3d4a77; color: var(--t-hi); }

@media (max-width: 900px) {
  .clock, .conn { display: none; }
  .panel { width: min(300px, 85vw); }
  .card { padding: 24px 20px 28px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* スマホ: mybarをコンパクトにして地図の面積を確保。地図は指でパン・ピンチズームできる */
@media (max-width: 640px) {
  header { padding: 0 12px; }
  .logo { font-size: 15px; }
  .stage { touch-action: none; }
  .mybar { padding: 6px 10px; gap: 6px; max-height: 42vh; overflow-y: auto; }
  .me { width: 100%; font-size: 12px; }
  .mybar .fld { gap: 4px; }
  .mybar .fld label { font-size: 11px; }
  /* インライン幅(150/220px)を上書きして可変に */
  #memo { width: auto !important; flex: 1 1 120px; min-width: 90px; }
  #comment { width: auto !important; flex: 1 1 150px; min-width: 110px; }
  .stbtn { padding: 8px 10px; }
  .boardbtn, .zoombtn { font-size: 11px; padding: 6px 9px; }
  .zoombtn { top: 50px; }
  .tip { max-width: 240px; }
}

/* スマホ・タブレットからも出社可能（2026-07-11 閲覧のみモード撤廃に伴い解禁。
   出社がオフィスを見る唯一の入口になったため、全端末で出社できるようにする） */
