.power-actions button:disabled{opacity:.5;cursor:not-allowed}.power-actions button:disabled small{color:var(--muted)}#powers-dialog{position:fixed;inset:0;margin:auto;width:min(calc(100% - 28px),390px);max-height:min(78dvh,520px);text-align:left;touch-action:manipulation}#powers-dialog #power-confirmation{margin-top:14px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--background-soft)}#powers-dialog #power-confirmation p{margin:0 0 12px;font-weight:800}#powers-dialog #power-confirmation .dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}#powers-dialog #power-confirmation button{min-height:44px;border:1px solid var(--border);border-radius:10px;background:var(--panel);color:var(--text);font-weight:800}#powers-dialog #power-confirmation [data-confirm="use"]{border-color:var(--green);background:var(--green);color:#fff}.key.athena-eliminated{opacity:.3;text-decoration:line-through;filter:grayscale(1)}@media(max-width:600px){#powers-dialog{bottom:calc(env(safe-area-inset-bottom,0px) + 12px);inset:auto 12px 0;width:auto;max-width:none}.power-actions button{touch-action:manipulation}}
.tile.pop{animation:tile-pop .13s ease}@keyframes tile-pop{50%{transform:scale(1.09)}}
.game-board .tile.flip{animation:flip-tile .62s ease forwards;position:relative;overflow:visible}
@keyframes flip-tile{0%{transform:rotateX(0)}50%{transform:rotateX(90deg)}100%{transform:rotateX(0)}}

/* Athena premium veil: gold glow overlay during flip (non-transform overlay)
  Uses ::before so transform animations don't conflict. Respects reduced-motion. */
.game-board .tile.flip::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;mix-blend-mode:screen;background:radial-gradient(60% 60% at 50% 40%,rgba(255,229,153,0.88),rgba(214,175,64,0.6) 40%,rgba(214,175,64,0.12) 60%,transparent 70%);opacity:0;will-change:opacity}
.game-board .tile.flip::before{animation:athena-veil .62s cubic-bezier(.2,.8,.2,1) forwards}
@keyframes athena-veil{0%{opacity:0}30%{opacity:0}45%{opacity:.18}50%{opacity:.28}70%{opacity:.12}100%{opacity:0}}
@media (prefers-reduced-motion: reduce){.game-board .tile.flip::before{animation:none;opacity:0;display:none}}

#confetti:has(>img)::before{content:"";position:fixed;inset:0;z-index:30;background:#fff;pointer-events:none;animation:athena-sixes-wash 4.2s ease forwards}@keyframes athena-sixes-wash{0%,40%{opacity:0}48%,82%{opacity:1}100%{opacity:0}}@media (prefers-reduced-motion: reduce){#confetti:has(>img)::before{display:none}}

.game-row.shake{animation:row-shake .38s ease}@keyframes row-shake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}
 .game-shell{width:min(100%,620px);min-height:100dvh;margin:0 auto;padding:18px 14px calc(env(safe-area-inset-bottom,28px) + 16px)}.game-header{display:grid;grid-template-columns:52px 1fr auto;align-items:center;gap:10px;margin-bottom:14px}.game-heading h1{margin:0;font-size:34px;line-height:1}.game-heading p{margin:4px 0 0;color:var(--muted);font-weight:750}.header-meta{display:grid;justify-items:end;gap:5px;font-size:14px}.coin-display{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.coin-display-icon{width:clamp(24px,5vw,28px);height:clamp(24px,5vw,28px);object-fit:contain}.timer{padding:6px 10px;border-radius:999px;background:var(--background-soft);font-variant-numeric:tabular-nums}.timer.frozen{color:#fff;background:#52728d;animation:pulse-freeze 1.1s ease-in-out infinite}@keyframes pulse-freeze{50%{transform:scale(1.04)}}.athena-bar{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.athena-bar span{color:var(--muted);font-size:14px;font-weight:700;text-align:right}.game-board{width:100%;max-width:460px;display:grid;gap:7px;margin:0 auto 18px;perspective:900px}.game-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.tile{display:grid;place-items:center;border:2px solid var(--border);border-radius:11px;background:var(--panel);color:var(--text);font-size:clamp(25px,7vw,38px);font-weight:900;text-transform:uppercase;transform-style:preserve-3d;box-sizing:border-box;width:100%;aspect-ratio:1/1;min-width:0;min-height:0}.tile.filled{border-color:var(--grey)}.tile.pop{animation:tile-pop .13s ease}@keyframes tile-pop{50%{transform:scale(1.09)}}.tile.flip{animation:flip-tile .62s ease forwards}@keyframes flip-tile{0%{transform:rotateX(0)}50%{transform:rotateX(90deg)}100%{transform:rotateX(0)}}.game-row.shake{animation:row-shake .38s ease}@keyframes row-shake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}.tile.correct,.key.correct{border-color:var(--green);background:var(--green);color:#fff}.tile.present,.key.present{border-color:var(--amber);background:var(--amber);color:#1e2428}.tile.absent,.key.absent{border-color:var(--grey);background:var(--grey);color:#fff}.tile.locked{outline:3px solid color-mix(in srgb,var(--athena-green) 28%,transparent);outline-offset:2px}.keyboard{width:100%;max-width:580px;display:grid;gap:7px;margin:0 auto}.keyboard-row{display:flex;justify-content:center;gap:5px;flex-wrap:nowrap}.keyboard-row.control-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.key{min-width:0;flex:1 1 0;height:52px;padding:0 8px;border:1px solid var(--border);border-radius:9px;background:var(--panel);color:var(--text);font-size:14px;font-weight:800;cursor:pointer;min-height:44px;line-height:1.1;box-sizing:border-box}.key.wide{flex:1.35;font-size:13px}.key.wide.enter-key,.key.wide.backspace-key{display:flex;justify-content:center;align-items:center;text-align:center;line-height:0.95;white-space:nowrap;word-break:keep-all;overflow-wrap:normal;font-weight:800}.key.wide.backspace-key{flex:1.22 1 0}.key.control-key{min-width:0}.key.eliminated{opacity:.24;text-decoration:line-through}.power-actions{display:grid;gap:10px}.power-actions button{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:15px;border:1px solid var(--border);border-radius:16px;background:var(--background-soft);color:var(--text);text-align:left;cursor:pointer}.power-actions button span{font-weight:800}.power-actions button small{grid-column:1/-1;color:var(--muted)}.power-actions button:disabled{opacity:.45}.keyboard.keyboard-disabled .key.disabled{opacity:.45;cursor:not-allowed;}.keyboard.keyboard-disabled .key.disabled:hover{transform:none;}button.view-wisdom{font-size:0.88rem;padding:10px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.9);color:var(--text);transition:.15s ease;}.view-wisdom:hover{background:rgba(255,255,255,1);} .result-dialog{width:min(calc(100% - 28px),360px);max-height:74vh;padding:18px 18px 20px;background:rgba(255,255,255,0.92);backdrop-filter:blur(8px);text-align:center;box-shadow:0 28px 60px rgba(30,36,40,.18)}.result-dialog::backdrop{background:rgba(16,20,22,.38);backdrop-filter:blur(2px)}.result-owl{font-size:52px}.result-dialog h2{margin:6px 0 10px}.result-dialog p{color:var(--muted)}.result-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.result-summary div{padding:14px;border:1px solid var(--border);border-radius:16px}.result-summary strong,.result-summary span{display:block}.result-summary strong{font-size:28px}.result-summary span{color:var(--muted);font-size:12px}.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.result-actions button,.result-actions a{display:grid;place-items:center;min-height:44px;border:1px solid var(--border);border-radius:14px;background:var(--panel);color:var(--text);font-weight:800;text-decoration:none;cursor:pointer}.result-actions button{border-color:var(--green);background:var(--green);color:#fff}.confetti{pointer-events:none;position:fixed;inset:0;overflow:hidden}.confetti-piece{position:absolute;top:-20px;width:9px;height:14px;border-radius:2px;background:var(--amber);animation:confetti-fall 1.8s linear forwards}@keyframes confetti-fall{to{transform:translate3d(var(--drift),110vh,0) rotate(720deg);opacity:0}}@media(max-width:520px){.game-shell{padding:12px 7px 22px}.game-board,.game-row{gap:5px}.tile{border-radius:8px}.key{height:48px;font-size:12px}.athena-bar{align-items:flex-start}.athena-bar span{max-width:48%}}
/* Responsive improvements for iPhone portrait & short screens
   - Use dynamic tile sizing so 6 rows + keyboard fit in 100dvh
   - Account for safe-area inset at bottom
   - Slightly more compact keyboard on narrow / short screens
   - Avoid horizontal scrolling
*/

@media (orientation:portrait) and (max-width:520px), (max-height:900px) {
  .game-shell{min-height:100dvh;padding:12px 7px calc(env(safe-area-inset-bottom,12px) + 8px);}

  /* slightly tighter gaps */
  .game-board{--gap:4px;gap:var(--gap);width:100%;max-width:460px;}
  .game-row{gap:var(--gap);grid-template-columns:repeat(6,minmax(0,1fr));}

  /* compact keyboard */
  .keyboard{width:100%;max-width:390px;gap:6px;margin:0 auto;}
  .keyboard-row{gap:6px;display:flex;justify-content:center;flex-wrap:nowrap;}
  .keyboard-row.control-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .key{height:48px;font-size:14px;padding:0 10px;border-radius:9px;flex:1 1 0;min-width:0;}
  .key.wide{flex:1.35;font-size:13px;}

  /* Style Enter and Backspace wide keys to fit neatly on mobile */
  .key.wide.enter-key,
  .key.wide.backspace-key {
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    line-height:0.95;
    font-weight:800;
  }
  .key.backspace-key .bronze-laurel-arrow{display:block;width:clamp(34px,10vw,46px);height:auto;max-height:27px}

  .tile{width:100%;height:auto;aspect-ratio:1/1;min-width:0;min-height:0;box-sizing:border-box;font-size:clamp(18px,5.5vw,34px);border-radius:9px}

  /* reduce visual chrome to preserve space */
  .athena-bar{min-height:40px}
  .result-actions button,.result-actions a{min-height:44px}

  /* avoid horizontal scroll on narrow devices */
  html,body{overflow-x:hidden;}
}

/* Extra-short narrow screens (older/smaller iPhones) */
@media (max-width:420px) and (max-height:760px) {
  .key{height:40px;font-size:12px;}
  .game-board{
    --header-h:100px;
    --keyboard-h:calc((40px * 3) + (4px * 2) + 20px);
    /* avoid explicit tile-size here; allow grid track and aspect-ratio to control size */
  }
  .tile{width:100%;height:auto;aspect-ratio:1/1;min-width:0;min-height:0;font-size:clamp(16px,5vw,30px);border-radius:8px;}
}

/* iPhone portrait refinements (up to 430px wide) */
@media (orientation:portrait) and (max-width:430px) {
  .game-shell{box-sizing:border-box;min-height:100dvh;padding:10px 12px calc(env(safe-area-inset-bottom,12px) + 88px);}

  .game-header{gap:8px;margin-bottom:8px}
  .athena-bar{min-height:34px;margin-bottom:8px}

  /* Use a concrete available width and compute tile size from width first
     (fallback to available height if needed). Ensure --available-w is always defined. */
  .game-board{--gap:3px;gap:var(--gap);width:var(--available-w, calc(100% - 24px));max-width:100%;margin:0 auto 8px;--available-w:calc(100% - 24px);--tile-size:calc((var(--available-w) - (var(--gap) * 5)) / 6);--tile-scale:0.94;grid-auto-rows:auto} 
  .game-row{gap:var(--gap);grid-template-columns:repeat(6,minmax(0,calc(var(--tile-size) * var(--tile-scale))));}
  .tile{width:calc(var(--tile-size) * var(--tile-scale));height:calc(var(--tile-size) * var(--tile-scale));box-sizing:border-box;font-size:clamp(15px,4.5vw,28px);border-radius:8px}

  /* Keyboard: allow keys to shrink to avoid overflow, prefer flexible wide keys */
  /* Ensure keyboard never exceeds the available container width and keys can shrink
     to avoid horizontal scrolling on small viewports (iPhone 13 Pro 390x844, 375x812). */
  .keyboard{
    width:var(--available-w, calc(100% - 24px));
    max-width:100%;
    box-sizing:border-box;
    gap:6px;
    margin:0 auto;
    padding:0 6px;
  }
  .keyboard-row{
    gap:4px;
    display:flex;
    justify-content:center;
    flex-wrap:nowrap;
    box-sizing:border-box;
  }
  .keyboard-row.control-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
    .key{
      height:50px;
      font-size:16px;
      padding:0 8px;
      min-width:0;
      box-sizing:border-box;
      flex:0 1 auto;
      border-radius:10px;
    }
  /* Slightly reduce wide-key flex-basis so wide keys (Enter/Backspace) don't force overflow */
  .key.wide{flex:1.12 1 0;font-size:15px}
  .key.control-key{min-width:0}

  html,body{overflow-x:hidden}
}

/* iPhone 13 Pro portrait (390x844) — slightly tighter sizing to ensure full board+keyboard fit */
@media (max-width:430px) and (max-height:860px) {
  .game-shell{padding-bottom:calc(env(safe-area-inset-bottom,12px) + 60px)}
  .key{height:50px;min-width:0;flex:0 1 auto}
  .keyboard-row.control-row{gap:8px}
    .game-board{
      --header-h:96px;
      --keyboard-h:calc((50px * 3) + (var(--gap,2px) * 2) + 16px);
    --available-h:calc(100dvh - var(--header-h) - var(--keyboard-h) - env(safe-area-inset-bottom,12px) - 18px);
    --available_w:calc(100% - 24px);
    --gap:2px;
    grid-auto-rows:auto;
    /* avoid explicit tile-size here; let grid and aspect-ratio determine tile sizing */
  }
  .game-row{grid-template-columns:repeat(6,minmax(0,1fr));}
  .tile{width:100%;height:auto;aspect-ratio:1/1;min-width:0;min-height:0}
}

  /* Control-key refinements */
  .key.control-key{display:grid;place-items:center;padding:0 8px}
  .key.control-key .owl-mark{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;background:var(--background-soft);font-size:22px}
  .key.control-key .vault-control-coin{width:clamp(28px,8vw,38px);height:clamp(28px,8vw,38px);object-fit:contain}
  .key.enter-key .owl-mark{display:block;width:clamp(30px,7vw,38px);height:clamp(30px,7vw,38px);background:transparent;border:0;padding:0;border-radius:0;box-shadow:none;font-size:clamp(28px,7vw,36px);line-height:1;text-align:center;object-fit:contain;flex:none}

/* Restore desktop control-key minimum on wider screens */
@media (min-width:521px) {
  .key.control-key{min-width:72px}
}

/* Prevent any accidental horizontal scroll on all viewports */
/* Athena Reveal animation: premium, restrained reveal for submitted rows */
.game-board .tile.athena-reveal{will-change:transform,box-shadow;transform-origin:center;animation:athena-reveal 460ms cubic-bezier(.2,.8,.2,1) forwards}
@keyframes athena-reveal{0%{transform:scale(1) rotateY(0);box-shadow:none}20%{transform:scale(1.05) rotateY(8deg);box-shadow:0 6px 18px rgba(214,175,64,0.12)}50%{transform:scale(1.02) rotateY(18deg);box-shadow:0 10px 30px rgba(214,175,64,0.18)}80%{transform:scale(1.01) rotateY(6deg);box-shadow:0 6px 16px rgba(214,175,64,0.12)}100%{transform:scale(1) rotateY(0);box-shadow:0 4px 8px rgba(214,175,64,0.06)}}
.game-board .tile.athena-highlight{box-shadow:0 6px 18px rgba(214,175,64,0.14);transition:box-shadow 220ms ease}
@media (prefers-reduced-motion: reduce){.game-board .tile.athena-reveal{animation:none;transition:transform 120ms ease,box-shadow 120ms ease}}
html,body{overflow-x:hidden}

/* Additional safety: ensure elements cannot exceed their containers */
*{box-sizing:border-box}
img,svg,video,canvas{max-width:100%;height:auto;display:block}
button, a, input, .key, .menu-button{white-space:normal;word-break:break-word}
.panel-dialog, dialog{max-width:calc(100% - 28px);box-sizing:border-box}
.game-shell,.game-board,.keyboard{max-width:100%;box-sizing:border-box}

.daily-review-panel{width:100%;max-width:580px;height:229px;margin:0 auto;display:grid;place-content:center;gap:8px;padding:20px;border:1px solid var(--border);border-radius:16px;background:var(--background-soft);color:var(--text);text-align:center;box-shadow:0 10px 26px rgba(30,36,40,.08)}.daily-review-owl{font-size:42px;line-height:1}.daily-review-panel strong{font-size:20px}.daily-review-panel span{color:var(--muted);font-size:14px;font-weight:700}@media (orientation:portrait) and (max-width:520px), (max-height:900px){.daily-review-panel{height:210px}}@media (max-width:420px) and (max-height:760px){.daily-review-panel{height:184px}}@media (orientation:portrait) and (max-width:430px){.daily-review-panel{height:218px}}
@media (max-width:520px){.daily-review-panel{position:fixed;z-index:2;right:12px;bottom:calc(env(safe-area-inset-bottom,12px) + 8px);left:12px;width:auto;margin:0;max-width:none}}
.daily-review-reward{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:var(--green);font-size:15px;font-weight:800;line-height:1.2}.daily-review-reward img{width:20px;height:20px;border-radius:50%;object-fit:contain}
.wisdom-dialog .wisdom-rating{margin:0 0 18px;white-space:pre-line;color:var(--amber);font-size:13px;font-weight:800;line-height:1.55}

#result-dialog{position:fixed;inset:0;margin:auto;text-align:center}
#result-dialog::backdrop{background:rgba(21,29,34,.52);backdrop-filter:blur(2px)}
#result-dialog .result-word{display:block;margin-top:10px;color:var(--green);font-size:clamp(28px,9vw,40px);letter-spacing:0;text-transform:uppercase}
#result-dialog .result-guesses{display:block;margin-top:14px;color:var(--text);font-weight:800}
#result-dialog .result-close{position:absolute;top:10px;right:10px;z-index:1}
#result-dialog .result-actions [hidden]{display:none}
#result-dialog .result-actions a{border-color:var(--green);background:var(--green);color:#fff}
#result-dialog .result-actions>#share-results{border-color:var(--amber);background:var(--amber);color:#1e2428}
#result-dialog .result-actions>#completion-wisdom{border-color:var(--amber);background:var(--amber);color:#1e2428;white-space:nowrap;font-size:clamp(.9rem,3.8vw,1.1rem)}
.guest-time-trial-dialog{width:min(calc(100vw - 28px),390px);max-height:calc(100dvh - 32px);padding:22px;border-color:var(--amber);background:var(--panel);text-align:left}.guest-time-trial-dialog .dialog-header{margin-bottom:14px}.guest-time-trial-dialog h2{font-size:22px;line-height:1.15}.guest-time-trial-copy{display:grid;gap:12px;line-height:1.45}.guest-time-trial-copy p{margin:0}.guest-time-trial-copy p:first-child{font-weight:800}.guest-time-trial-dialog .dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px}.guest-time-trial-dialog .dialog-actions button{min-height:46px;border-radius:6px;font:inherit;font-weight:900}.guest-time-trial-dialog [data-guest-create]{border:1px solid var(--amber);background:var(--amber);color:#fff}.guest-time-trial-dialog [data-guest-later]{border:1px solid var(--border);background:var(--background-soft);color:var(--text)}
#result-dialog .game-stats-panel{margin:14px 0;padding:12px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);text-align:left}
#result-dialog .game-stats-panel dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0}
#result-dialog .game-stats-panel div{min-width:0}
#result-dialog .game-stats-panel dt{color:var(--muted);font-size:11px;font-weight:800;line-height:1.2}
#result-dialog .game-stats-panel dd{margin:5px 0 0;font-size:18px;font-weight:900;font-variant-numeric:tabular-nums}
#entry-guide-dialog{width:min(calc(100vw - 32px),390px);margin:auto;padding:22px 20px 16px;border-radius:14px;background:rgba(255,255,255,.96);color:#1e2428;text-align:left;box-shadow:0 24px 56px rgba(21,29,34,.28);touch-action:pan-y}
#entry-guide-dialog::backdrop{background:rgba(21,29,34,.5);backdrop-filter:blur(3px)}
#entry-guide-dialog .entry-guide-close{position:absolute;top:10px;right:10px}
#entry-guide-dialog .entry-guide-heading{padding:2px 42px 0 0}
#entry-guide-dialog h2{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:9px;row-gap:1px;margin:0;font-size:24px;line-height:1.02}
#entry-guide-dialog h2 span[aria-hidden="true"]{grid-row:1/3;font-size:31px;line-height:1}
#entry-guide-dialog h2 span:not([aria-hidden]){font-weight:750}
#entry-guide-dialog h2 strong{font-size:28px;line-height:1;font-weight:900}
#entry-guide-dialog .entry-guide-mode{margin:10px 0 0;color:#1e2428;font-size:16px;font-weight:900;line-height:1.2;text-align:center}
#entry-guide-dialog .entry-guide-copy{margin-top:14px}
.game-header .athena-medallion-logo{display:grid;width:max-content;justify-self:start;justify-items:center;gap:3px}
.game-header .athena-medallion-logo img{display:block;width:58px;height:58px;object-fit:contain;border-radius:50%}
.game-header .athena-medallion-logo span{color:#1e2428;font-size:12px;font-weight:800;line-height:1;white-space:nowrap}

.game-header .athena-medallion-logo { justify-self:center; }
.game-athena-menu-trigger { position:relative; display:grid; justify-items:center; width:112px; min-width:0; padding:0; border:0; background:transparent; color:#59613a; cursor:pointer; }
.game-athena-menu-trigger > img { position:relative; z-index:1; width:58px; height:58px; margin-top:20px; object-fit:contain; border-radius:50%; transition:filter 160ms ease,transform 160ms ease; }
.game-athena-menu-trigger > span { position:relative; z-index:3; margin-top:15px; color:#1e2428; font-size:12px; font-weight:800; line-height:1; white-space:nowrap; }
.game-athena-menu-prompt { position:absolute; z-index:2; inset:0 auto auto 0; width:112px; height:112px; overflow:visible; pointer-events:none; }
.game-athena-menu-prompt text { fill:#59613a; stroke:#f5f1e8; stroke-width:1.25px; paint-order:stroke; font-family:Georgia,"Times New Roman",serif; font-size:10px; font-weight:700; letter-spacing:1px; }
.game-athena-menu-trigger:hover > img { filter:drop-shadow(0 3px 6px rgba(90,97,58,.3)); transform:scale(1.04); }
.game-athena-menu-trigger:active > img { transform:scale(.94); }
.game-athena-menu-trigger:focus-visible { outline:3px solid var(--amber); outline-offset:4px; border-radius:8px; }

.game-athena-menu { width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; background:var(--background); color:var(--text); }
.game-athena-menu::backdrop { background:rgba(30,36,40,.3); }
.game-athena-menu__shell { min-height:100%; padding:max(20px,env(safe-area-inset-top,0px)) 20px calc(28px + env(safe-area-inset-bottom,0px)); background:radial-gradient(circle at top,var(--background-soft),var(--background) 62%); }
.game-athena-menu__shell > header { display:flex; align-items:start; justify-content:space-between; gap:16px; width:min(100%,520px); margin:0 auto 28px; }
.game-athena-menu__shell h2 { margin:3px 0 0; font-size:clamp(28px,7vw,40px); line-height:1.05; }
.game-athena-menu__shell > header button { display:grid; place-items:center; flex:0 0 auto; width:44px; height:44px; padding:0; border:1px solid var(--border); border-radius:50%; background:var(--panel); color:var(--text); font:inherit; font-size:26px; cursor:pointer; }
.game-athena-menu__shell nav { display:grid; gap:8px; width:min(100%,520px); margin:0 auto; }
.game-athena-menu__shell nav a,.game-athena-menu__shell nav button { display:grid; grid-template-columns:48px minmax(0,1fr) 24px; align-items:center; min-height:52px; padding:8px 14px; border:1px solid var(--border); border-radius:8px; background:var(--panel); color:var(--text); font:inherit; font-weight:800; text-align:left; text-decoration:none; cursor:pointer; }
.game-athena-menu-icon { display:grid; place-items:center; width:48px; height:36px; font-size:21px; line-height:1; }
.game-athena-menu-icon img { display:block; width:34px; height:34px; object-fit:contain; }
.game-athena-menu-icon .statistics-bronze-bars-icon { width:42px; height:42px; transform:translateX(-3px); }
.game-athena-menu-title { min-width:0; }
.game-athena-menu-chevron { justify-self:end; color:#855d2e; font-size:22px; font-weight:400; line-height:1; }
.game-athena-menu__shell nav a:hover,.game-athena-menu__shell nav button:hover { border-color:var(--amber); background:var(--background-soft); }
@media (max-width:430px) { .game-athena-menu-trigger { width:96px; } .game-athena-menu-prompt { width:96px; height:96px; } .game-athena-menu-trigger > img { width:54px; height:54px; margin-top:17px; } .game-athena-menu-prompt text { font-size:9px; letter-spacing:.7px; } .game-athena-menu-trigger > span { font-size:11px; } }
@media (prefers-reduced-motion:reduce) { .game-athena-menu-trigger > img { transition:none; } }

.game-header { min-height:132px; align-items:start; }
.game-header > .icon-button,
.game-header > .header-meta { margin-top:18px; }
.game-header .game-athena-menu-trigger > span { font-size:clamp(1.2rem,5.4vw,1.65rem); }

/* Keep the product lockup visible in the shared game-screen header. */
.shared-game-screen .game-header {
  min-height: 88px;
  align-items: center;
}

.shared-game-screen .game-header .game-heading {
  display: grid;
  top: 6px;
  bottom: auto;
}

.shared-game-screen .game-header > .icon-button {
  margin-top: 12px;
}

@media (max-width: 430px) {
  .shared-game-screen .game-header { min-height: 84px; }
  .shared-game-screen .game-header .game-heading { top: 5px; }
  .shared-game-screen .game-header > .icon-button { margin-top: 11px; }
}

/* Product logo lockup shared with the Athena dashboard. */
.game-header {
  min-height: 88px;
  align-items: center;
}

.game-header .game-heading {
  top: 6px;
  bottom: auto;
}

.game-header .athena-medallion-logo {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.game-header .game-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.game-header .game-sixes-logo-frame {
  display: block;
  width: clamp(132px, 40vw, 172px);
  height: clamp(44px, 12vw, 54px);
  overflow: hidden;
}

.game-header .game-sixes-logo-frame img {
  display: block;
  width: 125%;
  max-width: none;
  height: auto;
  transform: translate(-10%, -36%);
}

.game-header .game-athena-menu-trigger {
  display: grid;
  place-items: center;
  width: clamp(36px, 10vw, 42px);
  min-width: 0;
  height: clamp(36px, 10vw, 42px);
  padding: 0;
  border: 0;
  background: transparent;
}

.game-header .game-athena-menu-trigger > img {
  width: 100%;
  height: 100%;
  margin: 0;
}

.game-header .sixes-product-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: .26em;
  color: var(--sixes-charcoal);
  line-height: .95;
  white-space: nowrap;
}

.game-header .sixes-product-wordmark__sixes {
  color: var(--sixes-charcoal);
  font-size: clamp(28px, 7.5vw, 36px);
  font-weight: 900;
  letter-spacing: 0;
}

.game-header .sixes-product-wordmark__athena {
  color: var(--athena-green);
  font-size: .53em;
  font-weight: 500;
  letter-spacing: 0;
}

.game-header .game-brand-subtitle {
  color: var(--muted);
  font-size: clamp(10px, 2.9vw, 12px);
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.game-header > .icon-button,
.game-header > .header-meta {
  margin-top: 12px;
}

@media (max-width: 430px) {
  .game-header { min-height: 84px; }
  .game-header .game-heading { top: 5px; }
  .game-header > .icon-button,
  .game-header > .header-meta { margin-top: 11px; }
}

body.shared-game-screen #keyboard .keyboard-row.control-row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;width:100%;overflow:hidden;white-space:nowrap;flex-wrap:nowrap;padding-bottom:env(safe-area-inset-bottom,0px)}

/* All play modes share one compact header flow; Time Trial alone fills the reserved timer row. */
.shared-game-screen .game-header{min-height:48px;margin-bottom:0;align-items:center}
.shared-game-screen .game-header>.icon-button,.shared-game-screen .game-header>.header-meta{margin-top:0}
.shared-game-screen .game-header>.header-meta,.shared-game-screen .game-header .game-heading,.shared-game-screen .game-guest-mode-badge{display:none}
.shared-game-screen .game-mode-heading{margin:0 0 8px;color:var(--athena-bronze-876c);font-family:Georgia,"Times New Roman",serif;font-size:clamp(25px,6.5vw,30px);font-weight:700;line-height:1.1;text-align:center}
.shared-game-screen .athena-bar{min-height:0;justify-content:center;margin:0 0 3px}
.shared-game-screen .athena-bar span{text-align:center;font-size:14px;font-weight:700}
.shared-game-screen .game-shell>.coin-display{justify-content:center;width:100%;max-width:none;margin:0 0 3px;font-size:14px;font-weight:800}
.shared-game-screen .game-shell>.coin-display .coin-display-icon{width:24px;height:24px}
.shared-game-screen .game-shell>.coin-display[hidden]{display:none!important}
.shared-game-screen .game-timer-slot{display:grid;place-items:center;height:31px;margin:0 0 7px}
.shared-game-screen .game-timer-slot .timer{font-weight:800}
.shared-game-screen .game-board{margin-top:0;margin-bottom:14px}
.shared-game-screen #keyboard .daily-bottom-control{display:grid;width:100%;height:46px;padding:5px 8px;border:1px solid rgba(140,98,57,.36);border-radius:10px;background:var(--athena-cream);color:var(--athena-green);box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 2px 4px rgba(40,30,20,.12);place-items:center}
.shared-game-screen #keyboard .daily-bottom-control--athena .vault-control-coin{width:34px;height:34px}
@media(max-width:430px){.shared-game-screen .game-shell{padding-top:10px}.shared-game-screen .game-mode-heading{margin-bottom:7px}.shared-game-screen .athena-bar{margin-bottom:3px}.shared-game-screen .game-shell>.coin-display{margin-bottom:3px}.shared-game-screen .game-timer-slot{height:31px;margin-bottom:6px}.shared-game-screen .game-board{margin-bottom:10px}}

/* One shared four-control action bar: layout, Athena menu, Hall of Fame, and voice. */
.shared-game-screen #keyboard .keyboard-row.control-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.shared-game-screen #keyboard .keyboard-row.control-row>.daily-bottom-control{height:46px;min-height:46px;min-width:0;padding:5px 6px;overflow:hidden;white-space:nowrap}
.shared-game-screen #keyboard .hall-of-fame-key{display:flex!important;align-items:center;justify-content:center;gap:5px;overflow:hidden;color:var(--athena-green)!important;font-family:inherit;font-size:12px;font-weight:800;line-height:1;white-space:nowrap}
.shared-game-screen #keyboard .hall-of-fame-key__icon{font-size:16px;line-height:1}
.shared-game-screen #keyboard .hall-of-fame-key__image{display:block;width:34px;height:34px;max-width:calc(100% - 12px);max-height:calc(100% - 12px);margin:0;padding:0;object-fit:contain;object-position:center;pointer-events:none;transform:none}
.shared-game-screen #keyboard .daily-bottom-control--soon{align-content:center;gap:1px;color:var(--muted);opacity:.76}
.shared-game-screen #keyboard .daily-bottom-control--soon small{font-size:9px;font-weight:800;letter-spacing:.25px;line-height:1}
.shared-game-screen #keyboard .daily-bottom-control__icon{display:block;width:28px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.shared-game-screen #keyboard .daily-bottom-control__icon--layout text{fill:currentColor;stroke:none;font-family:inherit;font-size:6px;font-weight:800;text-anchor:middle}
@media(max-width:380px){.shared-game-screen #keyboard .keyboard-row.control-row{gap:5px}.shared-game-screen #keyboard .hall-of-fame-key{gap:3px;font-size:11px}.shared-game-screen #keyboard .hall-of-fame-key__icon{font-size:14px}}

/* The shared toolbar never gains a fourth slot or shortens on compact viewports. */
body.shared-game-screen #keyboard .keyboard-row.control-row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;width:100%;overflow:hidden;white-space:nowrap;flex-wrap:nowrap;padding-bottom:env(safe-area-inset-bottom,0px)}
body.shared-game-screen #keyboard .keyboard-row.control-row>.key{display:grid!important;place-items:center;width:100%;height:46px!important;min-height:46px!important;min-width:0!important;padding:5px 6px;overflow:hidden;white-space:nowrap}
body.shared-game-screen #keyboard .keyboard-row.control-row>.daily-bottom-control--athena{display:flex!important;align-items:center;justify-content:center;gap:5px}
body.shared-game-screen #keyboard .daily-bottom-control--athena .vault-control-coin{width:24px;height:24px;flex:0 0 24px}
body.shared-game-screen #keyboard .daily-bottom-control__label{font-size:11px;font-weight:800;line-height:1;white-space:nowrap}
@media(max-width:380px){body.shared-game-screen #keyboard .keyboard-row.control-row{gap:6px!important}body.shared-game-screen #keyboard .keyboard-row.control-row>.key{padding-inline:4px}}

/* Daily Classic action keys use the same calm key treatment as the letter rows. */
.daily-classic-screen .keyboard .key.enter-key,.daily-classic-screen .keyboard .key.backspace-key{border:1px solid rgba(140,98,57,.36);border-radius:10px;background:var(--athena-cream);color:var(--athena-green);box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 2px 4px rgba(40,30,20,.12);font-weight:800}
.daily-classic-screen #keyboard .key.enter-key{font-size:24px!important;letter-spacing:0;line-height:1}
.daily-classic-screen .keyboard .key.backspace-key{font-size:25px;line-height:1}
.daily-classic-screen #keyboard .key.backspace-key{border-color:rgba(140,98,57,.36)!important;background:var(--athena-cream)!important;color:var(--athena-green)!important;font-size:25px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 2px 4px rgba(40,30,20,.12)!important}

/* Daily Classic utility controls share one calm, touch-friendly treatment. */
.daily-classic-screen #keyboard .daily-bottom-control{display:grid;width:100%;height:46px;padding:5px 8px;border:1px solid rgba(140,98,57,.36);border-radius:10px;background:var(--athena-cream);color:var(--athena-green);box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 2px 4px rgba(40,30,20,.12);place-items:center;transition:background-color .16s ease,box-shadow .16s ease,transform .1s ease}
.daily-classic-screen #keyboard .daily-bottom-control__icon{display:block;width:28px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.daily-classic-screen #keyboard .daily-bottom-control__icon--layout text{fill:currentColor;stroke:none;font-family:inherit;font-size:6px;font-weight:800;text-anchor:middle}
.daily-classic-screen #keyboard .daily-bottom-control--athena .vault-control-coin{width:34px;height:34px}
.daily-classic-screen #keyboard .daily-bottom-control--soon{align-content:center;gap:1px;color:var(--muted);opacity:.76}
.daily-classic-screen #keyboard .daily-bottom-control--soon small{font-size:9px;font-weight:800;letter-spacing:.25px;line-height:1}
.daily-classic-screen #keyboard .daily-bottom-control:hover{background:var(--panel);box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 3px 6px rgba(40,30,20,.15)}
.daily-classic-screen #keyboard .daily-bottom-control:active{transform:translateY(1px);box-shadow:inset 0 1px 2px rgba(40,30,20,.14)}
.daily-classic-screen #keyboard .daily-bottom-control:focus-visible{outline:3px solid var(--amber);outline-offset:2px}

/* Daily Classic keeps the interface focused on the board and its single title. */
.daily-classic-screen .coin-display[hidden]{display:none!important}
.daily-classic-screen .game-header{min-height:48px;margin-bottom:0;align-items:center}
.daily-classic-screen .game-header>.icon-button,.daily-classic-screen .game-header>.header-meta{margin-top:0}
.daily-classic-screen .game-header>.header-meta{display:none}
.daily-classic-screen .game-header .game-heading,.daily-classic-screen .game-guest-mode-badge{display:none}
.daily-classic-screen .game-mode-heading{margin:0 0 8px;font-size:clamp(25px,6.5vw,30px)}
.daily-classic-screen .athena-bar{min-height:0;justify-content:center;margin:0 0 3px}
.daily-classic-screen .athena-bar span{text-align:center;font-size:14px;font-weight:700}
.daily-classic-screen .game-shell>.coin-display{justify-content:center;width:100%;max-width:none;margin:0 0 10px;font-size:14px;font-weight:800}
.daily-classic-screen .game-shell>.coin-display .coin-display-icon{width:24px;height:24px}
.daily-classic-screen .game-board{margin-top:0;margin-bottom:14px}
.daily-classic-screen .keyboard-row.control-row .key:nth-child(2){border-color:var(--amber);background:var(--background-soft)}
@media(max-width:430px){.daily-classic-screen .game-shell{padding-top:10px}.daily-classic-screen .game-mode-heading{margin-bottom:7px}.daily-classic-screen .athena-bar{margin-bottom:3px}.daily-classic-screen .game-shell>.coin-display{margin-bottom:9px}.daily-classic-screen .game-board{margin-bottom:10px}}
.game-athena-menu-trigger { width:max-content; min-width:112px; }
.game-athena-menu-prompt { inset:0 auto auto 50%; transform:translateX(calc(-50% - 3px)); }
@media (max-width:430px) { .game-header { min-height:120px; } .game-header > .icon-button,.game-header > .header-meta { margin-top:14px; } }
.game-mode-heading{margin:0 0 22px;color:#1e2428;font-size:28px;font-weight:900;line-height:1.1;text-align:center}
.raised-game-mode-heading{transform:translateY(-14px)}
@media(max-width:600px){.raised-game-mode-heading{transform:translateY(0)}}
@media(min-width:601px){body:has(.raised-game-mode-heading) #game-status,body:has(.raised-game-mode-heading) #revealed-letter-status{transform:translateY(11px)}}
#entry-guide-dialog .entry-guide-copy p{margin:0 0 10px;font-weight:700;line-height:1.4}
#entry-guide-dialog .entry-guide-copy .hall-of-fame-guidance{display:block;width:fit-content;margin:20px auto 0;padding:9px 12px;border-radius:6px;background:#1e2428;color:#fff;text-align:center;text-decoration:none;text-transform:uppercase;letter-spacing:.6px;font-size:12px;font-weight:900}
#entry-guide-dialog .entry-guide-copy .hall-of-fame-guidance:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
#entry-guide-dialog .entry-guide-copy p:last-child{text-align:center}
#entry-guide-dialog .entry-guide-copy .entry-guide-secondary{margin:12px 0 0;color:#6f777c;font-size:13px;font-weight:700}
#entry-guide-dialog .entry-guide-dismiss{margin:14px 0 0;color:#1e2428;font-size:12px;font-weight:800;text-align:center}
#entry-guide-dialog .entry-guide-desktop{display:none}
@media (min-width:601px){#entry-guide-dialog .entry-guide-mobile{display:none}#entry-guide-dialog .entry-guide-desktop{display:inline}}
@media (max-width:360px){#entry-guide-dialog{width:calc(100vw - 20px);padding:18px 16px 14px}#entry-guide-dialog h2{font-size:22px}#entry-guide-dialog .entry-guide-copy p{font-size:14px}}
#entry-guide-dialog{padding:24px 22px 18px;border-color:#e5d9bd;background:linear-gradient(145deg,#fffdf8 0%,#f7f2e6 100%)}
#entry-guide-dialog .entry-guide-heading{padding-bottom:14px;border-bottom:1px solid rgba(137,99,41,.2)}
#entry-guide-dialog h2{column-gap:10px;letter-spacing:0}
#entry-guide-dialog h2 span:not([aria-hidden]){font-family:Georgia,"Times New Roman",serif;font-size:23px;font-weight:400;letter-spacing:0}
#entry-guide-dialog h2 strong{font-family:Georgia,"Times New Roman",serif;font-weight:600}
#entry-guide-dialog .entry-guide-mode{margin-top:11px;color:#7a5b2d;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
#entry-guide-dialog .entry-guide-copy{display:grid;gap:12px;margin-top:17px}
#entry-guide-dialog .entry-guide-copy p{display:grid;grid-template-columns:21px minmax(0,1fr);gap:9px;align-items:start;margin:0;color:#364046;font-family:Georgia,"Times New Roman",serif;font-size:16px;font-weight:400;line-height:1.52}
#entry-guide-dialog .entry-guide-copy .entry-guide-bullet{display:block;width:7px;height:7px;margin:9px 0 0 7px;border-radius:50%;background:#8c6239}
#entry-guide-dialog .entry-guide-copy .entry-guide-secondary{padding-top:11px;border-top:1px solid rgba(137,99,41,.16);color:#6d7476;font-size:14px;line-height:1.42}
#entry-guide-dialog .entry-guide-copy p:last-child{text-align:left}
#entry-guide-dialog .entry-guide-dismiss{margin-top:17px;color:#7b715f;font-size:11px;font-weight:700;letter-spacing:.02em}
#entry-guide-dialog .entry-guide-copy .hall-of-fame-guidance{display:grid;grid-template-columns:21px minmax(0,1fr);gap:9px;align-items:center;width:100%;margin:0;padding:11px 12px;border:1px solid rgba(185,140,53,.45);border-radius:8px;background:#f7ecd4;color:#694d25;font-family:Georgia,"Times New Roman",serif;font-size:15px;font-weight:600;letter-spacing:0;line-height:1.3;text-align:left;text-decoration:none;text-transform:none}
#entry-guide-dialog .entry-guide-copy .hall-of-fame-guidance::before{content:"";display:block;width:7px;height:7px;margin-left:7px;border-radius:50%;background:#8c6239}
#entry-guide-dialog .entry-guide-copy .hall-of-fame-guidance:focus-visible{outline:3px solid var(--amber);outline-offset:3px}
@media (max-width:360px){#entry-guide-dialog .entry-guide-copy{gap:10px}#entry-guide-dialog .entry-guide-copy p{grid-template-columns:19px minmax(0,1fr);gap:8px;font-size:14px}#entry-guide-dialog .entry-guide-copy .entry-guide-bullet{width:6px;height:6px;margin:8px 0 0 6px}}
#share-results span[aria-hidden="true"]{font-size:18px;line-height:1}
.share-copy-dialog{width:min(92vw,480px)}.share-copy-dialog textarea{width:100%;min-height:210px;margin:8px 0 16px;resize:vertical;border:1px solid var(--border);border-radius:8px;background:var(--background-soft);color:var(--text);font:600 13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;padding:12px}.share-toast{position:fixed;z-index:20;right:18px;bottom:calc(env(safe-area-inset-bottom,0px) + 18px);max-width:calc(100vw - 36px);padding:12px 16px;border-radius:8px;background:#1e2428;color:#fff;font-weight:800;box-shadow:0 10px 24px rgba(0,0,0,.22)}
#result-dialog [hidden]{display:none!important}
#result-dialog .result-actions>#play-again[hidden]{display:none!important}
.confetti{z-index:30}
.coin-display-icon,.vault-control-coin{border-radius:50%}
.coin-cascade-piece{position:absolute;top:-56px;z-index:1;width:clamp(32px,8vw,48px)!important;height:auto!important;max-width:none!important;filter:drop-shadow(0 5px 5px rgba(30,36,40,.25));animation:athena-coin-cascade 2.55s cubic-bezier(.2,.65,.35,1) forwards;will-change:transform,opacity}
@keyframes athena-coin-cascade{0%{opacity:0;transform:translate3d(0,-42px,0) rotate(0)}10%{opacity:1}84%{opacity:1}100%{opacity:0;transform:translate3d(var(--drift),110dvh,0) rotate(var(--spin))}}

@media (max-width:600px){
  html,body{box-sizing:border-box;max-width:100%;overflow-x:hidden}
  .game-shell{width:100%;max-width:100%;padding:12px 12px calc(16px + env(safe-area-inset-bottom));overflow-x:hidden}
  .game-board{width:100%;max-width:100%;gap:4px;margin:0 auto 14px}
  .game-row{width:100%;max-width:100%;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}
  .tile{width:100%;height:auto;aspect-ratio:1/1;min-width:0;min-height:0}
  .keyboard{width:100%;max-width:100%;margin:0 auto;padding:0;gap:6px;box-sizing:border-box}
  .keyboard-row{width:100%;max-width:100%;display:flex;flex-wrap:nowrap;justify-content:center;gap:4px;box-sizing:border-box}
  .keyboard-row:not(.control-row) .key{min-width:0;flex:1 1 0;height:48px;padding:0 4px;font-size:13px}
  .keyboard-row:not(.control-row) .key.wide{flex:1.3 1 0;font-size:12px;white-space:nowrap;word-break:normal}
  .keyboard-row.control-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .keyboard-row.control-row .key{height:46px;min-width:0}
  #result-dialog{width:min(calc(100vw - 24px),360px);max-width:calc(100vw - 24px);padding:22px 16px 16px}
  #result-dialog #result-copy{margin:12px 0 18px;line-height:1.45;text-align:center}
  #result-dialog #result-copy .result-word{display:block;margin:8px 0 10px;font-size:clamp(30px,10vw,40px);font-weight:900;line-height:1.05;text-align:center}
  #result-dialog #result-copy .result-guesses{display:block;margin-top:10px;line-height:1.35;text-align:center}
  #result-dialog .result-actions{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:9px}
  #result-dialog .result-actions>a,#result-dialog .result-actions>button{width:100%;min-width:0;min-height:46px;white-space:nowrap;word-break:normal}
  #result-dialog .result-close{top:8px;right:8px}
}

@media (max-width:600px){
  #keyboard .keyboard-row:not(.control-row)>.key{flex:1 1 0!important;width:0;min-width:0}
  #keyboard .keyboard-row:not(.control-row)>.key.wide{flex:1.3 1 0!important;width:0}
  #keyboard .keyboard-row.control-row>.key{display:grid;width:100%;min-width:0;place-items:center}
  #result-dialog #result-copy .result-word,#result-dialog #result-copy .result-guesses{display:block!important}
  #result-dialog .result-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%;gap:9px}
  #result-dialog .result-actions>a,#result-dialog .result-actions>button{display:grid!important;width:100%!important;height:46px!important;min-height:46px!important;min-width:0;place-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}
  #result-dialog .result-actions>#game-stats[aria-label="View Athena's Wisdom"]{height:46px!important;min-height:46px!important;padding:5px 8px;font-size:11px;line-height:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important}
}

@media (max-width:430px){
  #result-dialog .result-actions>a,#result-dialog .result-actions>button{font-size:13px}
}

@media (max-width:600px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .game-shell{width:100%;max-width:100%;box-sizing:border-box;overscroll-behavior:none}
  .game-shell button,.panel-dialog button,#result-dialog a{touch-action:manipulation}
  #keyboard .key{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
  #keyboard .key:active{transform:scale(.97)}
  #keyboard .key:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
  .game-shell input,.game-shell textarea,.game-shell select{font-size:16px}
}

/* Evaluation shine is color-neutral; state colors come from state-system.css. */
.tile.correct,.tile.present{position:relative;overflow:hidden}
.game-board .tile.correct,.game-board .tile.correct.locked{outline:none;box-shadow:none}

html,body,.game-shell{color-scheme:light;forced-color-adjust:none}
html,body{background:#f5f1e8!important;color:#1e2428!important}
.game-board{background:#f5f1e8!important;opacity:1}
.game-board .tile:not(.filled):not(.correct):not(.present):not(.absent){display:grid!important;background:#cfc7b6!important;border-color:#cfc7b6!important;color:#22272b!important;opacity:1!important;visibility:visible!important;filter:none!important}
.game-board .tile:not(.filled):not(.correct):not(.present):not(.absent)::before{background:#f8f4e8!important;opacity:1!important;visibility:visible!important;display:block!important;filter:none!important;mix-blend-mode:normal!important}
.tile.correct::after,.tile.present::after{content:"";position:absolute;inset:-65% -85%;pointer-events:none;opacity:0;background:linear-gradient(125deg,transparent 43%,rgba(255,255,255,.08) 47%,rgba(255,255,255,.52) 50%,rgba(255,255,255,.08) 53%,transparent 57%)}
.tile.correct.flip::after,.tile.present.flip::after{animation:gemstone-shine .3s ease-out .32s forwards}
@keyframes gemstone-shine{0%{transform:translateX(-42%);opacity:0}15%{opacity:1}100%{transform:translateX(42%);opacity:0}}
@media (prefers-reduced-motion:reduce){.tile.correct.flip::after,.tile.present.flip::after{animation:none}}

/* Circular board refresh: geometry only; tile state colors and flip timing stay unchanged. */
:root{--hex-gap:clamp(5px,1.8vw,10px)!important;--hex-size:min(66px,calc((100vw - 30px - (5 * var(--hex-gap)))/6))!important}
.game-board{max-width:500px;gap:var(--hex-gap)!important}
.game-board .game-row{--hex-size:min(66px,calc((100vw - 30px - (5 * var(--hex-gap)))/6))!important;gap:var(--hex-gap)!important}
.game-board .tile{--hex-size:min(66px,calc((100vw - 30px - (5 * var(--hex-gap)))/6))!important;border:2px solid var(--border)!important;border-radius:50%!important;clip-path:none!important;overflow:hidden!important;box-shadow:0 2px 5px rgba(30,36,40,.18),inset 0 1px 0 rgba(255,255,255,.18)}
.game-board .tile::before,.game-board .tile::after{border-radius:50%!important;clip-path:none!important}
.game-board .tile.correct,.game-board .tile.present,.game-board .tile.absent{border-width:2px!important;box-shadow:none}
.game-board .tile.correct,.game-board .tile.correct.locked{border-color:var(--sixes-green)!important;box-shadow:none!important}
.game-board .tile.selected{outline:3px solid var(--amber);outline-offset:-5px;box-shadow:0 0 0 3px rgba(201,163,74,.25),0 2px 5px rgba(30,36,40,.18),inset 0 1px 0 rgba(255,255,255,.18)}
.game-board .tile[role="button"]{cursor:pointer}
.game-board .tile[role="button"]:focus-visible{outline:3px solid var(--athena-emerald);outline-offset:-5px}
.keyboard .key{border-radius:14px;border-width:2px;box-shadow:0 1px 3px rgba(30,36,40,.12)}
.keyboard .key.wide{border-radius:13px}
.key.backspace-key .bronze-laurel-arrow{display:block;width:clamp(34px,10vw,46px);height:auto;max-height:27px}
@media (max-width:600px){.game-board{max-width:100%;gap:clamp(4px,1.5vw,6px)!important}.game-row{gap:clamp(4px,1.5vw,6px)!important}.keyboard .key{border-radius:12px}}

@media (min-width:601px){
  .game-shell{--play-area-width:min(100%,580px)}
  #game-board,.keyboard{width:var(--play-area-width)!important;max-width:var(--play-area-width)!important}
  .game-board .game-row{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:clamp(10px,1.5vw,18px)!important}
  .game-board .tile{width:100%!important;height:auto!important;aspect-ratio:1/1!important}
}

@media (orientation:landscape) and (max-height:500px){
  .game-shell{padding:6px 12px calc(env(safe-area-inset-bottom,0px) + 6px)}
  .game-header{margin-bottom:4px}.athena-bar{min-height:30px;margin-bottom:4px}
  .game-board{width:min(220px,calc(100dvh - 200px));max-width:100%;margin-bottom:4px;gap:2px!important}
  .game-board .game-row{gap:2px!important}.game-board .tile{font-size:clamp(16px,3vw,24px);border-radius:8px}
  .keyboard{max-width:500px;gap:3px}.keyboard-row{gap:3px}.keyboard-row:not(.control-row) .key{height:32px;font-size:12px}.keyboard-row.control-row{gap:5px}.keyboard-row.control-row .key{height:34px}.key.wide{font-size:11px}
}

/* Shared Daily Classic and Daily Time Trial presentation layer. */
:root{--athena-bronze:#8c6239;--athena-bronze-light:#c89b5b;--athena-bronze-dark:#5e3e24;--athena-cream:#fbf7ee;--athena-green:var(--green);--athena-border:var(--border)}
.game-header{grid-template-columns:48px minmax(0,1fr) auto;gap:8px;margin-bottom:10px}.game-heading{min-width:0;justify-self:center;text-align:center}.header-meta{min-width:0}.coin-display{max-width:min(34vw,168px);font-variant-numeric:tabular-nums;overflow:hidden}.coin-display strong{overflow:hidden;text-overflow:ellipsis}.game-guest-mode-badge{margin:0 0 9px;justify-self:start}.athena-bar{min-height:38px;margin-bottom:5px;justify-content:flex-start}.athena-bar span{color:var(--athena-green);font-weight:700;text-align:left}.game-mode-heading{margin:0 0 14px;color:var(--athena-green);font-size:clamp(22px,6vw,28px);font-weight:900;line-height:1.15;text-align:center}.raised-game-mode-heading{transform:none}
.game-board .tile:not(.filled):not(.correct):not(.present):not(.absent){background:var(--athena-cream)!important;border:2px solid rgba(140,98,57,.72)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.75),0 2px 5px rgba(40,30,20,.12)!important}.game-board .tile:not(.filled):not(.correct):not(.present):not(.absent)::before{background:linear-gradient(180deg,rgba(255,255,255,.42),rgba(255,255,255,0) 34%)!important}.keyboard .key:not(.correct):not(.present):not(.absent){border:1px solid rgba(140,98,57,.28);background:var(--athena-cream);color:var(--athena-green);box-shadow:0 2px 4px rgba(40,30,20,.1)}.keyboard .key:focus-visible{outline:3px solid var(--athena-bronze-light);outline-offset:2px}.keyboard .key.control-key{min-height:46px;border-color:rgba(140,98,57,.4)}
@media (max-width:430px){.game-header{grid-template-columns:44px minmax(0,1fr) auto}.game-guest-mode-badge{margin-bottom:7px}.athena-bar{min-height:32px}.game-mode-heading{margin-bottom:10px;font-size:clamp(21px,6vw,25px)}}

/* Premium Athena refinements shared by Daily Classic and Daily Time Trial. */
.game-shell{background:linear-gradient(180deg,#fffdf7 0%,var(--athena-cream) 100%)}.game-header{position:relative;min-height:75px;grid-template-columns:44px 1fr auto;align-items:center}.game-header .game-heading{position:absolute;top:0;bottom:0;left:50%;display:grid;align-content:center;justify-items:center;transform:translateX(-50%);white-space:nowrap}.game-header .athena-medallion-logo img{width:60px;height:60px}.game-header .athena-medallion-logo span{font-size:12px;letter-spacing:.01em}.header-meta{position:relative;z-index:1;align-self:center}.coin-display{color:var(--text);font-weight:800}.game-guest-mode-badge{margin-bottom:5px;padding:6px 11px;gap:6px;font-size:10.5px;box-shadow:inset 0 1px 0 rgba(255,255,255,.24),inset 0 -2px 0 rgba(94,62,36,.9),0 3px 8px rgba(40,30,20,.2)}.athena-bar{min-height:32px;margin-bottom:3px}.athena-bar span{font-size:13px;font-weight:700}.game-mode-heading{display:flex;align-items:center;justify-content:center;gap:clamp(8px,3vw,18px);width:100%;margin:0 0 11px;color:var(--athena-green);font-family:Georgia,"Times New Roman",serif;font-size:clamp(24px,6.4vw,30px);font-weight:700;letter-spacing:0;line-height:1.1;white-space:nowrap}.game-mode-heading::before,.game-mode-heading::after{content:"";display:block;flex:1 1 28px;max-width:76px;height:1px;background:linear-gradient(90deg,transparent,var(--athena-bronze-light))}.game-mode-heading::after{background:linear-gradient(90deg,var(--athena-bronze-light),transparent)}
.game-board .tile:not(.filled):not(.correct):not(.present):not(.absent){border-color:rgba(140,98,57,.82)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 2px 5px rgba(40,30,20,.15)!important}.keyboard .key:not(.correct):not(.present):not(.absent){border-color:rgba(140,98,57,.36);box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 2px 4px rgba(40,30,20,.12)}.keyboard-row.control-row .key{border-color:rgba(140,98,57,.42);box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 2px 4px rgba(40,30,20,.12)}
@media (max-width:430px){.game-header{min-height:73px}.game-header .athena-medallion-logo img{width:58px;height:58px}.game-guest-mode-badge{margin-bottom:4px}.athena-bar{margin-bottom:2px}.game-mode-heading{gap:clamp(6px,2.5vw,10px);margin-bottom:9px;font-size:clamp(23px,6.2vw,27px)}.game-mode-heading::before,.game-mode-heading::after{flex-basis:18px;max-width:42px}}

.game-header { min-height:132px; align-items:start; }
.game-header .game-heading { z-index:2; top:4px; bottom:auto; }
.game-athena-menu-trigger { height:124px; }
.game-header > .icon-button,
.game-header > .header-meta { margin-top:18px; }
@media (max-width:430px) { .game-header { min-height:120px; } .game-header .game-heading { top:2px; } .game-athena-menu-trigger { height:114px; } .game-header > .icon-button,.game-header > .header-meta { margin-top:14px; } }

/* Bronze Pantone 876 C distinguishes the two daily challenges from Practice. */
:root{--athena-bronze-876c:#8c6239}
.game-mode-heading.daily-challenge-heading{color:var(--athena-bronze-876c)}

/* Shared header rows remain in document flow, so status and balance can never overlap. */
.shared-game-screen .game-shell{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;justify-items:stretch}
.shared-game-screen .game-mode-heading{height:34px!important;min-height:34px;margin:0 0 7px;transform:none!important;flex-wrap:nowrap;white-space:nowrap}
.shared-game-screen .athena-bar{display:flex;min-height:17px;margin:0 0 7px}
.shared-game-screen #game-status,.shared-game-screen #revealed-letter-status{transform:none!important}
.shared-game-screen .game-shell>.coin-display{margin:0 0 20px}
.shared-game-screen .game-timer-slot{display:none}
.shared-game-screen .game-timer-slot.has-timer{display:grid;height:31px;margin:0 0 20px}
.shared-game-screen .game-timer-slot.has-timer~.game-board{margin-top:0}
.shared-game-screen .game-board,.shared-game-screen .keyboard{width:min(100%,580px)!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box}
.shared-game-screen .game-board .game-row{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.shared-game-screen .game-board .tile{min-width:0;max-width:100%}
.shared-game-screen .game-board{background:transparent!important;border:0!important;box-shadow:none!important}
.shared-game-screen #keyboard .key.enter-key,.shared-game-screen #keyboard .key.backspace-key{border:1px solid rgba(140,98,57,.36);border-radius:10px;background:var(--athena-cream);color:var(--athena-green);box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 2px 4px rgba(40,30,20,.12);font-weight:800}
.shared-game-screen #keyboard .key.enter-key{font-size:24px!important;letter-spacing:0;line-height:1}
.shared-game-screen #keyboard .key.backspace-key{font-size:25px!important;line-height:1}
.shared-game-screen #keyboard .key.backspace-key{border-color:rgba(140,98,57,.36)!important;background:var(--athena-cream)!important;color:var(--text)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 2px 4px rgba(40,30,20,.12)!important}
.shared-game-screen #keyboard .key.backspace-key .bronze-laurel-arrow{filter:none!important}
.shared-game-screen .game-board .tile.correct,.shared-game-screen .game-board .tile.correct.locked{color:var(--sixes-white)!important}
.shared-game-screen .game-board .tile.present{color:var(--sixes-charcoal)!important}

.game-header .game-athena-menu-trigger > span { font-size:clamp(1.2rem,5.4vw,1.65rem); }
.game-header .athena-medallion-logo .game-brand-subtitle{color:var(--muted);font-size:clamp(10px,2.9vw,12px);font-weight:400;letter-spacing:0;line-height:1.2;white-space:nowrap;transform:translateX(calc((clamp(30px,8vw,38px) + 7px)/2))}

/* Preserve one shared Home control while the legacy header remains hidden. */
.shared-game-screen .game-header{position:relative;display:grid;min-height:64px;margin-bottom:8px;grid-template-columns:1fr;align-items:start}
.shared-game-screen .game-header .game-heading{display:none}
.shared-game-screen .game-home-button{position:absolute;z-index:10;top:calc(8px + env(safe-area-inset-top));left:calc(12px + env(safe-area-inset-left));display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid rgba(85,75,56,.22);border-radius:50%;background:rgba(255,253,247,.96);box-shadow:0 2px 6px rgba(40,30,20,.16);color:var(--sixes-charcoal);font-size:26px;font-weight:700;line-height:1;text-decoration:none;transition:background-color .16s ease,box-shadow .16s ease,transform .1s ease}.shared-game-screen .game-home-button:hover{background:var(--sixes-white);box-shadow:0 4px 10px rgba(40,30,20,.2)}.shared-game-screen .game-home-button:active{box-shadow:inset 0 1px 2px rgba(40,30,20,.18);transform:translateY(1px)}.shared-game-screen .game-home-button:focus-visible{outline:3px solid var(--amber);outline-offset:3px}
.game-header .athena-medallion-logo .game-athena-menu-trigger{width:clamp(30px,8vw,38px);height:clamp(30px,8vw,38px)}
.game-header .athena-medallion-logo .sixes-product-wordmark__athena{color:var(--athena-green);font-size:clamp(14px,3.8vw,18px);font-weight:500;font-style:italic;letter-spacing:0}
.game-athena-menu-trigger,.game-athena-menu-prompt text{color:var(--athena-green);fill:var(--athena-green)}
.tile.locked{outline-color:color-mix(in srgb,var(--athena-green) 28%,transparent)}
@media(max-width:430px){.shared-game-screen .game-header{min-height:64px;margin-bottom:8px}.shared-game-screen .game-home-button{top:calc(8px + env(safe-area-inset-top));left:calc(10px + env(safe-area-inset-left))}}






