/*
 * Shared series atmosphere.
 * The structural backdrop is one official cloud-sea image plus the existing
 * gold line artwork. Individual series only supply colour variables below.
 */
.series-atmosphere{
  --series-veil:rgba(102,76,144,.23);
  --series-light:rgba(255,252,246,.62);
  --series-shadow:rgba(45,27,82,.18);
  --series-ink:#26365d;
  background-color:#e7e8f5;
  background-image:
    linear-gradient(118deg,var(--series-light) 0%,var(--series-veil) 46%,var(--series-light) 100%),
    url('assets/character-reference-decor.svg'),
    url('assets/about-cloud-sky.png')!important;
  background-position:center,center,center!important;
  background-size:cover,100% 100%,cover!important;
  background-repeat:no-repeat,no-repeat,no-repeat!important;
  background-blend-mode:normal,normal,normal;
}
.series-atmosphere--omusubi,.series-atmosphere[data-series="OMUSUBI"]{
  --series-veil:rgba(92,62,160,.30);
  --series-light:rgba(250,247,255,.70);
  --series-shadow:rgba(65,35,113,.23);
  --series-ink:#39205f;
}
.series-atmosphere--kokorobi,.series-atmosphere[data-series="KOKOROBI"]{
  --series-veil:rgba(201,139,36,.28);
  --series-light:rgba(255,252,238,.70);
  --series-shadow:rgba(126,72,16,.22);
  --series-ink:#713917;
}
.series-atmosphere--goen,.series-atmosphere[data-series="GOEN"]{
  --series-veil:rgba(168,32,46,.27);
  --series-light:rgba(255,250,244,.68);
  --series-shadow:rgba(107,15,31,.22);
  --series-ink:#7b1d2a;
}
.series-atmosphere--konbu,.series-atmosphere[data-series="OMUSUBI-KONBU"]{
  --series-veil:rgba(26,104,70,.27);
  --series-light:rgba(248,255,247,.68);
  --series-shadow:rgba(16,77,49,.22);
  --series-ink:#105c48;
}
.series-atmosphere--komusubi,.series-atmosphere[data-series="KOMUSUBI"]{
  --series-veil:rgba(44,134,205,.25);
  --series-light:rgba(246,253,255,.68);
  --series-shadow:rgba(20,85,143,.20);
  --series-ink:#123e80;
}
.series-atmosphere[data-series="石窟版"]{
  --series-veil:rgba(94,101,107,.25);
  --series-light:rgba(250,249,245,.68);
  --series-shadow:rgba(66,70,72,.20);
  --series-ink:#4f565a;
}

/* A parent paints the full page canvas, so it receives the child series variables explicitly. */
.sp-main:has(.series-atmosphere--omusubi),.ed-main:has(.series-atmosphere--omusubi),.ed-main:has([data-series-atmosphere="omusubi"]){--series-veil:rgba(92,62,160,.30);--series-light:rgba(250,247,255,.70);--series-shadow:rgba(65,35,113,.23);--series-ink:#39205f}
.sp-main:has(.series-atmosphere--kokorobi),.ed-main:has(.series-atmosphere--kokorobi),.ed-main:has([data-series-atmosphere="kokorobi"]){--series-veil:rgba(201,139,36,.28);--series-light:rgba(255,252,238,.70);--series-shadow:rgba(126,72,16,.22);--series-ink:#713917}
.sp-main:has(.series-atmosphere--goen),.ed-main:has(.series-atmosphere--goen),.ed-main:has([data-series-atmosphere="goen"]){--series-veil:rgba(168,32,46,.27);--series-light:rgba(255,250,244,.68);--series-shadow:rgba(107,15,31,.22);--series-ink:#7b1d2a}
.sp-main:has(.series-atmosphere--konbu),.ed-main:has(.series-atmosphere--konbu),.ed-main:has([data-series-atmosphere="konbu"]){--series-veil:rgba(26,104,70,.27);--series-light:rgba(248,255,247,.68);--series-shadow:rgba(16,77,49,.22);--series-ink:#105c48}
.sp-main:has(.series-atmosphere--komusubi),.ed-main:has(.series-atmosphere--komusubi),.ed-main:has([data-series-atmosphere="komusubi"]){--series-veil:rgba(44,134,205,.25);--series-light:rgba(246,253,255,.68);--series-shadow:rgba(20,85,143,.20);--series-ink:#123e80}

/* Full-width series landing canvases retain their existing content geometry. */
.sp-main:has(.series-atmosphere){
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background-color:#edf2fb!important;
  background-image:
    linear-gradient(180deg,var(--series-light) 0%,var(--series-veil) 50%,var(--series-light) 100%),
    url('assets/character-reference-decor.svg'),
    url('assets/about-cloud-sky.png')!important;
  background-position:center,center top,center top!important;
  background-size:cover,100% auto,100% auto!important;
  background-repeat:repeat-y,repeat-y,repeat-y!important;
}
.sp-main:has(.series-atmosphere)>.page-clouds{display:none!important}
.sp-main:has(.series-atmosphere) .sp-page{background:transparent!important}

/* Character details use the same full main-page background, not a card. */
.ed-main:has(.cw-character-page.series-atmosphere),.ed-main:has([data-series-atmosphere]){
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background-color:#edf2fb!important;
  background-image:
    linear-gradient(180deg,var(--series-light) 0%,var(--series-veil) 50%,var(--series-light) 100%),
    url('assets/character-reference-decor.svg'),
    url('assets/about-cloud-sky.png')!important;
  background-position:center,center top,center top!important;
  background-size:cover,100% auto,100% auto!important;
  background-repeat:repeat-y,repeat-y,repeat-y!important;
}
.ed-main:has(.cw-character-page.series-atmosphere)>.page-clouds,.ed-main:has([data-series-atmosphere])>.page-clouds{display:none!important}
.ed-main:has(.cw-character-page.series-atmosphere) .cw-character-page{color:var(--series-ink)}
.ed-main:has(.cw-character-page.series-atmosphere) .cw-product .cw-shop-button{background:var(--series-ink)}

/* The character directory's five worlds are the same landscape under five tints. */
.character-reference-page .cr-series.series-atmosphere{
  background-color:#edf2fb!important;
  background-image:
    linear-gradient(118deg,var(--series-light) 0%,var(--series-veil) 46%,var(--series-light) 100%),
    url('assets/character-reference-decor.svg'),
    url('assets/about-cloud-sky.png')!important;
  background-position:center,center,center!important;
  background-size:cover,100% 100%,cover!important;
  background-repeat:no-repeat,no-repeat,no-repeat!important;
}

/* The result card remains one canvas; its series tint comes only from its data. */
.fortune-result-card.series-atmosphere{
  background-color:#edf2fb!important;
  background-image:
    linear-gradient(118deg,var(--series-light) 0%,var(--series-veil) 48%,var(--series-light) 100%),
    url('assets/character-reference-decor.svg'),
    url('assets/about-cloud-sky.png')!important;
  background-position:center,center,center!important;
  background-size:cover,100% 100%,cover!important;
  background-repeat:no-repeat,no-repeat,no-repeat!important;
}
.fortune-result-card.series-atmosphere .fortune-result-heading,
.fortune-result-card.series-atmosphere .fortune-result-copy h3,
.fortune-result-card.series-atmosphere .fortune-message,
.fortune-result-card.series-atmosphere .fortune-result-actions a{color:#07377e}

/* Product collection sections use the same image structure with their series colour only. */
.shop-grid>.series-atmosphere{
  color:var(--series-ink);
  background-color:#edf2fb!important;
  background-image:
    linear-gradient(118deg,var(--series-light) 0%,var(--series-veil) 48%,var(--series-light) 100%),
    url('assets/character-reference-decor.svg'),
    url('assets/about-cloud-sky.png')!important;
  background-position:center,center,center!important;
  background-size:cover,100% 100%,cover!important;
  background-repeat:no-repeat,no-repeat,no-repeat!important;
  box-shadow:0 10px 28px var(--series-shadow);
}
.shop-grid>.series-atmosphere .world-origin{color:inherit}

@media(max-width:760px){
  .series-atmosphere,
  .character-reference-page .cr-series.series-atmosphere,
  .fortune-result-card.series-atmosphere,
  .shop-grid>.series-atmosphere{
    background-size:auto 100%,100% 100%,auto 100%!important;
    background-position:center,center,center!important;
  }
  .sp-main:has(.series-atmosphere),
  .ed-main:has(.cw-character-page.series-atmosphere),.ed-main:has([data-series-atmosphere]){
    background-size:auto 100%,100% auto,auto 100%!important;
    background-position:center,center top,center top!important;
  }
}
