/* Dastaan 0.6 · installation day on a paper-grey gallery wall, with a guide, under the rail of identity A.
   Materials: matt emulsion, graphite, ink, cotton cord in four colours, white mount, black moulding, polished concrete floor,
   low-tack tape. Colours, type and UI timing come from the Venus kit (assets/kit/css, copied unmodified from Identity Kit
   15 Software): palette.css, type.css, motion.css. The kit's own variables are used by name; nothing below invents a colour.
   Departures from the kit are deliberate and listed in README ("Where Dastaan departs from the kit, and why"). */

@font-face { font-family: "Anek Devanagari"; src: url(../fonts/AnekDevanagari.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Anek Latin"; src: url(../fonts/AnekLatin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  /* the room, on the kit's neutral ramp */
  --wall-lit: var(--venus-neutral-50);
  --wall: var(--venus-neutral-100);
  --wall-shade: var(--venus-neutral-200);
  --concrete: var(--venus-neutral-300);
  --concrete-deep: var(--venus-neutral-400);
  --mount: #FFFFFF;
  /* ink and graphite: text is ink, ink-2 (neutral 800) or graphite (neutral 700, 5.9:1 on the wall); lines may be lighter */
  --ink: var(--venus-neutral-900);
  --ink-2: var(--venus-neutral-800);
  --graphite: var(--venus-neutral-700);
  --graphite-line: var(--venus-neutral-500);
  --graphite-soft: var(--venus-neutral-400);
  --red: var(--venus-red-500); --orange: var(--venus-orange-400); --blue: var(--venus-blue-700); --green: var(--venus-green-600);
  --thread: var(--blue);
  --hookY: clamp(118px, 19svh, 176px);
  --fw: max(140px, min(calc(100vw - 32px), 560px, calc((100svh - 460px) * 1.25), var(--fwfit, 9999px)));   /* never gone, even at 200 % zoom */   /* --fwfit: set per work so its words always fit */
  --tw: min(calc(100vw - 32px), 560px);   /* the label and her words keep this width; only the frame gives way on a short phone */
  --floorH: 56px;
  --barH: 58px;                        /* the bar: five ways round, hanging from their own rail at the foot */
  --railT: max(12px, env(safe-area-inset-top));
  --sk: 12px;
  --pad: 16px;                         /* kit spacing step; 16 px gutters on a phone so the work is as large as it can be */
  --label: 600 var(--type-label-size)/var(--type-label-lh) "Anek Latin", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--wall); }
body {
  font-family: "Anek Latin", "Noto Sans", system-ui, sans-serif; font-weight: var(--type-body-weight); color: var(--ink);
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
img { -webkit-user-drag: none; user-drag: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[lang="hi"], .hi { font-family: "Anek Devanagari", "Noto Sans Devanagari", "Anek Latin", sans-serif; letter-spacing: 0 !important; word-break: keep-all; overflow-wrap: normal; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.klabel { font: var(--label); letter-spacing: var(--type-label-tracking); text-transform: uppercase; color: var(--graphite); }

/* ---------- the room ---------- */
.wall, .view {
  position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--barH) + env(safe-area-inset-bottom)); overflow: hidden;
  background: linear-gradient(174deg, var(--wall-lit) 0%, var(--wall) 44%, var(--wall-shade) 100%);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.atmo { position: absolute; inset: 0; pointer-events: none; }
.daylight {
  background:
    radial-gradient(110% 60% at 12% -8%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 60%),
    radial-gradient(80% 50% at 100% 78%, rgba(140, 139, 139, .14), transparent 70%),
    linear-gradient(90deg, rgba(115, 114, 113, .06), transparent 14%, transparent 86%, rgba(115, 114, 113, .08));
}
/* matt emulsion has a tooth: roller stipple and long faint roller lanes */
.tooth {
  opacity: .6; mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .44  0 0 0 0 .43  0 0 0 0 .41  0 0 0 .2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='700' height='700'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.008 .03' numOctaves='2' seed='9'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .49  0 0 0 0 .47  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
}

/* the rail (identity A): दास्तान with its headline running out across the wall to the edge.
   Sound and the menu hang from it on short cords. The word is 104 x 26 px; its headline is 4.6 px, 0.4 px from its top. */
.toprail { position: fixed; left: var(--pad); right: var(--pad); top: var(--railT); height: 48px; z-index: 1; }   /* leads the page (tab order); every room covers it with its own rail */
.toprail .wm { position: absolute; left: -6px; top: 0; width: 116px; height: 44px; padding: 0 6px; color: var(--ink); display: block; }
.toprail .wm svg { width: 104px; height: 26px; display: block; overflow: visible; }
/* the run starts where the word's own headline starts, so word and rail are one unbroken line */
.railrun { position: absolute; left: -.9px; right: 0; top: .38px; height: 4.61px; background: var(--ink); }
.hang { position: absolute; top: 0; width: 44px; height: 48px; color: var(--ink); }
.hang .cordlet { position: absolute; left: 21.25px; top: 4px; width: 1.5px; height: 11px; background: var(--graphite); }
.hang .ico { position: absolute; left: 10px; top: 12px; width: 24px; height: 24px; overflow: visible; }
.hang:active { --drop: 1px; }
.hang[aria-expanded="true"] { --rc: var(--thread); }
.railicons { position: fixed; top: var(--railT); right: var(--pad); width: 88px; height: 48px; z-index: 24; pointer-events: none; }
.railicons .hang { pointer-events: auto; }
#menuBtn { right: 0; }
#snd { right: 44px; }
body.launching .railicons { visibility: hidden; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { overflow: visible; }
/* 0.5, owner's decision: no Venus emblem in the app. Dastaan leads; Venus is present through its design system only. */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- threads ---------- */
.cords, .wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cords { z-index: 2; }
.cordg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cordg .shadow { stroke: rgba(43, 42, 41, .12); stroke-width: 2.6; transform: translate(0, 3px); }
.cordg .twist { stroke: rgba(255,255,255,.45); stroke-width: .8; stroke-dasharray: 1.6 3.2; }
.cordg .knot { stroke: rgba(43, 42, 41, .18); stroke-width: .8; }
.cordg.lead .shadow { stroke-width: 1.8; opacity: .7; }
.cordg.lead .twist { stroke-width: .6; }
.pulls { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 5; }
.pull { position: absolute; width: 44px; height: 66px; }
.pull span {
  position: absolute; top: calc(100% + 4px); left: 50%; white-space: nowrap; transform: translateX(-50%) rotate(-3deg);
  font-size: var(--type-small-size); color: var(--graphite); opacity: 0; transition: opacity var(--motion-base) var(--ease-out);
}
.pull:hover span, .pull:focus-visible span { opacity: 1; }

/* ---------- the hang ---------- */
.hook { position: absolute; top: calc(var(--hookY) - 6px); left: 50%; width: 20px; height: 26px; margin-left: -10px; z-index: 3; }
.wire { z-index: 3; }
.pencilmarks { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.pencilmarks svg { position: absolute; overflow: visible; }
.pencilmarks path, .pencilmarks line { stroke: var(--graphite-soft); stroke-width: .9; fill: none; filter: url(#graphite); }
.pencilmarks .arrow { stroke: var(--graphite-line); stroke-width: 1; stroke-linecap: round; transition: opacity .5s; }
.pencilmarks .tmpl { transition: opacity .6s; }
.pencilmarks.hung .tmpl, .pencilmarks.hung .arrow { opacity: 0; }
.pencilmarks.live .pm { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .45s ease-out forwards; }
.pencilmarks.live .pm:nth-child(1) { animation-delay: .5s; } .pencilmarks.live .pm:nth-child(2) { animation-delay: .75s; }
.pencilmarks.live .tmpl { animation-delay: 1s; animation-duration: .7s; }
.pencilmarks.live .arrow { animation-delay: 1.5s; animation-duration: .8s; }
.pencilmarks.live .pm-t { opacity: 0; animation: appear .3s 1s forwards; }
.pencilmarks text, .pnote { font-family: "Anek Latin", sans-serif; font-weight: 400; fill: var(--graphite); color: var(--graphite); }

.stage {
  position: absolute; left: 0; right: 0; top: calc(var(--hookY) + 40px); z-index: 4;
  display: flex; flex-direction: column; align-items: center; padding: 0 var(--pad);
}
.framewrap { width: var(--fw); perspective: 1400px; transform-origin: 50% -40px; will-change: transform; transform: translate3d(0, 30px, 0) rotate(-1.4deg); }
.frame { position: relative; width: 100%; aspect-ratio: 1.255; transform-style: preserve-3d; cursor: pointer;
  transition: transform .9s cubic-bezier(.45, .05, .2, 1); touch-action: pan-y; }
.frame.turned { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.front { background: var(--ink); padding: 2.1%;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 18px 30px -16px rgba(43, 42, 41, .45), 0 4px 10px rgba(43, 42, 41, .16); }
.mount { width: 100%; height: 100%; background: var(--mount); padding: 5.4%; box-shadow: inset 0 0 0 1px rgba(43,42,41,.08), inset 2px 2px 5px rgba(43,42,41,.14); }
.photo { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--concrete); box-shadow: 0 0 0 1px rgba(43,42,41,.18); }
.photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 1px 1px 3px rgba(43,42,41,.3), inset 0 0 0 .5px rgba(43,42,41,.2); }
.drift { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.drift img, .drift canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.drift img { object-fit: cover; }
.drift .grey { filter: grayscale(1) contrast(1.04); }
.drift .bloom { pointer-events: none; }
.paused { position: absolute; right: 8px; bottom: 6px; font-size: var(--type-small-size); color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(43,42,41,.6); opacity: 0; transition: opacity var(--motion-base) var(--ease-out); }
.wall.is-paused .paused { opacity: 1; }

/* the back of the frame */
.back { transform: rotateY(180deg); background: var(--wall-shade); border: 5px solid var(--ink); box-shadow: 0 18px 30px -16px rgba(43, 42, 41, .45);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3'/><feColorMatrix values='0 0 0 0 .4  0 0 0 0 .4  0 0 0 0 .38  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23b)'/></svg>");
  padding: 6% 7%; overflow: hidden; color: var(--ink); }
.back .inv { font-size: clamp(26px, 8vw, 40px); font-weight: 700; letter-spacing: .02em; line-height: 1; }
.back .stamp { display: inline-block; border: 1.5px solid var(--ink); padding: 3px 7px 1px; font: var(--label); letter-spacing: .12em; text-transform: uppercase; margin-top: 8px; }
.back .pn { position: absolute; color: var(--ink-2); transform: rotate(-2.5deg); font-size: clamp(13px, 3.6vw, 16px); line-height: 1.35; }
.back .tape { position: absolute; width: 64px; height: 18px; background: rgba(248, 248, 248, .78); box-shadow: 0 1px 1px rgba(43,42,41,.08); }
.back .ring { position: absolute; width: 14px; height: 14px; border: 2px solid var(--graphite); border-radius: 50%; }

/* ---------- the pencil progress line, and the loupe beside it ---------- */
.scrubrow { width: var(--tw); display: flex; align-items: center; gap: 8px; margin-top: 2px; opacity: 0; transition: opacity var(--motion-slow) var(--ease-out); }
.wall.lit .scrubrow { opacity: 1; }
.scrub { flex: 1; height: 44px; position: relative; cursor: ew-resize; touch-action: none; }
.scrub svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scrub .guide { stroke: var(--graphite-soft); stroke-width: .7; stroke-dasharray: 1 4; fill: none; }
.scrub .drawn { stroke: var(--ink); stroke-width: 1.3; fill: none; stroke-linecap: round; filter: url(#graphite); opacity: .8; }
.scrub .tip { fill: var(--ink); }
.loupe { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.loupe .ico { width: 24px; height: 24px; color: var(--ink); }
.wall.lit .loupe { --rc: var(--thread); }
.loupe .lg { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; }
.loupe .lc { fill: var(--thread); opacity: .85; }
.wall[data-state="end"] .label, .wall[data-state="end"] .voice, .wall[data-state="end"] .scrubrow, .wall[data-state="walk"] .act { opacity: 0; pointer-events: none; transition: opacity var(--motion-base) var(--ease-in); }

/* ---------- label ---------- */
.label { width: var(--tw); display: block; margin-top: 4px; position: relative; }
.scene { position: absolute; left: 0; top: 2px; width: 64px; height: 64px; opacity: 0; transform: translateX(-8px); transition: opacity var(--motion-story) var(--ease-out) .3s, transform var(--motion-story) var(--ease-out) .3s; }
.scene svg { width: 64px; height: 64px; display: block; }
.wall.lit .scene, .wall[data-state="end"] .scene { opacity: 1; transform: none; }
.titles { min-width: 0; transition: transform var(--motion-story) var(--ease-out) .2s; padding-right: 72px; }
.wall.lit .titles { transform: translateX(76px); margin-right: 76px; }   /* the words re-wrap so a long title never runs under the number */
.titles h1 { margin: 0; font-size: clamp(28px, 8.4vw, var(--type-h1-size)); line-height: 1.18; font-weight: var(--type-h1-weight); }
.titles .en { margin: 2px 0 0; font-size: var(--type-body-size); line-height: 1.3; color: var(--ink-2); }
.titles .when { margin: 1px 0 0; font-size: var(--type-ui-size); line-height: 1.35; color: var(--ink-2); }
.titles.longtitle h1 { font-size: clamp(22px, 6.2vw, var(--type-h2-size)); line-height: 1.16; }
.code { position: absolute; right: -8px; top: -6px; min-height: 44px; min-width: 44px; padding: 12px 8px; font-size: var(--type-small-size); color: var(--ink-2); transform: rotate(-3deg); }
.code::before { content: "No. "; }

.voice { width: var(--tw); position: relative; margin-top: 12px; min-height: 92px; }
.line { margin: 0; font-size: var(--type-h3-size); line-height: 1.45; font-weight: 400; max-width: 32ch; min-height: 3em;
  transition: opacity var(--motion-base) var(--ease-out), transform var(--motion-slow) var(--ease-out); }
.line.long { font-size: var(--type-body-size); line-height: 1.42; }
.wall.tight .line { font-size: var(--type-body-size); line-height: 1.42; }   /* a short phone and a long story */
.line.out { opacity: 0; transform: translateY(-4px); transition-timing-function: var(--ease-in); }
.line.in { opacity: 0; transform: translateY(6px); transition: none; }
/* a story with no voice yet is read, not told: the guide reads it too */
.readalong { display: none; flex: none; }
.wall.silent .readalong { display: block; }

.act { position: absolute; left: 0; top: 0; min-height: 52px; padding: 10px 2px 14px; display: inline-flex; flex-direction: column; align-items: flex-start;
  font-size: var(--type-h3-size); font-weight: 600; color: var(--ink); transition: opacity var(--motion-base) var(--ease-out); }
.act-rule { width: 100%; height: 8px; margin-top: 4px; }
.act-rule path { stroke: var(--thread); stroke-width: 1.8; fill: none; stroke-linecap: round; }
.act::before { content: ""; position: absolute; left: calc(100% + 10px); top: 4px; width: 26px; height: 30px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'><path d='M3 28 C5 16 12 8 22 3 M16 3 L22 3 L20 9' fill='none' stroke='%235A5958' stroke-width='1.1' stroke-linecap='round'/></svg>") no-repeat; }
.wall:not([data-state="arrive"]) .act, .wall.autoopen .act { opacity: 0; pointer-events: none; }
.wall[data-state="arrive"] .act { animation: appear var(--motion-slow) var(--ease-out) 1.9s both; }
.act:active { transform: translateY(1px); }

/* ---------- the light ---------- */
/* the room goes down around the work, but never so far that the words beneath it lose their contrast */
.dim { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse 84% 64% at var(--spotX, 50%) var(--spotY, 42%), rgba(43,42,41,0) 34%, rgba(43,42,41,.2) 74%, rgba(43,42,41,.34) 100%);
  transition: opacity 1.2s var(--ease-out); }
/* the lamp: a warm pool on the work (kit gold 300), coming on as the room goes down */
.lamp { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; mix-blend-mode: soft-light;
  background: radial-gradient(ellipse 40% 34% at var(--spotX, 50%) var(--spotY, 40%), rgba(240, 209, 136, .5), rgba(240, 209, 136, 0) 70%);
  transition: opacity 1.6s var(--ease-out) .2s; }
.wall.lit .dim, .wall.lit .lamp { opacity: 1; }
.wall.is-paused .dim { opacity: .55; }
.wall::after { content: ""; position: absolute; inset: 0; z-index: 30; pointer-events: none; background: var(--ink); opacity: .2; transition: opacity 1.1s var(--ease-out); }
.wall.ready::after { opacity: 0; }
.wall.instant::after { transition: none; opacity: 0; }

/* ---------- handoff ---------- */
.onward { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.onward > * { pointer-events: none; }
.wall[data-state="end"] .onward .nb, .wall[data-state="end"] .onward .pword { pointer-events: auto; }
.nb { position: absolute; display: block; text-align: left; opacity: 0; transform: translateY(16px);
  transition: opacity var(--motion-slow) var(--ease-out), transform var(--motion-story) var(--ease-out); }
.wall[data-state="end"] .nb { opacity: 1; transform: none; }
.nb .nframe { position: relative; background: var(--ink); padding: 3%; box-shadow: 0 12px 20px -12px rgba(43,42,41,.5), 0 2px 6px rgba(43,42,41,.14); }
.nb .nmount { background: var(--mount); padding: 7%; }
.nb .nmount div { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.nb img, .tw img, .yw img, .pc img, .tr img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.04); }
.heard img { filter: none; }            /* a work you have heard keeps its colour wherever it hangs */
.corner { position: absolute; right: -1px; bottom: -1px; width: 26%; aspect-ratio: 1; background: var(--c); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.nb .rel { display: block; margin: 0 0 6px 1px; }
.nb .nhi { display: block; font-family: "Anek Devanagari", sans-serif; font-size: var(--type-h3-size); font-weight: 700; line-height: 1.25; margin-top: 8px; }
.nb .nyr { display: block; font-size: var(--type-small-size); color: var(--graphite); }
.nowtitle { position: absolute; text-align: center; opacity: 0; transition: opacity var(--motion-slow) var(--ease-out) .3s; }
.nowtitle span { font: 700 var(--type-h3-size) "Anek Devanagari", sans-serif; background: var(--wall); padding: 0 10px 2px; }
.wall[data-state="end"] .nowtitle { opacity: 1; }
.nb:active .nframe { transform: translateY(1px); }
.pword { position: absolute; min-height: 44px; min-width: 44px; padding: 10px 4px; font-size: var(--type-ui-size); color: var(--graphite);
  opacity: 0; transition: opacity var(--motion-slow) var(--ease-out) .6s; text-align: left; }
.wall[data-state="end"] .pword { opacity: 1; }
.pword span { border-bottom: 1px solid var(--graphite-soft); }

/* ---------- the floor: the guide, your walk, and the ways on ---------- */
.skirting, .floor { position: absolute; left: 0; right: 0; pointer-events: none; }
.skirting { bottom: var(--floorH); height: var(--sk); z-index: 1;
  background: linear-gradient(var(--wall-lit), var(--wall) 70%, var(--wall-shade));
  box-shadow: 0 -1px 0 rgba(115, 114, 113, .22), 0 -3px 6px rgba(115, 114, 113, .08); }
.floor { bottom: 0; height: var(--floorH); z-index: 1;
  background: linear-gradient(rgba(67, 66, 65, .14), rgba(67, 66, 65, 0) 12px), linear-gradient(var(--concrete), var(--concrete-deep)); }
.base { position: absolute; left: 0; right: 0; bottom: 0; height: var(--floorH); z-index: 6; }

/* the guide: a Venus member, red, complete, never altered; it only changes pose (a cut) or place (an ease-out move) */
.guide { position: absolute; left: 8px; bottom: 3px; width: 54px; height: 54px; z-index: 7; pointer-events: none;
  transition: transform var(--motion-slow) var(--ease-out); }
.guide img, .vguide img, .fig img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity var(--motion-base) var(--ease-out); }
.guide img.out, .vguide img.out, .fig img.out { opacity: 0; transition-duration: calc(var(--motion-base) * .7); transition-timing-function: var(--ease-in); }

/* your walk: one member for every work you have heard, on the floor behind the guide (the Horizon: complete figures, one baseline) */
.horizon { position: absolute; left: 68px; right: var(--pad); bottom: 2px; height: 52px; min-height: 44px; display: flex; align-items: flex-end;
  gap: 0; overflow: hidden; padding: 0 2px 4px; }
.horizon .figs { display: flex; align-items: flex-end; height: 46px; }
/* the kit's member sits inside a padded viewBox: a 44 px box draws it at 39 px, and celebrating at 33 px, never smaller;
   spaced by the widest pose (celebrating) so no two members ever touch */
.fig { position: relative; flex: none; width: 44px; height: 44px; margin-right: 0; }
.fig::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: -3px; height: 2px; background: var(--c); border-radius: 1px; }  /* a strip of floor tape in its thread */
.fig.new { animation: joinwalk var(--motion-slow) var(--ease-out) both; }
@keyframes joinwalk { from { opacity: 0; transform: translateX(-10px); } }
.horizon .more { flex: none; align-self: center; margin-left: 18px; font-size: var(--type-small-size); color: var(--ink-2); }
.horizon .empty { align-self: center; font-size: var(--type-small-size); color: var(--ink-2); line-height: 1.25; max-width: 120px; }
.fnote { position: absolute; left: 70px; bottom: calc(var(--floorH) - 4px); z-index: 7; margin: 0; padding: 2px 8px;
  font-size: var(--type-ui-size); font-weight: 600; color: var(--ink); background: var(--wall); transform: rotate(-1.5deg);
  opacity: 0; transition: opacity var(--motion-slow) var(--ease-out); pointer-events: none; }
.fnote.on { opacity: 1; }

/* the bar: Threads, Years, Places, Number, Your walk. Each icon's own rail is a piece of the bar's rail, as Devanagari letters
   hang from one headline; the open one's piece takes the thread colour, and a press drops the form a pixel. */
.bar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--barH) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
  z-index: 25; display: flex; background: var(--wall-lit); box-shadow: 0 -1px 0 rgba(115, 114, 113, .25); }
.bar::before { content: ""; position: absolute; left: 12px; right: 12px; top: 8px; height: 2px; background: var(--ink); }
.way { position: relative; flex: 1; min-width: 44px; height: var(--barH); display: flex; flex-direction: column; align-items: center; padding-top: 5px; color: var(--ink); }
.way .ico { width: 24px; height: 24px; flex: none; }
.way span { margin-top: 3px; font-size: 12px; line-height: 1.2; color: var(--ink-2); white-space: nowrap; }
.way:active { --drop: 1px; }
.way.on, .way[aria-expanded="true"] { --rc: var(--thread); }
.way.on::after, .way[aria-expanded="true"]::after { content: ""; position: absolute; left: 50%; top: 7px; width: 34px; height: 4px; margin-left: -17px; background: var(--thread); }
.way.on span, .way[aria-expanded="true"] span { color: var(--ink); font-weight: 600; }
.way:focus-visible { outline-offset: -2px; }

/* the number, asked at the desk: it opens on the floor, never over the works */
.noform { position: fixed; left: 72px; right: var(--pad); bottom: calc(var(--barH) + env(safe-area-inset-bottom) + 2px); height: 52px; display: flex; align-items: center; gap: 2px;
  background: var(--mount); padding: 0 2px 0 10px; box-shadow: 0 6px 18px -8px rgba(43,42,41,.4); z-index: 26; }
.noform label { font-size: var(--type-ui-size); color: var(--graphite); white-space: nowrap; }
.noform input { width: 100%; min-width: 0; height: 44px; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; font: 600 22px "Anek Latin", sans-serif;
  color: var(--ink); letter-spacing: .06em; outline: none; border-radius: 0; padding: 0 2px; }
.noform input:focus-visible { border-bottom-width: 2.5px; }
.noform button { flex: none; width: 44px; height: 44px; font-size: 22px; }
.noform .nonote { position: absolute; left: 0; bottom: calc(100% + 6px); white-space: nowrap; font-size: var(--type-ui-size); color: var(--ink); background: var(--wall); padding: 1px 6px; }
.noform .nonote:empty { display: none; }
.noform.nope { animation: nope .5s; }
@keyframes nope { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
body.asking .horizon { visibility: hidden; }

/* ---------- views: thread, years, places, walk, closer ---------- */
.view { z-index: 20; opacity: 0; transition: opacity var(--motion-slow) var(--ease-out); }
.view.on { opacity: 1; }
.view.instant { transition: none; }
.vrail { position: absolute; left: var(--pad); right: var(--pad); top: var(--railT); height: 2px; background: var(--ink); z-index: 8; }
.letgo { position: absolute; left: calc(var(--pad) - 10px); top: var(--railT); z-index: 9; min-height: 48px; min-width: 88px; padding: 0 10px 0 0;
  font-size: var(--type-ui-size); color: var(--ink); text-align: left; }
.letgo.hang { width: auto; height: 48px; }
.letgo .cordlet { top: 2px; height: 13px; }
.letgo span { position: absolute; left: 40px; top: 15px; white-space: nowrap; }
.viewnote { position: absolute; left: 108px; right: calc(var(--pad) + 98px); top: calc(var(--railT) + 10px); font-size: 13px !important; line-height: 1.25; text-align: center !important;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; z-index: 5; font-size: var(--type-ui-size); color: var(--ink-2); text-align: right; }
.viewnote i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 7px; vertical-align: 1px; }
.vfloor { position: absolute; left: 0; right: 0; bottom: 0; height: var(--floorH); z-index: 3; pointer-events: none;
  background: linear-gradient(rgba(67, 66, 65, .14), rgba(67, 66, 65, 0) 12px), linear-gradient(var(--concrete), var(--concrete-deep));
  box-shadow: 0 -1px 0 rgba(115, 114, 113, .22), 0 -12px 0 var(--wall-lit); }
.vguide { position: absolute; left: 14px; bottom: 3px; width: 54px; height: 54px; z-index: 6; pointer-events: none;
  transition: transform var(--motion-slow) var(--ease-out); }
.vnote { position: absolute; left: 80px; right: var(--pad); bottom: 10px; z-index: 6; margin: 0; font-size: var(--type-ui-size);
  color: var(--ink); line-height: 1.3; pointer-events: none; }
.vnote b { font-weight: 600; }
.walk { position: absolute; left: 0; right: 0; top: 64px; bottom: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.walk::-webkit-scrollbar { display: none; }
.strip { position: relative; height: 100%; }
.strip > svg { position: absolute; left: 0; top: 0; height: 100%; overflow: visible; pointer-events: none; }
.nframe { position: relative; background: var(--ink); padding: 3%; box-shadow: 0 14px 22px -12px rgba(43,42,41,.5), 0 3px 8px rgba(43,42,41,.14); }
.nmount { background: var(--mount); padding: 6%; }
.nmount > div { position: relative; aspect-ratio: 4/3; overflow: hidden; }

/* a thread: a hung show along a picture rail, each work on two cords of its thread */
.rail { position: absolute; left: 0; top: 18px; height: 7px; background: linear-gradient(var(--wall-lit), var(--wall-shade)); box-shadow: 0 2px 3px rgba(43,42,41,.12); }
.tw { position: absolute; display: block; text-align: left; }
.tw .wl { display: block; margin-top: 10px; }
.tw .nhi { display: block; font-family: "Anek Devanagari", sans-serif; font-size: var(--type-h3-size); font-weight: 700; line-height: 1.25; }
.tw.big .nhi { font-size: 22px; }
.tw .nen { display: block; font-size: var(--type-small-size); color: var(--ink-2); line-height: 1.3; }
.tw .nyr { display: block; font-size: var(--type-small-size); color: var(--graphite); }
.tw.here .nframe { outline: 2px solid var(--ink); outline-offset: 5px; }
.showcord { fill: none; stroke-width: 1.5; stroke-linecap: round; }
.railhook { fill: var(--graphite); }

/* the years: a stairwell hang, climbing with time */
.stairwall { position: absolute; left: 0; top: 0; will-change: transform; }
.stair .tread { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; filter: url(#graphite); opacity: .85; }
.stair .mass { fill: var(--concrete); opacity: .55; }
.stair .handrail { fill: none; stroke: var(--graphite-line); stroke-width: 1.2; stroke-dasharray: 0; }
.yl { position: absolute; font-size: var(--type-small-size); color: var(--ink-2); transform: translateX(-50%); white-space: nowrap; }
.yl.big { font-size: var(--type-h3-size); font-weight: 700; color: var(--ink); }
.yw { position: absolute; display: block; text-align: left; }
.yw .nhi { display: block; font-family: "Anek Devanagari", sans-serif; font-size: 15px; font-weight: 700; margin-top: 6px; line-height: 1.2; }
.yw.here .nframe { outline: 2px solid var(--ink); outline-offset: 4px; }
.yw.ghost .nframe { background: transparent; box-shadow: none; border: 1.2px dashed var(--graphite-line); padding: 0; }
.yw.ghost .nmount { background: rgba(255,255,255,.4); }
.yw.ghost .nmount > div { display: flex; align-items: center; justify-content: center; }
.yw.ghost .pn { font-size: var(--type-small-size); color: var(--ink-2); text-align: center; line-height: 1.2; }
.yw .tape { position: absolute; top: -7px; width: 34px; height: 13px; background: rgba(248,248,248,.85); box-shadow: 0 1px 1px rgba(43,42,41,.08); }

/* the places: postcard stacks taped to the wall, one per place; open one and it is dealt out */
.sheetscroll { position: absolute; left: 0; right: 0; top: 60px; bottom: var(--floorH); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pboard { position: relative; width: min(100% - 32px, 640px); margin: 8px auto 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 16px; }
.pstack { position: relative; display: block; text-align: left; min-height: 44px; padding-top: 14px; }
.pstack .cards { position: relative; display: block; aspect-ratio: 1.255; }
.pstack .pc { position: absolute; inset: 0; transition: transform var(--motion-slow) var(--ease-out); }
.pc .nframe { height: 100%; padding: 4%; }
.pc .nmount { height: 100%; padding: 6%; }
.pc .nmount > div { aspect-ratio: auto; height: 100%; }
.pstack .pname { display: block; margin-top: 10px; font-size: var(--type-h3-size); font-weight: 700; line-height: 1.2; }
.pstack .pcount { display: block; font-size: var(--type-small-size); color: var(--ink-2); }
.pstack .ptape { position: absolute; top: 4px; left: 50%; width: 48px; height: 16px; margin-left: -24px; z-index: 5; background: rgba(248,248,248,.85); box-shadow: 0 1px 1px rgba(43,42,41,.1); transform: rotate(-4deg); }
.pstack.ghost .cards { border: 1.2px dashed var(--graphite-line); background: rgba(255,255,255,.35); display: grid; place-items: center; }
.pstack.ghost .cards span { font-size: var(--type-small-size); color: var(--ink-2); }
.popen { grid-column: 1 / -1; }
.popen .phead { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.popen .phead b { font-size: var(--type-h2-size); font-weight: 700; line-height: 1.1; }
.popen .phead span { font-size: var(--type-ui-size); color: var(--ink-2); }
.pdeal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 12px; }
.pdeal .pc { position: relative; display: block; text-align: left; }
.pdeal .pc .nframe { height: auto; }
.pdeal .pc .nmount > div { aspect-ratio: 4/3; height: auto; }
.pdeal .pc .nhi { display: block; font-family: "Anek Devanagari", sans-serif; font-size: 15px; font-weight: 700; line-height: 1.2; margin-top: 6px; }
.pdeal .pc .ntk { display: block; font-size: 12px; color: var(--ink-2); line-height: 1.25; }
.pdeal .pc.here .nframe { outline: 2px solid var(--ink); outline-offset: 4px; }
.pclose { min-height: 44px; padding: 10px 0; font-size: var(--type-ui-size); color: var(--ink); }
.pclose span { border-bottom: 1px solid var(--graphite-line); }
.plater { grid-column: 1 / -1; margin: 0; text-align: center; font-size: var(--type-small-size); color: var(--ink-2); }

/* your walk: the works you heard, each with its member standing under it */
.tr { position: absolute; display: block; text-align: center; }
.tr .nhi { display: block; font-family: "Anek Devanagari", sans-serif; font-size: 16px; font-weight: 700; margin-top: 8px; line-height: 1.2; }
.tr .tfig { display: block; width: 44px; height: 46px; margin: 6px auto 0; position: relative; }
.tr .tfig img { position: absolute; inset: 0; width: 100%; height: 100%; filter: none; object-fit: contain; }
.trail .pencilthread { fill: none; stroke: var(--graphite-line); stroke-width: 1.1; stroke-linecap: round; filter: url(#graphite); }
.trail .empty { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: var(--type-body-size); color: var(--ink-2); }
.rubout { position: absolute; left: 80px; right: var(--pad); bottom: 6px; z-index: 7; display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.pbtn { min-height: 44px; min-width: 44px; padding: 8px 8px; font-size: var(--type-ui-size); color: var(--ink); }
.pbtn span { border-bottom: 1px solid var(--graphite-line); }
.pq { font-size: var(--type-ui-size); font-weight: 600; color: var(--ink); }
.strip.rubbing { transition: opacity .7s ease, filter .7s; opacity: 0; filter: blur(1.5px); }

/* look closer: the installer's loupe over the print; find the coloured part */
.closer .stagec { position: absolute; left: var(--pad); right: var(--pad); top: 64px; bottom: calc(var(--floorH) + 64px); display: grid; place-items: center; }
.closer .cprint { position: relative; max-width: 100%; max-height: 100%; background: var(--ink); padding: 8px; box-shadow: 0 18px 30px -16px rgba(43,42,41,.45); touch-action: none; }
.closer .cprint canvas { display: block; max-width: 100%; max-height: 100%; }
.closer .ring { position: absolute; border: 2px solid var(--ink); border-radius: 46%; opacity: 0; transition: opacity var(--motion-slow) var(--ease-out); pointer-events: none; filter: url(#graphite); }
.closer .ring.on { opacity: 1; }
.lens { position: absolute; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; pointer-events: none; z-index: 4;
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--venus-gold-400), 0 12px 24px -8px rgba(43,42,41,.55); background: var(--mount); }
.lens canvas { position: absolute; left: 0; top: 0; }
.closer .hint { position: absolute; left: var(--pad); right: var(--pad); bottom: calc(var(--floorH) + 18px); margin: 0; text-align: center;
  font-size: var(--type-body-size); font-weight: 600; color: var(--ink); }
.closer .hint small { display: block; font-weight: 400; font-size: var(--type-small-size); color: var(--ink-2); }

/* the level: the installer's pencilled spirit level, set on the wall above a crooked work */
.level { position: absolute; z-index: 6; pointer-events: none; opacity: 0; transition: opacity .5s; }
.level.on { opacity: 1; }
.level svg { overflow: visible; display: block; }
.level .pm { stroke: var(--graphite); stroke-width: 1; fill: none; filter: url(#graphite); stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .5s ease-out forwards; }
.level .pm + .pm { animation-delay: .35s; }
.level .bub { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.level .tickm { stroke: var(--thread); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; }
.level.level-ok .tickm { animation: draw .25s ease-out forwards; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  :root { --hookY: 160px; --fw: min(640px, calc((100svh - 310px) * 1.25)); --pad: 48px; }
  .stage { display: grid; grid-template-columns: var(--fw) minmax(280px, 360px); grid-template-rows: auto auto auto; column-gap: 56px; justify-content: center; align-items: end; }
  .framewrap { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .scrubrow { grid-column: 1; grid-row: 3; width: var(--fw); }
  .label, .voice { grid-column: 2; width: auto; }
  .label { grid-row: 1; margin: 0 0 6px !important; }
  .scene { top: -76px; }
  .titles { padding-right: 0; }
  .wall.lit .titles { transform: none; margin-right: 0; }
  .voice { grid-row: 2; align-self: start; margin-top: 18px !important; min-height: 8em; }
  .act::before { display: none; }
  .code { position: static; display: block; margin-top: 10px; transform: none; }
  .titles h1 { font-size: var(--type-h1-size); }
  .line { font-size: var(--type-lede-size); font-weight: 400; }
  .horizon { left: 80px; }
  .bar { justify-content: center; }
  .way { flex: 0 1 112px; }
  .guide, .vguide { left: 16px; }
  .pdeal { grid-template-columns: repeat(4, 1fr); }
  .pboard { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- reduced motion: nothing runs; changes cross-fade or cut ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .pencilmarks .pm, .level .pm, .level.level-ok .tickm { stroke-dashoffset: 0 !important; }
  .pencilmarks .pm-t, .wall[data-state="arrive"] .act { opacity: 1 !important; }
  .titles, .scene, .wall.lit .titles { transition: opacity .3s !important; transform: none !important; margin-right: 0 !important; }
  .scene { position: static; float: left; margin-right: 12px; }
  .framewrap { transform: none; }
  .frame { transition: opacity .3s ease !important; }
  .frame.turned { transform: none; }
  .frame.turned .front { opacity: 0; }
  .frame.turned .back { transform: none; }
  .nb, .wall[data-state="end"] .nb { transform: none; }
  .line, .line.out, .line.in { transform: none; }
  .guide, .vguide { transition: none; }
  .guide img, .vguide img, .fig img { transition: none !important; }
  .walk { scroll-behavior: auto; }
}

/* added with the stairwell: the decade painted on the stair wall, as a stairwell names its floor (large text: 4.2:1) */
.decade { position: absolute; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--venus-neutral-600); white-space: nowrap; }
.closer .ring.help { opacity: .55; border-style: dashed; border-width: 1.5px; }
/* a lead cord running behind a neighbour's label never cuts through its words: the words sit on a patch of wall */
.nb .rel, .nb .nhi, .nb .nyr { text-shadow: none; background: rgba(238, 238, 238, .94); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 3px; margin-left: -3px; width: fit-content; }
.nowtitle span { position: relative; z-index: 1; }
.tw .wl > span, .yw .nhi, .pdeal .pc .nhi, .pdeal .pc .ntk { text-shadow: 0 0 3px var(--wall), 0 0 3px var(--wall), 0 0 2px var(--wall); }


/* the work's own note in its mount: loading, or no signal */
.mnote { position: absolute; left: 10%; right: 10%; top: 50%; transform: translateY(-50%) rotate(-1.5deg); text-align: center; z-index: 2;
  font-size: var(--type-ui-size); line-height: 1.4; color: var(--ink-2); opacity: 0; transition: opacity var(--motion-slow) var(--ease-out); pointer-events: none; }
.mnote.on { opacity: 1; }
.photo.empty { background: var(--wall-lit); }
.photo.empty .drift { opacity: 0; }


/* ---------- a small phone, or large display zoom (320 px wide, or 200 % on a 390 px phone) ---------- */
@media (max-width: 340px) {
  .toprail .wm { width: 96px; height: 44px; }        /* 0.6: the drawing shrinks, the link stays a 44 px target */
  .toprail .wm svg { width: 84px; height: 21px; }
  .railrun { top: .31px; height: 3.72px; }
  .way span { font-size: 11px; letter-spacing: -.01em; }
  .horizon .empty { display: none; }
}
@media (max-width: 280px) {
  .way span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* icons keep their names */
  .way { padding-top: 14px; }
  .toprail .wm { width: 76px; height: 44px; }
  .toprail .wm svg { width: 64px; height: 16px; }
  .railrun { top: .24px; height: 2.84px; }
  .titles .en, .titles .when { font-size: 12px; }
}
@media (max-height: 620px) {
  .horizon .empty { display: none; }
}

/* a short wall: the bunting gives way and the hook comes up (the four threads are still in the bar) */
@media (max-height: 640px) {
  :root { --hookY: 84px; }
  .cords, .pulls { display: none; }
}
/* too short even so: the wall scrolls as one column; the floor, the guide and your walk stay put above the bar */
.wall.scroll { overflow-y: auto; overscroll-behavior: contain; }
.wall.scroll .floor, .wall.scroll .base { position: fixed; bottom: calc(var(--barH) + env(safe-area-inset-bottom)); }
.wall.scroll .skirting { position: fixed; bottom: calc(var(--barH) + env(safe-area-inset-bottom) + var(--floorH)); }
.wall.scroll .stage { padding-bottom: calc(var(--floorH) + var(--sk) + 32px); }
.wall.scroll .dim, .wall.scroll .lamp { position: fixed; }
