/*! meji sky - visual + animation framework - v0.1.0
 *  extracted from the mejistudios.com main page (site/assets/css/styles.css @ 2026-08-15)
 *  no build step, no dependencies, no javascript required for anything in this file.
 *
 *  CONTENTS
 *    00  reset                   - mostly, but not entirely, optional
 *    01  tokens                  - :root custom properties
 *    02  type utilities          - .t .tiny .glow .big-word .mid-word .sr-only
 *    03  motion primitives       - @property --pop, @keyframes bob / halo
 *    04  orbs                    - .orb, 12 palettes, .halo, .ring
 *    05  fields                  - .field and its named variants (page sections)
 *    06  floating zones          - .fzone, .item, .slot-1 .. .slot-6
 *    07  screens                 - .screen, .vid-wrap, .play-orb, .tilt
 *    08  stills                  - .still, .ph, five .shape-* silhouettes
 *    09  controls                - .btn .name-input .f-input .vpill .ctl-orb .prog
 *    10  veils                   - .veil, .close-orb, .paper, .theater, body.locked
 *    11  small screens
 *    12  reduced motion
 *
 *  CLASS NAMES ARE UNPREFIXED ON PURPOSE - they match the live site 1:1, so markup
 *  can move between the site and a new project without edits. If you are dropping
 *  this into a codebase that already owns names like .item or .btn, import it into
 *  a cascade layer so your own rules win:
 *      @import url("meji-sky.css") layer(meji);
 *
 *  ONE CAVEAT ON THAT. Cascade layers invert for !important declarations - an
 *  important rule in a layer BEATS an unlayered important rule. This file has
 *  exactly two, both deliberate, and both will still win over yours:
 *      [hidden]{display:none!important}   the hidden attribute must beat any
 *                                         author display, or panels stay on screen
 *      .item{--s:33vw!important}          in the <=640px block: it has to beat the
 *                                         inline --s that place() writes, and an
 *                                         inline custom property outranks every
 *                                         selector, important or not
 */

/* ============================================================ 00  reset */
/* NOT all of this is optional, despite looking like a generic reset.
 *   REQUIRED: box-sizing:border-box  - .f-input, .item and .card all set width
 *             plus padding and would overflow their containers under content-box
 *   REQUIRED: the button reset       - .item, .wander, .tab and .close-orb are
 *             <button>s that declare no font-family or background of their own;
 *             without this they render as platform chrome
 *   REMOVABLE if you already reset: the margin/padding zeroing, the `a` rule,
 *             html{scroll-behavior}, section{scroll-margin-top}
 */

*{margin:0;padding:0;box-sizing:border-box}
/* the hidden attribute must win: any author `display` (flex here, flex there) would
   otherwise out-rank the browser's [hidden]{display:none} and leave panels on screen */
[hidden]{display:none!important}
html{scroll-behavior:smooth}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
:focus-visible{outline:3px solid var(--yellow);outline-offset:6px;border-radius:999px}
section{scroll-margin-top:30px}

/* ============================================================ 01  tokens */
/* Recolor the whole kit by overriding these. Every rule below reads from them. */

:root{
  /* --- sky palette: light at the top, deep in the middle, violet at dusk --- */
  --sky:#A9D6EC;      /* highest, palest blue          */
  --day:#7FBCE0;      /* the everyday mid blue          */
  --sea:#4FA6D6;      /* the brand blue                 */
  --deep:#3E8FC4;     /* one step under the sea         */
  --monitor:#23B0E8;  /* the electric band              */
  --dusk:#3E6AB4;     /* evening                        */
  --peri:#7C90D8;     /* periwinkle, just before dawn   */
  --ink:#1E4E7C;      /* text on cream, footer text     */
  --cream:#FFF6D8;    /* body text, button faces, paper */
  --yellow:#F5EE7A;   /* the glow, focus rings, "on"    */
  --coral:#F9A66B;    /* the one warm accent            */

  /* --- type --- */
  --px:'VT323','Courier New',monospace;
  --track:.06em;                 /* the default letter-spacing of .t     */
  --track-wide:.14em;            /* headings                             */
  --track-widest:.24em;          /* mastheads and small caps-ish labels  */

  /* --- motion --- */
  --bob-dur:8s;                  /* default float period                 */
  --bob-rise:-16px;              /* how far an orb climbs at mid-cycle   */
  --ease-pop:cubic-bezier(.2,.8,.3,1);

  /* --- shape --- */
  --r-pill:999px;
  --r-card:28px;
  --r-screen:44px;

  /* --- depth --- */
  --shade:rgba(18,58,108,.35);   /* the ground shadow under floating things */
  --lift-1:0 10px 24px rgba(18,58,108,.28);
  --lift-2:0 18px 40px rgba(18,58,108,.35);
  --lift-3:0 30px 80px rgba(6,24,52,.5);
}

/* VT323, self-hosted alongside the rest of the site - one 7KB woff2, no
   third-party request on the critical path. (The standalone kit in framework/
   ships this commented out, because it does not bundle the font.) */
@font-face{
  font-family:'VT323';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('../media/font/vt323.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* The page itself: the sky gradient runs top to bottom across the whole document,
   so sections do not carry their own backgrounds - they float on one continuous sky. */
.sky-body{
  font-family:var(--px);
  color:var(--cream);
  background:linear-gradient(180deg,
    var(--sky) 0%,
    var(--day) 7%,
    var(--sea) 14%,
    var(--sea) 26%,
    var(--deep) 33%,
    var(--day) 40%,
    var(--sea) 47%,
    var(--deep) 55%,
    var(--day) 62%,
    var(--monitor) 69%,
    var(--monitor) 75%,
    var(--dusk) 82%,
    var(--peri) 91%,
    var(--sky) 100%);
  overflow-x:hidden;
  text-align:center;
}

/* ============================================================ 02  type utilities */

.t{letter-spacing:var(--track)}
.tiny{font-size:17px;opacity:.85}
.glow{color:var(--yellow);text-shadow:0 0 14px rgba(245,238,122,.75),0 0 34px rgba(245,238,122,.35)}
.big-word{font-size:clamp(40px,7vw,72px);letter-spacing:var(--track-wide);line-height:1.15}
.mid-word{font-size:clamp(26px,4.4vw,38px);letter-spacing:var(--track-wide)}
.masthead{font-size:26px;letter-spacing:var(--track-widest);opacity:.95}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ============================================================ 03  motion primitives */

/* --pop is a registered property so it can EASE. The bob animation owns `transform`,
   so a plain :hover transform would lose every time - instead hover eases this
   number and the keyframe multiplies it back in. */
@property --pop{
  syntax:"<number>";
  inherits:false;
  initial-value:1;
}

@keyframes bob{
  0%,100%{transform:translateY(0) rotate(-1.5deg) scale(var(--pop,1))}
  50%{transform:translateY(var(--bob-rise,-16px)) rotate(1.5deg) scale(var(--pop,1))}
}
@keyframes halo{
  0%,100%{transform:translateX(-50%) translateY(0) scaleY(.36) rotate(-5deg)}
  50%{transform:translateX(-50%) translateY(-10px) scaleY(.36) rotate(3deg)}
}

/* Put .float on anything to make it drift. --dur sets the period, --del the phase.
   Give every floating thing on a screen a DIFFERENT --del (negative values start
   mid-cycle) or they all rise and fall together and the effect dies. */
.float{animation:bob var(--dur,var(--bob-dur)) ease-in-out var(--del,0s) infinite}

/* ============================================================ 04  orbs */

/* An orb is a circle with a soft radial light source, a blurred ground shadow, and
   a slow float. It is the single repeated object the whole design is built from:
   nav items, section anchors, avatars, swatches, buttons, loading posters. */
.orb{
  /* custom properties inherit, so a palette class on an ancestor would repaint
     every orb inside it. Reset first; the palette rules below re-set it at the
     same specificity and later in the file, and an inline --orb outranks both. */
  --orb:initial;
  width:100%;aspect-ratio:1;border-radius:50%;
  background:var(--orb,radial-gradient(circle at 34% 28%,#FDFBF2 0%,#CFE4F2 34%,#8FBBDD 68%,#5E93C2 100%));
  animation:bob var(--dur,var(--bob-dur)) ease-in-out var(--del,0s) infinite;
  position:relative;
}
/* the ground shadow. It sits BELOW the orb and does not move, which is what sells
   the float - the object rises, its shadow stays put. */
.orb::after{
  content:"";position:absolute;left:15%;right:15%;top:104%;height:14%;
  background:radial-gradient(ellipse at center,rgba(18,58,108,.38),transparent 70%);
  border-radius:50%;filter:blur(2px);
}
/* .orb.frozen - a static orb for swatches, table rows, chips: no float, no shadow.
   Deliberately NOT called .still: that name belongs to the photo silhouettes in
   section 08, and one class meaning two things in an unprefixed file is a trap. */
.orb.frozen{animation:none}
.orb.frozen::after{display:none}

/* --- the twelve palettes -------------------------------------------------
   Each sets --orb, so you can also set --orb inline (or from JS) for a
   one-off colour without inventing a class. Stop positions are preserved
   exactly as the site ships them; they are not all identical on purpose. */
.l-static{--orb:radial-gradient(circle at 34% 28%,#FDFBF2 0%,#CFE4F2 34%,#8FBBDD 68%,#5E93C2 100%)}
.l-dust  {--orb:radial-gradient(circle at 34% 28%,#FFF3DC 0%,#EBCFA5 38%,#C29B6C 72%,#8F6E4C 100%)}
.l-signal{--orb:radial-gradient(circle at 36% 30%,#FFFEF4 0%,#FBF3B8 30%,#F2D879 62%,#D8A945 100%)}
.l-moth  {--orb:radial-gradient(circle at 34% 28%,#F7F2FF 0%,#D9CDF4 38%,#A692D8 72%,#7263AE 100%)}
.l-tide  {--orb:radial-gradient(circle at 34% 28%,#DFFBF6 0%,#93DFD2 38%,#3FAF9F 72%,#1F7A70 100%)}
.l-ember {--orb:radial-gradient(circle at 34% 28%,#FFE9C4 0%,#FBB56E 36%,#E86A3A 70%,#A83A24 100%)}
.l-prism {--orb:radial-gradient(circle at 30% 26%,#FFFDF0 0%,#FBD9E8 26%,#BFD8F6 52%,#9DE8DC 76%,#6FA8D8 100%)}
.l-prism2{--orb:radial-gradient(circle at 66% 30%,#FFFDF0 0%,#D3F2C9 30%,#8FD8E8 58%,#7C90D8 100%)}
.l-paper {--orb:radial-gradient(circle at 34% 28%,#FFFDF4 0%,#F6E9C8 42%,#DCC79A 78%,#B49E74 100%)}
.l-sun   {--orb:radial-gradient(circle at 40% 34%,#FFFEF6 0%,#FCEFA6 28%,#F8C864 56%,#E88F4A 82%,#C4643A 100%)}
.l-dusk  {--orb:radial-gradient(circle at 36% 30%,#C9D4F6 0%,#8493DC 36%,#4E5CB4 70%,#33407E 100%)}
.l-core  {--orb:radial-gradient(circle at 36% 30%,#EDFFFB 0%,#A8EFE2 34%,#4FC4B4 68%,#2A8A80 100%)}

/* the halo: a tipped, glowing ring that marks one orb as the special one */
.halo{
  position:absolute;left:50%;top:-16%;
  width:58%;aspect-ratio:1;
  border:7px solid var(--yellow);border-radius:50%;
  transform:translateX(-50%) scaleY(.36) rotate(-5deg);
  box-shadow:0 0 22px rgba(245,238,122,.75),inset 0 0 16px rgba(245,238,122,.55);
  animation:halo 6s ease-in-out infinite;pointer-events:none;
}

/* the progress ring: a conic sweep masked into a hairline. Set --p to 0..100.
   Add .on to fade it in - it starts invisible so an untouched item stays clean. */
.ring{
  position:absolute;inset:-11px;border-radius:50%;
  background:conic-gradient(var(--yellow) calc(var(--p,0)*1%),rgba(255,246,216,.16) 0);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 8px),#000 calc(100% - 7px));
          mask:radial-gradient(farthest-side,transparent calc(100% - 8px),#000 calc(100% - 7px));
  opacity:0;transition:opacity .5s ease;pointer-events:none;
}
.ring.on{opacity:1}

/* ============================================================ 05  fields */

/* A field is one full-height page section: a centred flex column on the shared sky.
   Use .field plus a size variant, or one of the named aliases, which exist so
   markup copied off the site keeps working unchanged. */
.field{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:var(--gap,28px);padding:var(--pad,90px 8vw);
  min-height:var(--min,92vh);
}
.field.tall{min-height:100vh;min-height:100svh}
.field.short{--min:70vh}

.sky-field    {--gap:30px;--pad:64px 8vw 90px;
               display:flex;flex-direction:column;align-items:center;justify-content:center;
               min-height:100vh;min-height:100svh;gap:var(--gap);padding:var(--pad)}
.screen-field {--gap:48px;--pad:100px 8vw;--min:96vh;
               display:flex;flex-direction:column;align-items:center;justify-content:center;
               min-height:var(--min);gap:var(--gap);padding:var(--pad)}
.stills-field {--gap:46px;--pad:100px 8vw;--min:96vh;
               display:flex;flex-direction:column;align-items:center;justify-content:center;
               min-height:var(--min);gap:var(--gap);padding:var(--pad)}
.waiting      {--gap:30px;--pad:80px 8vw;
               display:flex;flex-direction:column;align-items:center;justify-content:center;
               min-height:100vh;min-height:100svh;gap:var(--gap);padding:var(--pad)}
.dusk-field,
.supply-field {--gap:28px;--pad:90px 8vw;--min:92vh;
               display:flex;flex-direction:column;align-items:center;justify-content:center;
               min-height:var(--min);gap:var(--gap);padding:var(--pad)}
.support-field{--gap:26px;--pad:90px 8vw;--min:70vh;
               display:flex;flex-direction:column;align-items:center;justify-content:center;
               min-height:var(--min);gap:var(--gap);padding:var(--pad)}
.next-field   {--gap:44px;--pad:80px 8vw 60px;--min:80vh;
               display:flex;flex-direction:column;align-items:center;justify-content:center;
               min-height:var(--min);gap:var(--gap);padding:var(--pad)}

/* the hero's row of orb links */
.kin{display:flex;gap:min(9vw,84px);align-items:flex-end;justify-content:center;margin-top:22px;flex-wrap:wrap}
.kin a{display:flex;flex-direction:column;align-items:center;gap:16px;padding:8px;border-radius:50%}
.kin .orb{width:min(15vmin,104px)}
.kin figcaption,.kin .label{display:block;font-size:18px;opacity:.8;letter-spacing:.1em}
.kin .k{display:block;font-size:14px;opacity:.72;margin-top:3px}

/* a big tappable orb: the sign-in sun, the game door */
.sun-btn{width:min(44vmin,300px);display:flex;flex-direction:column;align-items:center;gap:18px;border-radius:50%}
.sun-btn .enter{font-size:18px;letter-spacing:var(--track-widest);opacity:.75}
.sun-wrap{width:min(44vmin,300px);position:relative}
.waiting .sun-wrap{width:min(36vmin,250px)}
.dusk-field .sun-wrap{width:min(38vmin,270px)}
.orb-door{display:block;border-radius:50%}
.orb-door .orb{transition:filter .25s ease}
.orb-door:hover .orb,.orb-door:focus-visible .orb{filter:brightness(1.12) drop-shadow(0 0 24px rgba(245,238,122,.55))}

/* the scroll cue under the hero */
.down{font-size:30px;opacity:.7;animation:bob 3.6s ease-in-out infinite;display:inline-block;margin-top:6px}

/* a section header: optional logo plate, then the section word */
.fhead{display:flex;flex-direction:column;align-items:center;gap:22px;padding:90px 8vw 30px}
.brand{
  width:min(38vw,190px);border-radius:24%;overflow:hidden;
  box-shadow:var(--lift-2);
  animation:bob 8.5s ease-in-out infinite;
}
.brand img{width:100%;height:auto;display:block}

/* a soft-cornered block, e.g. the "parcel" that marks the tools section */
.parcel{
  /* its own token, not --orb: --orb inherits, and a palette class on a wrapper
     would otherwise repaint the parcel plate as an orb */
  background:var(--parcel,radial-gradient(circle at 32% 26%,#FFFDF2 0%,#DDEDF6 40%,#9CC2E0 78%,#6E97C4 100%));
  width:min(34vmin,230px);aspect-ratio:1;border-radius:26%;
  animation:bob var(--dur,var(--bob-dur)) ease-in-out var(--del,0s) infinite;position:relative;
}
.parcel::after{
  content:"";position:absolute;left:14%;right:14%;top:103%;height:13%;
  background:radial-gradient(ellipse at center,var(--shade),transparent 70%);
  border-radius:50%;filter:blur(2px);
}
.parcel .arrow{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:min(14vmin,86px);color:var(--ink);opacity:.75}

/* the countdown clock */
.count{font-size:clamp(34px,6vw,54px);letter-spacing:.22em}
.room-word{font-size:clamp(46px,9vw,84px);letter-spacing:.18em;line-height:1.1}
.info-dot{
  display:inline-flex;align-items:center;justify-content:center;
  width:46px;height:46px;border-radius:50%;
  border:4px solid var(--coral);color:var(--coral);font-size:24px;margin-top:6px;
}

/* a row of small labelled orbs, e.g. "up next" */
.next-row{display:flex;gap:min(8vw,74px);flex-wrap:wrap;justify-content:center;align-items:flex-end}
.next-row figure{display:flex;flex-direction:column;align-items:center;gap:16px}
.next-row .orb{width:min(14vmin,96px)}
.next-row figcaption,.next-row .label{display:block;font-size:17px;opacity:.85;line-height:1.6;letter-spacing:.08em}
.next-link{display:flex;flex-direction:column;align-items:center;gap:16px;color:inherit;text-decoration:none}
.next-link .orb{transition:filter .2s ease,transform .2s ease}
.next-link:hover .orb,.next-link:focus-visible .orb{filter:brightness(1.12) drop-shadow(0 0 18px rgba(245,238,122,.5));transform:translateY(-3px)}
.next-link:focus-visible{outline:1px solid currentColor;outline-offset:8px}

/* a row of pill links */
.link-row{display:flex;gap:18px;flex-wrap:wrap;justify-content:center;max-width:640px}

/* the footer sits on the pale top-of-sky colour again, so its text flips to ink */
.foot{padding:40px 8vw 90px;display:flex;flex-direction:column;align-items:center;gap:16px;color:var(--ink)}
.foot .tiny{opacity:.75}
.foot a{border-radius:var(--r-pill);padding:2px 8px}
.foot-logo{width:74px;border-radius:20%;overflow:hidden;box-shadow:0 10px 24px rgba(18,58,108,.3)}
.foot-logo img{width:100%;height:auto;display:block}

/* ============================================================ 06  floating zones */

/* A zone is a fixed-height stage; items inside it are absolutely positioned by
   percentage, so the composition holds its shape at any viewport width. Set the
   stage height with --h on the zone, and each item's width with --s.
   On narrow screens (section 11) the whole thing collapses into a wrapped flex
   row and the absolute coordinates stop mattering. */
.ffield{position:relative}
.fzone{position:relative;height:var(--h,100vh)}
.item{
  position:absolute;transform:translateX(-50%);
  display:flex;flex-direction:column;align-items:center;gap:18px;
  width:var(--s,min(18vw,135px));border-radius:40px;padding:6px;
}
/* <figcaption> is only valid inside <figure>, and .item is a <button>/<a>. Use
   <span class="label"> there; both selectors are supported so markup copied off
   the site (which uses figcaption inside buttons) still renders. */
.item figcaption,.item .label{display:block;font-size:17px;letter-spacing:.08em;opacity:.75;transition:opacity .3s ease;line-height:1.5}
.item:hover figcaption,.item:focus-visible figcaption,
.item:hover .label,.item:focus-visible .label{opacity:1}
.item .k{display:block;font-size:15px;opacity:.75}

/* tinted orbs carry --filt so hover can COMPOSE with the tint instead of losing
   to it; brightness(1) is the no-op default */
.item .orb{filter:var(--filt,brightness(1))}
/* hover-capable pointers only - on touch the grown state would stick */
@media (hover:hover){
  .item .orb{transition:--pop .35s var(--ease-pop),filter .35s ease}
  .item:hover .orb,.item:focus-visible .orb{
    --pop:1.12;
    filter:var(--filt,brightness(1)) brightness(1.06) saturate(1.04) drop-shadow(0 0 18px rgba(255,246,216,.45));
  }
}

/* six hand-tuned resting places: scattered rather than gridded, and spaced so
   their boxes clear each other at the recommended --h (about 115vh and up).
   Shorten --h a lot and slots 3 and 6 will start to crowd - check it.
   Hand an item a slot class, or set left/top/--s inline. meji-sky.js `slot()`
   hashes an id to one of these deterministically. There are only six. */
.slot-1{left:24%;top:6%;  --s:min(20vw,150px);--dur:9s;  --del:0s}
.slot-2{left:62%;top:28%; --s:min(23vw,175px);--dur:7.5s;--del:-3s}
.slot-3{left:38%;top:56%; --s:min(27vw,205px);--dur:8.5s;--del:-5s}
.slot-4{left:70%;top:72%; --s:min(18vw,135px);--dur:10s; --del:-2s}
.slot-5{left:26%;top:76%; --s:min(21vw,160px);--dur:8s;  --del:-6s}
.slot-6{left:80%;top:48%; --s:min(16vw,124px);--dur:9.5s;--del:-1s}

/* ============================================================ 07  screens */

/* A screen is a rounded 16:9 video plate that floats. Its default face is a
   generated "off" pattern - two soft light blooms over a dark gradient - so a
   screen with no video still looks deliberate. --screen-hue rotates that face;
   derive it from the item id and every screen gets its own colour for free. */
.screen{
  position:relative;width:min(76vw,520px);aspect-ratio:16/9;
  animation:bob var(--dur,9s) ease-in-out var(--del,0s) infinite;
}
.screen .vid-wrap{
  position:absolute;inset:0;border-radius:var(--r-screen);overflow:hidden;
  background:
    radial-gradient(circle at 34% 30%,hsl(var(--screen-hue,214) 90% 78%) 0 9%,transparent 10%),
    radial-gradient(circle at 66% 66%,hsl(calc(var(--screen-hue,214) + 54) 74% 62%) 0 16%,transparent 17%),
    linear-gradient(145deg,hsl(var(--screen-hue,214) 48% 22%),#0d2345 72%);
  box-shadow:0 24px 48px rgba(18,58,108,.4)
}
.screen video{width:100%;height:100%;object-fit:cover;display:block}
.screen::after{
  content:"";position:absolute;left:12%;right:12%;top:103%;height:10%;
  background:radial-gradient(ellipse at center,var(--shade),transparent 70%);
  border-radius:50%;filter:blur(3px);
}
.play-orb{
  position:absolute;right:-14px;bottom:-16px;
  width:64px;height:64px;border-radius:50%;
  background:var(--cream);color:var(--ink);
  display:flex;align-items:center;justify-content:center;font-size:26px;
  box-shadow:0 10px 24px rgba(18,58,108,.35);
  animation:bob 5s ease-in-out -2s infinite;pointer-events:none;
}
.screen-fig{display:flex;flex-direction:column;align-items:center;gap:20px}
.screen-fig figcaption{font-size:17px;letter-spacing:.08em;opacity:.85;line-height:1.5}
.screen-fig .k{display:block;font-size:15px;opacity:.75}
.screens{display:flex;gap:min(7vw,70px);flex-wrap:wrap;justify-content:center;align-items:center}

/* four small rotations. Alternating them down a row is what stops a wrapped
   flex list from reading as a grid. */
.tilt{display:inline-block}
.tilt.a{transform:rotate(-2.5deg)}
.tilt.b{transform:rotate(2deg)}
.tilt.c{transform:rotate(-1.5deg)}
.tilt.d{transform:rotate(3deg)}

/* ============================================================ 08  stills */

/* A still is a photo cut into an organic silhouette. The shape class goes on the
   OUTER element only - each shape rule is `.shape-x, .shape-x .ph`, so it sizes
   the outer (which floats and drops a shadow) and the inner .ph (which clips). */
.stills{display:flex;gap:min(6vw,56px) min(7vw,64px);flex-wrap:wrap;justify-content:center;align-items:center;max-width:1200px}
.still-fig{display:flex;flex-direction:column;align-items:center;gap:20px}
.still{position:relative;overflow:visible;animation:bob var(--dur,8.6s) ease-in-out var(--del,0s) infinite}
.still .ph{overflow:hidden;display:block}
.still img{width:100%;height:100%;object-fit:cover;display:block}
.still::after{
  content:"";position:absolute;left:14%;right:14%;top:102%;height:10%;
  background:radial-gradient(ellipse at center,var(--shade),transparent 70%);
  border-radius:50%;filter:blur(3px);
}
.shape-blob,.shape-blob .ph {width:min(60vw,310px);aspect-ratio:16/9.6;border-radius:58% 42% 52% 48% / 52% 55% 45% 48%}
.shape-round,.shape-round .ph{width:min(44vw,220px);aspect-ratio:1;border-radius:50%}
.shape-soft,.shape-soft .ph {width:min(54vw,280px);aspect-ratio:16/10;border-radius:22%}
.shape-egg,.shape-egg .ph   {width:min(50vw,255px);aspect-ratio:16/10;border-radius:48% 52% 44% 56% / 62% 58% 42% 38%}
.shape-pill,.shape-pill .ph {width:min(56vw,290px);aspect-ratio:16/9;border-radius:var(--r-pill)}
.still-fig figcaption{font-size:17px;letter-spacing:.08em;opacity:.85;line-height:1.5}
.still-fig .k{display:block;font-size:15px;opacity:.75}

/* ============================================================ 09  controls */

.btn{
  display:inline-block;font-family:var(--px);font-size:22px;letter-spacing:.1em;
  color:var(--ink);background:var(--cream);
  padding:14px 40px;border-radius:var(--r-pill);
  box-shadow:0 10px 26px rgba(18,58,108,.28);
  transition:transform .25s ease,background .25s ease;
  cursor:pointer;border:0;
}
.btn:hover{transform:translateY(-3px);background:#FFEDA8}
.btn.small{font-size:18px;padding:10px 26px}
.btn.ghost{background:transparent;color:var(--ink);border:2px solid rgba(30,78,124,.4);box-shadow:none}
.btn.ghost:hover{background:rgba(30,78,124,.08)}
.btn[disabled]{opacity:.5;transform:none;cursor:default}

/* a text button that stays quiet until you look at it */
.wander{font-size:18px;opacity:.85;letter-spacing:.12em;border-radius:var(--r-pill);padding:6px 14px}
.wander:hover{opacity:1}

/* the pill input, on the sky */
.name-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;justify-content:center}
.name-input{
  font-family:var(--px);font-size:20px;letter-spacing:.08em;text-align:center;
  color:var(--ink);background:var(--cream);
  border:0;border-radius:var(--r-pill);padding:13px 26px;width:min(58vw,240px);
  box-shadow:0 10px 26px rgba(18,58,108,.22);
}
.name-input::placeholder{color:var(--ink);opacity:.5}
.name-input:focus{outline:3px solid var(--yellow);outline-offset:4px}
.name-input.wide{width:min(72vw,300px);text-align:left;padding-left:24px}
.name-save{font-size:19px;padding:12px 26px}

/* the boxy input, on cream forms */
.f-input{
  font-family:var(--px);font-size:19px;color:var(--ink);
  background:#fff;border:2px solid rgba(30,78,124,.25);border-radius:14px;
  padding:9px 14px;width:100%;
}
.f-input:focus{outline:3px solid var(--yellow);outline-offset:1px}
textarea.f-input{min-height:180px;line-height:1.6;resize:vertical}
select.f-input{cursor:pointer}
.f-row{display:flex;gap:12px;flex-wrap:wrap}
.f-row>div{flex:1;min-width:130px}
.f-hint{font-size:14px;opacity:.55;letter-spacing:.05em;margin-top:4px}
.f-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin-top:6px}
.checkline{display:flex;align-items:center;gap:10px;font-size:17px;letter-spacing:.05em;cursor:pointer;opacity:.85}
.checkline input{width:20px;height:20px;accent-color:var(--deep)}

/* a cream card to hold a form or a table on the sky */
.card{
  width:100%;background:var(--cream);color:var(--ink);
  border-radius:var(--r-card);padding:clamp(16px,3vw,28px);
  box-shadow:0 16px 40px rgba(6,24,52,.4);
  display:flex;flex-direction:column;gap:14px;text-align:left;
}
.card label{font-size:15px;letter-spacing:.1em;opacity:.6;display:block;margin-bottom:4px}

/* a toggle pill: .on is the lit state, used for votes and tabs */
.vpill{
  font-family:var(--px);font-size:19px;letter-spacing:var(--track);
  color:var(--ink);background:var(--cream);
  padding:10px 22px;border-radius:var(--r-pill);
  box-shadow:0 8px 20px rgba(18,58,108,.3);
  display:inline-flex;align-items:center;gap:8px;
  transition:transform .2s ease,background .2s ease,box-shadow .2s ease;
}
.vpill:hover{transform:translateY(-2px)}
.vpill.on{
  background:var(--yellow);
  box-shadow:0 0 18px rgba(245,238,122,.85),0 8px 20px rgba(18,58,108,.3);
}
.pillbar{display:flex;gap:14px;justify-content:center;min-height:44px}

/* tabs, on the sky rather than on cream */
.tabs{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.tab{
  font-family:var(--px);font-size:18px;letter-spacing:.12em;
  color:var(--cream);opacity:.6;padding:7px 18px;border-radius:var(--r-pill);
  transition:opacity .2s ease;
}
.tab:hover{opacity:.9}
.tab.on{background:var(--cream);color:var(--ink);opacity:1;box-shadow:0 8px 20px rgba(6,24,52,.35)}

/* a round control button - player transport, close buttons */
.ctl-orb{
  width:58px;height:58px;border-radius:50%;
  background:var(--cream);color:var(--ink);font-size:22px;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 20px rgba(18,58,108,.35);
}
.ctl-row{display:flex;align-items:center;gap:16px;flex-wrap:wrap;justify-content:center}

/* a scrub bar */
.prog{width:min(56vw,400px);height:16px;border-radius:var(--r-pill);background:rgba(255,246,216,.3);position:relative;cursor:pointer}
.prog .fill{position:absolute;left:0;top:0;bottom:0;width:0%;border-radius:var(--r-pill);background:var(--cream)}

/* a badge */
.badge{
  font-size:16px;letter-spacing:.2em;
  color:var(--ink);background:var(--yellow);
  border-radius:var(--r-pill);padding:5px 18px;
  box-shadow:0 0 18px rgba(245,238,122,.65);
}

/* a chip with a tiny orb in it */
.chip{
  display:inline-flex;align-items:center;gap:8px;
  background:rgba(255,246,216,.14);border-radius:var(--r-pill);padding:6px 14px 6px 6px;
  color:var(--cream);font-size:16px;letter-spacing:var(--track);
  transition:background .2s ease;
}
.chip:hover{background:rgba(255,246,216,.26)}
.chip .orb{width:26px;animation:none}
.chip .orb::after{display:none}

/* a grid or row of orb swatches */
.swatches{display:flex;gap:10px;flex-wrap:wrap}
.swatches button{width:38px;height:38px;border-radius:50%;padding:0;display:flex}
.swatches button .orb{width:100%;animation:none}
.swatches button .orb::after{display:none}
.swatches button.on{outline:3px solid var(--deep);outline-offset:3px}
.orb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:12px;width:100%}
.orb-grid button{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 6px;border-radius:18px}
.orb-grid button .orb{width:54px;animation:none}
.orb-grid button .orb::after{display:none}
.orb-grid button:hover,.orb-grid button.on{background:rgba(255,246,216,.16)}
.orb-grid .nm{font-size:14px;letter-spacing:.08em;opacity:.85}

/* a live-region message line. Give it aria-live="polite" in the markup. */
.msg{min-height:26px;font-size:19px}

/* ============================================================ 10  veils */

/* A veil is a full-screen panel, not a floating dialog box - it takes the whole
   window and puts one thing in it. Open by adding .open; meji-sky.js manages the
   focus stack, the body lock and the z-index so stacked veils behave. */
.veil{
  position:fixed;inset:0;z-index:100;
  display:none;flex-direction:column;align-items:center;justify-content:center;
  gap:24px;padding:6vw;
}
.veil.open{display:flex}
/* a veil taller than the window: scroll it, and keep it centred while it fits.
   The auto-margin spacers are what make "centred until it overflows" work. */
.veil.scroll{overflow-y:auto;justify-content:flex-start;padding:90px 5vw 60px}
.veil.scroll::before,.veil.scroll::after{content:"";flex:0 0 auto;margin:auto}
/* the veil IS the scroll container, so an absolutely-positioned close button
   scrolls off with the content. The veil is position:fixed, so switching to fixed
   keeps the same coordinates and pins it. */
.veil.scroll .close-orb{position:fixed}
.veil.deep{background:linear-gradient(180deg,#2E80BE 0%,#1E5E9C 100%)}
.veil.door{background:linear-gradient(180deg,#93C8E8 0%,#4FA6D6 60%,#3E8FC4 100%)}
.veil.dark{background:rgba(14,48,92,.94)}
body.locked{overflow:hidden}

.close-orb{
  position:absolute;top:24px;right:24px;
  width:58px;height:58px;border-radius:50%;
  background:var(--cream);color:var(--ink);
  display:flex;align-items:center;justify-content:center;font-size:24px;
  box-shadow:0 10px 24px rgba(6,24,52,.5);
}

/* the reading surface: a cream page with four different corner radii, so it reads
   as a torn sheet rather than a card */
.paper{
  width:min(92vw,680px);
  background:var(--cream);color:var(--ink);
  border-radius:56px 44px 60px 48px / 48px 56px 44px 60px;
  padding:clamp(30px,5vw,56px);
  box-shadow:var(--lift-3);
  text-align:left;flex-shrink:0;
}
.paper .mid-word{text-align:center}
.paper .tiny{text-align:center;display:block;opacity:.7;margin-top:12px}
.rbody{margin-top:28px;font-size:20px;line-height:1.85;letter-spacing:.04em}
.rbody p{margin:0 0 18px}
.rbody p:last-child{margin-bottom:0}

/* the image stage */
.theater{
  width:min(92vw,880px);border-radius:var(--r-screen);overflow:hidden;
  background:#123A6C;box-shadow:0 30px 80px rgba(6,24,52,.6);
}
.theater img{width:100%;max-height:72vh;object-fit:contain;display:block}
.cap{font-size:20px;letter-spacing:.1em}

/* an avatar orb or photo */
.avatar{
  width:min(24vmin,132px);height:min(24vmin,132px);border-radius:50%;
  object-fit:cover;box-shadow:0 14px 32px rgba(18,58,108,.35);
  animation:bob 8s ease-in-out infinite;
}

/* ============================================================ 11  small screens */

/* The absolute zone composition is a desktop idea. Under 640px the stage loses its
   fixed height and becomes a wrapped row; every item drops to one third of the
   viewport width and alternate items are nudged down so the row still undulates. */
@media(max-width:640px){
  .fzone{height:auto;display:flex;flex-wrap:wrap;justify-content:center;gap:11vw 10vw;padding:5vh 8vw 9vh}
  .item{position:static;transform:none;--s:33vw!important;width:var(--s)}
  .item:nth-child(odd){margin-top:8vw}
  .kin{gap:10vw}
  .play-orb{width:52px;height:52px;font-size:22px;right:-8px;bottom:-10px}
}

/* ============================================================ 12  reduced motion */

/* The whole identity of this kit is movement, so honour the preference completely
   rather than partially - every float, halo, transition and smooth scroll stops. */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
}
