/* Logic puzzles: shared bar, board and message (same in each logic game's style.css). */
.lp-card { padding: 1rem 1rem .9rem; }
.lp-bar { display: flex; align-items: center; gap: .8rem; margin: 0 0 .7rem; }
.lp-clock { font-variant-numeric: lining-nums tabular-nums; font-weight: 700; font-size: 1.15rem; }
.lp-count { color: var(--muted); font-size: .9rem; flex: 1; font-variant-numeric: lining-nums tabular-nums; }
.lp-small { padding: .35rem .7rem; font-size: .88rem; }
.lp-board { display: grid; width: 100%; max-width: 420px; aspect-ratio: 1; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.lp-msg { text-align: center; min-height: 1.4em; }
@keyframes lp-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
/* Bridges. Colours come from the site tokens, mixed, so the sea and islands follow any theme. */
.br-card {
  --br-sea: color-mix(in srgb, var(--accent) 15%, var(--panel));
  --br-dot: color-mix(in srgb, var(--accent) 30%, var(--panel));
  --br-grass: var(--accent-2);
  --br-bridge: var(--ink);
}
.br-card .lp-bar { gap: .5rem; }
.br-board { display: block; overflow: visible; width: 100%; max-width: 460px; height: auto; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.br-sea { fill: var(--br-sea); }
.br-dots { fill: var(--br-dot); }
.br-bridges line { stroke: var(--br-bridge); stroke-width: 3.5; stroke-linecap: round; }
.br-i .land { fill: var(--panel); stroke: var(--br-grass); stroke-width: 3; transition: fill .15s; }
.br-i .halo { fill: none; stroke: transparent; stroke-width: 3; }
.br-i text { fill: var(--ink); font-family: var(--sans); font-size: 17px; font-weight: 700; text-anchor: middle; dominant-baseline: central; font-variant-numeric: lining-nums; pointer-events: none; }
.br-i.done .land { fill: var(--br-grass); }
.br-i.done text { fill: #fff; }
.br-i.over .land { stroke: var(--bad); fill: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
.br-i.over text { fill: var(--bad); }
.br-i.nb .halo { stroke: var(--accent); stroke-dasharray: 4 4; opacity: .7; }
.br-i.sel .halo { stroke: var(--accent); stroke-dasharray: none; opacity: 1; }
.br-i.sel .land { stroke: var(--accent); }
.br-i:focus { outline: none; }
.br-i:focus-visible .halo { stroke: var(--accent); stroke-width: 4; opacity: 1; }
.br-board.shake { animation: lp-shake .25s; }
.br-board.solved, .br-board.shown { cursor: default; }
.br-board.shown .br-bridges line { stroke: var(--muted); }
.lp-msg.bad { color: var(--bad); }
.lp-msg.ok { color: var(--ink); }
.br-row { justify-content: center; margin: .4rem 0 0; }
.br-next { text-align: center; margin: .8rem 0 0; }
@media (prefers-reduced-motion: reduce) { .br-board.shake { animation: none; } .br-i .land { transition: none; } }
