/* WEBELITE V186: one scoped finishing layer for the stock game.
   Existing game storage, pricing, trading and mascot assets are untouched. */
.challenge .market-section,
.challenge .stock-preview,
.challenge .market-chart{min-width:0;max-width:100%}
.challenge .market-section .index-tabs{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;margin:12px 0!important
}
.challenge .market-section .index-tab{
  min-width:0!important;min-height:48px!important;margin:0!important;
  padding:10px 5px!important;line-height:1.2!important;
  font-size:clamp(11px,2.7vw,15px)!important;white-space:normal!important;
  overflow-wrap:normal!important;hyphens:none!important
}
.challenge .stock-preview .preview-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important
}
.challenge .market-section .preview-stock{
  box-sizing:border-box!important;min-width:0!important;min-height:174px!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;
  justify-content:flex-start!important;gap:5px!important;
  padding:12px 9px!important;text-align:center!important;
  background:#102c58!important;color:#fff!important;
  border:1px solid #41669a!important;border-radius:15px!important;
  overflow:hidden!important
}
.challenge .market-section .preview-stock strong{
  display:block!important;width:100%!important;min-width:0!important;
  font-size:clamp(12px,3.3vw,15px)!important;line-height:1.25!important;
  color:#fff!important;hyphens:none!important;word-break:normal!important;
  overflow-wrap:break-word!important;text-wrap:balance!important
}
.challenge .market-section .preview-stock small{
  color:#d9e9ff!important;line-height:1.25!important
}
.challenge .market-section .preview-stock>span:last-child{
  margin-top:auto!important;color:#ffe072!important;
  white-space:nowrap!important;font-variant-numeric:tabular-nums!important
}
.challenge .market-section .preview-stock .stock-symbol{
  flex:0 0 48px!important;width:48px!important;height:48px!important;
  margin:0 auto 3px!important
}
.challenge .stock-symbol.has-brand-icon{
  display:grid!important;place-items:center!important;background:#fff!important;
  border-radius:12px!important;overflow:hidden!important;opacity:1!important
}
.challenge .stock-symbol.has-brand-icon img{
  display:block!important;width:100%!important;height:100%!important;
  object-fit:contain!important;opacity:1!important;filter:none!important
}
.challenge .stock-preview .preview-count{
  margin:4px 0 10px;color:#dbeaff;font-size:13px;line-height:1.4
}
.challenge .stock-preview .preview-heading{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  gap:9px!important;align-items:center!important
}
.challenge .stock-preview .preview-heading h3{
  min-width:0!important;margin:0!important;line-height:1.3!important;
  font-size:clamp(13px,3.3vw,17px)!important
}
.challenge .stock-preview #show-all{
  min-width:0!important;min-height:44px!important;margin:0!important;
  padding:9px 10px!important;white-space:nowrap!important
}
.challenge .stock-modal[hidden]{display:none!important}
.challenge .stock-modal .stock-modal-panel{
  box-sizing:border-box!important;width:min(100%,560px)!important;
  max-height:min(90dvh,780px)!important;overflow-y:auto!important;
  overscroll-behavior:contain!important
}
.challenge .stock-modal .modal-heading h2{min-width:0;overflow-wrap:break-word}
.challenge .trade-panel .trade-metrics>div{min-width:0;overflow-wrap:break-word}
.challenge .trade-panel #trade-total{font-variant-numeric:tabular-nums}
.challenge .market-chart .wealth-chart-svg{display:block;max-width:100%;height:auto}
.challenge .market-chart #chart-caption{overflow-wrap:break-word}
.challenge .preview-stock:focus-visible,
.challenge .index-tab:focus-visible,
.challenge .modal-stock:focus-visible,
.challenge .stock-modal button:focus-visible,
.challenge .stock-modal input:focus-visible{
  outline:3px solid #ffe06b!important;outline-offset:3px!important
}
@media(max-width:390px){
  .challenge .stock-preview .preview-grid{gap:8px!important}
  .challenge .market-section .preview-stock{min-height:172px!important;padding:10px 6px!important}
  .challenge .stock-preview .preview-heading{grid-template-columns:1fr!important}
  .challenge .stock-preview #show-all{justify-self:start!important}
  .challenge .trade-panel .trade-metrics{grid-template-columns:1fr!important}
}
@media(prefers-reduced-motion:reduce){
  .challenge .preview-stock,.challenge .modal-stock{transition:none!important;transform:none!important}
}
