/* ============================================================
   拾光游戏厅 · 斗兽棋样式
   丛林老纸棋盘 / 河川 / 兽穴 / 木质动物圆牌
   所有选择器以 .ds- 前缀限定
   ============================================================ */

/* ---------------- 布局 ---------------- */
.ds-wrap { width: 100%; }
.ds-layout { align-items: start; }

.ds-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 14px;
  min-height: 0;
}

/* ---------------- 阶段条 ---------------- */
.ds-phasebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  min-height: 30px;
}
.ds-phase-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }

.ds-phase-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid rgba(198, 160, 90, .32);
  border-radius: 2px;
  background: rgba(20, 13, 8, .35);
  color: rgba(230, 201, 130, .82);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  white-space: nowrap;
}
.ds-phase-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(230, 201, 130, .5);
  box-shadow: 0 0 0 2px rgba(230, 201, 130, .12);
}
.ds-phase-chip--r { color: #e5a292; border-color: rgba(178, 58, 43, .48); background: rgba(120, 32, 24, .22); }
.ds-phase-chip--r i { background: #cf5741; box-shadow: 0 0 9px rgba(207, 87, 65, .8); }
.ds-phase-chip--b { color: #a9c3da; border-color: rgba(78, 118, 156, .5); background: rgba(30, 52, 74, .3); }
.ds-phase-chip--b i { background: #6d9cc7; box-shadow: 0 0 9px rgba(109, 156, 199, .8); }
.ds-phase-chip--over { color: rgba(230, 201, 130, .9); }
.ds-phase-chip--over i { background: var(--brass); box-shadow: 0 0 9px rgba(198, 160, 90, .7); }

.ds-phase-note {
  color: rgba(239, 225, 196, .43);
  font-size: 10px;
  letter-spacing: .02em;
  line-height: 1.5;
}

/* ---------------- 木框棋盘 ---------------- */
.ds-board {
  position: relative;
  width: clamp(420px, 54vw, 640px);
  padding: 25px 24px 21px;
  border: 1px solid rgba(198, 160, 90, .32);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 28% 0%, rgba(255, 224, 170, .15), transparent 52%),
    repeating-linear-gradient(93deg, rgba(28, 15, 7, .24) 0 2px, rgba(255, 218, 164, .022) 2px 5px, transparent 5px 17px),
    repeating-linear-gradient(3deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 7px),
    linear-gradient(148deg, #46301c 0%, #2f2010 48%, #201306 100%);
  box-shadow:
    0 27px 48px rgba(0, 0, 0, .58),
    0 2px 0 #150c06,
    0 3px 0 rgba(198, 160, 90, .16),
    inset 0 2px 0 rgba(255, 226, 176, .13),
    inset 0 0 42px rgba(0, 0, 0, .38);
}
.ds-board::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(198, 160, 90, .16);
  border-radius: 5px;
  pointer-events: none;
}
.ds-board::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 4px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28), inset 0 0 26px rgba(0, 0, 0, .2);
}

.ds-field {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 9;
  border-radius: 2px;
  background:
    radial-gradient(ellipse at 26% 8%, rgba(255, 246, 218, .5), transparent 54%),
    repeating-linear-gradient(92deg, rgba(96, 74, 38, .055) 0 1px, rgba(255, 244, 214, .05) 1px 4px, transparent 4px 12px),
    radial-gradient(ellipse at 78% 84%, rgba(47, 111, 98, .13), transparent 62%),
    linear-gradient(165deg, #d5ba8c 0%, #c5a878 46%, #b19260 100%);
  box-shadow:
    0 0 0 4px #352212,
    0 0 0 5px rgba(198, 160, 90, .22),
    inset 0 0 0 1px rgba(74, 45, 22, .4),
    inset 0 2px 5px rgba(255, 246, 222, .42),
    inset 0 -3px 8px rgba(66, 40, 20, .3);
}

.ds-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
}

/* SVG 棋盘手绘 */
.ds-gridlines line { stroke: rgba(96, 68, 35, .24); stroke-width: 1.3; }
.ds-river rect {
  fill: url(#dsWater);
  stroke: rgba(18, 56, 50, .6);
  stroke-width: 2.2;
}
.ds-waves path {
  fill: none;
  stroke: rgba(190, 235, 225, .22);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.ds-lily circle { fill: rgba(112, 156, 102, .55); }
.ds-lily path { fill: none; stroke: rgba(30, 62, 46, .5); stroke-width: 1.8; stroke-linecap: round; }
.ds-river-label {
  fill: rgba(220, 244, 232, .34);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 7px;
  text-anchor: middle;
}
.ds-bridge rect {
  fill: rgba(158, 128, 82, .38);
  stroke: rgba(90, 60, 30, .32);
  stroke-width: 1.6;
}
.ds-bridge line { stroke: rgba(78, 50, 24, .3); stroke-width: 2; stroke-linecap: round; }
.ds-bridge-label {
  fill: rgba(60, 40, 20, .55);
  stroke: rgba(244, 232, 208, .5);
  stroke-width: 2.4;
  paint-order: stroke;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 2px;
  text-anchor: middle;
}
.ds-trap-fill { fill: url(#dsTrapHatch); }
.ds-trap-frame { fill: none; stroke: rgba(150, 62, 42, .5); stroke-width: 2.2; stroke-dasharray: 9 6; }
.ds-trap-x { fill: none; stroke: rgba(150, 62, 42, .22); stroke-width: 2; }
.ds-trap-label {
  fill: rgba(122, 52, 32, .7);
  stroke: rgba(246, 236, 214, .78);
  stroke-width: 3;
  paint-order: stroke;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1px;
  text-anchor: middle;
}
.ds-trap--b .ds-trap-frame { stroke: rgba(63, 106, 143, .55); }
.ds-trap--b .ds-trap-x { stroke: rgba(63, 106, 143, .24); }
.ds-trap--b .ds-trap-label { fill: rgba(53, 88, 120, .72); }
.ds-den-rock { fill: rgba(58, 42, 26, .4); }
.ds-den-mouth { fill: url(#dsDen); stroke: rgba(28, 18, 8, .6); stroke-width: 2; }
.ds-den-spike { fill: rgba(72, 54, 32, .5); }
.ds-den--r .ds-den-rock { fill: rgba(150, 60, 45, .3); }
.ds-den--b .ds-den-rock { fill: rgba(63, 106, 143, .3); }
.ds-paw { fill: rgba(230, 201, 130, .32); }
.ds-den-label {
  fill: rgba(228, 198, 128, .5);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  text-anchor: middle;
}
.ds-leaves path:first-child { fill: rgba(47, 111, 98, .13); }
.ds-leaf-vein { fill: none; stroke: rgba(30, 70, 55, .18); stroke-width: 2; }
.ds-inner-frame { fill: none; stroke: rgba(90, 60, 30, .26); stroke-width: 2; }

/* 棋盘上下标签 */
.ds-frame { display: flex; align-items: center; justify-content: center; height: 24px; }
.ds-frame--top { margin-bottom: 5px; }
.ds-frame--bottom { margin-top: 5px; }
.ds-frame-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border: 1px solid rgba(198, 160, 90, .22);
  border-radius: 2px;
  background: rgba(14, 9, 5, .38);
  color: rgba(239, 225, 196, .4);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .18em;
  transition: color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.ds-frame-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(239, 225, 196, .2);
  transition: box-shadow .25s ease, background .25s ease;
}
.ds-frame-label--r i { background: #a53426; }
.ds-frame-label--b i { background: #5b88b0; }
.ds-frame-label.is-active { color: var(--brass-hi); border-color: rgba(230, 201, 130, .5); box-shadow: 0 0 14px rgba(230, 201, 130, .16); }
.ds-frame-label--r.is-active i { background: #d4543e; box-shadow: 0 0 9px rgba(212, 84, 62, .9); }
.ds-frame-label--b.is-active i { background: #8fc0e8; box-shadow: 0 0 9px rgba(143, 192, 232, .8); }

/* ---------------- 格子 ---------------- */
.ds-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(9, 1fr);
  z-index: 2;
}
.ds-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ds-cell:focus { outline: none; }
.ds-cell:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: -3px; z-index: 6; }

.ds-cell.is-target::after {
  content: "";
  position: absolute;
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffefc4, #b23a2b 76%);
  box-shadow: 0 0 0 2px rgba(255, 242, 210, .5), 0 3px 9px rgba(0, 0, 0, .42);
  z-index: 3;
  pointer-events: none;
  animation: ds-target-pulse 1.7s ease-in-out infinite;
}
.ds-cell.is-target--battle::after {
  width: 76%;
  height: 76%;
  border-radius: 50%;
  background: none;
  border: 2.5px dashed rgba(255, 226, 166, .92);
  box-shadow: 0 0 14px rgba(255, 196, 120, .38), inset 0 0 12px rgba(255, 196, 120, .26);
  animation: ds-target-ring 1.7s ease-in-out infinite;
}
.ds-cell.is-selected::before {
  content: "";
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(230, 201, 130, .9), 0 0 20px rgba(230, 201, 130, .42);
  z-index: 4;
  pointer-events: none;
}
.ds-cell.is-selected .ds-piece { transform: translateY(-4px); }
.ds-cell.is-last-from::after,
.ds-cell.is-last-to::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(230, 201, 130, .3);
  pointer-events: none;
  z-index: 1;
}

/* ---------------- 木质动物圆牌 ---------------- */
.ds-piece {
  position: relative;
  width: 93%;
  aspect-ratio: 1 / 1;
  z-index: 2;
  transform: translateY(0);
  transition: transform .16s ease, filter .16s ease;
}

.ds-disc {
  position: absolute;
  inset: 0 0 5% 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 22%, rgba(255, 250, 230, .9), transparent 44%),
    repeating-radial-gradient(circle at 50% 50%, rgba(118, 80, 40, .055) 0 1.2px, transparent 1.2px 4px),
    linear-gradient(152deg, #e6cca0 0%, #d0b080 46%, #b48f5e 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 252, 236, .8),
    inset 0 -4px 6px rgba(84, 54, 22, .38),
    0 3px 0 #5c3c20,
    0 5px 0 #432a14,
    0 9px 12px rgba(0, 0, 0, .4);
}
.ds-piece--r .ds-disc {
  box-shadow:
    inset 0 0 0 3px rgba(165, 52, 38, .82),
    inset 0 0 0 4.5px rgba(255, 226, 180, .28),
    inset 0 2px 3px rgba(255, 252, 236, .8),
    inset 0 -4px 6px rgba(84, 54, 22, .38),
    0 0 0 1px rgba(74, 20, 14, .55),
    0 3px 0 #5c3c20,
    0 5px 0 #432a14,
    0 9px 12px rgba(0, 0, 0, .4);
}
.ds-piece--b .ds-disc {
  box-shadow:
    inset 0 0 0 3px rgba(63, 106, 143, .84),
    inset 0 0 0 4.5px rgba(226, 240, 255, .3),
    inset 0 2px 3px rgba(255, 252, 236, .8),
    inset 0 -4px 6px rgba(84, 54, 22, .38),
    0 0 0 1px rgba(22, 40, 58, .55),
    0 3px 0 #5c3c20,
    0 5px 0 #432a14,
    0 9px 12px rgba(0, 0, 0, .4);
}

.ds-animal-wrap {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 6%;
  bottom: 24%;
  color: #2a1a0e;
}
.ds-animal {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 0 rgba(255, 246, 222, .38));
}

.ds-piece-char {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8%;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(6px, .85vw, 10px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .1em;
  color: rgba(47, 33, 20, .68);
}

.ds-piece-seal {
  position: absolute;
  top: 15%;
  left: 16%;
  font-family: var(--font-display);
  font-size: clamp(6px, .8vw, 9px);
  line-height: 1;
  color: rgba(150, 44, 32, .82);
}
.ds-piece--b .ds-piece-seal { color: rgba(48, 86, 122, .88); }

/* ---------------- 提示 ---------------- */
.ds-hint {
  width: 100%;
  max-width: 560px;
  margin: 0;
  text-align: center;
  color: rgba(239, 225, 196, .42);
  font-size: 10.5px;
  line-height: 1.65;
}
.ds-hint.is-over { color: rgba(230, 201, 130, .68); }

/* ---------------- 侧栏 ---------------- */
.ds-card { position: relative; }
.ds-panel .panel-heading { margin-bottom: 9px; }

.ds-status-band { align-items: center; }
.ds-status-band small { text-align: right; line-height: 1.5; }
.ds-turn-line { display: flex; align-items: center; gap: 7px; }
.ds-turn-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22), 0 0 0 2px rgba(255, 255, 255, .16);
}
.ds-turn-dot--r { background: radial-gradient(circle at 35% 30%, #e57e66, #96291b); }
.ds-turn-dot--b { background: radial-gradient(circle at 35% 30%, #7fa8cc, #2c4d6d); }

.ds-lastline {
  margin-top: 9px;
  padding: 7px 9px;
  border: 1px dashed rgba(100, 67, 32, .28);
  border-radius: 2px;
  background: rgba(255, 249, 232, .42);
  color: #4a331d;
  font-size: 10.5px;
  line-height: 1.6;
  word-break: break-word;
}
.ds-toolbar { margin-top: 11px; }
.ds-resign { color: #8d4a35; border-color: rgba(141, 74, 53, .4); }

/* 剩余子 */
.ds-side-row { display: flex; align-items: center; gap: 7px; margin: 6px 0; }
.ds-side-name {
  flex: 0 0 52px;
  color: #3a2b20;
  font-size: 10.5px;
  letter-spacing: .05em;
}
.ds-side-name em { font-style: normal; margin-left: 3px; font-family: var(--font-mono); font-size: 9px; opacity: .55; }
.ds-side-row--r .ds-side-name { color: #8d3325; }
.ds-side-row--b .ds-side-name { color: #33506e; }
.ds-mini-row { display: flex; flex-wrap: wrap; gap: 4px; }
.ds-mini {
  position: relative;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(152deg, #e4cb9f, #c9a778);
  color: #3a2817;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: opacity .2s ease, filter .2s ease;
}
.ds-mini--r { box-shadow: inset 0 0 0 2px rgba(165, 52, 38, .8), 0 1px 2px rgba(0, 0, 0, .24); }
.ds-mini--b { box-shadow: inset 0 0 0 2px rgba(63, 106, 143, .82), 0 1px 2px rgba(0, 0, 0, .24); }
.ds-mini-rank {
  position: absolute;
  right: -2px;
  bottom: -3px;
  width: 11px;
  height: 11px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(243, 231, 207, .95);
  color: rgba(60, 40, 20, .75);
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1;
}
.ds-mini.is-dead { opacity: .26; filter: grayscale(.7); }
.ds-mini.is-dead::after {
  content: "×";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #a33a28;
  font-size: 15px;
  font-weight: 700;
  opacity: .95;
}
.ds-capture-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(95, 64, 30, .16);
  color: rgba(74, 51, 29, .5);
  font-size: 9.5px;
  letter-spacing: .04em;
}

/* 观兽笔记 */
.ds-notes-card { overflow: hidden; }
.ds-notes-seal {
  position: absolute;
  right: -8px;
  bottom: -30px;
  font-family: var(--font-display);
  font-size: 118px;
  line-height: 1;
  color: rgba(90, 68, 36, .075);
  pointer-events: none;
  user-select: none;
}
.ds-notes-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(58, 39, 20, .7);
  font-size: 10.5px;
  line-height: 1.65;
}
.ds-notes-list li { position: relative; padding-left: 13px; }
.ds-notes-list li::before { content: "·"; position: absolute; left: 2px; top: -1px; color: #9a6b32; font-weight: 700; }

/* 规则 */
.ds-rank-flow { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 9px; }
.ds-rank {
  position: relative;
  padding: 2px 5px 2px 4px;
  border: 1px solid rgba(100, 67, 32, .2);
  border-radius: 2px;
  background: rgba(255, 249, 232, .3);
  color: rgba(74, 51, 29, .72);
  font-size: 9.5px;
  letter-spacing: .03em;
}
.ds-rank b { margin-left: 2px; font-family: var(--font-mono); font-size: 7.5px; opacity: .55; font-weight: 400; }
.ds-rank--elephant { color: #8d3325; border-color: rgba(178, 58, 43, .28); }
.ds-rank--rat { color: #2f6f62; border-color: rgba(47, 111, 98, .3); }

/* 终局 */
.ds-result { display: flex; align-items: center; gap: 11px; padding: 4px 0 10px; }
.ds-result-seal {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 216, 172, .32);
  background: radial-gradient(circle at 35% 28%, #c34b37, #7a1f17);
  box-shadow: 0 4px 11px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 232, 194, .4);
  color: #f4e4c1;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.ds-result--draw .ds-result-seal {
  background: radial-gradient(circle at 35% 28%, #6d5847, #201510);
  border-color: rgba(230, 201, 130, .28);
}
.ds-result-body { min-width: 0; }
.ds-result-body strong {
  display: block;
  color: #4a2e16;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .08em;
}
.ds-result-body small { color: rgba(74, 51, 29, .6); font-size: 10px; line-height: 1.5; }

/* 终局弹窗（浅色纸面） */
.ds-result-modal .modal-head h2 { color: #3f2a14; }
.ds-modal-lead { margin: 0 0 6px; font-size: 12.5px; }
.ds-modal-stats { display: flex; gap: 10px; margin: 12px 0 6px; }
.ds-modal-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 12px;
  border: 1px solid rgba(104, 73, 37, .25);
  border-radius: 2px;
  background: rgba(255, 251, 239, .42);
}
.ds-modal-stat span { color: rgba(75, 51, 23, .55); font-size: 9px; letter-spacing: .14em; }
.ds-modal-stat strong { font-family: var(--font-display); font-size: 25px; line-height: 1.2; }
.ds-modal-stat small { color: rgba(75, 51, 23, .45); font-size: 9px; }
.ds-modal-stat--r strong { color: #9c2b1c; }
.ds-modal-stat--b strong { color: #33506e; }
.ds-modal-note { margin: 4px 0 0; color: rgba(75, 51, 23, .55); font-size: 10px; }

/* ---------------- 动效 ---------------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ds-target-pulse {
    0%, 100% { transform: scale(.85); opacity: .72; }
    50% { transform: scale(1.06); opacity: 1; }
  }
  @keyframes ds-target-ring {
    0%, 100% { transform: scale(.96); opacity: .68; }
    50% { transform: scale(1.02); opacity: 1; }
  }
  @keyframes ds-land {
    0% { transform: translateY(-8px) scale(1.07); }
    55% { transform: translateY(1px) scale(.99); }
    100% { transform: translateY(0) scale(1); }
  }
  @keyframes ds-clash {
    0% { opacity: 0; transform: scale(.8); }
    18% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.14); }
  }
  @keyframes ds-jump-ring {
    0% { box-shadow: 0 0 0 0 rgba(180, 230, 220, .55); opacity: .9; }
    100% { box-shadow: 0 0 0 16px rgba(180, 230, 220, 0); opacity: 0; }
  }
  @keyframes ds-jump-piece {
    0% { transform: translateY(0) scale(1); }
    45% { transform: translateY(-12px) scale(1.06); }
    100% { transform: translateY(0) scale(1); }
  }
  .ds-cell.is-landed .ds-piece { animation: ds-land .52s cubic-bezier(.2, .85, .3, 1) both; }
  .ds-cell.is-jump .ds-piece { animation: ds-jump-piece .62s cubic-bezier(.25, .7, .3, 1) both; }
  .ds-cell.is-jump-water::before {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    animation: ds-jump-ring .7s ease-out both;
    pointer-events: none;
    z-index: 3;
  }
  .ds-cell.is-clash::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 226, 158, .8), rgba(178, 58, 43, .42) 46%, transparent 72%);
    animation: ds-clash .62s ease-out both;
    pointer-events: none;
    z-index: 7;
  }
}

@media (hover: hover) and (pointer: fine) {
  .ds-cell--filled:hover .ds-piece { transform: translateY(-3px); filter: drop-shadow(0 7px 8px rgba(0, 0, 0, .38)); }
  .ds-cell.is-selected:hover .ds-piece { transform: translateY(-4px); }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .ds-board { width: clamp(400px, 56vw, 560px); padding: 22px 21px 18px; }
}

@media (max-width: 900px) {
  .ds-board { width: min(100%, 560px); }
  .ds-stage { padding: 16px 14px 12px; }
}

@media (max-width: 600px) {
  .ds-stage { padding: 12px 10px 10px; gap: 9px; }
  .ds-board { width: min(100%, 384px); padding: 16px 14px 13px; border-radius: 7px; }
  .ds-hint { font-size: 9.5px; max-width: 340px; }
  .ds-frame { height: 20px; }
  .ds-frame-label { font-size: 7px; padding: 1px 7px; letter-spacing: .14em; }
  .ds-piece-char { font-size: 6px; }
  .ds-mini { width: 22px; height: 22px; font-size: 11px; }
  .ds-side-name { flex: 0 0 46px; font-size: 10px; }
}

@media (max-width: 390px) {
  .ds-board { width: 100%; padding: 13px 11px 11px; }
  .ds-piece-char { display: none; }
  .ds-piece-seal { font-size: 6px; }
}
