/* nx_match.css
----------------------------------------
Numeon Website

叠加在 nx.css 之上的对局/对局库页面专属样式。姊妹文件：orbit_match.css
（2026-09-29 复制过来改的，同样的道理：nx.css 管侧栏/大厅/弹窗这些
通用的，这个文件管对局页/对局库页自己的布局——时钟、棋谱列表、聊天栏、
#om-root 的三栏网格）。配色变量retarget成跟 nx.css 一致的深空/青色主题，
结构、class 名没有变。
*/

/* orbit_match.css
----------------------------------------
Orbit 对局界面（frontend/orbit_game.html）的样式。

叠加在 orbit.css 之上：颜色变量、.piece-slot / .arrived-slot（未落子
棋子）、.lobby-sidebar（左侧站点栏）、.banner（终局横幅）都沿用那边的，
这里只管这个页面自己的布局。

没有覆盖 orbit_game.css——那个文件现在只给复盘页 orbit_replay.html
用（它依赖那边的 #match-shell / .rack-corner 这些类），改它会把复盘页
一起改坏，所以对局页单独用这一份新文件。

PC：左侧站点栏 | 左栏（对手 / 棋谱 / 按钮 / 自己）| 棋盘 | 右栏（信息 / 聊天）
手机（≤ 760px）：顶栏 → 对手 → 对手棋子 → 棋盘 → 自己棋子 → 自己 → 按钮
                 → 对局信息 → 聊天；不显示棋谱窗口。
---------------------------------------- */

:root {
    --om-panel: #1b2338;
    --om-panel-dark: #141a2e;
    --om-clock-bg: #0d1322;
    --om-clock-idle: #4a5570;
    --om-green: #33c6b3;
    --om-red: #e0616f;
    --om-serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
}

body.om-body { margin: 0; }

#om-root {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    min-height: 100vh;
}

/* 连接状态提示（orbit_game.js 的连接层）：断线时屏幕上方一条小提示，恢复后消失 */
.om-conn {
    position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 200;
    max-width: 92vw; padding: 7px 14px; border-radius: 6px; font-size: 13px; line-height: 1.4;
    background: #5c4330; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.om-conn[hidden] { display: none; }
.om-conn[data-kind="connLost"] { background: #b8651b; }
.om-conn[data-kind="takenOver"], .om-conn[data-kind="connClosed"] { background: #c0392b; }

#om-sidebar { min-height: 100vh; }

/* 侧栏固定在屏幕上（2026-09-28）：不随页面滚动，玩家名钉在屏幕左下角。
   （手机版 ≤760px 侧栏是顶栏，不适用，见下面 @media） */
@media (min-width: 761px) {
    #om-sidebar {
        position: sticky;
        top: 0;
        align-self: start;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow-y: auto;
    }
}
#om-sidebar .om-brand { text-decoration: none; }
#om-sidebar .site-switch-btn { text-decoration: none; }
#om-sidebar .lobby-account-btn { text-decoration: none; }

/* ---------- 对局主体：PC 网格 ---------- */

#om-match {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 220px;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
        "opp      board info"
        "moves    board chat"
        "controls board chat"
        "self     board chat";
    column-gap: 18px;
    row-gap: 0;
    height: 100vh;
    padding: 16px 16px 16px 4px;
    box-sizing: border-box;
}

#om-opp      { grid-area: opp; }
#om-moves    { grid-area: moves; }
#om-controls { grid-area: controls; }
#om-self     { grid-area: self; }
#om-board-area { grid-area: board; }
#om-info     { grid-area: info; }
#om-chat     { grid-area: chat; margin-top: 10px; }

.om-card {
    background: var(--om-panel);
    padding: 8px 10px;
}

/* ---------- 棋手卡片 + 时钟 ---------- */

.om-player-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.om-name {
    font-family: var(--om-serif);
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.om-rating { font-size: 12px; color: #8890a6; }

.om-clock-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.om-clock {
    font-family: var(--om-serif);
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    background: var(--om-clock-idle);
    padding: 1px 8px;
    min-width: 64px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.om-clock.is-active { background: var(--om-clock-bg); }
.om-clock.is-low    { background: var(--om-red); }

.om-inc { font-size: 14px; color: #8890a6; }

/* ---------- 棋谱面板 ---------- */

.om-moves {
    display: flex;
    flex-direction: column;
    margin-top: 6px;
    min-height: 0;
    background: var(--om-panel-dark);
}

.om-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.om-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #aab2c4;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

.om-nav-btn:hover:not(:disabled) { background: rgba(255,255,255,.08); color: var(--text-dark); }
.om-nav-btn:disabled { opacity: .35; cursor: default; }

.om-ply { font-size: 11px; color: #8890a6; font-variant-numeric: tabular-nums; }

.om-move-list { flex: 1; min-height: 60px; overflow-y: auto; }

/* ---------- 通知 + 按钮 ---------- */

.om-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--om-panel-dark);
    border-top: 1px solid rgba(0,0,0,.08);
    padding-top: 6px;
    padding-bottom: 0;
}

#om-offers   { order: 1; display: flex; flex-direction: column; gap: 3px; }
#om-yourturn { order: 2; }
#om-flash    { order: 3; }
.om-actions  { order: 4; }
#om-firstmove { order: 5; }

.om-notice, .om-offer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 12px;
    line-height: 1.3;
}

.om-notice[hidden], .om-flash[hidden], .om-firstmove[hidden] { display: none; }

.om-offer-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-offer-btns { display: flex; gap: 4px; flex-shrink: 0; }

.om-mini {
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
    line-height: 1.4;
}

.om-agree, .om-go { background: var(--om-green); }
.om-deny { background: var(--om-red); }
.om-go { font-size: 13px; padding: 0 10px; }

.om-flash { font-size: 12px; color: var(--accent-orange); }

.om-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 2px 0 4px;
}

.om-act-wrap { position: relative; }

.om-act {
    width: 42px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 6px;
    color: #cdd3e0;
    cursor: pointer;
}

.om-act:hover { background: rgba(255,255,255,.08); }
.om-eq { font-size: 26px; font-weight: 700; line-height: 1; }

/* 单击一次 = 高亮 + 右侧出现 ×；再点一次图标才生效 */
.om-act-wrap.armed .om-act { background: rgba(107,74,52,.2); }
.om-act-wrap.armed #om-act-resign { color: var(--om-red); background: rgba(192,57,43,.14); }

/* 悔棋在计分对局里不可用：透明度 40% */
.om-act.is-off { opacity: .4; cursor: not-allowed; }
.om-act.is-off:hover { background: none; }

.om-cancel {
    display: none;
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--om-red);
    font-size: 14px;
    line-height: 18px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    z-index: 2;
}

.om-act-wrap.armed .om-cancel { display: block; }

/* 首步倒计时条 */
.om-firstmove {
    margin: 0 -10px;
    padding: 3px 10px;
    font-family: var(--om-serif);
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    background: var(--om-green);
}

.om-firstmove.is-waiting { background: #3a4258; font-weight: 400; }

/* ---------- 棋盘区 ---------- */

#om-board-area {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    min-width: 0;
}

.om-board-box {
    grid-column: 2;
    grid-row: 1;
    width: min(100%, calc(100vh - 70px));
    aspect-ratio: 1 / 1;
    justify-self: center;
    align-self: center;
}

#board-svg { width: 100%; height: 100%; display: block; }

/* Nexus 用 canvas 画棋盘（不是 Orbit 的 SVG）：同一个 .om-board-box 容器，
   画布本身跟 nexus_play.html 自己那份 canvas#board 的尺寸写法一样——
   内部坐标系固定 800x800，CSS 让它跟着容器宽度缩放，高度自动保持方形。 */
/* touch-action: manipulation（2026-10-03，原来是 none）：手机上棋盘几乎占满一屏宽，
   none 会让手指按在棋盘上时整页没法上下滑。这个页面只用 click / mousemove，
   没有自己处理触摸手势，manipulation 照样能点、还顺带去掉双击缩放的延迟。 */
canvas#board { display: block; border-radius: 10px; cursor: pointer; width: 100%; height: 100%; touch-action: manipulation; }

/* 黑方视角：整个棋盘转 180°，棋子图片再各自转回来（不然是倒着的）。
   用 CSS 而不是改 orbit_board.js：走子动画是改图片的 x/y 属性，
   transform-box: fill-box 让每张图绕自己的中心转，跟动画互不干扰。 */
#board-svg.om-flipped { transform: rotate(180deg); }
#board-svg.om-flipped .piece-icon {
    transform-box: fill-box;
    transform-origin: center;
    transform: rotate(180deg);
}

#om-hint-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 26px;
    font-size: 13px;
}

/* 未落子棋子：PC 上是竖排，对手贴棋盘左上、自己贴右下 */
.om-rack {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    grid-row: 1;
    z-index: 3;
}

.om-rack-opp  { grid-column: 1; align-self: start; }
.om-rack-self { grid-column: 3; align-self: end; }

.om-rack .piece-slot { width: 62px; height: 62px; }
.om-rack .piece-slot img { width: 52px; height: 52px; }

/* 抵达区（两个虚线圈）：绝对定位，不撑宽这一列，
   伸进棋盘方框的角落——圆形棋盘的四个角本来就是空的 */
.om-rack .arrived-row { position: absolute; margin: 0; }
.om-rack-opp  .arrived-row { left: 100%; top: 14px; margin-left: 8px; }
.om-rack-self .arrived-row { right: 100%; bottom: 14px; margin-right: 8px; }

/* 棋盘上一步的起点/终点高亮在 orbit_game.js 里画（SVG 图层），
   这里只放往回翻看时棋子架不可点的视觉提示 */
.om-viewing .om-rack { opacity: .75; }

/* ---------- 右栏：对局信息 + 聊天 ---------- */

.om-info { background: none; padding: 4px 0 0; font-size: 13px; }
.om-info-tc { margin-bottom: 8px; color: #aab2c4; }   /* 原来是 Orbit 浅色主题的棕色，在深色底上几乎看不见 */

.om-info-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
}

.om-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.5px solid #aab2c4;
    flex-shrink: 0;
}

.om-dot-white { background: #f4f2ee; }
.om-dot-black { background: #6f655c; }

.om-chat {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(0,0,0,.06);
}

.om-chat-head {
    font-family: var(--om-serif);
    font-size: 17px;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,.6);
}

.om-chat-log {
    flex: 1;
    min-height: 120px;
    overflow-y: auto;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.5;
    background: var(--om-panel-dark);
}

.om-chat-line { margin-bottom: 3px; overflow-wrap: anywhere; }
.om-chat-who { font-weight: 700; color: var(--btn-brown); }
.om-chat-sys { color: #8890a6; font-style: italic; }

.om-chat-input {
    border: none;
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 7px 8px;
    font-size: 13px;
    background: rgba(255,255,255,0.05);
    color: var(--text-dark);
    outline: none;
}

.om-chat-input:disabled { color: #5a6276; }

/* ---------- 观战者 ----------
   不显示悔棋/提和/认输、首步倒计时、聊天输入框；
   也不显示任何"你是观众，不能操作"之类的提示。 */

body.om-spectator #om-controls,
body.om-spectator .om-chat-input { display: none; }

/* ---------- 错误提示 ---------- */

#om-error {
    grid-column: 2;
    max-width: 480px;
    margin: 80px auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

#om-error[hidden] { display: none; }

/* ================= 手机 ================= */

@media (max-width: 760px) {

    #om-root { display: block; }

    .om-pc-only { display: none !important; }

    /* 左侧栏变成顶栏：Orbit ……… 账号，下面一行导航 */
    #om-sidebar {
        width: auto;
        min-height: 0;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px 14px;
        padding: 12px 14px 6px;
    }

    #om-sidebar .om-brand { order: 1; }
    #om-sidebar .lobby-account-btn { order: 2; width: auto; margin: 0; }
    #om-sidebar .lobby-nav {
        order: 3;
        width: 100%;
        flex-direction: row;
        gap: 16px;
    }

    #om-match {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "opp"
            "board"
            "self"
            "controls"
            "info"
            "chat";
        height: auto;
        padding: 0 8px 20px;
    }

    #om-moves { display: none; }      /* 手机版不做棋谱窗口 */

    .om-player { background: none; padding: 6px 4px; }
    .om-player-head { justify-content: flex-start; }
    .om-name { font-size: 22px; }
    .om-clock { font-size: 26px; }

    #om-board-area {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto auto;
    }

    .om-board-box { grid-column: 1; grid-row: 2; width: 100%; }

    /* 未落子棋子改成横排：对手在棋盘上方，自己在下方 */
    .om-rack {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        align-self: center;
        grid-column: 1;
    }

    .om-rack-opp  { grid-row: 1; }
    .om-rack-self { grid-row: 3; }
    #om-hint-bar  { grid-row: 4; }

    .om-rack .piece-slot[data-piece="pawn"]    { order: 1; }
    .om-rack .piece-slot[data-piece="hussar"]  { order: 2; }
    .om-rack .piece-slot[data-piece="chariot"] { order: 3; }
    .om-rack .arrived-row { order: 4; position: static; margin: 0 0 0 8px; }

    .om-rack .piece-slot { width: 52px; height: 52px; }
    .om-rack .piece-slot img { width: 44px; height: 44px; }

    /* 手机上：首步倒计时条紧跟在自己的时钟下面，按钮在它下面 */
    .om-controls { background: none; border: none; padding: 0 4px; }
    #om-firstmove { order: 0; margin: 0; }
    .om-actions { justify-content: flex-start; gap: 22px; padding-left: 4px; }

    #om-info { margin-top: 14px; }
    #om-chat { margin-top: 8px; }
    .om-chat-log { min-height: 160px; max-height: 260px; }

}

/* ---------- 棋谱窗口（orbit_notation.js 生成的记录） ---------- */

.om-mv-row {
    display: grid;
    grid-template-columns: 26px 1fr 1fr;
    gap: 2px;
    font-size: 12px;
    line-height: 1.45;
    padding: 1px 0;
}

.om-mv-num { color: #8890a6; text-align: right; padding-right: 4px; }

.om-mv {
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    padding: 0 4px;
    border-radius: 3px;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.om-mv:hover { background: rgba(0, 0, 0, 0.07); }
.om-mv.is-current { background: var(--btn-brown); color: #fff; }
.om-mv-empty { cursor: default; }
.om-mv-empty:hover { background: none; }

/* ---- 以下是 2026-09-29 搭 Nexus 联机对局页（nx_game.html）新加的，
   orbit_match.css 里没有对应的东西：落子形状按钮、时钟告急提示、
   申请中的按钮高亮、对方的提和/悔棋申请条、占地进度条。 ---- */

/* 落子形状：方 / 圆（样式照抄 nexus_play.html 自己的 .shape-btn，
   本来就是深色主题，不用再 retarget） */
.shape-row { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.shape-btn {
    font-size: 13px; font-weight: 500; color: #8890a6;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.shape-btn.active { background: var(--accent-purple); color: #fff; border-color: var(--accent-purple); font-weight: 600; }

/* 时钟只剩不到 30 秒（读秒内不到 10 秒）：闪一下提醒 */
.om-clock-low { color: var(--accent-orange); font-weight: 700; }

/* 提和 / 悔棋申请已发出，等对方回应：按钮本身也跟着提示一下 */
.om-act-pending { background: rgba(51,198,179,0.18); color: var(--btn-brown); }

/* 对方的提和 / 悔棋申请：排在 #om-offers 里，agree/deny 两个小按钮 */
.om-offer-row { font-size: 13px; padding: 6px 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* 占地进度条（跟 nexus_play.html 的 .territory-bar 同一个视觉，
   markup 稍有不同——这里两段是 span 不是 div，class 名也不同，
   所以没有直接复用那边的 .w/.b，单独定义） */
.territory-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-top: 4px; background: rgba(255,255,255,0.06); }
#om-terr-white-bar { display: block; height: 100%; background: linear-gradient(90deg,#fff,#8b8f98); }
#om-terr-black-bar { display: block; height: 100%; background: linear-gradient(90deg,#4a4a50,#000); }
.om-info-sub { font-size: 11px; color: #8890a6; margin-top: 10px; margin-bottom: 2px; text-transform: uppercase; letter-spacing: .04em; }

/* ---- 2026-10-03：棋种标记（棋手卡片下方 + 右侧信息栏），
   参考数弈对局界面的 piece-tag：一方一圆，用这一方的颜色画。 ---- */
.om-kind {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 13px;
    color: #aab2c4;
}
.om-kind:empty { display: none; }
.om-kind-count { margin-left: 3px; font-variant-numeric: tabular-nums; }

.nx-tag { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }

.nx-stone {
    display: inline-block;
    width: 13px;
    height: 13px;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.nx-stone.nx-fang { border-radius: 3px; }
.nx-stone.nx-yuan { border-radius: 50%; }
.nx-stone.nx-white { background: linear-gradient(135deg, #ffffff, #8b8f98); }
/* 黑子画在深色面板上：加一圈浅色描边，不然看不出形状 */
.nx-stone.nx-black { background: linear-gradient(135deg, #4a4a50, #000000); border: 1px solid rgba(255,255,255,.35); }

/* ================= 手机（2026-10-03 追加）=================
   单独放在文件最末尾：上面这些 .shape-btn / .om-offer-row / .territory-bar /
   .om-kind 的基础样式写在第一个手机 @media 块之后，放进那个块里会被它们按
   先后顺序盖掉。 */
@media (max-width: 760px) {
    /* ---- 2026-10-03：手机版对局界面，参考数弈的手机排布 ----
       以前棋盘撑出屏幕的根本原因在 nx_game.js（canvas 被内联写死 800px，
       已去掉）；这里再把整页收进一屏宽，文字调到手机上看得清的大小。 */

    html, body.om-body { overflow-x: hidden; }

    #om-sidebar { padding: 10px 12px 4px; }
    #om-sidebar .lobby-nav-item { font-size: 16px; }

    #om-match { padding: 0 6px 24px; }

    /* 棋手卡片：第一行 名字 + 等级分；第二行 左边棋种，右边时钟（跟数弈一样）。
       顺序靠 order 调，HTML 里棋种仍然在时钟下面（电脑版就是"信息下方"）。 */
    .om-player {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 8px 8px 6px;
    }
    .om-player-head { width: 100%; order: 1; }
    .om-name { font-size: 21px; }
    .om-rating { font-size: 17px; margin-left: 8px; }
    .om-kind { order: 2; margin-top: 4px; font-size: 16px; }
    .om-kind .nx-stone { width: 17px; height: 17px; }
    .om-clock-row { order: 3; margin-left: auto; margin-top: 4px; }
    .om-clock { font-size: 24px; min-width: 72px; }
    .om-inc { font-size: 15px; }

    .om-board-box { width: 100%; max-width: 100%; }
    #om-board-area { width: 100%; }

    .om-controls { gap: 6px; }
    .om-act { width: 52px; height: 42px; }
    .om-act svg { width: 26px; height: 26px; }
    .om-eq { font-size: 30px; }
    .om-actions { justify-content: space-around; gap: 0; padding-left: 0; }
    .shape-btn { font-size: 16px; padding: 8px 20px; }
    .om-flash, .om-notice, .om-offer-row { font-size: 15px; }
    .om-mini { font-size: 14px; padding: 4px 12px; }
    .om-firstmove { font-size: 15px; }
    #om-hint-bar { font-size: 15px; min-height: 0; }
    #om-hint-bar:has(#hint-text:empty) { display: none; }   /* 提示条平时是空的，手机上别白占一行 */

    .om-info { font-size: 16px; }
    .om-info-sub { font-size: 13px; }
    .om-dot { width: 15px; height: 15px; }
    .territory-bar { height: 12px; }

    .om-chat-head { font-size: 18px; }
    .om-chat-log { font-size: 15px; }
    .om-chat-input { font-size: 16px; padding: 10px; }   /* ≥16px：iOS 聚焦输入框时不会自动放大整页 */

    .banner-card h2 { font-size: 22px; }
}

/* ---- 2026-10-03 ---- */

/* 轮到谁走，谁的时钟底色变成蓝紫色（时钟正在走的那一方） */
.om-clock.is-active { background: rgb(124, 92, 214); }

/* 连吃提前收手：绿色 ✓ Finished，样式同 Orbit 的 .finish-btn，在方/圆按钮上方 */
.om-finish-row { display: flex; justify-content: center; margin-top: 8px; }
.om-finish-row:has(.om-finish[hidden]) { display: none; }
.om-finish {
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    background: #2e9e5b;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.om-finish:hover { background: #26824c; }
.om-finish[hidden] { display: none; }

@media (max-width: 760px) {
    .om-finish { font-size: 16px; padding: 10px 24px; }
}

/* ---- 2026-10-03（二）：终局横幅 × / 复盘，复盘模式，子力用完 ---- */

#end-banner .banner-card { position: relative; padding: 30px 40px 26px; }
/* 选择器带上 #end-banner：nx.css 里 .banner-card button 会给横幅里所有按钮
   加青色底 + 上边距，不压过它的话 × 会变成一个青色方块 */
#end-banner .banner-close {
    margin: 0;
    box-shadow: none;
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: none;
    color: #cdd3e0;
    font-size: 24px;
    line-height: 32px;
    padding: 0;
    cursor: pointer;
}
#end-banner .banner-close:hover { background: rgba(255,255,255,.1); color: #fff; }
.banner-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
#end-banner .banner-actions .menu-btn { justify-content: center; min-width: 120px; margin: 0; padding: 12px 16px; font-size: 15px; border-radius: 10px; }
#end-banner .banner-actions .menu-btn[hidden] { display: none; }
/* 横幅按钮用站点青色（nx.css 的 --btn-brown 在 Nexus 主题里就是青色） */
#end-banner #end-banner-review { background: var(--btn-brown); border-color: var(--btn-brown); color: #fff; font-weight: 600; }

/* 复盘模式：不能走子，操作按钮收起来 */
body.om-review #om-controls { display: none; }

/* 子力池用完：方 / 圆按钮变灰（只能吃子或 Pass） */
.shape-row.is-empty .shape-btn { opacity: .35; pointer-events: none; }

@media (max-width: 760px) {
    /* 手机：复盘时把棋谱导航条显示出来（平时手机版不显示棋谱窗口） */
    #om-match {
        grid-template-areas:
            "opp"
            "board"
            "self"
            "moves"
            "controls"
            "info"
            "chat";
    }
    body.om-review #om-moves {
        display: flex;
        background: none;
        margin-top: 4px;
        padding: 4px 4px 0;
    }
    body.om-review .om-nav { justify-content: center; gap: 6px; }
    body.om-review .om-nav-btn { font-size: 22px; padding: 8px 16px; color: #cdd3e0; background: rgba(255,255,255,.06); }
    body.om-review .om-ply { font-size: 15px; min-width: 64px; text-align: center; }
    body.om-review .om-move-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 2px;
        min-height: 0;
        padding: 6px 0 2px;
        font-size: 15px;
    }
    #end-banner .banner-card { margin: 0 16px; padding: 30px 22px 22px; }
}

/* ---- 2026-10-04：棋谱窗口显示记谱（逐手编号：1. Ch7  2. Sg8 …） ---- */
#om-move-list .om-mv-row { grid-template-columns: 34px 1fr; font-size: 13px; }
#om-move-list .om-mv { justify-self: start; }
#om-move-list .om-mv:hover { background: rgba(255, 255, 255, 0.08); }
.om-copy-record { align-self: flex-end; margin-top: 6px; }

@media (max-width: 760px) {
    /* 手机复盘：记谱排成一行横向滑动 */
    body.om-review #om-move-list .om-mv-row { display: inline-flex; gap: 2px; flex-shrink: 0; font-size: 15px; }
    body.om-review #om-move-list .om-mv-num { min-width: 0; padding-right: 0; }
    body.om-review #om-move-list { gap: 12px; }
    body.om-review .om-copy-record { margin: 4px auto 0; font-size: 14px; }
}
