/* ============================================================
   拾光游戏厅 · morris.css
   九子棋：羊皮纸棋盘 / 木质圆片棋子 / 成三取子 / 状态栏 / 结果弹窗
   ============================================================ */

/* ---------------- 舞台与棋盘外框 ---------------- */
.nm-wrap {
  width: 100%;
}

.nm-stage {
  padding: clamp(12px, 1.9vw, 26px);
  background:
    radial-gradient(ellipse at 50% -6%, rgba(255, 232, 186, .12), transparent 58%),
    repeating-linear-gradient(38deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 5px),
    linear-gradient(158deg, #235543, #174536 55%, #103127 100%);
}

.nm-stage-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nm-board-frame {
  position: relative;
  width: min(100%, 640px);
  padding: clamp(9px, 1.5vw, 18px);
  border-radius: 9px;
  border: 1px solid rgba(20, 10, 3, .86);
  background:
    linear-gradient(180deg, rgba(255, 222, 168, .17), transparent 15%),
    repeating-linear-gradient(91deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 9px),
    linear-gradient(152deg, #6b4526, #472b15 55%, #2c1a0b);
  box-shadow:
    0 26px 48px rgba(0, 0, 0, .55),
    0 4px 0 rgba(0, 0, 0, .32),
    inset 0 1px 0 rgba(255, 226, 176, .22),
    inset 0 -2px 8px rgba(0, 0, 0, .52);
}

.nm-board-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9px;
  pointer-events: none;
  background:
    radial-gradient(circle at 2.6% 2.8%, rgba(238, 208, 145, .6) 0 1.3px, transparent 2px),
    radial-gradient(circle at 97.4% 2.8%, rgba(238, 208, 145, .6) 0 1.3px, transparent 2px),
    radial-gradient(circle at 2.6% 97.2%, rgba(238, 208, 145, .5) 0 1.3px, transparent 2px),
    radial-gradient(circle at 97.4% 97.2%, rgba(238, 208, 145, .5) 0 1.3px, transparent 2px);
}

/* 羊皮纸棋盘面 */
.nm-board {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  container-type: inline-size;
  touch-action: manipulation;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 27% 17%, rgba(255, 251, 234, .78), transparent 56%),
    radial-gradient(ellipse at 78% 88%, rgba(118, 78, 38, .17), transparent 62%),
    repeating-linear-gradient(0deg, rgba(118, 84, 44, .036) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(118, 84, 44, .03) 0 1px, transparent 1px 4px),
    linear-gradient(135deg, #f1e3c6, #e9d6b1 46%, #ddc8a0 100%);
  box-shadow:
    inset 0 0 0 1px rgba(92, 61, 26, .42),
    inset 0 1px 0 rgba(255, 255, 255, .6),
    inset 0 0 46px rgba(118, 78, 38, .18);
}

.nm-board::before {
  content: "";
  position: absolute;
  inset: 1.6%;
  border: 1px solid rgba(120, 85, 45, .18);
  border-radius: 1px;
  pointer-events: none;
  z-index: 0;
}

/* ---------------- 棋盘线、铜钉与边饰 ---------------- */
.nm-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.nm-line {
  stroke: rgba(72, 45, 20, .72);
  stroke-width: 2.5;
  fill: none;
  stroke-linejoin: round;
}

.nm-pins circle {
  fill: url(#nm-pin-grad);
  stroke: rgba(74, 46, 20, .55);
  stroke-width: .8;
}

.nm-ornaments path {
  stroke: rgba(118, 82, 42, .32);
  stroke-width: 1.4;
  fill: none;
}

.nm-coords text {
  fill: rgba(90, 58, 26, .55);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.75cqw;
}

.nm-watermark circle {
  fill: none;
  stroke: rgba(112, 76, 38, .11);
  stroke-width: 2;
}
.nm-watermark text {
  fill: rgba(104, 68, 30, .085);
  font-family: var(--font-display);
  font-size: 86px;
  font-weight: 600;
}

/* ---------------- 点位与棋子 ---------------- */
.nm-points {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.nm-pt {
  position: absolute;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}

.nm-board[data-phase="placing"]:not(.is-removing) .nm-pt:not(.has-piece) { cursor: pointer; }
.nm-board[data-phase="moving"] .nm-pt.has-piece,
.nm-board[data-phase="moving"] .nm-pt.is-dest,
.nm-board.is-removing .nm-pt.is-target {
  cursor: pointer;
}

.nm-piece {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .16s ease, transform .2s cubic-bezier(.2, .9, .3, 1.2);
  pointer-events: none;
  z-index: 2;
}

.nm-pt.has-piece .nm-piece {
  opacity: 1;
  transform: scale(1);
}

/* 红方：红漆木片，黄铜内圈 */
.nm-piece.is-red {
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 236, 204, .85) 0%, rgba(255, 205, 165, .3) 10%, transparent 30%),
    repeating-radial-gradient(circle at 50% 52%, rgba(84, 18, 11, .13) 0 1.2px, transparent 1.2px 4px),
    radial-gradient(circle at 40% 34%, #d26145 0%, #b23b28 34%, #8a271a 70%, #5f180f 100%);
  box-shadow:
    0 .38cqw .55cqw rgba(30, 12, 4, .52),
    0 .1cqw .14cqw rgba(20, 8, 2, .5),
    inset 0 0 0 .13cqw rgba(240, 216, 166, .82),
    inset 0 -.26cqw .44cqw rgba(72, 16, 8, .55),
    inset .14cqw .16cqw .36cqw rgba(255, 226, 190, .28);
}

.nm-piece.is-red::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: .17cqw solid rgba(240, 216, 168, .85);
  background: radial-gradient(circle at 50% 50%, rgba(240, 216, 168, .9) 0 30%, transparent 36%);
  box-shadow: inset 0 0 0 .08cqw rgba(96, 24, 12, .5), 0 0 .3cqw rgba(0, 0, 0, .35);
}

/* 墨方：墨黑木片，黄铜菱形内纹（与红方形状区分） */
.nm-piece.is-ink {
  background:
    radial-gradient(circle at 30% 22%, rgba(198, 216, 236, .55) 0%, rgba(126, 148, 178, .2) 12%, transparent 30%),
    repeating-radial-gradient(circle at 50% 52%, rgba(0, 0, 0, .16) 0 1.2px, transparent 1.2px 4px),
    radial-gradient(circle at 40% 34%, #3d4a5d 0%, #262e3c 36%, #141a24 72%, #070a10 100%);
  box-shadow:
    0 .38cqw .55cqw rgba(12, 16, 24, .55),
    0 .1cqw .14cqw rgba(0, 0, 0, .5),
    inset 0 0 0 .13cqw rgba(226, 200, 146, .72),
    inset 0 -.26cqw .44cqw rgba(0, 0, 0, .7),
    inset .14cqw .16cqw .36cqw rgba(190, 212, 240, .18);
}

.nm-piece.is-ink::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 27%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%) rotate(45deg);
  border: .16cqw solid rgba(232, 208, 154, .82);
  background: linear-gradient(160deg, rgba(232, 208, 154, .4), rgba(120, 104, 68, .12));
  box-shadow: inset 0 0 0 .08cqw rgba(5, 9, 15, .7), 0 0 .25cqw rgba(0, 0, 0, .5);
}

/* 悬停：布子阶段显示半透明预落子 */
.nm-board[data-phase="placing"] .nm-pt:not(.has-piece):hover::after,
.nm-board[data-phase="placing"] .nm-pt:not(.has-piece):focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: .46;
  pointer-events: none;
  z-index: 1;
}

.nm-board[data-phase="placing"].is-turn-red .nm-pt:not(.has-piece):hover::after,
.nm-board[data-phase="placing"].is-turn-red .nm-pt:not(.has-piece):focus-visible::after {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 240, 214, .8), transparent 30%),
    radial-gradient(circle at 40% 35%, #c9523a, #8a271a 62%, #5f180f 100%);
  box-shadow: 0 .3cqw .5cqw rgba(60, 15, 6, .3);
}

.nm-board[data-phase="placing"].is-turn-ink .nm-pt:not(.has-piece):hover::after,
.nm-board[data-phase="placing"].is-turn-ink .nm-pt:not(.has-piece):focus-visible::after {
  background:
    radial-gradient(circle at 30% 24%, rgba(210, 226, 244, .65), transparent 30%),
    radial-gradient(circle at 40% 35%, #3a4658, #171d27 62%, #05080d 100%);
  box-shadow: 0 .3cqw .5cqw rgba(8, 12, 20, .32);
}

/* 走子阶段悬停选子 */
.nm-board[data-phase="moving"] .nm-pt.has-piece:hover .nm-piece {
  filter: brightness(1.09);
}
.nm-board[data-phase="moving"] .nm-pt.has-piece:hover .nm-piece::before {
  content: "";
  position: absolute;
  inset: -9%;
  border-radius: 50%;
  border: 1px solid rgba(240, 216, 168, .7);
  pointer-events: none;
}

/* 选中的棋子：外圈金环 */
.nm-pt.is-selected::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: .26cqw solid rgba(248, 224, 164, .95);
  box-shadow: 0 0 1.4cqw rgba(244, 208, 128, .7), inset 0 0 1cqw rgba(244, 208, 128, .3);
  pointer-events: none;
  z-index: 3;
}

.nm-pt.is-selected .nm-piece {
  filter: brightness(1.1);
  box-shadow:
    0 0 0 .22cqw rgba(246, 220, 160, .95),
    0 0 1.3cqw rgba(240, 205, 130, .8),
    0 .38cqw .55cqw rgba(30, 12, 4, .45);
  z-index: 3;
}

/* 可移动的绿圈落点 */
.nm-board[data-phase="moving"] .nm-pt.is-dest::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: .29cqw solid rgba(222, 192, 118, .98);
  background: radial-gradient(circle, rgba(220, 190, 116, .42), rgba(220, 190, 116, .06) 62%, transparent 74%);
  box-shadow: 0 0 1.1cqw rgba(238, 208, 138, .7), inset 0 0 .6cqw rgba(238, 208, 138, .4);
  pointer-events: none;
  z-index: 3;
}

/* 可取走的敌子 */
.nm-pt.is-target::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: .27cqw dashed rgba(184, 52, 36, .98);
  box-shadow: 0 0 1.2cqw rgba(178, 58, 43, .5);
  pointer-events: none;
  z-index: 4;
}

/* 受磨坊保护的敌子 */
.nm-pt.is-protected .nm-piece {
  opacity: .78;
}

/* 磨坊中的棋子（描金） */
.nm-pt.is-mill .nm-piece {
  box-shadow:
    0 0 0 .14cqw rgba(244, 220, 162, .78),
    0 .38cqw .55cqw rgba(30, 12, 4, .42),
    inset 0 0 0 .1cqw rgba(240, 216, 166, .5);
}
.nm-pt.is-mill-new .nm-piece {
  box-shadow:
    0 0 0 .2cqw rgba(250, 226, 168, .95),
    0 0 1.6cqw rgba(244, 208, 128, .85),
    0 .38cqw .55cqw rgba(30, 12, 4, .42);
}

/* 最近落子：小铜点 */
.nm-pt.is-last .nm-piece::before {
  content: "";
  position: absolute;
  left: 67%;
  top: 27%;
  width: 15%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #f4dca4;
  box-shadow: 0 0 .3cqw rgba(0, 0, 0, .55), 0 0 0 .5px rgba(70, 40, 14, .55);
  z-index: 3;
}

/* 被取走时的涟漪 */
.nm-pt.is-captured::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: .3cqw solid rgba(178, 58, 43, .85);
  pointer-events: none;
  z-index: 4;
}

/* 非法点击反馈 */
.nm-pt.is-invalid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 108%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: .24cqw solid rgba(178, 58, 43, .9);
  box-shadow: 0 0 .9cqw rgba(178, 58, 43, .45);
  pointer-events: none;
  z-index: 4;
}

/* 终局锁盘 */
.nm-board[data-phase="finished"] .nm-pt { cursor: default; }
.nm-board[data-phase="finished"] { filter: saturate(.97); }

/* 棋盘下铭牌 */
.nm-plate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 5px 14px 5px 7px;
  border-radius: 2px;
  border: 1px solid rgba(198, 160, 90, .32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 45%),
    linear-gradient(160deg, #2b2119, #181310);
  box-shadow: inset 0 1px 0 rgba(255, 230, 185, .1), 0 3px 8px rgba(0, 0, 0, .32);
}
.nm-plate-seal {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(198, 160, 90, .45);
  color: var(--brass-hi);
  font-family: var(--font-display);
  font-size: 11px;
  background: rgba(198, 160, 90, .08);
}
.nm-plate-text {
  color: rgba(230, 201, 130, .82);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .22em;
}
.nm-plate-sub {
  color: rgba(198, 160, 90, .34);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: .16em;
  padding-left: 9px;
  border-left: 1px solid rgba(198, 160, 90, .2);
}

/* ---------------- 侧栏 ---------------- */
.nm-side .paper-card { padding: 14px 15px; }
.nm-side .nm-rules-card { padding-bottom: 12px; }

.nm-status-body { min-height: 66px; }

.nm-turn-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 2px;
  border: 1px solid rgba(100, 67, 32, .2);
  background: rgba(255, 249, 232, .42);
}

.nm-swatch {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  position: relative;
}
.nm-swatch--red {
  background:
    radial-gradient(circle at 31% 24%, rgba(255, 236, 204, .85), transparent 26%),
    repeating-radial-gradient(circle at 50% 52%, rgba(84, 18, 11, .12) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 40% 34%, #d26145, #a93422 45%, #611a10 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .38), inset 0 0 0 1.5px rgba(240, 216, 166, .8), inset 0 -2px 4px rgba(70, 15, 8, .5);
}
.nm-swatch--ink {
  background:
    radial-gradient(circle at 31% 24%, rgba(198, 216, 236, .55), transparent 26%),
    radial-gradient(circle at 40% 34%, #3d4a5d, #232b38 48%, #070a10 100%);
  box-shadow: 0 2px 4px rgba(8, 12, 20, .5), inset 0 0 0 1.5px rgba(226, 200, 146, .65), inset 0 -2px 4px rgba(0, 0, 0, .6);
}

.nm-turn-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.nm-turn-text b {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .08em;
  color: #38250f;
}
.nm-turn-text small { color: rgba(80, 55, 27, .58); font-size: 10.5px; }

.nm-hints { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.nm-chip {
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid rgba(100, 67, 32, .22);
  background: rgba(255, 249, 232, .38);
  color: rgba(74, 48, 22, .72);
  font-size: 10px;
  letter-spacing: .03em;
  line-height: 1.5;
}
.nm-chip--phase {
  color: #4a5a2a;
  border-color: rgba(96, 116, 48, .4);
  background: rgba(120, 140, 70, .13);
}
.nm-chip--fly {
  color: #2c5b50;
  border-color: rgba(47, 111, 98, .42);
  background: rgba(47, 111, 98, .12);
}
.nm-chip--warn {
  color: #8f2b1f;
  border-color: rgba(178, 58, 43, .45);
  background: rgba(178, 58, 43, .1);
}
.nm-chip--select {
  color: #6a4c10;
  border-color: rgba(176, 140, 60, .5);
  background: rgba(198, 160, 90, .17);
}
.nm-chip--quiet { color: rgba(80, 55, 27, .55); background: transparent; }

/* 成三取子提示 */
.nm-phase-flag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 2px;
  border: 1px solid rgba(178, 58, 43, .4);
  background: linear-gradient(180deg, rgba(178, 58, 43, .16), rgba(178, 58, 43, .06));
}
.nm-phase-name {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .12em;
  color: #7c2a1f;
  font-weight: 700;
}
.nm-phase-en {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .16em;
  color: rgba(178, 58, 43, .5);
}
.nm-note {
  margin-top: 8px;
  color: rgba(70, 48, 24, .7);
  font-size: 10.5px;
  line-height: 1.7;
}

/* 双方信息 */
.nm-players {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.nm-player {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 2px;
  border: 1px solid rgba(100, 67, 32, .18);
  background: rgba(255, 249, 232, .34);
}
.nm-player.is-red { border-left: 2px solid rgba(164, 52, 36, .72); }
.nm-player.is-ink { border-left: 2px solid rgba(38, 46, 60, .78); }
.nm-player-seal {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
}
.nm-player.is-red .nm-player-seal {
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 236, 204, .8), transparent 30%),
    radial-gradient(circle at 40% 34%, #d26145, #a93422 48%, #611a10 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(240, 216, 166, .8);
}
.nm-player.is-ink .nm-player-seal {
  background:
    radial-gradient(circle at 32% 26%, rgba(198, 216, 236, .5), transparent 30%),
    radial-gradient(circle at 40% 34%, #3d4a5d, #1d2430 52%, #070a10 100%);
  box-shadow: 0 1px 2px rgba(8, 12, 20, .45), inset 0 0 0 1px rgba(226, 200, 146, .6);
}
.nm-player-main { flex: 1 1 auto; min-width: 0; }
.nm-player-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  line-height: 1.25;
}
.nm-player-top b {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .06em;
  color: #3a2712;
}
.nm-hand-num { color: rgba(80, 55, 27, .55); font-size: 9.5px; white-space: nowrap; }
.nm-hand-num b { color: #5c3a16; font-family: var(--font-mono); font-size: 11px; }
.nm-hand-dots {
  display: flex;
  gap: 2.5px;
  margin-top: 3px;
}
.nm-hand-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(100, 67, 32, .35);
  background: transparent;
}
.nm-hand-dots i.is-full {
  border-color: rgba(90, 56, 22, .55);
  background: rgba(116, 76, 34, .72);
}
.nm-player.is-red .nm-hand-dots i.is-full { background: rgba(164, 52, 36, .82); border-color: rgba(120, 34, 22, .65); }
.nm-player.is-ink .nm-hand-dots i.is-full { background: rgba(40, 48, 62, .82); border-color: rgba(24, 30, 40, .7); }
.nm-player-nums {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-end;
  color: rgba(80, 55, 27, .56);
  font-size: 9.5px;
  line-height: 1.5;
  white-space: nowrap;
}
.nm-player-nums b { color: #4a3014; font-family: var(--font-mono); font-size: 11px; }

/* 最近棋步 */
.nm-move-log {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed rgba(100, 67, 32, .2);
}
.nm-log-title {
  color: rgba(80, 55, 27, .5);
  font-size: 9px;
  letter-spacing: .08em;
  margin-right: 2px;
}
.nm-log-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid rgba(100, 67, 32, .18);
  background: rgba(255, 249, 232, .35);
  color: rgba(58, 39, 20, .72);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.6;
}
.nm-log-item em {
  font-style: normal;
  color: rgba(80, 55, 27, .42);
  padding-right: 2px;
  border-right: 1px solid rgba(100, 67, 32, .16);
}
.nm-log-item.is-red { box-shadow: inset 2px 0 0 rgba(164, 52, 36, .6); }
.nm-log-item.is-ink { box-shadow: inset 2px 0 0 rgba(40, 48, 62, .7); }

/* 终局状态 */
.nm-result-band {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 2px;
  border: 1px solid rgba(100, 67, 32, .24);
  background: rgba(255, 249, 232, .42);
}
.nm-result-seal {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f7ead0;
  font-family: var(--font-display);
  font-size: 19px;
  background: linear-gradient(160deg, #b84a37, #7c2a1f);
  box-shadow: inset 0 1px 0 rgba(255, 214, 188, .4), 0 2px 5px rgba(80, 25, 15, .32);
}
.nm-result-band.is-ink .nm-result-seal {
  background: linear-gradient(160deg, #3d4a5d, #141a24);
  box-shadow: inset 0 1px 0 rgba(190, 210, 235, .3), 0 2px 5px rgba(5, 9, 15, .4);
}
.nm-result-text { display: flex; flex-direction: column; line-height: 1.35; }
.nm-result-text b {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .07em;
  color: #38250f;
}
.nm-result-text small { color: rgba(80, 55, 27, .6); font-size: 10px; }
.nm-result-detail {
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.75;
  color: rgba(58, 39, 20, .72);
}

/* 操作区 */
.nm-action-body { display: flex; flex-direction: column; gap: 7px; }
.nm-toolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.nm-toolbar .btn { flex: 1 1 auto; min-height: 33px; padding: 6px 10px; font-size: 11px; }
.nm-toolbar .btn-block { flex: 1 1 100%; }
.nm-toolbar .btn svg { width: 13px; height: 13px; }
.nm-progress {
  color: rgba(80, 55, 27, .55);
  font-size: 10px;
  letter-spacing: .03em;
  padding-top: 2px;
}

.nm-rules-en {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .16em;
  color: rgba(98, 67, 31, .4);
  padding-left: 8px;
}

/* ---------------- 结果弹窗 ---------------- */
.nm-result-modal .modal-body { padding-top: 8px; }

.nm-result-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2px 0 12px;
}
.nm-result-hero-disc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-bottom: 9px;
  position: relative;
}
.nm-result-hero-disc.is-red {
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 236, 204, .85), transparent 28%),
    repeating-radial-gradient(circle at 50% 52%, rgba(84, 18, 11, .12) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 40% 34%, #d26145, #a93422 46%, #611a10 100%);
  box-shadow: 0 3px 7px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(240, 216, 166, .8), inset 0 -3px 6px rgba(70, 15, 8, .5);
}
.nm-result-hero-disc.is-ink {
  background:
    radial-gradient(circle at 30% 22%, rgba(198, 216, 236, .5), transparent 28%),
    radial-gradient(circle at 40% 34%, #3d4a5d, #1d2430 52%, #070a10 100%);
  box-shadow: 0 3px 7px rgba(8, 12, 20, .45), inset 0 0 0 2px rgba(226, 200, 146, .65), inset 0 -3px 6px rgba(0, 0, 0, .6);
}
.nm-result-hero-disc::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 2px solid rgba(240, 216, 168, .85);
}
.nm-result-hero-disc.is-red::after { border-radius: 50%; transform: translate(-50%, -50%); }
.nm-result-hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: .24em;
  color: #5c2a1c;
  line-height: 1.2;
  text-indent: .24em;
}
.nm-result-hero.is-ink .nm-result-hero-title { color: #2b3442; }
.nm-result-hero-sub {
  margin-top: 5px;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: rgba(80, 55, 27, .6);
}

.nm-receipt {
  margin-top: 4px;
  padding: 11px 13px;
  border: 1px solid rgba(100, 67, 32, .26);
  border-radius: 2px;
  background:
    repeating-linear-gradient(0deg, rgba(110, 79, 40, .025) 0 1px, transparent 1px 3px),
    rgba(255, 250, 236, .5);
}
.nm-receipt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  margin-bottom: 7px;
  border-bottom: 1px dashed rgba(100, 67, 32, .28);
  color: #6a4c26;
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: .08em;
}
.nm-receipt-head em {
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: .16em;
  color: rgba(98, 67, 31, .42);
}
.nm-receipt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 11px;
  color: rgba(58, 39, 20, .78);
}
.nm-receipt-row b {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #38250f;
  white-space: nowrap;
}

/* ---------------- 动效 ---------------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes nm-drop {
    0% { transform: scale(.5); opacity: .3; }
    62% { transform: scale(1.04); opacity: 1; }
    100% { transform: scale(1); }
  }
  .nm-pt.is-new .nm-piece { animation: nm-drop .24s cubic-bezier(.2, .9, .3, 1.15); }

  @keyframes nm-dest-pulse {
    0%, 100% { opacity: .55; }
    50% { opacity: 1; }
  }
  .nm-board[data-phase="moving"] .nm-pt.is-dest::before { animation: nm-dest-pulse 1.5s ease-in-out infinite; }

  @keyframes nm-target-pulse {
    0%, 100% { opacity: .72; transform: translate(-50%, -50%) scale(.97); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  }
  .nm-pt.is-target::before { animation: nm-target-pulse 1.25s ease-in-out infinite; }

  @keyframes nm-mill-glow {
    0%, 100% { box-shadow: 0 0 0 .18cqw rgba(246, 220, 160, .9), 0 0 1cqw rgba(240, 205, 130, .6), 0 .38cqw .55cqw rgba(30, 12, 4, .42); }
    50% { box-shadow: 0 0 0 .24cqw rgba(252, 232, 180, 1), 0 0 1.9cqw rgba(246, 212, 138, .9), 0 .38cqw .55cqw rgba(30, 12, 4, .42); }
  }
  .nm-pt.is-mill-new .nm-piece { animation: nm-mill-glow 1.4s ease-in-out infinite; }

  @keyframes nm-select-pulse {
    0%, 100% { opacity: .72; transform: translate(-50%, -50%) scale(.98); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.03); }
  }
  .nm-pt.is-selected::before { animation: nm-select-pulse 1.8s ease-in-out infinite; }

  @keyframes nm-captured {
    0% { transform: translate(-50%, -50%) scale(.7); opacity: .9; }
    100% { transform: translate(-50%, -50%) scale(1.45); opacity: 0; }
  }
  .nm-pt.is-captured::before { animation: nm-captured .42s ease-out both; }

  @keyframes nm-invalid {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    40% { transform: translate(-50%, -50%) scale(1.16); opacity: .55; }
  }
  .nm-pt.is-invalid::before { animation: nm-invalid .4s ease-out; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .nm-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nm-rules-card { grid-column: 1 / -1; }
  .nm-stage { padding: clamp(10px, 2.4vw, 20px); }
  .nm-board-frame { width: min(100%, 560px); }
}

@media (max-width: 640px) {
  .nm-side { grid-template-columns: minmax(0, 1fr); }
  .nm-stage { padding: 8px 7px 12px; }
  .nm-board-frame { padding: 6px; border-radius: 6px; }
  .nm-board-frame::after { display: none; }
  .nm-plate { margin-top: 12px; padding: 4px 11px 4px 6px; }
  .nm-plate-text { font-size: 11px; letter-spacing: .16em; }
  .nm-plate-sub { display: none; }
  .nm-side .paper-card { padding: 12px 13px; }
  .nm-coords text { font-size: 2.35cqw; }
  .nm-result-hero-title { font-size: 26px; }
  .nm-hand-dots i { width: 6px; height: 6px; }
}

@media (max-width: 390px) {
  .nm-stage { padding: 6px 5px 10px; }
  .nm-board-frame { padding: 4px; }
  .nm-player-nums { font-size: 9px; }
}
