/* チャレンジの動的な完了表示。通常デザインの色と学習・ごほうび処理は変えない。 */
html:is([data-math-look="pop"], [data-iroiro-pop="game"]) {
  --challenge-ink: #15364f; --challenge-warm: #925010;
  --challenge-note: #405f70; --challenge-soft: #e2f4fc; --challenge-frame: #7cadc0;
  --challenge-button: #a8e3fa; --challenge-button-ink: #15364f;
}
html:is([data-math-look="pastel"], [data-iroiro-pop="pop"]) {
  --challenge-ink: #583179; --challenge-warm: #865017;
  --challenge-note: #705382; --challenge-soft: #f8effb; --challenge-frame: #b89bcb;
  --challenge-button: #d5f4fc; --challenge-button-ink: #2d637d;
}
html:is([data-math-look="elegant"], [data-iroiro-pop="elegant"]) {
  --challenge-ink: #25324b; --challenge-warm: #7b591e;
  --challenge-note: #6d6658; --challenge-soft: #f5eddc; --challenge-frame: #bea36b;
  --challenge-button: #25324b; --challenge-button-ink: #f7e5b5;
}
html:is([data-math-look="simple"], [data-iroiro-pop="simple"]) {
  --challenge-ink: #28323a; --challenge-warm: #365e79;
  --challenge-note: #53636d; --challenge-soft: #edf3f5; --challenge-frame: #aebec6;
  --challenge-button: #e5eef3; --challenge-button-ink: #365e79;
}
/* エレガントの完了カードには濃紺のものもある。明るい本文色をその面だけに適用。 */
html[data-math-look="elegant"] :is(.win-card, .solved-card, .result-modal) {
  --challenge-ink: #fff4d6; --challenge-warm: #f2d48b;
  --challenge-note: #e0d2b2; --challenge-soft: #25324b;
}
:where(html:is([data-math-look="pop"], [data-math-look="pastel"], [data-math-look="elegant"], [data-math-look="simple"], [data-iroiro-pop="game"], [data-iroiro-pop="pop"], [data-iroiro-pop="elegant"], [data-iroiro-pop="simple"]))
:is(#challenge-win-extra, #challenge-final-extra, #challenge-result-extra, #challenge-solved-extra, #daimon-complete-in-card) { color: var(--challenge-ink); }
:where(html:is([data-math-look="pop"], [data-math-look="pastel"], [data-math-look="elegant"], [data-math-look="simple"], [data-iroiro-pop="game"], [data-iroiro-pop="pop"], [data-iroiro-pop="elegant"], [data-iroiro-pop="simple"]))
:is(#challenge-win-extra, #challenge-final-extra, #challenge-result-extra, #challenge-solved-extra, #daimon-complete-in-card) [style*="color"] { color: var(--challenge-ink) !important; text-shadow: none; }
:where(html:is([data-math-look="pop"], [data-math-look="pastel"], [data-math-look="elegant"], [data-math-look="simple"], [data-iroiro-pop="game"], [data-iroiro-pop="pop"], [data-iroiro-pop="elegant"], [data-iroiro-pop="simple"]))
:is(#challenge-win-extra, #challenge-final-extra, #challenge-result-extra, #challenge-solved-extra, #daimon-complete-in-card) :is([style*="#ffd700"], [style*="255, 215, 0"], [style*="#fde047"], [style*="253, 224, 71"]) {
    color: var(--challenge-warm) !important;
  }
:where(html:is([data-math-look="pop"], [data-math-look="pastel"], [data-math-look="elegant"], [data-math-look="simple"], [data-iroiro-pop="game"], [data-iroiro-pop="pop"], [data-iroiro-pop="elegant"], [data-iroiro-pop="simple"]))
:is(#challenge-win-extra, #challenge-final-extra, #challenge-result-extra, #challenge-solved-extra, #daimon-complete-in-card) :is([style*="dashed"]) {
    color: var(--challenge-note) !important; background: var(--challenge-soft) !important;
    border-color: var(--challenge-frame) !important;
  }
:where(html:is([data-math-look="pop"], [data-math-look="pastel"], [data-math-look="elegant"], [data-math-look="simple"], [data-iroiro-pop="game"], [data-iroiro-pop="pop"], [data-iroiro-pop="elegant"], [data-iroiro-pop="simple"]))
:is(#challenge-win-extra, #challenge-final-extra, #challenge-result-extra, #challenge-solved-extra, #daimon-complete-in-card) button[style]:not([style*="linear-gradient"]) {
    color: var(--challenge-button-ink) !important; background: var(--challenge-button) !important;
    border-color: var(--challenge-frame) !important;
  }
:where(html:is([data-math-look="pop"], [data-math-look="pastel"], [data-math-look="elegant"], [data-math-look="simple"], [data-iroiro-pop="game"], [data-iroiro-pop="pop"], [data-iroiro-pop="elegant"], [data-iroiro-pop="simple"]))
:is(#challenge-win-extra, #challenge-final-extra, #challenge-result-extra, #challenge-solved-extra, #daimon-complete-in-card) button[style*="linear-gradient"] {
    color: #573100 !important;
  }
:where(html:is([data-math-look="pop"], [data-math-look="pastel"], [data-math-look="elegant"], [data-math-look="simple"], [data-iroiro-pop="game"], [data-iroiro-pop="pop"], [data-iroiro-pop="elegant"], [data-iroiro-pop="simple"]))
:is(#challenge-win-extra, #challenge-final-extra, #challenge-result-extra, #challenge-solved-extra, #daimon-complete-in-card) a[style] {
    color: #246548 !important; background: #e6f4e9 !important; border-color: #7ba88b !important;
  }
