/* The scene worlds' materials: Abyss, Yozakura, Nebula, Downpour, Cloud Nine,
   Cathedral. The variables feed the shared material rules in profile-worlds.css
   (card, links, socials, widgets); the rules below add what each world has that
   the shared set does not — glass over the scene, glows, ornaments. */

/* ------------------------------------------------------------------ abyss */
[data-world-skin="abyss"] {
  --paper: #04182a; --ink: #e8fbff; --muted-ink: #a3dbe8; --rule: #2a8fb0; --key: #06263d;
  --key-radius: 14px; --stamp: #5ef2ff; --trim-width: 3px;
  --rim: linear-gradient(140deg, #5ef2ff, #1b5e85 40%, #ff7ad9 70%, #5ef2ff);
  --finish: radial-gradient(120% 70% at 50% -10%, #5ef2ff26, transparent 60%), linear-gradient(180deg, #0a3a5733, transparent 60%);
  --edge-shadow: 0 0 0 1px #5ef2ff55, 0 0 44px -6px #5ef2ff66, inset 0 0 34px #5ef2ff12;
  --control-face: linear-gradient(180deg, #5ef2ff1f, transparent 70%);
}
/* ---------------------------------------------------------------- yozakura */
[data-world-skin="yozakura"] {
  --paper: #1a0d14; --ink: #fff1f4; --muted-ink: #f5bfd1; --rule: #c8323a; --key: #2a121c;
  --key-radius: 4px; --stamp: #e8b65a; --trim-width: 6px;
  --rim: linear-gradient(90deg, #e8b65a, #c8323a 20%, #7a141c 50%, #c8323a 80%, #e8b65a);
  --finish: radial-gradient(ellipse at 85% 0%, #ff9ec733, transparent 60%), repeating-linear-gradient(90deg, transparent 0 22px, #ffffff06 22px 23px);
  --edge-shadow: 0 0 0 2px #2a0d12, 0 0 0 4px #e8b65a, 0 0 0 6px #2a0d12, 0 20px 44px #000a;
  --control-face: linear-gradient(90deg, #c8323a 0 4px, transparent 4px);
}
/* ------------------------------------------------------------------ nebula */
[data-world-skin="nebula"] {
  --paper: #0c0820; --ink: #f5f0ff; --muted-ink: #c9bcf4; --rule: #7d63d8; --key: #160f33;
  --key-radius: 16px; --stamp: #b18cff; --trim-width: 3px;
  --rim: conic-gradient(from 210deg, #b18cff, #59e9ff, #ff7ad9, #b18cff);
  --finish: radial-gradient(#ffffff3a 0.6px, transparent 1px) 0 0 / 23px 23px, radial-gradient(120% 80% at 100% 0%, #59e9ff1f, transparent 55%), radial-gradient(100% 70% at 0% 100%, #b18cff26, transparent 55%);
  --edge-shadow: 0 0 0 1px #b18cff66, 0 0 56px -12px #8b5cf6bb;
  --control-face: linear-gradient(110deg, #59e9ff14, transparent 45%, #b18cff1c);
}
/* ---------------------------------------------------------------- downpour */
[data-world-skin="downpour"] {
  --paper: #0a0712; --ink: #fdf2ff; --muted-ink: #d4bbe8; --rule: #ff3fa4; --key: #120a1d;
  --key-radius: 6px; --stamp: #2ee6ff; --trim-width: 3px;
  --rim: linear-gradient(90deg, #ff3fa4, #2ee6ff);
  --finish: repeating-linear-gradient(100deg, transparent 0 9px, #ffffff07 9px 10px), linear-gradient(180deg, #ff3fa414, transparent 40%);
  --edge-shadow: 0 0 0 1px #ff3fa4bb, 0 0 26px -4px #ff3fa4aa, 0 0 70px -22px #2ee6ffaa;
  --control-face: linear-gradient(90deg, #ff3fa420, transparent 60%);
}
/* --------------------------------------------------------------- cloud nine */
[data-world-skin="cloudnine"] {
  --paper: #f4f8ff; --ink: #29224f; --muted-ink: #5d588a; --rule: #b9c9ff; --key: #ffffffd9;
  --key-radius: 20px; --stamp: #ff8fcf; --trim-width: 3px;
  --rim: linear-gradient(135deg, #ffffff, #b9d8ff 40%, #ffc6e8 70%, #ffffff);
  --finish: radial-gradient(120% 80% at 20% 0%, #ffffffaa, transparent 50%), linear-gradient(180deg, #ffffff55, #e9e2ff44);
  --edge-shadow: 0 0 0 1px #ffffffcc, 0 22px 44px -12px #7a6cc277, inset 0 2px 0 #ffffff, inset 0 -8px 20px #c9bdff55;
  --control-face: linear-gradient(180deg, #ffffffaa, transparent 60%);
}
/* ---------------------------------------------------------------- cathedral */
[data-world-skin="cathedral"] {
  --paper: #160a0d; --ink: #fbeae3; --muted-ink: #e4b9ab; --rule: #a8803d; --key: #22101a;
  --key-radius: 3px; --stamp: #f2c46b; --trim-width: 7px;
  --rim: repeating-linear-gradient(135deg, #f2c46b 0 3px, #7a5523 3px 6px, #3a1b1f 6px 10px);
  --finish: radial-gradient(ellipse at 50% -8%, #ff4d6d3a, transparent 60%), linear-gradient(180deg, #ffffff05, transparent);
  --edge-shadow: 0 0 0 2px #2a1215, 0 0 0 3px #a8803d, 0 0 54px -12px #ff2e4d88, inset 0 0 0 9px #1e0d11, inset 0 0 0 10px #a8803d88;
  --control-face: linear-gradient(90deg, #f2c46b18, transparent 50%);
}

/* ------------------------------------------- glass over the scene, per world */
:is([data-world-skin="abyss"], [data-world-skin="nebula"], [data-world-skin="downpour"], [data-world-skin="cloudnine"]).has-material-world .profile-card.is-framed:not(.has-card-paint):not(.is-card-clear) {
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
}
[data-world-skin="abyss"].has-material-world .profile-card.is-framed:not(.has-card-paint):not(.is-card-clear) { background: var(--finish), rgb(4 24 42 / calc(0.62 * var(--card-opacity, 1))); }
[data-world-skin="nebula"].has-material-world .profile-card.is-framed:not(.has-card-paint):not(.is-card-clear) { background: var(--finish), rgb(12 8 32 / calc(0.66 * var(--card-opacity, 1))); }
[data-world-skin="downpour"].has-material-world .profile-card.is-framed:not(.has-card-paint):not(.is-card-clear) { background: var(--finish), rgb(10 7 18 / calc(0.7 * var(--card-opacity, 1))); }
[data-world-skin="cloudnine"].has-material-world .profile-card.is-framed:not(.has-card-paint):not(.is-card-clear) { background: var(--finish), rgb(255 255 255 / calc(0.58 * var(--card-opacity, 1))); }

/* names catch each world's light */
[data-world-skin="abyss"] .profile-name.text-fx-none { text-shadow: 0 0 22px #5ef2ff99, 0 0 2px #e8fbff; }
[data-world-skin="yozakura"] .profile-name.text-fx-none { text-shadow: 0 2px 0 #7a141c, 0 0 26px #ff8fb866; }
[data-world-skin="nebula"] .profile-name.text-fx-none { text-shadow: 0 0 18px #b18cffaa, 0 0 40px #59e9ff55; letter-spacing: .04em; }
[data-world-skin="downpour"] .profile-name.text-fx-none { text-shadow: 0 0 6px #ff3fa4, 0 0 22px #ff3fa4cc, 0 0 48px #ff3fa477; }
[data-world-skin="cloudnine"] .profile-name.text-fx-none { text-shadow: 0 2px 0 #ffffff, 0 6px 18px #9db6ff66; }
[data-world-skin="cathedral"] .profile-name.text-fx-none { text-shadow: 0 0 24px #ff2e4d77, 0 2px 0 #3a1b1f; }

/* link buttons, when the world dresses them */
[data-world-skin="abyss"]:where(.world-links) .pg-link:not(.pg-link--no-border) { box-shadow: inset 0 0 0 1px #5ef2ff22, 0 0 18px -8px #5ef2ff; }
[data-world-skin="yozakura"]:where(.world-links) .pg-link:not(.pg-link--no-border) { border-color: #e8b65a; box-shadow: 3px 3px 0 #7a141c; }
[data-world-skin="nebula"]:where(.world-links) .pg-link:not(.pg-link--no-border) { box-shadow: 0 0 22px -10px #b18cff, inset 0 1px 0 #ffffff1a; }
[data-world-skin="downpour"]:where(.world-links) .pg-link:not(.pg-link--no-border) { box-shadow: 0 0 0 1px #ff3fa455, 0 0 16px -4px #ff3fa4aa; text-shadow: 0 0 8px #ff3fa477; }
[data-world-skin="downpour"]:where(.world-links) .pg-link:hover { border-color: #2ee6ff; box-shadow: 0 0 0 1px #2ee6ff88, 0 0 20px -2px #2ee6ffaa; }
[data-world-skin="cloudnine"]:where(.world-links) .pg-link:not(.pg-link--no-border) { box-shadow: inset 0 2px 0 #ffffff, inset 0 -3px 8px #c9bdff55, 0 8px 18px -10px #7a6cc2; }
[data-world-skin="cathedral"]:where(.world-links) .pg-link:not(.pg-link--no-border) { outline: 1px solid #f2c46b33; outline-offset: -5px; }

/* social icons */
[data-world-skin="downpour"]:where(.world-socials) .pg-social:not(.pg-social--bare) { box-shadow: 0 0 14px -4px #2ee6ffaa; }
[data-world-skin="abyss"]:where(.world-socials) .pg-social:not(.pg-social--bare) { box-shadow: 0 0 14px -6px #5ef2ff; }
[data-world-skin="cathedral"]:where(.world-socials) .pg-social:not(.pg-social--bare) { border-color: #a8803d; }

/* a diamond of gold above the cathedral card's body, a petal for yozakura */
[data-world-skin="cathedral"] .tpl-glass:not(.tpl-custom) .profile-card__body::before,
[data-world-skin="yozakura"] .tpl-glass:not(.tpl-custom) .profile-card__body::before {
  content: ""; display: block; width: 9px; height: 9px; margin: 0 auto 12px; transform: rotate(45deg);
}
[data-world-skin="cathedral"] .tpl-glass:not(.tpl-custom) .profile-card__body::before { border: 1px solid #f2c46b; background: #a1122a; box-shadow: 0 0 0 2px #2a1215, 0 0 12px #ff2e4d; }
[data-world-skin="yozakura"] .tpl-glass:not(.tpl-custom) .profile-card__body::before { width: 10px; height: 10px; border-radius: 50% 0; background: #ff9ec7; box-shadow: 0 0 10px #ff9ec7aa; }

/* the scene stays put behind the card; a soft vignette ties it to the card */
body:is([data-backdrop-skin="abyss"], [data-backdrop-skin="yozakura"], [data-backdrop-skin="nebula"], [data-backdrop-skin="downpour"], [data-backdrop-skin="cathedral"]) .pg-orbs { display: none; }

/* ------------------------------------------------ studio and onboarding tiles */
.aesthetic-card.aesthetic-card--scene {
  background: linear-gradient(180deg, rgb(8 6 14 / 0.05) 30%, rgb(8 6 14 / 0.82)), var(--tile-image) center / cover no-repeat;
  border-color: rgb(255 255 255 / 0.14);
  color: #fff;
  min-height: 108px;
}
.aesthetic-card--scene strong { color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / 0.85); }
.aesthetic-card--scene small { color: rgb(255 255 255 / 0.8); text-shadow: 0 1px 3px rgb(0 0 0 / 0.85); }
.aesthetic-card--scene .aesthetic-card__badge { color: rgb(255 255 255 / 0.85); }
.aesthetic-card--scene .aesthetic-card__swatches { opacity: 0.9; }

/* The earlier illustrated worlds drew a picture inside a framed portrait pane.
   The scene worlds put the picture behind the card instead, so the portrait goes
   back to the template's own placement rather than sitting in an empty box. */
body.has-material-world:is([data-world-skin="abyss"], [data-world-skin="yozakura"], [data-world-skin="nebula"], [data-world-skin="downpour"], [data-world-skin="cloudnine"], [data-world-skin="cathedral"]) .profile-card.is-framed:not(.tpl-custom) .profile-card__portrait {
  border: 0; padding: 0; min-height: 0; margin-bottom: 0; isolation: auto;
}
body.has-material-world:is([data-world-skin="abyss"], [data-world-skin="yozakura"], [data-world-skin="nebula"], [data-world-skin="downpour"], [data-world-skin="cloudnine"], [data-world-skin="cathedral"]) .tpl-glass.is-framed:not(.tpl-custom) .profile-card__portrait {
  justify-content: center;
}
[data-world-skin="downpour"] .profile-card.is-framed:not(.tpl-custom) .profile-card__portrait { margin-bottom: 14px; }
