/* WP-TIMER-HINT-01 layout fix (owner-approved 2026-11-05, local). Loaded after the pinned Word Predictor styles.css, which is
   unchanged. The Timer row adds one row of controls inside a card whose height follows the viewport, so every pixel it takes
   comes out of the board. These rules keep that row to ONE line and win the space back with slightly denser controls and keys.
   No new colours, fonts, effects or glows. Touch targets stay >= 44 px; pointer (mouse) controls stay >= 36 px. */

/* The unused upstream round-chip list is hidden; .round-chips {display:flex} would otherwise keep it as an empty flex item
   (an extra gap in the Timer row). */
.ranked-panel .round-chips[hidden] {
  display: none;
}

/* Phones and narrow screens: the Timer choice, countdown and Hint fit on one line (the legend stays for screen readers). */
@media (max-width: 559px) {
  .ranked-panel {
    gap: 4px 8px;
  }

  .ranked-panel .length-legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .ranked-panel .mode-picker .segment span {
    padding: 0 10px;
  }

  .ranked-panel .btn {
    padding: 0 14px;
  }

  .length-picker {
    padding: 2px;
  }

  .keyboard {
    gap: 6px;
  }

  .key {
    height: clamp(44px, 5.4dvh, 50px);
  }
}

/* Very narrow phones: narrower segments so the used-hint label ("Letter 3: R") still fits the same line. */
@media (max-width: 400px) {
  .ranked-panel .mode-picker .segment span {
    padding: 0 8px;
  }

  .ranked-panel .btn {
    padding: 0 10px;
  }
}

/* Smallest phones (<= 360 px): slightly smaller text in the Timer row so it stays one line after a hint. */
@media (max-width: 360px) {
  .ranked-panel {
    gap: 4px 6px;
  }

  .ranked-panel .segment span,
  .ranked-panel .btn,
  .ranked-panel .ranked-meta {
    font-size: 0.8125rem;
  }
}

/* Tablets and other wide touch screens (>= 560 px, coarse pointer): touch targets stay 44 px; keys and paddings tighter. */
@media (min-width: 560px) and (pointer: coarse) {
  .length-picker {
    padding: 2px;
  }

  .ranked-panel {
    gap: 4px 10px;
  }

  .keyboard {
    gap: 7px;
  }

  .key {
    height: clamp(44px, 5.2dvh, 52px);
  }
}

/* Desktop with a mouse, every height: denser selectors and buttons in the Timer and Letters rows. */
@media (min-width: 560px) and (hover: hover) and (pointer: fine) {
  .ranked-panel .segment span,
  .toolbar .segment span {
    min-height: 36px;
  }

  .ranked-panel .btn,
  .toolbar .btn {
    min-height: 36px;
  }

  .length-picker {
    padding: 2px;
  }

  .ranked-panel {
    gap: 4px 10px;
  }
}

/* Desktop with a mouse, short viewports (laptops with browser chrome). */
@media (min-width: 560px) and (max-height: 899px) and (hover: hover) and (pointer: fine) {
  .key {
    height: 38px;
  }

  .keyboard {
    gap: 5px;
  }
}

/* Desktop with a mouse, tall viewports. */
@media (min-width: 560px) and (min-height: 900px) and (hover: hover) and (pointer: fine) {
  .key {
    height: clamp(44px, 5dvh, 50px);
  }

  .keyboard {
    gap: 7px;
  }
}

/* WP-SENTENCE-01 (owner decision 2026-11-05): the round's sentence with one blank, just above the board. Inherits the game's
   ink colour and font; the blank shows one underscore per letter. Kept compact so the board keeps as much room as possible. */
.wp-clue {
  margin: 0;
  max-width: 34rem;
  padding: 0 6px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
}

.wp-clue[hidden] {
  display: none;
}

.wp-blank {
  display: inline-block;
  margin: 0 0.2em;
  letter-spacing: 0.14em;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 559px), (min-width: 560px) and (max-height: 760px) {
  .wp-clue {
    font-size: 0.875rem;
    line-height: 1.3;
  }
}

/* STEP-80 / FR-04, FR-08: local sentence-mode layout. The site bar already identifies the brand and unscored practice.
   Keep the repeated header metadata available to assistive technology without spending another two visual lines on it.
   All changes live in this independent WP package; pinned styles and gameplay stay unchanged. */
.game {
  gap: 4px;
  height: auto;
  min-height: min(920px, calc(100dvh - 16px));
  max-height: none;
}

/* Keep a genuine board allocation even with 200% text or a wrapped control row. The card may grow vertically. */
.board-stage {
  min-height: max(260px, 14rem);
}

.keyboard {
  flex-shrink: 0;
}

/* Enlarged letters must also fit short desktop keys; the normal 38/44px heights remain the minimum at 100% text. */
.key {
  min-height: 1.5em;
}

/* Keep the full action label readable when text is enlarged; other keys share the remaining row. */
.key-enter {
  flex: 0 0 auto;
  width: max-content;
  min-width: max-content;
  max-width: none;
  padding-inline: 6px;
  white-space: nowrap;
}

.game-header .eyebrow,
.game-header .header-meta {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.game-header h1 {
  font-size: 1.5rem;
  line-height: 1.15;
}

.game-header {
  flex-shrink: 0;
}

.wp-clue {
  flex-shrink: 0;
  width: 100%;
  max-width: 32rem;
  padding: 4px 10px;
  border: var(--ac-stroke-signature) solid var(--wp-line);
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.toolbar,
.ranked-panel {
  flex-shrink: 0;
}

/* A real 44px help target replaces the upstream invisible extension into its neighbours. */
.help-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.help-btn::after {
  inset: 0;
}

.progress {
  min-height: 44px;
}

@media (max-width: 559px) {
  .game {
    /* Very short phones may scroll vertically rather than crush six rows or cover the keyboard. */
    min-height: max(680px, calc(100dvh - 16px));
    padding-top: 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .keyboard {
    gap: 4px;
  }
}

@media (min-width: 560px) {
  .game {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* WP-PREMIUM-V5: cosmetic only. No HTML/JS/global/shared stylesheet changes.
   Existing board sizing, control order, key hit areas and feedback marks are preserved. */
body[data-premium-game="word-predictor"] #amzc-age-game main.game{
  --v5-purple:linear-gradient(175deg,#8253cc 0%,#733bc4 38%,#4c238e 100%);
  --v5-gold:#c49a40;
  --v5-glass:linear-gradient(155deg,#ffffffef,#fce9f5eb 45%,#eee0f7e8 78%,#fff0d9ed);
  background:radial-gradient(ellipse at 50% 0%,#fffffffa,transparent 58%),var(--v5-glass);
  border-color:#d0a34d;
  /* Preserve V4's external shadow exactly: a changed blur can paint onto the
     adjacent navigation on phones. All additional console lighting is inset. */
  box-shadow:inset 0 0 0 1px #fff8df,inset 0 0 0 5px #ffffff80,inset 0 -12px 24px #d49bce22,inset 0 2px #fff,0 5px 0 #e3d0ea,0 30px 65px -35px #7e448b66;
}
/* Retain the existing floating letter shapes and outer ambient lighting verbatim:
   they also contribute to the protected navigation's rendered tint. New lighting
   stays inside main.game so the shared navigation remains visually identical. */
/* The title becomes a compact console nameplate; shared navigation is untouched. */
body[data-premium-game="word-predictor"] #amzc-age-game .game .game-header{
  width:100%;padding-block:10px;border-radius:19px;
  background:radial-gradient(ellipse at 50% 0%,#a172b980,transparent 75%),linear-gradient(160deg,#624079,#392147 70%,#482b5b);
  box-shadow:inset 0 1px #fff1bfaa,inset 0 -2px #24133366,0 3px 0 #c29b48;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game #game-title .title-text{
  color:#ffe5a4;text-shadow:0 1px #3b204c,0 2px 0 #392147;letter-spacing:-.025em;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game .logo-tile{box-shadow:inset 0 2px #ffffffa6,0 3px 0 #25133080}
/* Frosted console recess: gradients and inset lighting, no backdrop-filter. */
body[data-premium-game="word-predictor"] #amzc-age-game .game #board{
  border-color:#c9a05b;
  background:linear-gradient(155deg,#e6d3ed,#fff1e0 45%,#e7d5f1);
  box-shadow:inset 0 0 0 3px #fff5e9b3,inset 0 5px 12px #80549126,inset 0 -5px 10px #a56eac21,0 4px 0 #bda2c5,0 8px 0 -3px #d4b578,0 16px 25px -17px #542c6d80;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game #board .tile{
  --sheen:.78;
  background:linear-gradient(155deg,var(--face-top),var(--face-bottom));
  box-shadow:inset 0 2px 0 #ffffffeb,inset 0 -4px 7px #6e428d15,0 var(--lip) 0 var(--lip-colour),0 9px 10px -6px #48235766;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game #board .tile:not(.state-correct,.state-present,.state-absent){
  --face-top:#fffdfb;--face-bottom:#e9dcf5;--edge:#92719e;--lip-colour:#baa0ca;
  background:linear-gradient(155deg,#fffdfb 5%,#fff5fd 42%,#e5d4f2);
}
body[data-premium-game="word-predictor"] #amzc-age-game .game #board .tile.filled:not(.state-correct,.state-present,.state-absent){--edge:#78568d}
body[data-premium-game="word-predictor"] #amzc-age-game .game #board .row.current .tile.next{
  --edge:#b52e80;--lip-colour:#d797bb;
  box-shadow:0 0 0 3px #fbc9e9b3,inset 0 2px #fff,0 var(--lip) 0 #d797bb,0 8px 12px -6px #bc478377;
}
/* Identical semantic mapping: teal correct, gold present, slate absent; marks retained. */
body[data-premium-game="word-predictor"] #amzc-age-game .game .state-correct{--face-top:#94f4df;--face-bottom:#33bda8;--lip-colour:#168674;--text:#163d35}
body[data-premium-game="word-predictor"] #amzc-age-game .game .state-present{--face-top:#fff0b7;--face-bottom:#f3c550;--lip-colour:#b38624;--text:#47350c}
body[data-premium-game="word-predictor"] #amzc-age-game .game .state-absent{--face-top:#6d7590;--face-bottom:#566078;--lip-colour:#41465f;--text:#fff}
/* Same padding, rows and hit areas as V4; the panel gets an inset golden rim. */
body[data-premium-game="word-predictor"] #amzc-age-game .game #keyboard{
  background:linear-gradient(155deg,#f3e5f5,#e9d9ee 65%,#f9ecd8);
  box-shadow:inset 0 0 0 1.5px #c7a05b,inset 0 3px 0 #fff9ec,inset 0 -3px 7px #95619e20,0 4px 0 #c5aaca,0 10px 18px -13px #5e356e88;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game #keyboard .key:not(.key-action,.state-correct,.state-present,.state-absent){
  background:linear-gradient(165deg,#fffefc,#fff6fd 44%,#e8d9f3);border-color:#a084b2;
  box-shadow:inset 0 2px #fff,inset 0 -2px 3px #d3b5de55,0 3px 0 #b49bc4,0 7px 8px -5px #63397266;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game #keyboard .key-enter{
  background:var(--v5-purple);color:#fff;border-color:#c6a35a;
  box-shadow:inset 0 2px #ffffff73,inset 0 -3px #31146255,0 3px 0 #482267,0 7px 10px -7px #49226a99;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game #keyboard .key-back{
  background:linear-gradient(160deg,#fff8dd,#ffe5b5 60%,#f1c37e);color:#8a3815;border-color:#b38b4a;
  box-shadow:inset 0 2px #fff,0 3px 0 #c29a64,0 7px 8px -6px #784c4e77;
}
/* Do not override state-aware keyboard ink/backgrounds or native press/focus behavior. */
body[data-premium-game="word-predictor"] #amzc-age-game .game #keyboard .key:is(:active,.pressed){box-shadow:inset 0 2px #ffffffaa,0 1px 0 #a185b2}
body[data-premium-game="word-predictor"] #amzc-age-game .game :is(#ranked-panel,#practice-toolbar) .length-picker{
  background:linear-gradient(155deg,#fdf4fc,#e9d7ee);border-color:#bb96ba;box-shadow:inset 0 2px #fff,0 3px 0 #c3a2ca;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game :is(#ranked-panel,#practice-toolbar) .segment span{
  background:linear-gradient(160deg,#fffafd,#f4e8f7);color:#4f315f;box-shadow:inset 0 1px #fff;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game :is(#ranked-panel,#practice-toolbar) .segment input:checked+span{
  background:var(--v5-purple);color:#fff;border-color:#cfae5e;
  box-shadow:inset 0 2px #ffffff73,inset 0 0 0 1px #f8d88a88,0 3px 0 #4d286e;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game :is(#ranked-panel,#practice-toolbar) :is(#hint,#new-word){
  background:var(--v5-purple);border-color:#cfae5e;color:#fff;
  box-shadow:inset 0 2px #ffffff73,inset 0 -3px #32134c44,0 3px 0 #50266e,0 6px 10px -7px #49226a88;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game :is(#ranked-panel,#practice-toolbar) input:focus-visible+span{outline:3px solid #6c3bff;outline-offset:3px}
body[data-premium-game="word-predictor"] #amzc-age-game .game #clue{
  padding:8px 12px;border-color:#b18a3d;border-radius:15px;color:#45314f;
  background:radial-gradient(ellipse at 50% 0%,#ffffffef,transparent 70%),linear-gradient(135deg,#fff4d7,#fff1f8 58%,#f0e4f8);
  box-shadow:inset 0 2px #fff,inset 3px 0 #e8c269,0 3px 0 #d9bdd4,0 9px 15px -12px #7b488b80;
  font-weight:750;text-wrap:balance;
}
@media(prefers-reduced-motion:reduce){
  body[data-premium-game="word-predictor"] #amzc-age-game .game #board .tile,
  body[data-premium-game="word-predictor"] #amzc-age-game .game #keyboard .key{transition:none}
}

/* WP-PREMIUM-V5.1: local decoration only; V5 remains the immutable prefix.
   A wider desktop rim preserves the exact inner allocation and mobile geometry. */
@media (min-width:1024px) and (hover:hover) and (pointer:fine){
  body[data-premium-game="word-predictor"] #amzc-age-game main.game{
    width:min(100%,580px);padding-inline:46px;
  }
}
/* Refine the existing tile reflection, leaving feedback faces and marks intact. */
body[data-premium-game="word-predictor"] #amzc-age-game .game #board .tile:not(.state-correct,.state-present,.state-absent)::before{
  background:linear-gradient(115deg,#ffffffb8,transparent 58%),linear-gradient(180deg,#ffffffd9, #ffffff40 72%,transparent);
  box-shadow:inset 0 1px #fff;
}
body[data-premium-game="word-predictor"] #amzc-age-game .game #board .tile:not(.next,.state-correct,.state-present,.state-absent){
  box-shadow:inset 0 2px #fff,inset 1px 0 #ffffffc9,inset 0 -4px 7px #6e428d1c,0 var(--lip) 0 var(--lip-colour),0 9px 10px -6px #48235766;
}
/* Static top-edge glass, above the letter centre; no extra hit area or motion.
   The existing ::after tap extension and semantic/action key faces are untouched. */
body[data-premium-game="word-predictor"] #amzc-age-game .game #keyboard .key:not(.key-action,.state-correct,.state-present,.state-absent)::before{
  content:"";position:absolute;top:3px;left:3px;right:3px;height:28%;
  border-radius:8px 8px 40% 40%;pointer-events:none;
  background:linear-gradient(115deg,#ffffffd9,#ffffff55 48%,transparent 75%);
  box-shadow:inset 0 1px #ffffffed;
}
/* Gold-glass clue: darker ink, opaque pearl face and a fine inset gold rim.
   Preserve font size, line height, wrapping, padding and all content. */
body[data-premium-game="word-predictor"] #amzc-age-game .game #clue{
  color:#382342;border-color:#aa8136;
  background:linear-gradient(115deg,#fff8e6,#fffaf5 48%,#f6edf8);
  box-shadow:inset 0 1px #fff,inset 0 0 0 2px #f3dca1,inset 4px 0 #d5af5c,0 3px 0 #d9bdd4,0 9px 15px -12px #7b488b80;
}
