/* MEGA ROBUX V3.9 — Blue Pro. Refinements layered onto V3.8.1.
   Dark mode keeps its existing palette and layout; refinements target clarity.
*/
html[data-theme] {
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[data-theme] :is(button, a, input, textarea, select) { -webkit-tap-highlight-color: transparent; }
html[data-theme] :is(.market-hero-copy h1, .market-packages-hero strong, .market-section-head h2,
  .rbx-use-heading h2, .rbx-spotlight-copy h2, .delivery-hero h1) {
  text-wrap: balance;
}
html[data-theme] :is(.market-hero-copy p,.market-section-head p,.rbx-use-heading p,.market-delivery-grid p){line-height:1.65}
html[data-theme] :is(.market-product-card,.market-buybox,.market-custom,.market-hero,.delivery-grid article){
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  html[data-theme] :is(.market-product-card,.market-delivery-grid a):hover{transform:translateY(-3px)}
}
html[data-theme] :is(.checkout-field input,#robloxUser,#pixCode,#clientPixCode){font-size:16px}
html[data-theme] :is(.market-account,.mr-theme-toggle,.market-buy-top){transition:background .18s ease,border-color .18s ease,box-shadow .18s ease}
/* Premium cool-neutral light mode. Avoid glow and over-saturated blues. */
html[data-theme="light"]{
  --bg:#f7f7f7;--bg-2:#f7f7f7;--panel:#ffffff;--panel-soft:#fafafa;
  --line:#eaeaea;--text:#252525;--muted:#707070;
  --mr-blue:#9d9d9d;--mr-blue-hover:#9d9d9d;
  --shadow:0 16px 50px rgba(46, 46, 46,.045);
}
html[data-theme="light"] :is(.market-hero,.market-buybox,.market-custom,.market-product-card,.delivery-grid article,.market-final-cta){
  border-color:#eaeaea!important;box-shadow:0 10px 28px rgba(42, 42, 42,.045)!important;
}
html[data-theme="light"] :is(.market-hero,.market-final-cta,.market-buybox){background:#ffffff!important}
html[data-theme="light"] :is(.market-hero-copy h1, .market-section-head h2, .buybox-head h2){letter-spacing:-.035em!important}
html[data-theme="light"] .market-product-card:hover{border-color:#c1c1c1!important;box-shadow:0 16px 30px rgba(64, 64, 64,.09)!important}
html[data-theme="light"] .market-buybox .buybox-options button:hover{border-color:#c8c8c8!important;background:#f8f8f8!important}
html[data-theme="light"] :is(.market-proof-pills span,.buybox-proof-row span){color:#606060!important}
html[data-theme="light"] :is(.market-footer,.market-flow){border-color:#e8e8e8!important}
html[data-theme="light"] :is(.market-flow,.market-statusbar){background:#f3f3f3!important}
/* Pix failure: informative, not a scary full-red transaction prompt. */
html[data-theme] .pix-recovery{
  display:flex;align-items:flex-start;gap:13px;padding:18px;margin:15px 0 18px;
  border:1px solid rgba(167, 167, 167,.36);border-radius:16px;
  background:rgba(167, 167, 167,.08);color:var(--text);text-align:left;
}
html[data-theme] .pix-recovery.hidden{display:none!important}
html[data-theme] .pix-recovery-mark{
  width:30px;height:30px;flex:none;border-radius:10px;display:grid;place-items:center;
  color:#9d9d9d;background:rgba(174, 174, 174,.17);font-size:19px;font-weight:900;
}
html[data-theme] .pix-recovery-content{min-width:0;flex:1;display:flex;flex-direction:column;gap:6px}
html[data-theme] .pix-recovery-content>strong{font-size:16px;letter-spacing:-.02em;color:var(--text)}
html[data-theme] .pix-recovery-content>p{color:var(--muted);font-size:13px;line-height:1.55;margin:0}
html[data-theme] .pix-recovery-content>small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}
html[data-theme] .pix-recovery-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:10px}
html[data-theme] .pix-recovery-actions .btn{min-height:38px;padding:9px 13px;font-size:12px;border-radius:10px}
html[data-theme="light"] .pix-recovery{background:#fcfcfc;border-color:#dfdfdf;box-shadow:none}
html[data-theme="light"] .pix-recovery-mark{color:#9d9d9d;background:#f1f1f1}
html[data-theme="dark"] .pix-recovery{background:#1c1c1c;border-color:#535353}
html[data-theme="dark"] .pix-recovery-mark{background:#2c2c2c;color:#d9d9d9}
html[data-theme] :is(.pix-qr-wrap img,.client-pix-card .pix-qr-wrap img):not([src]){visibility:hidden}
@media(max-width:640px){
  html[data-theme] .pix-recovery{padding:14px;gap:9px;border-radius:13px}
  html[data-theme] .pix-recovery-actions{flex-direction:column;align-items:stretch}
  html[data-theme] .pix-recovery-actions .btn{width:100%;justify-content:center}
}
@media(prefers-reduced-motion:reduce){ html[data-theme] :is(.market-product-card,.market-buybox,.market-custom){transition:none!important} }
/* V3.9 checkout legibility fix: legacy checkout had hardcoded dark surfaces in light mode. */
html[data-theme="light"] body.market-v3 :is(.modal-card,.client-pix-card){
  background:#ffffff!important;color:#292929!important;border:1px solid #e5e5e5!important;
  box-shadow:0 28px 90px rgba(30, 30, 30,.19)!important;
}
html[data-theme="light"] body.market-v3 .modal-heading h2,
html[data-theme="light"] .client-pix-card .modal-heading h2{
  color:#282828!important;-webkit-text-fill-color:#282828!important;
}
html[data-theme="light"] body.market-v3 .modal-heading p,
html[data-theme="light"] .client-pix-card .modal-heading p{color:#707070!important}
html[data-theme="light"] body.market-v3 .modal-badge{
  background:#f3f3f3!important;color:#9d9d9d!important;border-color:#e6e6e6!important;
}
html[data-theme="light"] body.market-v3 .checkout-progress{
  background:#f7f7f7!important;border-color:#e9e9e9!important;
}
html[data-theme="light"] body.market-v3 .checkout-progress span{color:#7b7b7b!important}
html[data-theme="light"] body.market-v3 .checkout-progress span.active{color:#9d9d9d!important}
html[data-theme="light"] body.market-v3 .checkout-progress span b{
  background:#ededed!important;color:#9d9d9d!important;border-color:#dadada!important;
}
html[data-theme="light"] body.market-v3 .checkout-progress span.active b{
  color:#ffffff!important;background:#9d9d9d!important;border-color:#9d9d9d!important;
}
html[data-theme="light"] body.market-v3 .order-summary{background:transparent!important}
html[data-theme="light"] body.market-v3 .order-summary>div{
  background:#f9f9f9!important;border:1px solid #e7e7e7!important;
}
html[data-theme="light"] body.market-v3 .order-summary .summary-total{background:#f5f5f5!important;border-color:#e4e4e4!important}
html[data-theme="light"] body.market-v3 .order-summary span{color:#737373!important}
html[data-theme="light"] body.market-v3 .order-summary strong{color:#313131!important}
html[data-theme="light"] body.market-v3 .order-summary .summary-total strong{color:#9d9d9d!important}
html[data-theme="light"] :is(.checkout-account-state,.order-created-box){
  background:#f9f9f9!important;color:#3a3a3a!important;border-color:#e7e7e7!important;
}
html[data-theme="light"] .checkout-account-state.is-authenticated{
  background:#f7f7f7!important;border-color:#e3e3e3!important;
}
html[data-theme="light"] .checkout-account-state strong{color:#323232!important}
html[data-theme="light"] .checkout-account-state small{color:#717171!important}
html[data-theme="light"] .order-created-box{background:#f6f6f6!important;color:#5e5e5e!important;border-color:#e4e4e4!important}
html[data-theme="light"] .order-created-box strong{color:#505050!important}
html[data-theme="light"] .checkbox-field{color:#444444!important}
html[data-theme="light"] :is(.modal-safe,.checkout-copy-link,.checkout-delivery-link,.checkout-delivery-link strong){color:#686868!important}
html[data-theme="light"] :is(.pix-provider,.pix-order-line,.pix-waiting,.pix-success){background:#f8f8f8!important;color:#3b3b3b!important;border-color:#e9e9e9!important}
html[data-theme="light"] .pix-status.pending{background:#f1f1f1!important;color:#9d9d9d!important;border-color:#e4e4e4!important}
html[data-theme="light"] .pix-copy-area textarea{background:#ffffff!important;color:#303030!important;border-color:#e4e4e4!important}
html[data-theme="light"] .pix-provider strong{color:#313131!important}
html[data-theme="light"] body.market-v3 .checkout-progress span,
html[data-theme="light"] body.market-v3 .checkout-progress span.active{
  height:auto!important;min-height:26px!important;background:transparent!important;
  border:0!important;box-shadow:none!important;white-space:nowrap!important;
  display:flex!important;gap:7px!important;align-items:center!important;justify-content:center!important;
}
html[data-theme="light"] body.market-v3 .checkout-progress i{background:#dddddd!important;height:1px!important}
html[data-theme="light"] body.market-v3 .checkout-progress span .pix-mark{flex:none}
