/* Checkers / Draughts */
.ck-select { width: auto; max-width: 100%; }

.ck-wrap {
    max-width: 560px;
    margin: 0 auto;
}

.ck-player {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: .95rem;
    flex-wrap: wrap;
    border: 1px solid transparent;
}
.ck-player.ck-active {
    border-color: rgba(5, 44, 101, .35);
    background: rgba(5, 44, 101, .06);
}
[data-bs-theme="dark"] .ck-player.ck-active {
    border-color: rgba(140, 180, 255, .4);
    background: rgba(140, 180, 255, .08);
}
.ck-count { opacity: .75; font-variant-numeric: tabular-nums; }
.ck-thinking { font-size: .85rem; opacity: .85; }

.ck-chip {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}

.ck-board-frame {
    padding: 6px;
    margin: 6px 0;
    background: #5b3a1e;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
[data-bs-theme="dark"] .ck-board-frame { background: #2c1d10; }

.ck-board {
    --ck-n: 8;
    display: grid;
    grid-template-columns: repeat(var(--ck-n), 1fr);
    grid-template-rows: repeat(var(--ck-n), 1fr);
    width: 100%;
    aspect-ratio: 1 / 1;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    border-radius: 3px;
    overflow: hidden;
}

.ck-sq {
    position: relative;
    min-width: 0;
    min-height: 0;
}
.ck-light { background: #ecd8b4; }
.ck-dark { background: #9b6a3f; cursor: pointer; }
[data-bs-theme="dark"] .ck-light { background: #b9a17c; }
[data-bs-theme="dark"] .ck-dark { background: #6e4826; }

.ck-dark.ck-last { background: #b7914a; }
[data-bs-theme="dark"] .ck-dark.ck-last { background: #8c6a2c; }
.ck-dark.ck-route { background: #6f8f52; }
.ck-dark.ck-hint { box-shadow: inset 0 0 0 3px #2f9bff; }

.ck-num {
    position: absolute;
    top: 1px;
    left: 3px;
    font-size: 9px;
    line-height: 1;
    color: rgba(255, 255, 255, .55);
    pointer-events: none;
}
.ck-10 .ck-num { font-size: 8px; }

.ck-piece {
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    z-index: 2;
    will-change: transform;
}
.ck-black, .ck-chip.ck-black {
    background: radial-gradient(circle at 35% 30%, #5a5a5a 0%, #262626 55%, #101010 100%);
    box-shadow: 0 3px 0 #000, inset 0 0 0 3px rgba(255, 255, 255, .08), inset 0 0 0 6px rgba(0, 0, 0, .35);
}
.ck-white, .ck-chip.ck-white {
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f1ebdd 55%, #cfc6b2 100%);
    box-shadow: 0 3px 0 #8f846c, inset 0 0 0 3px rgba(0, 0, 0, .05), inset 0 0 0 6px rgba(0, 0, 0, .1);
}
.ck-chip.ck-black, .ck-chip.ck-white { box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }

.ck-crown {
    width: 48%;
    height: 48%;
    pointer-events: none;
    filter: invert(78%) sepia(60%) saturate(600%) hue-rotate(5deg) brightness(105%);
}
.ck-white .ck-crown {
    filter: invert(35%) sepia(80%) saturate(900%) hue-rotate(10deg) brightness(85%);
}

.ck-piece.ck-movable { cursor: grab; }
.ck-piece.ck-forced {
    cursor: grab;
    outline: 3px solid #e0412f;
    outline-offset: 1px;
    animation: ck-pulse 1.2s ease-in-out infinite;
}
.ck-piece.ck-selected {
    outline: 3px solid #ffcc33;
    outline-offset: 1px;
    animation: none;
}
.ck-piece.ck-taken { opacity: .35; }
.ck-piece.ck-dragging {
    z-index: 20;
    cursor: grabbing;
    transition: none !important;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45));
}
@keyframes ck-pulse {
    0%, 100% { outline-color: rgba(224, 65, 47, 1); }
    50% { outline-color: rgba(224, 65, 47, .35); }
}

.ck-target {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30%;
    height: 30%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(70, 200, 90, .85);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .6);
    pointer-events: none;
    z-index: 3;
}
.ck-target-cap {
    background: transparent;
    width: 70%;
    height: 70%;
    box-shadow: inset 0 0 0 4px rgba(224, 65, 47, .9);
}

.ck-status {
    text-align: center;
    font-weight: 600;
    min-height: 1.6em;
    margin-top: 6px;
}

.ck-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 6px;
}
@media (min-width: 576px) {
    .ck-panels { grid-template-columns: 3fr 2fr; }
}
.ck-panel {
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 0;
}
[data-bs-theme="dark"] .ck-panel { border-color: rgba(255, 255, 255, .15); }
.ck-panel summary { font-weight: 600; cursor: pointer; }

.ck-history {
    max-height: 180px;
    overflow-y: auto;
    margin: 6px 0 0;
    padding-left: 2.2em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9rem;
}
.ck-history li { padding: 1px 0; }
.ck-mv { display: inline-block; min-width: 6.5em; }
.ck-mv-last { font-weight: 700; color: #052c65; }
[data-bs-theme="dark"] .ck-mv-last { color: #8cb4ff; }

.ck-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
}
.ck-stats-grid > div { display: flex; flex-direction: column; }
.ck-stat-val { font-size: 1.35rem; font-weight: 700; }

@media (max-width: 420px) {
    .ck-board-frame { padding: 3px; }
    .ck-piece { inset: 8%; }
    .ck-num { font-size: 7px; }
    .ck-10 .ck-num { display: none; }
    .ck-black { box-shadow: 0 2px 0 #000, inset 0 0 0 2px rgba(255, 255, 255, .08), inset 0 0 0 4px rgba(0, 0, 0, .35); }
    .ck-white { box-shadow: 0 2px 0 #8f846c, inset 0 0 0 2px rgba(0, 0, 0, .05), inset 0 0 0 4px rgba(0, 0, 0, .1); }
}
