* { margin: 0; padding: 0; box-sizing: border-box; }
body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #1a1a2e; font-family: system-ui, sans-serif; color: #eee; }
#app { display: flex; flex-direction: column; align-items: center; gap: 16px; }
#status { font-size: 1.4rem; font-weight: 600; padding: 8px 24px; background: #16213e; border-radius: 8px; }
#board { display: grid; grid-template-columns: repeat(8,1fr); width: min(90vw,560px); height: min(90vw,560px); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.sq { display: flex; justify-content: center; align-items: center; font-size: min(10vw,60px); cursor: pointer; user-select: none; position: relative; transition: background .15s; }
.sq.light { background: #e8dcc8; }
.sq.dark { background: #b58863; }
.sq.selected { background: #f6f668 !important; }
.sq.legal::after { content:''; position:absolute; width:28%; height:28%; background:rgba(0,0,0,.2); border-radius:50%; pointer-events:none; }
.sq.capture-hint { box-shadow: inset 0 0 0 4px rgba(0,0,0,.25); }
.sq.last-from, .sq.last-to { background: rgba(155,199,0,.45) !important; }
.sq.check { background: radial-gradient(circle, #ff0000 0%, #cc0000 40%, transparent 70%) !important; }
#reset { padding: 10px 28px; font-size: 1rem; border: none; border-radius: 8px; background: #0f3460; color: #eee; cursor: pointer; transition: background .2s; }
#reset:hover { background: #1a508b; }
#promotion-modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; justify-content: center; align-items: center; z-index: 10; }
#promotion-modal.hidden { display: none; }
.modal-content { background: #16213e; padding: 24px; border-radius: 12px; text-align: center; display: flex; flex-direction: column; gap: 16px; }
#promotion-choices { display: flex; gap: 12px; justify-content: center; }
#promotion-choices span { font-size: 48px; cursor: pointer; padding: 8px; border-radius: 8px; transition: background .15s; }
#promotion-choices span:hover { background: rgba(255,255,255,.15); }
