/* onsen: open-air bath on a winter morning */

/* page tint: a very faint wash of drifting mist */
.view[data-theme="onsen"] {
  --th: #6f9aa6;
  background-image:
    radial-gradient(ellipse 210px 46px at 150px 80px, rgba(111, 154, 166, .06), transparent 100%),
    radial-gradient(ellipse 260px 54px at 470px 230px, rgba(140, 176, 186, .05), transparent 100%),
    radial-gradient(ellipse 170px 38px at 330px 360px, rgba(111, 154, 166, .045), transparent 100%),
    radial-gradient(ellipse 150px 34px at 40px 300px, rgba(232, 200, 170, .06), transparent 100%);
  background-size: 640px 440px;
}

/* ---- painting: vapour that rises, widens and thins; snow that falls and melts away */
.fx-a.fx-onsen-rise {
  animation-name: fx-onsen-rise;
  animation-direction: normal;
  animation-timing-function: linear;
}
.fx-a.fx-onsen-curl { animation-name: fx-onsen-curl; }
.fx-a.fx-onsen-snow {
  animation-name: fx-onsen-snow;
  animation-direction: normal;
  animation-timing-function: linear;
}
@keyframes fx-onsen-rise {
  0% { transform: translate(var(--x, 0px), var(--y, 0px)) scale(.8, .72); opacity: 0; }
  12% { opacity: var(--o, .8); }
  74% { opacity: calc(var(--o, .8) * .86); }
  100% { transform: translate(calc(var(--x, 0px) + var(--dx, 10px)), calc(var(--y, 0px) + var(--dy, -50px))) scale(1.3, 1.16); opacity: 0; }
}
@keyframes fx-onsen-curl {
  from { transform: translateX(-3px) skewX(-5deg); }
  to { transform: translateX(3px) skewX(6deg); }
}
@keyframes fx-onsen-snow {
  0% { transform: translate(var(--x, 0px), var(--y, 0px)); opacity: 0; }
  8% { opacity: 1; }
  86% { opacity: 1; }
  100% { transform: translate(calc(var(--x, 0px) + var(--dx, -30px)), calc(var(--y, 0px) + var(--dy, 300px))); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-a.fx-onsen-rise,
  .fx-a.fx-onsen-curl,
  .fx-a.fx-onsen-snow { animation: none; }
  .fx-a.fx-onsen-rise { transform: translate(var(--x, 0px), var(--y, 0px)); opacity: calc(var(--o, .8) * .8); }
  .fx-a.fx-onsen-snow {
    transform: translate(calc(var(--x, 0px) + var(--dx, 0px) * var(--f, .5)), calc(var(--y, 0px) + var(--dy, 0px) * var(--f, .5)));
  }
}

/* ---- transition: one canvas of rolling vapour */
.fx-onsen-cv {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* caption: a fine slate-teal glyph in the mist, the label between two hairlines */
.fx-cap--onsen .fx-cap-glyph {
  color: #4d7a88;
  text-shadow:
    0 0 .06em rgba(255, 255, 255, .95),
    0 0 .3em rgba(255, 255, 255, .9),
    0 0 .9em rgba(255, 255, 255, .8),
    0 .04em .12em rgba(70, 116, 130, .18);
}
.fx-cap--onsen .fx-cap-label {
  padding: .72em 1.3em .72em 1.72em;
  border-radius: 0;
  border-top: 1px solid rgba(96, 142, 156, .55);
  border-bottom: 1px solid rgba(96, 142, 156, .55);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .6) 30%, rgba(255, 255, 255, .6) 70%, rgba(255, 255, 255, 0));
  box-shadow: none;
  color: #4a7684;
  font-weight: 500;
}
.fx-cap--onsen.fx-cap--tate .fx-cap-label {
  padding: 1.2em .72em .9em;
  border: 0;
  border-left: 1px solid rgba(96, 142, 156, .55);
  border-right: 1px solid rgba(96, 142, 156, .55);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .6) 30%, rgba(255, 255, 255, .6) 70%, rgba(255, 255, 255, 0));
}
