/* Shared Board Display preview: Settings + Setup Wizard.
   Compact layout-diagram treatment: small outlined cells on the dark card,
   not miniature board tiles. Numbering, endpoint highlights, incomplete rows
   and the A|B split carry the teaching; the cells stay visually quiet.

   The cell width is driven by --board-preview-cell. Full grids use 30px on
   desktop and scale down on narrow screens so a 10-column board still fits;
   compact grids (65-144 positions) start at 22px. */

.app-theme .board-preview {
    width: max-content;
    max-width: min(360px, 100%);
    margin: 0 0 14px;
    padding: 10px;
    background: rgba(12, 26, 40, .5);
    border: 1px solid var(--app-line);
    border-radius: 9px;
    text-align: left;
}

.app-theme .board-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 8px;
    text-align: center;
}

.app-theme .board-preview-title {
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-align: center;
    text-transform: uppercase;
}

.app-theme .board-preview-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: max-content;
    max-width: 100%;
}

.app-theme .board-preview-grid {
    --board-preview-cell: clamp(18px, calc((100vw - 138px) / 10), 30px);
    display: grid;
    gap: 4px;
}

.app-theme .board-preview-grid-compact {
    --board-preview-cell: clamp(15px, calc((100vw - 138px) / 12), 22px);
}

.app-theme .board-preview .board-preview-cell {
    width: var(--board-preview-cell, 30px);
    height: calc(var(--board-preview-cell, 30px) * .8);
    min-height: 0;
    aspect-ratio: auto;
    padding: 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(226, 238, 245, .78);
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .17);
    box-shadow: none;
    font-size: clamp(8px, calc(var(--board-preview-cell, 30px) * .34), 10px);
    font-weight: 700;
    line-height: 1;
}

.app-theme .board-preview .board-preview-cell-anchor {
    color: #ffe08a;
    background: rgba(242, 212, 107, .10);
    border-color: #f2d46b;
}

/* Empty cells never enter the board's tile styling, so an incomplete final
   row reads as unfilled board space rather than a fake position. */
.app-theme .board-preview .board-preview-cell-empty {
    display: block;
    width: var(--board-preview-cell, 30px);
    height: calc(var(--board-preview-cell, 30px) * .8);
    background: transparent;
    border: 1px dashed rgba(141, 185, 243, .32);
    border-radius: 5px;
}

.app-theme .board-preview-dual {
    display: grid;
    grid-template-columns: max-content max-content;
    gap: 10px;
}

.app-theme .board-preview-lane {
    min-width: 0;
    padding: 6px 6px 7px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
}

.app-theme .board-preview-lane-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, .82);
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1;
}

.app-theme .board-preview-lane-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
}

.app-theme .board-preview-summary {
    display: grid;
    place-items: center;
    gap: 4px;
    width: 100%;
    min-height: 110px;
    padding: 12px;
    text-align: center;
    background: rgba(255, 255, 255, .035);
    border: 1px dashed #3d586f;
    border-radius: 8px;
}

.app-theme .board-preview-dots {
    display: grid;
    gap: 3px;
    margin-bottom: 8px;
}

.app-theme .board-preview-dots i {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: rgba(141, 185, 243, .45);
}

.app-theme .board-preview-summary strong {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.app-theme .board-preview-summary span {
    color: rgba(212, 227, 233, .62);
    font-size: 10px;
    font-weight: 600;
}

.app-theme .board-preview-meta {
    max-width: 336px;
    margin: 8px auto 0;
    text-align: center;
}

.app-theme .board-preview-count {
    margin: 0;
    color: #d4e3e9;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.app-theme .board-preview-status {
    margin: 2px 0 0;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.35;
}

.app-theme .board-preview-status.is-ok { color: #7fd6a4; }
.app-theme .board-preview-status.is-warn { color: #e8b45a; }
.app-theme .board-preview-status.is-info { color: rgba(212, 227, 233, .62); }

.app-theme .board-preview-empty {
    margin: 0;
    padding: 16px 0;
    color: rgba(212, 227, 233, .62);
    font-size: 10.5px;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 390px) {
    .app-theme .board-preview {
        padding: 9px;
    }

    .app-theme .board-preview-lane {
        padding: 6px;
    }

    .app-theme .board-preview-dual {
        gap: 8px;
    }
}
