/* 天下大勢：玩家互動與名帖的樣式（全部拆包第 67 批從 style.css 切出來，規則一個字不改；載入的先後在 index.html，同權重後蓋前）。 */

/* ── 玩家之間的互動（第一層）：場景卡底下「此地還有」與玩家卡 ── */
/* 只認 div：「此地還能做」的摺疊是 <details class="fold here">（FB-087），寫成 .here 的話它也被套上虛線、上緣與 flex（FB-107 順手修） */
div.here { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 14px; line-height: 1.6; }
.here-k { color: var(--ink-2); font-size: 13px; }
.peer-name { background: none; border: 0; padding: 2px 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.peer-name small { color: var(--ink-2); text-decoration: none; display: inline-block; }
.here-more { font-size: 13px; }
.peer-head h3 { margin: 0 0 2px; font-size: 20px; }
.peer-record { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); }
.peer-title { color: var(--ink-2); font-size: 13px; }
/* 名分（結義第一批）：名號底下一枚朱框楷書小籤 */
.peer-jieyi {
  display: inline-block; margin: 2px 0 4px; padding: 1px 8px; border: 1.5px solid var(--accent); border-radius: 4px;
  font: 700 13px/1.5 var(--kai); letter-spacing: 0.08em; color: var(--accent); background: var(--card);
}
.peer-title .peer-seg { white-space: nowrap; }
/* 親衛隊長第四批：他身邊的那一位（「親衛隊長小明（將軍）」），楷書一行、金色細線起頭 */
.peer-guard { font: 14px/1.6 var(--kai); color: var(--ink); letter-spacing: 0.04em; padding-left: 8px; border-left: 2px solid var(--gold); margin-top: 4px; }
.peer-arts { display: grid; gap: 8px; margin: 14px 0; }
.peer-art { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.peer-art small { color: var(--ink-2); flex: none; }
.peer-art b { flex: 1; min-width: 0; }
.peer-art span { flex: none; color: var(--ink-2); font-size: 13px; }
.peer-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
/* 卡上的鈕（FB-220）：名字不折行（贈物送滿之後那一句長，以前把「贈銀兩」擠成一字一行、鈕高 103px）。說明放得下就跟名字並排
   （「身上 50 兩」），放不下自己換到名字底下一行、照空白與標點折（keep-all，同 FB-132 切段的想法；一段太長才硬折，不撐破鈕） */
.peer-acts .btn { flex-wrap: wrap; row-gap: 0; }
.peer-acts .btn .pa-name { flex: none; white-space: nowrap; }
.peer-acts .btn small {
  display: block; font-size: 12px; color: var(--ink-2); font-weight: normal;
  min-width: 0; word-break: keep-all; overflow-wrap: anywhere;
}
.peer-msg { margin-bottom: 12px; padding: 10px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--gold) 12%, var(--paper)); font-size: 14px; }
.peer-msg p { margin: 0; }
.peer-amount { margin-bottom: 12px; }
/* 第二層：別人遞給你的打招呼、結伴邀請，與結伴同行的那一行（場景卡底下，「此地還有」之後） */
.calls { display: grid; gap: 6px; margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 14px; }
.call, .party { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.call > span, .party > span { flex: 1 1 100%; }
.calls-more { justify-self: start; font-size: 13px; }
/* 決戰輪到你出招時，「此地還有」挪到三招後面自己一張卡（FB-117）：開頭那一條虛線與上緣不要 */
.people-after > :first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.call.fit-hide { display: none; } /* 第一屏放不下時收掉的那幾份（app.js FIT_STEPS 的 calls，FB-117） */
.peer-amount { flex-wrap: wrap; }
.peer-amount select { flex: 1 1 100%; }
.peer-pick { grid-column: 1 / -1; display: grid; gap: 8px; }
.peer-pick select { min-width: 0; }
/* 從場景底下「挑一樣答應」打開卡（FB-117）：捲到答應的那一格，框一下金邊（不呼吸，減少動態效果的人也一樣） */
.peer-focus { border-radius: var(--radius); box-shadow: 0 0 0 2px var(--gold); }

/* ── 名帖（Joy 2026-10-19）：紙色固定、不跟深淺色走（三色墨要在紙上看得清）；字照卡的寬度縮放（cqw）── */
.mt-card {
  position: relative; container-type: inline-size; aspect-ratio: 3 / 4; width: 100%; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 60%), #f8f2e4;
  border: 1px solid #d8d0c1; border-radius: 4px; box-shadow: inset 0 0 0 4px #f8f2e4, inset 0 0 0 5px rgba(178, 58, 42, 0.35), 0 1px 3px rgba(60, 40, 20, 0.18);
  color: #24211d; font-family: var(--serif); text-align: left;
}
.mt-card .mt-ink { position: absolute; inset: 0; width: 100%; height: 100%; }
.mt-card .mt-pad { touch-action: none; cursor: crosshair; }
.mt-name {
  position: absolute; top: 7cqw; right: 7cqw; writing-mode: vertical-rl; font-size: 10cqw; font-weight: 700; letter-spacing: 1.5cqw;
  line-height: 1; pointer-events: none; text-shadow: 0 0 2px #f8f2e4, 0 0 4px #f8f2e4;
}
.mt-seal {
  position: absolute; top: 7cqw; right: 20cqw; width: 11cqw; height: 11cqw; display: grid; grid-template-columns: 1fr 1fr;
  background: #b23a2a; border-radius: 1cqw; padding: 0.6cqw; pointer-events: none; transform: rotate(-3deg);
}
.mt-seal i { font-style: normal; color: #f8f2e4; font-size: 4.4cqw; line-height: 5cqw; text-align: center; font-weight: 700; }
/* 名分（結義第一批）：名號左邊一條直書的朱紅小籤，寫義名與排行 */
.mt-jieyi {
  position: absolute; top: 20cqw; right: 20cqw; writing-mode: vertical-rl; padding: 1.4cqw 0.8cqw; font: 700 4.6cqw/1 var(--kai);
  letter-spacing: 0.6cqw; color: #f8f2e4; background: linear-gradient(170deg, #b23a2a, #8e2a1f); border-radius: 0.8cqw;
  box-shadow: inset 0 0 0 0.5cqw rgba(232, 196, 120, 0.55); pointer-events: none;
}
.mt-foot { position: absolute; left: 6cqw; right: 6cqw; bottom: 5cqw; pointer-events: none; }
.mt-titles { display: flex; flex-wrap: wrap; gap: 1.5cqw; margin-bottom: 2cqw; }
.mt-titles span {
  font-size: 4.6cqw; line-height: 1.3; padding: 0.6cqw 2cqw; border: 1px solid rgba(36, 33, 29, 0.35); border-radius: 1cqw;
  background: rgba(248, 242, 228, 0.85);
}
.mt-motto { margin: 0; font-size: 6.2cqw; line-height: 1.4; min-height: 1.4em; text-shadow: 0 0 3px #f8f2e4, 0 0 5px #f8f2e4; }
.mt-hidden { position: absolute; left: 6cqw; right: 6cqw; top: 40%; margin: 0; text-align: center; font-size: 5cqw; color: #6b6155; }
.mt-card.thumb { border-radius: 3px; box-shadow: inset 0 0 0 2px #f8f2e4, inset 0 0 0 3px rgba(178, 58, 42, 0.3), 0 1px 2px rgba(60, 40, 20, 0.2); }

/* 玩家卡上的縮圖：浮在名號右邊，點了放大 */
.peer-mt { float: right; width: 78px; margin: 0 0 6px 10px; padding: 0; border: 0; background: none; cursor: zoom-in; }
.peer-arts { clear: both; }

/* 放大看一張 */
.mt-zoom-layer { position: fixed; inset: 0; z-index: 44; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.55); animation: fade 0.2s; }
.mt-zoom-box { width: min(340px, 100%); }
.mt-zoom-box .row { justify-content: center; margin-top: 10px; }
.mt-zoom-box .btn { background: var(--card); }
.mt-when { margin: 8px 0 0; text-align: center; color: #f4ede0; font-size: 13px; }
.mt-report { color: var(--bad); }

/* 見聞「名帖匣」 */
.mt-box-head { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.mt-mine { display: contents; }
.mt-mine > div:first-child { cursor: zoom-in; }
.mt-mine.empty p { grid-column: 1 / -1; margin: 0; }
.mt-mine-side .btn { width: 100%; }
.mt-mine-side p { margin: 8px 0 0; font-size: 13px; }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.mt-cell { padding: 0; border: 0; background: none; color: var(--ink); cursor: zoom-in; text-align: center; font: inherit; }
.mt-cell small { display: block; margin-top: 4px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 製作名帖（全螢幕一層） */
.mt-layer { position: fixed; inset: 0; z-index: 43; display: flex; flex-direction: column; background: var(--paper); animation: fade 0.2s; }
.mt-bar { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--top)) 12px 8px; background: var(--card); border-bottom: 1px solid var(--line); }
.mt-bar b { font-family: var(--serif); letter-spacing: 2px; }
.mt-bar span { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.mt-bar .book-back { color: var(--ink); }
.mt-edit-col { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px calc(24px + var(--bottom)); max-width: 640px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.mt-stage { width: min(270px, 78vw); margin: 0 auto 12px; }
.mt-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin-bottom: 8px; }
.mt-ink-btn, .mt-pen-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); color: var(--ink); font: 14px var(--sans); cursor: pointer;
}
.mt-ink-btn i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4); }
.mt-ink-btn.on, .mt-pen-btn.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mt-preset { max-width: 150px; }
.mt-count { text-align: center; font-size: 12px; margin: 0 0 10px; }
.mt-sec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 6px; font-size: 14px; color: var(--ink-2); }
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-chip { padding: 5px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: 13px var(--sans); cursor: pointer; }
.mt-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.mt-go { width: 100%; margin-top: 6px; }

/* 管理者：被檢舉的名帖 */
.mt-admin { display: grid; gap: 10px; margin-bottom: 10px; }
.mt-admin-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; }
.mt-admin-row .muted { margin: 2px 0 6px; font-size: 12px; }
/* 全站總檢查（2026-11-25）：點得到的都至少 44px 高（介面設計規範第六節）。外觀不想變大的用透明的 ::after 把點的範圍撐開 */
.peer-name { position: relative; }
.peer-name::after { content: ""; position: absolute; inset: -9px -2px; }
