/* Satranç — tüm seçiciler .chs altında */
.chs { --chs-lt: #eedcbd; --chs-dk: #ad7f58; }
.chs .chs-main { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 760px) {
  .chs .chs-main { grid-template-columns: minmax(0, 560px) minmax(220px, 1fr); }
}
.chs .chs-boardwrap { position: relative; width: 100%; max-width: 560px; margin: 0 auto; }
.chs .chs-board {
  display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
  aspect-ratio: 1 / 1; width: 100%; border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18), 0 6px 18px rgba(60, 35, 10, .18);
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.chs .chs-sq { position: relative; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.chs .chs-sq.lt { background: var(--chs-lt); }
.chs .chs-sq.dk { background: var(--chs-dk); }
.chs .chs-sq.last::before { content: ""; position: absolute; inset: 0; background: rgba(255, 214, 10, .38); }
.chs .chs-sq.sel::before { content: ""; position: absolute; inset: 0; background: rgba(15, 118, 110, .45); }
.chs .chs-sq.check::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(239, 35, 35, .95) 0%, rgba(239, 35, 35, .55) 40%, rgba(239, 35, 35, 0) 72%); }
.chs .chs-sq.tgt::after { content: ""; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgba(20, 40, 30, .32); pointer-events: none; }
.chs .chs-sq.cap::after { content: ""; position: absolute; inset: 4%; border-radius: 50%; border: 5px solid rgba(20, 40, 30, .32); pointer-events: none; }
.chs .chs-pc { width: 88%; height: 88%; position: relative; z-index: 1; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.chs .chs-sq.lifting .chs-pc { opacity: .3; }
.chs .chs-coord { position: absolute; font-size: clamp(8px, 1.9vw, 11px); font-weight: 800; line-height: 1; pointer-events: none; z-index: 2; }
.chs .chs-coord.r { top: 3px; left: 3px; }
.chs .chs-coord.f { bottom: 3px; right: 4px; }
.chs .chs-sq.lt .chs-coord { color: var(--chs-dk); }
.chs .chs-sq.dk .chs-coord { color: var(--chs-lt); }

/* Taş renkleri temadan bağımsız */
.chs-pc g { stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.chs-pc.pc-w g { fill: #fbfaf7; stroke: #1c1c1c; }
.chs-pc.pc-b g { fill: #2b2a28; stroke: #0b0b0b; }
.chs-pc .pc-line { fill: none; }
.chs-pc.pc-b .pc-line { stroke: #ddd8cc; stroke-width: 1.2; }
.chs-pc.pc-b .pc-cross, .chs-pc.pc-w .pc-cross { stroke: #1c1c1c; stroke-width: 2.2; }
.chs-pc.pc-w .pc-dot { fill: #1c1c1c; stroke: none; }
.chs-pc.pc-b .pc-dot { fill: #ddd8cc; stroke: none; }
.chs-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; will-change: transform; }
.chs-ghost .chs-pc { width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }

/* Yan panel */
.chs .chs-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.chs .chs-status { font-weight: 700; display: flex; align-items: center; gap: 8px; min-height: 28px; }
.chs .chs-turn { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.chs .chs-turn.w { background: #fbfaf7; }
.chs .chs-turn.b { background: #2b2a28; }
.chs .chs-caps { display: flex; flex-wrap: wrap; align-items: center; min-height: 22px; gap: 0; }
.chs .chs-caps .chs-pc { width: 22px; height: 22px; margin-right: -6px; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)); }
.chs .chs-caps:empty { min-height: 0; }
.chs .chs-caps b { margin-left: 10px; font-size: 13px; color: var(--muted); }
.chs .chs-moves {
  list-style: none; margin: 0; padding: 6px; background: var(--cell-alt); border-radius: 10px;
  max-height: 300px; overflow-y: auto; font-size: 15px; font-variant-numeric: tabular-nums;
}
@media (max-width: 759px) { .chs .chs-moves { max-height: 128px; } }
.chs .chs-moves li { display: grid; grid-template-columns: 2.4em 1fr 1fr; padding: 2px 4px; border-radius: 6px; }
.chs .chs-moves li:nth-child(odd) { background: color-mix(in srgb, var(--paper) 55%, transparent); }
.chs .chs-moves li.empty { display: block; color: var(--muted); }
.chs .chs-moves .n { color: var(--muted); }
.chs .chs-moves .fig { font-size: 1.2em; line-height: 1; font-family: "Segoe UI Symbol", "Apple Symbols", "DejaVu Sans", sans-serif; }
.chs .chs-moves .mv.cur { font-weight: 800; color: var(--accent); }
.chs .chs-actions { margin: 0; }

/* Terfi seçimi */
.chs .chs-promo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .35); border-radius: 8px; z-index: 4; }
.chs .chs-promo[hidden] { display: none; }
.chs .chs-promo-box { background: var(--paper); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); text-align: center; margin: 12px; }
.chs .chs-promo-box p { margin: 0 0 10px; font-weight: 700; }
.chs .chs-promo-row { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.chs .chs-promo-btn { width: 60px; height: 60px; border-radius: 12px; border: 1px solid var(--line); background: var(--chs-lt); cursor: pointer; padding: 4px; }
.chs .chs-promo-btn:hover { border-color: var(--accent); }
.chs .chs-promo-btn .chs-pc { width: 100%; height: 100%; }
