/* Keep contrast and sampling adjustments on the artwork, outside badges and captions. */
:root {
  --icon-tone: saturate(.89) contrast(.94);
  --icon-edge: blur(.36px);
  --art-tone: saturate(.94) contrast(.965);
  --scene-edge: blur(.25px);
}

.v48-icon,
.art-icon,
.item-art,
.painted-item,
.dragon-portrait,
.dragon-view,
.furniture-paint,
.property-paint,
.dragon-perk-paint {
  filter: var(--icon-tone) var(--icon-edge);
}

.nav .art-icon,
.nav button.sel .art-icon {
  filter: var(--icon-tone) var(--icon-edge) drop-shadow(0 2px 2px #0006);
}

.chamber-gear .painted-item {
  filter: var(--icon-tone) var(--icon-edge) drop-shadow(0 2px 3px #0007);
}

.hero-face,
.card-illustration,
.shuriken-card-art,
.room-station-detail {
  filter: var(--art-tone) var(--scene-edge);
}

.chamber-portrait.is-locked .hero-face {
  filter: var(--art-tone) saturate(.2) brightness(.55);
}

.fortress-illustration .citadel-background,
.citadel-background,
.citadel-motion,
.castle-art,
.map::before,
.room-menu button::before,
.report-art {
  filter: var(--art-tone) var(--scene-edge);
}

.chamber-suite.room-master-suite .room-scene,
.chamber-armory .chamber-stage {
  background: #0b1420;
}

.room-backdrop,
.chamber-gear-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: var(--art-tone) var(--scene-edge);
}

.room-backdrop {
  z-index: 0;
  background: var(--chamber-image) center / 100% 100% no-repeat;
}

.chamber-gear-backdrop {
  z-index: 0;
  background: linear-gradient(0deg, #06101ae8, transparent 70%), var(--chamber-image) center / cover;
}

canvas[data-renderer="sprite-2d"] {
  --dragon-tone: saturate(1);
  filter: var(--dragon-tone) var(--art-tone);
}

canvas[data-dragon-type="0"] { --dragon-tone: hue-rotate(48deg); }
canvas[data-dragon-type="1"] { --dragon-tone: hue-rotate(-18deg) saturate(1.12); }
canvas[data-dragon-type="2"] { --dragon-tone: hue-rotate(155deg) saturate(.62); }
canvas[data-dragon-type="3"] { --dragon-tone: hue-rotate(220deg) saturate(.75); }
canvas[data-dragon-type="4"] { --dragon-tone: saturate(1.07) brightness(1.04); }
canvas[data-dragon-type="5"] { --dragon-tone: saturate(.24) brightness(.84); }

@media (max-width: 740px) {
  :root { --icon-edge: blur(.30px); }
}

@media (forced-colors: active) {
  :root {
    --icon-tone: saturate(1);
    --art-tone: saturate(1);
    --icon-edge: blur(0);
    --scene-edge: blur(0);
  }
}
