/* October review: shared, additive refinements for the current public players. */
[hidden] { display: none !important; }
button, input, textarea { font-family: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #1344b8; outline-offset: 3px; }
.movement-key { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; max-width: 620px; margin: 4px auto 14px; color: #17356e; font-size: .85rem; line-height: 1.4; }
.movement-key > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.move-swatch { display: inline-block; width: 18px; height: 18px; border: 1px solid #667484; border-radius: 4px; }
.move-1 { background: #fff; } .move-2 { background: #cfd5dd; } .move-3 { background: #9ea7b2; }
.movement-key small { flex-basis: 100%; text-align: center; font-size: .8rem; }
.selection-status { color: #17356e; font-size: .9rem; line-height: 1.45; margin: 12px auto; max-width: 460px; text-align: center; }
.save-status { max-width: 600px; margin: 16px auto 4px; color: #4c5c73; font-size: .8rem; line-height: 1.45; text-align: center; }
.reset-control { background: transparent; color: #43536b; border-color: #9caac0; font-weight: 600; }
.cell { position: relative; font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif; }
.cell.given-cell { box-shadow: none; font-weight: 700; }
.cell.selected, .rw-tile--selected, .rw-assignment--undo-selected { outline: 3px solid #1344b8; outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
.cell:focus-visible, .rw-tile:focus-visible, .rw-word-slot:focus-visible { outline: 3px solid #0f2e80; outline-offset: 3px; }
.feedback-chip.feedback-error, .rw-status.rw-status--error { padding: 10px 12px; border: 1px solid #a51d2d; border-left-width: 4px; border-radius: 8px; background: #fff4f4; color: #7a1723; font-size: .9rem; line-height: 1.45; max-width: 460px; }
.feedback-chip { white-space: normal; text-align: left; }
#completion-summary { grid-column: 1 / -1; margin: 0; line-height: 1.45; text-align: center; }
#numbers-share-copy { box-sizing: border-box; width: 100%; min-height: 180px; padding: 12px; font: inherit; }
#fill-efficiency-info-btn { min-width: 44px; min-height: 44px; }
/* Enough width for the board and its destination boxes; never height-driven shrinking. */
.rw-shell--play { width: min(100%, 1080px); }
.rw-play-panel { padding: 16px 22px; }
.rw-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 30px; }
.rw-grid { width: min(100%, 444px); margin: 0 auto; gap: 7px; }
.rw-tile { font-size: 2rem; border-color: #8b97a6; }
.rw-answer-area { min-width: 0; }
.rw-words-panel { padding: 0; border: 0; background: transparent; }
.rw-words-panel h2 { text-align: left; font-size: 1.1rem; margin: 0 0 8px; }
.rw-quick-help { font-size: .9rem; line-height: 1.45; color: #334a72; margin: 0 0 16px; }
.rw-word-list { gap: 12px; }
.rw-word-row { justify-content: flex-start; flex-wrap: nowrap; gap: 4px; overflow-x: auto; padding: 4px; scroll-padding: 8px; }
.rw-word-slot { flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; font: 700 1.2rem/1 "Trebuchet MS", "Segoe UI", Arial, sans-serif; border-color: #8392a6; background: #fff; }
.rw-word-slot[data-state="given"] { color: #43536b; border-style: dashed; }
.rw-word-slot[data-state="filled"] { color: #132033; background: #fff; border-style: solid; border-bottom: 3px solid #1344b8; }
.rw-controls { grid-template-columns: 1fr 1fr; max-width: none; gap: 12px; margin-top: 12px; }
.rw-controls .rw-button { min-height: 48px; }
.rw-answer-area .selection-status { text-align: left; min-height: 2.9em; }
.rw-status { min-height: 0; margin: 10px 0 0; text-align: left; font-size: .9rem; line-height: 1.45; }
.rw-status:empty { display: none; }
.rw-results-card .rw-status { text-align: center; padding: 0 14px; }
.rw-results-card { margin-top: 12px; }
.rw-start-overlay { align-items: flex-start; padding-top: 120px; }
.rw-puzzle-link:not(.rw-daily-start) { display: grid; grid-template-columns: 20px 1fr; gap: 4px 6px; padding: 12px; }
.rw-puzzle-link:not(.rw-daily-start) > span:nth-child(2) { white-space: nowrap; }
.rw-puzzle-link:not(.rw-daily-start) > small { grid-column: 2; margin-left: 0; font-size: .8rem; }
.rw-completion-slot { grid-row: 1 / 3; }
.practice-counter { text-align: center; font-weight: 700; color: #17356e; }
.game-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; padding: 10px; background: #0e389d; }
.game-tabs a, .rw-tabs a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px; border: 1px solid #94ace3; border-radius: 10px; color: white; text-decoration: none; font-size: .85rem; line-height: 1.3; text-align: center; }
.game-tabs a[aria-current] { color: #0f2e80; background: white; }
.quick-start { max-width: 650px; margin: 16px auto 28px; padding: 18px; border-radius: 14px; background: #fff; color: #132033; line-height: 1.6; }
.quick-start h3 { margin: 0 0 8px; color: #1344b8; }
.quick-start ol { padding-left: 22px; } .quick-start li { margin: 8px 0; }
.quick-start p { font-size: .95rem; }
.quick-start a { text-decoration: none; min-height: 44px; }
/* Match preview areas instead of stretching one description across empty space. */
.selector-shell .variant-card { padding: 20px; }
.selector-shell .game-preview { height: 220px; display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px auto; }
.selector-shell .preview-grid { width: 196px; flex-shrink: 0; }
.selector-shell .preview-word-clues { margin: 0; }
.selector-shell .preview-clue-title { font-size: .75rem; }
.selector-shell .preview-letter-box { width: 16px; height: 20px; font-size: .75rem; }
.selector-shell .variant-description { margin-bottom: 16px; }
.selector-shell .social-video-panel { padding: 14px; }
@media (max-width: 900px) and (min-width:621px) {
 .selector-shell .game-preview { gap: 8px; } .selector-shell .preview-grid { width: 160px; }
 .selector-shell .preview-letter-box { width: 13px; height: 19px; }
}
@media (max-width: 859px) {
 .rw-shell--play { width: min(100%, 620px); }
 .rw-workspace { grid-template-columns: 1fr; gap: 22px; }
 .rw-play-panel { padding: 12px; }
 .rw-grid { width: min(100%, 380px); }
 .rw-word-row { justify-content: center; }
 .rw-word-list { gap: 10px; }
}
@media (max-width: 420px) {
 .rw-grid { width: 100%; gap: 6px; }
 .rw-tile { font-size: 1.5rem; }
 .rw-word-row { justify-content: flex-start; }
 .rw-word-slot { flex: 0 0 44px; width: 44px; min-width: 44px; font-size: 1.2rem; }
 .movement-key { gap: 5px 9px; font-size: .78rem; }
 .game-tabs, .rw-tabs { grid-template-columns: 1fr 1fr; }
 .selector-shell .game-preview { height: 200px; gap: 10px; }
 .selector-shell .preview-grid { width: 160px; }
 .selector-shell .preview-letter-box { width: 14px; }
 .quick-start { padding: 14px; }
}

.rw-row-help { display: none; margin: 8px 0; font-size: .8rem; color: #43536b; line-height: 1.4; }
.movement-key { max-width: 920px; }
.movement-key small { order: 2; }
.selector-shell .social-video-panel .welcome-copy { margin: 4px auto 12px; }
@media(min-width:860px) { .rw-grid { max-width: 420px; } .rw-play-panel > .movement-key { margin-bottom: 16px; } }
@media(max-width:420px) { .rw-row-help { display: block; } }

#fill-efficiency-info-btn span { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; font: 700 13px/1 Arial, sans-serif; }
/* Keep the decorative wordmark intact when body text is enlarged. */
@media(max-width:620px) {
 .topbar .brand-title, .rw-topbar .rw-brand-name { font-size: min(3.25rem,9vw); white-space: nowrap; overflow-wrap: normal; }
}
#backspace-btn, #reset-btn { min-width: max-content; padding-inline: 4px; }
@media(min-width:621px) {
 .small-controls { grid-template-columns: max-content var(--key-size) max-content; }
 #backspace-btn, #reset-btn { width: auto; }
}
@media(max-width:620px) {
 #backspace-btn { grid-column: 1 / 4; width: 100%; }
}
@media(max-width:620px) { .topbar .brand-game-label { font-size: min(.78rem,3.2vw); } }

/* Keep the mobile movement key close to the board without shrinking tap targets. */
@media(max-width:620px) {
 .puzzle-help { margin-bottom: 2px; }
 .puzzle-help summary { min-height: 44px; padding: 8px 12px; }
 .movement-key { gap: 3px 9px; margin: 4px auto 8px; }
 .movement-key small { line-height: 1.3; }
 .selection-status { margin-block: 8px; }
}

/* Restore the original compact Words phone sizing; keep the desktop workspace. */
@media (max-width: 619px) {
 .rw-shell--play .rw-brand-name { font-size: clamp(1.65rem, 7vw, 2.05rem); }
 .rw-play-panel { padding: 7px 8px 8px; }
 .rw-workspace { gap: 0; }
 .rw-status-pill { font-size: .72rem; }
 .rw-grid { width: min(100%, 300px, 38dvh); gap: clamp(3px, 1.1vw, 5px); margin: 0 auto 7px; }
 .rw-tile { font-size: clamp(1.05rem, 5.6vw, 1.5rem); }
 .rw-words-panel { padding: 6px 5px; background: #fff; border: 1px solid var(--rw-line); border-radius: 14px; }
 .rw-words-panel h2 { margin-bottom: 5px; font-size: .9rem; text-align: center; }
 .rw-word-list { gap: 4px; }
 .rw-word-row { justify-content: center; gap: var(--rw-slot-gap); padding: 0; overflow-x: visible; }
 .rw-word-slot { flex-basis: clamp(24px, calc((100% - (var(--rw-word-length) - 1) * var(--rw-slot-gap)) / var(--rw-word-length)), 40px); width: clamp(24px, calc((100% - (var(--rw-word-length) - 1) * var(--rw-slot-gap)) / var(--rw-word-length)), 40px); min-width: 24px; height: auto; font-size: clamp(.82rem, 4.2vw, 1.25rem); }
 .rw-quick-help, .rw-row-help, .rw-play-panel .movement-key { display: none; }
 .rw-play-panel .movement-key { margin: 2px auto 6px; }
 .rw-answer-area .selection-status { min-height: 0; margin: 4px auto; font-size: .78rem; line-height: 1.35; text-align: center; }
 .rw-controls { max-width: 360px; gap: 7px; margin: 7px auto 0; }
 .rw-controls .rw-button { min-height: 44px; }
 .rw-status { margin-top: 4px; font-size: .78rem; }
 .rw-play-panel > #save-status:not([data-save-error="true"]) { display: none; }
 .rw-start-overlay { align-items: center; padding: 10px; }
}
@media (max-height: 800px) and (max-width: 619px) {
 .rw-grid { width: min(100%, 300px, 32dvh); }
 .rw-word-slot { min-width: 22px; flex-basis: clamp(22px, calc((100% - (var(--rw-word-length) - 1) * var(--rw-slot-gap)) / var(--rw-word-length)), 32px); width: clamp(22px, calc((100% - (var(--rw-word-length) - 1) * var(--rw-slot-gap)) / var(--rw-word-length)), 32px); font-size: clamp(.76rem, 3.8vw, 1rem); }
}
@media (max-width: 619px) {
 /* Six-word puzzles need room for one extra answer row. */
 .rw-workspace:has(.rw-word-row:nth-child(6)) .rw-grid { width: min(100%, 256px, calc(38dvh - 44px)); }
}
@media (max-height: 800px) and (max-width: 619px) {
 .rw-workspace:has(.rw-word-row:nth-child(6)) .rw-grid { width: min(100%, 264px, calc(32dvh - 36px)); }
}
