:root {
  --ui-ink:#101827;
  --ui-panel:#172436;
  --ui-line:#8399ae35;
  --ui-ice:#ecf5fb;
  --ui-muted:#b6c8d7;
  --ui-accent:var(--brand-blue-hi);
  --ui-settle:cubic-bezier(.2,.75,.25,1);
}

/* A consistent menu frame for the lobby's secondary pages. */
#gamePanel:not([data-panel="results"]) .game-panel-dialog {
  background:linear-gradient(155deg,#172639 0%,#101a2a 52%,#101827 100%);
  border-color:var(--ui-line);
  box-shadow:0 30px 90px #03080faa;
}
#gamePanel:not([data-panel="results"]) .panel-header {
  padding-block:clamp(14px,2.2vh,26px);
  background:radial-gradient(ellipse at 17% 0%,#20364b,#152234 57%,#131d2b);
}
#gamePanel:not([data-panel="results"]) .panel-navigation {
  background:var(--ui-ink);
}
#gamePanel:not([data-panel="results"]) .panel-navigation button {
  border-radius:7px;
  transition:background-color .16s,color .16s,transform .17s var(--ui-settle);
}
#gamePanel:not([data-panel="results"]) .panel-navigation button.selected {
  background:#e9f2f8;
  color:#172438;
  box-shadow:inset 0 -3px var(--ui-accent);
}
#gamePanel:not([data-panel="results"]) .panel-navigation button:active { transform:scale(.97); }
#gamePanel .panel-content button:focus-visible {
  outline:2px solid #dceeff;
  outline-offset:2px;
}
#gamePanel [data-panel-nav]:focus-visible { outline:2px solid #dceeff;outline-offset:2px; }
#gamePanel .primary-button:not(:disabled) { transition:transform .18s var(--ui-settle),filter .18s; }
#gamePanel .primary-button:not(:disabled):active { transform:translateY(1px) scale(.985); }

#gamePanel[data-panel="store"] .panel-content { padding-block-start:16px; }
#gamePanel .gear-store-toolbar {
  margin:0 0 12px;
  align-items:center;
  padding-bottom:0;
  border:0;
}
#gamePanel .gear-store-categories { gap:6px; }
#gamePanel .gear-store-categories button {
  border-radius:6px;
  background:#18283b;
  border-color:#7896b042;
  min-height:37px;
  transition:background-color .18s,color .18s,border-color .18s;
}
#gamePanel .gear-store-categories button[aria-pressed=true] {
  background:#e9f3fc;color:#162638;border-color:#e9f3fc;
}
#gamePanel .gear-wallet {
  min-width:max-content;
  border-radius:6px;
  color:var(--ui-accent);
  font-variant-numeric:tabular-nums;
}

.shop-spotlight {
  position:relative;
  min-height:292px;
  margin:0 0 14px;
  display:grid;
  grid-template-columns:minmax(260px,.83fr) minmax(0,1.17fr);
  overflow:hidden;
  background:linear-gradient(111deg,#1b2e43 0%,#23364a 41%,#50718c 100%);
  border:1px solid #839db259;
  border-radius:11px;
}
.shop-spotlight-copy {
  align-self:center;
  z-index:2;
  padding:clamp(18px,3.4vw,50px);
  min-width:0;
  animation:shop-copy-in .4s var(--ui-settle) both;
}
.shop-kicker {
  display:block;
  color:#a8d9fe;
  font:700 10px/1.35 var(--body);
  letter-spacing:.145em;
  margin-bottom:9px;
}
.shop-spotlight h3,.shop-product h3 {
  font:900 italic clamp(32px,4.6vw,66px)/.91 var(--display);
  color:var(--ui-ice);
  letter-spacing:-.018em;
  margin:0 0 13px;
  max-width:15ch;
}
.shop-spotlight p,.shop-product p {
  font:500 13px/1.55 var(--body);
  color:#d3e2ef;
  margin:0 0 16px;
  max-width:38ch;
}
.shop-spotlight-actions { display:flex;align-items:center;gap:14px;flex-wrap:wrap; }
.shop-spotlight-actions .primary-button { min-height:46px;gap:16px; }
.shop-item-price {
  font:800 17px var(--display);
  font-variant-numeric:tabular-nums;
  color:#daedff;
  letter-spacing:.045em;
}
.shop-feature-pager { display:flex;align-items:center;gap:7px;margin-top:16px; }
.shop-feature-pager button,.shop-stage .store-live-controls button {
  display:grid;place-items:center;
  min-width:36px;height:36px;
  border:1px solid #c3dcf05c;
  background:#142338a6;
  color:#f1f8ff;
  border-radius:7px;
  font:700 22px/1 var(--display);
  transition:background-color .18s,border-color .18s;
}
.shop-feature-pager button:hover,.shop-stage .store-live-controls button:hover { background:#35536e;border-color:#b9d9ee; }
.shop-feature-pager span { min-width:38px;text-align:center;color:var(--ui-muted);font:700 12px var(--body); }
#gamePanel .shop-stage {
  overflow:hidden;
  position:relative;
  background:
    repeating-radial-gradient(ellipse at 55% 96%,transparent 0 24px,#b9d5ea19 25px 26px,transparent 27px 42px),
    radial-gradient(ellipse at 52% 48%,#688aa3,#344f68 51%,#1c2f45 95%);
}
#gamePanel .shop-stage-featured { min-height:292px;height:100%;border-radius:0; }
.shop-stage canvas {
  position:absolute;inset:0;width:100%;height:100%;display:block;
  animation:shop-stage-in .45s var(--ui-settle) both;
}
.shop-stage .shop-live-label {
  position:absolute;top:13px;right:14px;
  border:1px solid #e1f4ff5e;
  border-radius:4px;
  background:#152438c4;
  color:#e7f5ff;
  padding:6px 8px;
  font:700 9px/1 var(--body);letter-spacing:.13em;
  pointer-events:none;
}
.shop-stage .store-live-controls { position:absolute;z-index:1;right:12px;bottom:10px;display:flex;gap:4px; }
.shop-stage .store-live-controls button { min-width:34px;height:34px; }
.shop-product { border:1px solid var(--ui-line);background:#172638;border-radius:11px; }
.shop-product .store-live-copy {
  align-self:center;
  padding:clamp(16px,3vw,38px);
  min-width:0;
  animation:shop-copy-in .4s var(--ui-settle) both;
}
.shop-product .shop-item-price { display:block; }
#gamePanel .gear-store-grid { gap:10px; }
#gamePanel .gear-store-card {
  border-color:#8399ae50;
  border-radius:8px;
  background:#1b2d40;
  animation:shop-copy-in .36s var(--ui-settle) both;
  animation-delay:calc(var(--shop-index,0) * 22ms);
  transition:transform .2s var(--ui-settle),border-color .2s,box-shadow .2s;
}
#gamePanel .gear-store-card>.gear-image {
  overflow:hidden;
  background:radial-gradient(ellipse at 50% 39%,#4e6c85,#284259 54%,#1a2d43 100%);
}
#gamePanel .gear-store-card .gear-image > img {
  transform:scale(1);
  transition:transform .3s var(--ui-settle),opacity .25s;
}
#gamePanel .gear-store-card:focus-visible { outline-offset:-2px; }
#gamePanel .gear-store-card:focus-visible,.shop-product[data-shop-earned] { border-color:#a2d7fe; }
.shop-notice.shop-receipt {
  width:fit-content;
  margin-top:14px;
  border:1px solid #9be1be77;
  border-left:3px solid #9be1be;
  border-radius:6px;
  background:#163c35;
  color:#e1ffed;
  padding:10px 13px;
  animation:shop-receipt-in .5s var(--ui-settle) both;
}
@media (hover:hover) and (pointer:fine) {
  #gamePanel .gear-store-card:hover {
    transform:translateY(-3px);border-color:#adcde7;
    box-shadow:0 9px 24px #030a1466;
  }
  #gamePanel .gear-store-card:hover .gear-image>img { transform:scale(1.08); }
}
#gamePanel .gear-store-card:active { transform:scale(.985); }
@keyframes shop-copy-in { from {opacity:.45;transform:translateY(8px)} to {opacity:1;transform:none} }
@keyframes shop-stage-in { from {opacity:.25;transform:translateX(10px) scale(.98)} to {opacity:1;transform:none} }
@keyframes shop-receipt-in { from {opacity:.55;transform:translateY(7px) scale(.98)} to {opacity:1;transform:none} }

@media(max-width:690px) {
  .shop-spotlight { grid-template-columns:1fr; }
  .shop-spotlight-copy { padding:18px;grid-row:2; }
  #gamePanel .shop-stage-featured { grid-row:1;height:240px;min-height:0; }
  .shop-spotlight h3,.shop-product h3 { font-size:clamp(29px,9vw,43px); }
  .shop-feature-pager { margin-top:12px; }
  #gamePanel .gear-store-toolbar { align-items:flex-start; }
  #gamePanel .gear-store-card { min-width:0; }
  #gamePanel .gear-store-grid[data-featured] { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-height:500px) and (min-width:691px) {
  .shop-spotlight { min-height:220px; }
  #gamePanel .shop-stage-featured { min-height:220px; }
  .shop-spotlight-copy { padding:16px 24px; }
}
body.reduced-motion #gamePanel .gear-store-card,
body.reduced-motion #gamePanel .shop-spotlight-copy,
body.reduced-motion #gamePanel .shop-stage canvas,
body.reduced-motion #gamePanel .shop-product .store-live-copy,
body.reduced-motion #gamePanel .shop-receipt { animation:none;transition:none; }
@media(prefers-reduced-motion:reduce) {
  #gamePanel .gear-store-card,#gamePanel .shop-spotlight-copy,#gamePanel .shop-stage canvas,
  #gamePanel .shop-product .store-live-copy,#gamePanel .shop-receipt { animation:none;transition:none; }
  #gamePanel .gear-store-card .gear-image>img { transition:none; }
}
