/* The playable card on /daily, in the site's palette. Styles live in a file because
   the site's content security policy blocks inline style. */
.game { display: flex; flex-direction: column; gap: 18px; max-width: 540px; margin: 24px 0; }

button { font-family: inherit; color: inherit; }
button:focus-visible, .button:focus-visible { outline: 3px solid var(--label); outline-offset: 2px; }

.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.seg { display: inline-flex; border: 3px solid var(--ink); background: var(--card); }
.seg button { border: 0; background: transparent; padding: 8px 14px; font-size: 15px; font-weight: 800; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.card { background: var(--card); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 12px 12px 14px; }
.card-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0 2px 9px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 40px; grid-template-areas: "head ." "board rowc" "colc ."; column-gap: 7px; row-gap: 7px; }
.head { grid-area: head; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 0 3px; }
.head span { background: var(--ink); color: var(--paper); font-weight: 900; font-size: clamp(20px, 6vw, 28px); line-height: 1.3; text-align: center; }
.board { grid-area: board; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 3px; background: var(--ink); }
.cell {
  aspect-ratio: 1; max-width: 100%; background: var(--card); border: 0; position: relative;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  font-weight: 800; font-size: clamp(18px, 5.6vw, 26px); line-height: 1; font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.cell .num { position: relative; z-index: 2; }
.cell .ink { position: absolute; inset: 10%; border-radius: 50%; background: var(--mustard); box-shadow: inset 0 0 0 3px var(--ink); transform: scale(0); transition: transform 0.16s ease-out; z-index: 1; }
.cell.called .ink { transform: scale(1); }
.cell.called .num { color: #2e2118; }
.cell.not .num { opacity: 0.3; }
.cell.not::after {
  content: ""; position: absolute; inset: 24%; z-index: 3; pointer-events: none;
  background:
    linear-gradient(45deg, transparent calc(50% - 1.5px), var(--muted) calc(50% - 1.5px), var(--muted) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(-45deg, transparent calc(50% - 1.5px), var(--muted) calc(50% - 1.5px), var(--muted) calc(50% + 1.5px), transparent calc(50% + 1.5px));
}
.cell.given { box-shadow: inset 0 0 0 3px var(--muted); cursor: default; background: var(--sunken); }
.cell.given.has-badge { cursor: pointer; }
.cell.free .num { font-size: clamp(11px, 3.4vw, 15px); letter-spacing: 0.06em; }
.badge { position: absolute; top: 3px; right: 3px; z-index: 4; min-width: 20px; height: 20px; padding: 0 4px; background: var(--ink); color: var(--paper); font-size: 12.5px; line-height: 20px; font-weight: 800; text-align: center; }
.cell.hl { outline: 3px solid var(--avocado); outline-offset: -3px; }
.cell.target { outline: 3px dashed var(--avocado); outline-offset: -3px; animation: pulse 1.3s ease-in-out infinite; }
.cell.err { animation: shake 0.38s ease-in-out; background: var(--orange); }
.cell.win { outline: 4px solid var(--orange); outline-offset: -4px; }
.cell:focus-visible { outline: 3px solid var(--label); outline-offset: -3px; }
@keyframes pulse { 50% { background: var(--sunken); } }
@keyframes shake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

.rowc { grid-area: rowc; display: grid; grid-template-rows: repeat(5, 1fr); gap: 3px; padding: 3px 0; }
.colc { grid-area: colc; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 0 3px; }
.chip { display: grid; place-items: center; min-height: 36px; border: 3px solid var(--ink); background: transparent; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0; }
.chip.done { opacity: 0.4; border-style: dashed; }
.chip.hl { background: var(--sunken); border-color: var(--avocado); }
.chip-empty { visibility: hidden; }
.legend { margin: 11px 2px 0; font-size: 14px; color: var(--muted); }

.play { display: flex; flex-direction: column; gap: 12px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tools button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; border: 3px solid var(--ink); background: var(--card); font-size: 17px; font-weight: 800; cursor: pointer; }
.tools button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tools .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--mustard); box-shadow: inset 0 0 0 3px var(--ink); }
.tools button[aria-pressed="true"] .dot { box-shadow: inset 0 0 0 3px var(--paper); }
.tools .x { font-size: 20px; line-height: 1; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.status b { color: var(--ink); }
.hint-btn { margin-left: auto; border: 3px solid var(--ink); background: var(--card); padding: 6px 16px; font-size: 15px; font-weight: 800; cursor: pointer; }
.msg { min-height: 1.4em; margin: 0; font-size: 15px; color: var(--label); }
.hintbar { border: 3px solid var(--avocado); background: var(--card); padding: 12px 14px; }

.win { background: var(--card); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.win[hidden], .hintbar[hidden] { display: none; }
.win p { margin: 0; }
.bingo { font-size: clamp(38px, 11vw, 52px); line-height: 1; font-weight: 900; color: var(--orange); letter-spacing: 0.02em; }
.share { font: inherit; font-size: 15px; line-height: 1.4; background: var(--sunken); padding: 12px; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.win-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.win-actions button { border: 3px solid var(--ink); background: var(--ink); color: var(--paper); padding: 10px 16px; font-size: 16px; font-weight: 800; cursor: pointer; }
.win-actions button.ghost { background: transparent; color: var(--ink); }
.win-actions .button { padding: 9px 16px; font-size: 14px; }

.slip { background: var(--card); border: 3px solid var(--ink); padding: 14px 16px 6px; }
.slip-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.slip h2 { margin: 0; }
.slip-head span { font-size: 13px; color: var(--muted); }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { border-top: 2px dashed var(--sunken); margin: 0; max-width: none; }
.rule { padding: 11px 2px; font-size: 16px; }
.rule b { letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; margin-right: 4px; }
.note { display: flex; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; padding: 11px 2px; font-size: 16.5px; cursor: pointer; }
.note .tick { flex: 0 0 18px; color: var(--muted); font-weight: 800; }
.note.hl { background: var(--sunken); }
.note.done { color: var(--muted); }
.note.done .txt { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.empty-note { padding: 11px 2px; color: var(--muted); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  .cell.target, .cell.err { animation: none; }
  .cell .ink { transition: none; }
}
