/* SPDX-License-Identifier: AGPL-3.0-only The Folia lyric stage (see ./README.md): the layout Folia writes as Tailwind classes on its components, and the loops of its geometric background (src/components/visualizer/backgrounds/common/GeometricBackground.css), as plain rules. The stage is a size container: where Folia sizes type by the window (vw, vh), the rules and the styles here use the stage's own box (cqw, cqh), so it reads the same in a panel and in full screen. */ .folia { position: absolute; inset: 0; overflow: hidden; container-type: size; font-family: var(--folia-font); font-synthesis-weight: none; line-height: 1.5; isolation: isolate; -webkit-user-select: none; user-select: none; } .folia *, .folia *::before, .folia *::after { box-sizing: border-box; } .folia p { margin: 0; } /* Backdrop: the theme's colour, the drifting shapes, the vignette. */ .folia-backdrop, .folia-backdrop__base, .folia-geo, .folia-geo__field, .folia-geo__vignette { position: absolute; inset: 0; } .folia-backdrop { z-index: 0; overflow: hidden; pointer-events: none; } .folia-backdrop__base { transition: background-color 1s; } .folia-geo { transition: opacity .6s ease-in-out; animation: folia-appear .6s ease-in-out backwards; } .folia-geo__vignette { background: radial-gradient(circle, transparent 40%, rgb(0 0 0 / var(--folia-vignette, .6)) 100%); } .folia-geo--bare .folia-geo__field { display: none; } .folia-geo__drift, .folia-geo__rise { position: absolute; animation-iteration-count: infinite; animation-fill-mode: backwards; animation-timing-function: linear; } .folia-geo__drift { animation-name: folia-geometric-drift; } .folia-geo__face { width: 100%; height: 100%; transition: color 1s, background-color 1s, border-color 1s, opacity 1s; } .folia-geo__rise { border-radius: 9999px; animation-name: folia-geometric-rise; transition: background-color 1s; } .folia-geo--paused .folia-geo__drift, .folia-geo--paused .folia-geo__rise { animation-play-state: paused; } @keyframes folia-appear { from { opacity: 0; } } @keyframes folia-geometric-drift { 0% { transform: translate(calc(-15px * var(--geometric-dir)), calc(30px * var(--geometric-dir))) rotate(var(--geometric-rotate)); } 50% { transform: translate(calc(15px * var(--geometric-dir)), calc(-30px * var(--geometric-dir))) rotate(calc(var(--geometric-rotate) + 180deg)); } 100% { transform: translate(calc(-15px * var(--geometric-dir)), calc(30px * var(--geometric-dir))) rotate(calc(var(--geometric-rotate) + 360deg)); } } @keyframes folia-geometric-rise { 0% { transform: translateY(0); opacity: 0; } 50% { opacity: var(--geometric-peak); } 100% { transform: translateY(-100px); opacity: 0; } } /* Shell and the lyric area every flat style lays its lines in. */ .folia__shell { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; } .folia__layer { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; } .folia-area { position: relative; z-index: 10; width: 100%; height: 70cqh; pointer-events: none; will-change: transform; } .folia-area--float { animation: folia-float 7s ease-in-out infinite; } @keyframes folia-float { 0%, 50%, 100% { transform: translateY(0) scale(1); } 25% { transform: translateY(calc(var(--folia-float, 14px) * -1)) scale(1.01); } 75% { transform: translateY(calc(var(--folia-float, 14px) * .45)) scale(.995); } } /* A line leaving and the line arriving share the area; each has a slot of its own, so neither moves the other. */ .folia-slot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 2rem max(2rem, 6cqw); } /* The word of 流光 and 云阶: a glow of transparent letters under the body. */ .folia-word { position: relative; display: inline-block; transform-origin: center; white-space: nowrap; will-change: transform; } .folia-word__glow { position: absolute; inset: 0; display: block; color: transparent; pointer-events: none; } .folia-word__glow span { opacity: 0; } .folia-word__body { position: relative; z-index: 10; display: block; } .folia-word__ripple { position: absolute; top: 50%; left: 50%; z-index: 0; height: 150%; aspect-ratio: 1; border: 1px solid; border-radius: 9999px; filter: blur(1px); pointer-events: none; } /* 流光 */ .folia-classic__line { display: flex; flex-wrap: wrap; align-content: center; width: 100%; max-width: 72rem; min-height: 300px; } /* 云阶 */ .folia-partita__line { display: flex; flex-direction: row-reverse; align-items: stretch; justify-content: center; gap: 2rem; width: 100%; max-width: 64rem; min-height: 320px; } .folia-partita__column { position: relative; display: flex; align-items: center; justify-content: center; min-width: 3.8rem; min-height: 24rem; padding: 0 .75rem; } .folia-partita__stack { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; } .folia-partita__chunk { position: relative; display: inline-flex; flex-direction: row; align-items: center; align-self: center; justify-content: center; padding: .2rem .5rem; line-height: 1; white-space: nowrap; transform-origin: center; } .folia-partita__guide { position: absolute; pointer-events: none; } .folia-partita__guide--upright { bottom: -16px; width: 1px; height: 32px; transform-origin: bottom; } .folia-partita__guide--upright.folia-partita__guide--left { left: -8px; } .folia-partita__guide--upright.folia-partita__guide--right { right: -8px; } .folia-partita__guide--rule { bottom: -8px; width: calc(100% + 36px); height: 1px; } .folia-partita__guide--rule.folia-partita__guide--left { left: -16px; transform-origin: left; } .folia-partita__guide--rule.folia-partita__guide--right { right: -16px; transform-origin: right; } /* 倾诉 */ .folia-tilt { display: flex; flex-direction: column; align-items: center; justify-content: center; row-gap: .75rem; } .folia-tilt__line { line-height: 1.35; letter-spacing: .08em; white-space: nowrap; } .folia-tilt__line--tilt { font-style: italic; line-height: 1.25; letter-spacing: .15em; } .folia-tilt__char { display: inline-block; transition: transform .06s ease-out; } .folia-tilt__char--space { min-width: .25em; } .folia-tilt__line--tilt .folia-tilt__char--space { min-width: .35em; } @container (min-width: 640px) { .folia-tilt { row-gap: 1rem; } } /* 心象 */ .folia-cadenza { position: absolute; inset: 0; z-index: 10; opacity: 0; pointer-events: none; transform-origin: 50% 42%; } .folia-cadenza__overlay, .folia-cadenza__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; } .folia-cadenza__word { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; } .folia-cadenza__inner { position: relative; display: inline-block; line-height: 1; white-space: nowrap; } .folia-cadenza__body { position: relative; z-index: 1; display: block; line-height: 1; white-space: pre; } .folia-cadenza__glow { position: absolute; inset: 0; z-index: 0; display: block; color: transparent; line-height: 1; white-space: pre; pointer-events: none; } .folia-cadenza__glow span { color: transparent; line-height: 1; } /* 静止 */ .folia-still { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; width: 100%; padding: 0 3rem 4rem; text-align: center; } .folia-still__line { min-height: 1.4em; max-width: 56rem; font-size: 1.875rem; letter-spacing: .02em; opacity: .3; } .folia-still__line--current { font-size: 2.5rem; line-height: 1.25; opacity: 1; } /* The band at the foot: a translation, or the next two lines a little out of focus. */ .folia-subtitle { position: absolute; right: 0; bottom: var(--folia-subtitle-bottom, 7cqh); left: 0; z-index: 20; padding: 0 1rem; text-align: center; pointer-events: none; } .folia-subtitle__content { position: relative; display: inline-block; padding: .125rem .375rem; isolation: isolate; } .folia-subtitle__content:empty { display: none; } .folia-subtitle__glow { position: absolute; inset: -1.5rem -2.5rem; z-index: 0; filter: blur(40px); transform: translateZ(0); pointer-events: none; } .folia-subtitle__rows { position: relative; z-index: 10; display: grid; gap: .5rem; max-width: 56rem; margin: 0 auto; } .folia-subtitle__row--upcoming { max-width: 42rem; margin: 0 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; filter: blur(1px); transition: all .5s; }