/* Fremmy — a dark concrete room, one slot of rose light overhead. */

/* Fonts are served by Fremmy itself, so the page never waits on another site to draw. */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Until Archivo arrives, text is set in the visitor's own Arial, resized to take the same width and
   line height (measured against Liberation Sans, which has Arial's widths), so nothing jumps when it swaps in.
   The narrow headline (font-stretch 62%) gets its own, much smaller, face. */
@font-face { font-family: 'Archivo Fallback'; font-weight: 400 500; font-stretch: 100%;
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Arimo');
  size-adjust: 97.6%; ascent-override: 89.9%; descent-override: 21.5%; line-gap-override: 0%; }
@font-face { font-family: 'Archivo Fallback'; font-weight: 600 900; font-stretch: 100%;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Arimo Bold');
  size-adjust: 93.5%; ascent-override: 93.9%; descent-override: 22.5%; line-gap-override: 0%; }
@font-face { font-family: 'Archivo Fallback'; font-weight: 400 900; font-stretch: 50% 75%;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'), local('Arimo Bold');
  size-adjust: 68%; ascent-override: 129.1%; descent-override: 30.9%; line-gap-override: 0%; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/plex-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/plex-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/plex-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/plex-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --void: #0f0e0e;
  --slab-hi: #6b6663;
  --slab: #4a4644;
  --slab-lo: #2b2928;
  --ink: #f0eae6;
  --ink-soft: #beb6b1;
  --ink-faint: #8d8681;
  --dark: #1b1918;
  --rose: #e79eac;
  --rose-fill: #b25a70;
  --blush: #f3d3d8;
  --line: rgba(240, 234, 230, .16);
  --lx: 50%; /* where the overhead light sits, left to right */

  --display: 'Archivo', 'Archivo Fallback', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .011' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 -.28'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='.5'/%3E%3C/svg%3E");

  --W: min(84vw, 390px);
  --H: min(calc(100svh - 178px), 640px);
  --T: 30px;
  --R: calc(var(--W) * .866 + 46px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--void); overflow-x: clip; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font: 400 15px/1.5 var(--display);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

.mono, .plate, .bar__status, .slot label, .btn, .no, .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cut { color: rgba(240, 234, 230, .94); text-shadow: 0 2px 3px rgba(0, 0, 0, .65); }

/* ---- the room ------------------------------------------------------------
   One world, one light. The room shares its vanishing point (--vx, --vy) and its perspective
   distance with the stage the monoliths stand on, so they stand on this floor, not in front of it.
   The script measures the monolith and sets, in viewport pixels:
     --fy  floor height (the foot of the monolith)      --cy  ceiling height
     --rh  room height                                  --lxp where the light runs, left to right
   The light is a slot cut along the ceiling, running from behind the viewer into the depth,
   directly above the monolith. Everything bright or dark in the room follows from that line. */
:root { --P: 1500px; --D: 1600px; --F: 600px; }
.room {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #030303;
  perspective: var(--P); perspective-origin: var(--vx, 50vw) var(--vy, 44vh);
}
.room__box { position: absolute; inset: 0; transform-style: preserve-3d; }
.room__box > i {
  position: absolute;
  --holes: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .85) 0 4.5px, rgba(255, 255, 255, .08) 5px 6.5px, transparent 7px) 0 0 / 360px 240px;
  --seam-v: linear-gradient(90deg, transparent calc(50% - 1px), rgba(0, 0, 0, .5) 50%, transparent calc(50% + 1px)) 180px 0 / 360px 100%;
  --seam-h: linear-gradient(0deg, transparent calc(50% - 1px), rgba(0, 0, 0, .42) 50%, transparent calc(50% + 1px)) 0 120px / 100% 240px;
  --reach: calc(var(--rh, 96vh) * .62); /* how far sideways the light spreads by the time it reaches the floor */
}
.room__floor { /* top edge far, bottom edge behind the viewer; brightest in a band under the slot */
  left: 0; right: 0; top: 0; height: calc(var(--D) + var(--F));
  transform-origin: 50% 0; transform: translateY(var(--fy, 88vh)) translateZ(calc(var(--D) * -1)) rotateX(90deg);
  background:
    var(--grain),
    linear-gradient(90deg, transparent calc(50% - 1.5px), rgba(0, 0, 0, .55) 50%, transparent calc(50% + 1.5px)) 0 0 / 280px 100%,
    linear-gradient(0deg, transparent calc(50% - 1.5px), rgba(0, 0, 0, .55) 50%, transparent calc(50% + 1.5px)) 0 0 / 100% 280px,
    linear-gradient(180deg, #080707, #1d1b1a 55%, #2f2c2b);
}
.room__ceil { /* top edge behind the viewer, bottom edge far; it gets no direct light at all */
  left: 0; right: 0; top: 0; height: calc(var(--D) + var(--F));
  transform-origin: 50% 0; transform: translateY(var(--cy, 0px)) translateZ(var(--F)) rotateX(-90deg);
  background: var(--grain), var(--seam-v), linear-gradient(180deg, #161514, #0b0a0a 60%, #040404);
}
.room__left, .room__right { top: 0; height: var(--rh, 96vh); width: calc(var(--D) + var(--F)); }
.room__left { /* left edge behind the viewer, right edge far. --wl: how much light reaches this wall */
  left: 0; transform-origin: 0 50%; transform: translateY(var(--cy, 0px)) translateZ(var(--F)) rotateY(90deg);
  background: var(--grain), var(--holes), var(--seam-v), var(--seam-h),
    linear-gradient(90deg, transparent 30%, rgba(0, 0, 0, .7)),
    linear-gradient(rgb(0 0 0 / calc(.8 - var(--wl, .5) * .8)), rgb(0 0 0 / calc(.8 - var(--wl, .5) * .8))),
    linear-gradient(180deg, #2a2726, #4a4543 34%, #2e2b2a 72%, #171514);
}
.room__right {
  right: 0; transform-origin: 100% 50%; transform: translateY(var(--cy, 0px)) translateZ(var(--F)) rotateY(-90deg);
  background: var(--grain), var(--holes), var(--seam-v), var(--seam-h),
    linear-gradient(270deg, transparent 30%, rgba(0, 0, 0, .7)),
    linear-gradient(rgb(0 0 0 / calc(.8 - var(--wr, .5) * .8)), rgb(0 0 0 / calc(.8 - var(--wr, .5) * .8))),
    linear-gradient(180deg, #2a2726, #4a4543 34%, #2e2b2a 72%, #171514);
}
.room__back { /* the far wall, lit only by the far end of the slot */
  left: 0; right: 0; top: 0; height: var(--rh, 96vh); transform: translateY(var(--cy, 0px)) translateZ(calc(var(--D) * -1));
  background: var(--grain), var(--holes), var(--seam-v), var(--seam-h), var(--cloud),
    radial-gradient(ellipse var(--reach) 90% at var(--lxp, 50vw) 0%, #4a4543, #232120 60%, #0d0c0c);
}
/* The light is drawn twice, as two complete rigs (slot, falling wedge, pool on the floor, wash on the far
   wall), each in one fixed colour. Changing the light paints the hidden rig once in the new colour and
   cross-fades to it. Nothing else in the room is ever redrawn, so turning the monoliths stays smooth. */
.rig { opacity: 0; transition: opacity 1.1s ease; will-change: opacity; pointer-events: none; --c: var(--ca, #ffd6df); --o: 0px; }
.rig-b { --c: var(--cb, #ffd6df); --o: 1.5px; } /* the second rig sits a hair off the first so they never fight for the same plane */
.room[data-rig=a] .rig-a, .room[data-rig=b] .rig-b { opacity: 1; }
.rig__slot { /* a transparent sheet just under the ceiling carrying the slot */
  left: 0; right: 0; top: 0; height: calc(var(--D) + var(--F));
  transform-origin: 50% 0; transform: translateY(calc(var(--cy, 0px) + 1px + var(--o))) translateZ(var(--F)) rotateX(-90deg);
}
.rig__slot::before {
  content: ''; position: absolute; top: 0; bottom: 5%; left: 0; width: 44px; transform: translateX(calc(var(--lxp, 50vw) - 22px));
  background: color-mix(in srgb, var(--c) 42%, #fff);
  box-shadow: 0 0 50px 18px color-mix(in srgb, var(--c) 70%, transparent), 0 0 190px 80px color-mix(in srgb, var(--c) 30%, transparent);
}
.rig__pool { /* the band it lights on the floor */
  left: 0; right: 0; top: 0; height: calc(var(--D) + var(--F));
  transform-origin: 50% 0; transform: translateY(calc(var(--fy, 88vh) - 1px - var(--o))) translateZ(calc(var(--D) * -1)) rotateX(90deg);
  background: linear-gradient(90deg, transparent calc(var(--lxp, 50vw) - var(--reach)), color-mix(in srgb, var(--c) 36%, transparent) calc(var(--lxp, 50vw) - var(--reach) * .35), color-mix(in srgb, var(--c) 58%, transparent) var(--lxp, 50vw), color-mix(in srgb, var(--c) 36%, transparent) calc(var(--lxp, 50vw) + var(--reach) * .35), transparent calc(var(--lxp, 50vw) + var(--reach)));
}
.rig__wall { /* and the colour it throws on the far wall */
  left: 0; right: 0; top: 0; height: var(--rh, 96vh);
  transform: translateY(var(--cy, 0px)) translateZ(calc(var(--D) * -1 + 3px + var(--o)));
  background: radial-gradient(ellipse calc(var(--reach) * 1.3) 100% at var(--lxp, 50vw) 0%, color-mix(in srgb, var(--c) 34%, transparent), transparent 78%);
}
.rig__ray { /* the light hanging in the dusty air: one slice of the falling wedge at each depth */
  top: 0; height: var(--rh, 96vh);
  left: 0; width: calc(var(--rh, 96vh) * 1.4);
  transform: translate(calc(var(--lxp, 50vw) - var(--rh, 96vh) * .7), var(--cy, 0px)) translateZ(calc(var(--z) + var(--o)));
  background: conic-gradient(from 148deg at 50% 0%, transparent 0deg, color-mix(in srgb, var(--c) 13%, transparent) 18deg, color-mix(in srgb, var(--c) 25%, transparent) 32deg, color-mix(in srgb, var(--c) 13%, transparent) 46deg, transparent 64deg);
  -webkit-mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, .3)); mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, .3));
}
.room__amb { /* the room as a whole picks up the colour */
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.1s ease; will-change: opacity;
  background: radial-gradient(ellipse 75% 85% at var(--lxp, 50vw) 28%, color-mix(in srgb, var(--c) 17%, transparent), transparent 74%);
}
.amb-a { --c: var(--ca, #ffd6df); } .amb-b { --c: var(--cb, #ffd6df); }
.room[data-rig=a] .amb-a, .room[data-rig=b] .amb-b { opacity: 1; }
.room__sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; } /* weather and dust, behind the monoliths */

/* ---- bar --------------------------------------------------------------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 12px;
}
.mark {
  font: 900 21px/1 var(--display); font-stretch: 125%; letter-spacing: .2em;
  color: var(--ink); text-decoration: none; text-shadow: 0 3px 8px rgba(0, 0, 0, .7);
}
.bar .btn { margin-left: auto; }
.bar__status { margin-left: 4px; padding-left: 16px; border-left: 1px solid var(--line); color: var(--ink-faint); font-size: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 0; text-decoration: none;
  background: var(--ink); color: var(--dark);
  box-shadow: 0 10px 16px -8px rgba(0, 0, 0, .8);
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--rose); }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(240, 234, 230, .7); }
.btn--line:hover { background: var(--ink); color: var(--dark); }
.btn--rose { background: var(--rose-fill); color: #fff; box-shadow: inset 0 1.5px 0 rgba(255, 220, 228, .45), 0 10px 16px -8px rgba(0, 0, 0, .8); }
.btn--rose:hover { background: var(--ink); color: var(--dark); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---- home -------------------------------------------------------------- */
.home {
  min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(20px, 5vw, 80px);
  max-width: 1240px; margin: 0 auto;
  padding: 96px clamp(16px, 5vw, 56px) 48px;
}
.home h1 {
  font: 800 clamp(64px, min(11.5vw, 17svh), 172px)/.84 var(--display);
  font-stretch: 62%; text-transform: uppercase; letter-spacing: -.012em;
  color: #e9e2de;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5), 0 8px 22px rgba(0, 0, 0, .5);
}
.home h1 { white-space: nowrap; } /* two lines by design, whatever font is showing */
.home h1 em { font-style: normal; color: var(--rose); }
.home__lede { max-width: 34ch; margin-top: 28px; font-size: 17px; line-height: 1.45; color: var(--ink-soft); }

.slot {
  position: relative; max-width: 420px; margin-top: clamp(20px, 4svh, 36px); padding: 14px 16px 16px;
  background: var(--grain), linear-gradient(180deg, var(--slab-hi), var(--slab) 45%, var(--slab-lo));
  box-shadow: inset 0 2px 0 rgba(255, 236, 240, .32), inset 0 -3px 0 rgba(0, 0, 0, .4), 0 34px 30px -18px rgba(0, 0, 0, .9);
}
.slot label { display: block; margin-bottom: 8px; color: var(--ink-soft); }
.slot input {
  width: 100%; height: 52px; padding: 0 16px;
  border: 0; border-radius: 0; outline-offset: 0;
  background: rgba(0, 0, 0, .42);
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(255, 255, 255, .1);
  font-size: 17px; font-weight: 500;
}
.slot input::placeholder { color: rgba(240, 234, 230, .38); }
.slot__results {
  position: absolute; inset: calc(100% - 16px) 16px auto 16px; z-index: 4;
  background: #252322; box-shadow: 0 24px 34px -10px rgba(0, 0, 0, .9);
  max-height: 46dvh; overflow-y: auto;
}
.slot__results:empty { display: none; }
.hit {
  display: block; width: 100%; padding: 11px 16px; text-align: left;
  border: 0; border-top: 1px solid var(--line); background: none;
}
.hit:hover, .hit:focus-visible { background: rgba(255, 255, 255, .09); }
.hit b { display: block; font-weight: 700; font-size: 15px; line-height: 1.25; }
.hit span { font: 400 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.hit i { float: right; font: 500 11px var(--mono); font-style: normal; color: var(--rose); margin-left: 10px; }

.home__stage { display: grid; place-items: center; perspective: var(--P); perspective-origin: calc(var(--vx, 50vw) - var(--stx, 0px)) calc(var(--vy, 44vh) - var(--sty, 0px)); }
/* The stone is flat (its face stays sharp); its sides and floor shadow are .monolith-depth, a 3D twin in the
   same grid cell, turned by the same rules and drawn underneath. */
.monolith, .monolith-depth {
  grid-area: 1 / 1; position: relative;
  width: min(100%, 370px); height: min(calc(100svh - 190px), 640px); min-height: 440px;
  transform: rotateY(-17deg);
  transition: transform .9s cubic-bezier(.2, .7, .1, 1);
}
.monolith { z-index: 1; }
.monolith-depth { z-index: 0; transform-style: preserve-3d; pointer-events: none; }
.monolith.is-busy, .monolith.is-picking,
.monolith.is-busy + .monolith-depth, .monolith.is-picking + .monolith-depth { transform: rotateY(-4deg); }

/* shared slab construction: a front face, two side faces, a shadow on the floor.
   Every slab is lit from directly above: bright at the head, dark at the foot. */
.face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 22px 22px 20px;
  background:
    var(--grain), var(--cloud),
    linear-gradient(180deg, rgba(255, 236, 240, .1), transparent 24%),
    linear-gradient(90deg, transparent 49.7%, rgba(0, 0, 0, .16) 50%, transparent 50.3%) 0 0 / 33.34% 100%,
    linear-gradient(180deg, var(--slab-hi), var(--slab) 34%, var(--slab-lo));
  box-shadow: inset 0 2px 0 rgba(255, 240, 243, .4), inset 0 -3px 0 rgba(0, 0, 0, .45), inset 1px 0 0 rgba(255, 255, 255, .07);
}
.face::before { /* four tie holes */
  content: ''; position: absolute; inset: 9px; pointer-events: none;
  --hole: radial-gradient(circle, rgba(0, 0, 0, .85) 0 2.6px, rgba(255, 255, 255, .14) 3px 3.8px, transparent 4.2px);
  background: var(--hole) 0 0 / 9px 9px no-repeat, var(--hole) 100% 0 / 9px 9px no-repeat,
              var(--hole) 0 100% / 9px 9px no-repeat, var(--hole) 100% 100% / 9px 9px no-repeat;
}
.slab .face { -webkit-backface-visibility: hidden; backface-visibility: hidden; isolation: isolate; }
.shade { /* a slab turned away from the light falls into shadow: its own layer, so only its opacity ever changes */
  position: absolute; inset: 0; pointer-events: none; background: #050505; opacity: 0; will-change: opacity;
  -webkit-backface-visibility: hidden; backface-visibility: hidden; transform: translateZ(.6px);
}
.rear { /* the back of a slab, seen across the ring */
  position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  transform: translateZ(calc(var(--T) * -1)) rotateY(180deg);
  background: var(--grain), linear-gradient(180deg, #2b2928, #141312 45%, #060606);
  box-shadow: inset 0 2px 0 rgba(255, 236, 240, .18);
}
.side {
  position: absolute; top: 0; bottom: 0; width: var(--T);
  background: var(--grain), linear-gradient(180deg, #3b3837, #1f1d1c 40%, #0f0e0e);
}
.side--l { left: 0; transform-origin: 0 50%; transform: rotateY(90deg); }
.side--r { right: 0; transform-origin: 100% 50%; transform: rotateY(-90deg); background: var(--grain), linear-gradient(180deg, #474342, #262423 40%, #121111); }
.floor-shadow { /* cast on the floor, away from the face: the slab blocks the part of the slot behind it.
   Slabs turned sideways throw theirs outward, away from the line of light. */
  position: absolute; left: -5%; right: -5%; bottom: 0; height: 340px; pointer-events: none;
  transform-origin: 50% 100%; transform: translateY(calc(var(--i, 0) * -.8px)) rotateX(-90deg); /* each on its own level: overlapping shadows never share a plane */
  background: radial-gradient(52% 100% at 50% 100%, rgba(0, 0, 0, .9), rgba(0, 0, 0, .55) 38%, rgba(0, 0, 0, .18) 68%, transparent 88%);
}
.monolith .face {
  background:
    var(--grain), var(--cloud),
    linear-gradient(180deg, rgba(255, 236, 240, .2), transparent 20%),
    linear-gradient(90deg, transparent 49.7%, rgba(40, 8, 18, .2) 50%, transparent 50.3%) 0 0 / 33.34% 100%,
    linear-gradient(180deg, #e9afbb, #c97c8d 20%, #8f4a5d 58%, #4d2030);
  box-shadow: inset 0 2px 0 rgba(255, 240, 243, .6), inset 0 -3px 0 rgba(0, 0, 0, .45);
}
.monolith-depth .side { background: var(--grain), linear-gradient(180deg, #8a4a5b, #4f2231 40%, #26101a); }

.plate { display: flex; justify-content: space-between; padding: 0 14px; color: rgba(52, 16, 27, .85); }
.monolith__note { margin-top: 16px; padding: 0 14px; font-size: 13px; line-height: 1.4; color: rgba(243, 211, 216, .82); }

.niche {
  position: relative; flex: 1; min-height: 0; margin: 18px 14px 0; padding: 0;
  display: grid; place-items: center; overflow: hidden;
  border: 0; border-radius: 0;
  background: linear-gradient(180deg, #0d0509, #1d0b12 30%, #3a1723);
  box-shadow: inset 0 18px 30px rgba(0, 0, 0, .9), inset 0 -1px 0 rgba(255, 220, 228, .22), 0 1px 0 rgba(255, 225, 232, .3);
  color: var(--blush); text-align: center;
}
.niche:hover .niche__idle strong { letter-spacing: .1em; }
.niche__idle strong {
  display: block; font: 700 clamp(26px, 6vw, 34px)/.95 var(--display); font-stretch: 62%;
  text-transform: uppercase; letter-spacing: .06em; transition: letter-spacing .35s;
}
.niche__idle small { display: block; margin-top: 10px; font: 400 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .78; }
.niche__idle::before { content: ''; display: block; width: 1.5px; height: 54px; margin: 0 auto 18px; background: var(--blush); box-shadow: 0 0 12px 2px rgba(255, 190, 204, .5); }
.niche__busy { display: none; position: relative; z-index: 2; padding: 8px 12px; background: rgba(20, 6, 11, .82); font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.niche img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.is-busy .niche__idle, .has-photo .niche__idle { display: none; }
.is-busy .niche__busy { display: block; }
.is-busy .niche::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 1;
  background: #ffd9e0; box-shadow: 0 0 22px 7px rgba(255, 190, 204, .75);
  animation: sweep 1.5s cubic-bezier(.45, 0, .55, 1) infinite alternate;
}
@keyframes sweep { to { transform: translateY(min(calc(100dvh - 330px), 500px)); } }

.is-picking .niche { flex: 0 0 132px; }
.picker { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 14px 14px 0; }
.picker__title { font: 700 21px/1.05 var(--display); font-stretch: 70%; text-transform: uppercase; color: #fff; text-shadow: 0 2px 4px rgba(40, 8, 18, .7); }
.picker ul { flex: 1; min-height: 0; overflow-y: auto; margin: 10px 0; background: rgba(18, 6, 10, .55); box-shadow: inset 0 8px 14px rgba(0, 0, 0, .55); }
.picker .hit:first-child { border-top: 0; }
.is-picking .monolith__note { display: none; }

/* ---- result: the ring of monoliths ------------------------------------- */
.result { position: fixed; inset: 0; padding-top: 64px; display: flex; flex-direction: column; overflow: hidden; }
.stage {
  flex: 1; min-height: 0; display: grid; place-items: center;
  perspective: var(--P); perspective-origin: calc(var(--vx, 50vw) - var(--stx, 0px)) calc(var(--vy, 44vh) - var(--sty, 0px));
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  cursor: grab;
}
.stage.is-dragging { cursor: grabbing; }
.ring {
  position: relative; width: var(--W); height: var(--H);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--R) * -1)) rotateY(var(--angle, 0deg));
  will-change: transform;
}
.slab {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--i) * 60deg)) translateZ(var(--R));
}
.slab .face { cursor: auto; user-select: text; -webkit-user-select: text; }
/* Do not rely on the browser sorting the ring in 3D: a phone short on graphics memory may flatten it and then
   paint every slab in page order, backs over fronts. The script marks the slabs turned away from the viewer. */
.slab:not(.is-away) .rear, .slab.is-away > .face { visibility: hidden; }

.slab__head, .slab__body { position: relative; z-index: 1; }
.slab__head { padding: 0 12px 12px; border-bottom: 1.5px solid rgba(240, 234, 230, .5); box-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.no { display: flex; justify-content: space-between; color: var(--ink-soft); }
.slab__head h2 {
  margin-top: 6px;
  font: 800 clamp(46px, 13.5vw, 62px)/.86 var(--display); font-stretch: 62%;
  text-transform: uppercase; letter-spacing: -.005em;
}
.slab__body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 12px 4px; scrollbar-width: thin; scrollbar-color: rgba(240, 234, 230, .32) transparent;
}
.lead { font: 600 19px/1.2 var(--display); font-stretch: 82%; }
.lead b { color: var(--accent, var(--rose)); font-weight: 800; }
.fine { font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); }
.fine b { color: var(--rose); }
.label { font: 500 10.5px var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-soft); }
.empty { padding: 26px 0; font-size: 14.5px; color: var(--ink-soft); }

/* identity: the bottle stands in a lit niche */
.id-photo, .bottle {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #080707, #171514 62%, #262322);
  box-shadow: inset 0 18px 30px rgba(0, 0, 0, .95), inset 0 -1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .12);
}
.id-photo { height: clamp(120px, 27dvh, 220px); display: grid; place-items: center; }
.id-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.id-photo span { font: 900 110px/1 var(--display); font-stretch: 62%; color: rgba(231, 158, 172, .5); text-shadow: 0 14px 18px rgba(0, 0, 0, .8); }
.id-photo.is-loading span { animation: breathe 1.3s ease-in-out infinite alternate; } /* the picture is on its way */
@keyframes breathe { from { opacity: .35; } to { opacity: .8; } }

.bottle {
  height: clamp(170px, 35dvh, 300px);
  perspective: 720px; perspective-origin: 50% 40%;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.bottle:active { cursor: grabbing; }
.bottle__spot { /* light from the room reaches the shelf, not the top of the recess */
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 34%), /* the overhang keeps the top of the recess dark */
    radial-gradient(ellipse 60% 16% at 50% calc(100% - 18px), rgba(255, 216, 224, .22), transparent 72%);
}
.bottle__obj {
  position: absolute; left: 50%; bottom: 22px; height: calc(100% - 50px);
  transform-style: preserve-3d; transform-origin: 0 60%;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateX(-50%);
  will-change: transform;
}
.bottle__layer { /* stacked copies give the cut-out a real edge when it turns */
  display: block; height: 100%; width: auto; max-width: none;
  transform: translateZ(calc(var(--z) * -1.7px));
  pointer-events: none; -webkit-user-drag: none;
}
.bottle__layer + .bottle__layer { position: absolute; inset: 0; width: 100%; filter: brightness(.32); }
.bottle__glint { /* overhead light on the glass, and a highlight that slides as it turns */
  position: absolute; inset: 0; pointer-events: none; transform: translateZ(.5px);
  -webkit-mask: var(--img) center / 100% 100% no-repeat; mask: var(--img) center / 100% 100% no-repeat;
  background:
    linear-gradient(100deg, transparent calc(var(--g, 50%) - 16%), rgba(255, 255, 255, .5) var(--g, 50%), transparent calc(var(--g, 50%) + 16%)),
    linear-gradient(180deg, rgba(255, 232, 238, .34), transparent 30%, rgba(0, 0, 0, .46));
}
.bottle__shadow {
  position: absolute; left: 50%; bottom: 9px; width: 52%; height: 20px; pointer-events: none;
  transform: translateX(calc(-50% + var(--sx, 0px)));
  background: radial-gradient(ellipse, rgba(0, 0, 0, .95), rgba(0, 0, 0, .5) 45%, transparent 72%);
}
.bottle__hint { position: absolute; right: 10px; top: 8px; font: 400 9.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); transition: opacity .5s; }
.bottle.is-touched .bottle__hint { opacity: 0; }

.id-brand { margin-top: 16px; color: var(--rose); font-weight: 500; }
.id-name { margin-top: 4px; font: 800 clamp(26px, 7.4vw, 34px)/1 var(--display); font-stretch: 78%; text-wrap: balance; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin: 16px 0 0; font-size: 13.5px; }
.facts dt { font: 500 10.5px/1.9 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 500; }
.price { display: flex; flex-wrap: wrap; gap: 0 14px; }
.price span { white-space: nowrap; font-weight: 400; color: var(--ink-soft); }
.price b { font-weight: 600; color: var(--ink); }
.price__note { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; font-weight: 400; color: var(--ink-faint); }
.price__link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-faint); }
.price__link:hover { color: var(--rose); }
.alike__from { font-style: normal; white-space: nowrap; color: var(--ink); }
.credit { margin-top: 12px; font-size: 11.5px; color: var(--ink-faint); }
.credit a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-faint); }
.credit a:hover { color: var(--rose); }
.verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.verdict p { flex: 1 1 100%; }
.verdict .btn { min-height: 38px; padding: 0 14px; }

/* notes: three pours, each casting a shadow on the one below */
.pours { box-shadow: 0 22px 22px -14px rgba(0, 0, 0, .85); }
.pour { display: grid; grid-template-columns: 58px 1fr; position: relative; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3); }
.pour + .pour { box-shadow: inset 0 9px 10px -6px rgba(0, 0, 0, .55); }
.pour dt {
  display: grid; place-items: center; padding: 14px 0;
  font: 800 13px var(--display); font-stretch: 125%; letter-spacing: .14em; text-transform: uppercase;
  writing-mode: vertical-rl; transform: rotate(180deg);
}
.pour dd { margin: 0; padding: 14px 12px 14px 14px; font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.pour--top { background: #f0cdd3; color: #2c1119; }
.pour--heart { background: #c97c8d; color: #25090f; }
.pour--base { background: #57222f; color: var(--blush); }
.bars { margin-top: 18px; display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.bar-row i { display: block; height: 10px; background: linear-gradient(180deg, #f0eae6, #a8a09b); width: calc(var(--v) * 1%); box-shadow: 0 6px 6px -2px rgba(0, 0, 0, .7); }
.bar-row:first-child i { background: linear-gradient(180deg, #f3b5c1, var(--rose-fill)); }

/* season: four pillars under the light, shadows at their feet */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: clamp(130px, 25dvh, 190px); margin-top: 22px; border-bottom: 2px solid var(--ink); box-shadow: 0 16px 14px -10px rgba(0, 0, 0, .9); }
.pillar { position: relative; height: calc(var(--v) * 1%); min-height: 8px; background: var(--grain), linear-gradient(180deg, #d9d2cd, #8c8580 26%, #48433f); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6); }
.pillar.is-top { background: var(--grain), linear-gradient(180deg, var(--accent-hi, #f6c3cd), var(--accent, #cf7d90) 30%, var(--accent-lo, #7b3549)); }
.pillar b { position: absolute; left: 0; right: 0; top: -19px; text-align: center; font: 500 11px var(--mono); }
.pillar-names { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 9px; text-align: center; }
.beam { display: flex; height: 38px; margin-top: 8px; font: 500 11px/38px var(--mono); letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 16px 14px -10px rgba(0, 0, 0, .9); }
.beam span { padding: 0 10px; white-space: nowrap; overflow: hidden; min-width: 0; }
.beam .day { background: linear-gradient(180deg, #fbe6e9, #e2b3bc); color: #2c1119; }
.beam .night { background: linear-gradient(180deg, #1c1a19, #080707); color: var(--blush); text-align: right; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }

/* occasion */
.occ { display: grid; gap: 0; margin-top: 14px; }
.occ li { padding: 11px 0; border-top: 1px solid var(--line); }
.occ li div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.occ strong { font: 700 17px/1.1 var(--display); font-stretch: 82%; }
.occ li:first-child strong { color: var(--rose); }
.occ em { font: 500 11px var(--mono); font-style: normal; color: var(--ink-soft); }
.occ p { font-size: 12.5px; color: var(--ink-soft); }
.occ i { display: block; height: 4px; margin-top: 7px; width: calc(var(--v) * 1%); background: var(--ink); box-shadow: 0 5px 5px -1px rgba(0, 0, 0, .7); }
.occ li:first-child i { background: var(--rose); }

/* reviews */
.rev-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rev-top .lead span { font: 500 11px var(--mono); color: var(--ink-soft); letter-spacing: .1em; }
.review { display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.review:first-child { margin-top: 14px; }
.review img { width: 62px; height: 78px; object-fit: cover; background: #171514; box-shadow: 0 10px 12px -6px rgba(0, 0, 0, .85); }
.review h3 { font: 700 14.5px/1.2 var(--display); }
.review p { margin-top: 5px; font-size: 13.5px; line-height: 1.42; overflow-wrap: anywhere; }
.stars { font: 400 12px var(--mono); letter-spacing: .12em; color: var(--rose); }
.tag { display: inline-block; margin-top: 6px; padding: 2px 7px; font-size: 9.5px; background: var(--rose); color: #25090f; }
.tag--plain { background: none; box-shadow: inset 0 0 0 1px var(--ink-faint); color: var(--ink-soft); }

.form { display: grid; gap: 13px; }
.field label, .field legend { display: block; margin-bottom: 5px; padding: 0; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field input[type=text], .field input[type=email], .field input[type=password], .field textarea, .where-form input, .rate button {
  border: 0; border-radius: 0;
  background: rgba(0, 0, 0, .4);
  box-shadow: inset 0 6px 9px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(255, 255, 255, .1);
}
.field input[type=text], .field input[type=email], .field input[type=password], .field textarea { width: 100%; padding: 11px 12px; resize: vertical; font-size: 16px; }
.rate { display: flex; gap: 6px; }
.rate button { width: 44px; height: 44px; padding: 0; font: 700 15px var(--display); }
.rate button[aria-pressed=true] { background: var(--rose-fill); color: #fff; box-shadow: inset 0 1.5px 0 rgba(255, 220, 228, .45), 0 8px 10px -6px rgba(0, 0, 0, .8); }
.proof { display: flex; align-items: center; gap: 12px; }
.proof img { width: 54px; height: 68px; object-fit: cover; }
.form__row { display: flex; gap: 8px; flex-wrap: wrap; }
.msg { font-size: 13px; font-weight: 600; color: var(--rose); }

/* where */
.where-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.where-form input { min-width: 0; height: 44px; padding: 0 12px; font-size: 16px; }
.where-form input::placeholder { color: rgba(240, 234, 230, .4); }
.where-form .btn--rose { grid-column: 1 / -1; }
.radar { display: block; width: 100%; max-width: 250px; margin: 16px auto 4px; }
.shop { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.shop strong { font: 700 15px/1.2 var(--display); }
.shop em { font: 500 12px var(--mono); font-style: normal; color: var(--ink-soft); }
.shop span { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-soft); }
.shop .why { font-weight: 600; color: var(--ink); }
.shop .why--sure { color: var(--rose); }
.shop__acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.shop__acts a, .shop__acts button {
  min-height: 34px; padding: 0; border: 0; background: none; display: inline-flex; align-items: center;
  font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--ink-faint);
}
.shop__acts a:hover, .shop__acts button:hover { color: var(--rose); }
.shop__acts button[disabled] { color: var(--rose); text-decoration: none; cursor: default; }

/* tie-hole navigation */
.ties {
  display: flex; justify-content: center; gap: clamp(2px, 1.6vw, 14px);
  padding: 8px 12px max(14px, env(safe-area-inset-bottom));
}
.ties button {
  display: grid; justify-items: center; gap: 6px; min-width: 50px; min-height: 48px; padding: 6px 2px;
  border: 0; background: none;
  font: 500 9.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(240, 234, 230, .55);
}
.ties button::before {
  content: ''; width: 15px; height: 15px; border-radius: 50%;
  background: #050505; box-shadow: inset 0 4px 5px #000, 0 1px 0 rgba(255, 255, 255, .16);
  transition: background .3s, box-shadow .3s;
}
.ties button[aria-current=true] { color: #fff; }
.ties button[aria-current=true]::before { background: var(--rose); box-shadow: inset 0 -2px 3px rgba(120, 40, 60, .5), 0 0 18px 4px rgba(240, 170, 186, .6); }

.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 9; transform: translate(-50%, 20px);
  max-width: min(92vw, 420px); padding: 12px 18px; background: var(--ink); color: var(--dark);
  box-shadow: 0 18px 26px -10px rgba(0, 0, 0, .9);
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---- every monolith has an effect of its own ---------------------------------
   --mine is the colour of light a monolith calls for. While it stands in front, the room takes
   that colour and the stone shows its effect; turned away it is plain concrete again. */
.slab { --mine: #ffd6df; }
.slab[data-fx=snow] { --mine: #b4d6ff; }      .slab[data-fx=petals], .slab[data-fx=bloom] { --mine: #ffbdd3; }
.slab[data-fx=pollen], .slab[data-fx=sun] { --mine: #ffd27a; }   .slab[data-fx=leaves] { --mine: #ffa85e; }
.slab[data-fx=smoke] { --mine: #c8bdb5; }     .slab[data-fx=embers] { --mine: #ff9357; }
.slab[data-fx=amber] { --mine: #ffc66e; }     .slab[data-fx=mist], .slab[data-fx=cool] { --mine: #a9e2f0; }
.slab[data-fx=club] { --mine: #ff8fd2; }      .slab[data-fx=candle] { --mine: #ffb878; }
.slab[data-fx=gala] { --mine: #ffdf9c; }      .slab[data-fx=daylight] { --mine: #e6edf8; }
.slab[data-fx=echo] { --mine: #f7d9c0; }      .slab[data-fx=beacons] { --mine: #9defd8; }

.fx, .tint { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity 1s ease; will-change: opacity; }
.slab.is-front .fx, .slab.is-front .tint { opacity: 1; } /* an effect lives only while its monolith is the one in front */
.fx::before, .fx::after { content: ''; position: absolute; }
.fx, .fx::before, .fx::after { animation-play-state: paused; } /* and only moves while it is */
.slab.is-front .fx, .slab.is-front .fx::before, .slab.is-front .fx::after { animation-play-state: running; }
.tint { /* the stone takes the colour of the light falling on it */
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--mine) 80%, transparent), transparent 2.5px),
    linear-gradient(180deg, color-mix(in srgb, var(--mine) 30%, transparent), color-mix(in srgb, var(--mine) 7%, transparent) 46%, transparent 78%);
}

:root {
  --frost: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.07 .16' numOctaves='5' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .95 0 0 0 0 1 0 0 0 3.4 -1.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --leafpile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 60'%3E%3Cdefs%3E%3Cpath id='l' d='M0 0Q9-10 26 0Q9 10 0 0Z'/%3E%3C/defs%3E%3Cg%3E%3Cuse href='%23l' fill='%238e3d18' transform='translate(20 34) rotate(-30) scale(1.1)'/%3E%3Cuse href='%23l' fill='%23c9762e' transform='translate(70 30) rotate(18)'/%3E%3Cuse href='%23l' fill='%23a5481c' transform='translate(132 33) rotate(-12) scale(1.15)'/%3E%3Cuse href='%23l' fill='%23dc9440' transform='translate(190 31) rotate(26)'/%3E%3Cuse href='%23l' fill='%238e3d18' transform='translate(244 34) rotate(-20) scale(1.1)'/%3E%3Cuse href='%23l' fill='%23b4541f' transform='translate(4 50) rotate(-18) scale(1.25)'/%3E%3Cuse href='%23l' fill='%23d98a3a' transform='translate(34 54) rotate(9) scale(1.2)'/%3E%3Cuse href='%23l' fill='%23e3a851' transform='translate(64 49) rotate(-34) scale(1.3)'/%3E%3Cuse href='%23l' fill='%23c26a28' transform='translate(98 55) rotate(22) scale(1.2)'/%3E%3Cuse href='%23l' fill='%23e3a851' transform='translate(128 52) rotate(-8) scale(1.3)'/%3E%3Cuse href='%23l' fill='%23a5481c' transform='translate(164 55) rotate(14) scale(1.2)'/%3E%3Cuse href='%23l' fill='%23dc9440' transform='translate(196 50) rotate(-27) scale(1.3)'/%3E%3Cuse href='%23l' fill='%23b4541f' transform='translate(232 55) rotate(6) scale(1.25)'/%3E%3Cuse href='%23l' fill='%23e3a851' transform='translate(262 51) rotate(-40) scale(1.3)'/%3E%3C/g%3E%3C/svg%3E");
  --drops: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='170'%3E%3Cg fill='%23dbf1f8' fill-opacity='.26' stroke='%23ffffff' stroke-opacity='.45' stroke-width='.6'%3E%3Ccircle cx='14' cy='22' r='3.2'/%3E%3Ccircle cx='48' cy='9' r='1.8'/%3E%3Ccircle cx='82' cy='31' r='4.2'/%3E%3Ccircle cx='121' cy='17' r='2.4'/%3E%3Ccircle cx='33' cy='58' r='2'/%3E%3Ccircle cx='66' cy='74' r='3.4'/%3E%3Ccircle cx='104' cy='62' r='1.7'/%3E%3Ccircle cx='137' cy='88' r='2.9'/%3E%3Ccircle cx='19' cy='104' r='4'/%3E%3Ccircle cx='55' cy='121' r='2'/%3E%3Ccircle cx='91' cy='112' r='2.7'/%3E%3Ccircle cx='124' cy='139' r='3.7'/%3E%3Ccircle cx='38' cy='152' r='2.5'/%3E%3Ccircle cx='76' cy='158' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Season ---- */
/* winter: frozen solid. Rime over the stone, snow on top with icicles under it, a drift at the foot */
.slab.is-front[data-season=winter] { --accent: #bfe0ff; --accent-hi: #f3f9ff; --accent-lo: #55789f; }
.slab[data-season=winter] .fx { background: linear-gradient(180deg, rgba(190, 222, 255, .2), rgba(120, 165, 220, .16) 55%, rgba(175, 210, 250, .3)); }
.slab[data-season=winter] .fx::before { /* rime: thick in the corners and along the edges, thin where the words are */
  inset: 0; background: var(--frost) 0 0 / 260px 260px;
  -webkit-mask-image: radial-gradient(ellipse 74% 66% at 50% 50%, transparent 62%, #000 100%);
  mask-image: radial-gradient(ellipse 74% 66% at 50% 50%, transparent 62%, #000 100%);
}
.snow { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 1s ease; will-change: opacity; }
.slab.is-front .snow { opacity: 1; }
.snow::before { /* the cap of snow, with icicles hanging from it */
  content: ''; position: absolute; left: -7px; right: -7px; top: -17px; height: 62px;
  background: linear-gradient(180deg, #ffffff, #dcebff 34px, #c4dcfa 35px, #eaf4ff);
  clip-path: polygon(0 26%, 2% 8%, 9% 2%, 22% 5%, 36% 0, 52% 4%, 68% 1%, 83% 5%, 95% 2%, 100% 12%, 100% 50%,
    97% 52%, 95.5% 96%, 94% 54%, 88% 55%, 86.5% 78%, 85% 55%, 76% 56%, 74.5% 100%, 73% 56%, 63% 55%, 61.8% 72%, 60.5% 55%,
    49% 56%, 47.5% 92%, 46% 56%, 37% 55%, 35.8% 68%, 34.5% 55%, 24% 56%, 22.5% 98%, 21% 56%, 12% 55%, 10.8% 80%, 9.5% 55%, 3% 54%, 0 48%);
}
.snow::after { /* the drift against the foot */
  content: ''; position: absolute; left: -16px; right: -16px; bottom: -7px; height: 46px;
  background:
    radial-gradient(ellipse 46% 100% at 24% 100%, #f6faff 62%, transparent 64%),
    radial-gradient(ellipse 42% 80% at 76% 100%, #e2eeff 62%, transparent 64%),
    radial-gradient(ellipse 34% 62% at 50% 100%, #eef5ff 62%, transparent 64%);
}

/* spring / a floral accord: blossom caught all along the foot and drifting up the edges, green in the joints */
.slab.is-front[data-season=spring] { --accent: #f8b4cb; --accent-hi: #ffe6ee; --accent-lo: #a45776; }
.slab[data-season=spring] .fx, .slab[data-fx=bloom] .fx {
  background:
    radial-gradient(circle 7px at 6% 96.6%, #ffd3e2 60%, transparent 64%), radial-gradient(circle 5px at 12% 98.6%, #ffc0d6 60%, transparent 64%),
    radial-gradient(circle 8px at 20% 97.6%, #ffe1ea 60%, transparent 64%), radial-gradient(circle 5px at 29% 99%, #ffc9dc 60%, transparent 64%),
    radial-gradient(circle 6px at 39% 98.2%, #ffd3e2 60%, transparent 64%), radial-gradient(circle 5px at 51% 99%, #ffbdd4 60%, transparent 64%),
    radial-gradient(circle 7px at 63% 98%, #ffd3e2 60%, transparent 64%), radial-gradient(circle 8px at 77% 97.2%, #ffe1ea 60%, transparent 64%),
    radial-gradient(circle 5px at 87% 98.8%, #ffbdd4 60%, transparent 64%), radial-gradient(circle 7px at 95% 96.6%, #ffd3e2 60%, transparent 64%),
    radial-gradient(circle 5px at 3% 78%, #ffc9dc 60%, transparent 64%), radial-gradient(circle 4px at 97% 64%, #ffd3e2 60%, transparent 64%),
    radial-gradient(circle 4px at 2.5% 41%, #ffe1ea 60%, transparent 64%), radial-gradient(circle 5px at 96.5% 22%, #ffc0d6 60%, transparent 64%),
    radial-gradient(ellipse 56% 11% at 20% 100%, rgba(120, 180, 90, .7), transparent 72%),
    radial-gradient(ellipse 50% 9% at 80% 100%, rgba(146, 196, 106, .65), transparent 72%),
    linear-gradient(180deg, rgba(255, 196, 216, .14), transparent 40%, rgba(140, 190, 110, .2));
}

/* summer / a holiday: the sun itself in the corner, the stone bleached and hot */
.slab.is-front[data-season=summer] { --accent: #ffd27a; --accent-hi: #fff2cc; --accent-lo: #a86f1c; }
.slab[data-season=summer] .fx, .slab[data-fx=sun] .fx {
  background:
    radial-gradient(circle at 88% 5%, rgba(255, 246, 214, .75), rgba(255, 220, 140, .3) 13%, transparent 34%),
    linear-gradient(112deg, transparent 26%, rgba(255, 238, 196, .22) 43%, transparent 60%),
    radial-gradient(ellipse 90% 20% at 50% 100%, rgba(255, 176, 90, .42), transparent 72%),
    linear-gradient(180deg, rgba(255, 208, 120, .38), rgba(255, 196, 110, .1) 50%, transparent);
}

/* autumn: rust bleeding up from the base, leaves heaped against the foot */
.slab.is-front[data-season=autumn] { --accent: #f2a55e; --accent-hi: #ffdcae; --accent-lo: #8a461a; }
.slab[data-season=autumn] .fx {
  background:
    var(--leafpile) 50% calc(100% + 12px) / 108% auto no-repeat,
    radial-gradient(ellipse 80% 26% at 30% 100%, rgba(170, 78, 24, .6), transparent 72%),
    linear-gradient(0deg, rgba(160, 74, 24, .55), rgba(160, 74, 24, .14) 36%, transparent 56%),
    linear-gradient(180deg, rgba(255, 176, 100, .16), transparent 38%);
}

/* ---- Identity: glass catching the light. A bright gleam crosses the stone, a halo burns behind the bottle */
.slab[data-fx=glints] .fx {
  overflow: hidden;
  background: radial-gradient(ellipse 78% 30% at 50% 33%, color-mix(in srgb, var(--mine) 38%, transparent), transparent 72%);
}
.slab[data-fx=glints] .fx::before {
  inset: 0; background: linear-gradient(104deg, transparent 40%, rgba(255, 255, 255, .07) 46%, rgba(255, 240, 244, .3) 50%, rgba(255, 255, 255, .07) 54%, transparent 60%);
  transform: translateX(-120%); animation: gleam 4.6s ease-in-out infinite;
}
@keyframes gleam { 0%, 20% { transform: translateX(-120%); } 75%, 100% { transform: translateX(120%); } }

/* ---- Notes ---- */
/* smoky, resinous, leathery: the stone is scorched from the base and smoke crawls up across it */
.slab[data-fx=smoke] .fx {
  overflow: hidden;
  background: radial-gradient(ellipse 100% 40% at 50% 100%, rgba(0, 0, 0, .8), transparent 72%), linear-gradient(0deg, rgba(8, 6, 6, .7), transparent 56%);
}
.slab[data-fx=smoke] .fx::before, .slab[data-fx=smoke] .fx::after {
  left: -20%; right: -20%; top: -100%; height: 300%; opacity: .9;
  background: var(--cloud) 0 0 / 460px 460px; filter: brightness(2.6) saturate(0);
  animation: rise 17s linear infinite;
}
.slab[data-fx=smoke] .fx::after { background-position: 210px 130px; opacity: .6; animation-duration: 29s; }
@keyframes rise { to { transform: translateY(-460px); } }

/* spicy, oriental: the base burns like banked coals, heat licking up the stone */
.slab[data-fx=embers] .fx {
  background:
    radial-gradient(ellipse 100% 34% at 50% 100%, rgba(255, 96, 28, .78), transparent 72%),
    linear-gradient(0deg, rgba(210, 60, 14, .5), rgba(190, 60, 20, .12) 40%, transparent 58%);
}
.slab[data-fx=embers] .fx::before {
  inset: 0;
  background:
    radial-gradient(ellipse 15% 4% at 20% 97%, #ffe2a6, transparent 70%), radial-gradient(ellipse 11% 3% at 44% 98.4%, #ffcf82, transparent 70%),
    radial-gradient(ellipse 13% 3.4% at 66% 97.6%, #ffd894, transparent 70%), radial-gradient(ellipse 16% 4% at 86% 96.6%, #ffc070, transparent 70%),
    radial-gradient(ellipse 8% 2% at 32% 93%, #ffb45c, transparent 70%), radial-gradient(ellipse 7% 2% at 76% 92%, #ffb45c, transparent 70%);
  animation: glow 1.5s ease-in-out infinite alternate;
}
@keyframes glow { from { opacity: .45; } to { opacity: 1; } }

/* sweet, gourmand, woody: resin running thick down from the head of the stone */
.slab[data-fx=amber] .fx {
  --r: rgba(240, 158, 50, .86);
  background:
    radial-gradient(circle 6.5px at 50% 50%, var(--r) 96%, transparent) calc(7% - 3px) 86px / 15px 15px no-repeat, linear-gradient(var(--r), var(--r)) 7% 0 / 9px 93px no-repeat,
    radial-gradient(circle 5px at 50% 50%, var(--r) 96%, transparent) calc(21% - 2px) 40px / 12px 12px no-repeat, linear-gradient(var(--r), var(--r)) 21% 0 / 7px 46px no-repeat,
    radial-gradient(circle 7.5px at 50% 50%, var(--r) 96%, transparent) calc(38% - 3px) 128px / 17px 17px no-repeat, linear-gradient(var(--r), var(--r)) 38% 0 / 10px 136px no-repeat,
    radial-gradient(circle 5px at 50% 50%, var(--r) 96%, transparent) calc(57% - 2px) 54px / 12px 12px no-repeat, linear-gradient(var(--r), var(--r)) 57% 0 / 7px 60px no-repeat,
    radial-gradient(circle 7px at 50% 50%, var(--r) 96%, transparent) calc(74% - 3px) 150px / 16px 16px no-repeat, linear-gradient(var(--r), var(--r)) 74% 0 / 9px 158px no-repeat,
    radial-gradient(circle 5.5px at 50% 50%, var(--r) 96%, transparent) calc(92% - 2px) 70px / 13px 13px no-repeat, linear-gradient(var(--r), var(--r)) 92% 0 / 8px 77px no-repeat,
    linear-gradient(180deg, rgba(240, 158, 50, .86), rgba(240, 158, 50, .86) 9px, transparent 10px),
    linear-gradient(180deg, rgba(255, 190, 90, .34), transparent 52%);
}

/* fresh, citrus, aquatic  /  gym, outdoors: cold stone running with water, mist pooled at the foot */
.slab[data-fx=mist] .fx, .slab[data-fx=cool] .fx {
  background:
    var(--drops) 0 0 / 120px 136px,
    var(--drops) 70px 95px / 84px 95px,
    radial-gradient(ellipse 110% 30% at 50% 100%, rgba(205, 238, 248, .5), transparent 72%),
    linear-gradient(180deg, rgba(170, 222, 240, .3), rgba(150, 205, 228, .1) 50%, rgba(180, 228, 242, .26));
}

/* ---- Occasion ---- */
/* night out: neon tubes down both edges and a wash along the floor, changing colour */
.slab[data-fx=club] .fx, .slab[data-fx=club] .fx::before, .slab[data-fx=club] .fx::after {
  background:
    linear-gradient(90deg, var(--n), color-mix(in srgb, var(--n) 26%, transparent) 2.2%, transparent 15%, transparent 85%, color-mix(in srgb, var(--n) 26%, transparent) 97.8%, var(--n)),
    linear-gradient(0deg, color-mix(in srgb, var(--n) 34%, transparent), transparent 26%);
}
.slab[data-fx=club] .fx { --n: #ff7ccb; }
.slab[data-fx=club] .fx::before { inset: 0; --n: #a98bff; animation: neon 7.8s ease-in-out infinite; }
.slab[data-fx=club] .fx::after { inset: 0; --n: #6fb4ff; animation: neon 7.8s ease-in-out -3.9s infinite; }
@keyframes neon { 0%, 20%, 100% { opacity: 0; } 45%, 65% { opacity: 1; } }

/* date: a candle burning on the floor in front of it */
.slab[data-fx=candle] .fx::before {
  inset: 0;
  background:
    radial-gradient(ellipse 34% 20% at 50% 102%, rgba(255, 226, 160, .8), transparent 72%),
    radial-gradient(ellipse 78% 48% at 50% 104%, rgba(255, 160, 72, .75), transparent 72%),
    radial-gradient(ellipse 150% 96% at 50% 112%, rgba(255, 140, 60, .34), transparent 72%);
  animation: flicker 1.5s ease-in-out infinite;
}
@keyframes flicker { 0%, 100% { opacity: 1; } 18% { opacity: .7; } 34% { opacity: .95; } 52% { opacity: .6; } 74% { opacity: .88; } }

/* formal event: gold leaf on the stone, glittering */
.slab[data-fx=gala] .fx {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 220, 150, .34), rgba(255, 214, 140, .08) 50%, rgba(255, 220, 150, .2));
}
.slab[data-fx=gala] .fx::before, .slab[data-fx=gala] .fx::after {
  inset: 0;
  background:
    radial-gradient(circle 2.6px at 12% 14%, #fff0c0 60%, transparent), radial-gradient(circle 3.4px at 81% 9%, #ffd98a 60%, transparent),
    radial-gradient(circle 2.2px at 93% 37%, #fff6d8 60%, transparent), radial-gradient(circle 3px at 6% 52%, #ffd98a 60%, transparent),
    radial-gradient(circle 2.4px at 88% 71%, #fff0c0 60%, transparent), radial-gradient(circle 3.6px at 17% 88%, #ffd98a 60%, transparent),
    radial-gradient(circle 2.2px at 58% 95%, #fff6d8 60%, transparent), radial-gradient(circle 2.8px at 46% 4%, #fff0c0 60%, transparent),
    radial-gradient(circle 2px at 30% 30%, #ffe6a8 60%, transparent), radial-gradient(circle 2.4px at 70% 46%, #ffe6a8 60%, transparent),
    radial-gradient(circle 2px at 24% 66%, #fff0c0 60%, transparent), radial-gradient(circle 2.6px at 64% 80%, #ffd98a 60%, transparent);
  animation: twinkle 1.9s ease-in-out infinite alternate;
}
.slab[data-fx=gala] .fx::after { transform: scale(-1, -1); animation-delay: -.95s; }
@keyframes twinkle { from { opacity: .1; } to { opacity: 1; } }

/* office, everyday: bright daylight through a window, cut into bars by the blinds */
.slab[data-fx=daylight] .fx {
  background:
    repeating-linear-gradient(101deg, rgba(255, 255, 255, .17) 0 36px, transparent 36px 64px),
    linear-gradient(180deg, rgba(232, 240, 250, .2), transparent 70%);
  -webkit-mask-image: linear-gradient(118deg, transparent 12%, #000 34%, #000 68%, transparent 90%);
  mask-image: linear-gradient(118deg, transparent 12%, #000 34%, #000 68%, transparent 90%);
}

/* ---- Reviews: other people's voices. Rings travelling out through the stone */
.slab[data-fx=echo] .fx { overflow: hidden; background: radial-gradient(ellipse 90% 46% at 50% 20%, color-mix(in srgb, var(--mine) 30%, transparent), transparent 72%); }
.slab[data-fx=echo] .fx::before, .slab[data-fx=echo] .fx::after {
  left: 50%; top: 20%; width: 900px; height: 900px; margin: -450px; border-radius: 50%;
  background: radial-gradient(circle closest-side,
    transparent calc(72% - 2px), color-mix(in srgb, var(--mine) 60%, transparent) 72%, transparent calc(72% + 2px),
    transparent calc(100% - 3px), color-mix(in srgb, var(--mine) 85%, transparent) calc(100% - 1.5px), transparent 100%);
  animation: ring 4.2s linear infinite;
}
.slab[data-fx=echo] .fx::after { animation-delay: -2.1s; }
@keyframes ring { from { transform: scale(.03); opacity: 1; } to { transform: scale(1); opacity: 0; } }

/* ---- Where: a survey grid on the stone, and a bright beam sweeping it for places */
.slab[data-fx=beacons] .fx {
  overflow: hidden;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--mine) 16%, transparent) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(0deg, color-mix(in srgb, var(--mine) 16%, transparent) 1px, transparent 1px) 0 0 / 30px 30px,
    radial-gradient(ellipse 80% 50% at 50% 62%, color-mix(in srgb, var(--mine) 14%, transparent), transparent 72%);
}
.slab[data-fx=beacons] .fx::before {
  left: 50%; top: 62%; width: 200%; aspect-ratio: 1; margin: -100% 0 0 -100%;
  background: conic-gradient(from 0deg, color-mix(in srgb, var(--mine) 46%, transparent), color-mix(in srgb, var(--mine) 10%, transparent) 14%, transparent 26%, transparent);
  border-radius: 50%; animation: sweepround 5s linear infinite;
}
@keyframes sweepround { to { transform: rotate(360deg); } }

/* ---- small screens ----------------------------------------------------- */
@media (max-width: 820px) {
  /* on a phone the heading sits under the slot: keep the glow, lose the glare, so the words stay readable */
  body[data-view=home] .room__ceil::before { opacity: .3; }
  .home { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 78px; align-items: start; } /* minmax: a long line never widens the page */
  .home h1 { font-size: clamp(54px, 17vw, 96px); }
  .home__lede { margin-top: 12px; font-size: 15px; max-width: 40ch; }
  .home__stage { order: 2; }
  .slot { order: 3; margin-top: 4px; max-width: none; }
  .home__text { display: contents; }
  .home__text > h1, .home__text > p { order: 1; }
  .monolith, .monolith-depth { width: min(84vw, 360px); height: min(62svh, 520px); min-height: 380px; transform: rotateY(-9deg); }
  .home__lede { text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 14px rgba(0, 0, 0, .6); } /* readable under the beam */
  .bar__status { display: none; }
  .bar .btn { min-height: 40px; }
}
@media (max-height: 760px) { /* short phones: the bottle and its niche give way so the answer fits on the stone */
  .bottle { height: clamp(140px, 27dvh, 240px); }
  .id-photo { height: clamp(110px, 22dvh, 180px); }
  .id-brand { margin-top: 12px; }
  .verdict { margin-top: 12px; padding-top: 10px; }
}
@media (max-height: 640px) {
  :root { --H: calc(100svh - 150px); }
  .result { padding-top: 54px; }
  .slab__head h2 { font-size: 40px; }
}
/* ---- phones and tablets: the same room, painted flat ----------------------------
   In 3D every wall, floor and slice of light is a graphics layer of its own, several times the screen.
   That is ~400 MB at a phone's pixel density, far past what a mobile browser allows a page: it starts
   dropping layers (the page blinks) and then stops drawing altogether. Here the room is one flat,
   screen-sized picture, and only the monoliths stay in 3D. */
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .room__box { display: none; }
  .room {
    perspective: none;
    background:
      var(--grain),
      radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .85) 0 4px, rgba(255, 255, 255, .07) 4.5px 6px, transparent 6.5px) 0 0 / 180px 120px, /* tie holes */
      linear-gradient(90deg, rgba(0, 0, 0, .5) 1px, transparent 1px) 0 0 / 180px 100%,                                                     /* panel seams */
      linear-gradient(0deg, rgba(0, 0, 0, .45) 1px, transparent 1px) 0 0 / 100% 240px,
      linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .2) 18%, transparent 34%, transparent 66%, rgba(0, 0, 0, .2) 82%, rgba(0, 0, 0, .78)), /* walls turning away into shadow */
      linear-gradient(180deg, #0b0a0a, #1f1d1c 8%, #3b3735 46%, #2a2726 78%, #1a1817 84%, #2c2928 100%);                                        /* ceiling, back wall, floor */
  }
  /* the light: a slot overhead, its beam, and the colour it throws into the room (still cross-faded) */
  .room__amb { will-change: auto;
    background:
      linear-gradient(90deg, transparent calc(var(--lxp, 50vw) - 26px), color-mix(in srgb, var(--c) 40%, #fff) calc(var(--lxp, 50vw) - 20px), color-mix(in srgb, var(--c) 40%, #fff) calc(var(--lxp, 50vw) + 20px), transparent calc(var(--lxp, 50vw) + 26px)) 0 0 / 100% 7svh no-repeat,
      radial-gradient(ellipse 30% 9svh at var(--lxp, 50vw) 0, color-mix(in srgb, var(--c) 75%, transparent), transparent 75%),
      radial-gradient(ellipse 75% 85% at var(--lxp, 50vw) 28%, color-mix(in srgb, var(--c) 20%, transparent), transparent 74%),
      radial-gradient(ellipse 60% 12% at var(--lxp, 50vw) 90%, color-mix(in srgb, var(--c) 26%, transparent), transparent 72%);
  }
  .room__amb::before { /* the beam falling from the slot, widening and fading as it goes down */
    content: ''; position: absolute; inset: 0;
    background: conic-gradient(from 160deg at var(--lxp, 50vw) 0, transparent 0deg, color-mix(in srgb, var(--c) 22%, transparent) 14deg, color-mix(in srgb, var(--c) 34%, transparent) 20deg, color-mix(in srgb, var(--c) 22%, transparent) 26deg, transparent 40deg);
    -webkit-mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, .25) 70%, transparent);
    mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, .25) 70%, transparent);
  }
  /* no standing layers for things that are not moving */
  .rig, .fx, .tint, .snow, .shade { will-change: auto; }
  .slab .floor-shadow { display: none; }
  .slab.is-away { visibility: hidden; } /* slabs turned away are behind the one in front anyway */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } /* endless loops stop instead of flickering */
}

/* ---- the orb: ask the stone's seer by notes, season, occasion ------------------
   The third way in, under the name search: a stone plaque with a crystal ball set in it.
   The whole plaque is the button. Tapped, the ball comes forward into its own view and the
   ways to ask it orbit around it. --orb-tint is the ball's light; the orb's view changes
   it to the colour of whatever is chosen. */
@property --orb-tint { syntax: '<color>'; inherits: true; initial-value: #e79eac; }
.seer {
  position: relative; display: flex; align-items: center; gap: 16px;
  width: 100%; max-width: 420px; margin-top: 14px; padding: 10px 14px 10px 14px;
  border: 0; text-align: left; color: var(--ink); -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at 46px 50%, rgba(231, 158, 172, .26), transparent 120px),
    var(--grain), linear-gradient(180deg, #2c2627, #1d191a 60%, #151213);
  box-shadow: inset 0 1.5px 0 rgba(255, 220, 228, .22), inset 0 0 0 1px rgba(231, 158, 172, .28), 0 30px 28px -18px rgba(0, 0, 0, .9);
  transition: box-shadow .3s, transform .3s cubic-bezier(.2, .7, .1, 1);
}
.seer:hover { box-shadow: inset 0 1.5px 0 rgba(255, 220, 228, .3), inset 0 0 0 1px rgba(231, 158, 172, .6), 0 0 34px -6px rgba(231, 158, 172, .45), 0 30px 28px -18px rgba(0, 0, 0, .9); }
.seer:active { transform: translateY(1px); }
.seer:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.seer__caption { flex: 1; min-width: 0; line-height: 1.2; }
.seer__caption small { display: block; font: 400 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.seer__caption b { display: block; margin-top: 4px; font: 800 26px/1 var(--display); font-stretch: 70%; text-transform: uppercase; letter-spacing: .03em; color: var(--blush); }
.seer__caption span { display: block; margin-top: 6px; font: 400 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.seer__go {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  font: 500 18px/1 var(--mono); font-style: normal; color: var(--rose);
  box-shadow: inset 0 0 0 1px rgba(231, 158, 172, .45);
  transition: background .25s, color .25s, transform .3s cubic-bezier(.2, .7, .1, 1);
}
.seer:hover .seer__go, .seer:focus-visible .seer__go { background: var(--rose-fill); color: #fff; transform: translateX(3px); }

.orb {
  --s: 62px;
  position: relative; flex: none; display: block; width: var(--s); height: calc(var(--s) * 1.24);
  transition: opacity .3s, transform .35s cubic-bezier(.2, .7, .1, 1);
}
.seer:hover .orb, .seer:focus-visible .orb { transform: translateY(-3px); }
.seer.is-lifted .orb { opacity: 0; }
.svgdefs { position: absolute; width: 0; height: 0; overflow: hidden; }
/* The glass: a dark crystal with the light inside it (--orb-tint), mist turning slowly, and on top the
   glass itself (drawn once in index.html, #orb-shine): darker towards the edge, a bright rim, the window
   highlight. ::after is the light the ball gathers at its lower edge. */
.orb__glass {
  position: absolute; left: 0; top: 0; z-index: 1; width: var(--s); height: var(--s);
  border-radius: 50%; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 50% 57%, color-mix(in srgb, var(--orb-tint) 46%, transparent) 0, color-mix(in srgb, var(--orb-tint) 16%, transparent) 34%, transparent 60%),
    radial-gradient(circle at 42% 34%, #3c1528 0, #220a17 48%, #0f050a 80%, #080306 100%);
  box-shadow: 0 0 22px 1px color-mix(in srgb, var(--orb-tint) 30%, transparent), 0 0 64px 10px color-mix(in srgb, var(--orb-tint) 11%, transparent);
  transition: box-shadow .4s;
}
.orb__glass::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(ellipse 54% 20% at 50% 97%, color-mix(in srgb, var(--orb-tint) 55%, #fff) 0, color-mix(in srgb, var(--orb-tint) 50%, transparent) 34%, transparent 72%);
}
.seer:hover .orb__glass { box-shadow: 0 0 30px 5px color-mix(in srgb, var(--orb-tint) 45%, transparent), 0 0 84px 16px color-mix(in srgb, var(--orb-tint) 18%, transparent); }
.orb__mist { /* smoke turning inside the glass (#orb-mist in index.html), the second layer the other way */
  position: absolute; inset: 0; width: 100%; height: 100%; color: var(--orb-tint);
  mix-blend-mode: screen; will-change: transform; animation: orbspin 18s linear infinite;
}
.orb__mist--b { animation-duration: 11s; animation-direction: reverse; }
.orb__eye { /* the light that knows */
  position: absolute; inset: 31%; border-radius: 50%; mix-blend-mode: screen;
  background: radial-gradient(circle, #fff 0 5%, color-mix(in srgb, var(--orb-tint) 22%, #fff) 13%, color-mix(in srgb, var(--orb-tint) 55%, transparent) 33%, transparent 70%);
  animation: orbpulse 3.4s ease-in-out infinite;
}
.orb__shine { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.orb__stand { /* rose gold, in front of the glass: its lip wraps the bottom of the ball */
  position: absolute; left: 0; top: 0; z-index: 2; width: var(--s); height: calc(var(--s) * 1.24);
  overflow: visible; pointer-events: none;
}
@keyframes orbspin { to { transform: rotate(360deg); } }
@keyframes orbpulse { 50% { transform: scale(1.22); opacity: .78; } }
.is-thinking .orb__mist { animation-duration: 1.6s; }
.is-thinking .orb__eye { animation-duration: .9s; }

/* the orb's own view */
html.oracle-open, html.oracle-open body { overflow: hidden; }
.oracle {
  --ring: min(92vw, 560px, 74svh);
  position: fixed; inset: 0; z-index: 8;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  opacity: 0; transition: opacity .3s;
}
.oracle.is-open { opacity: 1; }
.oracle__veil {
  position: fixed; inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(70, 22, 38, .55), rgba(8, 5, 7, .9) 62%), rgba(8, 5, 7, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.oracle__close {
  position: fixed; z-index: 2; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  width: 46px; height: 46px; border: 0; background: rgba(24, 20, 21, .88);
  box-shadow: inset 0 0 0 1.5px rgba(240, 234, 230, .5); font-size: 28px; line-height: 1;
}
.oracle__close:hover { background: var(--ink); color: var(--dark); }
.oracle__inner {
  position: relative; min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(70px, calc(env(safe-area-inset-top) + 58px)) 16px calc(48px + env(safe-area-inset-bottom));
}
.oracle.is-asking .oracle__inner { justify-content: flex-start; }
.oracle__ring {
  position: relative; flex: none; width: var(--ring); height: var(--ring);
  display: grid; place-items: center;
  transition: height .45s cubic-bezier(.2, .7, .1, 1);
}
.orb--big {
  --s: calc(var(--ring) * .4);
  width: var(--s); height: var(--s);
  transition: transform .55s cubic-bezier(.2, .7, .1, 1), width .45s cubic-bezier(.2, .7, .1, 1), height .45s cubic-bezier(.2, .7, .1, 1);
}
.orb--big .orb__glass { width: 100%; height: 100%; }
.oracle.is-asking .oracle__ring { height: 96px; }
.oracle.is-asking .orb--big { width: 84px; height: 84px; }
.oracle__hint {
  position: absolute; left: -16px; right: -16px; top: 100%; margin-top: 6px; text-align: center;
  font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--blush);
  opacity: 0; transition: opacity .4s .35s;
}
.oracle.is-open .oracle__hint { opacity: .85; }
.oracle.is-asking .oracle__hint { opacity: 0; transition-delay: 0s; }

.oracle__opts { position: absolute; inset: 0; pointer-events: none; }
.oracle__opts li {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(var(--a)) translateX(0) rotate(calc(var(--a) * -1)) scale(.4);
  opacity: 0;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1.15), opacity .3s;
}
.oracle.is-open:not(.is-asking) .oracle__opts li {
  transform: translate(-50%, -50%) rotate(var(--a)) translateX(calc(var(--ring) * .36)) rotate(calc(var(--a) * -1));
  opacity: 1; pointer-events: auto;
  transition-delay: calc(120ms + var(--d) * 55ms);
}
.opt {
  display: block; width: clamp(84px, calc(var(--ring) * .27), 150px); padding: 11px 8px 10px;
  border: 0; text-align: center; color: var(--ink);
  background: var(--grain), linear-gradient(180deg, var(--slab-hi), var(--slab) 45%, var(--slab-lo));
  box-shadow: inset 0 2px 0 rgba(255, 236, 240, .32), inset 0 -3px 0 rgba(0, 0, 0, .4), 0 0 22px rgba(231, 158, 172, .22), 0 14px 18px -10px rgba(0, 0, 0, .9);
  transition: background .2s, color .2s;
}
.opt b { display: block; font: 700 clamp(15px, calc(var(--ring) * .036), 20px)/1 var(--display); font-stretch: 70%; text-transform: uppercase; letter-spacing: .04em; }
.opt span { display: block; margin-top: 5px; font: 400 9px/1.25 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.opt:hover, .opt:focus-visible { background: var(--rose-fill); color: #fff; }
.opt:hover span, .opt:focus-visible span { color: var(--blush); }

.oracle__panel { position: relative; width: min(680px, 100%); margin-top: 14px; animation: rise .4s cubic-bezier(.2, .7, .1, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.oracle__head { display: flex; align-items: center; gap: 14px; }
.oracle__back { min-height: 40px; padding: 0 14px; flex: none; }
.oracle__title { font: 800 clamp(30px, 8vw, 46px)/.9 var(--display); font-stretch: 62%; text-transform: uppercase; }
.oracle__values { margin-top: 16px; }
.oracle__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.oracle__find {
  width: 100%; height: 50px; margin-bottom: 12px; padding: 0 16px;
  border: 0; border-radius: 0; background: rgba(0, 0, 0, .45);
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, .7), inset 0 0 0 1px var(--line);
  font-size: 16px; font-weight: 500; /* 16px keeps iPhones from zooming in */
}
.oracle__find::placeholder { color: rgba(240, 234, 230, .4); }
.chip {
  min-height: 40px; padding: 0 14px; border: 0;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(240, 234, 230, .24);
  font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.chip:hover { background: rgba(255, 255, 255, .14); }
.chip[aria-pressed=true] { background: var(--rose-fill); color: #fff; box-shadow: inset 0 1.5px 0 rgba(255, 220, 228, .45); }
.oracle__count { margin-top: 18px; scroll-margin-top: 72px; }
.oracle__count:empty { display: none; }
.oracle__results { margin-top: 8px; background: #252322; box-shadow: 0 24px 34px -10px rgba(0, 0, 0, .9); }
.oracle__results:empty { display: none; }
.oracle__results .hit:first-child { border-top: 0; }
.oracle__more { width: 100%; margin-top: 12px; }

/* ---- the orb's weather ---------------------------------------------------------
   What is chosen in the orb's view brings the same atmosphere a monolith does: the room's
   particles move in front of the veil (the script lends the canvas to .oracle), the ball and
   the air around it take that colour, and every choice sends a ripple out of the ball. */
.oracle { --orb-tint: #e79eac; transition: opacity .3s, --orb-tint 1.1s ease; }
.oracle > .room__sky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.oracle__veil::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--orb-tint) 24%, transparent), transparent 58%);
}
.oracle[data-fx=club] { animation: clubtint 7.8s ease-in-out infinite; }
@keyframes clubtint { 0%, 100% { --orb-tint: #ff8fd2; } 33% { --orb-tint: #b39bff; } 66% { --orb-tint: #7fbcff; } }
.oracle[data-fx=candle] .orb--big .orb__eye { animation: flame 1.7s ease-in-out infinite; }
@keyframes flame { 0%, 100% { transform: scale(1); opacity: .95; } 30% { transform: scale(1.12, 1.2); opacity: .8; } 60% { transform: scale(.94, 1.05); opacity: 1; } }
.orb--big::before, .orb--big::after { /* the ripple: two rings leaving the glass */
  content: ''; position: absolute; inset: 0; z-index: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 2px var(--orb-tint), 0 0 24px 4px color-mix(in srgb, var(--orb-tint) 60%, transparent);
  opacity: 0;
}
.orb--big.is-cast::before { animation: ripple 1.1s cubic-bezier(.15, .6, .3, 1); }
.orb--big.is-cast::after { animation: ripple 1.1s cubic-bezier(.15, .6, .3, 1) .18s; }
@keyframes ripple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.8); opacity: 0; } }
.orb--big.is-cast .orb__glass { animation: flare .7s ease-out; }
@keyframes flare { 30% { filter: brightness(1.7) saturate(1.3); } }
.chip { position: relative; overflow: hidden; }
.chip[aria-pressed=true] { background: color-mix(in srgb, var(--orb-tint) 55%, #6b2a3c); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .4), 0 0 18px color-mix(in srgb, var(--orb-tint) 55%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .orb--big.is-cast::before, .orb--big.is-cast::after, .orb--big.is-cast .orb__glass, .oracle[data-fx] { animation: none; }
}

/* phones and tablets: the plaque runs the full width under the name search */
@media (max-width: 820px) {
  .seer { order: 4; max-width: none; margin-top: -8px; gap: 14px; }
  .seer__caption b { font-size: 24px; }
}
@media (max-width: 400px) {
  .seer__caption small, .seer__caption span { font-size: 9px; letter-spacing: .08em; }
  .seer__go { width: 34px; height: 34px; }
}
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  .oracle__veil { -webkit-backdrop-filter: none; backdrop-filter: none; background: radial-gradient(circle at 50% 42%, rgba(70, 22, 38, .6), rgba(8, 5, 7, .95) 62%), rgba(8, 5, 7, .7); }
}
@media (max-height: 560px) and (orientation: landscape) { /* phones held sideways */
  .oracle { --ring: min(86svh, 92vw); }
  .oracle__hint { display: none; }
}

/* ---- Match: swipe cards in the orb's view ----------------------------------------
   A small deck of stone cards. The top one follows the finger; YES / NO / THE ONE
   stamps fade in with the direction it is dragged (--yes, --no, --star set by the script). */
.match { width: min(400px, 100%); margin: 14px auto 0; }
.match__lede { font-size: 14px; line-height: 1.45; color: var(--ink-soft); text-align: center; }
.match__lede b { color: var(--rose); font-weight: 500; }
.match__deck { position: relative; height: clamp(330px, calc(100svh - 420px), 520px); margin-top: 16px; }
.match__wait { position: absolute; inset: 0; display: grid; place-items: center; font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--blush); }
.match__deck { perspective: 1100px; }
.mcard {
  --i: 0; --yes: 0; --no: 0; --star: 0; --T: 16px;
  position: absolute; inset: 0 var(--T); z-index: calc(10 - var(--i));
  transform-style: preserve-3d;
  /* at rest it faces the viewer square on: Chrome draws a turned face inside a 3D scene at low resolution,
     which blurred the photo and the text; a swipe still turns it */
  transform: translateY(calc(var(--i) * 14px)) scale(calc(1 - var(--i) * .05));
  transition: transform .45s cubic-bezier(.2, .7, .1, 1), opacity .3s, filter .3s;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
}
.mcard:active { cursor: grabbing; }
.mcard.is-gone { z-index: 11; pointer-events: none; }
/* only one card is ever on the deck; the next one rises in after the last has been sent off */
.mcard.is-new { animation: deal .4s .18s cubic-bezier(.2, .7, .1, 1) both; }
@keyframes deal { from { opacity: 0; transform: translateY(18px) scale(.95); } }
.mcard .side { background: var(--grain), linear-gradient(180deg, color-mix(in srgb, var(--tint) 18%, #8a4a5b), #4f2231 40%, #26101a); }
.mcard__face {
  overflow: hidden; padding: 18px 16px 16px;
  /* the home monolith's rose stone, warmed a little towards the scent's own colour */
  background:
    var(--grain), var(--cloud),
    linear-gradient(180deg, rgba(255, 236, 240, .2), transparent 20%),
    linear-gradient(90deg, transparent 49.7%, rgba(40, 8, 18, .2) 50%, transparent 50.3%) 0 0 / 33.34% 100%,
    linear-gradient(180deg, color-mix(in srgb, var(--tint) 16%, #e9afbb), color-mix(in srgb, var(--tint) 14%, #c97c8d) 20%, #8f4a5d 50%, #4d2030 78%, #2e111c);
  box-shadow: inset 0 2px 0 rgba(255, 240, 243, .6), inset 0 -3px 0 rgba(0, 0, 0, .45),
    0 30px 34px -16px rgba(0, 0, 0, .95), 0 0 34px color-mix(in srgb, var(--tint) 18%, transparent);
}
.mcard .plate { padding: 0 8px; font-size: 10.5px; }
.mcard .plate .is-wild { color: rgba(52, 16, 27, .6); }
.mcard__pic { flex: 1 1 auto; min-height: 96px; margin: 12px 4px 0; }
.mcard__pic::before { /* a glow at the foot of the niche, in the scent's colour */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 100%, color-mix(in srgb, var(--tint) 38%, transparent), transparent 72%);
}
.mcard__pic img { /* the whole picture, never cropped, however small the niche gets on a phone */
  position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px);
  object-fit: contain; pointer-events: none;
}
.mcard__pic.is-bottle img { inset: 8px 8px 4px; height: calc(100% - 12px); object-position: 50% 100%; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .8)); }
.mcard__mono {
  position: relative; font: 800 clamp(60px, 16vw, 92px)/1 var(--display); font-stretch: 62%; letter-spacing: .02em;
  color: var(--blush); opacity: .5; text-shadow: 0 0 22px color-mix(in srgb, var(--tint) 70%, transparent);
}
.mcard__body { flex: none; position: relative; padding: 12px 6px 0; }
.mcard__name {
  font: 800 clamp(24px, 6.6vw, 32px)/.92 var(--display); font-stretch: 62%; text-transform: uppercase; letter-spacing: .005em;
  color: #fff; text-shadow: 0 2px 4px rgba(40, 8, 18, .7);
}
.mcard__by { margin-top: 6px; font: 400 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(243, 211, 216, .85); }
.mcard__accords { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.mcard__accords li {
  padding: 4px 7px; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: color-mix(in srgb, var(--c) 18%, rgba(24, 6, 12, .5)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), inset 0 2px 4px rgba(0, 0, 0, .35);
}
.mcard__notes { margin-top: 9px; display: grid; gap: 3px; font-size: 12.5px; line-height: 1.3; }
.mcard__notes div { display: flex; gap: 8px; }
.mcard__notes dt { flex: none; width: 40px; padding-top: 2px; font: 400 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(243, 211, 216, .55); }
.mcard__notes dd { margin: 0; color: rgba(250, 232, 236, .9); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mcard__meta { margin-top: 9px; font: 400 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(243, 211, 216, .6); }
.mcard__meta span { color: #ffd0da; }
.mcard__stamp {
  position: absolute; top: 46px; z-index: 3; padding: 6px 12px; pointer-events: none;
  font: 800 30px/1 var(--display); font-stretch: 70%; font-style: normal; text-transform: uppercase; letter-spacing: .08em;
  border: 3px solid currentColor; background: rgba(15, 6, 10, .6); opacity: 0;
}
.mcard__stamp--yes { left: 20px; color: #9fe3b0; transform: translateZ(2px) rotate(-14deg); opacity: var(--yes); }
.mcard__stamp--no { right: 20px; color: #ff8f8f; transform: translateZ(2px) rotate(14deg); opacity: var(--no); }
.mcard__stamp--star { left: 50%; top: 34%; color: #ffd27a; transform: translateZ(2px) translateX(-50%) rotate(-6deg); opacity: var(--star); white-space: nowrap; }
.mcard.is-like .mcard__stamp--yes, .mcard.is-nope .mcard__stamp--no, .mcard.is-star .mcard__stamp--star { opacity: 1; }

/* a tap turns the slab over (about its own middle, so it stays in place); the stamps sit outside it, in front of either side */
.mcard__turn {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform-origin: 50% 50% calc(var(--T) * -.5);
  transition: transform .65s cubic-bezier(.3, .7, .2, 1);
}
.mcard.is-flipped .mcard__turn { transform: rotateY(180deg); }
.mcard .face { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.mcard:focus-visible { outline: none; }
.mcard:focus-visible .face { outline: 2px solid var(--blush); outline-offset: 3px; }
.mcard__hint {
  position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 5px 8px; pointer-events: none;
  font: 500 9.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #ffe1e7;
  background: rgba(20, 6, 11, .72); box-shadow: inset 0 0 0 1px rgba(255, 208, 218, .28);
}
.mcard__back { /* the slab's back: the same stone, a shade darker so the words read */
  transform: translateZ(calc(var(--T) * -1)) rotateY(180deg);
  overflow: hidden; padding: 16px 16px 12px;
  background:
    var(--grain), var(--cloud),
    linear-gradient(180deg, rgba(255, 236, 240, .14), transparent 16%),
    linear-gradient(180deg, color-mix(in srgb, var(--tint) 18%, #9a5265), color-mix(in srgb, var(--tint) 10%, #6a2c3f) 22%, #43192a 55%, #2a0f1a);
  box-shadow: inset 0 2px 0 rgba(255, 240, 243, .5), inset 0 -3px 0 rgba(0, 0, 0, .45),
    0 30px 34px -16px rgba(0, 0, 0, .95), 0 0 34px color-mix(in srgb, var(--tint) 18%, transparent);
  color: rgba(250, 232, 236, .92); text-align: left;
}
.mcard__back > * { flex: none; } /* lines keep their height; if anything gives, it is the hint at the foot */
.mcard__back-name {
  padding-right: 6px; font: 800 clamp(20px, 5.4vw, 24px)/.95 var(--display); font-stretch: 62%; text-transform: uppercase;
  color: #fff; text-shadow: 0 2px 4px rgba(40, 8, 18, .7);
}
.mcard__back .mcard__by { margin-top: 4px; }
.mcard__label { margin-top: 12px; font: 500 9.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #ffc4d0; }
.mcard__label small { margin-left: 4px; font-size: 8.5px; letter-spacing: .06em; color: rgba(255, 208, 218, .55); }
.mcard__smell { margin-top: 5px; font-size: 13.5px; line-height: 1.38; color: #fff; }
.mcard__wear { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.mcard__wear li {
  padding: 4px 8px; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: color-mix(in srgb, var(--tint) 22%, rgba(24, 6, 12, .55)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 55%, transparent);
}
.mcard__when { margin-top: 6px; font-size: 12.5px; line-height: 1.3; color: rgba(250, 232, 236, .82); }
.mcard__back .mcard__notes { margin-top: 5px; }
.mcard__back .mcard__notes dd { -webkit-line-clamp: 2; }
.mcard__back > .mcard__back-hint { flex: 0 1 auto; min-height: 0; overflow: hidden; }
.mcard__back-hint { margin-top: auto; padding-top: 8px; text-align: center; font: 500 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 208, 218, .5); }

/* the match, standing on its own when the orb has found it */
.match__stand { position: relative; height: clamp(340px, 52svh, 460px); margin: 18px auto 0; width: min(320px, 100%); perspective: 1100px; }
.match__stand .mcard { cursor: pointer; touch-action: auto; animation: stand .9s cubic-bezier(.2, .7, .1, 1); transform: rotateY(-14deg); }
@keyframes stand { from { transform: translateY(30px) rotateY(-40deg); opacity: 0; } }
.match__stand::after { /* its shadow on the floor */
  content: ''; position: absolute; left: 4%; right: 4%; bottom: -26px; height: 40px; z-index: -1;
  background: radial-gradient(50% 50% at 50% 30%, rgba(0, 0, 0, .85), transparent 75%);
}

.match__acts { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 20px; }
.match__btn { /* small stone blocks, the same stone as the orb's options */
  position: relative; width: 64px; height: 64px; border: 0; font-size: 26px; line-height: 1;
  background: var(--grain), linear-gradient(180deg, var(--slab-hi), var(--slab) 45%, var(--slab-lo));
  box-shadow: inset 0 2px 0 rgba(255, 236, 240, .32), inset 0 -3px 0 rgba(0, 0, 0, .45), 0 14px 18px -10px rgba(0, 0, 0, .9);
  transition: transform .15s, background .2s, color .2s;
}
.match__btn::before { /* tie holes, like the slabs */
  content: ''; position: absolute; inset: 5px; pointer-events: none;
  --hole: radial-gradient(circle, rgba(0, 0, 0, .8) 0 1.6px, rgba(255, 255, 255, .14) 2px 2.6px, transparent 3px);
  background: var(--hole) 0 0 / 6px 6px no-repeat, var(--hole) 100% 0 / 6px 6px no-repeat,
              var(--hole) 0 100% / 6px 6px no-repeat, var(--hole) 100% 100% / 6px 6px no-repeat;
}
.match__btn:active { transform: scale(.92); }
.match__btn--no { color: #ff8f8f; }
.match__btn--yes { color: #9fe3b0; }
.match__btn--star {
  width: 54px; height: 54px; font-size: 22px; color: #ffe2a6;
  background: var(--grain), linear-gradient(180deg, #e9afbb, #c97c8d 30%, #8f4a5d 70%, #4d2030);
  box-shadow: inset 0 2px 0 rgba(255, 240, 243, .6), inset 0 -3px 0 rgba(0, 0, 0, .45), 0 0 22px rgba(255, 210, 122, .3), 0 14px 18px -10px rgba(0, 0, 0, .9);
}
.match__btn:hover, .match__btn:focus-visible { background: var(--ink); }
.match__btn[disabled] { opacity: .4; pointer-events: none; }

.match__sense { margin-top: 20px; text-align: center; }
.match__count { color: var(--ink-faint); }
.match__link { padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }
.match__senses { margin-top: 12px; font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--blush); }
.match__traits { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.match__traits li { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.match__traits small { font-size: 9px; color: var(--ink-faint); }
.match__traits .is-drawn { background: color-mix(in srgb, var(--orb-tint) 30%, rgba(0, 0, 0, .4)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orb-tint) 60%, transparent); }
.match__traits .is-avoid { background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-faint); }
.match__traits .is-avoid b { text-decoration: line-through; text-decoration-color: rgba(255, 143, 143, .7); }

.match__end { margin-top: 18px; text-align: center; animation: rise .4s cubic-bezier(.2, .7, .1, 1); }
.match__found { color: #ffd27a; }
.match__end-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }
.match__yes-title { margin-top: 28px; text-align: left; }
.match__end .oracle__results { text-align: left; }
@media (prefers-reduced-motion: reduce) { .mcard, .mcard__turn { transition: none; } .mcard.is-new, .match__stand .mcard { animation: none; } }
@media (max-height: 760px) { /* short phones: the card is short too, so its back packs tighter */
  .mcard__back { padding: 13px 14px 8px; }
  .mcard__back-name { font-size: 20px; }
  .mcard__label { margin-top: 9px; }
  .mcard__smell { margin-top: 4px; font-size: 12.5px; line-height: 1.32; }
  .mcard__wear { margin-top: 5px; }
  .mcard__wear li { padding: 3px 7px; }
  .mcard__when { margin-top: 4px; font-size: 12px; }
  .mcard__back .mcard__notes { gap: 2px; margin-top: 4px; font-size: 12px; }
  .mcard__back .mcard__notes dd { -webkit-line-clamp: 1; }
}
@media (max-height: 700px) { .match__lede { display: none; } }
@media (max-width: 820px) { /* phones: once the intro line is gone, the card takes the room it leaves */
  .match:has(.match__lede[hidden]) .match__deck { height: clamp(330px, calc(100svh - 336px), 520px); }
}
@media (max-width: 820px) and (max-height: 700px) {
  .match__deck { height: clamp(330px, calc(100svh - 336px), 520px); }
}
@media (max-width: 520px) { /* phones: the text keeps to fixed lines, so the bottle gets the rest of the card */
  .mcard__face { padding: 16px 14px 14px; }
  .mcard__pic { margin-top: 10px; }
  .mcard__body { padding-top: 10px; }
  .mcard__by, .mcard__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mcard__accords { max-height: 22px; overflow: hidden; margin-top: 8px; } /* one row: chips that don't fit drop out */
  .mcard__accords li { line-height: 14px; }
  .mcard__notes { margin-top: 8px; }
  .mcard__meta { margin-top: 7px; }
}

/* ---- home, made easier to use -----------------------------------------------------
   Three clear ways in (snap, type, ask the orb), all on one screen, in words people can read. */
.bar__status { display: none; }
.home { align-content: center; padding-top: 88px; }
.home h1 { font-size: clamp(56px, min(7.6vw, 11.5svh), 116px); line-height: .86; }
.home__lede { margin-top: 20px; font-size: 18px; color: #d9d1cc; max-width: 36ch; }
.home__facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 14px; color: var(--ink-faint); }
.home__facts span { display: inline-flex; align-items: center; gap: 5px; }
.home__facts span + span::before { content: ''; width: 4px; height: 4px; margin-right: 11px; background: var(--rose); }
.home__facts b { color: var(--ink); font-weight: 600; }

.slot { padding: 14px 14px 12px; }
.slot label { margin-bottom: 9px; font: 600 15px/1.3 var(--display); letter-spacing: 0; text-transform: none; color: var(--ink); }
.slot__field { position: relative; }
.slot__field svg { position: absolute; left: 15px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: rgba(240, 234, 230, .6); pointer-events: none; }
.slot input { padding-left: 46px; background: rgba(0, 0, 0, .5); }
.slot input:focus-visible { outline: 2px solid var(--rose); outline-offset: 0; }
.slot input::placeholder { color: rgba(240, 234, 230, .5); }
.slot__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.slot__chips button {
  min-height: 34px; padding: 0 12px; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .3); color: #ddd5d0; font: 500 13.5px var(--display);
  box-shadow: inset 0 0 0 1px rgba(240, 234, 230, .2); transition: background .2s, color .2s;
}
.slot__chips button:hover, .slot__chips button:focus-visible { background: var(--ink); color: var(--dark); }

.seer__caption small { font: 500 14px/1.3 var(--display); letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.seer__caption span { margin-top: 5px; font: 400 13.5px var(--display); letter-spacing: 0; text-transform: none; color: var(--ink-faint); }

.monolith, .monolith-depth { transform: rotateY(-11deg); height: min(calc(100svh - 200px), 600px); }
.plate { font: 500 12px var(--mono); letter-spacing: .08em; }
.niche__idle::before { height: 34px; margin-bottom: 16px; }
.niche__cta {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; padding: 12px 20px;
  background: var(--rose-fill); color: #fff; font: 600 16px/1 var(--display);
  box-shadow: inset 0 1.5px 0 rgba(255, 220, 228, .45), 0 10px 18px -8px rgba(0, 0, 0, .9);
  transition: background .2s, color .2s;
}
.niche__cta svg { width: 20px; height: 20px; }
.niche:hover .niche__cta, .niche:focus-visible .niche__cta { background: var(--ink); color: var(--dark); }
.niche:hover .niche__idle strong { letter-spacing: .06em; }
.monolith__note { font-size: 14px; color: rgba(248, 222, 227, .9); }

@media (max-width: 820px) {
  .home { min-height: 0; align-content: start; gap: 18px; padding-top: 72px; padding-bottom: 36px; }
  .home h1 { font-size: clamp(46px, 14vw, 76px); }
  .home__lede { margin-top: 10px; font-size: 16px; }
  .home__facts { margin-top: -6px; font-size: 13px; }
  .monolith, .monolith-depth { width: min(88vw, 380px); height: min(48svh, 420px); min-height: 320px; transform: rotateY(-6deg); }
  .niche__idle strong { font-size: 28px; }
  .monolith__note { margin-top: 12px; font-size: 13px; }
  .seer { margin-top: 0; }
}
@media (max-width: 400px) {
  .seer__caption small, .seer__caption span { font-size: 13px; letter-spacing: 0; }
}
@media (max-width: 820px) {
  .home { gap: 14px; padding-top: 66px; }
  .home__lede { font-size: 15.5px; line-height: 1.4; }
  .home__facts span:nth-child(n+3) { display: none; } /* two facts fit one line on a phone */
  .monolith, .monolith-depth { height: min(40svh, 360px); min-height: 280px; }
  .monolith .face { padding: 16px 16px 14px; }
  .niche { margin-top: 12px; }
  .niche__idle::before { display: none; }
  .niche__idle strong { font-size: 24px; }
  .niche__cta { margin-top: 14px; padding: 11px 18px; }
  .monolith__note { margin-top: 10px; }
}
/* results open right under the search field (the popular picks step aside meanwhile) */
.slot__results { top: calc(14px + 15px * 1.3 + 9px + 52px); bottom: auto; left: 14px; right: 14px; }
.slot__results:not(:empty) ~ .slot__chips { visibility: hidden; }
.slot input::-webkit-search-cancel-button { filter: grayscale(1) brightness(2.2); cursor: pointer; }
/* the orb comes first, the name search right under it */
.home .seer { margin-top: clamp(18px, 3.5svh, 30px); }
.home .slot { margin-top: 12px; }
@media (max-width: 820px) {
  .home .seer { order: 3; margin-top: 0; }
  .home .slot { order: 4; margin-top: 0; }
}

/* ---- seven slabs on the ring (Similar joined the six) --------------------------------
   R = W / (2·tan(180°/7)) + gap. */
:root { --R: calc(var(--W) * 1.038 + 46px); }
.slab { transform: rotateY(calc(var(--i) * 51.4286deg)) translateZ(var(--R)); }
@media (max-width: 520px) {
  .ties { gap: 0; padding-left: 4px; padding-right: 4px; }
  .ties button { flex: 1 1 0; min-width: 0; max-width: 66px; letter-spacing: .04em; }
}

/* similar: a list of look-alikes, each with its bottle */
.alike { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.alike__head { margin-top: 20px; }
.alike__item {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px;
  width: 100%; padding: 8px 10px 8px 8px; border: 0; text-align: left; cursor: pointer; color: inherit; text-decoration: none;
  background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(240, 234, 230, .1);
  transition: background .2s, box-shadow .2s;
}
.alike__item:hover, .alike__item:focus-visible { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(231, 158, 172, .45); }
.alike__pic { position: relative; display: grid; place-items: center; width: 52px; height: 60px; overflow: hidden; background: linear-gradient(180deg, #0b0a0a, #232020); }
.alike__pic img { width: 100%; height: 100%; object-fit: cover; }
.alike__pic.is-bottle img { object-fit: contain; padding: 4px; }
.alike__pic b { font: 900 30px/1 var(--display); font-stretch: 62%; color: rgba(231, 158, 172, .55); }
.alike__txt { min-width: 0; line-height: 1.25; }
.alike__txt b { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alike__txt > span { display: block; font-size: 12.5px; color: var(--ink-soft); }
.alike__txt small { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alike__pct { font: 800 22px/1 var(--display); font-stretch: 75%; font-style: normal; color: var(--rose); }
.alike__pct small { font-size: 13px; }
.tag--budget { display: inline-block; margin-left: 6px; padding: 1px 6px; font: 600 10.5px/1.5 var(--display); font-style: normal; letter-spacing: .02em; color: #1b1405; background: #ffd27a; vertical-align: 1px; }
.tag--budget { margin-top: 0; }

/* ---- header: about, saved ------------------------------------------------------- */
.bar__nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.bar .bar__nav .btn { margin-left: 4px; }
.bar__link {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px;
  border: 0; background: rgba(15, 14, 14, .35); color: var(--ink); cursor: pointer;
  font: 600 14px var(--display); text-shadow: 0 2px 6px rgba(0, 0, 0, .7);
  box-shadow: inset 0 0 0 1px rgba(240, 234, 230, .16); transition: background .2s, box-shadow .2s;
}
.bar__link:hover, .bar__link:focus-visible { background: rgba(240, 234, 230, .12); box-shadow: inset 0 0 0 1px rgba(240, 234, 230, .4); }
.bar__saved svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.bar__saved.has-items svg { fill: var(--rose); stroke: var(--rose); }
.bar__account svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bar__account.is-in svg { stroke: var(--rose); }
.bar__account span { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .bar__link { padding: 0 10px; font-size: 13px; }
  /* phones: the account and saved buttons are icons (the saved count stays); both keep their aria-label */
  .bar__account span, .bar__saved:not(.has-items) #savedCount { display: none; }
  .bar .bar__nav .btn { padding: 0 12px; }
}

/* small icons inside buttons */
.ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.id-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.id-acts .btn { min-height: 40px; padding: 0 14px; font-weight: 600; font-size: 14px; }
.id-save[aria-pressed=true] { background: var(--rose-fill); color: #fff; box-shadow: none; }
.id-save[aria-pressed=true] .ico { fill: #fff; }
.match__end-acts .btn .ico { margin-right: 2px; }

/* ---- dialogs: drawer, about sheet -------------------------------------------------- */
dialog { padding: 0; border: 0; color: var(--ink); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(6, 4, 5, .72); }
@media (hover: hover) { dialog::backdrop { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); } }

.drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(420px, 100vw); height: 100dvh;
  display: none; flex-direction: column;
  background: var(--grain), linear-gradient(180deg, #24201f, #161413);
  box-shadow: -30px 0 60px -20px rgba(0, 0, 0, .9), inset 1px 0 0 rgba(240, 234, 230, .1);
}
.drawer[open] { display: flex; animation: drawerIn .28s cubic-bezier(.2, .7, .1, 1); }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: max(16px, env(safe-area-inset-top)) 16px 8px 20px; }
.drawer__title { font: 800 30px/1 var(--display); font-stretch: 70%; text-transform: uppercase; }
.drawer__close, .sheet__close {
  width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer;
  font: 300 32px/1 var(--display);
}
.drawer__close:hover, .sheet__close:hover { color: var(--rose); }
.drawer__tabs { display: flex; gap: 4px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); }
.drawer__tabs button {
  min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink-soft); cursor: pointer;
  font: 600 14.5px var(--display); box-shadow: inset 0 -2px 0 transparent;
}
.drawer__tabs button[aria-selected=true] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--rose); }
.drawer__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 0; }
.drawer__list { list-style: none; margin: 0; padding: 0; }
.drawer__list li { position: relative; }
.drawer__list .hit { padding: 12px 52px 12px 20px; }
.drawer__list li:first-child .hit { border-top: 0; }
.drawer__remove {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  border: 0; background: none; color: var(--ink-faint); font: 300 24px/1 var(--display); cursor: pointer;
}
.drawer__remove:hover { color: var(--rose); }
.drawer__empty { padding: 28px 20px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.drawer__empty b { color: var(--rose); }
.drawer__note { padding: 12px 20px max(14px, env(safe-area-inset-bottom)); font-size: 12.5px; color: var(--ink-faint); border-top: 1px solid var(--line); }

.sheet {
  width: min(560px, calc(100vw - 24px)); max-height: min(86dvh, 760px); margin: auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 26px 22px; background: var(--grain), linear-gradient(180deg, #2a2524, #191716);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .95), inset 0 1.5px 0 rgba(255, 236, 240, .14);
}
.sheet[open] { animation: sheetIn .25s cubic-bezier(.2, .7, .1, 1); }
@keyframes sheetIn { from { transform: translateY(14px); opacity: 0; } }
.sheet__close { position: absolute; right: 8px; top: 8px; }
.sheet__title { padding-right: 40px; font: 800 38px/.95 var(--display); font-stretch: 66%; text-transform: uppercase; }
.sheet__lede { margin-top: 12px; font-size: 16px; line-height: 1.5; color: #ddd5d0; }
.sheet h3 { margin: 22px 0 8px; font: 700 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--rose); }
.sheet__steps, .sheet__list { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }
.sheet__steps b, .sheet__list b { color: var(--ink); }
.sheet .fine { margin-top: 18px; }

/* ---- accounts ------------------------------------------------------------------
   One sheet: sign in / make an account when signed out; the account and its settings when signed in. */
.drawer__link { padding: 0; border: 0; background: none; font: inherit; color: var(--rose); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.account__switch { display: flex; gap: 4px; margin-top: 18px; border-bottom: 1px solid var(--line); }
.account__switch button {
  min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink-soft); cursor: pointer;
  font: 600 14.5px var(--display); box-shadow: inset 0 -2px 0 transparent;
}
.account__switch button[aria-pressed=true] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--rose); }
.account__form { margin-top: 18px; }
.account__pass { position: relative; }
.account__pass input { padding-right: 70px !important; }
.account__peek {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 10px;
  border: 0; background: none; color: var(--ink-soft); cursor: pointer;
  font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.account__peek:hover, .account__peek:focus-visible { color: var(--ink); }
.account__stats { display: flex; gap: 8px; margin-top: 20px; }
.account__stats li {
  flex: 1; padding: 14px 8px 12px; text-align: center;
  background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px var(--line);
}
.account__stats b { display: block; font: 800 34px/1 var(--display); font-stretch: 70%; color: var(--ink); }
.account__stats span { display: block; margin-top: 6px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.account__acts { margin-top: 18px; }
.account__more { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.account__more summary { min-height: 32px; display: flex; align-items: center; cursor: pointer; font: 600 15px var(--display); color: var(--ink); }
.account__more summary::after { content: '+'; margin-left: auto; font: 500 18px var(--mono); color: var(--ink-soft); }
.account__more[open] summary::after { content: '−'; }
.account__more summary::-webkit-details-marker { display: none; }
.account__more .form { margin-top: 12px; }
.account__more .fine { margin-top: 0; }
.account__danger summary { color: #ff9b9b; }
.account__delete { color: #ff9b9b; box-shadow: inset 0 0 0 1.5px rgba(255, 155, 155, .7); }
.account__delete:hover { background: #ff9b9b; color: var(--dark); }
.account__as { font-size: 16px; font-weight: 600; }
@media (max-width: 400px) { /* small phones: a little less air in the bar so everything fits */
  .bar { gap: 10px; }
  .bar__nav { gap: 4px; }
  .bar__link { padding: 0 9px; }
  .bar .bar__nav .btn { padding: 0 10px; }
}
@media (max-width: 340px) { .mark { font-size: 17px; letter-spacing: .16em; } } /* the smallest phones: a smaller name, so the buttons fit beside it */

:root { --stones: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='150'%3E%3Cg fill='%23fff' fill-opacity='.028'%3E%3Crect x='62' y='3' width='106' height='46'/%3E%3Crect x='122' y='53' width='86' height='46'/%3E%3Crect x='0' y='103' width='78' height='46'/%3E%3C/g%3E%3Cg fill='%23000' fill-opacity='.16'%3E%3Crect x='172' y='3' width='68' height='46'/%3E%3Crect x='22' y='53' width='96' height='46'/%3E%3Crect x='182' y='103' width='58' height='46'/%3E%3C/g%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.6' stroke-width='3'%3E%3Cpath d='M0 1.5h240M0 51.5h240M0 101.5h240'/%3E%3Cpath d='M60 0v50M170 0v50M20 50v50M120 50v50M210 50v50M80 100v50M180 100v50'/%3E%3C/g%3E%3Cg stroke='%23fff' stroke-opacity='.05'%3E%3Cpath d='M0 4h240M0 54h240M0 104h240'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 240px 150px; }
/* ==== the wizard's room: the home page ==============================================================
   A stone room at night, built in 3D: a wall with the moonlit window, a wooden floor with a rug, a shelf
   on the wall (the book), a table (the orb) and the fireplace (the potion). The concrete room and its
   monoliths stay for the fragrance pages.

   Units: the room is drawn on a 144 × 90 grid (a phone's: 39 × 84.4) where 1em is one square, so it
   scales with the screen and stays sharp (no scaling of pictures). The camera is a CSS perspective whose
   eye sits --eye above the bottom of the screen; the world's origin is the middle of the bottom edge of
   the screen, on the floor. Each piece: --x (right), --y (up from the floor), --z (towards you; the wall
   is at -var(--wall)). Boxes have --w, --h, --d. Chrome draws a face that is turned in 3D at low
   resolution, so everything with words or pictures on it (the relics, labels, props) stands square to the
   eye; only wood, stone and floor are turned. The eye follows the mouse or the phone's tilt (--px, --py). */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.study {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; overflow: clip; pointer-events: none; /* clip: focusing a relic must not scroll the room */
  font-size: min(calc(100vw / 144), calc(100svh / 90));
  --P: 100em; --eye: 70em; --wall: 46em; --front: 6em; --ww: max(250em, calc(146vw + 40em)); --wh: max(120em, calc(146svh - 26em));
  background: #0b090b;
}
.study__cam {
  position: absolute; inset: 0; perspective: var(--P);
  perspective-origin: calc(50% + var(--px, 0em)) calc(100% - var(--eye) + var(--py, 0em));
}
/* No opacity on the world itself: Chrome flattens a 3D scene whose root fades (even once the fade is over),
   so the room fades in on .study and only steps closer on the world. */
.study { animation: room-in 1s ease-out backwards; }
@keyframes room-in { from { opacity: 0; } }
.study__world { position: absolute; left: 50%; top: 100%; width: 0; height: 0; transform-style: preserve-3d; animation: step-in 1.6s cubic-bezier(.2, .7, .1, 1) backwards; }
@keyframes step-in { from { transform: translateZ(-14em); } }
.study__world > * { position: absolute; left: 0; top: 0; }

/* the walls and the floor */
.wall {
  width: var(--ww); height: var(--wh); left: calc(var(--ww) / -2); top: calc(var(--wh) * -1);
  transform: translateZ(calc(var(--wall) * -1));
  background:
    var(--vig, linear-gradient(transparent, transparent)),
    radial-gradient(ellipse 22em 38em at calc(50% + var(--bx) + 4em) calc(100% - 26em), rgba(0, 0, 0, .55), transparent 70%),
    radial-gradient(ellipse 34em 34em at calc(50% + var(--winx)) calc(100% - var(--winy) - 20em), rgba(170, 150, 255, .2), transparent 70%),
    radial-gradient(ellipse 40em 34em at calc(50% + var(--hx)) calc(100% - 8em), rgba(255, 128, 56, .3), transparent 70%),
    radial-gradient(circle 15em at calc(50% - var(--lx)) calc(100% - var(--ly) - 4em), rgba(255, 196, 120, .22), transparent 70%),
    radial-gradient(circle 15em at calc(50% + var(--lx)) calc(100% - var(--ly) - 4em), rgba(255, 196, 120, .22), transparent 70%),
    radial-gradient(ellipse 30em 40em at calc(50% + var(--bx)) calc(100% - 30em), rgba(255, 170, 100, .07), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, .25) 30%, rgba(0, 0, 0, .12) 45%, rgba(0, 0, 0, .12) 82%, rgba(0, 0, 0, .6)),
    var(--grain), var(--stones),
    linear-gradient(180deg, #0f0b0f, #19141a 50%, #130f13);
  background-size: auto, auto, auto, auto, auto, auto, auto, auto, auto, 24em 15em, auto;
}
.wall > * { position: absolute; }
.wall__post { /* timber posts in the corners, where the back wall meets the side walls */
  bottom: 0; height: 100%; width: 5em; left: calc(50% + var(--xs) - 2.5em);
  background: linear-gradient(90deg, #120a06, #2e1d12 30%, #3a2416 55%, #160d08); box-shadow: 0 0 3em rgba(0, 0, 0, .8);
}
.wall__post.is-l { left: calc(50% - var(--xs) - 2.5em); }
.wall__beam { /* the crossbeam under the ceiling, the herbs hang from it */
  left: 0; right: 0; bottom: 84em; height: 4.6em;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .14) 0 .14em, transparent .14em 3em), linear-gradient(180deg, #2a1a10, #4a2f1f 30%, #3a2416 70%, #160d08);
  box-shadow: 0 1.4em 2.4em rgba(0, 0, 0, .7);
}
.wall__herbs { left: calc(50% - 22em); bottom: 68em; width: 86em; filter: drop-shadow(0 1em 1em rgba(0, 0, 0, .6)); }
.wall__banner { left: calc(50% - 28em - 3.5em); bottom: 40em; width: 7em; filter: drop-shadow(0 1em 1.4em rgba(0, 0, 0, .6)); }
.wall__window { left: calc(50% + var(--winx) - var(--winw) / 2); bottom: var(--winy); width: var(--winw); filter: drop-shadow(0 1.8em 3em rgba(0, 0, 0, .7)); }
.wall__stars circle { animation: twinkle 3.2s ease-in-out infinite; }
.wall__stars circle:nth-child(3n) { animation-delay: -1.1s; } .wall__stars circle:nth-child(3n+1) { animation-delay: -2.2s; }
@keyframes twinkle { 50% { opacity: .35; } }
.wall__wains { /* dark wooden panelling round the bottom of the wall */
  left: 0; right: 0; bottom: 0; height: 13em;
  background:
    linear-gradient(180deg, #4a2f1f 0 .5em, #1a0f09 .5em 1.4em, transparent 1.4em),
    repeating-linear-gradient(90deg, #1a0f09 0 .5em, transparent .5em 12em),
    linear-gradient(180deg, transparent 0 2.6em, rgba(0, 0, 0, .3) 2.6em 2.8em, transparent 2.8em calc(100% - 2.8em), rgba(255, 220, 180, .05) calc(100% - 2.8em) calc(100% - 2.6em), transparent 0),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 .1em, transparent .1em 1.2em),
    linear-gradient(180deg, #2e1d12, #22150d);
  box-shadow: 0 -.4em 1.4em rgba(0, 0, 0, .5);
}
.side { /* the side walls, in shadow: they turn the backdrop into a room */
  --sdp: calc(var(--wall) + 26em); /* far enough forward to leave the screen, even a very wide one */
  --sh: 100em; /* (the top of a side wall leaves the screen below this) */
  width: var(--sdp); height: var(--sh); left: calc(var(--sdp) / -2); top: calc(var(--sh) * -1);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .7), transparent 40%, transparent 85%, rgba(0, 0, 0, .5)),
    linear-gradient(var(--sdir), rgba(3, 2, 4, .92) 10%, rgba(3, 2, 4, .55) 60%, rgba(3, 2, 4, .3)),
    var(--grain), var(--stones), linear-gradient(180deg, #120e12, #1d171c 50%, #171216);
  background-size: auto, auto, auto, 24em 15em, auto;
}
.side.is-l { --sdir: 90deg; transform: translate3d(calc(var(--xs) * -1), 0, calc((26em - var(--wall)) / 2)) rotateY(90deg); }
.side.is-r { --sdir: 270deg; transform: translate3d(var(--xs), 0, calc((26em - var(--wall)) / 2)) rotateY(-90deg); }
.side.is-l::after { /* the fire's light reaching the left wall */
  content: ''; position: absolute; right: 0; bottom: 0; width: 50%; height: 50%;
  background: radial-gradient(ellipse at 100% 100%, rgba(255, 128, 56, .22), transparent 70%);
}
.floor {
  --fd: calc(var(--wall) + var(--front));
  width: var(--ww); height: var(--fd); left: calc(var(--ww) / -2); top: calc(var(--fd) / -2);
  transform: translateZ(calc((var(--front) - var(--wall)) / 2)) rotateX(90deg);
  background:
    var(--vig, linear-gradient(transparent, transparent)),
    linear-gradient(180deg, rgba(0, 0, 0, .75), transparent 26%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .45) 0 .25em, transparent .25em 9em),
    repeating-linear-gradient(180deg, transparent 0 17.8em, rgba(0, 0, 0, .3) 17.8em 18em),
    repeating-linear-gradient(90deg, rgba(255, 220, 180, .025) 0 .1em, transparent .1em 1.1em),
    linear-gradient(180deg, #1e130c, #322117 60%, #3a2819);
}
.floor > i { position: absolute; left: calc(50% + var(--x, 0em)); top: calc(var(--wall) + var(--z, 0em)); transform: translate(-50%, -50%); }
.floor__rug { /* a woven rug under the table: borders, a field of diamonds, a medallion in the middle */
  --x: var(--tx); --z: calc(var(--tz) + 3em); width: var(--rw); height: var(--rd); border-radius: .4em;
  border: 1.3em solid #35112b;
  background:
    radial-gradient(ellipse 22% 30% at 50% 50%, #e0b06a 0 14%, #7a2a4e 15% 52%, #c79a5b 53% 57%, transparent 58%),
    radial-gradient(ellipse 34% 44% at 50% 50%, transparent 72%, rgba(199, 154, 91, .45) 73% 76%, transparent 77%),
    repeating-linear-gradient(45deg, rgba(255, 210, 150, .07) 0 .35em, transparent .35em 1.8em),
    repeating-linear-gradient(-45deg, rgba(255, 210, 150, .07) 0 .35em, transparent .35em 1.8em),
    radial-gradient(closest-side, #62244c, #4a1838 70%, #3a1230);
  box-shadow: inset 0 0 0 .45em #c79a5b, inset 0 0 0 2.2em #2c0f25, inset 0 0 0 2.6em rgba(199, 154, 91, .8), 0 0 2em rgba(0, 0, 0, .7);
}
.floor__rug::before, .floor__rug::after { /* the fringe */
  content: ''; position: absolute; top: 0; bottom: 0; width: 1.2em; left: -2.5em;
  background: repeating-linear-gradient(180deg, #cdb58a 0 .22em, transparent .22em .6em);
}
.floor__rug::after { left: auto; right: -2.5em; }
.floor__shade { border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); }
.floor__shade.is-table { width: calc(var(--tw) * 1.15); height: calc(var(--td) * 1.6); --x: var(--tx); --z: calc(var(--tz) + 1em); }
.floor__shade.is-hearth { width: calc(var(--hw) + 14em); height: 14em; --x: var(--hx); --z: calc(var(--wall) * -1 + 4em); }
.floor__shade.is-case { width: calc(var(--bw) + 10em); height: 14em; --x: var(--bx); --z: calc(var(--wall) * -1 + 4em); }
.floor__fire { width: 56em; height: 34em; border-radius: 50%; --x: var(--hx); --z: calc(var(--wall) * -1 + var(--hd) + 10em); background: radial-gradient(closest-side, rgba(255, 130, 56, .4), rgba(255, 110, 40, .12) 60%, transparent); animation: fireglow 2.4s ease-in-out infinite; }
.floor__moon { width: 40em; height: 20em; border-radius: 50%; --x: var(--tx); --z: calc(var(--tz) + var(--td) * .5 + 5em); background: radial-gradient(closest-side, rgba(200, 185, 255, .16), transparent); }
@keyframes fireglow { 50% { opacity: .65; } }

/* a box: four faces around a point on its bottom (the back and the bottom are never seen) */
.box { transform-style: preserve-3d; transform: translate3d(var(--x, 0em), calc(var(--y, 0em) * -1), var(--z, 0em)); }
.box > i { position: absolute; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.box > .bf { left: calc(var(--w) / -2); top: calc(var(--h) * -1); width: var(--w); height: var(--h); transform: translateZ(calc(var(--d) / 2)); }
.box > .bt { left: calc(var(--w) / -2); top: calc(var(--h) * -1 - var(--d) / 2); width: var(--w); height: var(--d); transform: rotateX(90deg); }
.box > .bl { left: calc(var(--w) / -2 - var(--d) / 2); top: calc(var(--h) * -1); width: var(--d); height: var(--h); transform: rotateY(-90deg); }
.box > .br { left: calc(var(--w) / 2 - var(--d) / 2); top: calc(var(--h) * -1); width: var(--d); height: var(--h); transform: rotateY(90deg); }
/* things standing square to the eye, by the middle of their bottom edge (a label: by its middle) */
.prop, .spot, .sign { transform: translate3d(var(--x, 0em), calc(var(--y, 0em) * -1), var(--z, 0em)) translate(-50%, -100%); }
.sign { transform: translate3d(var(--x, 0em), calc(var(--y, 0em) * -1), var(--z, 0em)) translate(-50%, -50%) scale(var(--sz, 1)); }
svg.prop { overflow: visible; }

/* wood */
.wood, .tbl-top > i, .tbl-apron > i, .tbl-leg > i, .hth-mantel > i, .bkc-body > i, .bkc-ledge > i, .chest > i {
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 .12em, transparent .12em 1.6em), linear-gradient(180deg, #4a2f1f, #2e1d12);
}
.tbl-top > .bt, .hth-mantel > .bt, .bkc-ledge > .bt, .bkc-body > .bt, .chest > .bt {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 12%, transparent 88%, rgba(0, 0, 0, .4)),
    radial-gradient(ellipse 40% 70% at 50% 60%, rgba(255, 200, 160, .16), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .13) 0 .12em, transparent .12em 2.2em),
    repeating-linear-gradient(90deg, transparent 0 7.8em, rgba(0, 0, 0, .35) 7.8em 8em),
    linear-gradient(180deg, #4e3221, #6e4a31 55%, #7d5538);
}
.tbl-top > .bf, .hth-mantel > .bf, .bkc-ledge > .bf { background: linear-gradient(180deg, #9a6d48, #5c3b26 25%, #3a2416); }
.tbl-apron > .bf {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .5), transparent 6%, transparent 94%, rgba(0, 0, 0, .5)),
    linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 30%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 .12em, transparent .12em 1.4em),
    linear-gradient(180deg, #3e2819, #2a1a10);
}
.tbl-leg > .bf { background: linear-gradient(90deg, #2a1a10, #4a2f1f 40%, #2e1d12); }
.chest > .bf { /* a sea chest: planks, brass bands, a lock */
  background:
    radial-gradient(circle at 50% 42%, #e3b86a 0 .5em, #8a5e2c .5em .7em, transparent .75em),
    linear-gradient(90deg, transparent 0 14%, #b8863f 14% 19%, transparent 19% 81%, #b8863f 81% 86%, transparent 86%),
    linear-gradient(180deg, #b8863f 0 .35em, transparent .35em),
    repeating-linear-gradient(180deg, transparent 0 1.6em, rgba(0, 0, 0, .4) 1.6em 1.72em),
    linear-gradient(180deg, #5a3a26, #3a2416);
}
.box > .bl, .box > .br { box-shadow: inset 0 0 0 100em rgba(0, 0, 0, .45); } /* sides in shadow (a filter would cost a layer each) */
/* stone */
.hth-body > i, .hth-slab > i, .plinth > i { background: var(--grain), linear-gradient(180deg, #3e363b, #2a2428); }
.hth-body > .bt, .hth-slab > .bt, .plinth > .bt { background: var(--grain), linear-gradient(180deg, #3a3236, #5a5055); }
.hth-slab > .bf { background: var(--grain), linear-gradient(180deg, #6a5e63 0 .25em, #3d3539 .25em, #2a2428); }
.plinth > .bf { /* cut stone: a lit top edge, mortar between the blocks, warm light from the fire on it */
  background:
    linear-gradient(180deg, #8a7c82 0 .25em, transparent .25em),
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255, 150, 80, .22), transparent 70%),
    linear-gradient(90deg, transparent 0 32%, rgba(0, 0, 0, .55) 32% 33%, transparent 33% 66%, rgba(0, 0, 0, .55) 66% 67%, transparent 67%),
    linear-gradient(180deg, transparent 0 50%, rgba(0, 0, 0, .5) 50% 53%, transparent 53%),
    var(--grain), linear-gradient(180deg, #4e454a, #2e282c);
}
.plinth > .bt { background: radial-gradient(ellipse 50% 45% at 50% 55%, rgba(255, 150, 70, .4), transparent 75%), linear-gradient(90deg, transparent 49.5%, rgba(0, 0, 0, .45) 49.5% 50.5%, transparent 50.5%), var(--grain), linear-gradient(180deg, #2a2427, #423a3e); }
.hth-flare { animation: fireglow 2s ease-in-out infinite; }

/* little lights: candle flames flicker, glass glows */
.flame-still { filter: drop-shadow(0 0 .5em rgba(255, 180, 90, .9)); }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.8s ease-in-out infinite; filter: drop-shadow(0 0 .5em rgba(255, 180, 90, .9)); }
.c3 g:nth-of-type(2) .flame, .flame:nth-of-type(2) { animation-delay: -.6s; }
.b-glow, .glowjar { filter: drop-shadow(0 0 .7em color-mix(in srgb, var(--g) 55%, transparent)); }
.lamp svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lamp__glow { /* the warm light round a lantern */
  position: absolute; left: 50%; bottom: 5.6em; width: 30em; height: 30em; border-radius: 50%; transform: translate(-50%, 50%);
  background: radial-gradient(closest-side, rgba(255, 196, 110, .34), rgba(255, 160, 80, .12) 45%, transparent);
  animation: lampglow 3.4s ease-in-out infinite;
}
.lamp.is-r .lamp__glow { animation-delay: -1.7s; }
@keyframes lampglow { 0%, 100% { opacity: 1; } 40% { opacity: .78; } 55% { opacity: .92; } }
.owl__eyes { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.cat__body { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.015, 1.04); } }
.dust { pointer-events: none; }
.dust > i { /* specks drifting in the moonlight */
  position: absolute; width: .3em; height: .3em; border-radius: 50%; background: #f2e8ff; box-shadow: 0 0 .5em #d8c8ff;
  left: var(--dx); top: var(--dy); opacity: 0; animation: drift var(--dt, 9s) linear infinite; animation-delay: var(--dd, 0s);
}
@keyframes drift { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: .8; } 80% { opacity: .6; } 100% { opacity: 0; transform: translate(2em, 8em); } }

/* light over the whole scene: darker corners and a dark ceiling, so the lit things glow */
.study__light, .study__fire { position: absolute; inset: 0; pointer-events: none; }
.study__light {
  background:
    radial-gradient(ellipse 72% 78% at 50% 62%, transparent 42%, rgba(6, 3, 8, .5) 78%, rgba(3, 1, 4, .88) 100%),
    linear-gradient(180deg, rgba(5, 3, 7, .55), transparent 22%),
    linear-gradient(0deg, rgba(5, 3, 7, .5), transparent 14%);
}
.study__fire { /* the fire's light on everything near it, breathing */
  inset: auto; left: calc(50% + var(--hx) * .72 - 26em); bottom: 4em; width: 52em; height: 46em; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 120, 50, .17), rgba(255, 100, 40, .06) 55%, transparent);
  animation: fireglow 3.1s ease-in-out infinite;
}

/* ---- where everything stands: a computer's wide screen ---- */
.study {
  --xs: 82em;                                                         /* the side walls */
  --tx: 0em; --tz: -14em; --tw: 46em; --td: 18em; --th: 19em;         /* the table */
  --hx: -50em; --hw: 30em; --hh: 32em; --hd: 8em;                     /* the fireplace */
  --bx: 50em; --bw: 30em; --bh: 60em; --bd: 9em;                      /* the bookcase */
  --winx: 0em; --winy: 30em; --winw: 40em;                            /* the window */
  --lx: 26em; --ly: 62em;                                             /* the lanterns */
  --rw: 66em; --rd: 30em;                                             /* the rug */
}
.tbl-top { --x: var(--tx); --y: calc(var(--th) - 2em); --z: var(--tz); --w: var(--tw); --d: var(--td); --h: 2em; }
.tbl-apron { --x: var(--tx); --y: calc(var(--th) - 6.4em); --z: var(--tz); --w: calc(var(--tw) - 1em); --d: calc(var(--td) - 1em); --h: 4.4em; }
.tbl-leg { --w: 2.4em; --d: 2.4em; --h: calc(var(--th) - 2em); --y: 0em; }
.tbl-leg.is-fl, .tbl-leg.is-bl { --x: calc(var(--tx) - var(--tw) / 2 + 2.8em); }
.tbl-leg.is-fr, .tbl-leg.is-br { --x: calc(var(--tx) + var(--tw) / 2 - 2.8em); }
.tbl-leg.is-fl, .tbl-leg.is-fr { --z: calc(var(--tz) + var(--td) / 2 - 2.8em); }
.tbl-leg.is-bl, .tbl-leg.is-br { --z: calc(var(--tz) - var(--td) / 2 + 2.8em); }
.spot.at-orb { --x: var(--tx); --y: var(--th); --z: calc(var(--tz) + 1em); }
.sign.at-orb { --x: var(--tx); --y: calc(var(--th) - 4.3em); --z: calc(var(--tz) + var(--td) / 2 - .4em); }
.c3.on-table { --x: calc(var(--tx) - 16em); --y: var(--th); --z: calc(var(--tz) - 3em); width: 6.4em; }
.perfumes { --x: calc(var(--tx) + 16em); --y: var(--th); --z: calc(var(--tz) - 2em); width: 10em; }
.beam { --x: var(--tx); --y: var(--th); --z: calc(var(--tz) - 4em); width: 38em; height: 40em; pointer-events: none;
  background: linear-gradient(180deg, rgba(196, 180, 255, 0), rgba(196, 180, 255, .2) 18%, rgba(230, 190, 230, .1) 75%, transparent);
  clip-path: polygon(37% 0, 63% 0, 100% 100%, 0 100%); filter: blur(1em); opacity: .85; }
.dust { --x: var(--tx); --y: calc(var(--th) + 4em); --z: calc(var(--tz) - 2em); width: 22em; height: 30em; }
.dust > i:nth-child(1) { --dx: 30%; --dy: 10%; --dt: 11s; }
.dust > i:nth-child(2) { --dx: 55%; --dy: 25%; --dt: 9s; --dd: -3s; }
.dust > i:nth-child(3) { --dx: 42%; --dy: 45%; --dt: 13s; --dd: -6s; }
.dust > i:nth-child(4) { --dx: 66%; --dy: 5%; --dt: 10s; --dd: -8s; }
.dust > i:nth-child(5) { --dx: 22%; --dy: 35%; --dt: 12s; --dd: -2s; }
.dust > i:nth-child(6) { --dx: 50%; --dy: 60%; --dt: 9.5s; --dd: -5s; }
.lamp { --x: calc(var(--lx) * var(--side)); --y: var(--ly); --z: -34em; width: 6em; height: 54.5em; pointer-events: none; }
.lamp.is-l { --side: -1; } .lamp.is-r { --side: 1; }
.lamp, .dust { transform: translate3d(var(--x, 0em), calc(var(--y, 0em) * -1), var(--z, 0em)) translate(-50%, -100%); }

.bkc-body { --x: var(--bx); --y: 0em; --z: calc(var(--wall) * -1 + var(--bd) / 2); --w: var(--bw); --d: var(--bd); --h: var(--bh); }
.bkc-face { --x: var(--bx); --y: 0em; --z: calc(var(--wall) * -1 + var(--bd) + .02em); width: var(--bw); }
.bkc-ledge { --x: var(--bx); --y: 18.6em; --z: calc(var(--wall) * -1 + var(--bd) + 1.4em); --w: calc(var(--bw) - .4em); --d: 2.8em; --h: 1.4em; }
.owl { --x: calc(var(--bx) + 8em); --y: var(--bh); --z: calc(var(--wall) * -1 + var(--bd) / 2 + 1em); width: 5.6em; }
.spot.at-book { --x: var(--bx); --y: 20em; --z: calc(var(--wall) * -1 + var(--bd) + 1.6em); }
.sign.at-book { --x: var(--bx); --y: 10.5em; --z: calc(var(--wall) * -1 + var(--bd) + .1em); }

.hth-body { --x: var(--hx); --y: 0em; --z: calc(var(--wall) * -1 + var(--hd) / 2); --w: var(--hw); --d: var(--hd); --h: var(--hh); }
.hth-face { --x: var(--hx); --y: 0em; --z: calc(var(--wall) * -1 + var(--hd) + .02em); width: var(--hw); height: var(--hh); }
.hth-mantel { --x: var(--hx); --y: var(--hh); --z: calc(var(--wall) * -1 + var(--hd) / 2 + 1em); --w: calc(var(--hw) + 4em); --d: calc(var(--hd) + 2em); --h: 2.4em; }
.hth-slab { --x: var(--hx); --y: 0em; --z: calc(var(--wall) * -1 + var(--hd) + 3.5em); --w: calc(var(--hw) + 4em); --d: 7em; --h: 1.4em; }
.mnt-jar { --x: calc(var(--hx) - var(--hw) / 2 + 3em); --y: calc(var(--hh) + 2.4em); --z: calc(var(--wall) * -1 + var(--hd) / 2 + 1em); width: 4.6em; }
.mnt-glass { --x: calc(var(--hx) + 3em); --y: calc(var(--hh) + 2.4em); --z: calc(var(--wall) * -1 + var(--hd) / 2 + 1em); width: 11em; }
.c3.on-mantel { --x: calc(var(--hx) + var(--hw) / 2 - 1.5em); --y: calc(var(--hh) + 2.4em); --z: calc(var(--wall) * -1 + var(--hd) / 2 + 1.6em); width: 5.4em; }
.garland { --x: var(--hx); --y: calc(var(--hh) - 2.8em); --z: calc(var(--wall) * -1 + var(--hd) + 2.06em); width: calc(var(--hw) + 4em); height: 5.2em; }
.spot.at-pot { --x: var(--hx); --y: 1.4em; --z: calc(var(--wall) * -1 + var(--hd) + 2.6em); }
.sign.at-pot { --x: var(--hx); --y: calc(var(--hh) - 6.4em); --z: calc(var(--wall) * -1 + var(--hd) + .1em); }
.plinth, .chest { display: none; }

.cat { --x: -36em; --y: 0em; --z: -24em; width: 14em; }
.logs { --x: -62em; --y: 0em; --z: -26em; width: 10em; }
.c3.on-floor { --x: -52em; --y: 0em; --z: -13em; width: 8em; }
.pile { --x: 31em; --y: 0em; --z: -19em; width: 8em; }
.plant { --x: 73em; --y: 0em; --z: -40em; width: 11em; }
.chair { --x: 64em; --y: 0em; --z: -12em; width: 21em; }
.scope { --x: -73em; --y: 0em; --z: -36em; width: 13em; }
.globe { --x: -27em; --y: 0em; --z: -38em; width: 10em; }

/* the relics' sizes, in the room's units */
.relic--orb .orb { --s: 18em; }
.relic--book .relic__art { width: 20em; }
.relic--pot .relic__art { width: 20em; }

/* the page over the room */
body[data-view=home] .home {
  position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end;
  max-width: none; min-height: 100svh; padding: 84px clamp(16px, 4vw, 48px) 22px; gap: 0; overflow: hidden; overflow: clip;
}
body[data-view=home] .home__text { position: absolute; z-index: 2; left: clamp(16px, 5vw, 72px); top: 96px; max-width: min(30vw, 400px); pointer-events: none; }
body[data-view=home] .home h1 { font-size: clamp(54px, min(6.2vw, 10svh), 96px); line-height: .86; white-space: nowrap; }
body[data-view=home] .home__lede { margin-top: 16px; font-size: 16.5px; line-height: 1.45; color: #ddd3ce; max-width: 32ch; text-shadow: 0 1px 2px #000, 0 0 16px rgba(0, 0, 0, .8); }
body[data-view=home] .home__facts { position: relative; z-index: 2; justify-content: center; margin-top: 16px; font-size: 13px; color: rgba(240, 234, 230, .6); text-shadow: 0 1px 2px #000; pointer-events: none; }
body[data-view=home] .room__box, body[data-view=home] .room__amb { display: none; }
body[data-view=home] .room { visibility: hidden; } /* the room covers it all; the dust canvas still shows in the orb's view, which takes it out of here */

/* the things you press */
.spot, .sign { pointer-events: auto; }
.candle__flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.8s ease-in-out infinite; filter: drop-shadow(0 0 6px #ffbf66) drop-shadow(0 0 16px rgba(255, 170, 90, .6)); }
@keyframes flicker { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(.92, 1.12) skewX(3deg); } 60% { transform: scale(1.06, .94) skewX(-2deg); } }
.relic {
  position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; font-size: inherit;
  -webkit-tap-highlight-color: transparent; transition: transform .35s cubic-bezier(.2, .7, .1, 1), filter .35s;
}
.relic:hover, .relic:focus-visible { transform: translateY(-.6em); filter: brightness(1.12) drop-shadow(0 0 2em rgba(255, 170, 200, .4)); }
.relic:active { transform: translateY(-.2em); }
.relic:focus-visible { outline: 2px solid var(--rose); outline-offset: 8px; }
.relic__art { display: block; overflow: visible; }
.relic--orb.is-lifted .orb { opacity: 0; }
.relic--orb::after { /* moonlight pooled on the table around the orb */
  content: ''; position: absolute; left: 50%; bottom: -1.2em; width: 190%; height: 4em; z-index: -1;
  transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(220, 200, 255, .3), transparent 70%);
}
.book__glow { animation: runeglow 3.6s ease-in-out infinite; }
@keyframes runeglow { 50% { opacity: .45; } }
.relic__sparks path { transform-box: fill-box; transform-origin: center; animation: spark 2.6s ease-in-out infinite; }
.relic__sparks path:nth-child(2) { animation-delay: -.9s; } .relic__sparks path:nth-child(3) { animation-delay: -1.7s; }
@keyframes spark { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
.pot__fire path { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.3s ease-in-out infinite; }
.pot__fire path:nth-child(2) { animation-duration: 1.1s; animation-delay: -.4s; } .pot__fire path:nth-child(3) { animation-duration: 1.5s; animation-delay: -.8s; }
.pot__embers, .pot__light { animation: runeglow 2.4s ease-in-out infinite; }
.pot__bubbles circle { transform-box: fill-box; transform-origin: center; animation: bubble 2.2s ease-in-out infinite; }
.pot__bubbles circle:nth-child(2) { animation-delay: -.7s; } .pot__bubbles circle:nth-child(3) { animation-delay: -1.3s; } .pot__bubbles circle:nth-child(4) { animation-delay: -1.8s; }
@keyframes bubble { 0% { transform: scale(0); opacity: 0; } 40% { opacity: .9; } 80% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.3); opacity: 0; } }
.pot__rise circle { animation: rise 3s ease-in infinite; }
.pot__rise circle:nth-child(2) { animation-delay: -1s; } .pot__rise circle:nth-child(3) { animation-delay: -2s; }
@keyframes rise { 0% { transform: translateY(14px); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-26px); opacity: 0; } }
.pot__steam path { animation: steam 4.5s ease-in-out infinite; }
.pot__steam path:nth-child(2) { animation-delay: -2.2s; }
@keyframes steam { 0% { transform: translateY(8px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-22px); opacity: 0; } }

/* where to press: the next one to try glows, with a pointer over it */
.relic__pointer {
  position: absolute; left: 50%; bottom: calc(100% + 1em); z-index: 2; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none;
  font: 700 max(11px, 1.3em)/1 var(--display); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: #ffe3ec;
  text-shadow: 0 0 12px rgba(255, 150, 190, .9), 0 1px 2px #000;
  opacity: 0; transition: opacity .5s;
}
.relic__pointer::after { content: '↓'; font-size: 1.7em; animation: nudge 1.3s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }
.relic.is-next .relic__pointer { opacity: 1; }
.relic.is-next::before { /* a soft ring of light where it stands */
  content: ''; position: absolute; left: 50%; bottom: -1em; width: 120%; aspect-ratio: 3.4; z-index: -1; transform: translateX(-50%);
  border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 190, 215, .55), 0 0 30px 8px rgba(255, 140, 185, .35);
  animation: halo 2s ease-in-out infinite;
}
@keyframes halo { 50% { opacity: .35; transform: translateX(-50%) scale(1.08); } }
.relic__badge {
  position: absolute; right: -.6em; top: .4em; z-index: 2; padding: .5em .8em; pointer-events: none;
  font: 600 max(9px, 1.05em)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  background: #2a1d26; color: #f3d3d8; box-shadow: inset 0 0 0 1px rgba(243, 211, 216, .4);
}
.relic__badge.is-new { background: var(--rose-fill); color: #fff; box-shadow: 0 0 16px rgba(255, 120, 170, .55); }

/* brass labels: screwed to the table's front, hung from the shelf, set in the fireplace */
.sign {
  display: grid; grid-template-columns: auto 1fr; column-gap: .9em; align-items: center; width: max-content; max-width: 26em;
  padding: .7em 1.1em .8em .8em; cursor: pointer;
  background: linear-gradient(180deg, #e9c98a, #c39552 45%, #9c6f36);
  box-shadow: inset 0 1px 0 #fff3cf, inset 0 -2px 0 rgba(60, 35, 10, .5), 0 .4em .8em rgba(0, 0, 0, .6);
  color: #3a240d; text-shadow: 0 1px 0 rgba(255, 240, 200, .5); transition: filter .25s;
}
.sign:hover { filter: brightness(1.1); }
.sign i {
  grid-row: span 2; display: grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: 50%;
  font: 800 1.4em/1 var(--display); font-style: normal; color: #f6e2b0; text-shadow: none;
  background: radial-gradient(circle at 35% 30%, #6b4420, #3a230d); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 240, 200, .5);
}
.sign i { width: 2.1em; height: 2.1em; font-size: 1.3em; }
.sign b { font: 800 1.35em/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.sign { font-family: var(--display); letter-spacing: 0; text-transform: none; }
.sign small { font: 500 1.1em/1.25 var(--display); letter-spacing: 0; text-transform: none; color: #5a3a17; white-space: nowrap; }
.sign { --sz: 1.2; } /* (scaled, not a bigger font: positions are in em too) */

/* ---- a phone held upright: the same room, arranged to fit a narrow screen ----
   The orb on the table in the middle, under the window's light; in front of it, either side, the book on a
   chest and the potion on a hearthstone. A small bookcase stands at the back on the left, under the words. */
@media (max-width: 820px) and (orientation: portrait) {
  .study {
    font-size: min(calc(100vw / 39), calc(100svh / 84.4));
    --P: 60em; --eye: 57.4em; --wall: 30em; --front: 4em; --ww: max(72em, calc(150vw + 12em)); --wh: max(108em, calc(150svh - 22em));
    --xs: 60em;
    --tx: 0em; --tz: -17em; --tw: 22em; --td: 11em; --th: 12em;
    --bx: -13.5em; --bw: 13em; --bh: 29em; --bd: 5em;
    --hx: 10em; --hw: 14em;
    --winx: 13em; --winy: 23em; --winw: 22em;
    --rw: 34em; --rd: 17em;
  }
  .side, .wall__post, .lamp, .hth-body, .hth-face, .hth-mantel, .hth-slab, .mnt-jar, .mnt-glass,
  .c3.on-mantel, .garland, .bkc-ledge, .owl, .logs, .globe, .cat, .pile, .plant, .chair, .perfumes, .floor__shade.is-hearth { display: none; }
  .wall__wains { height: 8em; }
  .wall__beam { bottom: 58em; height: 3.6em; }
  .wall__herbs { left: calc(50% - 30em); bottom: 46.8em; width: 60em; }
  .wall__banner { left: calc(50% - 19em - 3em); bottom: 31em; width: 6em; }
  .floor__shade.is-case { --z: -27em; }
  .floor__fire { width: 26em; height: 16em; --z: -4em; }
  /* no light layers over the whole screen on a phone (each costs a screenful of memory): the dark corners
     are painted into the wall and the floor instead, and the glow on the floor stands in for the fire's */
  .study__fire, .study__light { display: none; }
  .wall { --vig: radial-gradient(ellipse 34em 60em at 50% 100%, rgba(4, 2, 6, .15) 40%, rgba(3, 1, 4, .8)); }
  .floor { --vig: radial-gradient(ellipse 30em 40em at 50% 30%, transparent 45%, rgba(3, 1, 4, .7)); }
  .beam { --x: 4em; width: 22em; height: 26em; --z: -20em; clip-path: polygon(72% 0, 96% 0, 100% 100%, 0 100%); }
  .dust { --x: 4em; --y: 16em; --z: -18em; width: 14em; height: 22em; }
  .chest { display: block; --x: -12em; --y: 0em; --z: -5em; --w: 13em; --d: 8em; --h: 5em; }
  .plinth { display: block; --x: 12em; --y: 0em; --z: -5em; --w: 13em; --d: 8em; --h: 4.2em; }
  .spot.at-book { --x: -12.5em; --y: 5em; --z: -4.6em; }
  .spot.at-pot { --x: 12em; --y: 4.2em; --z: -5.4em; }
  .sign.at-book { --x: -12em; --y: 2.4em; --z: -.9em; }
  .sign.at-pot { --x: 10.6em; --y: 2.1em; --z: -.9em; }
  .sign.at-orb { --y: calc(var(--th) - 3.4em); --sz: .74; }
  .sign { --sz: .82; padding: .5em .9em .5em .5em; }
  .sign small { display: none; }
  .c3.on-table { --x: calc(var(--tx) - 8.6em); --z: calc(var(--tz) - 2em); width: 4em; }
  .c3.on-floor { --x: 17.5em; --z: -11em; width: 4.6em; }
  .scope { --x: 21em; --z: -27em; width: 8em; transform: translate3d(var(--x), calc(var(--y) * -1), var(--z)) translate(-50%, -100%) scaleX(-1); }
  .relic--orb .orb { --s: 14em; }
  .relic--book .relic__art { width: 15em; }
  .relic--pot .relic__art { width: 13em; }

  body[data-view=home] .home { padding: 72px 12px 14px; justify-content: flex-start; }
  body[data-view=home] .home__text { display: block; position: relative; left: auto; top: auto; max-width: none; }
  body[data-view=home] .home h1 { font-size: clamp(46px, 13.5vw, 68px); }
  body[data-view=home] .home__lede { margin-top: 10px; font-size: 15px; max-width: 25ch; }
  body[data-view=home] .home__facts { display: none; }
}
@media (max-width: 820px) and (orientation: portrait) and (max-height: 700px) { body[data-view=home] .home__lede { display: none; } }
@media (orientation: landscape) and (max-height: 520px) { /* a phone on its side: the heading alone, smaller */
  body[data-view=home] .home__lede { display: none; }
  body[data-view=home] .home__text { top: 70px; }
  body[data-view=home] .home h1 { font-size: clamp(32px, 9svh, 54px); }
}
@media (prefers-reduced-motion: reduce) {
  .relic:hover, .relic:focus-visible { transform: none; }
  .study__world { animation: none; }
}

/* ==== the enchanted book ============================================================================ */
dialog.tome, dialog.brew { max-width: none; max-height: none; padding: 0; border: 0; color: var(--ink); }
.tome::backdrop, .brew::backdrop { background: radial-gradient(circle at 50% 42%, rgba(70, 22, 46, .62), rgba(6, 4, 8, .94) 70%); }
.tome[open], .brew[open] { animation: open-in .32s cubic-bezier(.2, .7, .1, 1); }
@keyframes open-in { from { opacity: 0; } }
.tome { width: min(1000px, calc(100% - 24px)); margin: auto; background: transparent; overflow: visible; }
.tome__close, .brew__close {
  position: absolute; z-index: 3; top: -4px; right: -4px; width: 44px; height: 44px; border: 0; cursor: pointer;
  background: #1c1418; color: #f3e6cf; font-size: 26px; line-height: 1; box-shadow: inset 0 0 0 1.5px rgba(243, 230, 207, .5);
}
.tome__close:hover, .brew__close:hover { background: #f3e6cf; color: #1c1418; }
.tome__book { /* a leather cover with two parchment pages */
  display: grid; grid-template-columns: 1fr 1fr; padding: 16px; border-radius: 10px;
  background: var(--grain), linear-gradient(135deg, #6b2440, #43142a 50%, #2a0c1a);
  box-shadow: inset 0 0 0 2px #c8964f, inset 0 0 0 6px #43142a, inset 0 0 0 7px rgba(200, 150, 79, .6), 0 40px 80px -20px #000;
}
.tome__page {
  position: relative; min-height: min(600px, calc(100dvh - 80px)); max-height: calc(100dvh - 80px); overflow-y: auto;
  padding: 30px 34px 28px; color: #3a2216;
  background: var(--grain), radial-gradient(ellipse at 50% 40%, #f6ead4, #ead8b6 70%, #d9c095);
}
.tome__page--name { border-radius: 4px 0 0 4px; box-shadow: inset -30px 0 34px -22px rgba(90, 50, 20, .55); }
.tome__page--photo { border-radius: 0 4px 4px 0; box-shadow: inset 30px 0 34px -22px rgba(90, 50, 20, .55); display: flex; flex-direction: column; }
.tome__chapter { font: 500 11.5px var(--mono); letter-spacing: .24em; text-transform: uppercase; color: #8a5a34; }
.tome__title { margin-top: 6px; font: 800 clamp(30px, 3.4vw, 42px)/.95 var(--display); font-stretch: 70%; text-transform: uppercase; color: #4a1626; }
.tome__title::after { content: '❦'; display: block; margin-top: 8px; font-size: 18px; color: #a0703c; }
.tome__lede { margin-top: 8px; font-size: 15px; line-height: 1.45; color: #5d3d2b; }
.tome .slot { position: relative; max-width: none; margin-top: 16px; padding: 0; background: none; box-shadow: none; }
.tome .slot input {
  height: 54px; padding-left: 46px; color: #2b170e; font-size: 18px;
  background: rgba(255, 252, 244, .6); box-shadow: inset 0 0 0 1.5px #b08a5a, inset 0 3px 8px rgba(120, 80, 40, .2);
}
.tome .slot input::placeholder { color: rgba(80, 50, 30, .5); }
.tome .slot input:focus-visible { outline: 2px solid #8a2a48; }
.tome .slot input::-webkit-search-cancel-button { filter: none; }
.tome .slot__field svg { color: #8a5a34; }
.tome .slot__results { position: static; margin-top: 10px; max-height: none; background: none; box-shadow: none; }
.tome .slot__results:not(:empty) ~ .slot__chips { display: none; }
.tome .hit { color: #2b170e; border-top-color: rgba(110, 70, 35, .22); }
.tome .hit:hover, .tome .hit:focus-visible { background: rgba(140, 80, 40, .1); }
.tome .hit span { color: #7a5536; }
.tome .hit i { color: #9a2c4e; }
.tome .slot__chips { margin-top: 14px; }
.tome .slot__chips button { background: rgba(140, 90, 50, .12); color: #4a2a1a; box-shadow: inset 0 0 0 1px rgba(140, 90, 50, .4); }
.tome .slot__chips button:hover, .tome .slot__chips button:focus-visible { background: #4a1626; color: #f6ead4; }
.tome .empty { color: #6d4a33; }
/* the photo goes into a scrying mirror */
.tome .niche {
  flex: 1; min-height: 260px; margin: 16px 0 0; border-radius: 140px 140px 10px 10px;
  background: radial-gradient(ellipse at 50% 35%, #3a1830, #1a0a14 60%, #0c0509);
  box-shadow: inset 0 0 0 5px #c8964f, inset 0 0 0 7px #6e4a1f, inset 0 0 0 9px #e2bd7a, inset 0 20px 40px rgba(0, 0, 0, .8), 0 12px 24px -10px rgba(60, 30, 10, .6);
}
.tome .niche img { border-radius: inherit; }
.tome .niche__idle::before { display: none; }
.tome .niche__idle strong { font-size: clamp(24px, 2.6vw, 30px); color: #f6dfe6; }
.tome .is-picking .niche { flex: 0 0 150px; min-height: 150px; }
.tome .picker { margin: 14px 0 0; }
.tome .picker__title { color: #4a1626; text-shadow: none; }
.tome .picker ul { background: rgba(140, 90, 50, .1); box-shadow: inset 0 0 0 1px rgba(140, 90, 50, .3); }
.tome .picker .btn--line { color: #4a1626; box-shadow: inset 0 0 0 1.5px #4a1626; }
.tome .picker .btn--line:hover { background: #4a1626; color: #f6ead4; }
.tome .is-busy .niche::after { animation-name: sweep-mirror; }
@keyframes sweep-mirror { to { transform: translateY(240px); } }
@media (max-width: 820px) {
  .tome { width: 100%; height: 100%; max-height: 100dvh; margin: 0; overflow-y: auto; }
  .tome__book { grid-template-columns: 1fr; min-height: 100%; padding: 10px; border-radius: 0; }
  .tome__page { min-height: 0; max-height: none; overflow: visible; padding: 22px 18px 22px; }
  .tome__page--name { border-radius: 4px 4px 0 0; padding-top: 56px; box-shadow: inset 0 -26px 30px -22px rgba(90, 50, 20, .55); }
  .tome__page--photo { border-radius: 0 0 4px 4px; box-shadow: inset 0 26px 30px -22px rgba(90, 50, 20, .55); }
  .tome__close { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; }
  .tome .niche { min-height: 230px; flex: none; }
}

/* ==== the daily potion =============================================================================== */
/* One column that fits a phone: a bar on top (title, tries left, help, close), then the clues, the tries
   (one row of tiles each), the search box (it stays put while the list scrolls under it) and the list.
   Tapping a fragrance opens a bar at the bottom to throw it in. */
dialog.brew[open] { display: flex; flex-direction: column; }
.brew {
  width: min(680px, calc(100% - 24px)); height: min(940px, calc(100dvh - 24px)); margin: auto; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(217, 83, 155, .22), transparent 70%),
    var(--grain), linear-gradient(180deg, #1d1420, #120c14);
  box-shadow: 0 40px 80px -20px #000;
}
dialog.brew { border: 1px solid rgba(255, 180, 220, .25); } /* a real border, so the sticky search box can't cover it */
.brew__bar {
  flex: none; display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 8px 62px 8px 12px;
  border-bottom: 1px solid rgba(255, 180, 220, .14); background: rgba(12, 8, 14, .45);
}
.brew__close { top: 9px; right: 10px; }
.brew__pot { flex: none; width: 44px; margin: -6px 0 -2px; }
.brew__pot svg { width: 100%; display: block; overflow: visible; }
.brew__pot.is-splash svg { animation: splash .6s ease-out; }
@keyframes splash { 30% { transform: scale(1.08, .94); } 60% { transform: scale(.97, 1.04); } }
.brew__titles { flex: 1; min-width: 0; }
.brew__title { font: 800 20px/1 var(--display); font-stretch: 75%; text-transform: uppercase; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brew__title span { color: #ff9ec4; }
.brew__kicker { margin-top: 4px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.brew__intro { margin-bottom: 12px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.brew__vials { flex: none; display: flex; gap: 3px; }
.brew__vials i { width: 8px; height: 18px; border-radius: 2px 2px 5px 5px; box-shadow: inset 0 0 0 1.5px rgba(255, 190, 220, .45); }
.brew__vials i.is-full { background: linear-gradient(180deg, transparent 30%, #ff7fc0 30%, #b8307a); box-shadow: inset 0 0 0 1.5px rgba(255, 210, 230, .8), 0 0 8px rgba(255, 120, 180, .5); }
.brew__help {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer; font: 700 15px var(--display);
  background: rgba(255, 255, 255, .06); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.brew__help:hover, .brew__help[aria-expanded=true] { background: var(--ink); color: var(--dark); }
.brew__inner { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px clamp(12px, 4vw, 28px) 28px; }
.brew__wait { padding: 120px 0; text-align: center; font: 500 13px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--blush); }
.brew__sec { margin-top: 16px; }
.brew__sec:first-child, .brew__how[hidden] + .brew__sec { margin-top: 0; }
.brew__h { display: block; font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.brew__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.brew__how { margin-bottom: 16px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.brew__how p + p { margin-top: 8px; }
.brew__how .k { padding: 0 5px; font-weight: 600; color: #fff; }

/* the clues */
.hints { display: grid; gap: 4px; margin-top: 6px; }
.hint {
  display: flex; gap: 10px; align-items: center; padding: 8px 11px; font-size: 14px; line-height: 1.3; font-weight: 500; color: var(--ink);
  background: linear-gradient(90deg, rgba(217, 83, 155, .2), rgba(217, 83, 155, .06)); box-shadow: inset 2px 0 0 #ff7fc0, inset 0 0 0 1px rgba(255, 140, 190, .18);
}
.hint i { flex: none; display: grid; place-items: center; width: 18px; height: 18px; color: #ffc2dc; }
.hint i svg { width: 17px; height: 17px; }
.hint.is-fresh { animation: surface .9s cubic-bezier(.2, .7, .1, 1); }
@keyframes surface { from { opacity: 0; transform: translateY(8px); box-shadow: inset 2px 0 0 #ff7fc0, 0 0 30px rgba(255, 120, 180, .6); } }
.hint.is-locked { padding: 5px 11px; font-size: 12.5px; font-weight: 400; color: var(--ink-faint); background: none; box-shadow: none; }
.hint.is-locked i { color: inherit; opacity: .7; }
.hint.is-locked i svg { width: 14px; height: 14px; }

/* the tries: a name, then one row of six tiles under column names shown once */
.k { display: inline-block; }
.brew__key { display: flex; align-items: center; gap: 4px; font: 500 10.5px var(--mono); color: var(--ink-faint); }
.brew__key i { width: 10px; height: 10px; margin-left: 6px; }
.k.is-right, .tile.is-right { background: #2f8f6a; color: #eafff5; }
.k.is-close, .tile.is-close { background: #b8862b; color: #fff6e3; }
.k.is-wrong, .tile.is-wrong { background: #3a3238; color: #c9bfc4; }
.board__cols, .try__tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.board__cols { margin-top: 8px; font: 500 9px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); text-align: center; }
.board { display: grid; gap: 9px; margin-top: 4px; }
.try__name { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13.5px; line-height: 1.2; }
.try__name img, .try__name > i { flex: none; width: 18px; height: 22px; object-fit: contain; }
.try__name b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.try__name span { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-soft); }
.try__tiles { margin-top: 4px; }
.tile {
  display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 3px 2px; text-align: center;
  font: 600 11.5px/1.1 var(--display); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.tile.is-wrong { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.tile small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tile > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.try.is-new .tile { animation: flipin .5s both; }
.try .tile:nth-child(2) { animation-delay: .08s; } .try .tile:nth-child(3) { animation-delay: .16s; } .try .tile:nth-child(4) { animation-delay: .24s; } .try .tile:nth-child(5) { animation-delay: .32s; } .try .tile:nth-child(6) { animation-delay: .4s; }
@keyframes flipin { from { transform: rotateX(90deg); opacity: 0; } }
.try.is-won .try__name { padding: 8px 10px; background: linear-gradient(90deg, rgba(80, 200, 150, .3), rgba(80, 200, 150, .08)); box-shadow: inset 0 0 0 1px rgba(110, 230, 180, .5); }
.try.is-won .try__name span { color: #b9f5da; }

/* the search box and the list */
.brew__pick { margin-top: 12px; }
.pick__bar {
  position: sticky; top: -14px; z-index: 2; margin: 0 calc(-1 * clamp(12px, 4vw, 28px)); padding: 14px clamp(12px, 4vw, 28px) 8px;
  background: #160f18; box-shadow: 0 10px 14px -12px #000;
}
.pick__field { position: relative; }
.pick__field svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--ink-faint); pointer-events: none; }
.brew__input {
  width: 100%; height: 46px; padding: 0 44px 0 40px; border: 0; border-radius: 0; color: var(--ink); font-size: 16px;
  background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.brew__input:focus-visible { outline: 2px solid #ff7fc0; outline-offset: 0; }
.brew__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.pick__clear { position: absolute; top: 1px; right: 1px; width: 44px; height: 44px; border: 0; cursor: pointer; font-size: 22px; line-height: 1; background: transparent; color: var(--ink-soft); }
.pick__clear:hover { color: var(--ink); }
.pick__clear[hidden] { display: none; }
.pick__chips { display: flex; gap: 6px; margin: 8px calc(-1 * clamp(12px, 4vw, 28px)) 0; padding: 0 clamp(12px, 4vw, 28px); overflow-x: auto; scrollbar-width: none; }
.pick__chips::-webkit-scrollbar { display: none; }
.pick__chips:empty { display: none; }
.pick__chips li { flex: none; }
.pick__chips button {
  min-height: 34px; padding: 0 11px; border: 0; cursor: pointer; white-space: nowrap; font: 600 13.5px var(--display);
  background: rgba(255, 255, 255, .06); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.pick__chips button:hover, .pick__chips button:focus-visible { background: var(--ink); color: var(--dark); }
.pick__chips small { margin-left: 3px; font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.pick__chips.is-on button { background: rgba(217, 83, 155, .3); color: #ffe3ef; box-shadow: inset 0 0 0 1px rgba(255, 150, 200, .55); }
.pick__chips.is-on i { margin-left: 6px; font-style: normal; opacity: .85; }
.pick__count { display: flex; align-items: baseline; gap: 6px; margin-top: 9px; font-size: 13.5px; color: var(--ink-soft); }
.pick__count b { font: 800 22px/1 var(--display); color: #ffc2dc; text-shadow: 0 0 14px rgba(255, 110, 175, .5); font-variant-numeric: tabular-nums; }
.pick__count b.is-dropping { color: #fff; }
.pick__count em { margin-left: auto; font: 500 11px var(--mono); font-style: normal; color: var(--ink-faint); text-align: right; }
.cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 4px; margin-top: 4px; }
.cand {
  display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; align-items: center; width: 100%; min-height: 52px; padding: 6px 10px;
  border: 0; cursor: pointer; text-align: left; color: var(--ink);
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); transition: background .2s;
}
.cand:hover, .cand:focus-visible { background: rgba(217, 83, 155, .2); }
.cand.is-picked { background: rgba(217, 83, 155, .32); box-shadow: inset 0 0 0 1.5px #ff7fc0; }
.cand img, .cand > i { grid-row: span 2; width: 30px; height: 38px; object-fit: contain; }
.cand b { font-size: 14.5px; font-weight: 600; line-height: 1.2; }
.cand span { font-size: 12.5px; color: var(--ink-soft); }
.brew__none { padding: 16px 4px; font-size: 14px; color: var(--ink-soft); }
.brew__more { width: 100%; margin-top: 8px; }

/* the bar at the bottom: throw the one you tapped in */
.brew__ask {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: #2c1b28; box-shadow: 0 -1px 0 rgba(255, 160, 210, .45), 0 -16px 30px -14px #000; animation: ask-up .22s cubic-bezier(.2, .7, .1, 1);
}
.brew__ask[hidden] { display: none; }
@keyframes ask-up { from { transform: translateY(100%); } }
.brew__ask img, .brew__ask > i { flex: none; width: 30px; height: 40px; object-fit: contain; }
.brew__ask p { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.25; color: var(--ink-soft); }
.brew__ask p b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--ink); }
.brew__ask p span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brew__ask .btn { flex: none; padding: 0 16px; }
.brew__x { flex: none; width: 40px; height: 44px; border: 0; cursor: pointer; font-size: 24px; line-height: 1; background: transparent; color: var(--ink-soft); }
.brew__x:hover { color: var(--ink); }

/* the end of the game */
.brew__end { margin-bottom: 18px; text-align: center; }
.answer { display: flex; align-items: center; gap: 14px; margin: 0 auto; max-width: 440px; padding: 12px 16px; text-align: left; color: var(--ink); text-decoration: none;
  background: linear-gradient(90deg, rgba(217, 83, 155, .25), rgba(217, 83, 155, .06)); box-shadow: inset 0 0 0 1px rgba(255, 150, 200, .45); }
.answer img { flex: none; width: 60px; height: 78px; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .6)); }
.answer small { display: block; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.answer b { display: block; margin-top: 4px; font: 800 24px/1 var(--display); font-stretch: 75%; text-transform: uppercase; }
.answer:hover em { text-decoration: underline; }
.answer em { display: block; margin-top: 6px; font-style: normal; font-size: 13.5px; color: #ffb3d1; }
.brew__result { margin-top: 12px; font-size: 15px; color: var(--ink); }
.brew__stats { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.brew__stats li { flex: 1; max-width: 84px; padding: 8px 4px; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); background: rgba(0, 0, 0, .3); }
.brew__stats b { display: block; margin-bottom: 3px; font: 800 22px/1 var(--display); font-stretch: 75%; letter-spacing: 0; color: var(--ink); }
.brew__acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin-top: 12px; }
.brew__next { font: 500 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.brew__next b { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 820px) {
  .brew { width: 100%; height: 100dvh; box-shadow: none; }
  dialog.brew { border: 0; }
  .brew__bar { padding-top: max(8px, env(safe-area-inset-top)); }
  .brew__close { top: max(9px, env(safe-area-inset-top)); }
}
@media (max-width: 360px) {
  .brew__pot { display: none; }
  .brew__title { font-size: 17px; }
}

/* the house name on a fragrance links to that house's page (server/seo.js) */
.id-brand a { color: inherit; text-decoration: none; }
.id-brand a:hover, .id-brand a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.sheet .fine a { color: var(--rose); }
