:root{--bg:#130b18;--panel:#1d1324;--ink:#f7f1ff;--muted:#a797b3;--pink:#ff3c93;--acid:#d8ff31;--cyan:#41e8ff;--bad:#ff5959;--good:#65f59a;--gold:#f3d56d}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 20% 0,#3a1647 0,transparent 35%),linear-gradient(#100814,#160d1b);color:var(--ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;min-height:100vh}
button,input{font:inherit}.wrap{width:min(900px,100%);margin:auto;padding:12px}.top{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:8px 3px 14px}.brand{font:1000 clamp(32px,7vw,64px)/.78 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;letter-spacing:-4px}.brand span{color:var(--pink);text-shadow:3px 3px 0 var(--acid)}.kicker{text-align:right;color:var(--acid);font:900 9px/1.4 Arial;letter-spacing:1.4px}.top-actions{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap;margin-top:8px}.top-actions a,.top-actions button{border:1px solid #6c5877;background:#24172c;color:#fff;padding:7px 9px;border-radius:999px;text-decoration:none;font:900 8px Arial;letter-spacing:.6px;cursor:pointer}.top-actions .worddecks{background:var(--acid);color:#151018;border-color:var(--acid)}
.hud{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-bottom:8px}.hud div{background:var(--panel);border:1px solid #493555;border-radius:9px;padding:8px 10px}.hud small{display:block;color:var(--muted);font:900 8px Arial;letter-spacing:1px}.hud b{font:1000 19px Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}.danger{color:var(--pink)}
.event{background:linear-gradient(135deg,#281831,#1b1121);border:2px solid #513c5c;border-left:7px solid var(--pink);padding:12px 14px;border-radius:10px}.eventLabel{font:900 8px Arial;color:var(--pink);letter-spacing:1.5px}.eventName{font:1000 clamp(22px,5vw,34px) Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;letter-spacing:-1px;margin-top:3px}.eventDesc{font:800 12px/1.4 Arial;color:#e5dce9}.eventBonus{color:var(--acid);font:900 10px Arial;margin-top:5px}.owned{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}.owned span{background:#281d31;border:1px solid #513d60;border-radius:999px;padding:4px 7px;font:900 8px Arial;color:var(--cyan)}
.timer{height:9px;background:#2c2033;border-radius:999px;margin:9px 0;overflow:hidden}.timer i{display:block;height:100%;background:linear-gradient(90deg,var(--acid),var(--pink));width:100%;transition:.2s linear}
.panel{background:var(--panel);border:1px solid #493555;border-radius:12px;padding:12px}.tiles{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));gap:5px}.tile{aspect-ratio:.74;border:0;border-radius:7px;background:#f7efd8;color:#201724;box-shadow:0 4px 0 #9c855b;font:1000 clamp(20px,4vw,36px) Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;position:relative;cursor:pointer}.tile .val{position:absolute;right:5px;bottom:4px;font:900 8px Arial}.tile.selected{outline:4px solid var(--cyan);transform:translateY(-3px)}.tile.used{opacity:.16;transform:none}.tile.hot{background:#ffec72;box-shadow:0 4px 0 var(--pink),0 0 20px #ffec7266}.tile.hot:before{content:"🔥";position:absolute;left:3px;top:2px;font-size:11px}
.wordbox{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:12px}.wordbox input{min-width:0;background:#0f0913;color:#fff;border:2px solid #5c4668;border-radius:8px;padding:12px;font:1000 18px Arial;letter-spacing:2px}.btn{border:0;border-radius:8px;padding:11px 14px;background:var(--acid);color:#171019;font:1000 12px Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;cursor:pointer}.btn.secondary{background:#43324d;color:#fff}.btn.pink{background:var(--pink);color:#fff}.btn.cyan{background:var(--cyan);color:#171019}.btn:disabled{opacity:.3;cursor:not-allowed}.msg{min-height:31px;padding:9px 3px 0;font:800 11px Arial;color:var(--muted)}.msg.bad{color:var(--bad)}.msg.good{color:var(--good)}
.words{display:grid;gap:6px;margin-top:8px}.word{display:flex;justify-content:space-between;gap:8px;align-items:center;background:#160d1b;border:1px solid #44324e;border-radius:8px;padding:8px 10px}.word strong{font:1000 17px Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}.word .score{font:1000 20px Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--acid)}.bonusPass{background:var(--pink);padding:3px 5px;border-radius:4px;margin-left:7px;font:900 7px Arial}.footerControls{display:flex;justify-content:space-between;gap:7px;flex-wrap:wrap;margin-top:10px}.note{color:#8f7e99;font:700 9px/1.4 Arial;margin:8px 2px}.dictionary{display:flex;gap:7px;align-items:center;color:#a99ab1;font:800 9px Arial;margin:7px 2px}.dictionary i{width:8px;height:8px;border-radius:50%;background:#777;display:inline-block}.dictionary.ready i{background:var(--good)}.dictionary.bad i{background:var(--bad)}
.overlay{position:fixed;inset:0;background:#0d0710ed;display:none;place-items:center;padding:18px;z-index:30}.overlay.show{display:grid}.modal{width:min(620px,100%);max-height:92vh;overflow:auto;background:#170f1c;border:2px solid #54405e;border-radius:15px;padding:20px;text-align:center;box-shadow:0 18px 70px #0008}.modal h1{font:1000 clamp(35px,8vw,58px)/.88 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;margin:0 0 10px;text-transform:uppercase}.modal .big{font:1000 68px/1 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--acid)}.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin:14px 0}.grid div{background:#21172a;border-radius:9px;padding:9px}.grid small{display:block;color:var(--muted);font-size:9px}.grid b{font-size:20px}.marketTitle{color:var(--acid);text-shadow:3px 3px 0 var(--pink)}.marketIntro{color:var(--muted);margin:0 0 14px}.upgradeGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0}.upgradeCard{position:relative;text-align:left;background:linear-gradient(160deg,#fff4d5,#f0d995);color:#211b16;border:0;border-radius:13px;padding:15px 13px 13px;min-height:190px;cursor:pointer;box-shadow:inset 0 0 0 3px #fff8e8,inset 0 0 0 6px #211b16,0 7px 0 #8c6f37}.upgradeCard .rarity{font-size:9px;letter-spacing:.14em;font-weight:1000;color:#7e2350}.upgradeCard h3{font-size:21px;line-height:1;margin:9px 0 8px;text-transform:uppercase}.upgradeCard p{font-size:12px;line-height:1.35;margin:0}.upgradeCard .emoji{font-size:32px;position:absolute;right:12px;bottom:9px}
.lb{width:100%;border-collapse:collapse;margin:12px 0;text-align:left}.lb th,.lb td{border-bottom:1px solid #4d3a57;padding:8px 5px;font-size:11px}.lb th{color:var(--muted);font-size:8px;letter-spacing:1px}.lb td:last-child,.lb th:last-child{text-align:right}.authbox{text-align:left}.authbox label{display:block;color:var(--muted);font:900 8px Arial;margin:10px 0 4px}.authbox input{width:100%;background:#0f0913;border:2px solid #5c4668;color:#fff;border-radius:8px;padding:11px;font-size:16px}.shareRow{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}.introcopy{color:#d3c8d8;line-height:1.45}.bonuses{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;text-align:left;margin:14px 0}.bonuses div{background:#21172a;padding:10px;border-radius:8px}.bonuses b{display:block;color:var(--acid);margin-bottom:4px}.loading{display:grid;place-items:center;text-align:center;min-height:240px}.spinner{width:44px;height:44px;border:5px solid #4a3853;border-top-color:var(--acid);border-radius:50%;animation:spin .8s linear infinite;margin:auto}@keyframes spin{to{transform:rotate(360deg)}}

.marketSection{margin-top:18px;text-align:left}
.marketSection h3{margin:8px 0 7px;font:1000 16px Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;text-transform:uppercase}
.marketHelp{color:var(--muted);font:800 10px/1.4 Arial;margin:0 0 8px}
.marketTiles{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.marketTile{aspect-ratio:.82;border:0;border-radius:7px;background:#f7efd8;color:#201724;box-shadow:0 4px 0 #9c855b;font:1000 28px Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;position:relative;cursor:pointer}
.marketTile span{position:absolute;right:5px;bottom:4px;font:900 8px Arial}
.marketTile.selected{outline:4px solid var(--cyan);transform:translateY(-3px)}
.marketTile.spent{opacity:.18;pointer-events:none}
.marketSummary{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:10px 0}
.marketSummary div{background:#21172a;border-radius:8px;padding:9px;text-align:center}
.marketSummary small{display:block;color:var(--muted);font:900 8px Arial;letter-spacing:.8px}
.marketSummary b{font:1000 20px Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.marketActions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.upgradeCard.chosen{outline:5px solid var(--cyan);transform:translateY(-3px)}
.marketReady{color:var(--good);font:900 10px Arial;margin-top:8px}
@media(max-width:700px){.marketTiles{grid-template-columns:repeat(4,1fr)}}

@media(max-width:700px){.wrap{padding:8px}.hud{gap:4px}.hud div{padding:6px}.hud b{font-size:15px}.tiles{grid-template-columns:repeat(5,1fr);gap:5px}.tile{font-size:36px}.upgradeGrid{grid-template-columns:1fr}.upgradeCard{min-height:125px}.wordbox{grid-template-columns:1fr}.bonuses{grid-template-columns:1fr}.kicker{display:none}.top{align-items:flex-start}}

/* Main Word Decks card treatment */
.tile,.marketTile{
  --point-colour:#d6d0c5;
  position:relative;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid #2d2330 !important;
  border-radius:9px;
  background:linear-gradient(160deg,#fffdf7,#f5eee3) !important;
  color:#281b25 !important;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif !important;
  font-weight:950 !important;
  user-select:none;
  -webkit-user-select:none;
  box-shadow:0 4px 0 #b89d66,0 9px 16px rgba(0,0,0,.18) !important;
  overflow:hidden;
}
.tile::after,.marketTile::after{
  content:"";
  position:absolute;
  right:0;bottom:0;
  width:34px;height:34px;
  background:var(--point-colour);
  clip-path:polygon(100% 0,100% 100%,0 100%);
  pointer-events:none;
  z-index:2;
}
.tile .val,.marketTile span{
  position:absolute !important;
  right:5px !important;
  bottom:4px !important;
  width:auto !important;height:auto !important;
  padding:0 !important;margin:0 !important;
  font-family:inherit !important;
  font-size:12px !important;
  font-weight:1000 !important;
  line-height:1 !important;
  color:#fff !important;
  z-index:4 !important;
}
.tile[data-value="3"],.marketTile[data-value="3"]{--point-colour:#d6d0c5}
.tile[data-value="4"],.marketTile[data-value="4"]{--point-colour:#22b8b2}
.tile[data-value="5"],.marketTile[data-value="5"]{--point-colour:#f2a900}
.tile[data-value="6"],.marketTile[data-value="6"]{--point-colour:#e45aa6}
.tile[data-value="7"],.marketTile[data-value="7"]{--point-colour:#d9365f}
.tile[data-value="3"] .val,.marketTile[data-value="3"] span{color:#281b25 !important}
.tile.selected,.marketTile.selected{outline:4px solid var(--cyan);transform:translateY(-3px)}
.tile.hot{background:linear-gradient(160deg,#fff8b7,#f6df72) !important}
.tile.used{opacity:.18}
.deckReorderHint{margin:4px 0 8px;color:var(--muted);font-size:10px;font-weight:750;opacity:.9}
#hand .tile[data-deck-index],#marketDeck .marketTile[data-deck-index]{cursor:grab;touch-action:none}
#hand .tile[data-deck-index]:active,#marketDeck .marketTile[data-deck-index]:active{cursor:grabbing}
.deckDragging{opacity:.16 !important}
.deckDragGhost{
  position:fixed !important;z-index:12000 !important;pointer-events:none !important;
  opacity:.98 !important;transform:rotate(3deg) scale(1.045) !important;
  filter:drop-shadow(0 14px 18px rgba(0,0,0,.42));
}
html.deckReordering,html.deckReordering body{overscroll-behavior:none}
html.deckReordering #hand,html.deckReordering #marketDeck{touch-action:none!important}

/* Market is deliberately compact enough to fit a portrait phone. */
#market .modal{padding:14px;max-height:96dvh}
#market .marketSection{margin-top:11px}
#market .marketSection h3{margin:5px 0 4px;font-size:14px}
#market .marketHelp{font-size:9px;margin-bottom:5px}
#market .marketSummary{margin:6px 0;gap:5px}
#market .marketSummary div{padding:6px}
#market .marketSummary b{font-size:17px}
#market .marketTiles{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}
#market .marketTile{width:100%;aspect-ratio:.82;font-size:clamp(22px,6vw,31px)}
#market .upgradeGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:7px 0}
#market .upgradeCard{min-height:118px;padding:10px 8px 8px}
#market .upgradeCard h3{font-size:15px;margin:6px 0 5px}
#market .upgradeCard p{font-size:9px;line-height:1.25}
#market .upgradeCard .emoji{font-size:23px}
#market .marketActions{margin-top:7px}
#market .btn{padding:9px 10px;font-size:10px}

/* Portrait-only notice copied from the main-game behaviour. */
.portraitOnlyNotice{display:none}
@media (orientation:landscape) and (max-height:600px) and (hover:none) and (pointer:coarse){
  html,body{overflow:hidden!important;background:#130f19!important}
  body>*:not(.portraitOnlyNotice){visibility:hidden!important}
  .portraitOnlyNotice{
    visibility:visible!important;position:fixed;inset:0;z-index:20000;display:flex;
    flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px;
    text-align:center;background:linear-gradient(180deg,#130f19,#21172b);color:#fff;
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif
  }
  .portraitOnlyNotice img{width:min(118px,28vw);height:auto;display:block}
  .portraitOnlyNotice strong{font-size:clamp(20px,5vw,34px);letter-spacing:.04em;color:var(--acid)}
  .portraitOnlyNotice span{color:var(--muted);font-size:14px;font-weight:750}
}
@media(max-width:600px){
  .tiles{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
  .tile{font-size:clamp(31px,9.2vw,40px);aspect-ratio:.80}
  .tile::after,.marketTile::after{width:29px;height:29px}
  .tile .val,.marketTile span{right:4px!important;bottom:3px!important;font-size:10px!important}
  #market .modal{padding:10px}
  #market .modal h1{font-size:29px;margin-bottom:4px}
  #market .marketIntro{font-size:10px;margin-bottom:5px}
  #market .marketSummary small{font-size:7px}
  #market .marketSummary b{font-size:14px}
  #market .marketTiles{grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}
  #market .marketTile{font-size:clamp(20px,6.3vw,28px);border-radius:6px}
  #market .upgradeGrid{grid-template-columns:repeat(3,minmax(0,1fr))}
  #market .upgradeCard{min-height:105px}
  #market .upgradeCard .rarity{font-size:7px}
  #market .upgradeCard h3{font-size:13px}
  #market .upgradeCard p{font-size:8px}
  #market .upgradeCard .emoji{font-size:19px;right:7px;bottom:5px}
  .deckReorderHint{font-size:9px;margin-bottom:5px}
}


/* Word Decks Universe footer + beta feedback */
.dextremeFooter{width:min(900px,94vw);margin:18px auto 34px;display:grid;gap:10px}
.dextremeFooterActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.dextremeFooterActions .btn,.dextremeFooterActions a{min-height:44px;display:flex;align-items:center;justify-content:center;text-decoration:none;text-align:center}
.dextremeFooterActions .wide{grid-column:1/-1}
.dextremeFooter .universeCta{background:var(--acid);color:#181019}
.dextremeFooter .accountCta{background:var(--cyan);color:#181019}
.betaPanel{border:1px solid #4d3b5e;border-radius:14px;padding:15px;background:linear-gradient(180deg,#24152d,#1c1223);text-align:center}
.betaBadge{display:inline-block;background:var(--pink);color:#fff;border-radius:999px;padding:5px 9px;font:900 9px/1 Inter,system-ui,sans-serif;letter-spacing:.08em;margin-bottom:8px}
.betaPanel h2{margin:0 0 7px;font-size:18px}
.betaPanel p{margin:0 0 12px;color:var(--muted);font-size:11px;line-height:1.45}
.feedbackForm{display:grid;gap:11px;margin-top:12px;text-align:left}
.feedbackForm label{display:grid;gap:5px;font-size:10px;font-weight:900}
.feedbackForm select,.feedbackForm textarea,.feedbackForm input{width:100%;border:1px solid #4d3b5e;border-radius:9px;background:#130f19;color:#fff;padding:10px;font:inherit}
.feedbackForm textarea{min-height:140px;resize:vertical}
@media(max-width:560px){.dextremeFooterActions{grid-template-columns:1fr}.dextremeFooterActions .wide{grid-column:auto}}


.modeGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}.modeCard{border:2px solid #594466;border-radius:14px;background:linear-gradient(160deg,#281831,#1a1020);color:#fff;padding:16px;text-align:left;cursor:pointer}.modeCard:hover,.modeCard:focus{border-color:var(--acid)}.modeCard b{display:block;font-size:22px;color:var(--acid);margin-bottom:6px}.modeCard span{display:block;color:#d3c8d8;font-size:12px;line-height:1.4}.modeTag{display:inline-block!important;width:auto;margin-top:10px;padding:4px 7px;border-radius:999px;background:var(--pink);color:#180f20!important;font:900 8px Arial!important;letter-spacing:.8px}.roundActions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.roundActions .btn{flex:1}.modePill{display:inline-block;margin:0 0 8px;padding:5px 8px;border-radius:999px;background:#2b1d34;color:var(--cyan);font:900 9px Arial;letter-spacing:1px}@media(max-width:560px){.modeGrid{grid-template-columns:1fr}.modeCard{padding:13px}.modeCard b{font-size:19px}}

.wd-intro-logo{max-width:min(260px,65vw);height:auto}.wd-intro-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.wd-intro-actions a{color:inherit;padding:10px}.wd-footer-logo img{display:block;max-width:200px;height:auto;margin:20px auto}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

.dextreme-game-logo{display:block;width:min(240px,58vw);height:auto;filter:drop-shadow(0 5px 0 #0005)}
.dextreme-intro-logo{display:block;width:min(260px,84vw);height:auto;margin:0 auto 14px;filter:drop-shadow(0 6px 0 #0005)}
@media(max-width:700px){.dextreme-game-logo{width:min(220px,68vw)}.dextreme-intro-logo{width:min(245px,86vw)}}


/* UI/UX mobile audit — active-play shell.
   Keep the game's identity, but give timed play the viewport rather than the chrome. */
@media(max-width:700px){
  body.wd-live-game{min-height:100dvh}
  body.wd-live-game .wrap{
    min-height:100dvh;
    padding:
      max(6px,env(safe-area-inset-top))
      8px
      max(8px,env(safe-area-inset-bottom));
  }
  body.wd-live-game .top{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:6px 8px;
    align-items:center;
    padding:2px 0 6px;
  }
  body.wd-live-game .dextreme-game-logo{width:min(142px,40vw);filter:drop-shadow(0 3px 0 #0005)}
  body.wd-live-game .kicker{display:none}
  body.wd-live-game .top-actions{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:4px;
    margin:0;
  }
  body.wd-live-game .top-actions a{display:none}
  body.wd-live-game .top-actions button{
    min-height:44px;
    padding:5px 3px;
    border-radius:9px;
    font-size:9px;
    letter-spacing:.15px;
    line-height:1.05;
  }

  body.wd-live-game .modePill{
    margin:0 0 4px;
    padding:3px 7px;
    font-size:8px;
  }
  body.wd-live-game .hud{gap:3px;margin-bottom:4px}
  body.wd-live-game .hud div{padding:5px 4px;border-radius:7px;min-width:0}
  body.wd-live-game .hud small{font-size:9px;letter-spacing:.35px}
  body.wd-live-game .hud b{font-size:15px;white-space:nowrap}

  body.wd-live-game .event{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:1px 8px;
    align-items:center;
    padding:6px 8px;
    border-left-width:5px;
  }
  body.wd-live-game .eventLabel{grid-column:1/-1;font-size:8px}
  body.wd-live-game .eventName{
    font-size:clamp(16px,4.7vw,20px);
    line-height:1;
    margin:1px 0;
    min-width:0;
  }
  body.wd-live-game .eventDesc{display:none}
  body.wd-live-game .eventBonus{
    margin:0;
    max-width:42vw;
    text-align:right;
    font-size:9px;
    line-height:1.15;
  }
  body.wd-live-game .owned{
    grid-column:1/-1;
    margin-top:2px;
    gap:3px;
    max-height:20px;
    overflow-x:auto;
    overflow-y:hidden;
    flex-wrap:nowrap;
    scrollbar-width:none;
  }
  body.wd-live-game .owned::-webkit-scrollbar{display:none}
  body.wd-live-game .owned span{flex:0 0 auto;padding:2px 5px;font-size:7px}

  body.wd-live-game .timer{height:6px;margin:4px 0}
  body.wd-live-game .panel{padding:7px}
  body.wd-live-game .deckReorderHint{
    margin:0 0 3px;
    font-size:8px;
    line-height:1.1;
  }
  body.wd-live-game .tiles{
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:4px;
  }
  body.wd-live-game .tile{
    aspect-ratio:.74;
    font-size:clamp(29px,9.2vw,38px);
    border-radius:6px;
    box-shadow:0 3px 0 #9c855b;
  }
  body.wd-live-game .tile::after{width:27px;height:27px}
  body.wd-live-game .tile .val{
    right:3px!important;
    bottom:2px!important;
    font-size:9px!important;
  }

  body.wd-live-game .wordbox{
    grid-template-columns:minmax(0,1fr) auto;
    gap:5px;
    margin-top:6px;
  }
  body.wd-live-game .wordbox input{
    min-height:44px;
    padding:8px 9px;
    font-size:16px;
  }
  body.wd-live-game .wordbox .btn{
    min-height:44px;
    padding:8px 10px;
    font-size:10px;
  }
  body.wd-live-game .msg{
    min-height:16px;
    margin:3px 0 0;
    font-size:10px;
    line-height:1.15;
  }

  body.wd-live-game .words{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
    margin-top:4px;
  }
  body.wd-live-game .word{
    min-width:0;
    padding:5px 6px;
    gap:4px;
    align-items:center;
  }
  body.wd-live-game .word strong{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:12px;
  }
  body.wd-live-game .word .note{display:none}
  body.wd-live-game .word .score{font-size:14px}

  body.wd-live-game .roundActions,
  body.wd-live-game .footerControls{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:4px;
    margin-top:4px;
  }
  body.wd-live-game .roundActions .btn,
  body.wd-live-game .footerControls .btn{
    min-height:44px;
    padding:7px 6px;
    font-size:9px;
  }
  body.wd-live-game .dictionary{
    margin-top:4px;
    padding:2px 4px;
    font-size:8px;
  }
  body.wd-live-game #modeNote{
    margin:3px 0 0;
    font-size:8px;
    line-height:1.15;
  }
  /* Keep the shared navigation, beta feedback and legal/footer area available
     below live play. Active gameplay stays compact, but the page must still
     expose the same platform chrome as Word Decks when the player scrolls. */
  body.wd-live-game + .dextremeFooter,
  body.wd-live-game .dextremeFooter{display:grid}
}

@media(max-width:700px) and (max-height:760px){
  body.wd-live-game .dextreme-game-logo{width:min(118px,34vw)}
  body.wd-live-game .top-actions button{min-height:44px;font-size:8px}
  body.wd-live-game .event{padding-block:4px}
  body.wd-live-game .owned{display:none}
  body.wd-live-game .tile{aspect-ratio:.82;font-size:clamp(27px,8.5vw,34px)}
  body.wd-live-game .deckReorderHint,
  body.wd-live-game .dictionary,
  body.wd-live-game #modeNote{display:none}
  body.wd-live-game .roundActions .btn,
  body.wd-live-game .footerControls .btn{min-height:44px}
}


/* 2026-10-02 — bring the main Word Decks UX hierarchy into Dextreme
   without flattening Dextreme's own pink / acid / cyan identity. */
body.wd-live-game .dextremeMainHeader{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding-bottom:8px;
}
body.wd-live-game .dextremeHowTo{
  width:100%;
  min-height:44px;
  margin:0 0 9px;
  background:#43324d;
  color:#fff;
  border:1px solid #6c5877;
}
body.wd-live-game .dextremePlayArea{
  padding:10px;
  border:1px solid rgba(65,232,255,.30);
  border-radius:16px;
  background:
    linear-gradient(180deg,rgba(71,35,85,.80),rgba(35,20,44,.92));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 14px 34px rgba(0,0,0,.18);
}
body.wd-live-game .dextremePlayArea .panel{
  background:rgba(29,19,36,.94);
  border-color:rgba(65,232,255,.14);
  box-shadow:none;
}
body.wd-live-game .dextremePlayArea .modePill{
  margin-top:0;
}
.previousRoundWordsLive{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  margin:0 0 8px;
  padding:8px 10px;
  border:1px solid #5b4368;
  border-radius:9px;
  background:#21162a;
}
.previousRoundWordsLive[hidden]{display:none!important}
.previousRoundWordsLive span{
  flex:0 0 auto;
  color:var(--muted);
  font:900 8px Arial;
  letter-spacing:1px;
}
.previousRoundWordsLive b{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--cyan);
  font-size:11px;
}
.liveBonusIndicators{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  margin-top:7px;
}
.liveBonus{
  padding:6px 5px;
  border:1px solid #4d3858;
  border-radius:7px;
  background:#18101e;
  color:var(--muted);
  font-size:8px;
  font-weight:900;
  line-height:1.15;
  text-align:center;
}
.liveBonus b{
  display:block;
  margin-top:2px;
  color:inherit;
  font-size:9px;
}
.liveBonus.active{
  border-color:var(--cyan);
  background:rgba(65,232,255,.10);
  color:var(--cyan);
  box-shadow:0 0 0 1px rgba(65,232,255,.08);
}
.dextremeFooter{
  width:min(900px,100%);
}
.dextremeFooter>.universeCta{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:48px;
  margin-bottom:8px;
}
.dextremeUtilityRow{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px!important;
  width:100%!important;
}
.dextremeUtilityRow .btn{
  width:100%;
  min-width:0;
  min-height:42px;
  padding:8px 5px;
  font-size:10px;
  line-height:1.05;
}
.dextremeUtilityRow .wordDecksCta,
.dextremeUtilityRow #footerLeaderboardBtn{
  background:var(--acid);
  color:#171019;
}
.dextremeUtilityRow #accountBtn,
.dextremeUtilityRow #optionsBtn{
  background:#43324d;
  color:#fff;
  border:1px solid #6c5877;
}
#market .marketProceed{
  background:var(--good)!important;
  color:#13291a!important;
  border:1px solid rgba(101,245,154,.72)!important;
}

@media(max-width:700px){
  body.wd-live-game .wrap{
    padding:8px;
  }
  body.wd-live-game .dextremeMainHeader{
    grid-template-columns:minmax(120px,38vw) minmax(0,1fr);
    gap:7px;
    padding:2px 0 6px;
  }
  body.wd-live-game .dextremeMainHeader .dextreme-game-logo{
    width:min(145px,38vw);
  }
  body.wd-live-game .dextremeMainHeader .kicker{
    font-size:7px;
    line-height:1.25;
  }
  body.wd-live-game .dextremeHowTo{
    min-height:40px;
    margin-bottom:7px;
    padding:8px 10px;
    font-size:10px;
  }
  body.wd-live-game .dextremePlayArea{
    padding:7px;
    border-radius:12px;
    background:
      linear-gradient(180deg,rgba(82,39,98,.86),rgba(37,21,47,.95));
  }
  .liveBonusIndicators{
    gap:3px;
  }
  .liveBonus{
    padding:5px 3px;
    font-size:6.8px;
  }
  .liveBonus b{font-size:7.5px}
  .dextremeUtilityRow{
    gap:4px!important;
  }
  .dextremeUtilityRow .btn{
    padding:7px 3px;
    font-size:8px;
  }
}


/* Daily Challenge attempt context. Uses the shared play-access counter so
   Extra Dextreme stays uncluttered and daily attempts reset with the day. */
.dextremeHeaderStatus{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-width:0;
}
.dextremeAttempt{
  min-width:72px;
  padding:7px 10px 8px;
  border:1px solid rgba(65,232,255,.38);
  border-radius:10px;
  background:linear-gradient(180deg,#25192d,#1a111f);
  text-align:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.dextremeAttempt[hidden]{display:none!important}
.dextremeAttempt span{
  display:block;
  color:var(--cyan);
  font:900 8px/1 Arial,sans-serif;
  letter-spacing:1.1px;
}
.dextremeAttempt b{
  display:block;
  margin-top:3px;
  color:#fff;
  font-size:22px;
  line-height:1;
}
body.wd-live-game .dextremeHeaderStatus:has(.dextremeAttempt:not([hidden])) .kicker{
  display:none;
}
@media(max-width:700px){
  body.wd-live-game .dextremeHeaderStatus{
    justify-content:flex-end;
  }
  body.wd-live-game .dextremeAttempt{
    min-width:64px;
    padding:6px 8px 7px;
    border-radius:9px;
  }
  body.wd-live-game .dextremeAttempt span{font-size:7px}
  body.wd-live-game .dextremeAttempt b{font-size:19px}
}


/* Daily attempt history */
.dextremeAttempt{
  appearance:none;
  font:inherit;
}
.dextremeAttempt:disabled{
  opacity:1;
  cursor:default;
}
.dextremeAttempt.hasHistory{
  cursor:pointer;
  transition:transform .14s ease,border-color .14s ease,background .14s ease;
}
.dextremeAttempt.hasHistory:hover,
.dextremeAttempt.hasHistory:focus-visible{
  border-color:var(--cyan);
  background:linear-gradient(180deg,#302039,#1d1423);
}
.dextremeAttempt.hasHistory:active{transform:translateY(1px)}
.dextremeAttemptView{
  display:block;
  margin-top:3px;
  color:#a9f6ff;
  font:900 7px/1 Arial,sans-serif;
  letter-spacing:1px;
}
.attemptHistoryModal{
  width:min(680px,calc(100vw - 24px));
  max-height:min(82vh,760px);
  overflow:auto;
  text-align:left;
}
.attemptHistoryHeading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.attemptHistoryHeading h1{margin:3px 0 0}
.attemptHistoryClose{width:auto!important;min-width:82px}
.attemptHistoryList{display:grid;gap:10px}
.attemptCard{
  overflow:hidden;
  border:1px solid #513b5f;
  border-radius:12px;
  background:#1d1523;
}
.attemptCard.bestAttempt{border-color:rgba(65,232,255,.52)}
.attemptCard summary{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:12px;
  padding:12px;
  cursor:pointer;
  list-style:none;
}
.attemptCard summary::-webkit-details-marker{display:none}
.attemptCard summary>span{
  display:grid;
  min-width:58px;
  text-align:center;
}
.attemptCard summary small{
  color:var(--cyan);
  font-size:8px;
  font-weight:900;
  letter-spacing:1px;
}
.attemptCard summary>span b{font-size:22px;line-height:1}
.attemptCard summary>strong{
  font-size:20px;
  text-align:right;
}
.attemptCard summary>em{
  min-width:54px;
  color:var(--pink);
  font-size:9px;
  font-style:normal;
  font-weight:900;
  letter-spacing:.8px;
  text-align:right;
}
.attemptCard.bestAttempt summary>em{color:var(--cyan)}
.attemptCardBody{
  display:grid;
  gap:9px;
  padding:0 12px 12px;
  border-top:1px solid rgba(255,255,255,.06);
}
.attemptMeta{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
  padding-top:10px;
}
.attemptMeta span{
  padding:7px;
  border-radius:8px;
  background:#271c2f;
  color:var(--muted);
  font-size:10px;
  text-align:center;
}
.attemptMeta b{display:block;margin-top:2px;color:#fff;font-size:13px}
.attemptRound,.attemptMarket{
  padding:9px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:9px;
  background:#18111d;
}
.attemptRoundTitle{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:8px;
  align-items:center;
}
.attemptRoundTitle>b{color:var(--pink);font-size:10px}
.attemptRoundTitle>span{color:var(--muted);font-size:10px}
.attemptRoundTitle>strong{color:var(--cyan);font-size:14px}
.attemptWords{display:flex;flex-wrap:wrap;gap:5px;margin:7px 0}
.attemptWords span{
  padding:5px 7px;
  border-radius:7px;
  background:#2a1e32;
  font-size:10px;
}
.attemptWords b{color:#fff}
.attemptRound>small,.attemptMarket>small{color:var(--muted);font-size:9px}
.attemptMarket{display:grid;gap:4px}
.attemptMarket>b{color:var(--cyan);font-size:10px}
.attemptMarket>span{font-size:10px}
@media(max-width:520px){
  .attemptHistoryModal{width:calc(100vw - 14px);max-height:88vh;padding:14px}
  .attemptHistoryHeading{align-items:center}
  .attemptHistoryHeading h1{font-size:20px}
  .attemptHistoryClose{min-width:68px;padding:9px!important;font-size:9px!important}
  .attemptCard summary{grid-template-columns:58px 1fr auto;gap:7px;padding:10px 8px}
  .attemptCard summary>strong{font-size:17px}
  .attemptMeta{grid-template-columns:repeat(3,1fr)}
  .attemptMeta span{padding:6px 3px;font-size:8px}
  .attemptRoundTitle{grid-template-columns:auto 1fr auto;gap:5px}
}


/* Daily Challenge header context: streak + a deliberately button-like attempt history control. */
.dextremeDailyContext{
  display:grid;
  grid-template-columns:minmax(76px,1fr) minmax(82px,1fr);
  gap:7px;
  align-items:stretch;
}
.dextremeDailyContext[hidden]{display:none!important}
.dextremeDailyStreak,
.dextremeAttempt{
  min-height:74px;
  border-radius:12px;
}
.dextremeDailyStreak{
  padding:7px 9px 8px;
  border:1px solid rgba(255,60,147,.42);
  background:linear-gradient(180deg,#2b192b,#1b111f);
  text-align:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.dextremeDailyStreak span,
.dextremeDailyStreak small{
  display:block;
  font:900 7px/1 Arial,sans-serif;
  letter-spacing:.9px;
}
.dextremeDailyStreak span{color:var(--pink)}
.dextremeDailyStreak b{
  display:block;
  margin:5px 0 4px;
  color:#fff;
  font-size:20px;
  line-height:1;
}
.dextremeDailyStreak small{color:#cbbdd1}
.dextremeAttempt{
  position:relative;
  min-width:82px;
  padding:7px 9px 8px;
  border:2px solid var(--cyan);
  background:linear-gradient(180deg,#253442,#17222a);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 3px 0 #0b1115,
    0 0 16px rgba(65,232,255,.10);
}
.dextremeAttempt.hasHistory{
  cursor:pointer;
}
.dextremeAttempt.hasHistory:hover,
.dextremeAttempt.hasHistory:focus-visible{
  border-color:#b9f8ff;
  background:linear-gradient(180deg,#315063,#1c303b);
  box-shadow:0 3px 0 #0b1115,0 0 0 3px rgba(65,232,255,.12);
}
.dextremeAttempt.hasHistory:active{
  transform:translateY(2px);
  box-shadow:0 1px 0 #0b1115;
}
.dextremeAttemptView{
  margin-top:5px;
  color:#fff;
  font-size:6.5px;
  letter-spacing:.7px;
}
body.wd-live-game .dextremeHeaderStatus:has(.dextremeDailyContext:not([hidden])) .kicker{
  display:none;
}
@media(max-width:700px){
  body.wd-live-game .dextremeMainHeader{
    grid-template-columns:minmax(120px,1fr) auto;
  }
  .dextremeDailyContext{
    grid-template-columns:74px 82px;
    gap:5px;
  }
  .dextremeDailyStreak,
  body.wd-live-game .dextremeAttempt{
    min-height:68px;
    border-radius:10px;
  }
  .dextremeDailyStreak{padding:6px 5px}
  .dextremeDailyStreak b{font-size:18px}
  .dextremeDailyStreak span,
  .dextremeDailyStreak small{font-size:6px}
  body.wd-live-game .dextremeAttempt{
    min-width:82px;
    padding:6px 6px 7px;
  }
  body.wd-live-game .dextremeAttempt span{font-size:7px}
  body.wd-live-game .dextremeAttempt b{font-size:20px}
}


/* 2026-10-02 — Dextreme market refresh.
   Same strategic economy as Word Decks, but presented as a faster three-step
   Dextreme decision: letters, permanent power-up, lock. */
#market .dextremeMarketModal{
  width:min(760px,calc(100vw - 18px));
  max-height:96dvh;
  overflow:auto;
  padding:14px;
  border:1px solid rgba(65,232,255,.30);
  background:
    radial-gradient(circle at 100% 0,rgba(255,60,147,.12),transparent 34%),
    linear-gradient(180deg,#24142d,#17101d);
}
.dextremeMarketStage[hidden]{display:none!important}
.dextremeMarketStage .marketTitle{margin:3px 0 6px}
.dextremeMarketHowTo{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin:13px 0;
}
.dextremeMarketHowTo>div{
  display:grid;
  grid-template-columns:27px 1fr;
  gap:8px;
  align-items:center;
  min-height:54px;
  padding:8px;
  border:1px solid #523b60;
  border-radius:10px;
  background:#1b1221;
}
.dextremeMarketHowTo b{
  display:grid;
  place-items:center;
  width:27px;height:27px;
  border-radius:50%;
  background:var(--pink);
  color:#fff;
  font-size:13px;
}
.dextremeMarketHowTo span{
  color:#ded3e4;
  font-size:10px;
  font-weight:800;
  line-height:1.3;
}
.dextremePriceGuide{
  display:grid;
  gap:4px;
  margin:0 0 12px;
  padding:10px;
  border:1px solid rgba(216,255,49,.28);
  border-radius:10px;
  background:rgba(216,255,49,.06);
  text-align:center;
}
.dextremePriceGuide strong{color:var(--acid);font-size:9px;letter-spacing:1px}
.dextremePriceGuide span{color:#fff;font-size:12px;font-weight:950}
.dextremePriceGuide small{color:var(--muted);font-size:8px;line-height:1.3}
.dextremeMarketStart,
.dextremeMarketSummaryScreen>.marketProceed{
  width:100%;
  min-height:48px;
  background:var(--good)!important;
  color:#13291a!important;
}
.dextremeMarketHeading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
}
.dextremeMarketHeading>span{
  color:var(--cyan);
  font-size:8px;
  font-weight:900;
  letter-spacing:.8px;
  text-align:right;
}
.dextremeMarketStats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  margin:8px 0;
}
.dextremeMarketStats>div{
  min-width:0;
  padding:7px 4px;
  border:1px solid #4d3858;
  border-radius:8px;
  background:#1a111f;
  text-align:center;
}
.dextremeMarketStats small,
.dextremeMarketStats em{
  display:block;
  color:var(--muted);
  font:900 6.5px/1 Arial,sans-serif;
  letter-spacing:.55px;
}
.dextremeMarketStats b{
  display:block;
  margin:3px 0;
  color:#fff;
  font-size:16px;
  line-height:1;
}
.dextremeMarketStats .marketTimerStat{
  border-color:rgba(255,60,147,.42);
}
.dextremeMarketStats .marketTimerStat b{color:var(--pink)}
.dextremeMarketStats .marketTimerStat b.priceWarning{
  color:var(--acid);
  animation:dextremeMarketPulse .55s ease-in-out infinite alternate;
}
.dextremeMarketStats em{color:var(--pink);font-style:normal}
@keyframes dextremeMarketPulse{to{transform:scale(1.08)}}
#dextremeMarketPreviousWords{
  margin:0 0 6px;
  padding:6px 8px;
}
.dextremeMarketSectionTitle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.dextremeMarketSectionTitle h3{margin-right:auto!important}
.dextremeMarketSectionTitle>b{
  padding:4px 7px;
  border-radius:999px;
  background:#2b1d34;
  color:var(--cyan);
  font-size:8px;
  white-space:nowrap;
}
.dextremeSwapActions{
  display:grid!important;
  grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);
}
#resetDextremeMarket{
  background:#43324d;
  color:#fff;
  border:1px solid #6c5877;
}
#swapLetterBtn{
  background:var(--acid);
  color:#181019;
}
.dextremeUpgradeSection{
  padding-top:4px;
  border-top:1px solid rgba(255,255,255,.06);
}
.dextremeUpgradeSection h3 span{
  color:var(--good);
  font-size:9px;
}
.dextremeLockActions .marketProceed{
  width:100%;
  min-height:46px;
  background:var(--good)!important;
  color:#13291a!important;
}
.dextremeMarketSummaryChanges{
  display:grid;
  gap:7px;
  margin:12px 0;
}
.dextremeMarketSummaryRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px;
  border:1px solid #4d3858;
  border-radius:9px;
  background:#1b1221;
}
.dextremeMarketSummaryRow span{display:grid;gap:2px}
.dextremeMarketSummaryRow small{
  color:var(--muted);
  font-size:7px;
  font-weight:900;
  letter-spacing:.8px;
}
.dextremeMarketSummaryRow b{font-size:17px}
.dextremeMarketSummaryRow strong{color:var(--acid);font-size:10px}
.dextremeMarketSummaryEmpty{
  padding:10px;
  border:1px dashed #594466;
  border-radius:9px;
  color:var(--muted);
  font-size:10px;
  text-align:center;
}
.dextremeMarketSummaryUpgrade{
  display:grid;
  gap:4px;
  padding:11px;
  border:1px solid rgba(65,232,255,.35);
  border-radius:10px;
  background:rgba(65,232,255,.07);
  text-align:center;
}
.dextremeMarketSummaryUpgrade span,
.dextremeMarketSummaryUpgrade small{
  color:var(--cyan);
  font-size:7px;
  font-weight:900;
  letter-spacing:.9px;
}
.dextremeMarketSummaryUpgrade b{font-size:18px}
.dextremeMarketSummaryUpgrade small{color:var(--muted)}
.dextremeMarketSummaryTotals{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
  margin:10px 0 12px;
}
.dextremeMarketSummaryTotals>div{
  padding:9px 5px;
  border-radius:9px;
  background:#21172a;
  text-align:center;
}
.dextremeMarketSummaryTotals small{
  display:block;
  color:var(--muted);
  font-size:7px;
  font-weight:900;
}
.dextremeMarketSummaryTotals b{
  display:block;
  margin-top:3px;
  font-size:18px;
}

@media(max-width:600px){
  #market .dextremeMarketModal{padding:9px;max-height:97dvh}
  .dextremeMarketHowTo{gap:5px;margin:9px 0}
  .dextremeMarketHowTo>div{min-height:46px;padding:6px;grid-template-columns:23px 1fr;gap:6px}
  .dextremeMarketHowTo b{width:23px;height:23px;font-size:11px}
  .dextremeMarketHowTo span{font-size:8px}
  .dextremePriceGuide{padding:7px;margin-bottom:9px}
  .dextremePriceGuide span{font-size:10px}
  .dextremeMarketHeading .marketTitle{font-size:24px!important}
  .dextremeMarketStats{margin:5px 0}
  .dextremeMarketStats>div{padding:5px 2px}
  .dextremeMarketStats b{font-size:14px}
  #market .marketSection{margin-top:7px}
  #market .marketSection h3{font-size:11px}
  #market .marketHelp{font-size:7.5px;line-height:1.2}
  #market .marketTiles{gap:3px}
  #market .upgradeGrid{gap:4px;margin:5px 0}
  #market .upgradeCard{min-height:96px;padding:7px 6px}
  #market .upgradeCard h3{font-size:11px;margin:4px 0}
  #market .upgradeCard p{font-size:7px}
  #market .upgradeCard .emoji{font-size:17px}
  #market .marketReady,#market .note{font-size:8px}
  #market .marketActions{margin-top:5px}
  #market .btn{min-height:42px;padding:7px 5px;font-size:8px}
}
@media(prefers-reduced-motion:reduce){
  .dextremeMarketStats .marketTimerStat b.priceWarning{animation:none}
}

#letterMarket .marketTile[data-market-letter-index]{cursor:grab;touch-action:none}
#letterMarket .marketTile[data-market-letter-index]:active{cursor:grabbing}
#marketDeck .marketTile.marketDropTarget{
  outline:4px solid var(--acid)!important;
  transform:translateY(-3px) scale(1.025);
  box-shadow:0 0 0 3px rgba(216,255,49,.22),0 6px 14px rgba(0,0,0,.28)!important;
}


/* Market mobile polish: keep the timed economy visible and make action states unambiguous. */
#dextremeMarketActive .dextremeMarketStats{
  position:sticky;
  top:-1px;
  z-index:30;
  margin:8px -6px;
  padding:7px 6px;
  border:1px solid rgba(65,232,255,.22);
  border-radius:10px;
  background:rgba(24,15,30,.97);
  box-shadow:0 8px 20px rgba(0,0,0,.34);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}
#market .upgradeCard{
  padding-bottom:34px;
}
#market .upgradeCard .rarity{
  color:#81214f!important;
}
#market .upgradeCard h3{
  color:#24191d!important;
}
#market .upgradeCard p{
  color:#493b37!important;
  font-weight:750;
  opacity:1!important;
}
#market .upgradeCard.chosen{
  outline:4px solid var(--cyan);
  box-shadow:
    inset 0 0 0 3px #fff8e8,
    inset 0 0 0 6px #211b16,
    0 0 0 3px rgba(65,232,255,.22),
    0 7px 0 #8c6f37;
}
#swapLetterBtn:disabled,
#marketNextBtn:disabled,
#resetDextremeMarket:disabled{
  opacity:1!important;
  background:#2a2030!important;
  color:#776a7e!important;
  border:1px solid #44354b!important;
  box-shadow:none!important;
  cursor:not-allowed;
}
#swapLetterBtn:not(:disabled){
  background:var(--acid)!important;
  color:#181019!important;
  border:1px solid rgba(216,255,49,.72)!important;
  box-shadow:0 3px 0 #6d7c14,0 0 16px rgba(216,255,49,.10);
}
#marketNextBtn:not(:disabled){
  background:var(--good)!important;
  color:#102718!important;
  border:1px solid rgba(101,245,154,.78)!important;
  box-shadow:0 3px 0 #257545,0 0 18px rgba(101,245,154,.12);
}
#swapLetterBtn:not(:disabled):active,
#marketNextBtn:not(:disabled):active{
  transform:translateY(2px);
  box-shadow:0 1px 0 rgba(0,0,0,.55);
}
#resetDextremeMarket:not(:disabled){
  background:#43324d!important;
  color:#fff!important;
  border:1px solid #6c5877!important;
}
@media(max-width:600px){
  #dextremeMarketActive .dextremeMarketStats{
    margin:5px -4px 7px;
    padding:5px 4px;
    border-radius:9px;
  }
  #market .upgradeCard{
    min-height:110px;
    padding:8px 7px 31px;
  }
  #market .upgradeCard .rarity{
    font-size:7px;
    line-height:1.1;
  }
  #market .upgradeCard h3{
    margin:5px 0 5px;
    font-size:12px;
    line-height:1.05;
  }
  #market .upgradeCard p{
    font-size:8px;
    line-height:1.28;
  }
  #market .upgradeCard .emoji{
    right:8px;
    bottom:7px;
    font-size:18px;
  }
}


/* Market mobile polish: keep pressure visible and make actions/stats easier to read. */
#market .dextremeMarketStats{
  position:sticky;
  top:-1px;
  z-index:30;
  padding:6px;
  margin:7px -2px 8px;
  border:1px solid rgba(65,232,255,.18);
  border-radius:10px;
  background:rgba(24,15,30,.96);
  box-shadow:0 8px 18px rgba(0,0,0,.24);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}
#market .upgradeCard{
  border-color:#6b4c79;
  background:linear-gradient(160deg,#33203c,#211529);
  color:#fff;
}
#market .upgradeCard .rarity{
  color:var(--pink);
  opacity:1;
}
#market .upgradeCard h3{
  color:#fff;
  line-height:1.05;
}
#market .upgradeCard p{
  color:#e4dbe8;
  opacity:1;
  line-height:1.3;
}
#market .upgradeCard .emoji{
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.25));
}
#market .upgradeCard.chosen{
  border-color:var(--cyan);
  background:linear-gradient(160deg,#3d2b46,#25323a);
  box-shadow:0 0 0 2px rgba(65,232,255,.18),0 8px 18px rgba(0,0,0,.25);
}
#market #swapLetterBtn,
#market #marketNextBtn{
  transition:background .14s ease,color .14s ease,border-color .14s ease,opacity .14s ease,transform .08s ease;
}
#market #swapLetterBtn:disabled,
#market #marketNextBtn:disabled{
  background:#33263a!important;
  color:#786b80!important;
  border:1px solid #4a3a52!important;
  opacity:1!important;
  box-shadow:none!important;
  cursor:not-allowed;
}
#market #swapLetterBtn:not(:disabled){
  background:var(--acid)!important;
  color:#171019!important;
  border:1px solid rgba(216,255,49,.72)!important;
  box-shadow:0 3px 0 rgba(0,0,0,.28),0 0 14px rgba(216,255,49,.10);
}
#market #marketNextBtn:not(:disabled){
  background:var(--good)!important;
  color:#13291a!important;
  border:1px solid rgba(101,245,154,.72)!important;
  box-shadow:0 3px 0 rgba(0,0,0,.28),0 0 14px rgba(101,245,154,.10);
}
#market #swapLetterBtn:not(:disabled):active,
#market #marketNextBtn:not(:disabled):active{
  transform:translateY(1px);
}
@media(max-width:600px){
  #market .dextremeMarketStats{
    top:-1px;
    padding:5px;
    margin:5px -1px 7px;
    border-radius:9px;
  }
  #market .upgradeCard{
    min-height:104px;
  }
  #market .upgradeCard h3{
    font-size:12px;
  }
  #market .upgradeCard p{
    font-size:7.8px;
    line-height:1.28;
  }
}


/* Restore the physical cream XTREME cards while retaining the clearer market typography. */
#market .upgradeCard{
  border:4px solid #2a202b!important;
  background:linear-gradient(145deg,#fff6d6,#f5dfa0)!important;
  color:#241a24!important;
  box-shadow:0 8px 0 #a98942!important;
}
#market .upgradeCard .rarity{
  color:#9d285d!important;
  opacity:1!important;
}
#market .upgradeCard h3{
  color:#241a24!important;
  text-shadow:none!important;
}
#market .upgradeCard p{
  color:#554653!important;
  opacity:1!important;
  text-shadow:none!important;
}
#market .upgradeCard.chosen{
  border-color:var(--cyan)!important;
  background:linear-gradient(145deg,#fffbdc,#e8f8d0)!important;
  box-shadow:0 8px 0 #3996a2,0 0 0 3px rgba(65,232,255,.20)!important;
}
#market .upgradeCard.chosen:after{
  content:"SELECTED";
  position:absolute;
  right:6px;
  top:6px;
  padding:3px 5px;
  border-radius:999px;
  background:var(--cyan);
  color:#102127;
  font:950 6px/1 Arial,sans-serif;
  letter-spacing:.6px;
}
#market .marketTimerStat.timerUrgent{
  border-color:var(--pink);
  background:rgba(255,60,147,.10);
  box-shadow:0 0 0 1px rgba(255,60,147,.15),0 0 14px rgba(255,60,147,.10);
}
#market .marketTimerStat.timerUrgent b{
  color:var(--acid)!important;
  font-size:18px;
}
#market .marketTimerStat.timerCritical{
  background:rgba(255,60,147,.18);
  box-shadow:0 0 0 2px rgba(255,60,147,.25),0 0 18px rgba(255,60,147,.18);
  animation:dextremeTimerPanelPulse .55s ease-in-out infinite alternate;
}
@keyframes dextremeTimerPanelPulse{
  to{transform:scale(1.018)}
}
@media(prefers-reduced-motion:reduce){
  #market .marketTimerStat.timerCritical{animation:none}
}


/* Combined round-result + market briefing removes the redundant market intro screen. */
.dextremeRoundMarketIntro{
  width:min(560px,calc(100vw - 24px));
}
.dextremeRoundMarketIntro .roundMarketBrief{
  margin:13px 0 10px;
  padding-top:12px;
  border-top:1px solid #4b3855;
}
.dextremeRoundMarketIntro .roundMarketBrief[hidden]{display:none!important}
.dextremeRoundMarketIntro .roundMarketBrief>.eventLabel{
  color:var(--pink);
  text-align:center;
}
.dextremeRoundMarketIntro .roundMarketBrief>p{
  margin:7px auto 9px;
  max-width:470px;
  color:#d7cadc;
  font-size:10px;
  font-weight:800;
  line-height:1.4;
  text-align:center;
}
.dextremeRoundMarketIntro .dextremePriceGuide.compact{
  margin:0;
  padding:7px 9px;
}
.dextremeRoundMarketIntro .dextremePriceGuide.compact span{
  font-size:10px;
}
.dextremeRoundMarketIntro #nextBtn{
  width:100%;
  min-height:48px;
  margin-top:10px;
  background:var(--acid)!important;
  color:#171019!important;
  border:1px solid rgba(216,255,49,.72)!important;
}
@media(max-width:600px){
  .dextremeRoundMarketIntro{
    padding:13px 12px;
  }
  .dextremeRoundMarketIntro .big{
    margin:5px 0;
  }
  .dextremeRoundMarketIntro .roundMarketBrief{
    margin-top:10px;
    padding-top:9px;
  }
  .dextremeRoundMarketIntro .roundMarketBrief>p{
    margin:5px auto 7px;
    font-size:8.5px;
  }
  .dextremeRoundMarketIntro #nextBtn{
    min-height:44px;
    margin-top:8px;
  }
}


/* Main-game parity for the Word Dextreme completion screen. */
.completionConfetti{position:fixed;inset:0;z-index:10020;pointer-events:none;display:none}
.completionConfetti.active{display:block}
#gameOver{z-index:9997}
.dextremeCompleteModal{
  width:min(620px,calc(100vw - 18px));
  max-height:96dvh;
  overflow:auto;
  padding:18px;
  border:1px solid rgba(65,232,255,.30);
  background:radial-gradient(circle at 50% 0,rgba(255,60,147,.12),transparent 30%),linear-gradient(180deg,#24142d,#17101d);
}
.dextremeCompleteTitle{margin:0;text-align:center}
.dextremeCompleteLabel{margin-top:8px;color:var(--muted);font-size:8px;font-weight:950;letter-spacing:1.3px;text-align:center}
.dextremeFinalScore{margin:2px 0 4px!important;color:var(--acid)!important;text-align:center}
.dextremeFinalText{margin:4px auto 10px;text-align:center}
.dextremeResultDetails{
  margin:10px 0;
  border:1px solid #523b60;
  border-radius:11px;
  background:#1b1221;
  overflow:hidden;
}
.dextremeResultDetails>summary{list-style:none;cursor:pointer}
.dextremeResultDetails>summary::-webkit-details-marker{display:none}
.dextremeResultDetails>summary>div{
  display:grid;
  grid-template-columns:1fr auto;
  gap:3px 10px;
  align-items:center;
  padding:10px;
}
.dextremeResultDetails>summary span{color:var(--muted);font-size:7px;font-weight:950;letter-spacing:.7px}
.dextremeResultDetails>summary b{font-size:11px;text-align:right}
.dextremeResultDetails>summary i{grid-column:1/-1;height:0}
.dextremeResultDetails>summary i:after{content:"VIEW FULL RUN ↓";display:block;margin-top:3px;color:var(--cyan);font:900 7px/1 Arial,sans-serif;text-align:center;letter-spacing:.7px}
.dextremeResultDetails[open]>summary i:after{content:"HIDE FULL RUN ↑"}
.dextremeResultRounds{display:grid;gap:7px;padding:0 8px 8px}
.dextremeResultRound{padding:8px;border:1px solid #473451;border-radius:9px;background:#21162a}
.dextremeResultRound.best{border-color:rgba(216,255,49,.42)}
.dextremeResultRound>header{display:flex;justify-content:space-between;gap:8px;margin-bottom:6px;color:var(--pink);font-size:8px;font-weight:950}
.dextremeResultWord{display:flex;justify-content:space-between;padding:4px 0;border-top:1px solid rgba(255,255,255,.05);font-size:9px}
.dextremeResultMarket{display:grid;gap:4px;margin-top:6px;padding:7px;border-radius:7px;background:#160f1c}
.dextremeResultMarket small{color:var(--cyan);font-size:7px;font-weight:950}
.dextremeResultMarket span{display:flex;justify-content:space-between;color:#d9cedf;font-size:8px}
.dextremeResultMarket strong{color:var(--acid);font-size:8px}
.dextremeResultStats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:8px 0}
.dextremeResultStats>div{padding:8px 4px;border:1px solid #4d3858;border-radius:8px;background:#1a111f;text-align:center}
.dextremeResultStats small{display:block;color:var(--muted);font-size:6.5px;font-weight:950}
.dextremeResultStats b{display:block;margin-top:3px;font-size:15px}
.nextDeckCard{
  display:grid;gap:3px;margin:10px 0;padding:10px;border:1px solid rgba(65,232,255,.30);border-radius:10px;background:rgba(65,232,255,.06);text-align:center
}
.nextDeckCard span{color:var(--cyan);font-size:7px;font-weight:950;letter-spacing:1px}
.nextDeckCard b{color:#fff;font-size:24px;letter-spacing:1px}
.nextDeckCard small{color:var(--muted);font-size:8px}
.dextremeShareResult{margin:10px 0}
.dextremeShareResult .shareButtons{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
.dextremeShareResult .shareButtons .btn{min-height:42px}
.dextremeShareResult #shareBtn{grid-column:1/-1;width:100%;background:var(--cyan);color:#11242a}
.dextremeShareResult #shareVideo.ready{background:var(--good);color:#13291a}
.dextremeReplayPrompt{margin-top:11px;color:var(--muted);font-size:9px;font-weight:900;text-align:center}
.dextremeReplay{width:100%;margin-top:6px;background:var(--acid)!important;color:#171019!important}
.dextremeResultAccount{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:12px 0}
.dextremeResultAccount .btn{min-height:40px;padding:7px 4px;font-size:7.5px}
.dextremeResultLeaderboard{margin-top:10px;padding:10px;border:1px solid #4d3858;border-radius:10px;background:#1b1221}
.dextremeResultLeaderboardHead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.dextremeResultLeaderboardHead h3{margin:0;font-size:12px}
.dextremeResultLeaderboardHead span{padding:3px 6px;border-radius:999px;background:rgba(101,245,154,.12);color:var(--good);font-size:7px;font-weight:950}
.dextremeResultLinks{margin-top:10px!important}
@media(max-width:600px){
 .dextremeCompleteModal{padding:11px;max-height:97dvh}
 .dextremeCompleteTitle{font-size:27px}
 .dextremeFinalScore{font-size:58px!important}
 .dextremeShareResult .shareButtons{gap:5px}
 .dextremeShareResult .shareButtons .btn{font-size:7.5px;padding:6px 4px}
 .dextremeResultAccount{gap:4px}
}


/* Dextreme parity: account state, position sharing and account-synced trophies. */
.dextremeResultAccountCard{
  margin:12px 0;padding:10px;border:1px solid #4d3858;border-radius:10px;background:#1a111f
}
#dextremeResultAccountText{margin-bottom:8px;color:#d8cedd;font-size:8.5px;font-weight:800;line-height:1.45;text-align:center}
.dextremeSharePosition{width:100%;margin-top:8px;min-height:40px}
#shareLeaderboardPositionMessage{margin:5px 0 0;text-align:center}
.dextremeTrophyModal{width:min(620px,calc(100vw - 18px));max-height:94dvh;overflow:auto}
.dextremeTrophyHead{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.dextremeTrophyHead h1{margin:2px 0 0}
.dextremeTrophyProgress{margin:10px 0;padding:9px;border:1px solid rgba(216,255,49,.3);border-radius:9px;background:rgba(216,255,49,.06);color:var(--acid);font-size:9px;font-weight:950;text-align:center;letter-spacing:.7px}
.dextremeTrophyGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.dextremeTrophy{position:relative;display:grid;gap:4px;min-height:128px;padding:10px;border:1px solid #4d3858;border-radius:10px;background:#1c1223}
.dextremeTrophy>div{font-size:28px}
.dextremeTrophy strong{font-size:10px;color:#fff}
.dextremeTrophy span{font-size:8px;line-height:1.35;color:var(--muted)}
.dextremeTrophy small{margin-top:auto;font-size:6.5px;font-weight:950;letter-spacing:.7px}
.dextremeTrophy.locked{filter:saturate(.2);opacity:.5}
.dextremeTrophy.unlocked{border-color:var(--cyan);box-shadow:0 0 0 1px rgba(65,232,255,.15),0 0 18px rgba(65,232,255,.08)}
.dextremeTrophy.unlocked small{color:var(--acid)}
@media(max-width:430px){.dextremeTrophyGrid{grid-template-columns:1fr 1fr}.dextremeTrophy{min-height:120px;padding:8px}}


/* Shared progression green — matches the main Word Decks positive-action colour. */
:root{--progress-green:#39c86a;--progress-green-ink:#0f2a18}
#playBtn:not(:disabled),
#finishBtn:not(:disabled),
#nextBtn:not(:disabled),
#marketNextBtn:not(:disabled),
#dextremeStartNextRound:not(:disabled),
#againBtn:not(:disabled){
  background:var(--progress-green)!important;
  color:var(--progress-green-ink)!important;
  border:1px solid #55df83!important;
}


/* XTREME Market identity — a deliberate visual break from the purple/pink game arena. */
#market{
  background:rgba(4,19,22,.92);
}
#market .dextremeMarketModal{
  border:1px solid rgba(65,232,255,.62);
  background:
    radial-gradient(circle at 100% 0,rgba(216,255,49,.12),transparent 32%),
    radial-gradient(circle at 0 0,rgba(65,232,255,.12),transparent 38%),
    linear-gradient(180deg,#0d292d,#081b20)!important;
  box-shadow:0 20px 70px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.05);
}
#market .marketTitle,
#market .dextremeMarketHeading>span{
  color:var(--cyan);
}
#market .marketSection{
  padding:9px;
  border:1px solid rgba(65,232,255,.18);
  border-radius:10px;
  background:rgba(4,16,19,.48);
}
#market .marketSection h3{color:#e8fdff}
#market .marketHelp{color:#9fc4c8}
#market .dextremeMarketStats{
  border-color:rgba(65,232,255,.35);
  background:rgba(5,24,28,.97);
}
#market .dextremeMarketStats>div{
  border-color:rgba(65,232,255,.20);
  background:#071b1f;
}
#market .dextremeMarketSummaryRow,
#market .dextremeMarketSummaryTotals>div{
  border-color:rgba(65,232,255,.20);
  background:#071b1f;
}
#market .dextremeMarketSummaryScreen .marketIntro{color:#9fc4c8}


/* Upgrade choice belongs to the market-complete decision screen, not the timed letter market. */
.dextremeSummaryUpgradePicker{
  margin:10px 0;
  padding:10px;
  border:1px solid rgba(65,232,255,.34);
  border-radius:11px;
  background:rgba(5,24,28,.72);
  text-align:left;
}
.dextremeSummaryUpgradePicker h3{
  margin:0 0 4px;
  color:#e8fdff;
  font-size:12px;
}
.dextremeSummaryUpgradePicker h3 span{color:var(--progress-green)}
#dextremeMarketSummary .upgradeGrid{margin:8px 0 5px}
#dextremeMarketSummary .upgradeCard{background:#f4ead3;color:#201724}
#dextremeMarketSummary .upgradeCard.chosen{
  outline:4px solid var(--cyan);
  background:#d9fbff;
}
#dextremeStartNextRound:disabled{
  background:#315158!important;
  color:#86a4a8!important;
  border-color:#476a70!important;
  opacity:.72;
}
@media(max-width:600px){
  .dextremeSummaryUpgradePicker{padding:8px}
  #dextremeMarketSummary .upgradeCard{min-height:96px}
}


/* Shared platform/support links — the boring but important bit. */
.dextremeSupportLink{
  display:block;
  margin:2px auto 0;
  color:#c9b8cf;
  font-weight:800;
  text-align:center;
  text-decoration:none;
}
.dextremeSupportLink:hover,.dextremeSupportLink:focus{text-decoration:underline}
.dextremeSiteInfoLinks{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px 16px;
  padding:4px 8px 0;
}
.dextremeSiteInfoLinks a{color:#c9b8cf}
