/* Four by Four only: the grid of words, the solved groups and their colours. Shared rules are in ../shared/base.css. */
main { max-width: 560px; }
.word-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px 12px; margin-bottom: 6px; }
.word-head .kicker { flex: 1 1 100%; }
.word-head h1 { font-size: clamp(30px, 9vw, 48px); flex: 1; }
.fb-intro { margin: 0 0 10px; }
/* group colours, easiest to trickiest, each with dark ink (all at least 8:1) */
.d1 { --g: #FFD23F; } .d2 { --g: #5BE59A; } .d3 { --g: #9FB4FF; } .d4 { --g: #FF9BD6; }
.solved { display: grid; gap: 6px; }
.solved .group { background: var(--g); color: var(--ink); border-radius: 10px; padding: 8px 10px; text-align: center; }
.solved .group b { display: block; font-size: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.solved .group span { font-size: 15px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.grid button {
  min-height: 64px; padding: 4px; border: 0; border-radius: 10px; background: var(--raised); color: var(--text);
  font: inherit; font-weight: 800; font-size: clamp(11px, 3.4vw, 16px); line-height: 1.1; overflow-wrap: anywhere; cursor: pointer;
}
.grid button[aria-pressed="true"] { background: var(--text); color: var(--ink); }
.grid button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.msg { min-height: 1.5em; text-align: center; font-weight: 700; margin: 8px 0 2px; }
.lives-line { text-align: center; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
#left { letter-spacing: 3px; color: var(--text); }
.fb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-actions #check { flex: 1 1 100%; }
.row.shake, .grid.shake { animation: shake 240ms; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .grid.shake { animation: none; } }
#result .bests { grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
#result .bests dd { font-size: 26px; }
@media (max-height: 600px) { .grid button { min-height: 54px; } .fb-intro { display: none; } }
