/* Cribbage board (kind "cribbage"). */
[data-cribbage] .crib-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
[data-cribbage] .crib-p { position: relative; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .15s; }
[data-cribbage] .crib-p.crib-cur { outline-color: var(--ink); }
[data-cribbage] .crib-p.crib-win { outline-color: var(--signal); }
[data-cribbage] .crib-dotbtn { border: 0; background: none; width: 36px; height: 36px; border-radius: var(--pill); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; flex: none; }
[data-cribbage] .crib-dotbtn:hover { background: var(--pressed); }
[data-cribbage] .crib-dotbtn .dot { width: 16px; height: 16px; margin: 0; }
[data-cribbage] .crib-badge { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--ink); color: var(--on-ink); border-radius: var(--pill); padding: 3px 8px; flex: none; }
[data-cribbage] .crib-tap { min-height: 96px; }
[data-cribbage] .crib-cur .crib-tap { background: var(--pressed); }
[data-cribbage] .crib-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 14px; color: var(--body); font-variant-numeric: tabular-nums; }
[data-cribbage] .crib-meta b { color: var(--ink); }
[data-cribbage] .crib-board { padding: 8px; }
[data-cribbage] .crib-svg { width: 100%; height: auto; display: block; }
[data-cribbage] .crib-hole { fill: var(--mute); opacity: .45; }
[data-cribbage] .crib-end { fill: none; stroke: var(--mute); stroke-width: 1.5; }
[data-cribbage] .crib-line { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; }
[data-cribbage] .crib-lt { font: 700 11px var(--font); fill: var(--ink); }
[data-cribbage] .crib-num { font: 9px var(--font); fill: var(--body); }
[data-cribbage] .crib-legend { font-size: 13px; margin: 6px 4px 0; }
[data-cribbage] .crib-pad { display: flex; flex-direction: column; gap: 10px; }
[data-cribbage] .crib-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
[data-cribbage] .crib-lbl { font-weight: 600; }
[data-cribbage] .crib-pad .seg { background: var(--soft); }
[data-cribbage] .seg .dot { display: inline-block; width: 10px; height: 10px; margin: 0 2px 0 0; }
[data-cribbage] .crib-phint { font-size: 14px; flex: 1 1 200px; }
[data-cribbage] .crib-keys { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
[data-cribbage] .crib-keys .pill { padding: 8px 2px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; min-height: 56px; }
[data-cribbage] .crib-custom { display: flex; gap: 6px; }
[data-cribbage] .crib-custom .inp { background: var(--soft); min-width: 0; flex: 1; }
[data-cribbage] .ct-panel { user-select: text; -webkit-user-select: text; }
[data-cribbage] .ct-panel table { min-width: 100%; }
[data-cribbage] .ct-panel td, [data-cribbage] .ct-panel th { white-space: nowrap; }
[data-cribbage] .crib-axis { margin: 4px 0 0; font-size: 13px; }
body.is-focus [data-cribbage] .crib-tools .pill { display: inline-flex; }
body.is-focus [data-cribbage] .crib-tools .crib-extra { display: none; }
@media (max-width: 520px) {
  [data-cribbage] .crib-keys { grid-template-columns: repeat(4, 1fr); }
  [data-cribbage] .crib-players { grid-template-columns: 1fr 1fr; }
  [data-cribbage] .crib-players .crib-p:nth-child(3) { grid-column: 1 / -1; }
  [data-cribbage] .tile-val { font-size: 52px; }
  [data-cribbage] .tile-top { gap: 2px; }
  [data-cribbage] .crib-dotbtn { width: 28px; }
  [data-cribbage] .tile-name { padding: 6px 4px; font-size: 15px; }
}
