html[data-wd-theme="light"]{
  color-scheme:light;
  --wd-page-bg:#f4f1e8;
  --wd-surface:#ffffff;
  --wd-surface-raised:#fbfaf6;
  --wd-surface-soft:#ece8dd;
  --wd-text:#17171c;
  --wd-text-muted:#55535d;
  --wd-border:#77727f;
  --wd-accent:#4b2fe8;
  --wd-accent-text:#ffffff;
  --wd-link:#3020ad;
  --wd-success:#176b36;
  --wd-warning:#7a5200;
  --wd-danger:#a61f34;
  --wd-focus:#2015b8;
  --wd-disabled:#77727f;
  --wd-shadow:#1f1b2b24;
  --wd-selection-bg:#2416b9;
  --wd-selection-text:#ffffff;
}

html[data-wd-theme="high_contrast"]{
  color-scheme:dark;
  --wd-page-bg:#000000;
  --wd-surface:#000000;
  --wd-surface-raised:#000000;
  --wd-surface-soft:#000000;
  --wd-text:#ffffff;
  --wd-text-muted:#ffffff;
  --wd-border:#ffffff;
  --wd-accent:#ffff00;
  --wd-accent-text:#000000;
  --wd-link:#00ffff;
  --wd-success:#00ff66;
  --wd-warning:#ffff00;
  --wd-danger:#ff4d4d;
  --wd-focus:#00ffff;
  --wd-disabled:#d0d0d0;
  --wd-shadow:#000000;
  --wd-selection-bg:#ffff00;
  --wd-selection-text:#000000;
}

::selection{
  background:var(--wd-selection-bg);
  color:var(--wd-selection-text);
}

:where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid var(--wd-focus)!important;
  outline-offset:3px!important;
}

:where(button,[role="button"],a[class*="button"],a[class*="link"]){
  min-block-size:44px;
}

html[data-wd-theme="light"] body,
html[data-wd-theme="high_contrast"] body{
  background:var(--wd-page-bg)!important;
  color:var(--wd-text)!important;
}

html[data-wd-theme="light"] :where(p,small,.help,.panel-help,.microcopy,.empty-state),
html[data-wd-theme="high_contrast"] :where(p,small,.help,.panel-help,.microcopy,.empty-state){
  color:var(--wd-text-muted)!important;
}

html[data-wd-theme="light"] :where(a:not(.primary-button):not(.staging-button):not(.play-link):not(.share-cta):not(.primary-link)),
html[data-wd-theme="high_contrast"] :where(a:not(.primary-button):not(.staging-button):not(.play-link):not(.share-cta):not(.primary-link)){
  color:var(--wd-link)!important;
}

html[data-wd-theme="light"] :where(
  .staging-card,.account-card,.friends-panel,.analytics-panel,.sharing-panel,
  .feedback-panel,.access-panel,.share-card,.universe-toolbar,.game-card,.a11y-panel,
  worddecks-leaderboard
),
html[data-wd-theme="high_contrast"] :where(
  .staging-card,.account-card,.friends-panel,.analytics-panel,.sharing-panel,
  .feedback-panel,.access-panel,.share-card,.universe-toolbar,.game-card,.a11y-panel,
  worddecks-leaderboard
){
  background:var(--wd-surface)!important;
  color:var(--wd-text)!important;
  border-color:var(--wd-border)!important;
  box-shadow:0 14px 40px var(--wd-shadow)!important;
}

html[data-wd-theme="light"] :where(input,select,textarea),
html[data-wd-theme="high_contrast"] :where(input,select,textarea){
  background:var(--wd-surface-raised)!important;
  color:var(--wd-text)!important;
  border-color:var(--wd-border)!important;
}

html[data-wd-theme="light"] :where(input,select,textarea)::placeholder,
html[data-wd-theme="high_contrast"] :where(input,select,textarea)::placeholder{
  color:var(--wd-text-muted)!important;
  opacity:1!important;
}

html[data-wd-theme="light"] :where(
  .primary-button,.staging-button,.play-link,.share-cta,.primary-link,
  .favourites-filter[aria-pressed="true"],.category-chip[aria-pressed="true"]
),
html[data-wd-theme="high_contrast"] :where(
  .primary-button,.staging-button,.play-link,.share-cta,.primary-link,
  .favourites-filter[aria-pressed="true"],.category-chip[aria-pressed="true"]
){
  background:var(--wd-accent)!important;
  color:var(--wd-accent-text)!important;
  border-color:var(--wd-accent)!important;
}

html[data-wd-theme="light"] :where(
  .secondary-button,.text-button,.favourites-filter,.category-chip,
  .universe-links a,.heart-button,.small-button,.facebook-button,.reward-button
),
html[data-wd-theme="high_contrast"] :where(
  .secondary-button,.text-button,.favourites-filter,.category-chip,
  .universe-links a,.heart-button,.small-button,.facebook-button,.reward-button
){
  background:var(--wd-surface-raised)!important;
  color:var(--wd-text)!important;
  border-color:var(--wd-border)!important;
}

html[data-wd-theme="light"] .game-card,
html[data-wd-theme="high_contrast"] .game-card{
  --card-accent:var(--wd-accent)!important;
  --card-bg:var(--wd-surface)!important;
}

html[data-wd-theme="light"] :where(.game-tagline,.status,.history-reference),
html[data-wd-theme="high_contrast"] :where(.game-tagline,.status,.history-reference){
  color:var(--wd-text)!important;
}

html[data-wd-theme="high_contrast"] :where(
  .staging-card,.account-card,.friends-panel,.analytics-panel,.sharing-panel,
  .feedback-panel,.access-panel,.share-card,.universe-toolbar,.game-card,.a11y-panel,
  input,select,textarea,button,a[class]
){
  border-width:2px!important;
  text-shadow:none!important;
  box-shadow:none!important;
}

html[data-wd-theme="high_contrast"] :where(
  [aria-pressed="true"],[aria-selected="true"],.is-active
){
  outline:3px solid var(--wd-accent)!important;
  outline-offset:2px!important;
}

html[data-wd-motion="reduce"] *,
html[data-wd-motion="reduce"] *::before,
html[data-wd-motion="reduce"] *::after{
  animation-duration:.001ms!important;
  animation-iteration-count:1!important;
  transition-duration:.001ms!important;
  scroll-behavior:auto!important;
}

@media (prefers-reduced-motion:reduce){
  html[data-wd-motion="system"] *,
  html[data-wd-motion="system"] *::before,
  html[data-wd-motion="system"] *::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
}

@media (forced-colors:active){
  :root{
    --wd-page-bg:Canvas;
    --wd-surface:Canvas;
    --wd-surface-raised:Canvas;
    --wd-text:CanvasText;
    --wd-text-muted:CanvasText;
    --wd-border:CanvasText;
    --wd-accent:Highlight;
    --wd-accent-text:HighlightText;
    --wd-link:LinkText;
    --wd-focus:Highlight;
  }

  :where(button,a,input,select,textarea,[tabindex]){
    forced-color-adjust:auto;
  }
}

html[data-wd-theme="light"] :where(
  h1,h2,h3,h4,legend,label,strong,.eyebrow,.section-kicker,
  .game-title,.game-category,.game-badge,.game-status,
  .universe-toolbar label,.auth-tab,.verification-row,.account-pill,
  .history-status,.count-pill
),
html[data-wd-theme="high_contrast"] :where(
  h1,h2,h3,h4,legend,label,strong,.eyebrow,.section-kicker,
  .game-title,.game-category,.game-badge,.game-status,
  .universe-toolbar label,.auth-tab,.verification-row,.account-pill,
  .history-status,.count-pill
){
  color:var(--wd-text)!important;
}

html[data-wd-theme="light"] :where(
  .account-brand,.game-card-footer,.future-auth,.contact-choice,
  .theme-option,.motion-option,.stat-grid div,.funnel div,
  .entitlement-controls label
),
html[data-wd-theme="high_contrast"] :where(
  .account-brand,.game-card-footer,.future-auth,.contact-choice,
  .theme-option,.motion-option,.stat-grid div,.funnel div,
  .entitlement-controls label
){
  background:var(--wd-surface-soft)!important;
  border-color:var(--wd-border)!important;
}

html[data-wd-theme="light"] :where(.auth-tab.is-active),
html[data-wd-theme="high_contrast"] :where(.auth-tab.is-active){
  background:var(--wd-accent)!important;
  color:var(--wd-accent-text)!important;
}

html[data-wd-theme="light"] :where(
  .account-status,.friends-status,.analytics-status,.sharing-status,
  .feedback-status,.access-message,.a11y-status
),
html[data-wd-theme="high_contrast"] :where(
  .account-status,.friends-status,.analytics-status,.sharing-status,
  .feedback-status,.access-message,.a11y-status
){
  background:var(--wd-surface-raised)!important;
  color:var(--wd-text)!important;
  border-color:var(--wd-border)!important;
}

html[data-wd-theme="light"] :where([data-type="error"]),
html[data-wd-theme="high_contrast"] :where([data-type="error"]){
  color:var(--wd-danger)!important;
}

html[data-wd-theme="light"] :where([data-type="success"]),
html[data-wd-theme="high_contrast"] :where([data-type="success"]){
  color:var(--wd-success)!important;
}

html[data-wd-theme="light"] :where(button:disabled,input:disabled,select:disabled,textarea:disabled),
html[data-wd-theme="high_contrast"] :where(button:disabled,input:disabled,select:disabled,textarea:disabled){
  color:var(--wd-disabled)!important;
  opacity:.72!important;
}

worddecks-accessibility-control{display:block}
.wd-a11y-control{display:grid;gap:12px;margin:0;padding:14px;border:1px solid var(--wd-border);border-radius:16px;background:var(--wd-surface)}
.wd-a11y-control legend{padding:0 6px;font-weight:900}
.wd-a11y-control label{display:grid;gap:6px;font-weight:800}
.wd-a11y-control select{min-height:44px;border:1px solid var(--wd-border);border-radius:11px;background:var(--wd-surface-raised);color:var(--wd-text);padding:8px 10px;font:inherit}
.wd-a11y-motion{display:flex!important;align-items:center;grid-template-columns:auto 1fr;gap:10px!important}
.wd-a11y-motion input{width:20px;height:20px;accent-color:var(--wd-accent)}
.wd-a11y-save{min-height:1.2em;color:var(--wd-text-muted);font-size:.82rem}


.wd-install-control{display:grid;gap:9px;margin-top:12px;padding:14px;border:1px solid var(--wd-border);border-radius:16px;background:var(--wd-surface)}
.wd-install-control>strong{font-weight:900}
.wd-install-control>span{color:var(--wd-text-muted);font-size:.88rem;line-height:1.4}
.wd-install-control button{min-height:44px;border:1px solid var(--wd-accent);border-radius:11px;background:var(--wd-accent);color:var(--wd-accent-text);padding:9px 12px;font:inherit;font-weight:900;cursor:pointer}
.wd-install-help{padding:10px 12px;border:1px solid var(--wd-border);border-radius:11px;background:var(--wd-surface-raised);color:var(--wd-text);font-size:.88rem;line-height:1.45}
.wd-install-help ol{margin:7px 0 0;padding-left:1.35rem}.wd-install-help p{margin:7px 0 0}.wd-install-status{min-height:1.2em}
