/* v0.24.15 — 3120×1440 (19.5:9) 固定桌內座標。
   畫布只等比縮放；桌內元素絕不依螢幕寬高重新排位。 */
body.landscape-play{background:#10100d}
body.landscape-play .app-shell{padding:0 0 20px!important;max-width:none!important}
body.landscape-play .game-workspace{display:block!important}
body.landscape-play .play-column{container-type:inline-size!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;position:static!important;--hand-w:3.45cqw;--hand-h:5.6cqw;--half-w:1.725cqw;--half-h:2.8cqw;--wall-w:.8625cqw;--wall-h:1.4cqw}

/* 牌桌外資訊列保持正常網頁尺寸；桌內則完全依畫布比例。 */
body.landscape-play .topbar{width:100%!important;max-width:none!important;margin:0!important;padding:5px 14px!important;background:#0b1814!important;color:#fff!important;display:grid!important;grid-template-columns:auto 1fr auto!important;align-items:center!important;min-height:42px!important}
body.landscape-play .topbar .brand-heading{font-size:17px!important;color:#ffe8b1!important}
body.landscape-play .primary-actions{grid-column:1!important;grid-row:1!important}.landscape-play .match-strip{grid-column:2!important;grid-row:1!important;justify-content:center!important}.landscape-play .match-coach{grid-column:3!important;grid-row:1!important;color:#fff!important}
body.landscape-play .game-column{display:block!important;min-height:0!important}
body.landscape-play .action-bar{margin:0!important;min-height:44px!important;padding:8px 4%!important;background:#090909!important;color:#fff!important;border-radius:0!important}
body.landscape-play .side-column{width:100%!important;max-width:1080px!important;margin:12px auto!important;padding:0 12px!important;display:grid!important;grid-template-columns:1fr!important;max-height:none!important;overflow:visible!important}
body.landscape-play .side-column .coach-panel,body.landscape-play .side-column .history-panel{grid-column:1!important;position:static!important}

/* 回到 v0.24.0 式的平面綠色牌桌與固定四方位。 */
body.landscape-play .mahjong-table{container-type:inline-size!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;aspect-ratio:19.5 / 9!important;margin:0!important;overflow:hidden!important;border:.45cqw solid #704426!important;border-radius:.9cqw!important;background:radial-gradient(ellipse at center,#176b56 0,#105644 72%,#0b4437 100%)!important;box-shadow:inset 0 0 0 .28cqw #2d8a72!important}
body.landscape-play .mahjong-table::after{opacity:.08!important}

/* 對家、上家、下家：暗手牌均為玩家手牌的 50%。 */
body.landscape-play .seat{z-index:6!important}
body.landscape-play .seat-top{top:6%!important;left:25%!important;right:25%!important;width:auto!important;transform:none!important}
body.landscape-play .seat-left,.landscape-play .seat-right{top:49%!important;width:37.5cqw!important}
body.landscape-play .seat-left{left:-18.75cqw!important;transform:translateY(-50%) rotate(90deg)!important}
body.landscape-play .seat-right{right:-18.75cqw!important;transform:translateY(-50%) rotate(-90deg)!important}
body.landscape-play .opponent-stage{position:relative!important;display:block!important;width:max-content!important;max-width:100%!important;margin:0 auto!important;padding-bottom:2.1cqw!important}
body.landscape-play .seat-top .opponent-stage{transform:rotate(180deg)!important}
body.landscape-play .opponent-rack-row{display:flex!important;align-items:flex-end!important;justify-content:center!important;gap:.22cqw!important;white-space:nowrap!important}
body.landscape-play .opponent-line,body.landscape-play .seat-left .opponent-line,body.landscape-play .seat-right .opponent-line{display:flex!important;flex-flow:row nowrap!important;align-items:flex-end!important;justify-content:center!important;height:auto!important;gap:.05cqw!important;margin:0!important}
body.landscape-play .opponent-line .tile-back,body.landscape-play .opponent-line .revealed-tile,body.landscape-play .seat-left .opponent-line .tile-back,body.landscape-play .seat-right .opponent-line .tile-back{flex:0 0 var(--half-w)!important;width:var(--half-w)!important;height:var(--half-h)!important;margin:0!important;transform:none!important;border-radius:.18cqw!important}
body.landscape-play .mini-melds{gap:.07cqw!important;margin:0!important}.landscape-play .mini-melds .tile{width:calc(var(--half-w) * .9)!important;height:calc(var(--half-h) * .9)!important}
body.landscape-play .opponent-stage>.seat-name{position:absolute!important;right:50%!important;top:calc(100% + .15cqw)!important;transform:translateX(50%)!important;margin:0!important;padding:.12cqw .35cqw!important;font-size:.78cqw!important;line-height:1.1!important;gap:.18cqw!important;white-space:nowrap!important;background:rgba(0,0,0,.7)!important;color:#ffe5a1!important}
body.landscape-play .opponent-stage>.seat-name strong{font-size:.98cqw!important}

/* 花牌為玩家牌的 50%，初始手牌左起第三張對齊；牌牆 25%，右起第三張對齊。 */
body.landscape-play .opponent-front-row{position:absolute!important;left:6.47cqw!important;right:auto!important;top:calc(100% + 1.05cqw)!important;display:flex!important;align-items:flex-end!important;pointer-events:none!important}
body.landscape-play .opponent-flowers,body.landscape-play .player-flowers{display:flex!important;flex-flow:row nowrap!important;align-items:flex-end!important;gap:.08cqw!important;margin:0!important}
body.landscape-play .opponent-flowers .mini-flower-tile{width:var(--half-w)!important;height:var(--half-h)!important}

/* 玩家手牌維持原牌面美術與 100% 尺寸；吃碰槓牌同列，摸牌有間隙。 */
body.landscape-play .player-zone{z-index:8!important;left:5%!important;right:5%!important;bottom:2.25%!important}
body.landscape-play .hand-row{display:flex!important;align-items:flex-end!important;justify-content:center!important;gap:.42cqw!important}
body.landscape-play .meld-zone{display:flex!important;flex:0 0 auto!important;gap:.1cqw!important;margin:0!important}.landscape-play .meld{padding-right:.18cqw!important}
body.landscape-play .meld .tile{flex:0 0 var(--hand-w)!important;width:var(--hand-w)!important;height:var(--hand-h)!important}
body.landscape-play .concealed-hand{display:flex!important;flex:0 0 73.65cqw!important;width:73.65cqw!important;max-width:100%!important;gap:.04cqw!important;padding:0!important}
body.landscape-play .concealed-hand .tile{flex:0 0 var(--hand-w)!important;width:var(--hand-w)!important;height:var(--hand-h)!important;min-width:0!important}
body.landscape-play .player-meta{margin:.18cqw 0 0!important;padding:.1cqw .45cqw!important;min-height:1.45cqw!important;font-size:.94cqw!important;justify-content:center!important;color:#fff!important;background:rgba(0,0,0,.72)!important}.landscape-play .player-meta strong{font-size:1.35cqw!important}
body.landscape-play .player-flowers{position:absolute!important;left:calc(50% - 23.72cqw)!important;bottom:calc(100% + .35cqw)!important}
body.landscape-play .player-flowers .mini-flower-tile{width:var(--half-w)!important;height:var(--half-h)!important}

/* 四家牌牆皆為玩家手牌的 25%，固定在花牌同列的另一端。 */
body.landscape-play .wall-visual{inset:0!important;z-index:2!important}.landscape-play .wall-side{gap:.08cqw!important}
body.landscape-play .wall-top{top:17%!important;left:calc(50% + 10.78cqw)!important;right:auto!important;bottom:auto!important;transform:none!important}
body.landscape-play .wall-bottom{right:calc(50% - 23.72cqw)!important;bottom:14.3%!important;left:auto!important;top:auto!important;transform:none!important}
body.landscape-play .wall-left{left:12.8%!important;top:28%!important;right:auto!important;bottom:auto!important;transform:none!important}
body.landscape-play .wall-right{right:12.8%!important;top:28%!important;left:auto!important;bottom:auto!important;transform:none!important}
body.landscape-play .wall-stack{width:var(--wall-w)!important;height:var(--wall-h)!important}.landscape-play .wall-left .wall-stack,.landscape-play .wall-right .wall-stack{width:var(--wall-h)!important;height:var(--wall-w)!important}

/* 四家牌河同為玩家 50%，各自 9×2 並固定在桌內中央帶。 */
body.landscape-play .table-center{inset:0!important;display:block!important;width:auto!important;height:auto!important;transform:none!important;z-index:4!important}
body.landscape-play .river,body.landscape-play .river.crowded,body.landscape-play .river.dense{--rw:20.21cqw;--rh:5.78cqw;position:absolute!important;display:grid!important;grid-template-columns:repeat(9,var(--half-w))!important;grid-template-rows:repeat(2,var(--half-h))!important;width:var(--rw)!important;height:var(--rh)!important;gap:.09cqw!important;row-gap:.09cqw!important}
body.landscape-play .river-top{left:50%!important;top:27%!important;right:auto!important;bottom:auto!important;transform:translateX(-50%) rotate(180deg)!important}
body.landscape-play .river-bottom{left:50%!important;bottom:23%!important;right:auto!important;top:auto!important;transform:translateX(-50%)!important}
body.landscape-play .river-left{left:27%!important;top:50%!important;right:auto!important;bottom:auto!important;transform:translateY(-50%) rotate(90deg)!important}
body.landscape-play .river-right{right:27%!important;top:50%!important;left:auto!important;bottom:auto!important;transform:translateY(-50%) rotate(-90deg)!important}
body.landscape-play .table-center .discard-tile,body.landscape-play .table-center .river.crowded .discard-tile,body.landscape-play .table-center .river.dense .discard-tile{width:var(--half-w)!important;height:var(--half-h)!important;padding:.05cqw!important;border-bottom-width:.18cqw!important}
body.landscape-play .claim-overlay{inset:0!important}

/* v0.24.16 — 依 3120×1440 基準重設每家三列，覆寫舊版絕對定位殘留。 */
body.landscape-play .play-column{--hand-w:4.3125cqw;--hand-h:5.6cqw;--half-w:2.15625cqw;--half-h:2.8cqw;--wall-w:1.078125cqw;--wall-h:1.4cqw}

/* 第一列為操作；四個牌局欄位固定在第二列。 */
body.landscape-play .topbar{grid-template-columns:1fr auto!important;grid-template-rows:auto auto!important;row-gap:4px!important;padding:6px 14px!important}
body.landscape-play .brand-title{grid-column:2!important;grid-row:1!important}
body.landscape-play .primary-actions{grid-column:1!important;grid-row:1!important}
body.landscape-play .match-strip{grid-column:1 / -1!important;grid-row:2!important;width:100%!important;justify-content:flex-start!important;gap:6px!important}
body.landscape-play .match-strip span{font-size:10px!important;padding:4px 8px!important}
body.landscape-play .match-coach{position:absolute!important;right:14px!important;top:8px!important}

/* 每家都以自身角度：資訊列 → 手牌／吃碰槓牌 → 花牌。 */
body.landscape-play .player-zone,body.landscape-play .opponent-stage{display:flex!important;flex-direction:column!important;align-items:center!important;gap:.22cqw!important}
body.landscape-play .player-zone{left:4.2%!important;right:4.2%!important;bottom:2.1%!important}
body.landscape-play .player-meta,body.landscape-play .opponent-stage>.seat-name{position:static!important;transform:none!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:.34cqw!important;order:1!important;margin:0!important;min-height:1.55cqw!important;padding:.14cqw .55cqw!important;font-size:1.04cqw!important;line-height:1.1!important;background:rgba(0,0,0,.78)!important;color:#fff!important;white-space:nowrap!important}
body.landscape-play .player-meta strong,body.landscape-play .opponent-stage>.seat-name strong{font-size:1.42cqw!important}
body.landscape-play .hand-row,body.landscape-play .opponent-rack-row{order:2!important;margin:0!important}
body.landscape-play .player-front-row,body.landscape-play .opponent-front-row{position:static!important;display:flex!important;order:3!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;min-height:var(--half-h)!important;margin:0!important;pointer-events:none!important}
body.landscape-play .player-flowers,body.landscape-play .opponent-flowers{position:static!important;display:flex!important;flex-flow:row nowrap!important;align-items:flex-start!important;gap:.08cqw!important;margin:0!important}
body.landscape-play .player-flowers .mini-flower-tile,body.landscape-play .opponent-flowers .mini-flower-tile{width:var(--half-w)!important;height:var(--half-h)!important}
body.landscape-play .seat-top .opponent-stage{transform:rotate(180deg)!important}
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:none!important}

/* 手牌寬度 1.25 倍、高度不變；其他牌維持相對於手牌的 50%／25%。 */
body.landscape-play .concealed-hand .tile,body.landscape-play .meld .tile{width:var(--hand-w)!important;flex-basis:var(--hand-w)!important;height:var(--hand-h)!important}
body.landscape-play .opponent-line .tile-back,body.landscape-play .opponent-line .revealed-tile,body.landscape-play .seat-left .opponent-line .tile-back,body.landscape-play .seat-right .opponent-line .tile-back{width:var(--half-w)!important;flex-basis:var(--half-w)!important;height:var(--half-h)!important}
body.landscape-play .table-center .discard-tile,body.landscape-play .table-center .river.crowded .discard-tile,body.landscape-play .table-center .river.dense .discard-tile{width:var(--half-w)!important;height:var(--half-h)!important}
body.landscape-play .wall-stack{width:var(--wall-w)!important;height:var(--wall-h)!important}
body.landscape-play .wall-left .wall-stack,body.landscape-play .wall-right .wall-stack{width:var(--wall-h)!important;height:var(--wall-w)!important}

/* 側家內移，不再貼桌邊；對家資訊與手牌改為可辨識大小。 */
body.landscape-play .seat-top{top:5.3%!important;left:18%!important;right:18%!important}
body.landscape-play .seat-left,body.landscape-play .seat-right{top:48%!important;width:36.5cqw!important}
body.landscape-play .seat-left{left:-11.45cqw!important}
body.landscape-play .seat-right{right:-11.45cqw!important}

/* 花牌與牌牆同列：花牌對齊左起第三張，牌牆對齊右起第三張。 */
body.landscape-play .wall-bottom{right:calc(50% - 23.72cqw)!important;bottom:2.1%!important}
body.landscape-play .wall-top{left:calc(50% + 10.78cqw)!important;top:9.99cqw!important}
body.landscape-play .wall-left{left:16.2%!important;top:30%!important}.landscape-play .wall-right{right:16.2%!important;top:30%!important}

/* v0.24.17 — 回復原先淺色頁面；控制項移至摸牌分析標題右側。 */
body.landscape-play{background:#f6f1e6!important}
body.landscape-play .app-shell{background:#f6f1e6!important}
body.landscape-play .topbar{background:#f6f1e6!important;color:#173c32!important;border-bottom:1px solid #e4dbc9!important}
body.landscape-play .topbar .brand-heading{color:#173c32!important}
body.landscape-play .topbar .primary-actions{display:flex!important;grid-column:1 / -1!important;grid-row:1!important;justify-content:flex-end!important;min-height:0!important}
body.landscape-play .topbar .match-strip{grid-column:1 / -1!important;grid-row:2!important;justify-content:flex-start!important}
body.landscape-play .match-strip span{background:#fffdfa!important;color:#173c32!important;border-color:#dfd6c5!important}
body.landscape-play .coach-panel .panel-heading{align-items:center!important}
body.landscape-play .coach-controls{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:.45cqw!important;flex-wrap:wrap!important}
body.landscape-play .coach-controls .switch{font-size:.94cqw!important;white-space:nowrap!important}

/* v0.24.18 — 從玩家位置由下往上：資訊 → 手牌／吃碰槓牌 → 花牌／牌牆。 */
body.landscape-play .player-front-row{order:1!important}
body.landscape-play .player-zone .hand-row{order:2!important}
body.landscape-play .player-zone .player-meta{order:3!important}
/* 對家、上下家亦保留各自座向的相同三列結構。 */
body.landscape-play .opponent-stage>.seat-name{order:1!important;font-family:"Microsoft JhengHei",system-ui,sans-serif!important;font-weight:700!important;-webkit-font-smoothing:antialiased!important;text-rendering:geometricPrecision!important;backface-visibility:visible!important}
body.landscape-play .opponent-rack-row{order:2!important}
body.landscape-play .opponent-front-row{order:3!important}
/* 資訊列是原生文字，跟著各自座向旋轉，不再以縮放圖片呈現。 */
body.landscape-play .seat-left .opponent-stage>.seat-name,
body.landscape-play .seat-right .opponent-stage>.seat-name,
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:none!important}

/* 花牌撤除歷史倍率：固定為目前玩家手牌的 50% 寬與 50% 高。 */
body.landscape-play .player-flowers .mini-flower-tile,body.landscape-play .opponent-flowers .mini-flower-tile{box-sizing:border-box!important;flex:0 0 var(--half-w)!important;width:var(--half-w)!important;min-width:var(--half-w)!important;max-width:var(--half-w)!important;height:var(--half-h)!important;min-height:var(--half-h)!important;max-height:var(--half-h)!important;margin:0!important;transform:none!important}
body.landscape-play .wall-bottom{bottom:calc(2.1% + 7.37cqw)!important}

/* 牌河改為玩家手牌的 75%，維持四區 9×2，不使用舊版縮小規則。 */
body.landscape-play .play-column{--river-w:3.234375cqw;--river-h:4.2cqw}
body.landscape-play .river,body.landscape-play .river.crowded,body.landscape-play .river.dense{--rw:29.91cqw!important;--rh:8.58cqw!important;grid-template-columns:repeat(9,var(--river-w))!important;grid-template-rows:repeat(2,var(--river-h))!important;width:var(--rw)!important;height:var(--rh)!important}
body.landscape-play .table-center .discard-tile,body.landscape-play .table-center .river.crowded .discard-tile,body.landscape-play .table-center .river.dense .discard-tile{width:var(--river-w)!important;height:var(--river-h)!important}
body.landscape-play .river-top{top:23%!important}.landscape-play .river-bottom{bottom:18%!important}.landscape-play .river-left{left:22%!important}.landscape-play .river-right{right:22%!important}

/* v0.24.19 — 牌局資訊、喊牌視窗與吃碰槓牌比例校正。 */
/* 品牌、四個資訊欄位與結算操作維持同一列。 */
body.landscape-play .topbar{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;grid-template-rows:auto!important;column-gap:.8cqw!important;align-items:center!important;padding:6px 14px!important}
body.landscape-play .topbar .brand-title{grid-column:1!important;grid-row:1!important;white-space:nowrap!important}
body.landscape-play .topbar .match-strip{grid-column:2!important;grid-row:1!important;width:auto!important;justify-content:flex-start!important;flex-wrap:nowrap!important;min-width:0!important;overflow:hidden!important}
body.landscape-play .topbar .primary-actions{grid-column:3!important;grid-row:1!important;justify-content:flex-end!important}
body.landscape-play .match-strip span{flex:0 0 auto!important}

/* 喊牌時讓中央圖層高於四家座位，保留手牌清晰可供比較。 */
body.landscape-play .table-center:has(.claim-overlay:not([hidden])){z-index:30!important}
body.landscape-play .claim-overlay{z-index:100!important;backdrop-filter:none!important;background:rgba(6,35,29,.22)!important}
body.landscape-play .claim-callout>span:empty{display:none!important}

/* 吃碰槓牌與暗手牌同列，間隔約為一張玩家手牌的四分之一。 */
body.landscape-play .hand-row{gap:1.08cqw!important;justify-content:center!important}
body.landscape-play .meld-zone{gap:.06cqw!important;margin:0!important}
body.landscape-play .meld{padding-right:.10cqw!important}

/* 三家吃碰槓牌完全沿用其暗手牌的 50% 長寬比，不再套用舊版扁平尺寸。 */
body.landscape-play .mini-melds,.landscape-play .opp-meld{display:flex!important;flex:0 0 auto!important;align-items:flex-end!important;gap:0!important}
body.landscape-play .mini-melds .tile{box-sizing:border-box!important;flex:0 0 var(--half-w)!important;width:var(--half-w)!important;min-width:var(--half-w)!important;max-width:var(--half-w)!important;height:var(--half-h)!important;min-height:var(--half-h)!important;max-height:var(--half-h)!important;padding:.05cqw!important;transform:none!important}

/* v0.24.20 — 教學開關與同列操作按鈕採一致可讀字級。 */
body.landscape-play .coach-controls .switch{font-size:inherit!important;font-weight:800!important}
body.landscape-play .coach-controls .switch span{flex:0 0 auto!important}

/* v0.24.21 — 移除桌外出牌提示；牌河不沿用舊版 table-tile 變數。 */
body.landscape-play .action-bar{display:none!important}
body.landscape-play .river,
body.landscape-play .river.crowded,
body.landscape-play .river.dense{
  --river-w:3.234375cqw!important;
  --river-h:4.2cqw!important;
  --river-tile-w:3.234375cqw!important;
  --river-tile-h:4.2cqw!important;
  grid-auto-columns:var(--river-w)!important;
  grid-auto-rows:var(--river-h)!important;
  overflow:hidden!important;
}
body.landscape-play .river .discard-tile,
body.landscape-play .river.crowded .discard-tile,
body.landscape-play .river.dense .discard-tile{
  box-sizing:border-box!important;
  display:flex!important;
  width:var(--river-w)!important;
  min-width:var(--river-w)!important;
  max-width:var(--river-w)!important;
  height:var(--river-h)!important;
  min-height:var(--river-h)!important;
  max-height:var(--river-h)!important;
  overflow:hidden!important;
  padding:.05cqw!important;
}
body.landscape-play .river .tile-face{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;overflow:hidden!important}

/* v0.24.22 — 花牌／牌牆依各座位手牌端點對齊。 */
/* 電腦資訊列採玩家資訊列相同的巢狀輸出與字級規則。 */
body.landscape-play .opponent-stage>.seat-name>div{display:flex!important;align-items:center!important;justify-content:center!important;gap:.34cqw!important}
body.landscape-play .opponent-stage>.seat-name strong{margin-right:0!important}
body.landscape-play .opponent-stage>.seat-name span{font-size:1.04cqw!important;opacity:.78!important}

/* 玩家／對家：花牌自起手手牌第一張開始；牌牆收在最右第一張。 */
body.landscape-play .player-front-row{width:73.65cqw!important;align-self:center!important}
body.landscape-play .seat-top .opponent-front-row{width:34.5cqw!important;align-self:center!important}
body.landscape-play .wall-bottom{right:calc(50% - 36.83cqw)!important;bottom:calc(2.1% + 7.37cqw)!important}
body.landscape-play .wall-top{left:auto!important;right:calc(50% - 17.25cqw)!important;top:9.99cqw!important}

/* 上家：花牌對齊左端、牌牆保留右起第三張；下家：花牌自左起第三張、牌牆貼右端。 */
body.landscape-play .seat-left .opponent-front-row{width:34.5cqw!important;align-self:center!important}
body.landscape-play .seat-right .opponent-front-row{width:34.5cqw!important;align-self:center!important;padding-left:4.31cqw!important;box-sizing:border-box!important}
body.landscape-play .wall-left{left:16.2%!important;top:34.2%!important}
body.landscape-play .wall-right{right:16.2%!important;top:30%!important}

/* v0.24.23 — 花牌採純文字、置中且移除右上序號。 */
body.landscape-play .face-flower .flower-number{display:none!important}
body.landscape-play .mini-flower-tile .flower-name{
  position:absolute!important;inset:0!important;display:grid!important;place-items:center!important;
  font-size:1.3cqw!important;line-height:1!important;font-weight:800!important;
}

/* v0.24.24 — 牌河依座位分成兩種固定網格，彼此不共用定位。 */
/* 玩家／對家：中央上下各一塊 9×2。 */
body.landscape-play .river-top,
body.landscape-play .river-bottom{
  --river-cols:9;--river-rows:2;--river-box-w:29.91cqw;--river-box-h:8.58cqw;
  display:grid!important;grid-template-columns:repeat(var(--river-cols),var(--river-w))!important;
  grid-template-rows:repeat(var(--river-rows),var(--river-h))!important;
  width:var(--river-box-w)!important;height:var(--river-box-h)!important;
  left:50%!important;right:auto!important;
}
body.landscape-play .river-top{top:29%!important;bottom:auto!important;transform:translateX(-50%) rotate(180deg)!important}
body.landscape-play .river-bottom{top:auto!important;bottom:21%!important;transform:translateX(-50%)!important}

/* 上家／下家：左右各一塊 6×3；旋轉後是直向 6 行、橫向 3 列。 */
body.landscape-play .river-left,
body.landscape-play .river-right{
  --river-cols:6;--river-rows:3;--river-box-w:20.06cqw;--river-box-h:12.78cqw;
  display:grid!important;grid-template-columns:repeat(var(--river-cols),var(--river-w))!important;
  grid-template-rows:repeat(var(--river-rows),var(--river-h))!important;
  width:var(--river-box-w)!important;height:var(--river-box-h)!important;
  top:50%!important;bottom:auto!important;
}
body.landscape-play .river-left{left:25.8%!important;right:auto!important;transform:translateY(-50%) rotate(90deg)!important}
body.landscape-play .river-right{left:auto!important;right:25.8%!important;transform:translateY(-50%) rotate(-90deg)!important}

/* 牌河格子永遠受各自網格約束，密集狀態不得改為較小或較大的尺寸。 */
body.landscape-play .river.crowded,
body.landscape-play .river.dense{gap:.09cqw!important;row-gap:.09cqw!important}
body.landscape-play .river.crowded .discard-tile,
body.landscape-play .river.dense .discard-tile{width:var(--river-w)!important;height:var(--river-h)!important}

/* 四家前方列、資訊列與牌牆完全在座位範圍內，不藉由舊版絕對定位覆蓋。 */
body.landscape-play .seat-top .opponent-stage{width:34.5cqw!important}
body.landscape-play .seat-left .opponent-stage,
body.landscape-play .seat-right .opponent-stage{width:34.5cqw!important}
body.landscape-play .seat-top .opponent-front-row,
body.landscape-play .seat-left .opponent-front-row,
body.landscape-play .seat-right .opponent-front-row{width:34.5cqw!important;min-width:34.5cqw!important}
body.landscape-play .wall-top{right:32.75%!important;left:auto!important}
body.landscape-play .wall-bottom{right:13.17%!important;left:auto!important}
body.landscape-play .wall-left{left:14.4%!important;top:31.8%!important}
body.landscape-play .wall-right{right:14.4%!important;top:29.4%!important}

/* v0.24.25 — 遊戲路由唯一採用橫向畫布；直式媒體查詢不得改寫桌內座標。 */
body.landscape-play .mahjong-table,
body.landscape-play .table-center,
body.landscape-play .player-zone,
body.landscape-play .seat,
body.landscape-play .wall-visual,
body.landscape-play .river{
  min-width:0!important;
  min-height:0!important;
}
body.landscape-play .mahjong-table{aspect-ratio:19.5 / 9!important;height:auto!important}

/* v0.24.26 — 依桌面分區圖固定五種物件的專屬安全區。
   藍：資訊列、黑：手牌／吃碰槓牌、紅：花牌、綠：牌牆、橘：牌河。
   所有定位均以 3120×1440 的桌面容器比例計算，不能因牌河列數改變。 */
body.landscape-play .mahjong-table{overflow:hidden!important;isolation:isolate!important}
body.landscape-play .seat,body.landscape-play .player-zone,body.landscape-play .wall-visual,body.landscape-play .table-center{contain:layout paint!important}

/* 對家：資訊 → 手牌／吃碰槓牌 → 花牌；牌牆固定在同列的右端。 */
body.landscape-play .seat-top{top:3.4%!important;left:27.25%!important;right:27.25%!important;height:18.2%!important}
body.landscape-play .seat-top .opponent-stage{width:45.5cqw!important;max-width:none!important;gap:.32cqw!important}
body.landscape-play .seat-top .opponent-rack-row{min-height:var(--half-h)!important}
body.landscape-play .seat-top .opponent-front-row{width:45.5cqw!important;min-width:45.5cqw!important}
body.landscape-play .wall-top{top:18.3%!important;right:27.25%!important;left:auto!important}

/* 玩家：由下往上為資訊 → 手牌／吃碰槓牌 → 花牌；牌牆固定在同列右端。 */
body.landscape-play .player-zone{left:13.2%!important;right:13.2%!important;bottom:2.2%!important;height:20.8%!important;justify-content:flex-end!important}
body.landscape-play .player-front-row{width:73.65cqw!important;min-width:73.65cqw!important}
body.landscape-play .wall-bottom{right:13.2%!important;bottom:19.1%!important;left:auto!important}

/* 上／下家：每一家都沿自己的正面方向排列三列，保留左右側的獨立安全帶。 */
body.landscape-play .seat-left,body.landscape-play .seat-right{top:50%!important;width:42.5cqw!important;height:24.4cqw!important}
body.landscape-play .seat-left{left:-13.1cqw!important}
body.landscape-play .seat-right{right:-13.1cqw!important}
body.landscape-play .seat-left .opponent-stage,body.landscape-play .seat-right .opponent-stage{width:42.5cqw!important;max-width:none!important;gap:.32cqw!important}
body.landscape-play .seat-left .opponent-front-row,body.landscape-play .seat-right .opponent-front-row{width:42.5cqw!important;min-width:42.5cqw!important;padding-left:0!important}
body.landscape-play .wall-left{left:10.2%!important;top:27.4%!important}
body.landscape-play .wall-right{right:10.2%!important;top:27.4%!important}

/* 花牌僅存在於各家手牌前方列的左端，絕不使用歷史絕對座標。 */
body.landscape-play .player-front-row,body.landscape-play .opponent-front-row{justify-content:flex-start!important}
body.landscape-play .flowers{z-index:8!important}

/* 橘色牌河安全區：上下 9×2、左右 6×3；15 巡（15 格）仍有 3 格餘裕。 */
body.landscape-play .river-top,body.landscape-play .river-bottom{--river-cols:9!important;--river-rows:2!important;--river-box-w:29.91cqw!important;--river-box-h:8.58cqw!important;width:29.91cqw!important;height:8.58cqw!important;overflow:hidden!important}
body.landscape-play .river-top{top:31.3%!important;bottom:auto!important}
body.landscape-play .river-bottom{bottom:25.1%!important;top:auto!important}
body.landscape-play .river-left,body.landscape-play .river-right{--river-cols:6!important;--river-rows:3!important;--river-box-w:20.06cqw!important;--river-box-h:12.78cqw!important;width:20.06cqw!important;height:12.78cqw!important;overflow:hidden!important}
body.landscape-play .river-left{left:30.1%!important;right:auto!important}
body.landscape-play .river-right{right:30.1%!important;left:auto!important}
body.landscape-play .river .discard-tile{grid-column:auto!important;grid-row:auto!important;transform:none!important}

/* v0.24.27 — 不再繼承歷史座位旋轉定位；改以分區圖的實體方框直接放置。 */
body.landscape-play .seat-top{position:absolute!important;top:4%!important;left:27.25%!important;right:27.25%!important;width:auto!important;height:17%!important;transform:none!important;overflow:visible!important}
body.landscape-play .seat-top .opponent-stage{position:absolute!important;left:50%!important;top:0!important;width:45.5cqw!important;transform:translateX(-50%)!important;transform-origin:center!important}
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:none!important}

/* 側家採獨立的實體長方形；僅內容轉向，座位本身不再旋轉或移出畫布。 */
body.landscape-play .seat-left,body.landscape-play .seat-right{position:absolute!important;top:25.5%!important;width:15.2%!important;height:49%!important;overflow:visible!important}
body.landscape-play .seat-left{left:3.3%!important;right:auto!important;transform:none!important}
body.landscape-play .seat-right{right:3.3%!important;left:auto!important;transform:none!important}
body.landscape-play .seat-left .opponent-stage,body.landscape-play .seat-right .opponent-stage{position:absolute!important;left:50%!important;top:50%!important;width:42.5cqw!important;transform-origin:center!important}
body.landscape-play .seat-left .opponent-stage{transform:translate(-50%,-50%) rotate(90deg)!important}
body.landscape-play .seat-right .opponent-stage{transform:translate(-50%,-50%) rotate(-90deg)!important}

/* 五個區塊在桌面上的對齊基準：黑色手牌區、紅色花牌區、綠色牌牆區。 */
body.landscape-play .seat-top .opponent-rack-row{width:45.5cqw!important;justify-content:center!important}
body.landscape-play .seat-left .opponent-rack-row,body.landscape-play .seat-right .opponent-rack-row{width:42.5cqw!important;justify-content:center!important}
body.landscape-play .seat-top .opponent-front-row{width:45.5cqw!important;min-width:45.5cqw!important}
body.landscape-play .seat-left .opponent-front-row,body.landscape-play .seat-right .opponent-front-row{width:42.5cqw!important;min-width:42.5cqw!important}
body.landscape-play .player-zone{position:absolute!important;left:13.2%!important;right:13.2%!important;bottom:2.15%!important;height:18.4%!important;overflow:visible!important}
body.landscape-play .wall-top{top:18.8%!important;right:27.25%!important;left:auto!important}
body.landscape-play .wall-bottom{bottom:18.7%!important;right:13.2%!important;left:auto!important}
body.landscape-play .wall-left{left:17.4%!important;top:29.2%!important}.landscape-play .wall-right{right:17.4%!important;top:29.2%!important}

/* 牌河不再依舊版座位寬度推算：四個橘色安全盒均完全位於中央區。 */
body.landscape-play .river-top{left:50%!important;top:31.2%!important;transform:translateX(-50%) rotate(180deg)!important}
body.landscape-play .river-bottom{left:50%!important;bottom:24.4%!important;transform:translateX(-50%)!important}
body.landscape-play .river-left{left:30.25%!important;top:50%!important;transform:translateY(-50%) rotate(90deg)!important}
body.landscape-play .river-right{right:30.25%!important;top:50%!important;transform:translateY(-50%) rotate(-90deg)!important}

/* v0.24.33 — 橫向桌面節距校正。
   牌桌下面不保留 action bar 的空槽；兩側座位則以各自面向排列：
   最外側為資訊，向桌內依序是手牌／吃碰槓、花牌／牌牆。 */
/* play-column 原本繼承直式 9:16 aspect-ratio，桌面後方因而留下空白高度。
   橫向遊戲頁改為內容高度，分析區緊接牌桌。 */
body.landscape-play .play-column{display:block!important;aspect-ratio:auto!important;height:auto!important;min-height:0!important}
body.landscape-play .game-column{display:block!important;min-height:0!important}
body.landscape-play .side-column{margin:0 auto!important;padding-top:0!important}
body.landscape-play .seat-left .opponent-stage,
body.landscape-play .seat-right .opponent-stage{gap:.16cqw!important}
body.landscape-play .seat-left .opponent-stage>.seat-name,
body.landscape-play .seat-right .opponent-stage>.seat-name{order:1!important;margin:0!important}
body.landscape-play .seat-left .opponent-rack-row,
body.landscape-play .seat-right .opponent-rack-row{order:2!important;margin:0!important}
body.landscape-play .seat-left .opponent-front-row,
body.landscape-play .seat-right .opponent-front-row{order:3!important;margin:0!important}
/* 側家資訊在旋轉後的最外側：貼近桌緣，再往內才是手牌與前方列。 */
body.landscape-play .seat-left{left:.8%!important}
body.landscape-play .seat-right{right:.8%!important}
/* 上家（左側）河牌向上、向左各退三張；下家（右側）向上、向右各退三張。 */
body.landscape-play .river-left{
  left:calc(30.25% - var(--river-w) - var(--river-w) - var(--river-w))!important;
  top:calc(50% - var(--river-h) - var(--river-h) - var(--river-h))!important;
  transform:translateY(-50%) rotate(90deg)!important;
}
body.landscape-play .river-right{
  right:calc(30.25% - var(--river-w) - var(--river-w) - var(--river-w))!important;
  top:calc(50% - var(--river-h) - var(--river-h) - var(--river-h))!important;
  transform:translateY(-50%) rotate(-90deg)!important;
}

/* v0.25.1 — 側家細部座標校正。
   以對手手牌寬（--half-w）與牌河格（--river-w/--river-h）為共同節距，
   只平移指定區塊，避免螢幕縮放時重新計算或改變其他桌內物件的位置。 */
/* 上家（左側）：資訊左 3 張、手牌左 1 張；花牌不跟隨移動。 */
body.landscape-play .seat-left .opponent-stage>.seat-name{
  transform:translateY(6.46875cqw)!important;
}
body.landscape-play .seat-left .opponent-rack-row{
  transform:translateY(var(--half-w))!important;
}
/* 下家（右側）：資訊右 3 張、手牌右 1 張；花牌不跟隨移動。 */
body.landscape-play .seat-right .opponent-stage>.seat-name{
  transform:translateY(6.46875cqw)!important;
}
body.landscape-play .seat-right .opponent-rack-row{
  transform:translateY(2.15625cqw)!important;
}
/* 牌牆維持畫布座標：上家左 2.5 張、下家右 .5 張。 */
body.landscape-play .wall-left{
  left:calc(17.4% - 5.390625cqw)!important;
}
body.landscape-play .wall-right{
  right:calc(17.4% - 1.078125cqw)!important;
}
/* 側家牌河：依自身的 6×3 格距，皆向下 2 張；上家再左 1 張、下家再右 1 張。 */
body.landscape-play .river-left{
  left:calc(30.25% - var(--river-w) - var(--river-w) - var(--river-w) - var(--river-w))!important;
  top:calc(50% - var(--river-h))!important;
}
body.landscape-play .river-right{
  right:calc(30.25% - var(--river-w) - var(--river-w) - var(--river-w) - var(--river-w))!important;
  top:calc(50% - var(--river-h))!important;
}
/* 資訊列直接以原生字型放大 20%，同步增加內距與最小高度，避免以縮放造成模糊。 */
body.landscape-play .player-meta,
body.landscape-play .opponent-stage>.seat-name{
  min-height:1.86cqw!important;
  padding:.17cqw .66cqw!important;
  font-size:1.248cqw!important;
  gap:.41cqw!important;
}
body.landscape-play .player-meta strong,
body.landscape-play .opponent-stage>.seat-name strong{
  font-size:1.704cqw!important;
}
body.landscape-play .opponent-stage>.seat-name span{
  font-size:1.248cqw!important;
}

/* v0.25.3 — 牌桌區塊不再建立裁切／遮罩面。
   座位、手牌、花牌、牌牆與牌河仍採同一組相對座標，但可完整跨越各自的
   配置盒；實際重疊以座標微調處理，不以不透明背景或 overflow 裁掉牌面。 */
body.landscape-play .mahjong-table,
body.landscape-play .seat,
body.landscape-play .player-zone,
body.landscape-play .opponent-stage,
body.landscape-play .player-front-row,
body.landscape-play .opponent-front-row,
body.landscape-play .opponent-rack-row,
body.landscape-play .wall-visual,
body.landscape-play .table-center,
body.landscape-play .river{
  overflow:visible!important;
  background-color:transparent!important;
  contain:none!important;
}
/* 上家（左側）：在既有基準再左移資訊 1 張、手牌 .5 張、牌牆 1 張。 */
body.landscape-play .seat-left .opponent-stage>.seat-name{
  transform:translateY(8.625cqw)!important;
}
body.landscape-play .seat-left .opponent-rack-row{
  transform:translateY(3.234375cqw)!important;
}
body.landscape-play .wall-left{
  left:calc(17.4% - 7.546875cqw)!important;
}
/* 下家（右側）：在既有基準再右移資訊 1 張、手牌 .5 張、牌牆 2.5 張。 */
body.landscape-play .seat-right .opponent-stage>.seat-name{
  transform:translateY(8.625cqw)!important;
}
body.landscape-play .seat-right .opponent-rack-row{
  transform:translateY(3.234375cqw)!important;
}
body.landscape-play .wall-right{
  right:calc(17.4% - 6.46875cqw)!important;
}
/* 上、下家牌河再向下 1 張，維持各自左右安全帶。 */
body.landscape-play .river-left,
body.landscape-play .river-right{
  top:50%!important;
}

/* v0.25.4 — 開局進入全螢幕橫向時，遊戲頁維持可捲動；牌桌資訊改為桌內固定疊層。 */
#gameView:fullscreen,
#gameView:-webkit-full-screen{
  height:100dvh!important;
  overflow-y:auto!important;
  overscroll-behavior-y:contain;
}
#gameView:fullscreen .game-workspace,
#gameView:-webkit-full-screen .game-workspace,
#gameView:fullscreen .play-column,
#gameView:-webkit-full-screen .play-column,
#gameView:fullscreen .game-column,
#gameView:-webkit-full-screen .game-column{
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
}
body.landscape-play .mahjong-table>.topbar{
  position:absolute!important;
  inset:0!important;
  z-index:48!important;
  display:block!important;
  width:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  background:transparent!important;
  border:0!important;
  color:#fff!important;
  pointer-events:none!important;
}
body.landscape-play .mahjong-table>.topbar .brand-title,
body.landscape-play .mahjong-table>.topbar .match-strip,
body.landscape-play .mahjong-table>.topbar .primary-actions{
  position:absolute!important;
  display:flex!important;
  width:auto!important;
  margin:0!important;
  padding:0!important;
  pointer-events:auto!important;
}
body.landscape-play .mahjong-table>.topbar .brand-title{
  left:1.25%!important;
  top:1.25%!important;
  align-items:center!important;
  white-space:nowrap!important;
}
body.landscape-play .mahjong-table>.topbar .brand-title .brand-heading{
  margin:0!important;
  font-size:1.55cqw!important;
  line-height:1.1!important;
  color:#ffe8b1!important;
  text-shadow:0 .12cqw .16cqw rgba(0,0,0,.55)!important;
}
body.landscape-play .mahjong-table>.topbar .match-strip{display:contents!important}
body.landscape-play .mahjong-table>.topbar .match-strip span{
  position:absolute!important;
  display:block!important;
  width:auto!important;
  margin:0!important;
  padding:.28cqw .58cqw!important;
  color:#fff5d8!important;
  font-size:1.02cqw!important;
  font-weight:800!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  background:rgba(4,34,27,.83)!important;
  border:1px solid rgba(255,226,156,.32)!important;
  border-radius:.34cqw!important;
  box-shadow:0 .12cqw .2cqw rgba(0,0,0,.28)!important;
}
body.landscape-play .mahjong-table>.topbar #seedLabel{left:1.25%!important;top:4.15%!important}
body.landscape-play .mahjong-table>.topbar #dealerLabel{right:1.25%!important;top:1.25%!important}
body.landscape-play .mahjong-table>.topbar #wallCountLabel{right:1.25%!important;top:4.15%!important}
body.landscape-play .mahjong-table>.topbar #phaseLabel{display:none!important}
body.landscape-play .mahjong-table>.topbar .primary-actions{
  right:1.25%!important;
  top:7.05%!important;
  gap:.45cqw!important;
}
body.landscape-play .mahjong-table>.topbar .primary-actions .soft-btn{
  font-size:.96cqw!important;
  padding:.32cqw .62cqw!important;
}

/* 對家牌牆向下半張；玩家牌牆上半張、左三張。 */
body.landscape-play .wall-top{
  top:calc(18.8% + 1.4cqw)!important;
}
body.landscape-play .wall-bottom{
  bottom:calc(18.7% + 2.8cqw)!important;
  right:calc(13.2% + 12.9375cqw)!important;
}
/* 上家花牌：畫面右一張、下一張；下家花牌：畫面左一張、上一張半。 */
body.landscape-play .seat-left .opponent-front-row{
  transform:translate(2.8cqw,-2.15625cqw)!important;
}
body.landscape-play .seat-right .opponent-front-row{
  transform:translate(4.2cqw,-2.15625cqw)!important;
}

/* v0.25.5 — 桌內資訊與牌河版型：所有定位維持相對於 19.5:9 畫布。 */
body.landscape-play .mahjong-table>.topbar .brand-title{
  left:1.5%!important;
  top:1.5%!important;
}
body.landscape-play .mahjong-table>.topbar .brand-title .brand-heading{
  font-size:1.86cqw!important;
}
body.landscape-play .mahjong-table>.topbar .match-strip span{
  padding:.336cqw .696cqw!important;
  font-size:1.224cqw!important;
  border-radius:.408cqw!important;
}
/* 牌局碼緊接 LOGO；莊家與局面資訊同列固定在牌桌右上。 */
body.landscape-play .mahjong-table>.topbar #seedLabel{
  left:12.2cqw!important;
  top:1.5%!important;
}
body.landscape-play .mahjong-table>.topbar #dealerLabel{
  right:25.5cqw!important;
  top:1.5%!important;
}
body.landscape-play .mahjong-table>.topbar #wallCountLabel{
  right:1.5%!important;
  top:1.5%!important;
}
/* 上家：右半張、下半張；下家：左半張、上 1.5 張。 */
body.landscape-play .seat-left .opponent-front-row{
  transform:translate(4.2cqw,-3.234375cqw)!important;
}
body.landscape-play .seat-right .opponent-front-row{
  transform:translate(8.4cqw,-3.234375cqw)!important;
}
/* 對家花牌改為從對家視角正向閱讀。 */
body.landscape-play .seat-top .opponent-flowers{
  transform:rotate(180deg)!important;
  transform-origin:center center!important;
}
/* 玩家、對家牌河各上移半張。 */
body.landscape-play .river-top{top:calc(31.2% - 2.1cqw)!important;}
body.landscape-play .river-bottom{bottom:calc(24.4% + 2.1cqw)!important;}
/* 上下家牌河永遠 6 欄 × 3 列；不允許第 13 張後套用密集版。 */
body.landscape-play .river-left,
body.landscape-play .river-left.crowded,
body.landscape-play .river-left.dense,
body.landscape-play .river-right,
body.landscape-play .river-right.crowded,
body.landscape-play .river-right.dense{
  --river-cols:6!important;
  --river-rows:3!important;
  display:grid!important;
  grid-template-columns:repeat(6,var(--river-w))!important;
  grid-template-rows:repeat(3,var(--river-h))!important;
  gap:.09cqw!important;
  row-gap:.09cqw!important;
  width:20.06cqw!important;
  height:12.78cqw!important;
}

/* v0.25.6 — 戰況與累積積分。 */
body.landscape-play .history-heading{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:1cqw!important;
}
body.landscape-play .history-heading h2{margin:0!important;}
body.landscape-play .history-heading .soft-btn{
  font-size:1.05cqw!important;
  padding:.38cqw .72cqw!important;
  white-space:nowrap!important;
}
/* 玩家花牌上移 1/4 張。 */
body.landscape-play .player-front-row{transform:translateY(-.7cqw)!important;}
/* 上、下家牌河各上移 1/4 張。 */
body.landscape-play .river-left,
body.landscape-play .river-right{top:calc(50% - 1.05cqw)!important;}
/* 下家（右側）牌牆上移兩張牌牆。 */
body.landscape-play .wall-right{top:calc(29.2% - 2.8cqw)!important;}

/* v0.25.7 — 結算操作列、對家視角與牌牆／花牌微調。 */
/* 結算前保留按鈕位置但以灰階呈現，不可操作。 */
body.landscape-play .coach-controls .soft-btn:disabled{
  opacity:.42!important;
  filter:grayscale(1)!important;
  cursor:not-allowed!important;
}
/* 對家從自身角度正向：僅手牌翻轉，資訊列維持玩家可閱讀方向。 */
body.landscape-play .seat-top .opponent-stage{
  transform:translateX(-50%)!important;
}
body.landscape-play .seat-top .opponent-rack-row{transform:rotate(180deg)!important;}
/* 花牌本來就是對家正向，保持 180 度。 */
body.landscape-play .seat-top .opponent-flowers{transform:rotate(180deg)!important;}
/* 對家牌牆上移半張；下家牌牆再上移兩張。 */
body.landscape-play .wall-top{top:calc(18.8% + .7cqw)!important;}
body.landscape-play .wall-right{top:calc(29.2% - 5.6cqw)!important;}
/* 對家花牌下移四分之一張（對家座標需反向平移）。 */
body.landscape-play .seat-top .opponent-front-row{transform:translateY(-.7cqw)!important;}

/* v0.25.8 — 四家資訊列格式與相對座標。 */
/* 玩家資訊列比照電腦座位：姓名、風位、積分為三個獨立欄位，均依畫布縮放。 */
body.landscape-play .player-meta>div{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:.34cqw!important;
}
body.landscape-play .player-meta span{
  font-size:1.04cqw!important;
  opacity:.78!important;
}
/* 玩家資訊列下移半張；三家資訊列按各自座向微調。 */
body.landscape-play .player-meta{transform:translateY(2.8cqw)!important;}
body.landscape-play .seat-left .opponent-stage>.seat-name{transform:translateY(9.703125cqw)!important;}
body.landscape-play .seat-right .opponent-stage>.seat-name{transform:translateY(9.703125cqw)!important;}
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:translateY(-1.4cqw)!important;}
/* LOGO 放大 25%，保留相同桌內基準點。 */
body.landscape-play .mahjong-table>.topbar .brand-title .brand-heading{font-size:2.325cqw!important;}
/* 玩家吃碰槓牌與手牌保留半張手牌的清楚間距。 */
body.landscape-play .hand-row{gap:2.15625cqw!important;}

/* v0.26.0 — 設定、桌內資訊與牌牆微調。 */
/* 新 LOGO 放大 50%，白底以混色方式融入頁面底色，不保留外框留白。 */
.brand-mark{width:183px!important;height:158px!important;overflow:hidden!important;isolation:isolate!important;}
.brand-mark img{object-fit:cover!important;mix-blend-mode:multiply!important;}
.setup-brand .brand-mark{width:162px!important;height:138px!important;}

/* 牌局碼固定在 LOGO 右側；右上依序為莊家、剩餘／回合、教學開關。 */
body.landscape-play .mahjong-table>.topbar .brand-title .brand-heading{font-size:2.79cqw!important;}
body.landscape-play .mahjong-table>.topbar #seedLabel{left:16.1cqw!important;top:1.5%!important;}
body.landscape-play .mahjong-table>.topbar #dealerLabel{right:25.3cqw!important;top:1.5%!important;}
body.landscape-play .mahjong-table>.topbar #wallCountLabel{right:10.3cqw!important;top:1.5%!important;}
body.landscape-play .table-coach-switch{
  position:absolute!important;right:1.5%!important;top:1.5%!important;z-index:55!important;
  display:flex!important;align-items:center!important;gap:.45cqw!important;margin:0!important;
  padding:.33cqw .7cqw!important;color:#fff5d8!important;font-size:1.224cqw!important;
  font-weight:800!important;line-height:1.15!important;white-space:nowrap!important;
  background:rgba(4,34,27,.83)!important;border:1px solid rgba(255,226,156,.32)!important;
  border-radius:.408cqw!important;box-shadow:0 .12cqw .2cqw rgba(0,0,0,.28)!important;
}
body.landscape-play .table-coach-switch input{position:absolute!important;opacity:0!important;pointer-events:none!important;}
body.landscape-play .table-coach-switch span{width:2.2cqw!important;height:1.18cqw!important;border-radius:1cqw!important;background:#98aaa4!important;position:relative!important;}
body.landscape-play .table-coach-switch span::after{content:""!important;position:absolute!important;width:.9cqw!important;height:.9cqw!important;left:.14cqw!important;top:.14cqw!important;border-radius:50%!important;background:#fff!important;transition:transform .18s ease!important;}
body.landscape-play .table-coach-switch input:checked+span{background:#1d795e!important;}
body.landscape-play .table-coach-switch input:checked+span::after{transform:translateX(1.02cqw)!important;}
/* 圈風局位沿用剩餘張數的資訊欄格式，只保留原本右上位置。 */
body.landscape-play .mahjong-table>.topbar #prevailingWindLabel{
  right:1.5%!important;
  top:1.5%!important;
}

/* 對家花牌向下半張、資訊向下四分之一張；玩家資訊上移 .4 張。 */
body.landscape-play .seat-top .opponent-front-row{transform:translateY(.7cqw)!important;}
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:translateY(-.7cqw)!important;}
body.landscape-play .player-meta{transform:translateY(.56cqw)!important;}
/* 下家牌牆再上 1.5 張；上家牌牆下 3 張。 */
body.landscape-play .wall-right{top:calc(29.2% - 9.8cqw)!important;}
body.landscape-play .wall-left{top:calc(29.2% + 8.4cqw)!important;}

/* v0.26.1 — 玩家吃碰槓牌與暗手牌採實際張數寬度，兩區固定相隔半張牌。 */
body.landscape-play .hand-row{
  gap:calc(var(--hand-w) * .5)!important;
  justify-content:center!important;
}
body.landscape-play .concealed-hand{
  flex:0 0 var(--concealed-w,73.65cqw)!important;
  width:var(--concealed-w,73.65cqw)!important;
}

/* v0.26.2 — 去背 Logo 與牌桌頂列校準。 */
.brand-mark{background:transparent!important;}
.brand-mark img{object-fit:contain!important;mix-blend-mode:normal!important;background:transparent!important;}
body.landscape-play .mahjong-table>.topbar #seedLabel{left:20.4125cqw!important;}
body.landscape-play .mahjong-table>.topbar #dealerLabel{right:33.925cqw!important;}
/* 莊家右移一張；牌桌教學開關必須能接收點擊。 */
body.landscape-play .mahjong-table>.topbar #dealerLabel{right:29.6125cqw!important;}
body.landscape-play .table-coach-switch{pointer-events:auto!important;cursor:pointer!important;}
/* 剩餘張數下方：固定顯示前三建議，牌與牌之間保留半張牌寬。 */
body.landscape-play .table-hints{
  position:absolute!important;right:10.3cqw!important;top:4.75cqw!important;z-index:56!important;
  display:flex!important;align-items:flex-start!important;gap:1.2cqw!important;pointer-events:none!important;
}
body.landscape-play .table-hint{display:flex!important;flex-direction:column!important;align-items:center!important;gap:.2cqw!important;color:#ffe8b1!important;font-size:.82cqw!important;font-weight:800!important;line-height:1!important;}
body.landscape-play .table-hint-tile,.table-hint-tile .tile{display:flex!important;width:2.4cqw!important;height:3.35cqw!important;min-width:0!important;box-sizing:border-box!important;}
body.landscape-play .table-hint-tile .tile{padding:.08cqw!important;border-bottom-width:.24cqw!important;border-radius:.18cqw!important;}

/* v0.26.4 — 對家頂端資訊與牌桌建議列校準。 */
/* 對家資訊列的上緣與桌內其他牌局資訊同高；只移動資訊，不帶動手牌列。 */
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:translateY(-4.3cqw)!important;}
/* 對家牌牆往畫面左方兩張手牌寬。 */
body.landscape-play .wall-top{right:calc(27.25% + 8.625cqw)!important;}
/* 提示欄往左兩張、文字放大 50%、牌面放大 25%。 */
body.landscape-play .table-hints{
  right:18.925cqw!important;
  gap:1.5cqw!important;
  padding:.32cqw .5cqw!important;
  background:rgba(4,34,27,.86)!important;
  border:.12cqw solid #efbd45!important;
  border-radius:.36cqw!important;
  box-shadow:0 .16cqw .32cqw rgba(0,0,0,.42)!important;
}
body.landscape-play .table-hint{font-size:1.23cqw!important;text-shadow:0 .08cqw .1cqw rgba(0,0,0,.6)!important;}
body.landscape-play .table-hint-tile,.table-hint-tile .tile{width:3cqw!important;height:4.1875cqw!important;}
body.landscape-play .table-hint-tile .tile{border-bottom-width:.3cqw!important;}

/* v0.26.5 — 依牌寬微調桌內頂端基準。 */
/* 莊家向右 0.25 張；對家資訊回 v0.26.3 基準後再上移 0.1 張。 */
body.landscape-play .mahjong-table>.topbar #dealerLabel{right:28.534375cqw!important;}
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:translateY(-1.13125cqw)!important;}
/* 對家牌牆向右 0.5 張。 */
body.landscape-play .wall-top{right:calc(27.25% + 6.46875cqw)!important;}
/* 提示欄向右 0.5 張、向上 0.1 張。 */
body.landscape-play .table-hints{right:14.6125cqw!important;top:4.31875cqw!important;}
/* v0.34.7：未開啟教學時，牌桌首選右側直接提供與下方同步的教學開關。 */
body.landscape-play .table-hints{pointer-events:auto!important;}
body.landscape-play .table-teaching-toggle{display:flex!important;flex-direction:column!important;align-items:center!important;gap:.35cqw!important;min-width:3.2cqw!important;padding:0!important;border:0!important;color:#ffe8b1!important;background:transparent!important;font:inherit!important;font-size:1.23cqw!important;font-weight:800!important;text-shadow:0 .08cqw .1cqw rgba(0,0,0,.6)!important;cursor:pointer!important;}
body.landscape-play .table-teaching-track{display:block!important;width:3cqw!important;height:1.55cqw!important;border:.12cqw solid rgba(255,255,255,.7)!important;border-radius:1cqw!important;background:#82958e!important;position:relative!important;box-shadow:inset 0 .08cqw .16cqw rgba(0,0,0,.25)!important;}
body.landscape-play .table-teaching-track::after{content:""!important;position:absolute!important;width:1.13cqw!important;height:1.13cqw!important;left:.14cqw!important;top:.09cqw!important;border-radius:50%!important;background:#fff!important;box-shadow:0 .08cqw .14cqw rgba(0,0,0,.35)!important;}

/* v0.26.6 — 摸牌分析風格切換。 */
body.landscape-play .coach-controls .coach-style-label{display:flex!important;align-items:center!important;gap:.35cqw!important;font-weight:800!important;white-space:nowrap!important;}
body.landscape-play .coach-style-label select{min-width:5.8cqw!important;padding:.38cqw .55cqw!important;border:1px solid #d9cdb8!important;border-radius:.45cqw!important;background:#fffdfa!important;color:#173c32!important;font-weight:800!important;}

/* v0.28.2：維持牌桌起點，僅校正資訊列、牌牆與戰況控制項的位置。 */
body.landscape-play .history-heading{justify-content:flex-end!important;}
body.landscape-play .history-heading h2{margin-right:auto!important;}
body.landscape-play .history-heading .soft-btn,
body.landscape-play #tableSnapshotBtn{font-size:1.05cqw!important;padding:.38cqw .72cqw!important;}

/* v0.28.5：牌局碼再左移半張。 */
body.landscape-play .mahjong-table>.topbar #seedLabel{left:16.1cqw!important;}

body.landscape-play .mahjong-table>.topbar #difficultyLabel{left:28.1875cqw!important;}
body.landscape-play .player-zone{transform:translateY(-.7cqw)!important;}
body.landscape-play .player-meta{transform:translate(-4.3125cqw,.56cqw)!important;}
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:translate(-4.3125cqw,-1.13125cqw)!important;}
body.landscape-play .wall-top{top:18.8%!important;}

/* v0.28.3：牌局碼右側顯示本局難度。 */
body.landscape-play .mahjong-table>.topbar #difficultyLabel{left:32.5cqw!important;top:1.5%!important;}

/* v0.28.4：校正牌局資訊與戰況按鈕，牌面截圖維持原本尺寸。 */
body.landscape-play .mahjong-table>.topbar #seedLabel{left:18.25625cqw!important;}
body.landscape-play .mahjong-table>.topbar #difficultyLabel{left:30.34375cqw!important;}
body.landscape-play .player-meta{transform:translate(-2.15625cqw,.56cqw)!important;}
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:translate(-2.15625cqw,-1.13125cqw)!important;}
body.landscape-play .history-heading .soft-btn{font-size:1.25cqw!important;padding:.5cqw .9cqw!important;}
body.landscape-play #tableSnapshotBtn{font-size:1.05cqw!important;padding:.38cqw .72cqw!important;}

/* v0.28.8：五個操作按鈕與開始下局採固定像素規格，不隨視窗寬度縮放。 */
body.landscape-play #topNextHandBtn.coach-action-btn,
body.landscape-play #tableSnapshotBtn.coach-action-btn,
body.landscape-play #landscapeBtn.coach-action-btn,
body.landscape-play #newMatchBtn.coach-action-btn,
body.landscape-play #playerStatsBtn.coach-action-btn,
body.landscape-play #resetScoresBtn.coach-action-btn{
  font-size:16px!important;
  line-height:normal!important;
  padding:9px 14px!important;
  min-height:39px!important;
  border-radius:9px!important;
  white-space:nowrap!important;
}

/* v0.28.9：桌面端採高解析整數格牌面，並恢復清晰的原生文字取樣。 */
body.landscape-play .mahjong-table{
  text-rendering:optimizeLegibility!important;
  -webkit-font-smoothing:subpixel-antialiased!important;
}
body.landscape-play .tile-face.classic-face{
  image-rendering:auto!important;
  background-size:900% 500%!important;
}
/* v0.28.11：由上一版位置向右移四分之一張玩家手牌寬。 */
body.landscape-play .mahjong-table>.topbar #seedLabel{left:17.178125cqw!important;}

/* v0.28.29：桌面端的牌面與資訊列對齊實體像素。
   JS 只在滑鼠／精準指標裝置加入 crisp-desktop，手機與平板仍沿用 cqw。 */
body.landscape-play .play-column.crisp-desktop .tile,
body.landscape-play .play-column.crisp-desktop .tile-face,
body.landscape-play .play-column.crisp-desktop .tile-back,
body.landscape-play .play-column.crisp-desktop .wall-stack{
  backface-visibility:visible!important;
  transform-style:flat!important;
  will-change:auto!important;
  text-rendering:geometricPrecision!important;
  -webkit-font-smoothing:auto!important;
}
body.landscape-play .play-column.crisp-desktop .tile-face.classic-face{
  image-rendering:auto!important;
  background-size:900% 500%!important;
  background-origin:border-box!important;
}
body.landscape-play .play-column.crisp-desktop .player-meta,
body.landscape-play .play-column.crisp-desktop .opponent-stage>.seat-name,
body.landscape-play .play-column.crisp-desktop .opponent-stage>.seat-name span{
  backface-visibility:visible!important;
  transform-style:flat!important;
  will-change:auto!important;
  text-rendering:geometricPrecision!important;
  -webkit-font-smoothing:auto!important;
}

/* v0.29.3：側邊座位只保留必要的 90 度幾何旋轉，不建立額外 GPU 點陣層。
   桌面 Chrome 會把 hidden backface 的整組牌與文字先縮成低解析圖層再旋轉，
   正是上／下家資訊列與牌面變糊的來源。 */
body.landscape-play .play-column.crisp-desktop .seat-left .opponent-stage,
body.landscape-play .play-column.crisp-desktop .seat-right .opponent-stage,
body.landscape-play .play-column.crisp-desktop .seat-top .opponent-rack-row{
  backface-visibility:visible!important;
  transform-style:flat!important;
  will-change:auto!important;
}
body.landscape-play .play-column.crisp-desktop .seat,
body.landscape-play .play-column.crisp-desktop .player-zone,
body.landscape-play .play-column.crisp-desktop .table-center,
body.landscape-play .play-column.crisp-desktop .wall-visual{
  contain:layout!important;
}

/* v0.30.8：提升教學提醒、玩家風位／積分及牌桌資訊的閱讀尺寸。 */
body.landscape-play .player-meta span{
  font-size:1.3cqw!important;
}
body.landscape-play .mahjong-table>.topbar .match-strip span{
  padding:.3696cqw .7656cqw!important;
  font-size:1.3464cqw!important;
  border-radius:.4488cqw!important;
}

/* v0.31.1：難度與剩餘張數各向左移四分之一張牌。 */
body.landscape-play .mahjong-table>.topbar #difficultyLabel{left:31.90625cqw!important;}
body.landscape-play .mahjong-table>.topbar #wallCountLabel{right:9.51875cqw!important;}

/* v0.31.4：橫向牌桌的最終座標。舊版 important 規則曾蓋過資訊列位移。 */
body.landscape-play .player-meta{transform:translate(0,.56cqw)!important;}
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:translate(0,-1.13125cqw)!important;}
body.landscape-play .seat-top .opponent-front-row{transform:translateY(0)!important;}

/* v0.34.1：依一張玩家手牌寬 4.3125cqw 微調牌桌資訊列。 */
body.landscape-play .mahjong-table>.topbar #wallCountLabel{right:8.440625cqw!important;}
body.landscape-play .mahjong-table>.topbar #dealerLabel{right:26.378125cqw!important;}
body.landscape-play .mahjong-table>.topbar #difficultyLabel{
  left:17.178125cqw!important;
  top:4.4%!important;
}
body.landscape-play .player-meta{transform:translate(4.3125cqw,.56cqw)!important;}
body.landscape-play .seat-top .opponent-stage>.seat-name{transform:translate(4.3125cqw,-1.13125cqw)!important;}

/* v0.34.2：難度由 v0.34.1 基準再向下移一張玩家手牌高度。 */
body.landscape-play .mahjong-table>.topbar #difficultyLabel{
  transform:translateY(5.6cqw)!important;
}

/* v0.34.3：難度由 v0.34.2 位置向上移四分之三張玩家手牌。 */
body.landscape-play .mahjong-table>.topbar #difficultyLabel{
  transform:translateY(1.4cqw)!important;
}

/* 取消圖示沿用牌面尺寸，以兩軸置中避免橫向 flex 覆蓋。 */
body.landscape-play .table-hint-tile.claim-pass-mark{display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;line-height:1!important;font-size:2.4cqw!important;}
