.xz-wrap { display: grid; grid-template-columns: minmax(0, 600px) minmax(220px, 280px); gap: 20px; justify-content: center; align-items: start; }
.xz-boardcol { min-width: 0; }
.xz-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; padding: 4px 2px; }
.xz-player { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; }
.xz-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #2b2b2b; }
.xz-dot.w { background: #fffaf0; }
.xz-dot.b { background: #2b2f36; }
.xz-turn { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--chip); color: var(--chip-ink); padding: 2px 8px; border-radius: 999px; }
.xz-caps { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; min-height: 22px; }
.xz-caps .pc { width: 20px; height: 20px; margin-left: -5px; }
.xz-caps b { margin-left: 6px; font-size: .85rem; color: var(--muted); }

.xz-board { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); width: 100%; aspect-ratio: 1; border: 6px solid #0a3d33; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg); touch-action: none; user-select: none; -webkit-user-select: none; }
.xz-sq { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; }
.xz-sq.light { background: #eee6d2; }
.xz-sq.dark { background: #3f8a74; }
.xz-sq.last.light { background: #f1dd8e; }
.xz-sq.last.dark { background: #a9b85c; }
.xz-sq.sel { box-shadow: inset 0 0 0 4px var(--chip); }
.xz-sq.check { background: radial-gradient(circle, #ff5a4a 0 35%, #d7322a 60%, transparent 85%), #c84a3a; }
.xz-sq.movable { cursor: grab; }
.xz-sq.target::after { content: ""; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgba(10, 61, 51, .45); pointer-events: none; }
.xz-sq.capture::after { content: ""; position: absolute; inset: 5%; border-radius: 50%; border: 5px solid rgba(10, 61, 51, .45); pointer-events: none; }
.xz-sq.target, .xz-sq.capture { cursor: pointer; }

.pc { width: 88%; height: 88%; display: block; overflow: visible; pointer-events: none; }
.xz-sq .pc { position: relative; z-index: 1; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
.pc > * { stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.pc-w > * { fill: #fffaf0; stroke: #2b2b2b; }
.pc-b > * { fill: #2b2f36; stroke: #0e1013; }
.pc .pc-l { fill: none; }
.pc-w .pc-l { stroke: #2b2b2b; }
.pc-b .pc-l { stroke: #d9d2bf; }
.pc-w .pc-d { fill: #2b2b2b; stroke: none; }
.pc-b .pc-d { fill: #d9d2bf; stroke: none; }
.pc.dragging { z-index: 20; transition: none; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .35)); }

.xz-coord { position: absolute; font-size: clamp(.55rem, 1.6vw, .72rem); font-weight: 700; line-height: 1; pointer-events: none; }
.xz-coord.rank { top: 3px; left: 4px; }
.xz-coord.file { bottom: 3px; right: 4px; }
.xz-sq.light .xz-coord { color: #3f8a74; }
.xz-sq.dark .xz-coord { color: #eee6d2; }

.xz-side { display: flex; flex-direction: column; gap: 12px; padding-top: 38px; }
.xz-msg { font-weight: 700; color: var(--ink); margin: 0; min-height: 3em; }
.xz-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.xz-moves-box { border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); overflow: hidden; }
.xz-moves-title { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 12px; font-weight: 700; font-size: .9rem; border-bottom: 1px solid var(--line); }
.xz-moves { list-style: none; margin: 0; padding: 6px 0; max-height: 360px; overflow-y: auto; font-variant-numeric: tabular-nums; font-size: .92rem; }
.xz-moves li { display: grid; grid-template-columns: 2.6em 1fr 1fr; padding: 3px 12px; }
.xz-moves li:nth-child(even) { background: var(--subtle, #f4f5f6); }
.xz-moves li.empty { display: block; color: var(--muted); }
.xz-moves .n { color: var(--muted); }

.xz-promo { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.xz-promo-btn { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line-strong); background: #eee6d2; cursor: pointer; display: grid; place-items: center; }
.xz-promo-btn:hover, .xz-promo-btn:focus-visible { border-color: var(--ink); background: #f1dd8e; }

@media (max-width: 860px) {
  .xz-wrap { grid-template-columns: minmax(0, 1fr); }
  .xz-boardcol { width: min(100%, 600px); margin: 0 auto; }
  .xz-side { padding-top: 0; }
  .xz-msg { min-height: 0; text-align: center; }
  .xz-actions { justify-content: center; }
  .xz-moves { max-height: 160px; }
  .xz-board { border-width: 4px; }
}
