/* Puso Mosaic Duel styles (v106).
   Board cells are the one deliberate sub-44px exception: a 9 by 9
   board on a phone cannot give every cell a 44px target, so cells
   size to the board width while every button and control stays
   44px or taller. Pieces are tinted rose with a heart mark for
   one seat and coral-gold with a wave mark for the other, never
   colour alone. */
.mosaic-wrap{max-width:560px}
.mosaic-scores{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;margin:8px 0}
.mosaic-panel{border:2px solid var(--gold);border-radius:12px;padding:10px;margin:10px 0;background:var(--gold-soft)}
.mosaic-panel h4{margin:0 0 6px}
.mosaic-segs{display:flex;flex-wrap:wrap;gap:4px}
.mosaic-seg{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:6px;border:1px solid var(--plum);background:#fff;color:var(--plum);font-weight:700}
.mosaic-seg.filled{background:var(--plum);color:var(--gold)}
.mosaic-theme-capiz .mosaic-seg.filled{background:var(--gold);color:var(--plum-deep)}
.mosaic-theme-jeepney .mosaic-seg.filled{background:var(--rose);color:#fff}
.mosaic-result{font-weight:700;font-size:18px;margin:10px 0}
.mosaic-turn{margin:8px 0}
.mosaic-stuck{background:var(--gold-soft);border-left:4px solid var(--gold);padding:8px 10px;margin:8px 0}
.mosaic-board{display:grid;grid-template-columns:repeat(9,1fr);gap:2px;max-width:420px;margin:10px auto;background:var(--plum);padding:4px;border-radius:10px}
.mosaic-cell{aspect-ratio:1/1;border:none;border-radius:4px;background:#fff;color:var(--plum);font-size:15px;line-height:1;cursor:pointer;padding:0;min-width:0}
.mosaic-cell.rose{background:var(--rose);color:#fff}
.mosaic-cell.coral{background:var(--coral);color:var(--plum-deep)}
.mosaic-cell.preview{outline:3px solid var(--gold);outline-offset:-3px}
.mosaic-cell:focus-visible{outline:3px solid var(--gold);outline-offset:-3px}
.mosaic-tray{margin:12px 0}
.mosaic-tray h5{margin:0 0 6px}
.mosaic-tray.active h5{color:var(--rose-deep)}
.mosaic-tray-pieces{display:flex;flex-wrap:wrap;gap:8px}
.mosaic-piece{min-width:72px;min-height:72px;border:2px solid var(--plum);border-radius:10px;background:#fff;padding:6px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:4px}
.mosaic-piece.rose{border-color:var(--rose)}
.mosaic-piece.coral{border-color:var(--coral)}
.mosaic-piece.selected{outline:3px solid var(--gold);outline-offset:2px}
.mosaic-piece:disabled{opacity:.55;cursor:default}
.mosaic-mini{display:inline-grid;gap:1px}
.mosaic-mini-row{display:flex;gap:1px}
.mosaic-mini-cell{width:10px;height:10px;border-radius:2px;background:transparent}
.mosaic-mini-cell.on{background:var(--plum)}
.mosaic-mini.rose .mosaic-mini-cell.on{background:var(--rose)}
.mosaic-mini.coral .mosaic-mini-cell.on{background:var(--coral)}
.mosaic-piece-name{font-size:12px;color:var(--plum)}
.mosaic-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.mosaic-actions .btn{min-height:44px}
.mosaic-reactions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
.mosaic-reactions .btn{min-height:44px}
.mosaic-toggles{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.mosaic-toggles .btn{min-height:44px}
.mosaic-howto{margin:12px 0}
.mosaic-howto summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center}
.mosaic-result-box{border:2px solid var(--plum);border-radius:12px;padding:12px;margin:12px 0}
.mosaic-result-box .btn{min-height:44px}
/* Large pieces: tray pieces and mini squares grow; the board is
   unchanged because it must stay 9 columns wide. */
.mosaic-large .mosaic-piece{min-width:96px;min-height:96px}
.mosaic-large .mosaic-mini-cell{width:14px;height:14px}
/* High contrast: darker fills and stronger borders. */
.mosaic-contrast .mosaic-cell{background:#fff}
.mosaic-contrast .mosaic-cell.rose{background:var(--rose-deep)}
.mosaic-contrast .mosaic-cell.coral{background:var(--gold);color:#000}
.mosaic-contrast .mosaic-piece{border-width:3px}
/* Dark theme toggle inside the game panel. */
.mosaic-dark .mosaic-cell{background:#3a2a3d;color:#fff}
.mosaic-dark .mosaic-cell.rose{background:var(--rose-deep)}
.mosaic-dark .mosaic-cell.coral{background:var(--gold);color:#000}
.mosaic-dark .mosaic-piece{background:#2e1230;color:#fff}
.mosaic-dark .mosaic-piece-name{color:#fff}
.mosaic-dark .mosaic-panel{background:#2e1230}
@media (max-width:360px){
  .mosaic-board{max-width:100%}
  .mosaic-cell{font-size:12px}
  .mosaic-piece{min-width:64px;min-height:64px}
}
/* Reduced motion: the game has no animated transitions, and this
   query keeps it that way for players who prefer less motion. */
@media (prefers-reduced-motion: reduce){
  .mosaic-cell,.mosaic-piece{transition:none}
}
