.word-game { --word-teal: #376c61; --word-coral: #ac5d4b; --word-quiet: #ebe8e0; color: var(--ink); }
.word-game .word-heading { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-bottom: 24px; }
.word-game h1 { font: clamp(2.6rem, 5vw, 4.1rem)/1.05 var(--font-display, Georgia, serif); letter-spacing: -.045em; margin: 9px 0 12px; }
.word-game h1 > span { color: var(--word-coral); }
.word-game .word-heading p:last-child { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.word-game .word-heading-art { display: flex; gap: 6px; padding-right: 18px; transform: rotate(7deg); }
.word-game .word-heading-art > span { width: 54px; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: var(--word-teal); color: #fff; border-radius: 9px; font: 28px var(--font-display, Georgia, serif); box-shadow: 3px 4px 0 #d8dfd3; }
.word-game .word-heading-art > span:nth-child(2) { background: var(--word-coral); transform: translateY(-8px) rotate(-12deg); }
.word-game .word-heading-art small { font: 11px var(--font-body, sans-serif); }
.word-game .word-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(275px, 1fr); gap: 24px; align-items: start; }
.word-game .panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius, 16px); }
.word-game .word-play { padding: 24px clamp(15px, 2.8vw, 30px); }
.word-game .word-board-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.word-game .word-board-heading .eyebrow { font-size: .59rem; letter-spacing: .09em; }
.word-game .word-attempt-count { font-size: .69rem; font-weight: 700; color: var(--muted); }
.word-game .word-board { width: min(100%, calc(var(--word-length) * 53px)); list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 6px; }
.word-game .word-row { display: grid; grid-template-columns: repeat(var(--word-length), minmax(0, 1fr)); gap: 6px; }
.word-game .word-tile { min-width: 0; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border: 1px solid #d6d1c5; border-radius: 7px; background: #f7f5ee; color: var(--ink); font-size: clamp(1.35rem, 3vw, 1.9rem); line-height: 1.05; font-weight: 750; }
.word-game .word-row-active .word-tile { border-color: #c6a394; background: #fffdf8; }
.word-game .word-row-active .word-filled { border: 2px solid var(--word-coral); }
.word-game .word-tile > small { font-size: .64rem; font-weight: 750; line-height: 1.1; margin-top: 2px; }
.word-game .word-exact { background: var(--word-teal) !important; border-color: var(--word-teal) !important; color: #fff !important; }
.word-game .word-present { background: var(--word-coral) !important; border-color: var(--word-coral) !important; color: #fff !important; }
.word-game .word-absent { background: #ddd9cf !important; border-color: #d0ccbf !important; color: #514e47 !important; }
.word-game .word-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px; margin: 17px 0 0; font-size: .64rem; color: var(--muted); }
.word-game .word-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.word-game .word-example { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 4px; font-size: .65rem; }
.word-game .word-status { min-height: 2.9em; margin: 17px 0 10px; text-align: center; font-size: .78rem; line-height: 1.5; }
.word-game .word-status.word-error { color: #a43d2c; font-weight: 650; }
.word-game .word-entry { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
.word-game .word-entry input { width: 100%; min-width: 0; border: 1px solid #b8aaa0; border-radius: 7px; background: #fffdf8; padding: 12px; color: var(--ink); font: 700 1rem var(--font-body, sans-serif); letter-spacing: .13em; text-transform: uppercase; }
.word-game .word-entry input::placeholder { font-size: .72rem; letter-spacing: 0; text-transform: none; font-weight: 500; }
.word-game .word-entry .button { flex: 0 0 auto; padding: 12px 16px; font-size: .8rem; background: var(--word-teal); border-color: var(--word-teal); color: #fff; }
.word-game .word-guess-help { max-width: 430px; text-align: center; margin: 9px auto 17px; font-size: .66rem; line-height: 1.5; color: var(--muted); }
.word-game .word-keyboard { display: grid; gap: 6px; max-width: 530px; margin: 0 auto; }
.word-game .word-key-row { display: flex; justify-content: center; gap: 5px; }
.word-game .word-key { position: relative; min-width: 0; width: 8.8%; min-height: 47px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid #d3cec2; border-radius: 5px; color: var(--ink); background: #f0ede5; font: 700 .8rem var(--font-body, sans-serif); cursor: pointer; touch-action: manipulation; }
.word-game .word-key-wide { width: 13.2%; font-size: .65rem; }
.word-game .word-key > small { font-size: .5rem; line-height: 1; }
.word-game .word-key:hover { filter: brightness(.96); }
.word-game .word-key:active { transform: translateY(1px); }
.word-game .word-sidebar { display: flex; flex-direction: column; gap: 18px; }
.word-game .word-settings { padding: 25px; }
.word-game .word-settings h2 { font: 2rem/1.1 var(--font-display, Georgia, serif); letter-spacing: -.03em; margin: 12px 0; }
.word-game .word-settings-copy { font-size: .83rem; line-height: 1.6; color: var(--muted); }
.word-game .word-settings label { display: flex; flex-direction: column; gap: 7px; margin-top: 17px; font-size: .73rem; font-weight: 650; }
.word-game select { min-width: 0; width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 7px; color: var(--ink); background: var(--surface); font: 500 .75rem var(--font-body, sans-serif); }
.word-game .word-config-note { font-size: .68rem; line-height: 1.5; color: var(--muted); min-height: 3em; margin: 15px 0 12px; }
.word-game .word-new { width: 100%; font-size: .8rem; }
.word-game .word-replace { padding: 14px; border: 1px solid #d4aa97; background: #fff2e8; border-radius: 9px; }
.word-game .word-replace p { margin: 0 0 10px; font-size: .77rem; line-height: 1.5; }
.word-game .word-replace > div { display: flex; flex-wrap: wrap; gap: 6px; }
.word-game .word-replace .button { padding: 10px; font-size: .7rem; }
.word-game .word-how { padding: 20px 24px; }
.word-game .word-how summary { cursor: pointer; font-size: .82rem; font-weight: 700; }
.word-game .word-how p { font-size: .74rem; line-height: 1.65; color: var(--muted); margin: 13px 0 0; }
.word-game .word-how strong { color: var(--ink); }
.word-game .word-footnote { font-size: .68rem; line-height: 1.6; color: var(--muted); margin: 0; text-align: center; }
.word-game .word-result { padding: 21px; border: 1px solid #b5cabd; border-radius: 10px; background: #edf3e8; margin-top: 14px; }
.word-game .word-result h2 { font: 1.85rem/1.2 var(--font-display, Georgia, serif); letter-spacing: -.035em; margin: 10px 0; }
.word-game .word-result > p:not(.eyebrow) { font-size: .83rem; line-height: 1.6; color: var(--muted); }
.word-game .word-result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.word-game .word-result .button { font-size: .8rem; }
.word-game .word-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.word-game [hidden] { display: none !important; }
@media (max-width: 850px) { .word-game .word-layout { grid-template-columns: 1fr; } .word-game .word-sidebar { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } .word-game .word-settings { grid-row: span 2; } .word-game .word-heading-art { padding-right: 0; } }
@media (max-width: 540px) { .word-game .word-heading { margin-bottom: 20px; gap: 10px; } .word-game h1 { font-size: 2.65rem; } .word-game .word-heading p:last-child { font-size: .88rem; } .word-game .word-heading-art { gap: 4px; } .word-game .word-heading-art > span { width: 28px; height: 37px; font-size: 19px; border-radius: 5px; } .word-game .word-heading-art small { font-size: 7px; } .word-game .word-sidebar { display: flex; } .word-game .word-play { padding: 18px 12px; } .word-game .word-board { width: min(100%, calc(var(--word-length) * 47px)); gap: 5px; } .word-game .word-row { gap: 5px; } .word-game .word-board-heading { margin-bottom: 15px; } .word-game .word-entry .button { padding: 11px; font-size: .7rem; } .word-game .word-key-row { gap: 4px; } .word-game .word-key { min-height: 43px; width: 9%; font-size: .73rem; } .word-game .word-key-wide { width: 13.5%; font-size: .57rem; } .word-game .word-legend { gap: 8px 10px; font-size: .6rem; } .word-game .word-status { margin-top: 12px; } .word-game .word-result { padding: 17px; } }
@media (max-width: 540px) {
  .word-game .word-heading { margin-bottom: 14px; }
  .word-game .word-heading .eyebrow { margin: 0; }
  .word-game h1 { font-size: 2.3rem; margin: 7px 0 8px; }
  .word-game .word-heading p:last-child { font-size: .8rem; line-height: 1.35; }
  .word-game .word-heading-tail, .word-game .word-heading p > br { display: none; }
  .word-game .word-play { padding-block: 14px; }
  .word-game .word-board { width: min(100%, calc(var(--word-length) * 42px)); gap: 4px; }
  .word-game .word-row { gap: 4px; }
  .word-game .word-board-heading { margin-bottom: 12px; }
  .word-game .word-legend { margin-top: 10px; }
  .word-game .word-status { min-height: 2.6em; margin: 9px 0 7px; font-size: .71rem; line-height: 1.3; }
  .word-game .word-entry input { padding: 9px 10px; }
  .word-game .word-entry .button { padding-block: 9px; }
  .word-game .word-guess-help { margin: 7px auto 10px; font-size: .61rem; line-height: 1.35; }
  .word-game .word-key { min-height: 39px; }
}
