/* 团子棋馆 · 国际象棋 v1.0 */
.chess-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; color: var(--ink, #2b2340); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.chess-frame { width: min(92vw, 560px); max-width: 100%; box-sizing: border-box; padding: 7px; border-radius: var(--radius, 18px);
  background: linear-gradient(145deg, #f6d9a8, #e9bf86); box-shadow: 0 10px 24px rgba(120, 80, 30, .18), inset 0 2px 0 rgba(255, 255, 255, .6); }
.chess-board { position: relative; width: 100%; border-radius: 12px; overflow: hidden; touch-action: manipulation; cursor: pointer; font-size: calc(min(92vw, 560px) / 8.4); }
.chess-board::before { content: ''; display: block; padding-top: 100%; }
.chess-grid { position: absolute; inset: 0; top: 0; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.chess-sq { position: relative; display: flex; align-items: center; justify-content: center; }
.chess-light { background: #fff6e2; }
.chess-dark { background: #a9dcc4; }
.chess-sq::after { content: ''; position: absolute; inset: 0; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.chess-last::after { background: rgba(255, 197, 61, .38); }
.chess-hint::after { background: rgba(34, 160, 107, .32); box-shadow: inset 0 0 0 .06em rgba(34, 160, 107, .8); }
.chess-sel::after { background: rgba(255, 197, 61, .55); box-shadow: inset 0 0 0 .07em var(--yellow, #ffc53d); }
.chess-check::after { background: radial-gradient(circle, rgba(229, 72, 77, .75) 0%, rgba(229, 72, 77, .35) 55%, rgba(229, 72, 77, 0) 75%); animation: chess-pulse 1s ease-in-out infinite; }
@keyframes chess-pulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
.chess-cf, .chess-cr { position: absolute; font-size: .2em; font-weight: 700; line-height: 1; pointer-events: none; z-index: 1; }
.chess-cf { right: .18em; bottom: .14em; }
.chess-cr { left: .16em; top: .14em; }
.chess-light .chess-cf, .chess-light .chess-cr { color: #5aa98a; }
.chess-dark .chess-cf, .chess-dark .chess-cr { color: #fffaf0; }
.chess-dot { position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgba(34, 160, 107, .55); z-index: 3; pointer-events: none; }
.chess-ring { position: absolute; inset: 4%; top: 4%; left: 4%; right: 4%; bottom: 4%; border-radius: 50%; box-shadow: inset 0 0 0 .08em rgba(34, 160, 107, .65); z-index: 3; pointer-events: none; }
.chess-pieces { position: absolute; inset: 0; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 2; }
.chess-pc { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; display: flex; align-items: center; justify-content: center;
  font-size: .84em; line-height: 1; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "DejaVu Sans", "Arial Unicode MS", serif;
  font-variant-emoji: text; transition: transform 180ms ease-out, opacity 220ms; will-change: transform; }
.chess-pc-w { color: #fffdf6; text-shadow: -1.5px -1.5px 0 #3a2f52, 1.5px -1.5px 0 #3a2f52, -1.5px 1.5px 0 #3a2f52, 1.5px 1.5px 0 #3a2f52, 0 -1.5px 0 #3a2f52, 0 1.5px 0 #3a2f52, -1.5px 0 0 #3a2f52, 1.5px 0 0 #3a2f52, 0 4px 5px rgba(43, 35, 64, .35); }
.chess-pc-b { color: #2b2340; text-shadow: -1px -1px 0 rgba(255, 255, 255, .55), 1px -1px 0 rgba(255, 255, 255, .55), -1px 1px 0 rgba(255, 255, 255, .55), 1px 1px 0 rgba(255, 255, 255, .55), 0 4px 5px rgba(43, 35, 64, .35); }
.chess-pop { animation: chess-pop 220ms ease-out; }
@keyframes chess-pop { from { opacity: 0; } to { opacity: 1; } }
.chess-gone { opacity: 0; }
.chess-arrows { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.chess-bar { width: min(92vw, 560px); max-width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 12px;
  background: var(--card, #fff); border: 1px solid var(--line, #e9dcc8); border-radius: 14px; font-size: 14px; }
.chess-who { font-weight: 700; white-space: nowrap; color: var(--muted, #7a6f86); }
.chess-who.chess-turn { color: var(--ink, #2b2340); }
.chess-who.chess-turn::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--green, #22a06b); vertical-align: middle; }
.chess-caps { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 18px; letter-spacing: -2px; line-height: 1;
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "DejaVu Sans", serif; }
.chess-capw { color: #fffdf6; text-shadow: -1px -1px 0 #3a2f52, 1px -1px 0 #3a2f52, -1px 1px 0 #3a2f52, 1px 1px 0 #3a2f52; }
.chess-capb { color: #2b2340; }
.chess-adv { font-weight: 700; color: var(--green, #22a06b); font-size: 13px; }
.chess-moves { width: min(92vw, 560px); max-width: 100%; box-sizing: border-box; font-size: 13px; color: var(--muted, #7a6f86); padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chess-promo { position: absolute; inset: 0; top: 0; left: 0; right: 0; bottom: 0; z-index: 6; background: rgba(43, 35, 64, .28); display: flex; align-items: center; justify-content: center; }
.chess-promo-card { background: var(--card, #fff); border-radius: var(--radius, 18px); padding: .18em .25em .25em; box-shadow: 0 10px 30px rgba(43, 35, 64, .3); text-align: center; }
.chess-promo-tip { font-size: 15px; font-weight: 700; margin: 4px 0 2px; }
.chess-promo-row { display: flex; gap: .1em; }
.chess-promo-btn { width: 1.2em; height: 1.2em; display: flex; align-items: center; justify-content: center; font-size: 1em; line-height: 1; border-radius: 12px; background: #fff6e2; cursor: pointer;
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "DejaVu Sans", serif; transition: transform 120ms; }
.chess-promo-btn:active { transform: scale(.92); background: var(--yellow, #ffc53d); }
.chess-demo .chess-board { cursor: default; }
