/* Lexicon-specific CSS tile skins (non-CSW24 dictionaries). */

html[data-tile-renderer="css"] .swappo-tile {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 52px;
    height: 52px;
    min-height: 52px;
    margin: 2px;
    padding: 0;
    background: var(--swappo-tile-bg, #b71c1c);
    border: 1px solid var(--swappo-tile-border-color, #8b0000);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    vertical-align: middle;
    cursor: grab;
    font-family: "Helvetica Neue", Arial, sans-serif;
    line-height: 1;
}

html[data-lexicon="KBBI"][data-tile-renderer="css"] .swappo-tile {
    --swappo-tile-letter-color: #ffffff;
    --swappo-tile-point-color: #ffffff;
    --swappo-tile-bg: #b71c1c;
    --swappo-tile-border-color: #8b0000;
}

html[data-lexicon="SAOL"][data-tile-renderer="css"] .swappo-tile {
    --swappo-tile-letter-color: #ffd54f;
    --swappo-tile-point-color: #ffd54f;
    --swappo-tile-bg: #0d1b4d;
    --swappo-tile-border-color: #081028;
}

html[data-lexicon="NWL"][data-tile-renderer="css"] .swappo-tile {
    --swappo-tile-letter-color: #ffffff;
    --swappo-tile-point-color: #d32f2f;
    --swappo-tile-bg: #1565c0;
    --swappo-tile-border-color: #0d47a1;
}

html[data-lexicon="CSW24"][data-tile-renderer="css"] .swappo-tile {
    --swappo-tile-letter-color: #111111;
    --swappo-tile-point-color: #111111;
    --swappo-tile-bg: #ffffff;
    --swappo-tile-border-color: #bdbdbd;
}

html[data-tile-renderer="css"] .swappo-tile.fixed {
    opacity: 0.7;
    pointer-events: none;
}

html[data-tile-renderer="css"] .swappo-tile-letter {
    color: var(--swappo-tile-letter-color, #ffffff);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-2px);
}

html[data-tile-renderer="css"] .swappo-tile-points {
    position: absolute;
    right: 5px;
    bottom: 3px;
    color: var(--swappo-tile-point-color, #ffffff);
    font-weight: 700;
    font-size: 0.72rem;
    line-height: 1;
}

html[data-tile-renderer="css"] .answer-tile-placeholder .swappo-tile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0;
}

/* Long racks: dimensions come from adjustTileSize() (anagram_game) / calculateTileSize* (mobile). */
html[data-tile-renderer="css"] #rack-tiles.long-word .swappo-tile-letter,
html[data-tile-renderer="css"] #input-tiles.long-word .swappo-tile-letter {
    font-size: 1.2rem;
}

html[data-tile-renderer="css"] #rack-tiles.long-word .swappo-tile-points,
html[data-tile-renderer="css"] #input-tiles.long-word .swappo-tile-points {
    font-size: 0.62rem;
    right: 3px;
    bottom: 2px;
}

html[data-tile-renderer="css"] .swappo-tile.tile-hook,
html[data-tile-renderer="css"] .tile-hook.swappo-tile {
    width: 28px;
    height: 28px;
    min-height: 28px;
    margin: 1px;
}

html[data-tile-renderer="css"] .swappo-tile.tile-hook .swappo-tile-letter,
html[data-tile-renderer="css"] .tile-hook.swappo-tile .swappo-tile-letter {
    font-size: 1rem;
}

html[data-tile-renderer="css"] .swappo-tile.tile-hook .swappo-tile-points,
html[data-tile-renderer="css"] .tile-hook.swappo-tile .swappo-tile-points {
    font-size: 0.5rem;
    right: 2px;
    bottom: 1px;
}

html[data-tile-renderer="css"] #challenge-result-solution .challenge-solution-tile.swappo-tile,
html[data-tile-renderer="css"] #challenge-result-solution .swappo-tile.challenge-solution-tile {
    width: 40px;
    height: 40px;
    min-height: 40px;
}

html[data-tile-renderer="css"] #challenge-result-solution .challenge-solution-tile .swappo-tile-letter,
html[data-tile-renderer="css"] #challenge-result-solution .swappo-tile.challenge-solution-tile .swappo-tile-letter {
    font-size: 1.45rem;
}

html[data-tile-renderer="css"] #daily-segment-result-solution .challenge-solution-tile.swappo-tile,
html[data-tile-renderer="css"] #daily-segment-result-solution .swappo-tile.challenge-solution-tile {
    width: 24px;
    height: 24px;
    min-height: 24px;
}

html[data-tile-renderer="css"] #daily-segment-result-solution .challenge-solution-tile .swappo-tile-letter,
html[data-tile-renderer="css"] #daily-segment-result-solution .swappo-tile.challenge-solution-tile .swappo-tile-letter {
    font-size: 0.85rem;
}

html[data-tile-renderer="css"] #daily-segment-result-solution .challenge-solution-tile .swappo-tile-points,
html[data-tile-renderer="css"] #daily-segment-result-solution .swappo-tile.challenge-solution-tile .swappo-tile-points {
    font-size: 0.45rem;
    right: 2px;
    bottom: 1px;
}

/* words.php search results — compact square CSS tiles (renderer-independent markup) */
.words-table tbody > tr:not(.words-detail-row) .swappo-tile {
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    background: var(--swappo-tile-bg, #b71c1c);
    border: 1px solid var(--swappo-tile-border-color, #8b0000);
    border-radius: 2px;
    flex: 0 0 auto;
    flex-shrink: 0;
    vertical-align: middle;
    font-family: "Helvetica Neue", Arial, sans-serif;
    line-height: 1;
    cursor: default;
    overflow: hidden;
    box-shadow: none;
}

html[data-lexicon="KBBI"] .words-table tbody > tr:not(.words-detail-row) .swappo-tile {
    --swappo-tile-letter-color: #ffffff;
    --swappo-tile-point-color: #ffffff;
    --swappo-tile-bg: #b71c1c;
    --swappo-tile-border-color: #8b0000;
}

html[data-lexicon="CSW24"] .words-table tbody > tr:not(.words-detail-row) .swappo-tile {
    --swappo-tile-letter-color: #111111;
    --swappo-tile-point-color: #111111;
    --swappo-tile-bg: #ffffff;
    --swappo-tile-border-color: #bdbdbd;
}

html[data-lexicon="SAOL"] .words-table tbody > tr:not(.words-detail-row) .swappo-tile {
    --swappo-tile-letter-color: #ffd54f;
    --swappo-tile-point-color: #ffd54f;
    --swappo-tile-bg: #0d1b4d;
    --swappo-tile-border-color: #081028;
}

html[data-lexicon="NWL"] .words-table tbody > tr:not(.words-detail-row) .swappo-tile {
    --swappo-tile-letter-color: #ffffff;
    --swappo-tile-point-color: #d32f2f;
    --swappo-tile-bg: #1565c0;
    --swappo-tile-border-color: #0d47a1;
}

.words-table tbody > tr:not(.words-detail-row) .swappo-tile-letter {
    color: var(--swappo-tile-letter-color, #ffffff);
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.words-table tbody > tr:not(.words-detail-row) .swappo-tile-points {
    position: absolute;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    color: var(--swappo-tile-point-color, #ffffff);
}

.words-table tbody > tr:not(.words-detail-row) .words-word-tiles .swappo-tile {
    width: 21px !important;
    height: 21px !important;
    min-width: 21px !important;
    min-height: 21px !important;
    max-width: 21px !important;
    max-height: 21px !important;
    aspect-ratio: 1 / 1;
    margin: 0 !important;
}

.words-table tbody > tr:not(.words-detail-row) .words-word-tiles .swappo-tile-letter {
    font-size: 0.82rem !important;
    transform: none !important;
}

.words-table tbody > tr:not(.words-detail-row) .words-word-tiles .swappo-tile-points {
    display: none;
}

.words-table tbody > tr:not(.words-detail-row) .words-hook-tiles .swappo-tile {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    aspect-ratio: 1 / 1;
    margin: 0 !important;
}

.words-table tbody > tr:not(.words-detail-row) .words-hook-tiles .swappo-tile-letter {
    font-size: 0.58rem !important;
    transform: none !important;
}

.words-table tbody > tr:not(.words-detail-row) .words-hook-tiles .swappo-tile-points {
    display: none;
}

/* Beat global .tile-hook sizing when hooks use question-tile in the words table */
.words-table tbody > tr:not(.words-detail-row) .words-hook-tiles .swappo-tile.tile-hook,
.words-table tbody > tr:not(.words-detail-row) .words-hook-tiles .tile-hook.swappo-tile {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    margin: 0 !important;
    opacity: 1;
}

html[data-tile-renderer="css"] .words-anagram-word .swappo-tile,
html[data-tile-renderer="css"] .words-detail-row .words-hook-tiles .swappo-tile {
    width: 36px;
    height: 36px;
    min-height: 36px;
    min-width: 36px;
    aspect-ratio: 1 / 1;
    margin: 2px;
}

html[data-tile-renderer="css"] .words-anagram-word .swappo-tile-letter,
html[data-tile-renderer="css"] .words-detail-row .words-hook-tiles .swappo-tile-letter {
    font-size: 1.35rem;
    line-height: 1;
    transform: none;
}

html[data-tile-renderer="css"] .words-anagram-word .swappo-tile-points,
html[data-tile-renderer="css"] .words-detail-row .words-hook-tiles .swappo-tile-points {
    font-size: 0.58rem;
    right: 3px;
    bottom: 2px;
}

/* anagram_game.php submission log — compact tiles (match styles.css PNG log sizes) */
html[data-tile-renderer="css"] .anagram-log .col-move .tile-word .swappo-tile {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    margin: 0;
    padding: 0;
    border-radius: 2px;
    box-shadow: none;
    cursor: default;
    flex-shrink: 0;
}

html[data-tile-renderer="css"] .anagram-log .col-move .tile-word .swappo-tile-letter {
    font-size: 0.62rem;
    transform: none;
    line-height: 1;
}

html[data-tile-renderer="css"] .anagram-log .col-move .tile-word .swappo-tile-points,
html[data-tile-renderer="css"] .anagram-log .col-move .swappo-tile.tile-hook .swappo-tile-points,
html[data-tile-renderer="css"] .anagram-log .col-move .tile-hook.swappo-tile .swappo-tile-points {
    display: none;
}

html[data-tile-renderer="css"] .anagram-log .col-move .tile-word.tile-invalid .swappo-tile {
    --swappo-tile-bg: #d32f2f;
    --swappo-tile-border-color: #b71c1c;
}

/* KBBI log: wrong answers — black tile, red letter (normal tiles are already red) */
html[data-lexicon="KBBI"][data-tile-renderer="css"] .anagram-log .col-move .tile-word.tile-invalid .swappo-tile {
    --swappo-tile-bg: #000000;
    --swappo-tile-border-color: #424242;
    --swappo-tile-letter-color: #e53935;
    --swappo-tile-point-color: #e53935;
}

html[data-tile-renderer="css"] .anagram-log .col-move .tile-word.tile-skipped .swappo-tile {
    --swappo-tile-bg: #ffb74d;
    --swappo-tile-border-color: #e65100;
    --swappo-tile-letter-color: #000000;
    --swappo-tile-point-color: #000000;
}

html[data-tile-renderer="css"] .anagram-log .col-move .swappo-tile.tile-hook,
html[data-tile-renderer="css"] .anagram-log .col-move .tile-hook.swappo-tile {
    width: 13px;
    height: 13px;
    min-width: 13px;
    min-height: 13px;
    max-width: 13px;
    max-height: 13px;
    margin: 0 0.5px;
    opacity: 0.7;
}

html[data-tile-renderer="css"] .anagram-log .col-move .swappo-tile.tile-hook .swappo-tile-letter,
html[data-tile-renderer="css"] .anagram-log .col-move .tile-hook.swappo-tile .swappo-tile-letter {
    font-size: 0.5rem;
    transform: none;
}

html[data-tile-renderer="css"] .anagram-log tr.skipped .col-move .swappo-tile.tile-hook {
    --swappo-tile-bg: #ffb74d;
    --swappo-tile-border-color: #e65100;
    --swappo-tile-letter-color: #000000;
    --swappo-tile-point-color: #000000;
    opacity: 1;
}

/* Scrabble boards: CSS tiles fill each cell (play.php narrows to 92% below). */
html[data-tile-renderer="css"] .scrabble-board .board-cell {
    /* styles.css sets line-height: 0 for PNG layout; that clips CSS tile glyphs */
    line-height: normal;
}

html[data-tile-renderer="css"] body:not(.boardview-page):not(.play-php-page):not(.gcg-builder-page):not(.game-evaluate-page) .scrabble-board .board-cell .swappo-tile.board-tile {
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    position: absolute;
    inset: 0;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

html[data-tile-renderer="css"] body:not(.boardview-page):not(.play-php-page):not(.gcg-builder-page):not(.game-evaluate-page) .scrabble-board .board-cell .swappo-tile.board-tile .swappo-tile-letter {
    font-size: clamp(0.45rem, calc(var(--cell-px, 20px) * 0.65), 1.85rem);
    line-height: 1;
    transform: none;
    margin: 0;
    padding: 0;
}

html[data-tile-renderer="css"] body:not(.boardview-page):not(.play-php-page):not(.gcg-builder-page):not(.game-evaluate-page) .scrabble-board .board-cell .swappo-tile.board-tile .swappo-tile-points {
    font-size: clamp(0.35rem, calc(var(--cell-px, 20px) * 0.24), 0.72rem);
}

/* boardview + play + GCG builder + game evaluate: readable face tiles on the grid (including PNG lexicons via forceCss) */
body.boardview-page .scrabble-board .board-cell,
body.play-php-page .scrabble-board .board-cell,
body.gcg-builder-page .scrabble-board .board-cell,
body.game-evaluate-page .scrabble-board .board-cell {
    line-height: normal;
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body.gcg-builder-page .scrabble-board .board-cell.preview-tile {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: normal !important;
    position: relative !important;
}

body.boardview-page .scrabble-board .board-cell .swappo-tile.swappo-board-face-tile,
body.boardview-page .scrabble-board .board-cell .swappo-tile.board-tile,
body.boardview-page .scrabble-board .board-cell .swappo-tile.preview-placement-tile,
body.play-php-page .scrabble-board .board-cell .swappo-tile.swappo-board-face-tile,
body.play-php-page .scrabble-board .board-cell .swappo-tile.board-tile,
body.play-php-page .scrabble-board .board-cell .swappo-tile.preview-placement-tile,
body.play-php-page .scrabble-board .board-cell .swappo-tile.tile-preview-placed,
body.gcg-builder-page .scrabble-board .swappo-tile.swappo-board-face-tile,
body.gcg-builder-page .scrabble-board .swappo-tile.board-tile,
body.gcg-builder-page .scrabble-board .swappo-tile.preview-placement-tile,
body.game-evaluate-page .scrabble-board .swappo-tile.swappo-board-face-tile,
body.game-evaluate-page .scrabble-board .swappo-tile.board-tile,
body.game-evaluate-page .scrabble-board .swappo-tile.preview-placement-tile {
    box-sizing: border-box;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    box-shadow: none;
    line-height: 1;
    flex: 1 1 auto;
    align-self: stretch;
    --swappo-tile-bg: #ffffff;
    --swappo-tile-border-color: #bdbdbd;
    --swappo-tile-letter-color: #111111;
    --swappo-tile-point-color: #111111;
    background: var(--swappo-tile-bg);
    border: 1px solid var(--swappo-tile-border-color);
}

body.boardview-page .scrabble-board .swappo-tile.swappo-board-face-tile .swappo-tile-letter,
body.boardview-page .scrabble-board .swappo-tile.board-tile .swappo-tile-letter,
body.boardview-page .scrabble-board .swappo-tile.preview-placement-tile .swappo-tile-letter,
body.play-php-page .scrabble-board .swappo-tile.swappo-board-face-tile .swappo-tile-letter,
body.play-php-page .scrabble-board .swappo-tile.board-tile .swappo-tile-letter,
body.play-php-page .scrabble-board .swappo-tile.preview-placement-tile .swappo-tile-letter,
body.play-php-page .scrabble-board .swappo-tile.tile-preview-placed .swappo-tile-letter,
body.gcg-builder-page .scrabble-board .swappo-tile.swappo-board-face-tile .swappo-tile-letter,
body.gcg-builder-page .scrabble-board .swappo-tile.board-tile .swappo-tile-letter,
body.gcg-builder-page .scrabble-board .swappo-tile.preview-placement-tile .swappo-tile-letter,
body.game-evaluate-page .scrabble-board .swappo-tile.swappo-board-face-tile .swappo-tile-letter,
body.game-evaluate-page .scrabble-board .swappo-tile.board-tile .swappo-tile-letter,
body.game-evaluate-page .scrabble-board .swappo-tile.preview-placement-tile .swappo-tile-letter {
    color: var(--swappo-tile-letter-color, #111111) !important;
    font-weight: 700;
    font-size: min(1.75rem, calc(var(--cell-px, 22px) * 0.62)) !important;
    line-height: 1 !important;
    transform: none !important;
    margin: 0;
    padding: 0;
    max-height: 100%;
}

body.boardview-page .scrabble-board .swappo-tile.swappo-board-face-tile .swappo-tile-points,
body.boardview-page .scrabble-board .swappo-tile.board-tile .swappo-tile-points,
body.boardview-page .scrabble-board .swappo-tile.preview-placement-tile .swappo-tile-points,
body.play-php-page .scrabble-board .swappo-tile.swappo-board-face-tile .swappo-tile-points,
body.play-php-page .scrabble-board .swappo-tile.board-tile .swappo-tile-points,
body.play-php-page .scrabble-board .swappo-tile.preview-placement-tile .swappo-tile-points,
body.play-php-page .scrabble-board .swappo-tile.tile-preview-placed .swappo-tile-points,
body.gcg-builder-page .scrabble-board .swappo-tile.swappo-board-face-tile .swappo-tile-points,
body.gcg-builder-page .scrabble-board .swappo-tile.board-tile .swappo-tile-points,
body.gcg-builder-page .scrabble-board .swappo-tile.preview-placement-tile .swappo-tile-points,
body.game-evaluate-page .scrabble-board .swappo-tile.swappo-board-face-tile .swappo-tile-points,
body.game-evaluate-page .scrabble-board .swappo-tile.board-tile .swappo-tile-points,
body.game-evaluate-page .scrabble-board .swappo-tile.preview-placement-tile .swappo-tile-points {
    display: none !important;
}

body.boardview-page .scrabble-board .swappo-tile.swappo-tile-invalid,
body.play-php-page .scrabble-board .swappo-tile.swappo-tile-invalid,
body.gcg-builder-page .scrabble-board .swappo-tile.swappo-tile-invalid,
body.game-evaluate-page .scrabble-board .swappo-tile.swappo-tile-invalid {
    --swappo-tile-bg: #c62828;
    --swappo-tile-border-color: #8e0000;
    --swappo-tile-letter-color: #ffffff;
}

body.boardview-page .scrabble-board td,
body.play-php-page .scrabble-board td,
body.gcg-builder-page .scrabble-board td,
body.game-evaluate-page .scrabble-board td {
    line-height: normal;
    aspect-ratio: 1;
}

/* Last-move / played-move highlight: amber-orange CSS tile face (boardview + game evaluate) */
body.boardview-page .scrabble-board .board-cell.last-move-highlight,
body.play-php-page .scrabble-board .board-cell.last-move-highlight,
body.game-evaluate-page .scrabble-board .board-cell.last-move-highlight {
    background: #ffb74d !important;
    box-shadow: none !important;
}

body.boardview-page .scrabble-board .board-cell.last-move-highlight img.board-tile,
body.play-php-page .scrabble-board .board-cell.last-move-highlight img.board-tile,
body.game-evaluate-page .scrabble-board .board-cell.last-move-highlight img.board-tile {
    background: #ffb74d !important;
}

body.boardview-page .scrabble-board .board-cell.last-move-highlight .swappo-tile.board-tile,
body.boardview-page .scrabble-board .board-cell.last-move-highlight .swappo-tile.swappo-board-face-tile,
body.play-php-page .scrabble-board .board-cell.last-move-highlight .swappo-tile.board-tile,
body.play-php-page .scrabble-board .board-cell.last-move-highlight .swappo-tile.swappo-board-face-tile,
body.game-evaluate-page .scrabble-board .board-cell.last-move-highlight .swappo-tile.board-tile,
body.game-evaluate-page .scrabble-board .board-cell.last-move-highlight .swappo-tile.swappo-board-face-tile {
    --swappo-tile-bg: #ffb74d;
    --swappo-tile-border-color: #e65100;
    --swappo-tile-letter-color: #1a1a1a;
    --swappo-tile-point-color: #1a1a1a;
    background: #ffb74d !important;
    background-color: #ffb74d !important;
    border-color: #e65100 !important;
    box-shadow: none !important;
}

body.boardview-page .scrabble-board .board-cell.last-move-highlight .swappo-tile .swappo-tile-letter,
body.play-php-page .scrabble-board .board-cell.last-move-highlight .swappo-tile .swappo-tile-letter,
body.game-evaluate-page .scrabble-board .board-cell.last-move-highlight .swappo-tile .swappo-tile-letter {
    color: #1a1a1a !important;
}

/* play.php — interaction-only (board/rack faces match boardview via rules above) */
body.play-php-page .scrabble-board .swappo-tile.tile-preview-placed {
    z-index: 1;
}

html[data-tile-renderer="css"] body.play-php-page .swappo-tile.tile-preview-draggable {
    z-index: 3;
    cursor: grab;
}

html[data-tile-renderer="css"] body.play-php-page .swappo-tile.exch-tile {
    margin: 0;
    cursor: pointer;
    border: 3px solid transparent;
    box-sizing: border-box;
}

html[data-tile-renderer="css"] body.play-php-page .swappo-tile.exch-tile.selected {
    border-color: #FFB74D;
    transform: scale(1.08);
}

html[data-tile-renderer="css"] body.game-evaluate-page #ge-rack-container .swappo-tile.rack-tile {
    width: 40px;
    height: 40px;
    min-height: 40px;
    margin: 2px;
    box-shadow: none;
}

html[data-tile-renderer="css"] body.game-evaluate-page #ge-rack-container .swappo-tile.rack-tile .swappo-tile-letter {
    font-size: 1.55rem;
}

html[data-tile-renderer="css"] body.game-evaluate-page #ge-rack-container .swappo-tile.rack-tile .swappo-tile-points {
    font-size: 0.58rem;
    right: 3px;
    bottom: 2px;
}

/* boardview.php + shared unseen panels (not play.php-only) */
html[data-tile-renderer="css"] body.boardview-page .sw-unseen-tiles .swappo-tile,
html[data-tile-renderer="css"] body.boardview-page #boardview-rack-display .swappo-tile {
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    min-height: 28px;
    max-height: 28px;
    margin: 1px;
    border-radius: 2px;
    box-shadow: none;
    flex-shrink: 0;
    align-self: center;
    --swappo-tile-bg: #ffffff;
    --swappo-tile-border-color: #bdbdbd;
    --swappo-tile-letter-color: #111111;
    background: #ffffff;
    border: 1px solid #bdbdbd;
}

/* Boardview rack / ranked-moves / your-move: square CSS face tiles (not board grid). */
body.boardview-page .bv-inline-tile,
body.play-php-page .bv-inline-tile {
    flex-shrink: 0 !important;
    align-self: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 1px !important;
    padding: 0 !important;
    border-radius: 2px;
    box-shadow: none;
    line-height: 1 !important;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    vertical-align: middle;
    --swappo-tile-bg: #ffffff;
    --swappo-tile-border-color: #bdbdbd;
    --swappo-tile-letter-color: #111111;
    --swappo-tile-point-color: #111111;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #9e9e9e !important;
    box-shadow: 0 0 0 1px #ffffff inset;
}
body.boardview-page .bv-inline-tile .swappo-tile-letter,
body.play-php-page .bv-inline-tile .swappo-tile-letter {
    transform: none !important;
    line-height: 1 !important;
    margin: 0;
    padding: 0;
    color: #000000 !important;
    font-weight: 700 !important;
    -webkit-font-smoothing: antialiased;
}
body.boardview-page .bv-inline-tile .swappo-tile-points,
body.play-php-page .bv-inline-tile .swappo-tile-points {
    display: none !important;
}
body.boardview-page .bv-inline-tile-12 {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    max-width: 12px !important;
    min-height: 12px !important;
    max-height: 12px !important;
}
body.boardview-page .bv-inline-tile-12 .swappo-tile-letter {
    font-size: 8px !important;
}
body.boardview-page .bv-inline-tile-16 {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
}
body.boardview-page .bv-inline-tile-16 .swappo-tile-letter {
    font-size: 10px !important;
}
body.boardview-page .bv-inline-tile-20 {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
}
body.boardview-page .bv-inline-tile-20 .swappo-tile-letter {
    font-size: 12px !important;
}
body.boardview-page .bv-inline-tile-28 {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
}
body.boardview-page .bv-inline-tile-28 .swappo-tile-letter {
    font-size: 15px !important;
}

body.boardview-page .ranked-moves-table .rack-tiles {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1px;
    vertical-align: middle;
    max-height: 32px;
}
body.boardview-page .ranked-moves-table td.rack-cell,
body.boardview-page .ranked-moves-table td.col-word,
body.boardview-page .ranked-moves-table td.col-leave {
    vertical-align: middle;
}

/* Rack + move-alternatives tables: always black on white (PNG letter-only tiles + lexicon CSS themes). */
body.boardview-page #boardview-rack-display .anagram-log-letter-tile,
body.boardview-page .ranked-moves-table .anagram-log-letter-tile {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 1px !important;
    padding: 0 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border: 1px solid #9e9e9e !important;
    border-radius: 2px !important;
    box-shadow: 0 0 0 1px #ffffff inset;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
}
body.boardview-page #boardview-rack-display .bv-inline-tile-28.anagram-log-letter-tile,
body.boardview-page .ranked-moves-table .bv-inline-tile-28.anagram-log-letter-tile {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    font-size: 15px !important;
}
body.boardview-page .ranked-moves-table .bv-inline-tile-20.anagram-log-letter-tile,
body.boardview-page #your-move-card .bv-inline-tile-20.anagram-log-letter-tile {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    font-size: 12px !important;
}
body.boardview-page .ranked-moves-table .bv-inline-tile-16.anagram-log-letter-tile {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    font-size: 10px !important;
}
body.boardview-page .ranked-moves-table .bv-inline-tile-12.anagram-log-letter-tile,
body.boardview-page .ranked-moves-table.bv-best-moves-table .bv-inline-tile-12.anagram-log-letter-tile {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    max-width: 12px !important;
    min-height: 12px !important;
    max-height: 12px !important;
    font-size: 8px !important;
}

html[data-tile-renderer="css"] body.boardview-page #boardview-rack-display .swappo-tile.bv-inline-tile,
html[data-tile-renderer="css"] body.boardview-page .ranked-moves-table .swappo-tile.bv-inline-tile,
html[data-tile-renderer="css"] body.boardview-page #your-move-card .swappo-tile.bv-inline-tile {
    --swappo-tile-bg: #ffffff;
    --swappo-tile-border-color: #bdbdbd;
    --swappo-tile-letter-color: #111111;
    --swappo-tile-point-color: #111111;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #9e9e9e !important;
    box-shadow: 0 0 0 1px #ffffff inset;
}
html[data-tile-renderer="css"] body.boardview-page #boardview-rack-display .swappo-tile.bv-inline-tile .swappo-tile-letter,
html[data-tile-renderer="css"] body.boardview-page .ranked-moves-table .swappo-tile.bv-inline-tile .swappo-tile-letter,
html[data-tile-renderer="css"] body.boardview-page #your-move-card .swappo-tile.bv-inline-tile .swappo-tile-letter {
    color: #000000 !important;
    font-weight: 700 !important;
}

html[data-tile-renderer="css"] body.boardview-page .sw-unseen-tiles .swappo-tile .swappo-tile-letter,
html[data-tile-renderer="css"] body.boardview-page #boardview-rack-display .swappo-tile .swappo-tile-letter {
    font-size: 1rem;
    transform: none;
    color: #111111 !important;
}

html[data-tile-renderer="css"] body.boardview-page .sw-unseen-tiles .swappo-tile .swappo-tile-points,
html[data-tile-renderer="css"] body.boardview-page #boardview-rack-display .swappo-tile .swappo-tile-points {
    font-size: 0.5rem;
    right: 2px;
    bottom: 1px;
}

html[data-tile-renderer="css"] body.boardview-page .sw-unseen-tiles .swappo-tile.sw-unseen-tile,
html[data-tile-renderer="css"] body.play-php-page .sw-unseen-tiles .swappo-tile.sw-unseen-tile {
    width: 16px;
    height: 16px;
    min-height: 16px;
    min-width: 16px;
    max-width: 16px;
    max-height: 16px;
    --swappo-tile-bg: #ffffff;
    --swappo-tile-letter-color: #111111;
    background: #ffffff;
    border: 1px solid #bdbdbd;
}

html[data-tile-renderer="css"] body.boardview-page .sw-unseen-tiles .swappo-tile.sw-unseen-tile .swappo-tile-letter,
html[data-tile-renderer="css"] body.play-php-page .sw-unseen-tiles .swappo-tile.sw-unseen-tile .swappo-tile-letter {
    font-size: 0.65rem;
    color: #111111 !important;
}

html[data-tile-renderer="css"] body.boardview-page .sw-unseen-tiles .swappo-tile.sw-unseen-tile .swappo-tile-points,
html[data-tile-renderer="css"] body.play-php-page .sw-unseen-tiles .swappo-tile.sw-unseen-tile .swappo-tile-points {
    display: none;
}

html[data-tile-renderer="css"] body.boardview-page .scrabble-board .board-cell {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

html.mobile[data-tile-renderer="css"] body.play-php-page #rack-container .swappo-tile.rack-tile.bv-inline-tile-52,
html.mobile[data-tile-renderer="css"] body.play-php-page .play-rack-panel .swappo-tile.rack-tile {
    width: calc((100% - 12px) / 7) !important;
    max-width: 42px !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 42px !important;
    aspect-ratio: 1;
    flex: 0 1 calc((100% - 12px) / 7);
}

html.mobile[data-tile-renderer="css"] body.play-php-page #rack-container .swappo-tile.rack-tile .swappo-tile-letter,
html.mobile[data-tile-renderer="css"] body.play-php-page .play-rack-panel .swappo-tile.rack-tile .swappo-tile-letter {
    font-size: clamp(0.85rem, 4.8vw, 1.2rem) !important;
}

html[data-tile-renderer="css"] body.play-php-page .tile-word .swappo-tile,
html[data-tile-renderer="css"] body.play-php-page .tile-leave .swappo-tile {
    width: 28px;
    height: 28px;
    min-height: 28px;
    margin: 1px;
}

html[data-tile-renderer="css"] body.play-php-page .tile-word .swappo-tile-letter,
html[data-tile-renderer="css"] body.play-php-page .tile-leave .swappo-tile-letter {
    font-size: 1rem;
}

html[data-tile-renderer="css"] body.play-php-page .tile-word .swappo-tile-points,
html[data-tile-renderer="css"] body.play-php-page .tile-leave .swappo-tile-points {
    font-size: 0.5rem;
    right: 2px;
    bottom: 1px;
}

html[data-tile-renderer="css"] .swappo-tile.swappo-tile-played-blank {
    opacity: 0.7;
}

html[data-tile-renderer="css"] .swappo-tile.swappo-tile-played-blank .swappo-tile-points {
    opacity: 1;
}

html[data-tile-renderer="css"] .swappo-tile.swappo-tile-invalid {
    --swappo-tile-bg: #c62828;
    --swappo-tile-border-color: #8e0000;
    --swappo-tile-letter-color: #ffffff;
    --swappo-tile-point-color: #ffffff;
}

/* Mini-games — option / question / log tiles (match games.css PNG sizes) */
html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-option-tile,
html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-question-tile,
html[data-tile-renderer="css"] body.mini-game-page #log .swappo-tile.mini-game-log-main-tile {
    background: var(--swappo-tile-bg, #b71c1c);
    border: 1px solid var(--swappo-tile-border-color, #8b0000);
    padding: 0;
}

html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-option-tile {
    width: 24px;
    height: 24px;
    min-height: 24px;
    margin: 0;
    cursor: default;
    box-shadow: none;
}

html[data-tile-renderer="css"] body.hook-game-page .swappo-tile.mini-game-option-tile {
    width: 22px;
    height: 22px;
    min-height: 22px;
}

html[data-tile-renderer="css"] body.hook-game-page #answer-buttons.hook-choice-grid .swappo-tile.mini-game-option-tile {
    width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 5px;
    border-width: 2px;
}

html[data-tile-renderer="css"] body.hook-game-page #answer-buttons.hook-choice-grid .swappo-tile.mini-game-option-tile .swappo-tile-letter {
    font-size: 1.35rem;
}

html[data-tile-renderer="css"] body.spot-sless-page #answer-buttons.spot-choice-grid .swappo-tile.mini-game-option-tile {
    width: 30px;
    height: 30px;
    min-height: 30px;
}

html[data-tile-renderer="css"] body.spot-sless-page #answer-buttons.spot-choice-grid .swappo-tile.mini-game-option-tile .swappo-tile-letter {
    font-size: 0.9rem;
}

html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-option-tile .swappo-tile-letter {
    font-size: 0.72rem;
    transform: none;
    color: var(--swappo-tile-letter-color, #ffffff);
}

html[data-tile-renderer="css"] body.hook-game-page .swappo-tile.mini-game-option-tile .swappo-tile-letter {
    font-size: 0.66rem;
}

html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-question-tile {
    width: 38px;
    height: 38px;
    min-height: 38px;
    margin: 0;
    cursor: default;
    box-shadow: none;
}

html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-question-tile .swappo-tile-letter {
    font-size: 1.15rem;
    transform: none;
    color: var(--swappo-tile-letter-color, #ffffff);
}

html[data-tile-renderer="css"] body.mini-game-page #log .swappo-tile.mini-game-log-main-tile {
    width: var(--mini-game-log-main-tile-size, 30px);
    height: var(--mini-game-log-main-tile-size, 30px);
    min-height: var(--mini-game-log-main-tile-size, 30px);
    margin: 0 1px;
    cursor: default;
    box-shadow: none;
}

html[data-tile-renderer="css"] body.mini-game-page #log .swappo-tile.mini-game-log-main-tile .swappo-tile-letter {
    font-size: 0.9rem;
    transform: none;
    color: var(--swappo-tile-letter-color, #ffffff);
}

html[data-tile-renderer="css"] body.mini-game-page #log .swappo-tile.mini-game-log-hook-tile {
    width: var(--mini-game-log-hook-tile-size, 20px);
    height: var(--mini-game-log-hook-tile-size, 20px);
    min-height: var(--mini-game-log-hook-tile-size, 20px);
    margin: 0 1px;
    cursor: default;
    box-shadow: none;
    filter: grayscale(1);
    background: var(--swappo-tile-bg, #8d8d8d);
    border: 1px solid var(--swappo-tile-border-color, #666666);
    --swappo-tile-bg: #8d8d8d;
    --swappo-tile-border-color: #666666;
    --swappo-tile-letter-color: #ffffff;
    --swappo-tile-point-color: #ffffff;
}

html[data-tile-renderer="css"] body.mini-game-page #log .swappo-tile.mini-game-log-hook-tile .swappo-tile-letter {
    font-size: 0.62rem;
    transform: none;
    color: var(--swappo-tile-letter-color, #ffffff);
}

html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-option-tile .swappo-tile-points,
html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-question-tile .swappo-tile-points,
html[data-tile-renderer="css"] body.mini-game-page #log .swappo-tile.mini-game-log-main-tile .swappo-tile-points,
html[data-tile-renderer="css"] body.mini-game-page #log .swappo-tile.mini-game-log-hook-tile .swappo-tile-points {
    display: none;
}

/* S-game mini-game tiles */
html[data-tile-renderer="css"] body.s-game-page .swappo-tile.s-game-question-tile,
html[data-tile-renderer="css"] body.s-game-page #log .swappo-tile.s-game-log-main-tile,
html[data-tile-renderer="css"] body.s-game-page .swappo-tile.s-game-summary-main-tile {
    background: var(--swappo-tile-bg, #b71c1c);
    border: 1px solid var(--swappo-tile-border-color, #8b0000);
    padding: 0;
}

html[data-tile-renderer="css"] body.s-game-page .swappo-tile.s-game-question-tile {
    width: 38px;
    height: 38px;
    min-height: 38px;
    margin: 0;
    cursor: default;
    box-shadow: none;
}

html[data-tile-renderer="css"] body.s-game-page .swappo-tile.s-game-question-tile .swappo-tile-letter {
    font-size: 1.15rem;
    transform: none;
    color: var(--swappo-tile-letter-color, #ffffff);
}

html[data-tile-renderer="css"] body.s-game-page #log .swappo-tile.s-game-log-main-tile {
    width: var(--s-game-log-main-tile-size, 30px);
    height: var(--s-game-log-main-tile-size, 30px);
    min-height: var(--s-game-log-main-tile-size, 30px);
    margin: 0 1px;
    cursor: default;
    box-shadow: none;
}

html[data-tile-renderer="css"] body.s-game-page #log .swappo-tile.s-game-log-main-tile .swappo-tile-letter {
    font-size: 0.9rem;
    transform: none;
    color: var(--swappo-tile-letter-color, #ffffff);
}

html[data-tile-renderer="css"] body.s-game-page #log .swappo-tile.s-game-log-hook-tile,
html[data-tile-renderer="css"] body.s-game-page .swappo-tile.s-game-summary-hook-tile {
    width: var(--s-game-log-hook-tile-size, 20px);
    height: var(--s-game-log-hook-tile-size, 20px);
    min-height: var(--s-game-log-hook-tile-size, 20px);
    margin: 0 1px;
    cursor: default;
    box-shadow: none;
    filter: grayscale(1);
    --swappo-tile-bg: #8d8d8d;
    --swappo-tile-border-color: #666666;
    --swappo-tile-letter-color: #ffffff;
    --swappo-tile-point-color: #ffffff;
}

html[data-tile-renderer="css"] body.s-game-page #log .s-game-log-hook-tile.swappo-tile .swappo-tile-letter,
html[data-tile-renderer="css"] body.s-game-page .s-game-summary-hook-tile.swappo-tile .swappo-tile-letter {
    font-size: 0.62rem;
    transform: none;
}

html[data-tile-renderer="css"] body.s-game-page .s-game-summary-main-tile.swappo-tile {
    width: var(--s-game-summary-main-tile-size, 26px);
    height: var(--s-game-summary-main-tile-size, 26px);
    min-height: var(--s-game-summary-main-tile-size, 26px);
    margin: 0 1px;
    cursor: default;
    box-shadow: none;
}

html[data-tile-renderer="css"] body.s-game-page .s-game-summary-main-tile.swappo-tile .swappo-tile-letter {
    font-size: 0.82rem;
    transform: none;
}

html[data-tile-renderer="css"] body.s-game-page .s-game-summary-hook-tile.swappo-tile {
    width: var(--s-game-summary-hook-tile-size, 17px);
    height: var(--s-game-summary-hook-tile-size, 17px);
    min-height: var(--s-game-summary-hook-tile-size, 17px);
}

html[data-tile-renderer="css"] body.s-game-page .s-game-summary-hook-tile.swappo-tile .swappo-tile-letter {
    font-size: 0.55rem;
}

html[data-tile-renderer="css"] body.s-game-page .s-game-question-tile.swappo-tile .swappo-tile-points,
html[data-tile-renderer="css"] body.s-game-page #log .s-game-log-main-tile.swappo-tile .swappo-tile-points,
html[data-tile-renderer="css"] body.s-game-page #log .s-game-log-hook-tile.swappo-tile .swappo-tile-points,
html[data-tile-renderer="css"] body.s-game-page .s-game-summary-main-tile.swappo-tile .swappo-tile-points,
html[data-tile-renderer="css"] body.s-game-page .s-game-summary-hook-tile.swappo-tile .swappo-tile-points {
    display: none;
}

@media (max-width: 768px) {
    html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-question-tile {
        width: 34px;
        height: 34px;
        min-height: 34px;
    }

    html[data-tile-renderer="css"] body.mini-game-page .swappo-tile.mini-game-question-tile .swappo-tile-letter {
        font-size: 1rem;
    }

    html[data-tile-renderer="css"] body.hook-game-page #answer-buttons.hook-choice-grid .swappo-tile.mini-game-option-tile {
        width: min(100%, 34px);
        height: min(100%, 34px);
        min-height: min(100%, 34px);
        border-width: 1px;
    }

    html[data-tile-renderer="css"] body.hook-game-page #answer-buttons.hook-choice-grid .swappo-tile.mini-game-option-tile .swappo-tile-letter {
        font-size: 1rem;
    }

    html[data-tile-renderer="css"] body.spot-sless-page #answer-buttons.spot-choice-grid .swappo-tile.mini-game-option-tile {
        width: 26px;
        height: 26px;
        min-height: 26px;
    }

    html[data-tile-renderer="css"] body.s-game-page .swappo-tile.s-game-question-tile {
        width: 32px;
        height: 32px;
        min-height: 32px;
    }

    html[data-tile-renderer="css"] body.s-game-page .s-game-question-tile.swappo-tile .swappo-tile-letter {
        font-size: 1rem;
    }
}

/* Word Wall — compact wall tiles */
html[data-tile-renderer="css"] .ww-tile .alpha .swappo-tile.ww-alpha-tile {
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    cursor: default;
    box-shadow: none;
    border-radius: 2px;
}

html[data-tile-renderer="css"] .ww-tile.solved .alpha .swappo-tile.ww-alpha-tile {
    width: 12px;
    height: 12px;
    min-height: 12px;
    opacity: 0.6;
}

html[data-tile-renderer="css"] .ww-tile .alpha .swappo-tile.ww-alpha-tile .swappo-tile-letter {
    font-size: 0.52rem;
    transform: none;
}

html[data-tile-renderer="css"] .ww-tile.solved .alpha .swappo-tile.ww-alpha-tile .swappo-tile-letter {
    font-size: 0.42rem;
}

html[data-tile-renderer="css"] .ww-tile .solved-word .swappo-tile.ww-solved-tile {
    width: 13px;
    height: 13px;
    min-height: 13px;
    margin: 0;
    cursor: default;
    box-shadow: none;
    border-radius: 1px;
}

html[data-tile-renderer="css"] .ww-tile .solved-word .swappo-tile.ww-solved-tile .swappo-tile-letter {
    font-size: 0.45rem;
    transform: none;
}

html[data-tile-renderer="css"] .ww-tile .solved-word.missed-word .swappo-tile.ww-solved-tile {
    opacity: 0.9;
}

html[data-tile-renderer="css"] .ww-tile .alpha .swappo-tile.ww-alpha-tile .swappo-tile-points,
html[data-tile-renderer="css"] .ww-tile .solved-word .swappo-tile.ww-solved-tile .swappo-tile-points {
    display: none;
}

/* mobile_anagrams.php + mobile_anagrams2.php — question / rack tiles */
html[data-tile-renderer="css"] #word-tiles .swappo-tile.tile.in-word,
html[data-tile-renderer="css"] .rack-placeholder .swappo-tile.tile.in-rack {
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

html[data-tile-renderer="css"] #word-tiles .swappo-tile.tile.in-word .swappo-tile-letter,
html[data-tile-renderer="css"] .rack-placeholder .swappo-tile.tile.in-rack .swappo-tile-letter {
    font-size: clamp(0.65rem, 4vw, 1.35rem);
}

html[data-tile-renderer="css"] #word-tiles .swappo-tile.tile.in-word .swappo-tile-points,
html[data-tile-renderer="css"] .rack-placeholder .swappo-tile.tile.in-rack .swappo-tile-points {
    display: none;
}

html[data-tile-renderer="css"] .rack-placeholder .swappo-tile.tile.in-rack {
    width: 100%;
    height: 100%;
}

/* mobile anagram submission log */
html[data-tile-renderer="css"] .mobile-log-word-tiles .swappo-tile.mobile-log-main-tile,
html[data-tile-renderer="css"] .stats-log .mobile-log-word-tiles .swappo-tile.mobile-log-main-tile,
html[data-tile-renderer="css"] .stats-log-content .mobile-log-word-tiles .swappo-tile.mobile-log-main-tile {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    margin: 0;
    padding: 0;
    border-radius: 2px;
    box-shadow: none;
    cursor: default;
    flex-shrink: 0;
}

html[data-tile-renderer="css"] .mobile-log-hook-tiles .swappo-tile.mobile-log-hook-tile,
html[data-tile-renderer="css"] .stats-log .mobile-log-hook-tiles .swappo-tile.mobile-log-hook-tile,
html[data-tile-renderer="css"] .stats-log-content .mobile-log-hook-tiles .swappo-tile.mobile-log-hook-tile {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    max-width: 12px;
    max-height: 12px;
    margin: 0;
    padding: 0;
    border-radius: 2px;
    box-shadow: none;
    cursor: default;
    flex-shrink: 0;
    filter: grayscale(1);
    opacity: 0.85;
}

html[data-tile-renderer="css"] .mobile-log-word-tiles .swappo-tile.mobile-log-main-tile .swappo-tile-letter,
html[data-tile-renderer="css"] .stats-log .mobile-log-word-tiles .swappo-tile.mobile-log-main-tile .swappo-tile-letter {
    font-size: 0.62rem;
    transform: none;
    line-height: 1;
}

html[data-tile-renderer="css"] .mobile-log-hook-tiles .swappo-tile.mobile-log-hook-tile .swappo-tile-letter,
html[data-tile-renderer="css"] .stats-log .mobile-log-hook-tiles .swappo-tile.mobile-log-hook-tile .swappo-tile-letter {
    font-size: 0.48rem;
    transform: none;
    line-height: 1;
}

html[data-tile-renderer="css"] .mobile-log-word-tiles .swappo-tile .swappo-tile-points,
html[data-tile-renderer="css"] .mobile-log-hook-tiles .swappo-tile .swappo-tile-points {
    display: none;
}

html[data-tile-renderer="css"] .mobile-log-word.is-invalid .mobile-log-word-tiles .swappo-tile,
html[data-tile-renderer="css"] .mobile-log-word.is-invalid .mobile-log-hook-tiles .swappo-tile {
    background: #ef4444 !important;
    border-color: #7f1d1d !important;
    box-shadow: inset 0 0 0 1px #7f1d1d;
}

html[data-tile-renderer="css"] .mobile-log-word.is-skipped .mobile-log-word-tiles .swappo-tile,
html[data-tile-renderer="css"] .mobile-log-word.is-skipped .mobile-log-hook-tiles .swappo-tile,
html[data-tile-renderer="css"] .stats-entry.skipped .mobile-log-hook-tiles .swappo-tile {
    --swappo-tile-bg: #ffb74d;
    --swappo-tile-border-color: #e65100;
    --swappo-tile-letter-color: #000000;
    --swappo-tile-point-color: #000000;
    background: #ffb74d !important;
    border-color: #e65100 !important;
    box-shadow: inset 0 0 0 1px #e65100;
    opacity: 1;
}

html[data-tile-renderer="css"] .ma2-result-solution-tile.swappo-tile {
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: 0;
    margin: 0 1px;
    padding: 0;
    cursor: default;
}

html[data-tile-renderer="css"] .ma2-result-solution-tile.swappo-tile .swappo-tile-points {
    display: none;
}

/* Compact white-face CSS tiles (unseen multiset, GCG rack strip) — forceCss on all lexicons */
.swappo-tile.bv-inline-tile {
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 1px;
    padding: 0;
    line-height: 1 !important;
    flex-shrink: 0;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: none;
    --swappo-tile-bg: #ffffff;
    --swappo-tile-border-color: #bdbdbd;
    --swappo-tile-letter-color: #111111;
    --swappo-tile-point-color: #111111;
    background: #ffffff;
    border: 1px solid #bdbdbd;
}

.swappo-tile.bv-inline-tile .swappo-tile-letter {
    color: #111111 !important;
    font-weight: 700;
    line-height: 1 !important;
    transform: none !important;
    margin: 0;
    padding: 0;
}

.swappo-tile.bv-inline-tile .swappo-tile-points {
    display: none !important;
}

.swappo-tile.bv-inline-tile-12 {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    max-width: 12px !important;
    min-height: 12px !important;
    max-height: 12px !important;
}
.swappo-tile.bv-inline-tile-12 .swappo-tile-letter { font-size: 8px !important; }

.swappo-tile.bv-inline-tile-16 {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
}
.swappo-tile.bv-inline-tile-16 .swappo-tile-letter { font-size: 10px !important; }

.swappo-tile.bv-inline-tile-18 {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
}
.swappo-tile.bv-inline-tile-18 .swappo-tile-letter { font-size: 11px !important; }

.swappo-tile.bv-inline-tile-20 {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
}
.swappo-tile.bv-inline-tile-20 .swappo-tile-letter { font-size: 12px !important; }

.swappo-tile.bv-inline-tile-28 {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
}
.swappo-tile.bv-inline-tile-28 .swappo-tile-letter { font-size: 15px !important; }

.swappo-tile.bv-inline-tile-32 {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
}
.swappo-tile.bv-inline-tile-32 .swappo-tile-letter { font-size: 17px !important; }

.swappo-tile.bv-inline-tile-52 {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
}
.swappo-tile.bv-inline-tile-52 .swappo-tile-letter { font-size: 28px !important; }
.swappo-tile.bv-inline-tile-52 .swappo-tile-points { display: none !important; }

#gcg-rack-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    min-height: 32px;
}
