.lights-intro, .lights-help, .word-help { color: var(--muted); line-height: 1.65; }
.word-instructions { color: var(--muted); line-height: 1.6; font-size: .9375rem; }
.lights-meta, .word-meta { color: var(--muted); font-size: .9375rem; text-align: center; margin: 12px 0 18px; }
.lights-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 400px; margin: 20px auto 26px; padding: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 20px; box-shadow: inset 0 3px 9px #0002; }
.lights-board .lights-cell { min-width: 0; min-height: 0; aspect-ratio: 1; padding: 0; border: 1px solid #51655a; border-radius: 12px; background: linear-gradient(145deg, #30483b, #23372c); color: #d0dacf; font-size: 1.8rem; box-shadow: 0 4px 0 #1b3024, inset 0 1px 1px #ffffff40; transition: transform .12s ease; }
.lights-board .lights-on { background: linear-gradient(145deg, #fff3b8, #edc963); color: #70521d; border-color: #b68b3c; box-shadow: 0 4px 0 #a17933, inset 0 1px 2px #fff, 0 0 13px #edc96355; }
.lights-board .lights-cell:active { transform: translateY(2px); }
.lights-board .lights-hint { outline: 3px dashed var(--focus); outline-offset: 3px; }
.lights-board .lights-cell:focus-visible, .word-board .word-cell:focus-visible { position: relative; z-index: 2; outline: 3px solid var(--focus); outline-offset: -3px; }
/* Inset keyboard focus must contrast with the tile, in either page theme. */
.lights-board .lights-cell:focus-visible { outline-color: #f0c27e; }
.lights-board .lights-on:focus-visible { outline-color: #70521d; }
.lights-actions, .word-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0; }
.lights-help, .word-help { border-top: 1px solid var(--line); padding-top: 12px; font-size: .9375rem; margin-top: 24px; }
.lights-help summary, .word-help summary { min-height: 44px; padding: 10px 0; color: var(--ink); font-weight: 600; }
.word-theme { margin: 10px 0 4px; font: 1.6rem Georgia, serif; text-align: center; }
.word-challenge { color: var(--muted); font-size: .875rem; line-height: 1.5; text-align: center; margin: 6px auto; max-width: 48ch; }
.word-difficulty { margin-top: 22px; padding: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.word-difficulty label { display: block; margin-bottom: 8px; font-weight: 600; }
.word-difficulty select { width: 100%; min-width: 0; min-height: 44px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; }
.word-difficulty select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.word-next-description { color: var(--muted); font-size: .875rem; line-height: 1.5; margin: 8px 0 0; }
.word-layout { display: grid; gap: 20px; align-items: start; }
.word-board { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; width: 100%; max-width: 460px; margin: auto; padding: 6px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.word-board .word-cell { min-width: 0; min-height: 0; aspect-ratio: 1; padding: 0; border: 0; border-radius: 5px; color: var(--ink); background: var(--surface); font: 600 1.05rem Arial, sans-serif; box-shadow: 0 2px 0 #0001; }
.word-board .word-found { background: #d7e7cd; color: #234527; }
.word-board .word-preview { background: #f5ddb3; color: #583918; }
.word-board .word-start, .word-board .word-hint { outline: 3px solid var(--focus); outline-offset: -3px; }
.word-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; list-style: none; padding: 0; margin: 0 auto; max-width: 460px; width: 100%; font-size: .875rem; letter-spacing: .04em; }
.word-list li { padding: 7px 10px; background: var(--soft); border-radius: 7px; border: 1px solid var(--line); min-width: 0; }
.word-list .word-found-label { text-decoration: line-through; color: var(--muted); }
body.dark .word-board .word-found { background: #3a6245; color: #f0f7e9; }
body.dark .word-board .word-preview { background: #86642e; color: #fff8e9; }
@media (min-width: 900px) { .word-layout { grid-template-columns: minmax(0, 1fr) 150px; } .word-list { grid-template-columns: 1fr; gap: 7px; } }
@media (max-width: 480px) { .lights-board { gap: 8px; padding: 10px; } .word-board { gap: 2px; padding: 3px; } .word-board .word-cell { font-size: clamp(.75rem, 3.3vw, 1rem); border-radius: 3px; } .word-list { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .lights-board .lights-cell { transition: none; } }
