/* The shell's only stylesheet. Loaded from this origin, which is what the
   page's Content Security Policy allows: style-src 'self', so there is no
   inline style anywhere; its one web font comes from this origin too
   (font-src 'self'). */

:root {
  color-scheme: light dark;
}

/* ══ THE WEBSITE'S FONT ON THE HEADLINES (ART_FIX 0001; CONCEPT_ART §1j A5;
   D1329, the Founder's ruling 3 of 2026-10-25): Bricolage Grotesque, as
   surface_numbers_and_type.html draws it with "Website font on the
   headlines" on (its .ty-head rule), each headline at the weight its frame
   draws it (800 where .ty-head makes it extra bold, -0.02 em; 600 and 700
   where the frame keeps its own). One self-hosted file, the variable font
   the render loads (Google Fonts' Bricolage Grotesque, opsz 12 to 96 and
   wght 200 to 800, width 100), its Latin part (Basic Latin, Latin-1 and the
   typographic quotes, dashes and ellipsis among it): the Founder's ruling in
   FINISH 0001 Amendment C, in place of the one 800 instance, which drew
   every 600 and 700 headline at 800. SIL Open Font License 1.1,
   fonts/OFL.txt beside it. ⛔ Body text stays the phone's own font and
   Burmese Noto Sans Myanmar: the token falls through to it for every
   Burmese letter. swap: the headline shows at once in the phone's font and
   changes to the website's when the file arrives. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-headline: "Bricolage Grotesque", "Noto Sans Myanmar", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ══ THE LIST-BUBBLE LIGHT (FINISH 0001; D1699, CONCEPT_ART §1j): the light
   of surface_numbers_and_type.html §1 with Surface set to Light, its values
   character for character, defined here and nowhere else. It goes only on a
   list bubble, a row in a list of same-shaped bubbles (Pulses' weeks, My
   Cards' rows, the Sprints page's weeks, Reading's weeks of texts, Writing's
   rows), on a see-through bubble (the drawings' .banner), whose own
   gradient gives way to it, and on Study's four answer buttons (the
   Founder's ruling): background-image: var(--lit-bubble) and box-shadow:
   var(--lit-bubble-shadow). Every other panel, the card and every pop-up
   are flat, exactly as their frames draw them, and nothing is laid over the
   whole screen. */
:root {
  --lit-bubble: linear-gradient(180deg,rgba(255,255,255,.056) 0,rgba(255,255,255,.016) 30%,rgba(255,255,255,0) 58%);
  --lit-bubble-shadow: inset 0 1px 0 rgba(255,255,255,.064),0 14px 30px -18px rgba(0,0,0,.7);
}

/* STUDY 0006 (D1617, D1620, D1625): on every page a double tap never zooms
   and two fingers still do. touch-action is not inherited, so every element
   is named; an element's own touch-action rule, if one is ever written,
   wins over this one. ⛔ Never user-scalable or maximum-scale in the
   viewport line: either would take pinch zoom away. */
html,
body,
body * {
  touch-action: manipulation;
}

body {
  margin: 0;
  padding: 1.5rem 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

/* ══ THE BRAND (BRAND 0001; CONCEPT_ART §1h; D1136, D1148, D1153, D1154,
   D1279) ═══════════════════════════════════════════════════════════════
   The mark is four dots drawn here, no image file: Fire and Air on top,
   Earth and Water below (D1136), the gap one seventh of the mark's size.
   The name beside it is the one <svg> in index.html, drawn as shapes, so
   the checking moment never waits for the font file. The background's
   drawings and their placing are background.js's; every style they need is
   here. */

:root {
  --fire: #ED6A76;
  --air: #F2C14E;
  --earth: #35E07E;
  --water: #4E9BF0;
  --navy: #0E1526;
}

[hidden] {
  display: none !important;
}

.st-mark {
  --ms: 32px;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: calc(var(--ms) / 7);
  width: var(--ms);
  height: var(--ms);
  flex: none;
}

.st-mark i {
  display: block;
  border-radius: 50%;
  background: currentColor;
}

.st-mark i:nth-child(1) { color: var(--fire); }
.st-mark i:nth-child(2) { color: var(--air); }
.st-mark i:nth-child(3) { color: var(--earth); }
.st-mark i:nth-child(4) { color: var(--water); }

/* The name's outlines: 4401 by 1000 font units, one em tall, so a box
   30 px tall draws the letters exactly as the font draws them at 30 px. */
.st-name {
  display: block;
  flex: none;
  fill: #E8EEF8;
  height: 30px;
  width: 132.03px;
}

/* THE CHECKING MOMENT (logo_and_background.html 1, its .st-center and
   .st-stack): the mark at 64 px and the name at 30 px, 20 px below it,
   centered as ONE stack on the screen and raised 10 px (the stack is 64 +
   20 + 30 = 114 px, so the mark's top is 57 + 10 px above the middle); the
   dots pulse in turn, Fire, Air, Water, Earth, a full cycle every 1.6 s;
   the name fades in. Nothing else on the screen, and no background (it is
   gone before the drawings could arrive). */
.st-center {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--navy);
}

.st-center .st-mark {
  --ms: 64px;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -67px 0 0 -32px;
}

.st-center .st-nameline {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 67px + 64px + 20px);
  display: flex;
  justify-content: center;
}

.st-live i {
  animation: st-pulse 1.6s ease-in-out infinite;
}

.st-live i:nth-child(2) { animation-delay: .2s; }
.st-live i:nth-child(4) { animation-delay: .4s; }
.st-live i:nth-child(3) { animation-delay: .6s; }

@keyframes st-pulse {
  0%, 55%, 100% { transform: scale(1); opacity: 1; }
  25% { transform: scale(.7); opacity: .5; }
}

.st-name.st-in {
  animation: st-in .9s ease-out both .25s;
}

@keyframes st-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ⛔ Asked for less motion: the dots stand still and the name is simply
   there, never left at the start of its fade. */
@media (prefers-reduced-motion: reduce) {
  .st-live i,
  .st-name.st-in {
    animation: none;
  }
}

.st-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* THE LOGO BAR (logo_and_background.html, its .st-logobar): 44 px, the
   height of every top bar, on every shape; the mark 25 px and the name 22
   px, 9 px apart, centered, 10 px above the first panel. Only on a screen
   with no top bar; no back arrow, no menu. */
.st-logobar {
  flex: none;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 10px;
}

.st-logobar .st-mark { --ms: 25px; }

.st-logobar .st-name {
  height: 22px;
  width: 96.822px;
}

/* AN ERROR SCREEN (T7's look, Concept Art/T2_and_T7.html): the logo bar,
   then one panel holding the line, on the school's navy. The page starts
   below Telegram's own controls when it draws them over the app. */
.screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--navy);
  color: #EAF0FA;
}

.screen .page {
  position: absolute;
  top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
}

.screen .col {
  flex: 1;
  min-height: 0;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.screen .cbody {
  flex: 1;
  min-height: 0;
  background-color: #1D2739;
  border: 1px solid #2C3850;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

.screen .cinner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.screen .voff {
  flex: none;
  height: 24%;
}

.screen .cpad {
  flex: 1;
  min-height: 0;
  padding: 0 18px 22px;
  display: flex;
  flex-direction: column;
}

/* A headline: the website's font, extra bold, drawn a little tighter
   (surface_numbers_and_type.html .ty-head .vhead: 800, -0.02 em). */
.screen .vhead {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 27.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: #EAF0FA;
}

/* ══ THE BACKGROUND (CONCEPT_ART §1h), the render's own styles. The back
   layer is a screen's first child, behind its panels; the copy is its last,
   over them at 18% with a screen blend, so the pieces glow faintly through
   (D1152, D1276). background.js builds both. */
.el-bg .fw { fill: none; stroke: var(--water); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.el-bg .fw1 { animation: st-fw 9s linear infinite; }
.el-bg .fw2 { animation: st-fw 12s linear infinite reverse; opacity: .65; }
.el-bg .fw3 { animation: st-fw 6.5s linear infinite; opacity: .45; }
.el-bg .fw4 { animation: st-fw 15s linear infinite reverse; opacity: .8; }
@keyframes st-fw { from { transform: translateX(0); } to { transform: translateX(-100px); } }
.el-bg .fwb { animation: st-fwb 7s ease-in-out infinite; }
@keyframes st-fwb { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
.el-bg .rip { fill: none; stroke: var(--water); stroke-width: 1.3; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: st-rip 4.8s ease-out infinite; }
@keyframes st-rip { 0% { transform: scale(.15); opacity: 0; } 10% { opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
.el-bg .ff { fill: rgba(237,106,118,.13); stroke: var(--fire); stroke-width: 1.8; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: 50% 100%; }
.el-bg .ff-in { fill: rgba(237,106,118,.32); }
.el-bg .ff1 { animation: st-ff 1.5s ease-in-out infinite alternate; }
.el-bg .ff2 { animation: st-ff 1.15s ease-in-out infinite alternate-reverse; }
.el-bg .ff3 { animation: st-ff 1.9s ease-in-out infinite alternate; }
@keyframes st-ff { 0% { transform: scale(1, 1) skewX(0deg); } 45% { transform: scale(.9, 1.13) skewX(3deg); } 100% { transform: scale(1.07, .9) skewX(-3deg); } }
.el-bg .em { fill: var(--fire); animation: st-em 3.2s linear infinite; }
@keyframes st-em { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(-170px); opacity: 0; } }
.el-bg .fe { fill: none; stroke: var(--earth); stroke-width: 1.4; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: st-fe 14.4s linear infinite; }
@keyframes st-fe { 0% { transform: scale(.1); opacity: 0; } 12% { opacity: .95; } 100% { transform: scale(1.75); opacity: 0; } }
.el-bg .fe-s { fill: none; stroke: var(--earth); stroke-width: 1.2; vector-effect: non-scaling-stroke; opacity: .5; animation: st-fes 9s ease-in-out infinite; }
@keyframes st-fes { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.el-bg .as { fill: none; stroke: var(--air); stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 46 154; animation: st-as 3.4s linear infinite; }
@keyframes st-as { to { stroke-dashoffset: -200; } }
.el-bg .asw { fill: none; stroke: var(--air); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: st-asw 8s linear infinite; }
@keyframes st-asw { to { transform: rotate(360deg); } }
.el-bg .am { fill: var(--air); animation: st-am 7s ease-in-out infinite; }
@keyframes st-am { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .95; } 50% { transform: translate(120px, -16px); } 85% { opacity: .95; } 100% { transform: translate(240px, 0); opacity: 0; } }
.el-bg .d2 { animation-delay: -1.2s; }
.el-bg .d3 { animation-delay: -2.4s; }
.el-bg .d4 { animation-delay: -3.6s; }
.el-bg .d5 { animation-delay: -4.8s; }
.el-bg .d6 { animation-delay: -6s; }
.el-bg .d7 { animation-delay: -7.2s; }
.el-bg .d8 { animation-delay: -8.4s; }
.el-bg .d9 { animation-delay: -9.6s; }
.el-bg .d10 { animation-delay: -10.8s; }
.el-bg .d11 { animation-delay: -12s; }
.el-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.el-bg .bgm { position: absolute; animation: st-bg-roam var(--t, 48s) ease-in-out var(--d, 0s) infinite;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent); mask-image: radial-gradient(closest-side, #000 62%, transparent); }
.el-bg .bgm svg { display: block; width: 100%; height: 100%; overflow: visible; }
.el-bg .bg-orb { position: absolute; border-radius: 50%; animation: st-bg-roam var(--t, 60s) ease-in-out var(--d, 0s) infinite, st-orb-breathe 9s ease-in-out infinite alternate; }
@keyframes st-bg-roam {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(var(--dx, 40px), var(--dy, -30px)) rotate(var(--r, 3deg)); }
  66% { transform: translate(calc(var(--dx, 40px) * -.6), calc(var(--dy, -30px) * .7)) rotate(calc(var(--r, 3deg) * -1)); }
}
@keyframes st-orb-breathe { from { opacity: .55; } to { opacity: 1; } }
.el-bg .bub { fill: none; stroke: var(--water); stroke-width: 1.3; vector-effect: non-scaling-stroke; animation: st-bub 7.5s ease-in infinite; }
@keyframes st-bub { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .95; } 100% { transform: translateY(-160px); opacity: 0; } }
.el-bg .orbit { transform-box: view-box; transform-origin: 100px 100px; animation: st-asw 46s linear infinite; }
.el-bg .orbit circle { fill: var(--earth); }
.el-bg .orbit-ring { fill: none; stroke: var(--earth); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .45; stroke-dasharray: 3 7; }
.el-bg .bg-stem { fill: none; stroke: var(--earth); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: st-bg-grow 10s ease-in-out var(--k, 0s) infinite; }
@keyframes st-bg-grow { 0% { stroke-dashoffset: 100; opacity: 0; } 6% { opacity: 1; } 38% { stroke-dashoffset: 0; } 82% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.el-bg .bg-leaf { fill: rgba(53,224,126,.14); stroke: var(--earth); stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; transform-box: fill-box; transform: scale(0); animation: st-bg-leaf 10s ease-in-out var(--k, 0s) infinite; }
.el-bg .bg-leaf.l1 { transform-origin: 100% 100%; }
.el-bg .bg-leaf.l2 { transform-origin: 0% 100%; animation-name: st-bg-leaf2; }
.el-bg .bg-leaf.l3 { transform-origin: 50% 100%; animation-name: st-bg-leaf3; }
@keyframes st-bg-leaf { 0%, 22% { transform: scale(0); opacity: 0; } 36% { transform: scale(1); opacity: 1; } 82% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@keyframes st-bg-leaf2 { 0%, 30% { transform: scale(0); opacity: 0; } 44% { transform: scale(1); opacity: 1; } 82% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@keyframes st-bg-leaf3 { 0%, 38% { transform: scale(0); opacity: 0; } 52% { transform: scale(1); opacity: 1; } 82% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
.el-bg .bg-gem-spin { transform-box: view-box; transform-origin: 80px 80px; animation: st-asw 70s linear var(--k, 0s) infinite; }
.el-bg .bg-gem { fill: rgba(53,224,126,.05); stroke: var(--earth); stroke-width: 1.3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.el-bg .bg-gem-face { fill: none; stroke: var(--earth); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .5; }
.el-bg .bg-glint { fill: var(--earth); transform-box: fill-box; transform-origin: center; animation: st-bg-glint 6s ease-in-out var(--k, 0s) infinite; }
@keyframes st-bg-glint { 0%, 68%, 100% { transform: scale(0) rotate(0deg); opacity: 0; } 80% { transform: scale(1) rotate(45deg); opacity: 1; } 92% { transform: scale(.3) rotate(90deg); opacity: .4; } }
.el-bg .bg-drop { stroke: var(--water); stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: st-bg-drop 2.4s linear var(--k, 0s) infinite; }
@keyframes st-bg-drop { 0% { transform: translateY(-40px); opacity: 0; } 15% { opacity: .9; } 78% { opacity: .9; } 88%, 100% { transform: translateY(104px); opacity: 0; } }
.el-bg .bg-ring { fill: none; stroke: var(--water); stroke-width: 1.2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: st-bg-ring 2.4s ease-out var(--k, 0s) infinite; }
@keyframes st-bg-ring { 0%, 84% { transform: scale(.1); opacity: 0; } 88% { opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.el-bg .bg-drop.r2, .el-bg .bg-ring.r2 { animation-delay: calc(var(--k, 0s) - .5s); }
.el-bg .bg-drop.r3, .el-bg .bg-ring.r3 { animation-delay: calc(var(--k, 0s) - 1.1s); }
.el-bg .bg-drop.r4, .el-bg .bg-ring.r4 { animation-delay: calc(var(--k, 0s) - 1.7s); }
.el-bg .bg-drop.r5, .el-bg .bg-ring.r5 { animation-delay: calc(var(--k, 0s) - .8s); }
.el-bg .bg-whirl { fill: none; stroke: var(--water); stroke-width: 1.3; stroke-linecap: round; vector-effect: non-scaling-stroke; transform-box: view-box; transform-origin: 90px 90px; animation: st-asw 20s linear var(--k, 0s) infinite reverse; }
.el-bg .bg-whirl.w2 { stroke-width: 1; stroke-dasharray: 3 8; opacity: .55; animation-duration: 30s; }
.el-bg .bg-sparks { transform-box: view-box; transform-origin: 80px 80px; animation: st-bg-spark 3.8s ease-out var(--k, 0s) infinite; }
.el-bg .bg-sparks.s2 { animation-delay: calc(var(--k, 0s) - 1.9s); }
.el-bg .bg-sparks line { stroke: var(--fire); stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
@keyframes st-bg-spark { 0% { transform: scale(.25); opacity: 0; } 12% { opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
.el-bg .bg-core { fill: var(--fire); transform-box: fill-box; transform-origin: center; animation: st-bg-core 1.9s ease-in-out var(--k, 0s) infinite; }
@keyframes st-bg-core { 0%, 100% { transform: scale(.6); opacity: .35; } 12% { transform: scale(1.35); opacity: 1; } }
.el-bg .bg-heat { fill: none; stroke: var(--fire); stroke-width: 1.3; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: st-bg-heat 5.4s ease-in-out var(--k, 0s) infinite; }
.el-bg .bg-heat.h2 { animation-delay: calc(var(--k, 0s) - 1.8s); }
.el-bg .bg-heat.h3 { animation-delay: calc(var(--k, 0s) - 3.6s); }
@keyframes st-bg-heat { 0% { transform: translateY(34px); opacity: 0; } 30% { opacity: .85; } 100% { transform: translateY(-64px); opacity: 0; } }
.el-bg .bg-curl { fill: none; stroke: var(--air); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: st-bg-curl 7s ease-in-out var(--k, 0s) infinite; }
.el-bg .bg-curl.c2 { animation-delay: calc(var(--k, 0s) - 1.3s); }
.el-bg .bg-curl.c3 { animation-delay: calc(var(--k, 0s) - 2.6s); }
@keyframes st-bg-curl { 0% { stroke-dashoffset: 100; opacity: 0; } 8% { opacity: 1; } 48% { stroke-dashoffset: 0; } 70% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: -100; opacity: 0; } }
.el-bg .bg-seed { transform-box: fill-box; transform-origin: 50% 100%; animation: st-bg-seed 12s ease-in-out var(--k, 0s) infinite; }
.el-bg .bg-seed.s2 { animation-delay: calc(var(--k, 0s) - 4s); }
.el-bg .bg-seed.s3 { animation-delay: calc(var(--k, 0s) - 8s); }
.el-bg .bg-seed path { fill: none; stroke: var(--air); stroke-width: 1.1; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.el-bg .bg-seed ellipse { fill: var(--air); }
@keyframes st-bg-seed { 0% { transform: translate(0, 36px) rotate(-12deg); opacity: 0; } 14% { opacity: .9; } 50% { transform: translate(38px, -24px) rotate(14deg); } 84% { opacity: .8; } 100% { transform: translate(86px, -96px) rotate(-8deg); opacity: 0; } }
.el-bg .bg-mark-ring { fill: none; stroke: rgba(220,229,242,.4); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 2 7; transform-box: view-box; transform-origin: 80px 80px; animation: st-asw 44s linear var(--k, 0s) infinite; }
.el-bg .bg-mark-spin { transform-box: view-box; transform-origin: 80px 80px; animation: st-asw 64s linear var(--k, 0s) infinite reverse; }
.el-bg .bg-dot { animation: st-bg-dot 11s ease-in-out var(--k, 0s) infinite; }
.el-bg .bg-dot.d-f { fill: var(--fire); --mx: -24px; --my: -24px; }
.el-bg .bg-dot.d-a { fill: var(--air); --mx: 24px; --my: -24px; }
.el-bg .bg-dot.d-e { fill: var(--earth); --mx: -24px; --my: 24px; }
.el-bg .bg-dot.d-w { fill: var(--water); --mx: 24px; --my: 24px; }
@keyframes st-bg-dot { 0%, 18%, 100% { transform: translate(0, 0); } 50%, 66% { transform: translate(var(--mx), var(--my)); } }
/* ══ THE STARS (CONCEPT_ART §1h): the website's drifting dots, from its computer pages (pc.css), in the four
   element colors and a soft white.  Eight layers, one dot to a tile; the tiles differ in size so the dots never
   line up.  Twenty percent more of them than on the website, and the layer at 80% where the website's is at
   60% (D1278).  The layer reaches 48 px past every edge and drifts on the pieces' own slow roam, moved as a whole
   (a transform, so a phone never redraws it as it moves).  Behind the panels only: in the faint copy over the
   panels they would hardly show and would still cost the words on the panels some contrast.  It moves wherever
   the pieces drift and is still when the phone asks for less motion. */
.el-bg .bg-stars{position:absolute;inset:-48px;pointer-events:none;opacity:.8;background-repeat:repeat;
  animation:st-bg-roam var(--t,80s) ease-in-out var(--d,0s) infinite}

.el-bg.thru {
  z-index: 4;
  opacity: .18;
  mix-blend-mode: screen;
}

/* It fades in when it arrives; a fade is not motion, but asked for less
   motion, it is simply there. */
.el-bg {
  transition: opacity .6s ease-out;
}

.el-bg.arriving {
  opacity: 0;
}

/* How much moves (background.js, motionLevel()): full, nothing here; the
   drift alone (the pieces and the stars roam, nothing inside a piece moves,
   the glows drift and do not breathe); still, nothing moves. And nothing
   moves while the app is out of sight. */
.el-bg.drift .bgm * {
  animation-play-state: paused !important;
}

.el-bg.drift .bg-orb {
  animation-play-state: running, paused;
}

.el-bg.still,
.el-bg.still *,
.el-bg.paused,
.el-bg.paused * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .el-bg,
  .el-bg * {
    animation-play-state: paused !important;
  }

  .el-bg {
    transition: none;
  }
}

/* ══ THE FESTIVAL LAYER (FESTIVALS 0001; D2216 (6), D2222): in a festival's
   days, one more layer straight after the background's back layer, so it sits
   behind every panel, every word on a panel, every button's fill and the tab
   bar, and never in the faint copy over the panels. The values are the
   approved render's own (Concept Art/festivals.html's fest.css), character
   for character; the pieces and their placing live only in festivals.js. ══ */
.fest-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fest-drift { position: absolute; inset: 0; animation: fk-roam var(--t, 72s) ease-in-out var(--d, 0s) infinite; }
@keyframes fk-roam { 0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(var(--dx, 18px), var(--dy, -14px)); }
  66% { transform: translate(calc(var(--dx, 18px) * -.6), calc(var(--dy, -14px) * .7)); } }
.fest-layer .fp { position: absolute; }
.fest-layer .fpm, .fest-layer .fps { position: relative; width: 100%; height: 100%; }
.fest-layer svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* falling and rising: the whole height of the screen, then again; a sideways
   sway; leaves, petals and snow turn */
.fest-layer .fp-fall .fpm, .fest-layer .fp-rise .fpm { animation: fk-travel var(--t, 30s) linear var(--d, 0s) infinite; }
@keyframes fk-travel { from { transform: translateY(var(--from)); } to { transform: translateY(var(--to)); } }
.fest-layer .fp-fall .fps, .fest-layer .fp-rise .fps { animation: fk-sway var(--st, 4s) ease-in-out var(--d, 0s) infinite alternate; }
.fest-layer .fp-fall.fp-spin .fps { animation: fk-sway var(--st, 4s) ease-in-out var(--d, 0s) infinite alternate, fk-spin calc(var(--st, 4s) * 3) linear var(--d, 0s) infinite; }
@keyframes fk-sway { from { translate: calc(var(--sw, 14px) * -1) 0; } to { translate: var(--sw, 14px) 0; } }
@keyframes fk-spin { from { rotate: 0deg; } to { rotate: var(--sp, 220deg); } }

/* hanging: a thin string from the top edge; the whole thing sways from its top */
.fest-layer .fp-hang .fpm { display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0;
  animation: fk-swing var(--t, 6s) ease-in-out var(--d, 0s) infinite alternate; }
.fest-layer .fp-hang .fstr { display: block; width: 1px; flex: none; background: linear-gradient(rgba(200,211,228,.10), rgba(200,211,228,.42)); }
.fest-layer .fp-hang .fps { width: 100%; flex: none; }
@keyframes fk-swing { from { transform: rotate(calc(var(--a, 3deg) * -1)); } to { transform: rotate(var(--a, 3deg)); } }

/* staying in place: a slow bob; rangoli turns; a dreidel rocks */
.fest-layer .fp-float .fpm, .fest-layer .fp-sky .fpm { animation: fk-bob var(--t, 7s) ease-in-out var(--d, 0s) infinite alternate; }
@keyframes fk-bob { from { transform: translateY(calc(var(--bob, 5px) * -1)) rotate(calc(var(--rr, 3deg) * -1)); }
  to { transform: translateY(var(--bob, 5px)) rotate(var(--rr, 3deg)); } }
.fest-layer .fp-sky .fpm { animation: fk-bob var(--t, 9s) ease-in-out var(--d, 0s) infinite alternate, fk-breathe 7s ease-in-out infinite alternate; }
@keyframes fk-breathe { from { opacity: .86; } to { opacity: 1; } }
.fest-layer .fp-turn .fps { animation: fk-turn var(--tt, 80s) linear infinite; }
@keyframes fk-turn { to { rotate: 360deg; } }
.fest-layer .fp-rock .fps { transform-origin: 50% 90%; animation: fk-rock 1.7s ease-in-out infinite alternate; }
@keyframes fk-rock { from { rotate: -9deg; } to { rotate: 9deg; } }

/* small lights: brighten and dim */
.fest-layer .fp-twinkle .fpm { animation: fk-tw var(--t, 2.6s) ease-in-out var(--d, 0s) infinite alternate; }
@keyframes fk-tw { from { opacity: .22; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }

/* fireworks: open, hang a moment, fade; then again elsewhere in time */
.fest-layer .fp-bloom .fpm { animation: fk-bloom var(--t, 5s) ease-out var(--d, 0s) infinite; }
@keyframes fk-bloom { 0% { opacity: 0; transform: scale(.18); } 18% { opacity: 1; transform: scale(.92); }
  52% { opacity: .75; transform: scale(1.04); } 78%, 100% { opacity: 0; transform: scale(1.1); } }

/* bats: across the screen, rising and falling a little, wings beating */
.fest-layer .fp-fly .fpm { animation: fk-across var(--t, 22s) linear var(--d, 0s) infinite; }
@keyframes fk-across { from { transform: translateX(var(--from)); } to { transform: translateX(var(--to)); } }
.fest-layer .fp-fly .fps { animation: fk-wave var(--st, 2.4s) ease-in-out var(--d, 0s) infinite alternate; }
@keyframes fk-wave { from { translate: 0 calc(var(--sw, 16px) * -1); } to { translate: 0 var(--sw, 16px); } }
.fest-layer .fp-flip svg { transform: scaleX(-1); }
.fest-layer .fk-wing { transform-box: fill-box; transform-origin: 50% 40%; animation: fk-flap .34s ease-in-out infinite alternate; }
@keyframes fk-flap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }

/* papel picado: a string of flags, swaying from its middle */
.fest-layer .fp-banner .fpm { transform-origin: 50% 0; rotate: var(--tilt, 0deg); animation: fk-swing var(--t, 6s) ease-in-out var(--d, 0s) infinite alternate; }

/* inside the pieces: flames flicker, ripples spread */
.fest-layer .fk-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: fk-flick 1.1s ease-in-out infinite alternate; }
@keyframes fk-flick { from { transform: scale(.9, .86); } to { transform: scale(1.06, 1.08); } }
.fest-layer .fk-rip { transform-box: fill-box; transform-origin: center; animation: fk-rip 4.4s ease-out infinite; }
.fest-layer .fk-d2 { animation-delay: -2.2s; }
@keyframes fk-rip { 0% { transform: scale(.5); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.15); opacity: 0; } }

/* THE THREE PHONES (D1153 (4)), the background's own, told through
   background.js's motionLevel(): average, the drift alone; weak, or asked
   for less, nothing moves. And nothing moves while the app is out of sight
   (the background's `paused`). */
.fest-layer.avg .fpm,
.fest-layer.avg .fpm * {
  animation-play-state: paused !important;
}

.fest-layer.weak,
.fest-layer.weak *,
.fest-layer.paused,
.fest-layer.paused * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .fest-layer,
  .fest-layer * {
    animation-play-state: paused !important;
  }
}
