/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* at.look.css - colour, typography, texture */

/*
 * ============================ THE LOOK CONTRACT ============================
 *
 * A look MAY paint: colour, font, background, border, shadow, filter, and its
 * own decorative surface layer. That is the whole job.
 *
 * A look MAY NOT:
 *   - set position / overflow / display / padding on a page REGION
 *       -> Layout, Lattice, and Layer own geometry and scrolling.
 *   - write `transform` on a text role
 *       -> shared with life; declare --tilt (and --skew) instead.
 *   - start an animation that nothing can stop
 *       -> life owns the clock; ambient texture runs on --look-motion.
 *
 * Three shared contracts make that enforceable:
 *
 *   .Surface      A Layout-owned canvas painted behind .Main. Looks style it
 *                 and its ::before/::after rather than hijacking .Main --
 *                 .Main becomes a scroll container in paced Lattices, and a
 *                 texture pinned inside it would scroll
 *                 away with the content.
 *
 *   --tilt        A rotation a look wants on a text role. Applied below via
 *                 the INDEPENDENT `rotate` property, so a life score setting
 *                 `transform` composes with it instead of clobbering it.
 *
 *   --look-motion running | paused. Life sets it. A look's ambient texture
 *                 (scanlines, rain, drift) is the material being alive, so it
 *                 belongs here -- but whether the clock ticks is life's call.
 *
 *   --face-aspect How wide this look's face runs, per character, per em.
 *                 Layout budgets width in rem; a look spends it in glyphs,
 *                 and only the look knows the exchange rate. See THE MEASURE
 *                 CONTRACT below.
 *
 *   --type-base-adjust / --type-growth-adjust
 *                 Optical correction for a face whose apparent body size and
 *                 display-size growth differ from the default type ramp.
 *                 Components applies these to requested text sizes; Layout's
 *                 reader-controlled root scale remains independent.
 *
 *   --haze        The colour of this look's air. Depth is a shared contract
 *                 (--z); what a thing looks like from far away is the look's
 *                 call, because atmosphere is a material. See THE ATMOSPHERE
 *                 CONTRACT below.
 *
 * ==========================================================================
 */

/* The shared transform contract. `rotate` and `skew` are separate on purpose:
   `rotate` is an independent transform property and always composes; skew has
   no such property, so a life score that sets `transform` replaces it. */
.title-text,
.header-text,
.body-text {
  rotate: var(--tilt, 0deg);
  transform: skewX(var(--skew, 0deg));
  -webkit-text-stroke: var(--text-edge-width, 0) var(--text-edge-color, transparent);
  paint-order: stroke fill;
}

/* Registered so they compute to real values rather than to the token stream
   that produced them. That makes them interpolable across a theme crossing,
   and it makes them legible to anything that reads the cascade back. */
@property --face-aspect {
  syntax: "<number>";
  inherits: true;
  initial-value: 0.55;
}

/* Deliberately pessimistic: a look that has not been measured yet is assumed
   to have a real bold cut, because an over-estimate is slightly small text and
   an under-estimate is a broken word. */
@property --face-bold {
  syntax: "<number>";
  inherits: true;
  initial-value: 1.12;
}

@property --type-base-adjust {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

@property --type-growth-adjust {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

@property --haze {
  syntax: "<color>";
  inherits: true;
  initial-value: #000;
}

@property --haze-density {
  syntax: "<number>";
  inherits: true;
  initial-value: 0.16;
}

@property --depth-blur {
  syntax: "<length>";
  inherits: true;
  initial-value: 1.1px;
}

/* --- THEME DEFINITIONS (CSS Variables) --- */
:root {
  --frame-border-color: var(--accent);
  --frame-border-width: 2px;
  --frame-border-radius: 6px;
  --frame-border-style: solid;
  --frame-fill: transparent;
  --frame-shadow: none;
  --frame-outline-color: transparent;
  --frame-outline-width: 0;
  --frame-outline-offset: 0;
  --frame-inset-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
  --frame-accent-color: var(--accent);
  --frame-accent-width: var(--frame-border-width);
  --frame-window-color: var(--frame-border-color);
  --frame-window-width: var(--frame-border-width);
  --frame-window-shadow: var(--frame-shadow);
  --atheme-drawer-width: min(15rem, calc(100vw - 3rem));

  /* The two cross-layer contracts this file is the AUTHORITY for. Both are
     declared per theme below; these are the floors for a look that says
     nothing. */
  --face-aspect: 0.55;
  --type-base-adjust: 1;
  --type-growth-adjust: 1;
  --haze: var(--bg, #000);
  --haze-density: 0.16;
  --depth-blur: 1.1px;

  scrollbar-color: var(--accent, #00ff41) color-mix(in srgb, var(--bg, #000) 85%, #000 15%);
  scrollbar-width: thin;
}

/* ==========================================================================
   THE MEASURE CONTRACT  --  --face-aspect
   ==========================================================================

   A grid track is 11rem wide. Is that enough for the word "compositions"?

   Layout cannot answer that. It budgets space in rem and has no idea which
   face is going to be spent in it. The look knows, and until it says so the
   two halves of the page are negotiating in different currencies -- which is
   exactly how "compositions" ends up hyphen-less across two lines.

   --face-aspect is the exchange rate: the advance width of one character, in
   em. Measured, not guessed, from the faces each theme actually loads:

       deepsea (Waterfall) .... 0.25   |   typewritter (Courier) ... 0.60
       parchment (Ballet) ..... 0.37   |   vaporwave (Monoton) ..... 0.71
       cyberpunk (VT323) ...... 0.40   |   arcade (Press Start 2P) . 1.00

   That is a FOUR-fold spread. One rem of track holds 4 characters of Waterfall
   or 1 of Press Start 2P, and no amount of clamp() on layout's side can know
   which. components.themes.css spends this rate in the fit() pattern; see THE
   MEASURE CONTRACT there for how a box solves for the size its content needs.

   The value is deliberately the WIDEST of a theme's three faces. Fitting is a
   min() -- an over-estimate only makes text a little smaller in a box that was
   already too tight, while an under-estimate is a broken word. */

[data-theme="deepsea"]     { --face-aspect: 0.25; }
[data-theme="parchment"]   { --face-aspect: 0.37; }
[data-theme="comic"]       { --face-aspect: 0.40; }
[data-theme="cyberpunk"]   { --face-aspect: 0.40; }
[data-theme="luxury"]      { --face-aspect: 0.45; }
[data-theme="temple"]      { --face-aspect: 0.50; }
[data-theme="tux"]         { --face-aspect: 0.51; }
[data-theme="nightclub"]   { --face-aspect: 0.51; }
[data-theme="urban"]       { --face-aspect: 0.52; }
[data-theme="school"]      { --face-aspect: 0.53; }
[data-theme="origami"]     { --face-aspect: 0.54; }
[data-theme="blueprint"]   { --face-aspect: 0.54; }
[data-theme="crt"]         { --face-aspect: 0.54; }
[data-theme="hologram"]    { --face-aspect: 0.54; }
[data-theme="starfield"]   { --face-aspect: 0.54; }
[data-theme="thermal"]     { --face-aspect: 0.54; }
[data-theme="vault"]       { --face-aspect: 0.48; }
[data-theme="midcentury"]  { --face-aspect: 0.54; }
[data-theme="citadel"]     { --face-aspect: 0.56; }
[data-theme="fortress"]    { --face-aspect: 0.58; }
[data-theme="museum"]      { --face-aspect: 0.56; }
[data-theme="newspaper"]   { --face-aspect: 0.56; }
[data-theme="western"]     { --face-aspect: 0.57; }
[data-theme="storm"]       { --face-aspect: 0.59; }
[data-theme="typewritter"] { --face-aspect: 0.60; }
[data-theme="lab"]         { --face-aspect: 0.68; }
[data-theme="vaporwave"]   { --face-aspect: 0.71; }
[data-theme="arcade"]      { --face-aspect: 1.00; }

/* The three platform looks are the one case where the face a reader gets
   depends on the machine they are on, so "the widest of a theme's faces" has
   to mean the widest ACROSS PLATFORMS, not the widest of the three roles:

     apple      SF Pro 0.555 on Apple hardware, Inter 0.606 everywhere else
     microsoft  Segoe UI ~0.53 on Windows, Open Sans 0.575 everywhere else
     android    Roboto 0.566, which is Roboto everywhere

   So Apple and Microsoft are budgeted for the fallback rather than the house
   face. That costs a Mac reader a little size in the tightest cells, which is
   the cheap half of the trade the contract above already made. */
[data-theme="microsoft"]   { --face-aspect: 0.58; }
[data-theme="apple"]       { --face-aspect: 0.61; }
[data-theme="android"]     { --face-aspect: 0.57; }

/* Bold is a different cut of the face, not the same one drawn thicker, and it
   is wider -- by up to 17% in the Georgia and Playfair themes. Measured the
   same way, over the same sample string, at weight 700 against weight 400.
   Without this every heading and every <strong> in the document is budgeted at
   the regular width and comes up about a character short. */
[data-theme="citadel"],
[data-theme="fortress"],
[data-theme="vault"],
[data-theme="newspaper"],
[data-theme="museum"]      { --face-bold: 1.18; }
[data-theme="midcentury"]  { --face-bold: 1.08; }
[data-theme="tux"],
[data-theme="nightclub"]   { --face-bold: 1.12; }
[data-theme="temple"]      { --face-bold: 1.05; }

/* The display faces ship one weight. Bold is synthesised or ignored, so it
   costs nothing and asking for headroom would only make the text smaller. */
[data-theme="luxury"],
[data-theme="parchment"],
[data-theme="typewritter"],
[data-theme="origami"],
[data-theme="comic"],
[data-theme="school"],
[data-theme="lab"],
[data-theme="blueprint"],
[data-theme="western"],
[data-theme="urban"],
[data-theme="crt"],
[data-theme="cyberpunk"],
[data-theme="hologram"],
[data-theme="arcade"],
[data-theme="starfield"],
[data-theme="deepsea"],
[data-theme="storm"],
[data-theme="vaporwave"],
[data-theme="thermal"]     { --face-bold: 1; }

/* Measured the same way, at 700 against 400, over each look's widest face.
   Roboto barely widens at all -- and Material sets its headings at 400
   anyway, so on this look the headroom is only ever spent on <strong>. */
[data-theme="microsoft"]   { --face-bold: 1.06; }
[data-theme="apple"]       { --face-bold: 1.07; }
[data-theme="android"]     { --face-bold: 1.02; }

/* ==========================================================================
   THE CASING CONTRACT  --  --caps, --caps-tracking
   ==========================================================================

   Small caps-and-tracked labels are a typographic convention, not a component
   property -- so a component may say "this is a label" and may not say what
   case a label is set in. That is this file's call, because only the look
   knows which face is about to be spent, and not every face has an uppercase
   worth setting:

     a CONNECTING SCRIPT (Mea Culpa, Ballet, Waterfall) draws its lowercase
     with entry and exit strokes that join. Its capitals are terminal forms,
     drawn to start a word and never to follow one, so a word in caps is a
     row of unjoined flourishes -- and letter-spacing on top of that pulls
     apart the few joins that were left. The face is not being emphasised,
     it is being switched off.

   So the two travel together. --caps is the transform; --caps-tracking scales
   the tracking each label asked for, because tracking exists to open up caps
   and has nothing left to open once the caps are gone. A face that declines
   one declines both.

   The default is right for the other 24 looks. */

:root {
  --caps: uppercase;
  --caps-tracking: 1;
}

[data-theme="luxury"],      /* Mea Culpa -- formal connecting script */
[data-theme="parchment"],   /* Ballet    -- connecting script */
[data-theme="deepsea"] {    /* Waterfall -- connecting script */
  --caps: none;
  --caps-tracking: 0;
}

/* ==========================================================================
   THE SHAPE CONTRACT  --  --radius-sm / -md / -lg / -pill,
                           --stroke-strength, --card-fill, --card-shadow
   ==========================================================================

   A component knows it is a CARD. It does not know how round a card is here,
   and until now it did not have to: every card in the document carried its own
   `border-radius: 0.35rem`, twenty-two times, in the sheet that is forbidden
   from making that decision.

   That is not a cosmetic gap. Corner radius is the loudest signal a design
   language sends, and the three platform looks are the clean experiment that
   proves it -- same page, same components, same grid:

       Fluent     2 / 4 / 8px      corners you could almost call square
       Cupertino  8 / 12 / 20px    one soft radius, used nearly everywhere
       Material   8 / 16 / 28px    the roundest, and uneven ON PURPOSE -- a
                                   chip, a card and a sheet are three shapes,
                                   and a button is a stadium

   With the radius nailed down in components, all three rendered as the same
   page in three accent colours.

   Four steps, because a component can always tell which of four things it is:

     --radius-sm    tokens, swatches, badges, inline figures
     --radius-md    cards, cells, code blocks -- the common case
     --radius-lg    panels, stages, anything that reads as a sheet
     --radius-pill  stadium controls. NOT a synonym for 999px: Fluent draws a
                    chip as a 4px rectangle, so a look that does not believe
                    in the stadium says so once, here, instead of every chip
                    in the document being wrong in that look.

   --stroke-strength is the same argument about the OTHER edge. Each component
   picked a currentColor percentage for its hairline -- 18% for a card, 45% for
   a chip -- and those RATIOS are considered and worth keeping. What is not a
   component's call is how present an edge is at all, which is exactly a
   platform's signature: Fluent draws the stroke and barely shadows; Cupertino
   hides the stroke and lets a wide soft shadow do the separating. So the look
   scales what the component asked for rather than replacing it.

   --card-fill and --card-shadow are the surface underneath. Both default to
   the flat, unfilled card the other 25 looks already draw, and together they
   are how a plane says how far off the page it is: Material tints (a filled
   tonal surface, almost no shadow), Cupertino floats (white, wide diffuse
   shadow), Fluent sits (white, 1px stroke, a 2px shadow that only lifts). */

@property --stroke-strength {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

:root {
  --radius-sm: 0.3rem;
  --radius-md: 0.35rem;
  --radius-lg: 0.45rem;
  --radius-pill: 999px;
  --stroke-strength: 1;
  --card-fill: transparent;
  --card-shadow: none;
}

/* ==========================================================================
   THE PLATFORM DENSITY CONTRACT  --  --look-density, --look-leading
   ==========================================================================

   [data-density] is the READER's control and stays that way. This is a second
   number that lands in the same formulas: how much air the design language
   itself thinks is normal, before the reader has an opinion.

   They MULTIPLY rather than compete, which is the entire point. A Fluent page
   at "roomy" is still tighter than a Material page at "roomy", and the
   reader's control still does exactly what it says on both.

   It earns a token because it is most of what is left between the three
   platform looks once the colour is taken away:

       Fluent     body 14px / 20px leading, tight rows        0.88x
       Cupertino  body 17px / 22px leading                    1.00x
       Material   body 16px / 24px leading, generous padding  1.06x

   Note what Fluent is NOT: the same design rendered smaller. It is smaller
   type AND proportionally tighter spacing -- the gaps shrink faster than the
   glyphs do. That is why this is separate from --type-base-adjust rather than
   folded into it; one is the size of the words, the other is the size of the
   room, and Microsoft moves them by different amounts.

   --look-leading is the line-rhythm half, added the way --leading-extra is
   added, because line-height is a ratio and ratios add:

       Cupertino  22/17 = 1.29   tight; SF is drawn to take it
       Fluent     20/14 = 1.43
       Material   24/16 = 1.50   the loosest of the three

   Ownership is unchanged and worth restating, because this is the one place
   in the file where a look's number is spent by somebody else's sheet: Layout
   spends --look-density in --layout-gap / --layout-pad and Components spends
   it in a component's own padding. The look declares a rate and never writes a
   padding -- the same deal --face-aspect already has with the fit formula. */

@property --look-density {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

@property --look-leading {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

:root {
  --look-density: 1;
  --look-leading: 0;
}

/* ==========================================================================
   THE TYPE VOICE CONTRACT  --  --title-font, --title-weight, --title-tracking
   ==========================================================================

   --title-font and --header-font were already declared by four looks and read
   by exactly one of them, so a heading in the other three was set in --font at
   the UA's bold -- which is why three platform looks carrying three different
   house faces still rendered every heading on the page identically.

   Bound here at zero specificity, so declaring the token is enough, and any
   look that would rather write the rule itself still wins.

   Weight and tracking travel with the face because at display sizes they are
   not separable from it, and because they are the two dimensions these three
   platforms genuinely disagree about:

     WEIGHT    Apple sets a large title BOLD. Material sets Display and
               Headline at REGULAR 400 and reserves 500 for Title -- a
               Material headline is big, not heavy, and setting it bold is
               the most common way to draw a fake Material page. Fluent sits
               between the two at Semibold 600.

     TRACKING  SF tightens as it grows -- optical sizes, so a 34pt title is
               set tighter than a 17pt line in the same family, and the look
               says so by giving the header a looser value than the title.
               Roboto sets Display near 0 and adds POSITIVE tracking to body.
               Segoe is humanist and wants none of it in either direction.

   --body-tracking is the same knob for prose. It is not --tracking-extra:
   that one is the reader's density control, and the two add. */

:root {
  --title-weight: 700;
  --title-tracking: 0em;
  --body-tracking: 0em;
}

/* The fallback chain is written at the USE site rather than as
   `--title-font: var(--font)` in :root, because a swatch button carries a
   whole look locally on its own [data-theme] and never matches :root -- a
   root-level default would hand it the PAGE's face while --font handed it its
   own. Resolved here, a local --font is enough to redress everything under it. */
/* All three tracking values ADD --tracking-extra rather than replacing it.
   Setting letter-spacing on a heading at all overrides the value .Layout put
   on the body, so without the sum a look declaring any tracking would quietly
   cancel the reader's density choice on every heading in the document. */
:where(h1, .title-text) {
  font-family: var(--title-font, var(--font));
  font-weight: var(--title-weight);
  letter-spacing: calc(var(--title-tracking) + var(--tracking-extra, 0em));
}

:where(h2, h3, h4, .header-text) {
  font-family: var(--header-font, var(--title-font, var(--font)));
  font-weight: var(--header-weight, var(--title-weight));
  letter-spacing: calc(var(--header-tracking, var(--title-tracking)) + var(--tracking-extra, 0em));
}

:where(p, li, dd, .body-text) {
  letter-spacing: calc(var(--body-tracking) + var(--tracking-extra, 0em));
}

/* ==========================================================================
   THE ATMOSPHERE CONTRACT  --  --haze
   ==========================================================================

   Depth is not a look. --z (which plane a thing is on) is declared by the
   markup, the camera is placed by layout, and the camera is moved by life.

   What is left over is the only part that is genuinely a material: the air
   between the camera and the plane. Painters call it atmospheric perspective
   -- distance does not just shrink a thing, it washes it toward the colour of
   whatever you are looking through. That colour is this file's to choose.

   The default is right far more often than it looks: things fade toward the
   sky, and here the sky is --bg. A theme only needs to override when its air
   is not the same colour as its ground -- silt, smog, dust, neon bloom. */

[data-theme="deepsea"]   { --haze: #0b3d5c; --haze-density: 0.30; --depth-blur: 2px; }
[data-theme="storm"]     { --haze: #8fa3b0; --haze-density: 0.26; --depth-blur: 1.8px; }
[data-theme="starfield"] { --haze: #1b2340; --haze-density: 0.22; }
[data-theme="cyberpunk"] { --haze: #05230d; --haze-density: 0.24; }
[data-theme="nightclub"] { --haze: #2a0038; --haze-density: 0.28; --depth-blur: 1.6px; }
[data-theme="hologram"]  { --haze: #0a3b4a; --haze-density: 0.26; }
[data-theme="vaporwave"] { --haze: #c86bd6; --haze-density: 0.22; }
[data-theme="thermal"]   { --haze: #2b0b3d; --haze-density: 0.24; }
[data-theme="parchment"] { --haze: #cbb491; --haze-density: 0.24; }
[data-theme="western"]   { --haze: #c49a6c; --haze-density: 0.26; --depth-blur: 1.5px; }
[data-theme="museum"]    { --haze: #d8d2c6; --haze-density: 0.18; }
[data-theme="citadel"]   { --haze: #e6cfab; --haze-density: 0.16; }
[data-theme="fortress"]  { --haze: #14171a; --haze-density: 0.22; --depth-blur: 1.4px; }
[data-theme="vault"]     { --haze: #0c0d10; --haze-density: 0.24; --depth-blur: 1.5px; }
[data-theme="midcentury"] { --haze: #ede4d3; --haze-density: 0.14; }
[data-theme="urban"]     { --haze: #9a9a9a; --haze-density: 0.22; }
[data-theme="arcade"]    { --haze: #120033; --haze-density: 0.26; --depth-blur: 0.8px; }
[data-theme="crt"]       { --haze: #0a2a12; --haze-density: 0.22; }
[data-theme="lab"]       { --haze: #0d2a2c; --haze-density: 0.20; }
[data-theme="microsoft"] { --haze: #dce8f5; --haze-density: 0.14; }
[data-theme="apple"]     { --haze: #e8eef8; --haze-density: 0.12; }
[data-theme="android"]   { --haze: #f3e9fb; --haze-density: 0.14; }

/* The haze plate itself. components.themes.css gives the plane a box to paint
   into; this decides what is in the air. A gradient rather than a flat wash,
   because real air is thicker toward the horizon.

   The opacity is the whole idea: --far planes accumulate more of it, linearly,
   and --far is just -(--z). One number, and distance starts looking like
   distance instead of like a smaller rectangle. */
.plane::after {
  background:
    linear-gradient(to bottom,
      color-mix(in srgb, var(--haze) 100%, transparent) 0%,
      color-mix(in srgb, var(--haze) 72%, transparent) 100%);
  opacity: min(0.92, calc(var(--far) * var(--haze-density)));
}

/* Distance also costs resolution. Air is not optically clean, and the eye
   reads a soft edge as "further" long before it reads a small one. */
.plane {
  filter: blur(calc(var(--far) * var(--depth-blur)));
  color: color-mix(in srgb,
           var(--text, currentColor) max(35%, calc(100% - var(--far) * 12%)),
           var(--haze));
}

html,
body,
[data-theme] {
  background-color: var(--bg, #000);
  scrollbar-color: var(--accent) color-mix(in srgb, var(--bg) 85%, #000 15%);
  scrollbar-width: thin;
  color-scheme: dark light;
}

/* --- THEMED SCROLLBARS --- */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
[data-theme] ::-webkit-scrollbar,
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
[data-theme] ::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--bg) 85%, #000 15%);
  border-radius: 4px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
[data-theme] ::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
  border: 2px solid color-mix(in srgb, var(--bg) 85%, #000 15%);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
[data-theme] ::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent) 80%, #fff 20%);
}

.Header {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

[data-theme="nightclub"] {
  --bg: #000;
  --text: #8a2be2;
  --accent: #bf00ff;
  --font: sans-serif;
  --selected-mark: "VIP";
  --frame-border-color: #bf00ff;
  --frame-border-width: 2px;
  --frame-border-radius: 0.25rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0 1rem rgba(191, 0, 255, 0.72), inset 0 0 0.65rem rgba(57, 255, 20, 0.25);
  --frame-outline-color: #39ff14;
  --frame-outline-width: 1px;
  --frame-outline-offset: 3px;
  --frame-inset-shadow: inset 0 0 1.2rem rgba(191, 0, 255, 0.45);
}

[data-theme="school"] {
  --title-font: 'Playwrite DK Uloopet Guides','Gochi Hand', 'Architects Daughter', cursive;
  --header-font: 'Fredericka the Great', cursive;
  --font:  'Caveat', 'Comic Sans MS', cursive;
  --bg: #2e4a3e;
  --text: rgba(255, 255, 255, 0.8);
  --accent: #fff;
  --selected-mark: "A+";
  --frame-border-color: rgba(255, 255, 255, 0.86);
  --frame-border-width: 3px;
  --frame-border-radius: 0.4rem;
  --frame-border-style: dashed;
  --frame-shadow: inset 0 0 0 1px rgba(46, 74, 62, 0.5);
  --frame-outline-color: rgba(255, 255, 255, 0.32);
  --frame-outline-width: 1px;
  --frame-outline-offset: -6px;
  --frame-inset-shadow: inset 0 -0.35rem 0 rgba(255, 255, 255, 0.2);
}

[data-theme="western"] {
  --bg: #6d4c41;
  --text: #36211d;
  --accent: #3e2723;
  --font: 'Rye', 'Georgia', serif;
  --selected-mark: "PIN";
  --frame-border-color: #3e2723;
  --frame-border-width: 4px;
  --frame-border-radius: 0.2rem;
  --frame-border-style: double;
  --frame-shadow: 0 0.35rem 0 rgba(54, 33, 29, 0.28), inset 0 0 0 1px rgba(255, 222, 173, 0.24);
  --frame-outline-color: #c49a6c;
  --frame-outline-width: 1px;
  --frame-outline-offset: -7px;
  --frame-inset-shadow: inset 0 0 1.1rem rgba(62, 39, 35, 0.28);
}

[data-theme="lab"] {
  --bg: #111;
  --text: rgba(255, 255, 255, 0.77);
  --accent: #00fff9;
  --font: monospace;
  --selected-mark: "LIVE";
  --frame-border-color: rgba(0, 255, 249, 0.78);
  --frame-border-width: 1px;
  --frame-border-radius: 0.7rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0 1rem rgba(0, 255, 249, 0.28), inset 0 0 1rem rgba(255, 255, 255, 0.08);
  --frame-outline-color: rgba(255, 255, 255, 0.28);
  --frame-outline-width: 1px;
  --frame-outline-offset: -5px;
  --frame-inset-shadow: inset 0 0 1.5rem rgba(0, 255, 249, 0.18);
}

[data-theme="urban"] {
  --bg: #7a7a7a;
  --text: #ff0055;
  --accent: #ff0055;
  --font: 'Sedgwick Ave', 'Permanent Marker', cursive;
  --selected-mark: "TAG";
  --frame-border-color: #ff0055;
  --frame-border-width: 3px;
  --frame-border-radius: 0.15rem;
  --frame-border-style: solid;
  --frame-shadow: 0.35rem 0.35rem 0 rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.24);
  --frame-outline-color: #111;
  --frame-outline-width: 2px;
  --frame-outline-offset: 2px;
  --frame-inset-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.36);
  text-shadow: rgba(0, 0, 0, 0.8) 2px 2px 4px;
  font-weight: 500;
  paint-order: stroke;
}

[data-theme="cyberpunk"] {
  --bg: #000;
  --text: #32cd32;
  --accent: #00ff41;
  --font: 'VT323','Courier New', monospace;
  --selected-mark: "RUN";
  --frame-border-color: #00ff41;
  --frame-border-width: 2px;
  --frame-border-radius: 0;
  --frame-border-style: solid;
  --frame-shadow: 0 0 0.75rem rgba(0, 255, 65, 0.56), inset 0 0 1.1rem rgba(0, 255, 65, 0.2);
  --frame-outline-color: #ff2bd6;
  --frame-outline-width: 1px;
  --frame-outline-offset: 4px;
  --frame-inset-shadow: inset 0 0 0 1px rgba(255, 43, 214, 0.72), inset 0 0 1.2rem rgba(0, 255, 65, 0.22);
}

[data-theme="luxury"] {
  --bg: #8b0000;
  --text: #fcf6ba;
  --accent: #d4af37;
  --font: 'Mea Culpa', serif;
  --selected-mark: "WIN";
  --frame-border-color: #d4af37;
  --frame-border-width: 5px;
  --frame-border-radius: 0.55rem;
  --frame-border-style: double;
  --frame-shadow: 0 0.5rem 1.4rem rgba(0, 0, 0, 0.32), inset 0 0 0.9rem rgba(252, 246, 186, 0.18);
  --frame-outline-color: rgba(252, 246, 186, 0.62);
  --frame-outline-width: 1px;
  --frame-outline-offset: -8px;
  --frame-inset-shadow: inset 0 0 0 1px rgba(252, 246, 186, 0.38), inset 0 0 1.4rem rgba(212, 175, 55, 0.22);
}

[data-theme="arcade"] {
  --bg: #2b0057;
  --text: #00ffff;
  --accent: #ff00ff;
  --font: 'Press Start 2P', cursive;
  /* Press Start 2P reads large in prose but its pixel glyphs hold at display
     sizes. 0.75 x 1.1 cubed is approximately 1, preserving the H1 end of the ramp. */
  --type-base-adjust: 0.2;
  --type-growth-adjust: 0.8;
  --selected-mark: "1P";
  --frame-border-color: #00ffff;
  --frame-border-width: 4px;
  --frame-border-radius: 0;
  --frame-border-style: solid;
  --frame-shadow: 0.35rem 0.35rem 0 #ff00ff, inset 0 0 0 2px #2b0057;
  --frame-outline-color: #ffff00;
  --frame-outline-width: 2px;
  --frame-outline-offset: 3px;
  --frame-inset-shadow: inset 0 0 0 4px #ff00ff;
}

[data-theme="deepsea"] {
  --bg: #001219;
  --text: #80ffea;
  --accent: #005f73;
  --font: 'Waterfall', serif;
  /* Waterfall reads small in prose but is already generous at display sizes.
     1.4 x 0.895 cubed is approximately 1, preserving the H1 end of the ramp. */
  --type-base-adjust: 1.4;
  --type-growth-adjust: 0.895;
  --selected-mark: "PING";
  --frame-border-color: #80ffea;
  --frame-border-width: 2px;
  --frame-border-radius: 1.1rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0 1.8rem rgba(128, 255, 234, 0.18), inset 0 0 1.4rem rgba(0, 95, 115, 0.48);
  --frame-outline-color: rgba(128, 255, 234, 0.24);
  --frame-outline-width: 1px;
  --frame-outline-offset: 5px;
  --frame-inset-shadow: inset 0 0 1.5rem rgba(128, 255, 234, 0.16);
}

[data-theme="parchment"] {
  --bg: #f5deb3;
  --text: #5b4636;
  --accent: #5b4636;
  --font: 'Ballet', 'Indie Flower', cursive;
  --selected-mark: "INK";
  --frame-border-color: #8a6f4d;
  --frame-border-width: 2px;
  --frame-border-radius: 0.25rem;
  --frame-border-style: solid;
  --frame-shadow: inset 0 0 0 1px rgba(91, 70, 54, 0.24), 0 0.25rem 0.75rem rgba(91, 70, 54, 0.18);
  --frame-outline-color: rgba(91, 70, 54, 0.4);
  --frame-outline-width: 1px;
  --frame-outline-offset: -5px;
  --frame-inset-shadow: inset 0 0 1.2rem rgba(91, 70, 54, 0.16);
}

[data-theme="typewritter"] {
  --bg: #f5f5dc;
  --text: #000;
  --accent: #000;
  --font: 'Courier New', monospace;
  --selected-mark: "X";
  --frame-border-color: #111;
  --frame-border-width: 1px;
  --frame-border-radius: 0.05rem;
  --frame-border-style: solid;
  --frame-shadow: 0.2rem 0.2rem 0 rgba(0, 0, 0, 0.16);
  --frame-outline-color: rgba(0, 0, 0, 0.24);
  --frame-outline-width: 1px;
  --frame-outline-offset: -4px;
  --frame-inset-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

[data-theme="crt"] {
  --bg: #030806;
  --text: #8dff9c;
  --accent: #35ff65;
  --font: 'Share Tech Mono', 'Courier New', monospace;
  --selected-mark: "REC";
  --frame-border-color: #35ff65;
  --frame-border-width: 2px;
  --frame-border-radius: 1rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0 1.4rem rgba(53, 255, 101, 0.34), inset 0 0 2rem rgba(53, 255, 101, 0.14);
  --frame-outline-color: rgba(141, 255, 156, 0.32);
  --frame-outline-width: 1px;
  --frame-outline-offset: -7px;
  --frame-inset-shadow: inset 0 0 1.8rem rgba(53, 255, 101, 0.18);
}

[data-theme="blueprint"] {
  --bg: #063a70;
  --text: #e8f6ff;
  --accent: #9fe4ff;
  --font: 'Share Tech Mono', 'Courier New', monospace;
  --selected-mark: "REF";
  --frame-border-color: #9fe4ff;
  --frame-border-width: 1px;
  --frame-border-radius: 0;
  --frame-border-style: dashed;
  --frame-shadow: inset 0 0 0 1px rgba(159, 228, 255, 0.2);
  --frame-outline-color: rgba(159, 228, 255, 0.5);
  --frame-outline-width: 1px;
  --frame-outline-offset: 6px;
  --frame-inset-shadow: inset 0 0 0 1px rgba(159, 228, 255, 0.5), inset 0 0 0 8px rgba(159, 228, 255, 0.08);
}

[data-theme="comic"] {
  --bg: #ffe44d;
  --text: #101014;
  --accent: #e21b3c;
  --font: 'Bangers', 'Impact', sans-serif;
  --selected-mark: "POW";
  --frame-border-color: #101014;
  --frame-border-width: 4px;
  --frame-border-radius: 0.25rem;
  --frame-border-style: solid;
  --frame-shadow: 0.35rem 0.35rem 0 #e21b3c, inset 0 0 0 3px #fff7c5;
  --frame-outline-color: #101014;
  --frame-outline-width: 2px;
  --frame-outline-offset: 4px;
  --frame-inset-shadow: inset 0 0 0 4px #e21b3c;
}

[data-theme="hologram"] {
  --bg: #07141d;
  --text: #9ffcff;
  --accent: #38f7ff;
  --font: 'Share Tech Mono', 'Courier New', monospace;
  --selected-mark: "LOCK";
  --frame-border-color: rgba(56, 247, 255, 0.72);
  --frame-border-width: 1px;
  --frame-border-radius: 0.65rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0 1.5rem rgba(56, 247, 255, 0.26), inset 0 0 1rem rgba(159, 252, 255, 0.14);
  --frame-outline-color: rgba(159, 252, 255, 0.28);
  --frame-outline-width: 1px;
  --frame-outline-offset: 5px;
  --frame-inset-shadow: inset 0 0 1.6rem rgba(56, 247, 255, 0.2);
}

[data-theme="vaporwave"] {
  --bg: #16002e;
  --text: #ff8cf4;
  --accent: #28f4ff;
  --font: 'Monoton', 'Arial Black', sans-serif;
  --text-edge-width: 0.04em;
  --text-edge-color: #100018;
  --selected-mark: "HOT";
  --frame-border-color: #ff8cf4;
  --frame-border-width: 3px;
  --frame-border-radius: 0.9rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0 0.8rem rgba(255, 140, 244, 0.48), 0.4rem 0.4rem 0 rgba(40, 244, 255, 0.55);
  --frame-outline-color: #28f4ff;
  --frame-outline-width: 1px;
  --frame-outline-offset: 5px;
  --frame-inset-shadow: inset 0 0 1rem rgba(40, 244, 255, 0.22);
  text-shadow: rgba(0, 0, 0, 0.8) 2px 2px 4px;
  font-weight: 500;
  paint-order: stroke;
}

[data-theme="newspaper"] {
  --bg: #ece7dc;
  --text: #17140f;
  --accent: #5b5548;
  --font: Georgia, 'Times New Roman', serif;
  /* Structural preferences are consumed by at.layout.css. Keeping the
     values here lets this look change its geometry without changing the
     layout engine's defaults for every other theme. */
  --newspaper-sidebar-tablet-width: minmax(15rem, 20rem);
  --newspaper-sidebar-width: clamp(16.25rem, 27.5vw, 52.5rem);
  --newspaper-sidebar-tv-width: 27.5rem;
  --newspaper-column-count: 3;
  --newspaper-column-gap: clamp(1rem, 2vw, 1.5rem);
  --newspaper-column-rule: rgba(23, 20, 15, 0.22);
  --selected-mark: "LEAD";
  --frame-border-color: #17140f;
  --frame-border-width: 1px;
  --frame-border-radius: 0;
  --frame-border-style: solid;
  --frame-shadow: inset 0 0 0 3px rgba(23, 20, 15, 0.1);
  --frame-outline-color: rgba(23, 20, 15, 0.48);
  --frame-outline-width: 1px;
  --frame-outline-offset: -5px;
  --frame-inset-shadow: inset 0 0 0 1px rgba(23, 20, 15, 0.28);
}

[data-theme="starfield"] {
  --bg: #020511;
  --text: #d8f7ff;
  --accent: #79dcff;
  --font: 'Share Tech Mono', 'Courier New', monospace;
  --selected-mark: "FIX";
  --frame-border-color: #d8f7ff;
  --frame-border-width: 1px;
  --frame-border-radius: 0.5rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0 1.4rem rgba(121, 220, 255, 0.32), inset 0 0 1.6rem rgba(216, 247, 255, 0.08);
  --frame-outline-color: rgba(121, 220, 255, 0.42);
  --frame-outline-width: 1px;
  --frame-outline-offset: 7px;
  --frame-inset-shadow: inset 0 0 1.5rem rgba(121, 220, 255, 0.16);
}

[data-theme="museum"] {
  --bg: #9c8661;
  --text: #2d2115;
  --accent: #c8a95b;
  --font: Georgia, 'Times New Roman', serif;
  --selected-mark: "ID";
  --frame-border-color: #c8a95b;
  --frame-border-width: 5px;
  --frame-border-radius: 0.18rem;
  --frame-border-style: ridge;
  --frame-shadow: 0 0.45rem 1rem rgba(45, 33, 21, 0.28), inset 0 0 0 1px rgba(255, 244, 211, 0.3);
  --frame-outline-color: rgba(45, 33, 21, 0.38);
  --frame-outline-width: 1px;
  --frame-outline-offset: -8px;
  --frame-inset-shadow: inset 0 0 1.1rem rgba(45, 33, 21, 0.18);
}

[data-theme="storm"] {
  --bg: #111722;
  --text: #dcecff;
  --accent: #ffd447;
  --font: 'Arial Black', Impact, sans-serif;
  --selected-mark: "HIT";
  --frame-border-color: #dcecff;
  --frame-border-width: 2px;
  --frame-border-radius: 0.35rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0 1.2rem rgba(255, 212, 71, 0.28), inset 0 -0.4rem 1rem rgba(255, 212, 71, 0.12);
  --frame-outline-color: #ffd447;
  --frame-outline-width: 1px;
  --frame-outline-offset: 4px;
  --frame-inset-shadow: inset 0 0 1.3rem rgba(220, 236, 255, 0.12);
}

[data-theme="thermal"] {
  --bg: #07030d;
  --text: #fff4a3;
  --accent: #ff4a1f;
  --font: 'Share Tech Mono', 'Courier New', monospace;
  --selected-mark: "HOT";
  --frame-border-color: #ff4a1f;
  --frame-border-width: 2px;
  --frame-border-radius: 0.35rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0 1.2rem rgba(255, 74, 31, 0.46), inset 0 0 1.1rem rgba(255, 244, 163, 0.18);
  --frame-outline-color: #fff4a3;
  --frame-outline-width: 1px;
  --frame-outline-offset: 4px;
  --frame-inset-shadow: inset 0 0 1.4rem rgba(255, 74, 31, 0.24);
}

[data-theme="origami"] {
  --bg: #f4f0e8;
  --text: #273142;
  --accent: #d64f4f;
  --font: 'Montserrat', 'Arial Black', sans-serif;
  --selected-mark: "FOLD";
  --frame-border-color: #d64f4f;
  --frame-border-width: 2px;
  --frame-border-radius: 0.1rem;
  --frame-border-style: solid;
  --frame-shadow: 0.25rem 0.25rem 0 rgba(39, 49, 66, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  --frame-outline-color: rgba(39, 49, 66, 0.22);
  --frame-outline-width: 1px;
  --frame-outline-offset: -6px;
  --frame-inset-shadow: inset 0 0 0 1px rgba(214, 79, 79, 0.24);
}

[data-theme="tux"] {
  --bg: #050505;
  --text: #f8f8f4;
  --accent: #ffffff;
  --font: Arial, Helvetica, sans-serif;
  --selected-mark: "TUX";
  --frame-border-color: #ffffff;
  --frame-border-width: 2px;
  --frame-border-radius: 0.35rem;
  --frame-border-style: solid;
  --frame-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 0.5rem 1.2rem rgba(0, 0, 0, 0.42);
  --frame-outline-color: rgba(248, 248, 244, 0.3);
  --frame-outline-width: 1px;
  --frame-outline-offset: -5px;
  --frame-inset-shadow: inset 0 0 0 1px rgba(248, 248, 244, 0.36);
}

[data-theme="fortress"] {
  --bg: #14171a; /* Dark Castle Slate */
  --text: #ede7dc; /* Chiselled Limestone */
  --accent: #d4af37; /* Forged Gold Leaf */
  --font: 'Merriweather', Georgia, serif;
  --selected-mark: "FORT";
  --frame-border-color: #383e46;
  --frame-border-width: 4px;
  --frame-border-radius: 0.18rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0.65rem 1.8rem rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(212, 175, 55, 0.35);
  --frame-outline-color: rgba(212, 175, 55, 0.4);
  --frame-outline-width: 1px;
  --frame-outline-offset: -6px;
  --frame-inset-shadow: inset 0 0 1.5rem rgba(0, 0, 0, 0.5);
}

[data-theme="citadel"] {
  --bg: #e6cfab; /* Sunlit Sandstone Bastion */
  --text: #1b1209; /* Dark Umber & Cast Iron */
  --accent: #9a5f27; /* Burnished Bronze */
  --font: 'Playfair Display', 'Georgia', serif;
  --selected-mark: "GATE";
  --frame-border-color: #9a5f27;
  --frame-border-width: 4px;
  --frame-border-radius: 0.22rem;
  --frame-border-style: double;
  --frame-shadow: 0 0.5rem 1.2rem rgba(27, 18, 9, 0.28), inset 0 0 0 1px rgba(255, 245, 225, 0.45);
  --frame-outline-color: rgba(27, 18, 9, 0.35);
  --frame-outline-width: 1px;
  --frame-outline-offset: -7px;
  --frame-inset-shadow: inset 0 0 1.2rem rgba(27, 18, 9, 0.16);
}

[data-theme="vault"] {
  --bg: #0c0d10; /* Obsidian Crypt Vault */
  --text: #dfd8c8; /* Aged Bone Parchment */
  --accent: #b89758; /* Illuminated Antique Gold */
  --font: 'Bonheur Royale', 'Playfair Display', Georgia, cursive, serif;
  --selected-mark: "SEAL";
  --frame-border-color: #4a3e2c;
  --frame-border-width: 3px;
  --frame-border-radius: 0.35rem;
  --frame-border-style: ridge;
  --frame-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(184, 151, 88, 0.28);
  --frame-outline-color: rgba(184, 151, 88, 0.35);
  --frame-outline-width: 1px;
  --frame-outline-offset: -5px;
  --frame-inset-shadow: inset 0 0 2rem rgba(0, 0, 0, 0.6);
}

[data-theme="midcentury"] {
  --bg: #ede4d3; /* Warm Travertine & Atomic Cream */
  --text: #2a1f18; /* Eames Walnut */
  --accent: #d35400; /* Atomic Burnt Orange */
  --font: 'Noto Sans', system-ui, -apple-system, sans-serif;
  --selected-mark: "MOD";
  --frame-border-color: #d35400;
  --frame-border-width: 3px;
  --frame-border-radius: 0.75rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0.45rem 1.1rem rgba(42, 31, 24, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  --frame-outline-color: #2a7273; /* Modernist Teal */
  --frame-outline-width: 1px;
  --frame-outline-offset: 4px;
  --frame-inset-shadow: inset 0 0 1.2rem rgba(42, 31, 24, 0.08);
}

[data-theme="temple"] {
  --bg: #07110e; /* Aged Parchment */
  --text: #a8a8a8; /* Weathered Stone */
  --accent: #7a5c3e; /* Ancient Wood */
  --font: 'Cinzel', 'Times New Roman', serif;
  --selected-mark: "SEAL";
  --frame-border-color: #7a5c3e;
  --frame-border-width: 3px;
  --frame-border-radius: 0.15rem;
  --frame-border-style: solid;
  --frame-shadow: 0 0.25rem 0.75rem rgba(58, 92, 62, 0.28), inset 0 0 0 1px rgba(255, 246, 221, 0.24);
  --frame-outline-color: rgba(58, 92, 62, 0.38);
  --frame-outline-width: 1px;
  --frame-outline-offset: -5px;
  --frame-inset-shadow: inset 0 0 1.2rem rgba(122, 92, 62, 0.18);
}

/* ==========================================================================
   THE THREE PLATFORM LOOKS
   ==========================================================================

   Fluent, Cupertino and Material, drawn from their published design systems
   rather than from a memory of what a Windows or an iPhone screen looks like.
   They sit together here because they are the only three looks in the file
   that have to be told apart from EACH OTHER -- twenty-five looks apart, a
   parchment is not going to be mistaken for an arcade cabinet, but three
   flat light-grey product UIs with a blue-ish accent very much can be.

   So they are separated along the dimensions their own documentation
   separates them along, and the differences are stated as a table because
   that is what they are:

                    Fluent 2         Cupertino/HIG      Material 3
     face           Segoe UI         SF Pro             Roboto
     body           14px             17px               16px
     leading        1.43             1.29               1.50
     radius md      4px              12px               16px
     the stadium    refused          yes                yes, for buttons
     heading wt     600 semibold     700 bold           400 regular
     tracking       none             negative, optical  0, positive on body
     edge           1px stroke       soft wide shadow   tonal fill
     colour         neutral + blue   near-monochrome    tonal, purple

   Read down any column and you have that platform; read across any row and
   you have a reason the other two are not it. Every one of those rows is a
   token above, which is the point -- none of this is written as a rule here. */

/* --- MICROSOFT / FLUENT 2 --------------------------------------------------
   The dense one. Fluent's ramp starts at 14px where the other two start at
   16-17, its rows are tighter than the smaller type alone accounts for, and
   its corners are 4px. It is the only one of the three that carries its edges
   on a stroke instead of a shadow, and the only one that refuses the stadium:
   a Fluent chip is a small rectangle, which is why --radius-pill is 4px here
   rather than 999px. */
[data-theme="microsoft"] {
  --bg: #f5f5f5;                      /* neutralBackground3 */
  --text: #242424;                    /* neutralForeground1 */
  --accent: #0f6cbd;                  /* brandForeground1 */
  --font: "Segoe UI Variable Text", "Segoe UI", Selawik, "Open Sans", system-ui, sans-serif;
  --title-font: "Segoe UI Variable Display", "Segoe UI Semibold", "Segoe UI", Selawik, "Open Sans", system-ui, sans-serif;
  --header-font: var(--title-font);
  --selected-mark: "WIN";

  /* Small type, and a room that shrinks faster than the type does. The whole
     ramp comes down together -- growth stays at 1 so nothing quietly grows
     back at display sizes what the base took away. */
  --type-base-adjust: 0.94;
  --look-density: 0.88;
  --look-leading: -0.02;

  /* Segoe is a humanist face and wants no tracking in either direction; the
     ramp is small enough that even the title barely optically closes up. */
  --title-weight: 600;
  --title-tracking: -0.006em;
  --header-tracking: 0em;
  --body-tracking: 0em;

  /* borderRadiusSmall / Medium / XLarge, and the refused stadium. */
  --radius-sm: 0.125rem;
  --radius-md: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-pill: 0.25rem;

  /* The Fluent trade: the stroke carries the edge, the shadow only lifts. */
  --stroke-strength: 1.35;
  --card-fill: #ffffff;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.14), 0 0 2px rgba(0, 0, 0, 0.12);

  --frame-border-color: #d1d1d1;      /* neutralStroke1 */
  --frame-border-width: 1px;
  --frame-border-radius: var(--radius-md);
  --frame-border-style: solid;
  --frame-fill: #ffffff;
  --frame-shadow: 0 2px 4px rgba(0, 0, 0, 0.14), 0 0 2px rgba(0, 0, 0, 0.12);
  --frame-outline-color: transparent;
  --frame-inset-shadow: inset 0 0 0 1px rgba(15, 108, 189, 0.14);
}

/* --- APPLE / CUPERTINO -----------------------------------------------------
   The quiet one. Near-monochrome -- the accent is spent on controls and
   almost nothing else, so the type does the work. SF is set tight and gets
   TIGHTER as it grows, which is the optical-size behaviour of the family
   itself and the detail that most reads as Apple when it is present and as
   generic-system-font when it is not. Edges are almost strokeless; a wide,
   soft, low-contrast shadow does the separating instead. */
[data-theme="apple"] {
  --bg: #f5f5f7;
  --text: #1d1d1f;
  --accent: #0071e3;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Helvetica Neue", system-ui, sans-serif;
  --title-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Helvetica Neue", system-ui, sans-serif;
  --header-font: var(--title-font);
  --selected-mark: "MAC";

  /* 17px body, and 22px of leading on it -- the tightest of the three. */
  --type-base-adjust: 1.03;
  --look-density: 1;
  --look-leading: -0.08;

  /* Optical tracking: the title is set tighter than the header, which is set
     tighter than the body. One family, three cuts' worth of behaviour.
     Only the Large Title is bold -- a section header is Semibold. */
  --title-weight: 700;
  --header-weight: 600;
  --title-tracking: -0.022em;
  --header-tracking: -0.014em;
  --body-tracking: -0.003em;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;

  /* The mirror of Fluent: barely a stroke, and a wide soft shadow doing all
     of the separating. */
  --stroke-strength: 0.5;
  --card-fill: #ffffff;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(26, 33, 52, 0.07);

  --frame-border-color: rgba(0, 0, 0, 0.07);
  --frame-border-width: 1px;
  --frame-border-radius: var(--radius-lg);
  --frame-border-style: solid;
  --frame-fill: rgba(255, 255, 255, 0.72);
  --frame-shadow: 0 0.7rem 2rem rgba(26, 33, 52, 0.12);
  --frame-outline-color: rgba(255, 255, 255, 0.72);
  --frame-outline-width: 1px;
  --frame-outline-offset: -2px;
  --frame-inset-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* --- ANDROID / MATERIAL 3 --------------------------------------------------
   The round, tonal one. Two things make a page read as Material and both are
   easy to get backwards: headings are set at REGULAR 400, not bold -- M3
   Display and Headline are 400 and only Title is 500 -- and surfaces are
   TINTED rather than white, a tonal container on a tonal background with
   almost no shadow between them. Roboto also takes positive tracking in body
   text, which is the opposite of what SF wants. */
[data-theme="android"] {
  --bg: #fef7ff;                      /* surface */
  --text: #1d1b20;                    /* on-surface */
  --accent: #6750a4;                  /* primary */
  --font: Roboto, "Roboto Flex", "Noto Sans", system-ui, sans-serif;
  --title-font: var(--font);
  --header-font: var(--font);
  --selected-mark: "BOT";

  /* 16px body on 24px -- the loosest leading of the three, and the most
     generous padding. */
  --look-density: 1.06;
  --look-leading: 0.05;

  /* Big, not heavy. And tracking runs the other way to Apple's: flat on
     display sizes, positive in prose. */
  --title-weight: 400;
  --header-weight: 500;
  --title-tracking: 0em;
  --body-tracking: 0.01em;

  /* M3 shape scale: small 8 / large 16 / extra-large 28, and a button is a
     stadium. The unevenness is the signature -- a chip, a card and a sheet
     are deliberately three different shapes here. */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.75rem;
  --radius-pill: 999px;

  /* A filled tonal card on a tonal ground, and only enough shadow to say
     which of the two is nearer. */
  --stroke-strength: 0.65;
  --card-fill: #f7f2fa;               /* surface-container-low */
  --card-shadow: 0 1px 3px 1px rgba(29, 27, 32, 0.1), 0 1px 2px rgba(29, 27, 32, 0.08);

  --frame-border-color: #cac4d0;      /* outline-variant */
  --frame-border-width: 1px;
  --frame-border-radius: var(--radius-lg);
  --frame-border-style: solid;
  --frame-fill: #f7f2fa;
  --frame-shadow: 0 0.2rem 0.5rem rgba(29, 27, 32, 0.15);
  --frame-outline-color: rgba(103, 80, 164, 0.2);
  --frame-outline-width: 1px;
  --frame-outline-offset: 2px;
  --frame-inset-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* --- GLOBAL STYLES --- */
.frame-default,
.frame-accent,
.frame-inset,
.frame-window {
  border: var(--frame-border-width) var(--frame-border-style) var(--frame-border-color);
  border-radius: var(--frame-border-radius);
  background: var(--frame-fill);
  box-shadow: var(--frame-shadow);
  outline: var(--frame-outline-width) solid var(--frame-outline-color);
  outline-offset: var(--frame-outline-offset);
}

.frame-accent {
  border-color: var(--frame-accent-color);
  border-width: var(--frame-accent-width);
}

.frame-inset {
  box-shadow: var(--frame-inset-shadow), var(--frame-shadow);
}

.frame-window {
  border-color: var(--frame-window-color);
  border-width: var(--frame-window-width);
  box-shadow: var(--frame-window-shadow);
}

body.frame-window {
  border-radius: 0;
}

body.Layout {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  transition: background 0.5s ease, color 0.5s ease;
}

[data-layout="hero"] .hero-demo {
  background: color-mix(in srgb, currentColor 6%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 0.75rem;
  box-shadow: inset 0 0 2.5rem color-mix(in srgb, currentColor 4%, transparent);
}

/* Lattice supplies flow geometry; Look makes each pacing metaphor legible.
   These read the FRAME, not the page -- same pair of selectors at.lattice.css
   uses -- so a paged panel gets the page's edges and a panel wall inside a
   drawer gets the panel's, without this file learning where either one is. */
:is(.Layout[data-lattice="pages"] [data-frame="root"],
    [data-frame][data-lattice="pages"]) > [data-track] > [data-view] {
  border-inline: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  box-shadow:
    inset 0.75rem 0 1.5rem -1.25rem color-mix(in srgb, currentColor 40%, transparent),
    inset -0.75rem 0 1.5rem -1.25rem color-mix(in srgb, currentColor 40%, transparent);
}

:is(.Layout[data-lattice="slides"] [data-frame="root"],
    [data-frame][data-lattice="slides"]) > [data-track] > [data-view] {
  border-inline-end: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

:is(.Layout[data-lattice="ribbon"] [data-frame="root"],
    [data-frame][data-lattice="ribbon"]) > [data-track] > [data-view] {
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 0.5rem;
}

:is(.Layout[data-lattice="control"] [data-frame="root"],
    [data-frame][data-lattice="control"]) > [data-track] > [data-view] {
  border: 1px solid color-mix(in srgb, currentColor 34%, transparent);
  border-radius: 0.5rem;
  background: color-mix(in srgb, currentColor 7%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 8%, transparent);
}

/* An App panel is a frame with a floor: opaque, edged, and visibly a thing
   that holds its own scroll rather than a tile that shows what fits. The
   stage is the same material with more of the accent in it. */
:is(.Layout[data-lattice="app"] [data-frame="root"],
    [data-frame][data-lattice="app"]) > [data-track] > [data-view] {
  background: color-mix(in srgb, var(--bg) 93%, var(--accent) 7%);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--text) 12%);
  border-radius: clamp(0.4rem, 1vw, 0.8rem);
  box-shadow:
    0 0.6rem 1.6rem color-mix(in srgb, var(--bg) 48%, transparent),
    0 0 0 1px color-mix(in srgb, var(--text) 5%, transparent) inset;
}

:is(.Layout[data-lattice="app"] [data-frame="root"],
    [data-frame][data-lattice="app"]) > [data-track] > [data-view="stage"] {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--text) 14%);
  box-shadow:
    0 1rem 2.4rem color-mix(in srgb, var(--bg) 58%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent) inset;
}

/* Card Stack is Lattice's stacking decision; Look supplies the opaque
   material that lets a higher view visibly cover the card below it. */
:is(.Layout[data-lattice="card-stack"] [data-frame="root"],
    [data-frame][data-lattice="card-stack"]) > [data-track] > [data-view] {
  background: color-mix(in srgb, var(--bg) 94%, var(--accent) 6%);
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--text) 12%);
  border-radius: clamp(0.6rem, 1.5vw, 1.25rem);
  box-shadow:
    0 1.1rem 2.4rem color-mix(in srgb, var(--bg) 55%, transparent),
    0 0 0 1px color-mix(in srgb, var(--text) 5%, transparent) inset;
}

:is(.Layout[data-lattice="card-stack"] [data-frame="root"],
    [data-frame][data-lattice="card-stack"]) > [data-track] > [data-view][data-lattice-active] {
  border-color: color-mix(in srgb, var(--accent) 82%, var(--text) 18%);
  box-shadow:
    0 1.4rem 3.2rem color-mix(in srgb, var(--bg) 62%, transparent),
    0 0 1.6rem color-mix(in srgb, var(--accent) 14%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent) inset;
}

@media print {
  [data-frame] > [data-track] > [data-view] {
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

/* Spotlight borrows the card's material but not its geometry. */
:is(.Layout[data-lattice="spotlight"] [data-frame="root"],
    [data-frame][data-lattice="spotlight"]) > [data-track] > [data-view] {
  background: color-mix(in srgb, var(--bg) 92%, var(--accent) 8%);
  border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--text) 10%);
  border-radius: clamp(0.6rem, 1.5vw, 1.25rem);
  box-shadow: 0 1.5rem 4rem color-mix(in srgb, var(--bg) 52%, transparent);
}

/* Layer chooses projection geometry; Look supplies its material. */
[data-layer-panel][popover] {
  color: var(--text);
  font-family: var(--font);
  background: color-mix(in srgb, var(--bg) 94%, var(--accent) 6%);
  border: 1px solid color-mix(in srgb, var(--accent) 52%, var(--text) 12%);
  box-shadow:
    0 1.5rem 4rem color-mix(in srgb, var(--bg) 62%, transparent),
    0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent) inset;
}

/* THE RECEDE
   A projection stands --layer-z planes in front of the page, so the page is
   --page-far planes behind it, and a thing that far away is a thing seen
   through that much of this look's air. That is the SAME contract the depth
   section demonstrates, spent on the whole document instead of on five cards:
   Deepsea's blue, Storm's grey and Parchment's tan each wash their own page.

   This rule names no projection. The previous one named two by hand, which
   meant the pop-over never got a scrim and a fourth projection would not have
   got one either -- the same brittle list of proper nouns that at.life.css
   avoids by spending --layer-travel instead of naming a drawer.

   Lens caps the whole thing: a stealth interface barely dims, a cinematic one
   drops the page a full plane. */
[data-layer-panel][popover]::backdrop {
  background: color-mix(
    in srgb,
    var(--haze) calc(var(--page-far, 0) * var(--haze-density, 0.16) * var(--lens-recede, 1) * 100%),
    transparent
  );
}

/* The furniture itself goes soft, because distance does not only wash a thing
   toward the colour of the air -- it takes its edges. Scoped to an actually
   open projection: a filter that is always present is a containing block that
   is always present, which is the trap .flow-rail lives outside .Main to
   avoid. blur(0) still creates one, so "always, at zero" is not a way out.

   The page recedes; the thing that came forward does not. One of these four
   regions can itself be the open projection -- a footer lifted into a drawer
   -- and it is excluded at zero weight, so nothing else here changes rank. */
.Layout[data-layer-ready]:has([data-layer-panel]:popover-open)
:is(.Header, .Main, .Footer, .Surface):where(:not(:popover-open)) {
  filter: blur(calc(
    var(--page-far, 0) * var(--depth-blur, 1.1px) * var(--lens-recede, 1)
  ));
}

.LayerControls button,
.LayerClose {
  color: var(--bg);
  font-family: var(--font);
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 68%, var(--text) 32%);
  border-radius: var(--layer-control-radius, 999px);
  box-shadow: 0 0.5rem 1.4rem color-mix(in srgb, var(--bg) 45%, transparent);
}

/* Layer decides which viewport edge a projection hangs from; that edge is a
   fact about the projection, so Look is free to read it and paint what an
   attached control is made of. A tab keeps the round corners on the free
   sides and squares off the side it is joined to, so it reads as part of the
   window edge rather than as a pill floating near it. */
[data-layer="top-menu"] .LayerControls:where(:not([data-edge])) button {
  border-start-start-radius: 0;
  border-start-end-radius: 0;
  border-block-start: 0;
}

[data-layer="top-left-edge-drawer"] .LayerControls:where(:not([data-edge])) button {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  border-inline-start: 0;
}

/* A control that names its own edge is joined to that one instead. */
.LayerControls[data-edge="block-end"] button {
  border-end-start-radius: 0;
  border-end-end-radius: 0;
  border-block-end: 0;
}

/* Layout centres a colophon's boxes. The lines inside them are type, and how
   type is set is this sheet's. */
.Footer[data-place="footer"] {
  text-align: center;
}

button.theme-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font);
  font-size: 1.2em;
  padding: 8px 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  /* THE SHAPE CONTRACT. A theme button in the drawer is a control in the
     ACTIVE look; a swatch in the document carries its own [data-theme] and so
     resolves --radius-sm locally, which is the point of it -- a sample that
     shows you the corner it is offering before you pick it. */
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}

button.theme-btn:hover,
button.theme-btn.is-selected {
  background: var(--accent);
  color: var(--bg);
}

button.theme-btn.is-selected {
  padding-right: 0.55rem;
  box-shadow:
    inset 0 -0.25rem 0 color-mix(in srgb, var(--bg) 34%, transparent),
    0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent),
    0 0 1rem color-mix(in srgb, var(--accent) 42%, transparent);
  transform: translateY(-1px);
}

button.theme-btn.is-selected::after {
  content: var(--selected-mark, "ON");
  min-width: 1.8rem;
  padding: 0.16rem 0.3rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  color: var(--accent);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}

button.theme-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-box {
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.atheme-drawer {
  --atheme-drawer-width: min(15rem, calc(100vw - 3rem));
  position: fixed;
  top: 0.75rem;
  right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto var(--atheme-drawer-width);
  align-items: start;
  transform: translateX(var(--atheme-drawer-width));
  transition: transform 0.28s ease;
}

/* Per-theme overrides for wide fonts (e.g. Press Start 2P, Monoton, Fredericka, etc.) */
[data-theme="arcade"],
[data-theme="origami"],
[data-theme="school"],
[data-theme="comic"],
[data-theme="crt"],
[data-theme="typewritter"],
[data-theme="western"] {
  --atheme-drawer-width: min(16.5rem, calc(100vw - 3rem));
}

.atheme-drawer.is-open {
  transform: translateX(-0.7em);
  width: var(--atheme-drawer-width);
}

.atheme-drawer-tab {
  width: 10px;
  min-width: 0.8rem;
  min-height: 2.65rem;
  border-radius: 4px 0 0 4px;
  border-right: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: var(--accent);
  opacity: 1;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.atheme-drawer-panel {
  max-height: calc(100svh - 1.5rem);
  overflow-y: auto;
  padding: 0.85rem;
  border: 1px solid var(--accent);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background:
    linear-gradient(
      color-mix(in srgb, var(--bg) 94%, transparent),
      color-mix(in srgb, var(--bg) 94%, transparent)
    );
  box-shadow: -0.4rem 0 1.6rem rgba(0, 0, 0, 0.28);
}

.atheme-drawer .atheme-drawer-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.atheme-drawer-panel .theme-btn {
  width: 100%;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .atheme-drawer {
    --atheme-drawer-width: min(14.5rem, calc(100vw - 2.5rem));
    top: 0.5rem;
  }
}

.brick-wall,
[data-theme="nightclub"] .Surface {
  background-color: #222;
  /* Mortar color */
  background-image:
    linear-gradient(335deg, #1a1a1a 23px, transparent 23px),
    linear-gradient(155deg, #1a1a1a 23px, transparent 23px),
    linear-gradient(335deg, #1a1a1a 23px, transparent 23px),
    linear-gradient(155deg, #1a1a1a 23px, transparent 23px);
  background-size: 58px 58px;
  background-position: 0px 2px, 4px 35px, 29px 31px, 34px 6px;
}

.glowing-purple,
[data-theme="nightclub"] .title-text {
  /* Bold Purple Text */
  font-family: sans-serif;
  --fit-max: 3em;
  font-weight: 900;
  color: #8a2be2;
  /* Deep purple text color */
  text-transform: uppercase;

  /* Highlight Outline (Sharp edge) */
  -webkit-text-stroke: 1px #fff;

  /* Glowing Effect (Soft outer layers) */
  text-shadow:
    0 0 5px #fff,
    /* Inner white highlight */
    0 0 10px #bf00ff,
    /* Bright purple core glow */
    0 0 20px #bf00ff,
    /* Medium purple halo */
    0 0 40px #8a2be2;
  /* Large soft purple ambient glow */
}

.neon-green-flicker,
[data-theme="nightclub"] .header-text {
  color: #fff;
  font-weight: bold;
  --fit-max: 2em;
  /* Initial glow state */
  text-shadow:
    0 0 7px #fff,
    0 0 42px #39FF14,
    0 0 82px #39FF14;

  /* Apply the animation */
  animation: flicker 1.5s infinite alternate;
  animation-play-state: var(--look-motion, running);
}

@keyframes flicker {

  0%,
  18%,
  22%,
  25%,
  53%,
  57%,
  100% {
    /* Fully "on" state */
    text-shadow:
      0 0 7px #fff,
      0 0 10px #fff,
      0 0 42px #39FF14,
      0 0 82px #39FF14,
      0 0 92px #39FF14;
    opacity: 1;
  }

  20%,
  24%,
  55% {
    /* Dim/flicker state */
    text-shadow: none;
    opacity: 0.4;
  }
}

.neon-green,
[data-theme="nightclub"] .body-text {
  color: #fff;
  /* White core for the "bulb" effect */
  font-family: 'Arial Rounded MT Bold', monospace;
  /* Monospaced fonts look more like signs */
  --fit-max: 2em;
  font-weight: 100;

  /* Layering the glow */
  text-shadow:
    1px 1px 0 rgba(0, 20, 8, 0.85),
    2px 2px 2px rgba(0, 0, 0, 0.75),
    0 0 7px #fff,
    /* Tight white glow */
    0 0 10px #fff,
    /* Medium white glow */
    0 0 21px #fff,
    /* Broad white glow */
    0 0 42px #39FF14,
    /* Bright neon green core */
    0 0 82px #39FF14,
    /* Mid-range green halo */
    0 0 92px #39FF14,
    /* Wide green ambient glow */
    0 0 102px #39FF14,
    /* Large soft green glow */
    0 0 151px #39FF14;
  /* Final massive soft glow */
}

.scene {
  /* subtle radial gradient for depth */
  background:
    radial-gradient(circle at bottom, rgba(57, 255, 20, 0.2) 0%, transparent 70%),
    #000;
}

/* Science */
.mesh-background,
[data-theme="lab"] .Surface {
  background-color: #111;
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent);
  background-size: 50px 50px;
}

.glass-text,
[data-theme="lab"] .title-text {
  /* 1. Rounded Font is crucial for the tube effect */
  font-family: 'Varela Round', 'Arial Rounded MT Bold', sans-serif;
  --fit-max: 3em;
  font-weight: 900;

  /* 2. Make the core almost completely transparent (hollow inside) */
  color: rgba(255, 255, 255, 0.05);

  /* 3. Thicker, semi-transparent white stroke to form the "walls" of the tube */
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.5);
  /* 4. Layered Shadows for 3D Lighting */
  text-shadow:
    /* The Specular Highlight (sharp, bright light hitting the top-left curve) */
    -2px -2px 1px rgba(255, 255, 255, 0.8),

    /* A subtle inner ambient glow */
    0px 0px 8px rgba(255, 255, 255, 0.4),

    /* A dark drop shadow to lift the tube off the background */
    4px 4px 5px rgba(0, 0, 0, 0.6),

    /* A faint colored refraction glow (optional, gives it that lab/neon vibe) */
    0px 0px 20px rgba(0, 255, 249, 0.3);
  /* Uses your Lab theme accent color */
}



[data-theme="lab"] .header-text {
  position: relative;
  display: inline-block;
  font-family: 'Courier New', monospace;
  /* Or 'Orbitron', 'Share Tech Mono' */
  --fit-max: 1.8em;
  font-weight: bold;
  color: #00fff9;
  /* Bright Cyan */

  /* Remove the glass stroke */
  -webkit-text-stroke: 0;

  /* Pure glowing energy */
  text-shadow:
    0 0 5px #00fff9,
    0 0 15px rgba(0, 255, 249, 0.8),
    0 0 30px rgba(0, 255, 249, 0.4);

  letter-spacing: 4px;
  text-transform: uppercase;
}

[data-theme="lab"] .header-text::before {
  content: attr(data-text);
  /* Needs <div class="display-body" data-text="Your text"> */
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  color: #00fff9;
  /* Bright scanned text */

  /* The Laser Line */
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(0, 255, 249, 0.2) 40%,
      #00fff9 50%,
      transparent 55%);
  background-size: 100% 200%;
  -webkit-background-clip: text;
  color: transparent;

  /* The scanning movement */
  animation: scanline 3s linear infinite;
  animation-play-state: var(--look-motion, running);
}

@keyframes scanline {
  0% {
    background-position: 0% -100%;
  }

  100% {
    background-position: 0% 200%;
  }
}

[data-theme="lab"] .body-text {
  position: relative;
  color: rgba(255, 255, 255, 0.5);
  /* Dim base text */
  font-family: monospace;
  --fit-max: 1.2em;
}



/* Urban */
.concrete-wall,
[data-theme="urban"] .Surface {
  background-color: #7a7a7a;
  /* Simulating rough concrete texture with noise */
  background-image:
    repeating-radial-gradient(circle at 0 0, transparent 0, #555 10px),
    repeating-linear-gradient(#666565, #7a7a7a);
  background-blend-mode: multiply;
  align-items: center;
  justify-content: center;
}


.graffiti,
[data-theme="urban"] .title-text {
  --fit-max: 3em;
  color: #ff0055;
  /* Bright spray paint color */

  /* The "Spray Paint" Effect */
  text-shadow:
    2px 2px 5px rgba(0, 0, 0, 0.5),
    /* Depth */
    0 0 10px #ff0055,
    /* Soft paint overspray */
    0 0 20px #ff0055;

  /* Essential: Makes the paint blend into the wall texture */
  mix-blend-mode: color-burn;
  --tilt: -5deg;
  /* Graffiti is rarely perfectly straight */
}

.drippygraffiti,
[data-theme="urban"] .header-text {
  position: relative;
  font-family: 'Permanent Marker', cursive;
  --fit-max: 2em;
  color: #ff0055;
  mix-blend-mode: color-burn;
}

.drippygraffiti::after {
  content: '';
  position: absolute;
  top: 80%;
  /* Start drips near the bottom of the text */
  left: 10%;
  width: 80%;
  height: 60px;
  /* How far the drips fall */

  /* Create multiple drips using linear-gradients */
  background:
    linear-gradient(#ff0055, #ff0055) 10% 0 / 4px 40px,
    /* Drip 1 */
    linear-gradient(#ff0055, #ff0055) 35% 0 / 3px 25px,
    /* Drip 2 */
    linear-gradient(#ff0055, #ff0055) 60% 0 / 5px 50px,
    /* Drip 3 */
    linear-gradient(#ff0055, #ff0055) 85% 0 / 3px 35px;
  /* Drip 4 */

  background-repeat: no-repeat;
  filter: blur(1px);
  /* Soften the edges of the spray paint */
}

.weathered-graffiti,
[data-theme="urban"] .body-text {
  font-family: 'Permanent Marker', cursive;
  --fit-max: 1.5em;
  color: #ff0055;
  mix-blend-mode: color-burn;

  /* 1. Reduce opacity to simulate sun-fading */
  opacity: 0.75;

  /* 2. Create the "chipped paint" look using a mask */
  /* This uses a repeating noise pattern to eat away at the letters */
  -webkit-mask-image: repeating-radial-gradient(circle,
      black,
      black 1px,
      transparent 2px,
      transparent 4px);
  mask-image: repeating-radial-gradient(circle,
      black,
      black 1px,
      transparent 2px,
      transparent 4px);
  -webkit-mask-size: 8px 8px;
  /* Controls how small the "chips" are */
}

/* School */
.chalkboard,
[data-theme="school"] .Surface {
  background-color: #2e4a3e;
  /* Classic forest green */
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 80%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 10px);
  border: 15px solid #5d4037;
  /* Wooden frame */
  padding: 40px;
}

.chalkboard-withtray {
  position: relative;
  background-color: #2e4a3e;
  /* Classic forest green */
  /*background:radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08), transparent 60%),*/
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 80%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 10px);
  border: 15px solid #5d4037;
  /* Wooden frame */
  padding: 40px;
  min-height: 300px;
  border-bottom: 25px solid #4e342e;
  /* Thicker bottom border for the "shelf" */
}

/* The actual ledge shadow */
.chalkboard-withtray::after {
  content: '';
  position: absolute;
  bottom: -35px;
  left: 0;
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.3);
  /* Shadow under the tray */
}

/* Drawing a piece of chalk sitting on the tray */
.chalk-piece {
  position: absolute;
  bottom: -20px;
  left: 10%;
  width: 30px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
  transform: rotate(5deg);
}

.chalk-text,
[data-theme="school"] .title-text {
  /* Use a handwritten font like 'Gochi Hand' or 'Architects Daughter' from Google Fonts */
  font-family: var(--title-font);
  --fit-max: 3em;
  color: rgba(255, 255, 255, 0.85);
  /* Slightly transparent white */

  /* The "Chalky" Glow & Smudge */
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.5),
    /* Soft edges */
    1px 1px 1px rgba(255, 255, 255, 0.2),
    0 0 5px rgba(255, 255, 255, 0.3);
  /* Chalk dust halo */

  /* Optional: Make it look slightly tilted like real handwriting */
  --tilt: -1deg;
}

[data-theme="school"] .header-text {
  font-family: var(--header-font);
  --fit-max: 2em;
  color: rgba(255, 255, 255, 0.75);
  /* Slightly more transparent for secondary text */

  /* Add a subtle jitter to simulate chalk dust settling */
  animation: chalk-jitter 3s ease-in-out infinite;
  animation-play-state: var(--look-motion, running);
}

.erased-chalk-text 
[data-theme="school"] .body-text {
  font-family: var(--font);
  --fit-max: 1.5em;
  color: rgba(255, 255, 255, 0.15);
  /* Very faint */

  /* Smudge effect */
  filter: blur(2.5px);

  /* Spread the "dust" out */
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.1),
    -5px 2px 15px rgba(255, 255, 255, 0.05);

  user-select: none;
  /* Makes it feel like background noise */
}

/* Western */
.wood-surface,
[data-theme="western"] .Surface {
  background-color: #6d4c41;
  /* Long, thin wood tiles stacked in staggered rows */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='960' height='68' viewBox='0 0 960 68'%3E%3Cpath d='M0 34H960M0 0H960M0 68H960' stroke='%23341d13' stroke-opacity='.28' stroke-width='2'/%3E%3Cpath d='M0 0V34M480 0V34M960 0V34M240 34V68M720 34V68' stroke='%23341d13' stroke-opacity='.3' stroke-width='2'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(255, 236, 194, 0.05) 0 1px, transparent 1px 8px),
    linear-gradient(90deg, rgba(255, 214, 149, 0.1), rgba(52, 29, 19, 0.08));
  background-size:
    960px 68px,
    100% 34px,
    100% 100%;
  background-position:
    0 0,
    0 0,
    0 0;
  text-align: center;
}

.branded-text,
[data-theme="western"] .title-text {
  font-weight: 900;
  --fit-max: 3em;

  /* Charred color that blends with wood texture */
  color: #3e2723;
  mix-blend-mode: color-burn;

  /* Indented burn effect */
  text-shadow:
    -1px -1px 1px rgba(0, 0, 0, 0.8),
    /* Top-left dark indent */
    1px 1px 1px rgba(255, 255, 255, 0.1),
    /* Bottom-right highlight */
    0 0 1px rgba(0, 0, 0, 0.5),
    /* Soft charring around edges */
    0 0 9px rgba(62, 39, 35, 0.4);
  /* Wide heat-faded halo */
}

.saloon-sign-text,
[data-theme="western"] .header-text {
  --fit-max: 2em;
  font-weight: 800;
  color: #f5d49a;
  letter-spacing: 0;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgba(46, 24, 14, 0.72);
  text-shadow:
    0 2px 0 #2e180e,
    0 4px 0 rgba(25, 12, 7, 0.55),
    2px 2px 0 rgba(255, 239, 189, 0.2),
    0 0 10px rgba(245, 212, 154, 0.22);
}

.dusty-trail-text,
[data-theme="western"] .body-text {
  --fit-max: 1.5em;
  font-weight: 700;
  color: #2f1a10;
  text-shadow:
    0 1px 0 rgba(255, 229, 176, 0.28),
    0 0 8px rgba(92, 48, 26, 0.18);
  animation: western-dust-shimmer 4.8s ease-in-out infinite;
  animation-play-state: var(--look-motion, running);
}

@keyframes western-dust-shimmer {
  0%,
  100% {
    filter: none;
    text-shadow:
      0 1px 0 rgba(255, 229, 176, 0.28),
      0 0 8px rgba(92, 48, 26, 0.18);
  }

  45% {
    filter: saturate(1.08);
    text-shadow:
      1px 1px 0 rgba(255, 229, 176, 0.32),
      -2px 0 10px rgba(158, 94, 50, 0.2),
      2px 0 14px rgba(70, 36, 20, 0.14);
  }

  55% {
    filter: saturate(0.96);
    text-shadow:
      -1px 1px 0 rgba(255, 229, 176, 0.24),
      2px 0 10px rgba(158, 94, 50, 0.18),
      -2px 0 14px rgba(70, 36, 20, 0.12);
  }
}

/* Cyberpunk */
.cyber-terminal,
[data-theme="cyberpunk"] .Surface {
  background-color: #000;
  background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 3px 100%;
  /* Creates the scanline grid */
  padding: 20px;
  border: 2px solid #32cd32;
  box-shadow: 0 0 15px rgba(50, 205, 50, 0.2);
}

.matrix-text {
  font-family: 'Courier New', monospace;
  color: #32cd32;
  /* Classic "Matrix" Green */
  font-size: 1.2rem;
  text-shadow: 0 0 5px #32cd32, 0 0 10px rgba(50, 205, 50, 0.5);
  line-height: 1.5;
  letter-spacing: 2px;
}

.matrix-glitch,
[data-theme="cyberpunk"] .title-text {
  color: #32cd32;
  position: relative;
  --fit-max: 3.3em;
  font-weight: bold;
  /* Apply both the glitch and the color flicker */
  animation: glitch-flicker 3s infinite;
  animation-play-state: var(--look-motion, running);
}

@keyframes glitch-flicker {

  /* 0-10% : Normal State */
  0%,
  10% {
    transform: translate(0);
    text-shadow: 0 0 5px #32cd32;
  }

  /* 11% : Sharp Twitch + Chromatic Aberration */
  11% {
    transform: translate(-3px, 2px);
    text-shadow: 3px 0 red, -3px 0 blue, 0 0 10px #32cd32;
  }

  /* 13% : Return to normal */
  13% {
    transform: translate(0);
    text-shadow: 0 0 5px #32cd32;
  }

  /* 50% : Vertical Shiver */
  50% {
    transform: translate(1px, -1px);
    text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff;
  }

  /* 52% : Return to normal */
  52% {
    transform: translate(0);
  }
}

/* The "Tear" Effect - thin blackout slices blink across the text. */
.matrix-tear,
[data-theme="cyberpunk"] .header-text {
  position: relative;
  display: inline-block;
  --fit-max: 2.1em;
  color: #32cd32;
  text-shadow: 0 0 5px #32cd32;
  isolation: isolate;
}

.matrix-tear::before,
[data-theme="cyberpunk"] .header-text::before,
.matrix-tear::after,
[data-theme="cyberpunk"] .header-text::after {
  content: "";
  position: absolute;
  inset: -0.08em -0.22em;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(#000 0 0) 6% 18% / 38% 0.08em no-repeat,
    linear-gradient(#000 0 0) 72% 34% / 24% 0.06em no-repeat,
    linear-gradient(#000 0 0) 14% 57% / 54% 0.075em no-repeat,
    linear-gradient(#000 0 0) 62% 76% / 32% 0.065em no-repeat;
  filter: drop-shadow(0 0 2px rgba(0, 255, 65, 0.35));
  animation: cyber-blackout-bars 4.8s steps(1, end) infinite;
  animation-play-state: var(--look-motion, running);
}

.matrix-tear::before,
[data-theme="cyberpunk"] .header-text::before {
  mix-blend-mode: normal;
}

.matrix-tear::after,
[data-theme="cyberpunk"] .header-text::after {
  inset-inline: -0.12em -0.32em;
  background:
    linear-gradient(#000 0 0) 22% 26% / 18% 0.055em no-repeat,
    linear-gradient(#000 0 0) 48% 45% / 46% 0.07em no-repeat,
    linear-gradient(#000 0 0) 8% 69% / 28% 0.06em no-repeat,
    linear-gradient(#000 0 0) 78% 86% / 20% 0.08em no-repeat;
  animation-name: cyber-blackout-bars-alt;
  animation-duration: 3.7s;
}

@keyframes cyber-blackout-bars {
  0%,
  7%,
  14%,
  26%,
  41%,
  58%,
  73%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }

  8%,
  12% {
    opacity: 0.92;
    transform: translateX(0.04em);
  }

  27%,
  29% {
    opacity: 0.75;
    transform: translateX(-0.06em);
  }

  42%,
  46% {
    opacity: 0.98;
    transform: translateX(0.1em);
  }

  59%,
  62% {
    opacity: 0.68;
    transform: translateX(-0.03em);
  }

  74%,
  76% {
    opacity: 0.86;
    transform: translateX(0.07em);
  }
}

@keyframes cyber-blackout-bars-alt {
  0%,
  18%,
  24%,
  39%,
  53%,
  67%,
  84%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }

  19%,
  21% {
    opacity: 0.72;
    transform: translateX(-0.08em);
  }

  40%,
  43% {
    opacity: 0.9;
    transform: translateX(0.05em);
  }

  68%,
  71% {
    opacity: 0.78;
    transform: translateX(-0.04em);
  }

  85%,
  87% {
    opacity: 0.96;
    transform: translateX(0.09em);
  }
}

.matrix-terminal,
[data-theme="cyberpunk"] .body-text {
  --fit-max: 1.3em;
  color: #32cd32;
  text-shadow: 0 0 5px #32cd32;
}

.matrix-cursor {
  display: inline-block;
  width: 10px;
  height: 1.2rem;
  background-color: #32cd32;
  margin-left: 5px;
  animation: blink 1s step-end infinite;
  animation-play-state: var(--look-motion, running);
}

@keyframes blink {

  from,
  to {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.luxury-plaque,
[data-theme="luxury"] .Surface {
  background: radial-gradient(circle, #8b0000 0%, #4a0000 100%);
  text-align: center;
  border: 4px solid #d4af37;
  /* The "Gold Frame" */

  /* The Hook: Making it look like a heavy wall plaque */
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.5),
    /* Inner shadow for depth */
    0 20px 40px rgba(0, 0, 0, 0.4);
  /* Outer shadow for the "hanging" look */
}

.gold-text-shimmer,
[data-theme="luxury"] .title-text {
  font-family: 'Playfair Display', serif;
  --fit-max: 60px;
  font-weight: 900;
  text-transform: var(--caps, uppercase);

  /* 1. Add a white "glint" stop at the end of the gradient */
  background: linear-gradient(110deg,
      #bf953f 20%,
      #fcf6ba 40%,
      #fff 50%,
      /* The Shine */
      #fcf6ba 60%,
      #bf953f 80%);

  /* 2. Scale up the background size so the shine can move */
  background-size: 200% auto;

  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* 3. Apply the shimmer animation */
  animation: shine 4s linear infinite;
  animation-play-state: var(--look-motion, running);
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.gold-text,
[data-theme="luxury"] .header-text {
  /* A high-end serif font */
  --fit-max: 3em;
  font-weight: 900;
  letter-spacing: calc(4px * var(--caps-tracking, 1));

  /* The Metallic Gradient */
  background: linear-gradient(to bottom,
      #bf953f 0%,
      #fcf6ba 20%,
      #b38728 40%,
      #fbf5b7 60%,
      #aa771c 100%);

  /* Clipping the background to the text shape */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Makes the gradient visible through the letters */

  /* Drop shadow to make the "gold" lift off the velvet */
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

[data-theme="luxury"] .body-text {
  --fit-max: 24px;
  color: #d4af37;
  /* Solid gold color for body text */
  text-shadow:
    0 0 3px #d4af37,
    0 0 10px rgba(212, 175, 55, 0.5);
}

/* Arcade */
.arcade-container,
[data-theme="arcade"] .Surface {
  background-color: #2b0057;
  /* Deep arcade purple */
  padding: 60px;
  justify-content: center;
}
[data-theme="arcade"] .arcade-container {
  background-color: #2b0057;
  /* Deep arcade purple */
}

.arcade-text,
[data-theme="arcade"] .title-text {
  /* Use 'Press Start 2P' from Google Fonts for the best look */
  --fit-max: 3em;
  font-weight: bold;
  color: #00ffff;
  /* Neon Cyan */
  text-transform: uppercase;

  /* The 3D Step Effect: Hard shadows with no blur */
  text-shadow:
    4px 4px 0px #ff00ff,
    /* First magenta step */
    8px 8px 0px #550055;
  /* Second dark purple step */

  /* Optional: Pulsing size animation */
  animation: pulse 0.6s infinite alternate;
  animation-play-state: var(--look-motion, running);
}

@keyframes pulse {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.05);
  }
}



[data-theme="arcade"] .header-text {
  --fit-max: 1.5em;
  color: #00ffff;
  /* Neon Cyan */
  text-shadow:
    2px 2px 0px #ff00ff,
    /* First magenta step */
    4px 4px 0px #550055;
}

[data-theme="arcade"] .body-text {
  --fit-max: 1.2em;
  color: #00ffff;
  /* Neon Cyan */
  text-shadow:
    1px 1px 0px #ff00ff,
    /* First magenta step */
    2px 2px 0px #550055;
}

/* Bioluminescent */
.deep-sea-floor,
[data-theme="deepsea"] .Surface {
  /* Dark teal radial gradient to simulate ocean depths */
  background: radial-gradient(circle at center, #002b36 0%, #001219 100%);
}

.bio-luminescent,
[data-theme="deepsea"] .title-text {
  font-style: italic;
  --fit-max: 4.375rem;
  color: #80ffea;
  /* Aquamarine */

  /* Soft, wide bioluminescent glow */
  text-shadow:
    0 0 10px #80ffea,
    0 0 30px rgba(0, 255, 234, 0.5),
    0 0 60px rgba(0, 255, 234, 0.2);

  /* The Hook: Slow hue-rotation to make the glow "breathe" */
  animation: ocean-shift 8s ease-in-out infinite;
  animation-play-state: var(--look-motion, running);
}

@keyframes ocean-shift {

  0%,
  100% {
    filter: hue-rotate(0deg);
    transform: translateY(0);
  }

  50% {
    filter: hue-rotate(45deg);
    /* Shifts from Cyan to Blue */
    transform: translateY(-10px);
    /* Subtle floating movement */
  }
}

[data-theme="deepsea"] .header-text {
  font-style: italic;
  --fit-max: 2.5rem;
  color: #80ffea;
  text-shadow:
    0 0 5px #80ffea,
    0 0 15px rgba(0, 255, 234, 0.5);
}

[data-theme="deepsea"] .body-text {
  font-style: italic;
  --fit-max: 2rem;
  color: #80ffea;
  text-shadow:
    0 0 3px #80ffea,
    0 0 10px rgba(0, 255, 234, 0.3);
}
[data-theme="deepsea"] .body-text::before {
  content: attr(data-text);
  /* Pulls text from HTML attribute */
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  color: #80ffea;
  text-shadow:
    0 0 5px #80ffea,
    0 0 15px rgba(0, 255, 234, 0.5);
}
[data-theme="deepsea"] .body-text::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(128, 255, 234, 0.1), transparent);
  /* Subtle bioluminescent particles */
}

body[data-theme] {
  font-size: 1.8rem;
}

/* Parchment Background */
[data-theme="parchment"] {
  --bg: #f4e4bc;
  /* Aged parchment color */
  --text: #2a1b0a;
  /* Deep sepia/iron gall ink */
  --accent: #8b4513;
  /* Classic, readable serif */

  /* Paper Texture using gradients */
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
    repeating-linear-gradient(rgba(0, 0, 0, 0.01) 0px, rgba(0, 0, 0, 0.01) 1px, transparent 1px, transparent 20px);
  background-blend-mode: multiply;
}

[data-theme="parchment"] .title-text {
  --fit-max: 3em;
  font-weight: bold;
  color: var(--text);
  filter: url(#ink-bleed);
}

/* The "Handwritten Ink" Effect */
[data-theme="parchment"] .header-text {
  --fit-max: 2em;
  filter: url(#ink-bleed);
  /* Reference to the SVG filter below */
  color: var(--text);
  letter-spacing: -1px;
  --tilt: -0.5deg;
  /* Handwritten tilt */
  /* Optional: Add a subtle "smudge" shadow to enhance the ink bleed */
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.2),
    /* Smudge on top-left */
    1px 1px 0 rgba(0, 0, 0, 0.1);
  /* Smudge on bottom-right */
  /* Font choice is crucial - a "handwritten" font like 'Libre Baskerville', 'MedievalSharp', 'Tangerine', 'Indie Flower' or 'Shadows Into Light' from Google Fonts would work well */
}

[data-theme="parchment"] .body-text {
  --fit-max: 1.8em;
  color: var(--text);
  filter: url(#ink-bleed);
}


[data-theme="parchment"] .body-text::before {
  /* Pulls text from HTML attribute */
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  color: var(--text);
  filter: url(#ink-bleed);
  /* Apply the same ink bleed to the "shadow" */
  transform: translate(20px, 2px);
  /* Offset to create a "shadow" effect */
  opacity: 0.5;
}

[data-theme="parchment"] .body-text::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.05), transparent);
  /* Subtle ink splatter overlay */
}

[data-theme="typewritter"] .title-text {
  font-family: 'Courier New', monospace;
  --fit-max: 60px;
  color: #333;
  /* Dark ink color */
  text-shadow:
    0 0 1px rgba(51, 51, 51, 0.5),
    /* Sharp ink edges */
    0 0 5px rgba(51, 51, 51, 0.2);
}

[data-theme="typewritter"] .header-text {
  font-family: 'Courier New', monospace;
  --fit-max: 40px;
  color: #141414;
  text-shadow:
    0 0 1px rgba(51, 51, 51, 0.5),
    /* Sharp ink edges */
    0 0 1px rgba(51, 51, 51, 0.2);
}

[data-theme="typewritter"] .body-text {
  font-family: 'Courier New', monospace;
  --fit-max: 24px;
  color: #26221d;
  letter-spacing: 0.01em;

  text-shadow:
    /* dark ink pressed into the page */
    0 0 0.5px rgba(38, 34, 29, 0.9),
    0 0 1px rgba(38, 34, 29, 0.55),

    /* lower/right compressed paper edge */
    1px 1px 0 rgba(0, 0, 0, 0.22),

    /* upper/left lifted paper highlight */
    -1px -1px 0 rgba(255, 255, 255, 0.75),

    /* slight ink bleed */
    0 0 4px rgba(38, 34, 29, 0.18);
}


/* SVG Filter for Ink Bleed Effect
    <svg style="position: absolute; width: 0; height: 0;">
    <filter id="ink-bleed">
        <feGaussianBlur in="SourceGraphic" stdDeviation="0.4" result="blur" />
        <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 18 -7" result="ink" />
        <feComposite in="SourceGraphic" in2="ink" operator="atop" />
    </filter>
    </svg>
*/

/* CRT Terminal */
[data-theme="crt"] .Surface {
  background:
    radial-gradient(ellipse at center, rgba(55, 255, 101, 0.12), transparent 58%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 4px),
    linear-gradient(135deg, #05110b, #010302);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.85);
}

[data-theme="crt"] .Surface::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(141, 255, 156, 0.08), transparent),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.55) 100%);
  animation: crt-roll 5s linear infinite;
  animation-play-state: var(--look-motion, running);
}

[data-theme="crt"] .title-text,
[data-theme="crt"] .header-text,
[data-theme="crt"] .body-text {
  color: #8dff9c;
  text-transform: uppercase;
  text-shadow:
    0 0 4px #35ff65,
    0 0 12px rgba(53, 255, 101, 0.6),
    2px 0 0 rgba(255, 48, 150, 0.18),
    -2px 0 0 rgba(40, 244, 255, 0.16);
}

[data-theme="crt"] .title-text {
  --fit-max: 3.2em;
  animation: crt-flicker 2.8s infinite;
  animation-play-state: var(--look-motion, running);
}

[data-theme="crt"] .header-text {
  --fit-max: 2em;
}

[data-theme="crt"] .body-text {
  --fit-max: 1em;
}

[data-theme="crt"] .body-text::after {
  content: '_';
  animation: crt-cursor 0.9s steps(1) infinite;
  animation-play-state: var(--look-motion, running);
}

@keyframes crt-roll {
  0% { transform: translateY(-8%); }
  100% { transform: translateY(8%); }
}

@keyframes crt-flicker {
  0%, 18%, 22%, 100% { opacity: 1; }
  19%, 21% { opacity: 0.72; }
}

@keyframes crt-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Blueprint */
[data-theme="blueprint"] .Surface {
  background-color: #063a70;
  background-image:
    linear-gradient(rgba(159, 228, 255, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 228, 255, 0.34) 1px, transparent 1px),
    linear-gradient(rgba(159, 228, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 228, 255, 0.14) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
}

[data-theme="blueprint"] .Surface::before {
  content: '';
  position: absolute;
  inset: 24px;
  border: 1px dashed rgba(232, 246, 255, 0.48);
  pointer-events: none;
}

[data-theme="blueprint"] .title-text,
[data-theme="blueprint"] .header-text,
[data-theme="blueprint"] .body-text {
  color: #e8f6ff;
  text-transform: uppercase;
  text-shadow:
    0 0 1px #fff,
    0 0 10px rgba(159, 228, 255, 0.4);
}

[data-theme="blueprint"] .title-text {
  --fit-max: 3em;
  -webkit-text-stroke: 1px rgba(232, 246, 255, 0.8);
  color: transparent;
}

[data-theme="blueprint"] .header-text {
  --fit-max: 2em;
  border-top: 1px solid rgba(232, 246, 255, 0.65);
  border-bottom: 1px solid rgba(232, 246, 255, 0.65);
}

[data-theme="blueprint"] .body-text {
  position: relative;
  padding-inline: 2em;
}

[data-theme="blueprint"] .body-text::before,
[data-theme="blueprint"] .body-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 1.4em;
  border-top: 1px solid rgba(232, 246, 255, 0.8);
}

[data-theme="blueprint"] .body-text::before { left: 0; }
[data-theme="blueprint"] .body-text::after { right: 0; }

/* Comic Book */
[data-theme="comic"] .Surface {
  background:
    radial-gradient(circle, rgba(16, 16, 20, 0.18) 0 2px, transparent 2px 12px),
    linear-gradient(135deg, #ffe44d 0 44%, #ff8a00 44% 56%, #23a7ff 56%);
  background-size: 18px 18px, 100% 100%;
}

[data-theme="comic"] .title-text,
[data-theme="comic"] .header-text,
[data-theme="comic"] .body-text {
  color: #fff;
  text-transform: uppercase;
  -webkit-text-stroke: 2px #101014;
  --tilt: -2deg;
  --skew: -4deg;
  text-shadow:
    4px 4px 0 #e21b3c,
    8px 8px 0 #101014;
}

[data-theme="comic"] .title-text {
  --fit-max: 4em;
}

[data-theme="comic"] .header-text {
  --fit-max: 3em;
  color: #ffe44d;
}

[data-theme="comic"] .body-text {
  --fit-max: 2em;
  display: inline-block;
  padding: 0.2em 0.45em;
  color: #23a7ff;
  background: #fff;
  border: 4px solid #101014;
  box-shadow: 8px 8px 0 #101014;
}

/* Hologram */
[data-theme="hologram"] .Surface {
  background:
    radial-gradient(circle at 50% 42%, rgba(56, 247, 255, 0.2), transparent 34%),
    repeating-linear-gradient(0deg, rgba(56, 247, 255, 0.08) 0 2px, transparent 2px 9px),
    linear-gradient(145deg, #07141d, #03070a);
}

[data-theme="hologram"] .Surface::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(56, 247, 255, 0.2), transparent);
  transform: translateY(-100%);
  animation: holo-scan 3.4s linear infinite;
  animation-play-state: var(--look-motion, running);
}

[data-theme="hologram"] .title-text,
[data-theme="hologram"] .header-text,
[data-theme="hologram"] .body-text {
  position: relative;
  color: rgba(159, 252, 255, 0.78);
  text-transform: uppercase;
  text-shadow:
    0 0 5px #38f7ff,
    0 0 22px rgba(56, 247, 255, 0.72);
  mix-blend-mode: screen;
}

[data-theme="hologram"] .title-text {
  --fit-max: 3.4em;
  -webkit-text-stroke: 1px rgba(159, 252, 255, 0.65);
  color: rgba(159, 252, 255, 0.18);
}

[data-theme="hologram"] .body-text::before,
[data-theme="hologram"] .body-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

[data-theme="hologram"] .body-text::before {
  transform: translateX(4px);
  color: rgba(255, 70, 214, 0.35);
}

[data-theme="hologram"] .body-text::after {
  transform: translateX(-4px);
  color: rgba(40, 244, 255, 0.38);
  animation: holo-glitch 2.2s steps(2) infinite;
  animation-play-state: var(--look-motion, running);
}

@keyframes holo-scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes holo-glitch {
  0%, 88%, 100% { clip-path: inset(0); }
  90% { clip-path: inset(0 0 60% 0); }
  94% { clip-path: inset(45% 0 20% 0); }
}

[data-theme="hologram"] .header-text {
  --fit-max: 2em;
  color: rgba(159, 252, 255, 0.48);
}

[data-theme="hologram"] .body-text {
  --fit-max: 1.2em;
  color: rgba(159, 252, 255, 0.38);
}

/* Vaporwave */
[data-theme="vaporwave"] .Surface {
  background:
    linear-gradient(to top, rgba(22, 0, 46, 0.95) 0 36%, transparent 36%),
    repeating-linear-gradient(to top, rgba(40, 244, 255, 0.42) 0 2px, transparent 2px 42px),
    repeating-linear-gradient(90deg, rgba(40, 244, 255, 0.24) 0 2px, transparent 2px 72px),
    radial-gradient(circle at 50% 30%, #ff8cf4 0 9%, #ff4da6 10% 18%, #ffcf5a 19% 28%, transparent 29%),
    linear-gradient(180deg, #16002e 0%, #3b0a67 46%, #ff4da6 100%);
  background-size: auto, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

[data-theme="vaporwave"] .Surface::before {
  content: '';
  position: absolute;
  inset: 48% 0 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(255, 140, 244, 0.75) 50%, transparent 50.4%),
    repeating-linear-gradient(90deg, rgba(40, 244, 255, 0.36) 0 2px, transparent 2px 80px);
  transform: perspective(260px) rotateX(62deg);
  transform-origin: top;
}

[data-theme="vaporwave"] .title-text {
  --fit-max: 3.6em;
  color: transparent;
  background: linear-gradient(180deg, #fff, #ff8cf4 42%, #28f4ff 56%, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 0 12px rgba(255, 140, 244, 0.8),
    5px 5px 0 rgba(40, 244, 255, 0.36);
}

[data-theme="vaporwave"] .header-text,
[data-theme="vaporwave"] .body-text {
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    0 0 8px #ff8cf4,
    3px 3px 0 #28f4ff,
    6px 6px 0 #16002e;
}

[data-theme="vaporwave"] .header-text {
  --fit-max: 2em;
  animation: vapor-float 5s ease-in-out infinite;
  animation-play-state: var(--look-motion, running);
}

[data-theme="vaporwave"] .body-text {
  --fit-max: 1.2em;
  animation: vapor-float 7s ease-in-out infinite reverse;
  animation-play-state: var(--look-motion, running);
}

@keyframes vapor-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Newspaper */
[data-theme="newspaper"] .Main {
  color: #17140f;
}

[data-theme="newspaper"] .Surface {
  background-color: #ece7dc;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(23, 20, 15, 0.05) 0 1px, transparent 1px 6px);
  filter: contrast(1.05) sepia(0.18);
}

[data-theme="newspaper"] .title-text {
  --fit-max: 3em;
  font-weight: 900;
  color: #17140f;
  letter-spacing: 0;
  text-transform: uppercase;
  border-top: 4px double #17140f;
  border-bottom: 4px double #17140f;
  padding: 0.05em 0.35em;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.65);
}

[data-theme="newspaper"] .header-text {
  max-width: 11em;
  --fit-max: 1.9em;
  font-weight: bold;
  font-style: italic;
  color: #29241b;
  text-align: center;
}

[data-theme="newspaper"] .body-text {
  position: relative;
  max-width: 17em;
  color: #17140f;
  --fit-max: 1.35em;
  line-height: 1.2;
  text-align: justify;
  columns: 2;
  column-gap: 1.5em;
  column-rule: 1px solid rgba(23, 20, 15, 0.45);
}

[data-theme="newspaper"] .body-text::first-letter {
  float: left;
  font-size: 2.4em;
  line-height: 0.8;
  margin-right: 0.08em;
}

[data-theme="newspaper"] :is(.layout-section-header, .custom-effect-note) p {
  columns: calc(28 * var(--face-aspect) * 1em);
  column-gap: var(--newspaper-column-gap, 1.5rem);
  column-rule: 1px solid var(--newspaper-column-rule, rgba(23, 20, 15, 0.22));
  text-align: justify;
  hyphens: auto;
  text-wrap: pretty;
}

[data-theme="newspaper"] .custom-effect-note h3 {
  border-bottom: 1px solid var(--newspaper-column-rule, rgba(23, 20, 15, 0.22));
  padding-bottom: 0.35rem;
}

/* Starfield Console */
[data-theme="starfield"] .Surface {
  background:
    radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, #d8f7ff 0 1px, transparent 1px),
    radial-gradient(circle at 45% 80%, rgba(121, 220, 255, 0.9) 0 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(50, 77, 160, 0.28), transparent 45%),
    linear-gradient(180deg, #020511, #080f28);
  background-size: 140px 140px, 220px 220px, 310px 310px, 100% 100%, 100% 100%;
}

[data-theme="starfield"] .Surface::before,
[data-theme="starfield"] .Surface::after {
  content: '';
  position: absolute;
  inset: 50%;
  pointer-events: none;
  border: 1px solid rgba(121, 220, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

[data-theme="starfield"] .Surface::before {
  width: 22em;
  height: 22em;
  box-shadow: 0 0 40px rgba(121, 220, 255, 0.14);
  animation: starfield-orbit 12s linear infinite;
  animation-play-state: var(--look-motion, running);
}

[data-theme="starfield"] .Surface::after {
  width: 14em;
  height: 14em;
  border-style: dashed;
  animation: starfield-orbit 7s linear infinite reverse;
  animation-play-state: var(--look-motion, running);
}

[data-theme="starfield"] .title-text,
[data-theme="starfield"] .header-text,
[data-theme="starfield"] .body-text {
  color: #d8f7ff;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(121, 220, 255, 0.85),
    0 0 24px rgba(121, 220, 255, 0.35);
}

[data-theme="starfield"] .title-text {
  --fit-max: 3.2em;
}

[data-theme="starfield"] .body-text {
  border: 1px solid rgba(121, 220, 255, 0.56);
  padding: 0.35em 0.8em;
  background: rgba(2, 5, 17, 0.45);
}

@keyframes starfield-orbit {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.06); }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

/* Museum Plaque */
[data-theme="museum"] .Surface {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 244, 214, 0.55), transparent 34%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 30% 70%, rgba(0, 0, 0, 0.08)),
    linear-gradient(180deg, #ab946d, #806b4a);
}

[data-theme="museum"] .main-shell {
  position: relative;
}

[data-theme="museum"] .main-shell::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--layout-pad) * 0.4);
  pointer-events: none;
  z-index: -1;
  border: 1px solid rgba(70, 48, 24, 0.35);
  box-shadow:
    inset 0 0 0 10px rgba(255, 244, 214, 0.08),
    0 16px 42px rgba(45, 33, 21, 0.32);
}

[data-theme="museum"] .title-text,
[data-theme="museum"] .header-text,
[data-theme="museum"] .body-text {
  color: #2d2115;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(255, 240, 190, 0.65),
    0 -1px 0 rgba(60, 38, 18, 0.24);
}

[data-theme="museum"] .title-text {
  --fit-max: 3.4em;
  font-variant: small-caps;
}

[data-theme="museum"] .header-text {
  padding: 0.35em 1.4em;
  color: #3b2a17;
  background: linear-gradient(145deg, #d6bd73, #92743c);
  border: 1px solid rgba(45, 33, 21, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(45, 33, 21, 0.35);
}

[data-theme="museum"] .body-text {
  max-width: 18em;
  --fit-max: 1.25em;
  font-style: italic;
}

/* Storm Warning */
[data-theme="storm"] .Surface {
  background:
    repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 212, 71, 0.15) 22px 30px, transparent 30px 54px),
    radial-gradient(circle at 70% 20%, rgba(220, 236, 255, 0.22), transparent 22%),
    linear-gradient(180deg, #273247, #111722 52%, #070a10);
}

[data-theme="storm"] .Surface::before {
  content: '';
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background:
    repeating-linear-gradient(100deg, transparent 0 32px, rgba(220, 236, 255, 0.32) 33px 35px, transparent 36px 68px);
  opacity: 0.35;
  animation: storm-rain 0.6s linear infinite;
  animation-play-state: var(--look-motion, running);
}

[data-theme="storm"] .Surface::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0);
  animation: storm-flash 5.5s infinite;
  animation-play-state: var(--look-motion, running);
}

[data-theme="storm"] .title-text,
[data-theme="storm"] .header-text,
[data-theme="storm"] .body-text {
  color: #dcecff;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(220, 236, 255, 0.65),
    3px 3px 0 #070a10;
}

[data-theme="storm"] .title-text {
  --fit-max: 3.5em;
  color: #ffd447;
}

[data-theme="storm"] .header-text {
  --fit-max: 2em;
  border: 2px solid #ffd447;
  padding: 0.25em 0.25em;
  background: repeating-linear-gradient(135deg, #ffd447 0 12px, #111722 12px 24px);
  color: #fff;
}

[data-theme="storm"] .body-text {
  --fit-max: 1.2em;
  color: #dcecff;
  text-shadow:
    0 0 6px rgba(220, 236, 255, 0.45),
    2px 2px 0 #111722;
}

@keyframes storm-rain {
  0% { transform: translate(0, -5%); }
  100% { transform: translate(-4%, 5%); }
}

@keyframes storm-flash {
  0%, 88%, 94%, 100% { background: rgba(255, 255, 255, 0); }
  89%, 92% { background: rgba(255, 255, 255, 0.34); }
}

/* Thermal Camera */
[data-theme="thermal"] .Surface {
  background:
    radial-gradient(circle at 32% 42%, #fff4a3 0 8%, #ff8c1f 9% 17%, #ff1f66 18% 28%, transparent 29%),
    radial-gradient(circle at 67% 62%, #f9ff5b 0 5%, #ff4a1f 6% 13%, #7a1fff 14% 24%, transparent 25%),
    radial-gradient(circle at 48% 30%, rgba(40, 244, 255, 0.72) 0 12%, transparent 24%),
    linear-gradient(135deg, #07030d, #19153c 42%, #001c3d);
  filter: saturate(1.45) contrast(1.1);
}

[data-theme="thermal"] .Surface::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 6px),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: thermal-scan 3s linear infinite;
  animation-play-state: var(--look-motion, running);
}

[data-theme="thermal"] .title-text,
[data-theme="thermal"] .header-text,
[data-theme="thermal"] .body-text {
  color: #fff4a3;
  text-transform: uppercase;
  text-shadow:
    0 0 6px #fff4a3,
    0 0 16px #ff4a1f,
    0 0 32px #7a1fff;
}

[data-theme="thermal"] .title-text {
  --fit-max: 3.3em;
  background: linear-gradient(90deg, #28f4ff, #fff4a3, #ff4a1f, #ff1f66);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme="thermal"] .body-text {
  padding: 0.25em 0.7em;
  border: 1px solid rgba(255, 244, 163, 0.72);
  background: rgba(7, 3, 13, 0.38);
}

@keyframes thermal-scan {
  0% { background-position: 0 0, -100vw 0; }
  100% { background-position: 0 24px, 100vw 0; }
}

/* Origami */
[data-theme="origami"] .Surface {
  background:
    linear-gradient(135deg, transparent 0 49.8%, rgba(39, 49, 66, 0.12) 50%, transparent 50.2%),
    linear-gradient(45deg, transparent 0 49.8%, rgba(255, 255, 255, 0.8) 50%, transparent 50.2%),
    linear-gradient(135deg, #f7f3ea 0 25%, #e9dfd2 25% 50%, #f4f0e8 50% 75%, #dbe6e7 75%);
  background-size: 120px 120px, 120px 120px, 100% 100%;
}

[data-theme="origami"] .Surface::before,
[data-theme="origami"] .Surface::after {
  content: '';
  position: absolute;
  pointer-events: none;
  width: 18em;
  height: 18em;
  background: linear-gradient(135deg, rgba(214, 79, 79, 0.28) 0 50%, rgba(39, 49, 66, 0.12) 50%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 16px 14px rgba(39, 49, 66, 0.16));
}

[data-theme="origami"] .Surface::before {
  left: 8%;
  bottom: 8%;
  transform: rotate(-18deg);
}

[data-theme="origami"] .Surface::after {
  right: 7%;
  top: 10%;
  transform: rotate(24deg) scale(0.7);
  background: linear-gradient(135deg, rgba(72, 133, 168, 0.26) 0 50%, rgba(39, 49, 66, 0.1) 50%);
}

[data-theme="origami"] .title-text,
[data-theme="origami"] .header-text,
[data-theme="origami"] .body-text {
  color: #273142;
  text-shadow:
    1px 1px 0 rgba(255, 255, 255, 0.85),
    3px 5px 0 rgba(39, 49, 66, 0.08);
}

[data-theme="origami"] .title-text {
  --fit-max: 3.1em;
  --tilt: -1deg;
}

[data-theme="origami"] .header-text {
  color: #d64f4f;
}

[data-theme="origami"] .body-text {
  display: inline-block;
  padding: 0.35em 0.8em;
  background: linear-gradient(135deg, #fff 0 50%, #eadfd4 50%);
  box-shadow: 8px 8px 0 rgba(39, 49, 66, 0.12);
  --tilt: 1.5deg;
}

/* Tux */
[data-theme="tux"] .Surface {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.12), transparent 34rem),
    #050505;
  background-size: 28px 100%, 100% 100%, 100% 100%;
}

[data-theme="tux"] .title-text,
[data-theme="tux"] .header-text,
[data-theme="tux"] .body-text {
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  text-shadow: none;
}

[data-theme="tux"] .title-text {
  --fit-max: 3em;
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
}

[data-theme="tux"] .header-text {
  font-weight: 700;
  color: #e8e8e8;
}

[data-theme="tux"] .body-text {
  display: inline-block;
  padding: 0.45em 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  color: #f8f8f4;
  font-weight: 600;
}

/* Fortress: Dark Slate & Forged Iron */
[data-theme="fortress"] .Main {
  color: #ede7dc;
}

[data-theme="fortress"] .Surface {
  background-color: #14171a;
  background-image:
    radial-gradient(ellipse at 50% 12%, rgba(212, 175, 55, 0.22), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='bumpy'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' result='noise'/%3E%3CfeDiffuseLighting in='noise' lighting-color='%23ffffff' surfaceScale='3.2' result='light'%3E%3CfeDistantLight azimuth='55' elevation='42'/%3E%3C/feDiffuseLighting%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.16'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23bumpy)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(180deg, transparent 0 56px, rgba(0, 0, 0, 0.65) 56px 60px),
    repeating-linear-gradient(90deg, transparent 0 116px, rgba(0, 0, 0, 0.45) 116px 120px);
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.75);
}

[data-theme="fortress"] .Surface::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.7) 100%);
}

[data-theme="fortress"] .title-text {
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 900;
  text-transform: uppercase;
  color: #f5eedc;
  letter-spacing: 0.12em;
  text-shadow:
    0 1px 0 rgba(212, 175, 55, 0.65),
    0 -1px 0 rgba(0, 0, 0, 0.85),
    0 4px 14px rgba(0, 0, 0, 0.7);
  border-top: 3px solid #383e46;
  border-bottom: 3px double #d4af37;
  padding: 0.15em 0.4em;
}

[data-theme="fortress"] .header-text {
  color: #d4af37;
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #383e46;
  padding-bottom: 0.25em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

[data-theme="fortress"] .body-text {
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 300;
  color: #ede7dc;
  line-height: 1.65;
}

[data-theme="fortress"] .body-text::first-letter {
  float: left;
  font-size: 2.6em;
  line-height: 0.8;
  margin-right: 0.1em;
  padding: 0.12em 0.22em;
  background: #252b31;
  color: #d4af37;
  border: 1px solid #d4af37;
  border-radius: 2px;
  font-weight: 900;
}

/* Citadel: Sunlit Sandstone Bastion & Burnished Bronze */
[data-theme="citadel"] .Main {
  color: #1b1209;
}

[data-theme="citadel"] .Surface {
  background-color: #e6cfab;
  background-image:
    radial-gradient(ellipse at 50% 15%, rgba(255, 246, 226, 0.55), transparent 60%),
    repeating-linear-gradient(180deg, transparent 0 54px, rgba(45, 27, 13, 0.12) 54px 56px),
    repeating-linear-gradient(90deg, transparent 0 108px, rgba(45, 27, 13, 0.08) 108px 110px);
  box-shadow: inset 0 0 110px rgba(45, 27, 13, 0.25);
}

[data-theme="citadel"] .title-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  text-transform: uppercase;
  color: #1b1209;
  letter-spacing: 0.12em;
  text-shadow:
    -1px -1px 0 rgba(255, 255, 255, 0.8),
    1px 1px 1px rgba(0, 0, 0, 0.4),
    2px 4px 8px rgba(45, 27, 13, 0.25);
  border-top: 3px double #9a5f27;
  border-bottom: 3px double #9a5f27;
  padding: 0.12em 0.4em;
}

[data-theme="citadel"] .header-text {
  color: #7d4918;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-style: italic;
  border-bottom: 2px solid #9a5f27;
  padding-bottom: 0.2em;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="citadel"] .body-text {
  font-family: Georgia, 'Playfair Display', serif;
  color: #2b1d12;
  line-height: 1.6;
}

[data-theme="citadel"] .body-text::first-letter {
  float: left;
  font-size: 2.6em;
  line-height: 0.8;
  margin-right: 0.1em;
  padding: 0.12em 0.22em;
  background: #9a5f27;
  color: #fdf6eb;
  border-radius: 2px;
  font-weight: 900;
}

/* Vault: Gothic Catacomb & Scriptoria */
[data-theme="vault"] .Main {
  color: #dfd8c8;
}

[data-theme="vault"] .Surface {
  background-color: #0c0d10;
  background-image:
    linear-gradient(45deg, rgba(184, 151, 88, 0.04) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(184, 151, 88, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 25%, rgba(184, 151, 88, 0.16), transparent 32rem),
    linear-gradient(180deg, #0c0d10, #14171d 50%, #08090b);
  background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%;
  box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.85);
}

[data-theme="vault"] .Surface::before {
  content: '';
  position: absolute;
  inset: 10%;
  pointer-events: none;
  border: 1px solid rgba(184, 151, 88, 0.18);
  border-radius: 6px;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.6),
    0 16px 64px rgba(0, 0, 0, 0.65);
}

[data-theme="vault"] .title-text {
  font-family: 'Bonheur Royale', cursive;
  font-weight: 400;
  text-transform: none;
  --fit-max: 4.5em;
  color: #ede4d1;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 16px rgba(184, 151, 88, 0.55),
    0 2px 4px rgba(0, 0, 0, 0.8);
  border-block: 1px solid rgba(184, 151, 88, 0.4);
  padding-block: 0.15em;
}

[data-theme="vault"] .header-text {
  color: #b89758;
  font-family: 'Bonheur Royale', cursive;
  font-weight: 400;
  font-size: 1.7em;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(184, 151, 88, 0.35);
  padding-bottom: 0.2em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

[data-theme="vault"] .body-text {
  font-family: 'Playfair Display', 'Cinzel', Georgia, serif;
  font-style: normal;
  color: #dfd8c8;
  line-height: 1.65;
}

[data-theme="vault"] .body-text::first-letter {
  float: left;
  font-size: 2.8em;
  line-height: 0.75;
  margin-right: 0.12em;
  padding: 0.14em 0.24em;
  background: rgba(184, 151, 88, 0.15);
  color: #b89758;
  border: 1px solid #b89758;
  border-radius: 3px;
  font-weight: 900;
}

/* Mid-Century Modern: Atomic Era & Walnut */
[data-theme="midcentury"] .Main {
  color: #2a1f18;
}

[data-theme="midcentury"] .Surface {
  background-color: #ede4d3;
  background-image:
    radial-gradient(ellipse at 85% 15%, rgba(211, 84, 0, 0.12), transparent 45%),
    radial-gradient(ellipse at 15% 85%, rgba(42, 114, 115, 0.12), transparent 45%),
    repeating-linear-gradient(45deg, transparent 0 28px, rgba(42, 31, 24, 0.035) 28px 29px),
    repeating-linear-gradient(-45deg, transparent 0 28px, rgba(42, 31, 24, 0.035) 28px 29px);
  box-shadow: inset 0 0 80px rgba(42, 31, 24, 0.12);
}

[data-theme="midcentury"] .title-text {
  font-family: 'Noto Sans', system-ui, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #2a1f18;
  border-bottom: 4px solid #d35400;
  padding-bottom: 0.15em;
}

[data-theme="midcentury"] .header-text {
  font-family: 'Noto Sans', system-ui, sans-serif;
  font-weight: 700;
  color: #2a7273;
  letter-spacing: 0.06em;
  padding: 0.3em 0.8em;
  background: rgba(42, 114, 115, 0.12);
  border-radius: 999px;
  border: 1px solid rgba(42, 114, 115, 0.35);
}

[data-theme="midcentury"] .body-text {
  font-family: 'Noto Sans', system-ui, sans-serif;
  font-weight: 400;
  color: #3b2c22;
  line-height: 1.6;
}

[data-theme="midcentury"] .body-text::first-letter {
  float: left;
  font-size: 2.5em;
  line-height: 0.85;
  margin-right: 0.1em;
  padding: 0.1em 0.25em;
  background: #d35400;
  color: #fff;
  border-radius: 4px;
  font-weight: 900;
}


/* Temple Gate */
[data-theme="temple"] .Layout {
  background: linear-gradient(135deg, #07110e, #121417 42%, #070b12);
}


[data-theme="temple"] .Main {
  color: #f4efe2;
}

[data-theme="temple"] .Surface {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 30%, rgba(215, 173, 88, 0.18), transparent 28rem),
    linear-gradient(135deg, #07110e, #121417 52%, #070b12);
  background-size: 42px 42px, 42px 42px, 100% 100%, 100% 100%;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.28);
}

[data-theme="temple"] .Surface::before {
  content: '';
  position: absolute;
  inset: 9%;
  pointer-events: none;
  border: 1px solid rgba(244, 239, 226, 0.16);
  border-radius: 8px;
  background: rgba(7, 13, 11, 0.28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

[data-theme="temple"] .title-text,
[data-theme="temple"] .header-text,
[data-theme="temple"] .body-text {
  position: relative;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

[data-theme="temple"] .title-text {
  color: #f0c86e;
  --fit-max: 3.6em;
  font-weight: 800;
  line-height: 0.95;
  text-shadow:
    0 0 18px rgba(215, 173, 88, 0.28),
    0 10px 36px rgba(0, 0, 0, 0.46);
}

[data-theme="temple"] .header-text {
  color: #f4efe2;
  --fit-max: 1.8em;
  font-weight: 700;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.42);
}

[data-theme="temple"] .body-text {
  max-width: 58ch;
  color: #b8c4b8;
  --fit-max: 1.15em;
  line-height: 1.55;
  padding: 0.7em 1em;
  border: 1px solid rgba(244, 239, 226, 0.18);
  border-radius: 6px;
  background: rgba(13, 21, 18, 0.72);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
}

/* Microsoft / Fluent: flat neutral layers, and colour used sparingly enough
   that it reads as a highlight on grey rather than as a wash. Fluent's ground
   is genuinely almost paper -- the blue belongs on the controls. */
[data-theme="microsoft"] .Surface {
  background:
    radial-gradient(circle at 6% -4%, rgba(15, 108, 189, 0.12), transparent 32rem),
    linear-gradient(180deg, #ffffff, #f5f5f5 44%);
}

[data-theme="microsoft"] .title-text,
[data-theme="microsoft"] .header-text {
  color: #115ea3;                     /* brandForeground2 */
}

/* Apple / Cupertino: the wallpaper bloom, well under the type. Everything
   that matters here is monochrome; the colour is atmosphere, not content. */
[data-theme="apple"] .Surface {
  background:
    radial-gradient(circle at 18% 10%, rgba(151, 193, 255, 0.34), transparent 26rem),
    radial-gradient(circle at 84% 22%, rgba(255, 183, 221, 0.22), transparent 27rem),
    linear-gradient(160deg, #fbfbfd, #f2f4f8 58%, #f7f4fa);
}

[data-theme="apple"] .title-text,
[data-theme="apple"] .header-text {
  color: #1d1d1f;
}

/* Android / Material: a tonal field, and headings in the primary tone rather
   than in ink -- Material colours its type where the other two do not. */
[data-theme="android"] .Surface {
  background:
    radial-gradient(circle at 80% 12%, rgba(210, 188, 255, 0.45), transparent 26rem),
    radial-gradient(circle at 10% 82%, rgba(130, 219, 181, 0.28), transparent 24rem),
    linear-gradient(150deg, #fef7ff, #f7f0fb);
}

[data-theme="android"] .title-text {
  color: #1d1b20;                     /* on-surface: display is ink */
}

[data-theme="android"] .header-text {
  color: #4f378b;                     /* on-primary-container: title is tone */
}

/* --- RESPONSIVE THEME TYPE --- */
@media (max-width: 900px) {
  body.Layout {
    font-size: 93.75%;
  }

  body.Layout .title-text {
    --fit-max: clamp(2.2rem, 7vw, 3.4rem);
    line-height: 1.05;
  }

  body.Layout .header-text {
    --fit-max: clamp(1.35rem, 4.8vw, 2rem);
    line-height: 1.15;
  }

  body.Layout .body-text {
    --fit-max: clamp(1rem, 3.2vw, 1.35rem);
    line-height: 1.45;
  }
}

@media (max-width: 640px) {
  body.Layout {
    font-size: 87.5%;
  }

  body.Layout .title-text {
    --fit-max: clamp(1.8rem, 10vw, 2.7rem);
  }

  body.Layout .header-text {
    --fit-max: clamp(1.15rem, 6.5vw, 1.65rem);
  }

  body.Layout .body-text {
    --fit-max: clamp(0.95rem, 4.5vw, 1.15rem);
  }
}

/* ==================================================================== */
/* THEMED CROSSINGS + THEMED INTERACTIVITY                               */
/*                                                                      */
/* A look ships with an expected feel, not just an appearance. It        */
/* declares that feel as tokens; life decides whether they get used.     */
/*                                                                      */
/*   --enter-anim / --enter-time / --enter-ease                          */
/*        how the page ARRIVES when this look is chosen                  */
/*   --stagger-anim / --stagger-step                                     */
/*        how a list unpacks itself, item by item                        */
/*   --drawer-ease / --drawer-time                                       */
/*        how this look's own chrome slides                              */
/*                                                                      */
/* Adding a crossing to a theme is two lines: a @keyframes and a         */
/* --enter-anim. Nothing else in any layer has to know about it.         */
/* ==================================================================== */

[data-theme] {
  --enter-anim: look-cross-fade;
  --enter-time: 420ms;
  --enter-ease: cubic-bezier(0.2, 0, 0, 1);
  --stagger-anim: look-item-rise;
  --stagger-step: 45ms;
  --drawer-ease: cubic-bezier(0.2, 0, 0, 1);
  --drawer-time: 280ms;
}

@keyframes look-cross-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes look-item-rise {
  from { opacity: 0; translate: 0 0.6rem; }
  to { opacity: 1; translate: 0 0; }
}

/* Parchment: the page is a scroll, so it unrolls from the top. */
@keyframes look-unroll {
  from { opacity: 0.2; transform: scaleY(0.02); transform-origin: 50% 0; }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: scaleY(1); transform-origin: 50% 0; }
}

@keyframes look-unroll-item {
  from { opacity: 0; transform: scaleY(0) translateY(-0.4rem); transform-origin: 50% 0; }
  to   { opacity: 1; transform: scaleY(1) translateY(0); transform-origin: 50% 0; }
}

[data-theme="parchment"] {
  --enter-anim: look-unroll;
  --enter-time: 900ms;
  --enter-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --stagger-anim: look-unroll-item;
  --stagger-step: 90ms;
  --drawer-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --drawer-time: 620ms;
}

/* Nightclub: a bass pulse from the centre out. */
@keyframes look-bass-pulse {
  0%   { opacity: 0; transform: scale(0.86); filter: brightness(2.4) saturate(2); }
  45%  { opacity: 1; transform: scale(1.03); filter: brightness(1.35) saturate(1.4); }
  70%  { transform: scale(0.995); filter: brightness(1.05); }
  100% { opacity: 1; transform: scale(1); filter: none; }
}

@keyframes look-bass-item {
  from { opacity: 0; scale: 0.8; }
  60%  { opacity: 1; scale: 1.04; }
  to   { opacity: 1; scale: 1; }
}

[data-theme="nightclub"] {
  --enter-anim: look-bass-pulse;
  --enter-time: 620ms;
  --enter-ease: cubic-bezier(0.22, 1.4, 0.36, 1);
  --stagger-anim: look-bass-item;
  --stagger-step: 55ms;
  --drawer-ease: cubic-bezier(0.22, 1.4, 0.36, 1);
  --drawer-time: 420ms;
}

/* Typewriter and CRT: the image is struck onto the page left to right. */
@keyframes look-type-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes look-type-item {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

[data-theme="typewritter"] {
  --enter-anim: look-type-wipe;
  --enter-time: 700ms;
  --enter-ease: steps(24, end);
  --stagger-anim: look-type-item;
  --stagger-step: 110ms;
  --drawer-ease: steps(9, end);
  --drawer-time: 260ms;
}

/* CRT and Arcade: the tube warms up. */
@keyframes look-tube-on {
  0%   { opacity: 0; transform: scaleY(0.004) scaleX(1.1); filter: brightness(4); }
  35%  { opacity: 1; transform: scaleY(0.02) scaleX(1); filter: brightness(3); }
  70%  { transform: scaleY(1.02) scaleX(1); filter: brightness(1.5); }
  100% { opacity: 1; transform: scale(1); filter: none; }
}

[data-theme="crt"],
[data-theme="arcade"] {
  --enter-anim: look-tube-on;
  --enter-time: 640ms;
  --enter-ease: cubic-bezier(0.15, 0.85, 0.35, 1);
  --stagger-anim: look-item-rise;
  --stagger-step: 35ms;
  --drawer-ease: steps(6, end);
  --drawer-time: 200ms;
}

/* Cyberpunk, hologram, thermal: signal acquisition. */
@keyframes look-signal-lock {
  0%   { opacity: 0; transform: translateX(-1.5%) skewX(6deg); filter: hue-rotate(70deg) contrast(2); }
  30%  { opacity: 1; transform: translateX(1%) skewX(-3deg); }
  55%  { transform: translateX(-0.4%) skewX(1.5deg); filter: hue-rotate(20deg) contrast(1.3); }
  100% { opacity: 1; transform: none; filter: none; }
}

[data-theme="cyberpunk"],
[data-theme="hologram"],
[data-theme="thermal"] {
  --enter-anim: look-signal-lock;
  --enter-time: 480ms;
  --enter-ease: cubic-bezier(0.85, 0, 0.15, 1);
  --stagger-anim: look-item-rise;
  --stagger-step: 30ms;
  --drawer-ease: cubic-bezier(0.85, 0, 0.15, 1);
  --drawer-time: 180ms;
}

/* Luxury, museum, temple: a slow gallery reveal. */
@keyframes look-gallery-reveal {
  from { opacity: 0; transform: scale(1.035); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes look-gallery-item {
  from { opacity: 0; translate: 0 1.1rem; }
  to   { opacity: 1; translate: 0 0; }
}

[data-theme="luxury"],
[data-theme="museum"],
[data-theme="temple"],
[data-theme="citadel"],
[data-theme="fortress"],
[data-theme="vault"],
[data-theme="midcentury"] {
  --enter-anim: look-gallery-reveal;
  --enter-time: 900ms;
  --enter-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --stagger-anim: look-gallery-item;
  --stagger-step: 120ms;
  --drawer-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --drawer-time: 700ms;
}

/* Comic and origami: the panel is flipped into place. */
@keyframes look-panel-flip {
  from { opacity: 0; transform: perspective(1200px) rotateY(12deg) scale(0.94); }
  to   { opacity: 1; transform: perspective(1200px) rotateY(0) scale(1); }
}

@keyframes look-panel-item {
  from { opacity: 0; rotate: -3deg; scale: 0.9; }
  to   { opacity: 1; rotate: var(--tilt, 0deg); scale: 1; }
}

[data-theme="comic"],
[data-theme="origami"],
[data-theme="school"] {
  --enter-anim: look-panel-flip;
  --enter-time: 520ms;
  --enter-ease: cubic-bezier(0.43, 0.07, 0.2, 1.45);
  --stagger-anim: look-panel-item;
  --stagger-step: 70ms;
  --drawer-ease: cubic-bezier(0.43, 0.07, 0.2, 1.45);
  --drawer-time: 460ms;
}

/* Storm and deepsea: the view washes in. */
@keyframes look-wash-in {
  from { opacity: 0; transform: translateY(-2%) scale(1.02); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

[data-theme="storm"],
[data-theme="deepsea"],
[data-theme="starfield"],
[data-theme="vaporwave"] {
  --enter-anim: look-wash-in;
  --enter-time: 760ms;
  --enter-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --stagger-anim: look-gallery-item;
  --stagger-step: 80ms;
  --drawer-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --drawer-time: 560ms;
}

/* Lab, blueprint, tux: drafted in, no drama. */
[data-theme="lab"],
[data-theme="blueprint"],
[data-theme="tux"],
[data-theme="newspaper"] {
  --enter-anim: look-cross-fade;
  --enter-time: 260ms;
  --enter-ease: cubic-bezier(0.2, 0, 0, 1);
  --stagger-anim: look-item-rise;
  --stagger-step: 40ms;
  --drawer-ease: cubic-bezier(0.2, 0, 0, 1);
  --drawer-time: 220ms;
}

/**
 * Copyright © 2026 MENTIC LLC
 * Created by Matthew Quarneri
 *
 * Dual licensed under AGPL-3.0 or a MENTIC LLC commercial license.
 * See LICENSE for licensing terms.
 */
