/* Scratch card stays within the existing campaign themes and brand color. */
.cx-scratch-stage{width:100%;max-width:480px;margin:auto}
.cx-scratch-card{padding:18px;border:1px solid var(--cx-line);border-radius:18px;background:var(--cx-surface);box-shadow:0 12px 30px rgba(25,39,57,.08)}
.cx-scratch-card-head,.cx-scratch-card-foot{display:flex;align-items:center;justify-content:space-between;gap:16px}
.cx-scratch-card-head{min-height:38px;margin-bottom:14px;font-size:11px;color:var(--cx-muted)}
.cx-scratch-card-brand{display:flex;align-items:center;gap:9px;min-width:0;color:var(--cx-text)}
.cx-scratch-brand-logo:empty{display:none}
.cx-scratch-brand-logo img{display:block;width:30px;height:30px;object-fit:contain;border-radius:7px;background:#fff}
.cx-scratch-card-brand strong{font-size:13px;font-weight:700;overflow-wrap:anywhere}
.cx-scratch-window{position:relative;width:100%;min-width:0;aspect-ratio:1.5/1;overflow:hidden;border:1px solid var(--cx-line);border-radius:13px;background:var(--cx-game)}
.cx-scratch-result{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:20px;text-align:center;color:var(--cx-text)}
.cx-scratch-result>span{font-size:11px;color:var(--cx-muted)}
.cx-scratch-result>strong{max-width:100%;font-size:clamp(19px,2.4vw,27px);line-height:1.55;font-weight:800;overflow-wrap:anywhere;text-wrap:balance}
.cx-scratch-result>p{max-width:100%;margin:0;color:var(--cx-muted);font-size:12px;line-height:1.8;overflow-wrap:anywhere;text-wrap:pretty}
.cx-scratch-cover{position:absolute;inset:0;z-index:1;overflow:hidden;background:linear-gradient(145deg,#ffffff33,transparent 65%),var(--sc-coat-base,var(--cx-accent));color:var(--sc-coat-ink,var(--cx-accent-ink));transition:opacity .18s ease-out}
.cx-scratch-cover::after{content:"";position:absolute;inset:12px;border:1px solid currentColor;border-radius:7px;opacity:.28;pointer-events:none}
.cx-scratch-cover canvas{position:absolute;inset:0;display:block;width:100%;height:100%;color:var(--sc-coat-base,var(--cx-accent));opacity:0;pointer-events:none;touch-action:none;cursor:grab}
.cx-scratch-stage.is-ready .cx-scratch-cover{background:transparent}
.cx-scratch-stage.is-ready canvas{opacity:1;pointer-events:auto}
.cx-scratch-stage.is-ready canvas:active{cursor:grabbing}
.cx-scratch-cover-copy{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:25px;text-align:center;pointer-events:none;transition:opacity .15s ease-out}
.cx-scratch-cover-copy svg{width:40px;height:40px;margin-bottom:7px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cx-scratch-cover-copy strong{font-size:19px;line-height:1.6;font-weight:700;text-wrap:balance}
.cx-scratch-cover-copy span{font-size:11px;line-height:1.8}
.cx-scratch-stage.is-scratching .cx-scratch-cover-copy{opacity:0}
.cx-scratch-stage.is-revealed .cx-scratch-cover{opacity:0;pointer-events:none}
.cx-scratch-card-foot{padding-top:14px;font-size:10px;line-height:1.7;color:var(--cx-muted)}
.cx-scratch-card-foot span:last-child{text-align:left}
.cx-scratch-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin-top:12px}
.cx-scratch-controls p{margin:0;color:var(--cx-muted);font-size:11px;line-height:1.8;text-wrap:pretty}
.cx-scratch-reveal-button{flex-shrink:0;min-height:40px;padding:8px 12px;border:1px solid var(--cx-line);border-radius:9px;background:var(--cx-surface);color:var(--cx-text);font-size:11px;font-weight:600;cursor:pointer}
.cx-scratch-reveal-button:hover{border-color:var(--cx-accent)}
.cx-scratch-reveal-button:focus-visible{outline:3px solid var(--cx-accent);outline-offset:3px}
.cx-scratch-reveal-button[hidden]{display:none}
.cx-scratch-stage.is-no-canvas .cx-scratch-cover{background:var(--cx-accent)}
.cx-editorial .cx-scratch-card,.cx-editorial .cx-scratch-window,.cx-editorial .cx-scratch-reveal-button{border-radius:4px}
.cx-editorial .cx-scratch-cover::after{border-radius:2px}
.cx-soft .cx-scratch-card{border-radius:24px}
.cx-soft .cx-scratch-window{border-radius:17px}
.cx-studio .cx-scratch-card{border-radius:12px}
.cx-result-scratch .cx-result-symbol{--cx-accent:var(--cx-dialog-accent)}
.cx-result-scratch .cx-button{background:var(--cx-dialog-accent);color:var(--cx-dialog-ink)}
@media(min-width:761px) and (max-width:900px){
  .cx-scratch-page .cx-shell{max-width:700px;grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:'intro' 'game' 'entry';min-height:0;row-gap:28px}
  .cx-scratch-page .cx-intro,.cx-scratch-page .cx-entry{align-self:auto}
}
@media(max-width:760px){
  .cx-scratch-card{padding:14px}
  .cx-scratch-window{height:clamp(200px,56vw,260px);aspect-ratio:auto}
  .cx-scratch-controls{flex-direction:column;align-items:stretch;text-align:center}
  .cx-scratch-reveal-button{width:100%}
}
@media(max-width:420px){
  .cx-scratch-card{padding:12px}
  .cx-scratch-card-head{gap:8px}
  .cx-scratch-card-foot{font-size:9px}
  .cx-scratch-cover-copy strong{font-size:17px}
}
@media(prefers-reduced-motion:reduce){.cx-scratch-cover,.cx-scratch-cover-copy{transition:none}}
/* Shared layout and palette choices, without changing the server-backed scratch game. */
.cx-scratch-page[class*="sc-theme-"]{background:var(--cx-backdrop);overflow:clip}
.cx-scratch-page [hidden]{display:none!important}
.cx-scratch-page .cx-logo.has-image{display:flex;align-items:center;justify-content:center;width:auto;height:72px;max-width:220px;flex:0 1 auto;min-width:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}
.cx-scratch-page .cx-logo.has-image img{display:block;width:auto;height:auto;max-width:min(220px,60vw);max-height:72px;object-fit:contain;flex:0 1 auto}
.cx-scratch-page .cx-brand-copy{min-width:0}.cx-scratch-page .cx-brand-copy strong{overflow-wrap:anywhere}
.cx-scratch-page[class*="sc-theme-"] .cx-shell{min-height:0;padding:36px;gap:32px;border-radius:24px}
.cx-scratch-page.sc-theme-gift_center .cx-header{justify-content:center}.cx-scratch-page.sc-theme-gift_center .cx-header-label{display:none}
.cx-scratch-page.sc-theme-gift_center .cx-shell{max-width:800px;grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:'intro' 'game' 'entry'}
.cx-scratch-page.sc-theme-gift_center .cx-intro{width:100%;max-width:660px;margin:auto;text-align:center;align-self:auto}
.cx-scratch-page.sc-theme-gift_center .cx-intro>p{margin-inline:auto}
.cx-scratch-page.sc-theme-gift_center .cx-entry{width:100%;max-width:480px;margin:auto}
.cx-scratch-page.sc-theme-gift_split .cx-shell{max-width:1160px;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);grid-template-rows:auto 1fr;grid-template-areas:'intro game' 'entry game';column-gap:44px;row-gap:26px}
.cx-scratch-page.sc-theme-gift_split.sc-game-right .cx-shell{grid-template-areas:'game intro' 'game entry'}
.cx-scratch-page.sc-theme-gift_split .cx-intro{text-align:right;max-width:none;margin:0;align-self:end}
.cx-scratch-page.sc-theme-gift_split .cx-intro>p{margin-inline:0}
.cx-scratch-page[class*="sc-theme-"] .cx-intro h1{font-size:clamp(28px,3vw,42px);line-height:1.6;letter-spacing:normal;margin:12px 0;text-wrap:balance}
.cx-scratch-page[class*="sc-theme-"] .cx-intro>p{font-size:15px;line-height:2;text-wrap:pretty}
.cx-scratch-page[class*="sc-theme-"] .cx-intro{display:block}
.cx-scratch-page[class*="sc-theme-"] .cx-intro>.sc-badge{display:inline-flex;max-width:100%;padding:7px 16px;margin:0 0 4px;border:1px solid var(--cx-line);border-radius:999px;font-size:13px;font-weight:600;background:var(--cx-tint);color:var(--sc-emphasis);overflow-wrap:anywhere}
.cx-scratch-page.cx-contrast .cx-intro>.sc-badge{background:var(--cx-game)}
.cx-scratch-page[class*="sc-theme-"] .cx-game{padding:22px;background:var(--sc-paper);border:1px solid var(--cx-line);border-radius:20px;gap:22px}
.cx-scratch-page.cx-contrast .cx-game{background:var(--cx-game)}
.cx-scratch-page .cx-scratch-card{padding:20px;border-radius:18px;border-bottom:4px solid var(--cx-accent);background:var(--cx-surface)}
.cx-scratch-page .cx-scratch-card-head{font-size:12px;line-height:1.9;flex-wrap:wrap}
.cx-scratch-page .cx-scratch-brand-logo{display:flex;align-items:center;min-width:0;max-width:100px}
.cx-scratch-page .cx-scratch-brand-logo:empty{display:none}
.cx-scratch-page .cx-scratch-brand-logo img{width:auto;height:auto;max-width:100px;max-height:34px;border-radius:0;background:transparent}
.cx-scratch-page .cx-scratch-window{border:2px solid var(--sc-detail);border-radius:14px}
.cx-scratch-page .cx-scratch-card-foot{font-size:11px;gap:12px;flex-wrap:wrap}
.cx-scratch-page .cx-scratch-cover-copy span,.cx-scratch-page .cx-scratch-controls p{font-size:12px}
.cx-scratch-page .cx-scratch-reveal-button{min-height:44px;font-size:12px}
.cx-scratch-page .cx-form-heading h2{font-size:20px}.cx-scratch-page .cx-fields label>span{font-size:13px}
.cx-scratch-page .cx-fields input{font-size:16px}.cx-scratch-page .cx-button{min-height:56px;font-size:15px;border-radius:14px}
.cx-scratch-page.cx-editorial .cx-scratch-card,.cx-scratch-page.cx-editorial .cx-scratch-window{border-radius:6px}
.cx-scratch-page.cx-cartoon .cx-scratch-card{border:2px solid #172923;box-shadow:4px 5px 0 #172923}
@media(max-width:900px){.cx-scratch-page[class*="sc-theme-"] .cx-shell,.cx-scratch-page.sc-theme-gift_split.sc-game-right .cx-shell{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:'intro' 'game' 'entry';max-width:700px;padding:26px;gap:26px}.cx-scratch-page.sc-theme-gift_split .cx-intro{align-self:auto}.cx-scratch-page .cx-entry{width:100%;max-width:480px;margin:auto}}
@media(max-width:600px){.cx-scratch-page{padding-inline:16px}.cx-scratch-page .cx-header{height:auto;min-height:94px;padding-block:16px;gap:12px}.cx-scratch-page .cx-logo.has-image{height:60px;max-width:180px}.cx-scratch-page .cx-logo.has-image img{max-height:60px;max-width:min(180px,58vw)}.cx-scratch-page[class*="sc-theme-"] .cx-shell{padding:20px 16px;border-radius:20px;gap:24px}.cx-scratch-page[class*="sc-theme-"] .cx-game{padding:14px}.cx-scratch-page .cx-scratch-card{padding:14px}.cx-scratch-page .cx-fields{grid-template-columns:minmax(0,1fr)}.cx-scratch-page .cx-footer{flex-wrap:wrap;font-size:12px}}
/* The coating and revealed result use the same theme, including Crystal dark. */
.cx-scratch-page.sc-theme-glass{--sc-coat-base:var(--gl-disc);--sc-coat-ink:var(--gl-text)}
.cx-scratch-page.sc-theme-glass .cx-scratch-cover{background:linear-gradient(145deg,#ffffff33,transparent 65%),var(--sc-coat-base);color:var(--sc-coat-ink)}
.cx-scratch-page.sc-theme-glass .cx-scratch-stage.is-ready .cx-scratch-cover{background:transparent}
.cx-result-modal.cx-result-scratch{background:var(--cx-surface,#fff);color:var(--cx-text,#18212e);border-color:var(--cx-line,#e6ebf1);box-shadow:0 24px 70px #10203033}
.cx-result-scratch .cx-result-text,.cx-result-scratch .cx-result-eyebrow,.cx-result-scratch .cx-coupon>span,.cx-result-scratch .cx-coupon small,.cx-result-scratch .cx-claim>span{color:var(--cx-muted,#677383)}
.cx-result-scratch .cx-result-symbol{--cx-line:inherit;--cx-game:inherit;--cx-accent:var(--cx-dialog-accent);background:var(--sc-paper,#f5f7fb);border-color:var(--cx-line,#e6ebf1)}
.cx-result-scratch .cx-coupon,.cx-result-scratch .cx-claim,.cx-result-scratch .cx-modal-close{background:var(--cx-input,#f8fafc);border-color:var(--cx-line,#e6ebf1);color:var(--cx-text,#18212e)}
.cx-result-scratch .cx-coupon code,.cx-result-scratch .cx-claim code{color:var(--cx-text,#18212e)}
.cx-result-scratch .cx-copy-coupon,.cx-result-scratch .cx-reward-action{background:var(--cx-input,#fff);border-color:var(--cx-line,#e6ebf1);color:var(--cx-text,#18212e)}
.cx-result-scratch .cx-modal-close{width:44px;height:44px;display:grid;place-items:center;top:8px;left:8px}
.cx-result-scratch :is(button,a):focus-visible{outline:3px solid var(--cx-dialog-accent);outline-offset:3px}
.cx-result-scratch.gw-glass-dialog .cx-result-symbol{background:var(--gl-surface);border-color:var(--gl-line)}
.cx-result-scratch.gw-glass-dialog .cx-result-symbol svg{stroke:var(--gl-icon)}
.cx-result-scratch.gw-glass-dialog .cx-button{background:var(--gl-button);color:var(--gl-button-ink)}
.cx-result-scratch.gw-glass-dialog .cx-button:focus-visible{outline-color:var(--gl-text)}
.cx-scratch-page :is(.cx-button,.cx-sound-toggle,.cx-scratch-reveal-button):focus-visible{outline:3px solid var(--cx-text);outline-offset:3px}
.cx-result-scratch::backdrop{backdrop-filter:none}
