.commerce-shelf{width:100%;min-height:44px;border:2px solid #fff5df;border-radius:14px;background:#fff0d8;color:#954168;font-family:inherit;font-weight:800;padding:8px 12px;margin:8px 0;cursor:pointer;box-shadow:0 3px 0 #d6a3a34a}
.commerce-dialog{max-height:90dvh;overflow:auto;width:min(92vw,480px)}
.commerce-balance{font-size:28px;font-weight:900;color:#a86b20;background:#fff8e3;padding:14px;border-radius:16px;text-align:center}
.commerce-demo{background:#ffe2a1;color:#79522c;border-radius:12px;padding:10px;font-weight:900;font-size:12px}
.commerce-body{display:flex;flex-direction:column;gap:10px}.commerce-body p{margin:2px 0;font-size:13px;line-height:1.45}
.commerce-action{min-height:44px;border:2px solid #fff;border-radius:14px;background:#f8d5dc;color:#873958;font-family:inherit;font-weight:800;font-size:13px;padding:10px;cursor:pointer}.commerce-action:disabled{opacity:.4;cursor:default}
.commerce-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));width:100%;max-width:360px;margin:auto;gap:2px}
.commerce-cell{aspect-ratio:1;display:flex;align-items:center;justify-content:center;border-radius:7px;border:1px solid #87c7ce;background:#286777;color:#fff7d7;font-weight:900;font-size:15px;padding:0;min-width:0;min-height:44px}.commerce-cell.selected{background:#a74f71;outline:2px solid #ffe9a2;outline-offset:-3px}
.commerce-order{display:flex;align-items:center;justify-content:space-between;gap:8px}.commerce-order .commerce-action{flex:1}.commerce-message{color:#386d59;font-weight:800}
.commerce-action:focus-visible,.commerce-cell:focus-visible,.commerce-shelf:focus-visible{outline:3px solid #9e3766;outline-offset:2px}

/* Keep the header and purchase action visible; only the preview scrolls. */
#commerce-dialog{padding:0;border:2px solid #fffaf1;border-radius:28px;background:#fffaf2;color:#573c52;width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overflow:hidden;box-shadow:0 5px 0 #d5b6a4,0 24px 80px #392b4266}
#commerce-dialog[open]{display:flex;flex-direction:column}
#commerce-dialog .commerce-header{flex:none;padding:20px 20px 12px;background:linear-gradient(135deg,#fffdf8,#f9f0e6);border-bottom:1px solid #eaded2}
#commerce-dialog .commerce-heading{display:flex;align-items:center;gap:12px}
#commerce-dialog .commerce-heading>div{flex:1;min-width:0}
#commerce-dialog .commerce-eyebrow{font-size:10px;letter-spacing:2px;font-weight:900;color:#84647d}
#commerce-dialog h2{clear:none;font-size:27px;line-height:1.1;margin:3px 0 0;color:#573c52}
#commerce-dialog .dialog-close{position:static;float:none;flex:none;width:44px;height:44px;margin:0;box-shadow:none;border:1px solid #e7d9ce;background:#fffaf3;color:#755267;border-radius:14px}
.commerce-emblem{width:42px;height:42px;flex:none;display:grid;place-items:center;border-radius:13px;background:#eee2f3;color:#795291;font-size:26px;box-shadow:inset 0 0 0 1px #fff8}
#commerce-dialog .commerce-balance{display:flex;gap:8px;font-size:14px;background:none;padding:0;margin:14px 0 0;text-align:left}
.balance-chip{display:inline-flex;align-items:center;min-height:30px;padding:4px 10px;border-radius:10px;font-weight:900}
.balance-chip.coins{background:#f6e9c9;color:#785520}.balance-chip.lives{background:#f4e5eb;color:#873854}
#commerce-dialog .life-clock{font-size:12px;margin:8px 0 0}.life-clock:empty{display:none}
#commerce-dialog .commerce-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px 20px 18px;gap:12px;scrollbar-width:thin;scrollbar-color:#c6b4c1 transparent}
#commerce-dialog .commerce-body>*,#commerce-dialog .commerce-footer>*{flex-shrink:0}
#commerce-dialog .commerce-body p{font-size:14px;line-height:1.5;color:#785f72}
#commerce-dialog .commerce-nav{display:flex;gap:4px;margin:0;padding:4px;border-radius:12px;background:#eee5df}
#commerce-dialog .commerce-nav button{min-height:36px;padding:6px 8px;border:0;border-radius:9px;background:none;box-shadow:none;font-size:12px;color:#785f72}
#commerce-dialog .commerce-nav [aria-pressed=true]{background:#fffaf2;color:#573c52;box-shadow:0 1px 4px #573c5212}
#commerce-dialog .commerce-allowance{align-self:flex-start;font-size:11px;font-weight:800;padding:4px 9px;border-radius:8px;background:#f0e9f1;color:#775383}
#commerce-dialog .bonus-hero{display:flex;align-items:center;gap:18px;margin:8px 0 2px;min-width:0}
#commerce-dialog .bonus-hero>div{min-width:0}
#commerce-dialog .bonus-hero h3{font-size:24px;line-height:1.15;color:#573c52;margin:0 0 6px;outline-offset:3px}
#commerce-dialog .bonus-hero p{margin:0;font-size:13px;line-height:1.45}
.bonus-mark{position:relative;isolation:isolate;flex:none;width:76px;height:76px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(145deg,#9fd8ca,#72b7ac);color:#24574f;font-family:var(--display);font-size:36px;border:2px solid #edfff6;box-shadow:0 5px 0 #518e87,0 8px 16px #4779701a;transform:rotate(-5deg)}
.bonus-mark::before{content:'';position:absolute;inset:-7px 5px 6px -5px;border-radius:20px;background:#d8ebe5;border:1px solid #fff9;z-index:-1;transform:rotate(13deg)}
.bonus-mark.small{width:44px;height:44px;border-radius:12px;font-size:22px;margin:3px}.bonus-mark.small::before{border-radius:12px;inset:-4px 3px 4px -3px}
#commerce-dialog .bonus-outcome{border:1px solid #d8e6dd;background:#f0f7f0;border-radius:18px;padding:14px 18px;text-align:center;margin:4px 0 0}
#commerce-dialog .bonus-outcome-label{font-size:11px;font-weight:900;letter-spacing:.8px;color:#4d7061;margin:0}
.bonus-outcome-values{display:flex;align-items:center;justify-content:center;gap:24px;font-family:var(--display);font-size:44px;line-height:1.25;margin-top:4px}.bonus-outcome-values .before{color:#96a99b;font-size:32px}.bonus-outcome-values .arrow{font-family:inherit;font-size:26px;color:#94ae9f}.bonus-outcome-values .after{color:#326552}
#commerce-dialog .bonus-life{color:#37644d;text-align:center;font-size:13px;line-height:1.4;font-weight:800;margin:0}.bonus-life::before{content:'✓';margin-right:7px}
#commerce-dialog .bonus-stars{font-size:12px;line-height:1.4;text-align:center;color:#8a6d42;margin:0 0 6px}.bonus-stars::before{content:'★★';letter-spacing:2px;color:#b48a37;margin-right:7px}
#commerce-dialog .commerce-footer{flex:none;padding:14px 20px 12px;border-top:1px solid #eaded2;background:#fffaf2;display:flex;flex-direction:column;gap:4px}
#commerce-dialog .commerce-footer:empty{display:none}
#commerce-dialog .commerce-action{border:1px solid #e9d9dc;background:#f4e7ec;color:#704763;min-height:44px;font-size:14px;padding:10px 12px;box-shadow:none}
#commerce-dialog .commerce-primary{background:#864b75;border:1px solid #773e65;border-bottom:4px solid #623153;border-radius:15px;color:#fffaf2;font-size:15px;min-height:50px;font-weight:900;box-shadow:0 3px 10px #7840631a}
#commerce-dialog .commerce-link,#commerce-dialog .commerce-free{background:transparent;border:0;color:#785f72;font-size:13px;padding:10px;box-shadow:none;min-height:44px}
#commerce-dialog .commerce-free{border-top:1px solid #eee4dc;color:#79516a;font-size:12px;border-radius:0}
#commerce-dialog .commerce-option{display:flex;text-align:left;align-items:center;gap:12px;padding:14px 10px;border:1px solid #e4d8d0;background:#fffcf7;border-radius:18px}
.commerce-option-copy{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.commerce-option-copy strong{font-size:15px}.commerce-option-copy>span{font-size:14px;line-height:1.45;color:#785f72;font-weight:500}.commerce-price{font-size:14px;white-space:nowrap;color:#785520;align-self:flex-start}
#commerce-dialog .commerce-message{margin:0;padding:0 20px 12px;font-size:12px}#commerce-dialog .commerce-message:empty{display:none}
#commerce-dialog button:focus-visible{outline:3px solid #825293;outline-offset:-3px}
#commerce-dialog button:disabled{opacity:.5}
#commerce-dialog .commerce-nav .commerce-action{min-height:44px}
@media(max-width:350px){#commerce-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px)}#commerce-dialog.game-dialog .commerce-body{padding-left:8px;padding-right:8px}}
@media(orientation:landscape) and (max-height:550px){
  #commerce-dialog{width:min(760px,calc(100vw - 32px));height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}
  #commerce-dialog[open]{display:grid;grid-template-columns:minmax(0,1fr) 220px;grid-template-rows:auto minmax(0,1fr)}
  #commerce-dialog .commerce-header{grid-column:1/-1;display:flex;align-items:center;gap:14px;padding:8px 14px}
  #commerce-dialog .commerce-heading{flex:1;min-width:0}
  #commerce-dialog .commerce-balance{margin:0;flex:none}
  #commerce-dialog .commerce-eyebrow{display:none}
  #commerce-dialog h2{font-size:23px}
  #commerce-dialog .life-clock{max-width:190px;margin:0}
  #commerce-dialog .commerce-body{grid-column:1;grid-row:2;padding:12px;min-height:0}
  #commerce-dialog .commerce-footer{grid-column:2;grid-row:2;overflow-y:auto;min-height:0;padding:12px;border-top:0;border-left:1px solid #eaded2}
  #commerce-dialog .commerce-body:has(+.commerce-footer:empty){grid-column:1/-1}
  #commerce-dialog .commerce-message{grid-column:1/-1;padding:6px 12px;max-height:44px;overflow-y:auto}
}
@media(max-width:350px),(max-height:650px){#commerce-dialog .commerce-header{padding:12px 16px 10px}#commerce-dialog h2{font-size:24px}#commerce-dialog .commerce-balance{margin-top:8px}#commerce-dialog .commerce-body{padding:10px 16px 12px;gap:9px}#commerce-dialog .commerce-footer{padding:10px 16px 8px}.bonus-mark{width:60px;height:60px;font-size:30px;border-radius:17px}.bonus-mark::before{border-radius:17px}#commerce-dialog .bonus-hero{gap:14px;margin:4px 0}#commerce-dialog .bonus-hero h3{font-size:21px}#commerce-dialog .bonus-outcome{padding:10px 14px}.bonus-outcome-values{font-size:36px}#commerce-dialog .commerce-option{gap:9px}.commerce-option-copy>span{font-size:14px}}
