/* dgtboards.css — DGT live boards */

.dgt-boards {
    margin: 0.5rem 0;
}

.dgt-boards-status {
    padding: 0.75rem;
    border: 1px dashed #bbb;
    border-radius: 6px;
    color: #666;
}

.dgt-stale {
    border: 1px solid #e0b4b4;
    background: #fdf3f3;
    color: #912d2b;
    font-weight: 600;
    text-align: center;
}

.dgt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}

.dgt-card {
    display: block;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.6rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.15s ease;
}

.dgt-card:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.dgt-card-head,
.dgt-detail-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.dgt-card-name,
.dgt-detail-title {
    font-weight: 600;
}

.dgt-card-names {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    min-width: 0;
}

.dgt-board-label {
    display: block;
    font-size: 0.78em;
    font-weight: 700;
    color: #8a6d3b;
    letter-spacing: 0.02em;
}

.dgt-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    font-size: 0.95em;
}

.dgt-name-white { color: #1c1c1c; }
.dgt-name-black { color: #444; }

.dgt-detail-players {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05em;
    margin-bottom: 0.7rem;
}

.dgt-detail-players .dgt-vs {
    color: #888;
}

.dgt-actions {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.dgt-badge-mate {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    background: #23282e;
    color: #fff;
    font-weight: 700;
    font-size: 0.88em;
}

.dgt-clock {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-variant-numeric: tabular-nums;
    font-size: 0.95em;
    color: #333;
    font-family: "Consolas", "Menlo", monospace;
}

.dgt-clock-time {
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: #efefef;
    color: #666;
}

.dgt-clock-time.dgt-clock-running {
    background: #1d3557;
    color: #fff;
    font-weight: 700;
}

.dgt-clock-sep {
    color: #aaa;
}

.dgt-archive {
    margin-top: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    background: #fafafa;
}

.dgt-archive summary {
    font-weight: 600;
    cursor: pointer;
}

.dgt-archive-event {
    font-weight: 700;
    margin: 0.6rem 0 0.25rem;
}

.dgt-archive-rounds {
    margin: 0 0 0.4rem 1.2rem;
    padding: 0;
}

.dgt-archive-meta {
    color: #777;
    font-size: 0.88em;
}

.dgt-archive-title {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 0.7rem;
}

.dgt-move-click {
    cursor: pointer;
}

.dgt-move-click:hover {
    text-decoration: underline;
}

.dgt-move-future {
    opacity: 0.35;
}

.dgt-move-viewed {
    font-weight: 700;
}

.dgt-pgn-download {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid #c3c3c3;
    border-radius: 5px;
    background: #f6f6f6;
    color: #222;
    text-decoration: none;
    font-size: 0.85em;
}

.dgt-pgn-download:hover {
    background: #ececec;
    text-decoration: none;
}

.dgt-pgn-download-all {
    margin: 0.8rem 0;
    padding: 0.4rem 0.9rem;
    font-size: 0.95em;
}

.dgt-lichess-btn {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border: 1px solid #c3c3c3;
    border-radius: 6px;
    background: #f6f6f6;
    color: #222;
    text-decoration: none;
    font-size: 0.92em;
}

.dgt-lichess-btn:hover {
    background: #ececec;
    text-decoration: none;
}

.dgt-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background: #999;
}

.dgt-status.dgt-active { background: #2eab3f; }
.dgt-status.dgt-unresponsive { background: #d33; }
.dgt-status.dgt-discovered { background: #e8a33d; }
.dgt-status.dgt-finished { background: #555; }
.dgt-status.dgt-archived { background: #888; }

.dgt-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    aspect-ratio: 1 / 1;
    width: 100%;
    border: 2px solid #6b4a2b;
    border-radius: 3px;
    overflow: hidden;
    user-select: none;
}

.dgt-square {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    line-height: 1;
    overflow: hidden;
}

.dgt-light { background: #f0d9b5; }
.dgt-dark { background: #b58863; }

.dgt-piece {
    font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
    font-size: clamp(14px, 3.2vw, 30px);
}

.dgt-piece-img {
    width: 88%;
    height: 88%;
    display: block;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

.dgt-board-big .dgt-piece {
    font-size: clamp(22px, 5vw, 54px);
}

@supports (font-size: 1cqw) {
    .dgt-board {
        container-type: inline-size;
    }

    .dgt-piece {
        font-size: 10.5cqw;
    }
}

.dgt-white {
    color: #fff;
    text-shadow: 0 0 2px #000, 0 1px 1px rgba(0, 0, 0, 0.7);
}

.dgt-black {
    color: #16120d;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.35);
}

.dgt-card-foot {
    margin-top: 0.4rem;
    font-size: 0.85em;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dgt-back {
    display: inline-block;
    margin-bottom: 0.6rem;
}

.dgt-detail-layout {
    display: grid;
    grid-template-columns: minmax(260px, 480px) minmax(200px, 1fr);
    gap: 1.2rem;
    align-items: start;
}

@media (max-width: 720px) {
    .dgt-detail-layout {
        grid-template-columns: 1fr;
    }
}

.dgt-moves {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem;
    max-height: 480px;
    overflow: auto;
    background: #fff;
}

.dgt-moves-title {
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.dgt-movelist {
    list-style: none;
    padding-left: 0.4rem;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.dgt-movenum {
    display: inline-block;
    min-width: 1.7em;
    color: #999;
}

.dgt-move-black {
    color: #444;
}

.dgt-pgn {
    margin: 0.4rem 0 0;
    white-space: pre-wrap;
    font-size: 0.8em;
    color: #333;
}