/* chess board */
#c-game { display: grid; grid-template-columns: minmax(280px, 560px) 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 860px) { #c-game { grid-template-columns: 1fr; } }

.c-board-wrap { width: 100%; max-width: 560px; margin: 0 auto; }
.c-board {
    display: grid; grid-template: repeat(8, 1fr) / repeat(8, 1fr);
    width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
    border: 3px solid rgba(138,3,3,.5);
    box-shadow: 0 10px 40px rgba(0,0,0,.6);
    /* theme = square light/dark + accent (sel/last/check/dots) */
    --sq-l: #4a4a4a; --sq-d: #161616; --sq-acc: #8A0303; --sq-acc-rgb: 138,3,3;
}
.c-board[data-theme="gunred"]   { --sq-l: #4a4a4a; --sq-d: #8a0303; --sq-acc: #e8e8e8; --sq-acc-rgb: 232,232,232; }
.c-board[data-theme="redwhite"] { --sq-l: #e8e8e8; --sq-d: #8a0303; --sq-acc: #1a1a1a; --sq-acc-rgb: 26,26,26; }
.sq { position: relative; display: flex; align-items: center; justify-content: center;
      cursor: pointer; user-select: none; }
.sq--l { background: var(--sq-l); }
.sq--d { background: var(--sq-d); }
.sq--sel { box-shadow: inset 0 0 0 3px var(--sq-acc); }
.sq--last { box-shadow: inset 0 0 0 3px rgba(var(--sq-acc-rgb), .75); }
.sq--check { background: var(--sq-acc) !important; }
.sq img { width: 88%; height: 88%; pointer-events: none;
          filter: drop-shadow(0 1px 2px rgba(0,0,0,.8)) drop-shadow(0 0 1px rgba(255,255,255,.25)); }
.sq .dot {
    position: absolute; width: 26%; height: 26%; border-radius: 50%;
    background: rgba(var(--sq-acc-rgb), .55); pointer-events: none;
}
.sq .ring {
    position: absolute; inset: 4%; border-radius: 50%;
    border: 3px solid rgba(var(--sq-acc-rgb), .7); pointer-events: none;
}
.sq .coord {
    position: absolute; font-size: .55rem; font-family: 'Roboto', sans-serif;
    pointer-events: none;
}
.sq--l .coord { color: rgba(0,0,0,.6); }
.sq--d .coord { color: rgba(255,255,255,.75); text-shadow: 0 1px 1px #000; }
.sq .coord--f { left: 3px; bottom: 2px; }
.sq .coord--r { right: 3px; top: 2px; }

.c-clock {
    font-family: 'Orbitron', sans-serif; font-size: 1.1rem; letter-spacing: .1em;
    text-align: center; padding: .35rem; color: rgba(255,255,255,.8);
}
.c-clock--low { color: #ff8a80; }

.c-cap-row {
    display: flex; align-items: center; gap: .6rem; margin: .35rem 0 .6rem;
}
.c-cap { display: flex; flex-wrap: wrap; gap: 1px; min-height: 26px; align-items: center; }
.c-cap img { width: 24px; height: 24px; opacity: .9;
             filter: drop-shadow(0 1px 1px rgba(0,0,0,.8)); }
.c-cap-diff { font-family: 'Orbitron', sans-serif; font-size: .8rem;
              color: rgba(255,255,255,.55); margin-left: auto; }

.c-look { align-items: center; gap: .5rem; margin-top: .9rem;
          padding-top: .7rem; border-top: 1px solid rgba(255,255,255,.08); }
.c-look select { padding: .35rem .5rem; font-size: .78rem; }

.c-moves {
    max-height: 320px; overflow-y: auto; font-size: .85rem; line-height: 1.9;
    font-family: 'Roboto', sans-serif;
    display: grid; grid-template-columns: 3ch 1fr 1fr; gap: 0 .8rem;
}
.c-moves .mv-no { color: rgba(255,255,255,.4); }
.c-moves .mv--last { color: #ffb3ae; }

.c-promo {
    position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 200;
    display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.c-promo img { width: 72px; height: 72px; cursor: pointer; border-radius: 8px;
    background: rgba(40,40,40,.9); border: 1px solid rgba(138,3,3,.4); padding: 6px; }
.c-promo img:hover { border-color: var(--accent-red, #8A0303); transform: scale(1.06); }
