/* 真人房间 + AI 补位 桌游共用样式（2026-10-19，《漕运·暗流》《聊斋·灯下客》）。
   暗色水墨底 + 金线，与 waznkj.top 客居的暗金皮肤一致。固定文案用站酷文艺体（--font-game），玩家输入 / AI 台词用系统字体（.ag-dyn）。
   各游戏在 body 上设 --tg-accent / --tg-accent2。 */
.tg-body { --tg-bg: #0e0c0a; --tg-panel: #1b1712; --tg-panel2: #241e17; --tg-line: rgba(230, 201, 138, .22); --tg-gold: #e6c98a; --tg-text: #e9dfca;
  --tg-muted: #b3a994; --tg-red: #ef8f7d; --tg-good: #8fd3a8; --tg-accent: #6cc3b5; --tg-accent2: #e6c98a; background: var(--tg-bg); }
.tg-main { background: radial-gradient(1200px 500px at 50% -120px, rgba(108, 195, 181, .10), transparent 70%), var(--tg-bg); min-height: 70vh; }
.tg-wrap { max-width: 1240px; margin: 0 auto; padding: 12px 16px 56px; color: var(--tg-text); font-family: var(--font-game-body, var(--font-game, inherit)); }
.tg-wrap h1, .tg-wrap h2, .tg-wrap h3, .tg-wrap h4 { font-family: var(--font-game, inherit); font-weight: 400; color: var(--tg-gold); letter-spacing: .04em; }
.tg-wrap h2 { font-size: 21px; margin: 0 0 10px; }
.tg-wrap h3 { font-size: 18px; margin: 14px 0 8px; }
.tg-wrap p { margin: 0 0 8px; line-height: 1.75; }
.tg-wrap a { color: var(--tg-gold); }
.tg-muted { color: var(--tg-muted); font-size: 14px; }
.tg-crumb { color: var(--tg-muted); font-size: 14px; margin: 4px 0 12px; }
.tg-crumb a { color: var(--tg-muted); }
.ag-dyn { font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }

/* 大厅 */
.tg-hero { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 21 / 8; min-height: 200px; border: 1px solid var(--tg-line); background: #000; }
.tg-hero img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .88; }
.tg-hero__cap { position: absolute; inset: auto 0 0 0; padding: 22px 24px; background: linear-gradient(transparent, rgba(8, 7, 6, .9)); }
.tg-hero__cap h1 { font-size: clamp(32px, 6vw, 52px); margin: 0; color: #f3e7cc; }
.tg-hero__cap p { margin: 2px 0 0; color: var(--tg-text); }
.tg-kicker { font-size: 13px; letter-spacing: .25em; color: var(--tg-accent) !important; margin: 0 !important; }
.tg-intro { margin: 18px 2px; max-width: 820px; }
.tg-lobby { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .tg-lobby { grid-template-columns: 1fr 1fr; } }
.tg-card { background: linear-gradient(180deg, var(--tg-panel2), var(--tg-panel)); border: 1px solid var(--tg-line); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.tg-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tg-input { flex: 1; min-width: 0; min-height: 46px; border: 1px solid var(--tg-line); border-radius: 12px; padding: 0 14px; font: 16px/1.4 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #120f0c; color: var(--tg-text); }
.tg-input:focus { outline: 2px solid var(--tg-accent); outline-offset: 1px; }
.tg-input--code { text-transform: uppercase; letter-spacing: .2em; max-width: 190px; font-family: ui-monospace, Menlo, Consolas, monospace; }
select.tg-input { flex: 0 0 auto; padding: 0 10px; }
.tg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 12px; cursor: pointer;
  font: 16px/1.2 var(--font-game, inherit); letter-spacing: .05em; border: 1px solid var(--tg-accent); background: rgba(108, 195, 181, .14); color: #e9fbf7; transition: transform .08s, filter .15s; }
.tg-btn:hover { filter: brightness(1.15); }
.tg-btn:active { transform: scale(.97); }
.tg-btn:disabled { opacity: .4; cursor: default; filter: none; }
.tg-btn.gold, .tg-wrap .tg-btn.gold { background: linear-gradient(180deg, #f0d79d, #c9a35a); border-color: #f0d79d; color: #2b1d0c !important; }
.tg-btn.gold:disabled { opacity: .55; }
.tg-btn.red { background: rgba(239, 143, 125, .16); border-color: var(--tg-red); color: #ffe3dc; }
.tg-btn.ghost { background: transparent; border-color: var(--tg-line); color: var(--tg-text); }
.tg-btn.sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.tg-btn.big { min-height: 54px; font-size: 19px; width: 100%; }
.tg-rooms { list-style: none; margin: 0; padding: 0; }
.tg-room { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--tg-line); }
.tg-room > div { display: flex; flex-direction: column; min-width: 0; }
.tg-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; color: var(--tg-gold); }
.tg-rules summary { cursor: pointer; font-family: var(--font-game, inherit); font-size: 19px; color: var(--tg-gold); min-height: 40px; display: flex; align-items: center; }
.tg-rules p { color: var(--tg-text); }
.tg-foot { margin-top: 10px; }

/* 等人 */
.tg-bigcode { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 40px; letter-spacing: .18em; color: var(--tg-gold); }
.tg-members { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tg-members li { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--tg-line); }
.tg-members li.is-me { border-color: var(--tg-accent); }
.tg-cfg { display: grid; gap: 12px; margin: 10px 0 16px; }
.tg-cfg > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tg-cfg > div > span { min-width: 3em; color: var(--tg-muted); }
.tg-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tg-seg button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--tg-line); background: transparent; color: var(--tg-text); cursor: pointer; font: 15px var(--font-game, inherit); }
.tg-seg button.on { border-color: var(--tg-accent); background: rgba(108, 195, 181, .18); color: #fff; }
.tg-seg button:disabled { opacity: .45; cursor: default; }

/* 对局骨架 */
.tg-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: var(--tg-panel); border: 1px solid var(--tg-line); margin-bottom: 12px; position: sticky; top: 0; z-index: 5; }
.tg-top__t { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.tg-top__t b { font-family: var(--font-game, inherit); font-weight: 400; font-size: 20px; color: var(--tg-gold); }
.tg-top__t small { color: var(--tg-muted); }
.tg-count { font-family: var(--font-game, inherit); font-size: 22px; min-width: 2.6em; text-align: center; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--tg-line); color: var(--tg-text); }
.tg-count.is-low { color: var(--tg-red); border-color: var(--tg-red); }
.tg-cols { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .tg-cols { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); align-items: start; } .tg-right { position: sticky; top: 74px; } }
.tg-action { background: linear-gradient(180deg, rgba(108, 195, 181, .10), var(--tg-panel)); border: 1px solid var(--tg-accent); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.tg-action h3 { margin-top: 0; }
.tg-tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tg-tabs button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--tg-line); background: transparent; color: var(--tg-muted); cursor: pointer; font: 15px var(--font-game, inherit); position: relative; }
.tg-tabs button.on { color: #fff; border-color: var(--tg-accent); background: rgba(108, 195, 181, .16); }
.tg-tabs button i { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--tg-red); }
.tg-feed { height: min(56vh, 560px); overflow-y: auto; background: #120f0c; border: 1px solid var(--tg-line); border-radius: 14px; padding: 10px 12px; overscroll-behavior: contain; }
.tg-msg { margin: 0 0 8px; line-height: 1.65; font-size: 15px; }
.tg-msg.sys { color: var(--tg-muted); }
.tg-msg.intel, .tg-msg.clue { color: #cfe9e4; border-left: 3px solid var(--tg-accent); padding-left: 8px; }
.tg-msg.audit, .tg-msg.deep { color: #f3e7cc; border-left: 3px solid var(--tg-gold); padding-left: 8px; }
.tg-msg.good { color: var(--tg-good); }
.tg-msg.bad { color: var(--tg-red); }
.tg-msg.end { color: var(--tg-gold); font-size: 17px; }
.tg-msg.say { display: flex; gap: 8px; align-items: flex-start; }
.tg-msg.say img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; flex: 0 0 auto; border: 1px solid var(--tg-line); }
.tg-msg.say b { color: var(--tg-gold); font-weight: 400; font-family: var(--font-game, inherit); margin-right: 4px; }
.tg-msg.say .ag-dyn { color: var(--tg-text); }
.tg-compose { display: flex; gap: 8px; margin-top: 8px; }
.tg-panel { background: var(--tg-panel); border: 1px solid var(--tg-line); border-radius: 14px; padding: 12px; }

/* 角色卡 */
.tg-seats { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
@media (min-width: 680px) { .tg-seats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1000px) and (max-width: 1180px) { .tg-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tg-seat { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--tg-line); background: #000; cursor: default; padding: 0; color: var(--tg-text); text-align: left; font: inherit; }
.tg-seat img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 15%; display: block; opacity: .9; }
.tg-seat__cap { position: absolute; inset: auto 0 0 0; padding: 22px 8px 7px; background: linear-gradient(transparent, rgba(5, 4, 3, .92)); }
.tg-seat__cap b { display: block; font-family: var(--font-game, inherit); font-weight: 400; font-size: 16px; color: #f3e7cc; }
.tg-seat__cap small { display: block; font-size: 12px; color: var(--tg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-seat.pick { cursor: pointer; }
.tg-seat.pick:hover { border-color: var(--tg-accent); }
.tg-seat.sel { outline: 3px solid var(--tg-accent); outline-offset: -3px; }
.tg-seat.sel::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--tg-accent); color: #062420; display: grid; place-items: center; font-weight: 700; }
.tg-seat.dim img { opacity: .35; }
.tg-badge { position: absolute; top: 6px; left: 6px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tg-badge span { font-size: 12px; padding: 2px 7px; border-radius: 99px; background: rgba(0, 0, 0, .72); border: 1px solid var(--tg-line); color: var(--tg-text); white-space: nowrap; }
.tg-badge .lead { border-color: var(--tg-gold); color: var(--tg-gold); }
.tg-badge .me { border-color: var(--tg-accent); color: #bff3ea; }
.tg-badge .foe { border-color: var(--tg-red); color: var(--tg-red); }
.tg-badge .ok { border-color: var(--tg-good); color: var(--tg-good); }
.tg-note { position: absolute; top: 6px; right: 6px; min-width: 30px; min-height: 30px; border-radius: 8px; border: 1px solid var(--tg-line); background: rgba(0, 0, 0, .6); color: var(--tg-text); font-size: 13px; cursor: pointer; padding: 0 6px; }
.tg-note.n1 { border-color: var(--tg-good); color: var(--tg-good); }
.tg-note.n2 { border-color: var(--tg-red); color: var(--tg-red); }
.tg-me { display: flex; gap: 12px; align-items: center; }
.tg-me img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; object-position: 50% 15%; }
.tg-side { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 14px; border: 1px solid; }
.tg-side.good { color: var(--tg-good); border-color: var(--tg-good); }
.tg-side.bad { color: var(--tg-red); border-color: var(--tg-red); }
.tg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tg-table th, .tg-table td { border-bottom: 1px solid var(--tg-line); padding: 6px 6px; text-align: left; vertical-align: top; }
.tg-table th { color: var(--tg-muted); font-weight: 400; }
.tg-scroll { overflow-x: auto; }
.tg-end { text-align: center; padding: 18px 12px; border-radius: 16px; border: 1px solid var(--tg-gold); background: radial-gradient(circle at 50% 0, rgba(230, 201, 138, .18), transparent 70%), var(--tg-panel); margin-bottom: 14px; }
.tg-end h2 { font-size: 30px; margin: 0 0 6px; }
.tg-end.lose h2 { color: var(--tg-red); }
@media (max-width: 520px) {
  .tg-wrap { padding: 8px 10px 48px; }
  .tg-top { padding: 8px 10px; }
  .tg-top__t b { font-size: 17px; }
  .tg-hero { aspect-ratio: 4 / 3; }
  .tg-bigcode { font-size: 32px; }
  .tg-seat__cap b { font-size: 14px; }
}

/* 2026-10-19：会员头像（圆形，只表示「哪位玩家坐在这里」；角色卡面不变）。!important 压住 .tg-seat img / .tg-msg.say img / .tg-me img 的角色图样式 */
.tg-face { display: inline-block; flex: 0 0 auto; width: 28px; height: 28px; aspect-ratio: 1 / 1 !important; border-radius: 50% !important; object-fit: cover !important; object-position: 50% 28% !important;
  border: 1px solid var(--tg-line); background: #241e17; opacity: 1; vertical-align: middle; }
.tg-chip { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; margin: 0 2px; }
.tg-chip .tg-face { width: 22px; height: 22px; }
.tg-chip.is-me .tg-face { border-color: var(--tg-accent); }
.tg-room > div { flex: 1; }
.tg-room > .tg-face { width: 36px; height: 36px; }
.tg-members li.has-face { display: inline-flex; align-items: center; gap: 7px; padding-left: 5px; }
.tg-members li .tg-face { width: 30px; height: 30px; }
.tg-members li.is-me .tg-face { border-color: var(--tg-accent); }
.tg-badge { max-width: calc(100% - 46px); }
.tg-badge span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tg-badge .tg-who { display: inline-flex; align-items: center; gap: 4px; padding-left: 2px; }
.tg-badge .tg-who .tg-face { width: 20px !important; height: 20px; display: block; border: 1px solid rgba(230, 201, 138, .5); }
.tg-badge .me.tg-who .tg-face { border-color: var(--tg-accent); }
.tg-me__pic { position: relative; flex: 0 0 auto; display: block; line-height: 0; }
.tg-me .tg-me__pic .tg-face { position: absolute; right: -7px; bottom: -7px; width: 30px; height: 30px; border: 2px solid var(--tg-panel); }
.tg-msg.say img.tg-face--xs { width: 18px; height: 18px; margin: 0 3px 0 1px; vertical-align: -3px; border: 0; }
.tg-msg.say > img.tg-face { border-color: rgba(230, 201, 138, .5); }
.tg-face.tg-face--me { width: 30px; height: 30px; margin-right: 6px; vertical-align: -9px; border-color: var(--tg-accent); }

/* ── 2026-10-20 英雄区可读性（漕运封面是亮色日出，kicker/副标题压在图上看不清） ── */
.tg-hero__cap { background: linear-gradient(transparent 0%, rgba(8, 7, 6, .34) 30%, rgba(8, 7, 6, .9) 100%) !important; }
.tg-hero__cap > * { text-shadow: 0 1px 2px rgba(0, 0, 0, .8), 0 2px 14px rgba(0, 0, 0, .65); }
.tg-kicker { font-size: 14px !important; letter-spacing: .22em !important; color: #bfe9e0 !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 16px rgba(0, 0, 0, .85) !important; }

/* 2026-10-20 对齐客居站按钮体系：waznkj 的 ent.css 只给 submit / .primary 上金色主按钮，其余按钮一律压成浅金描边。
   结果「一个人开局 / 开局 / 派他们上船」和「开房间叫朋友」长得不一样、模式 / 难度 / 页签的选中态看不出来。这里统一：
   主操作 .tg-btn.gold = 站点主按钮；选中态 = 实金底深字（与年灯页签一致）。 */
html main .tg-wrap .tg-btn.gold { background: linear-gradient(100deg, #a9813e 0%, #e9cf8f 32%, #caa35a 58%, #f0d99c 80%, #b48c46 100%) !important;
  color: #2b1d0c !important; border: 0 !important; box-shadow: 0 6px 22px -6px rgba(201, 163, 92, .55) !important; font-weight: 700; letter-spacing: .12em; }
html main .tg-wrap .tg-btn.gold:disabled { box-shadow: none !important; }
html main .tg-wrap :is(.tg-seg, .tg-tabs) button.on { background: #c9a35c !important; color: #2b1d0c !important; border-color: #c9a35c !important; }

/* Solo entry is a normal-height action; keep the explanatory line clear of its shadow. */
.tg-wrap .tg-lobby button.tg-btn:not(.sm){box-sizing:border-box;height:44px;min-height:44px;padding:0 18px;font-size:16px;line-height:1.2}
.tg-wrap .tg-lobby button[data-tg="solo"] + p.tg-muted,
.tg-wrap .tg-lobby button[data-qw="solo"] + p.tg-muted{margin:12px 0 0;line-height:1.75}
.tg-wrap .tg-lobby #tg-create,.tg-wrap .tg-lobby #qw-create{margin-top:16px!important}
