/* ==========================================================================
   SETL MAP — assemble.css  (assemble agent)
   Screen 06: «Собираем вашу будущую жизнь…» -> the day film -> «Похоже на вашу жизнь?»
   Prefixes: .as-  (screen)  .dt-  (day timeline component)  .bd-  (self-drawn fallback scene)
   Tone: dusk (cinema room). Only tokens from tokens.css.
   ========================================================================== */

.screen[data-screen="assemble"] {
  --as-dock-h: 64px;
  --as-gap: 14px;
  --as-clock: clamp(4.5rem, 11vw, 9.5rem);
  --as-stage-h: 42svh;
  overflow: hidden;
  color: var(--on-dusk);
}
.as-wrap {
  position: relative; height: 100%; min-height: 0;
  display: flex; flex-direction: column;
  grid-column: 1 / -1;
}

/* ───────────────────────── 1 · the computing moment ───────────────────────── */
.as-compute {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; align-content: center; row-gap: var(--space-3);
  padding: 0 calc(var(--page-pad) + var(--safe-r)) calc(24px + var(--safe-b)) calc(var(--page-pad) + var(--safe-l));
}
/* a faint sun-orbit behind the sequence: warm bloom + hairline rings (decoration only) */
.as-compute::before {
  content: ""; position: absolute; left: 50%; top: 46%; width: min(150vh, 120vw); aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  background:
    radial-gradient(circle, rgba(255, 217, 143, .11) 0%, rgba(255, 217, 143, .04) 26%, transparent 58%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 13vh, rgba(246, 239, 227, .075) 13vh calc(13vh + 1px));
  -webkit-mask-image: radial-gradient(circle, #000 0%, #000 34%, transparent 66%);
  mask-image: radial-gradient(circle, #000 0%, #000 34%, transparent 66%);
}
.as-compute__inner {
  position: relative; z-index: 1; width: min(36rem, 100%);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-4);
}
.as-compute__eyebrow { color: var(--glow); }
.as-arc { position: relative; width: min(23rem, 88%); aspect-ratio: 360 / 140; margin-block: var(--space-2) var(--space-1); }
.as-arc__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.as-arc__horizon { fill: none; stroke: var(--hair); stroke-width: 1.2; stroke-dasharray: 1 6; stroke-linecap: round; }
.as-arc__track { fill: none; stroke: rgba(246, 239, 227, .34); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.as-arc__done { fill: none; stroke: var(--glow); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.as-arc__halo { fill: rgba(255, 217, 143, .22); }
.as-arc__disc { fill: var(--glow); stroke: var(--sun); stroke-width: 2; }
.as-arc__nodes { position: absolute; inset: 0; }
.as-node {
  position: absolute; width: 38px; height: 38px; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--dusk-2); color: var(--on-dusk-2);
  border: 1.5px solid rgba(246, 239, 227, .34);
  transition: background-color var(--dur-s) var(--ease-standard), color var(--dur-s), border-color var(--dur-s), box-shadow var(--dur-s);
}
.as-node svg { width: 18px; height: 18px; }
.as-node.is-lit { background: var(--glow); color: var(--ink); border-color: var(--glow); box-shadow: 0 0 0 7px rgba(255, 217, 143, .16), 0 0 26px rgba(255, 217, 143, .35); }
.as-compute__title { font-size: clamp(2.125rem, 5.4vw, 3.5rem); line-height: 1.02; max-width: 12em; }
.as-lines {
  list-style: none; margin: var(--space-2) 0 0; padding: 0; width: min(25rem, 100%);
  display: flex; flex-direction: column; gap: 10px; text-align: left; min-height: calc(4 * 31px + 3 * 10px);
}
.as-line { display: flex; align-items: center; gap: 12px; color: var(--on-dusk-2); font: 400 var(--fs-body)/1.35 var(--font-text); transition: color var(--dur-s); }
.as-line.is-active { color: var(--on-dusk); }
.as-line__mark { position: relative; flex: none; width: 22px; height: 22px; }
.as-line__dot { position: absolute; inset: 6px; border-radius: 50%; background: var(--glow); opacity: .55; }
.as-line.is-active .as-line__dot { opacity: 1; animation: as-pulse 1.1s var(--ease-breath) infinite; }
.as-line.is-done .as-line__dot { opacity: 0; animation: none; }
.as-line__check { position: absolute; inset: 2px; width: 18px; height: 18px; color: var(--glow); }
.as-line__check path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .45s var(--ease-out); }
.as-line.is-done .as-line__check path { stroke-dashoffset: 0; }
@keyframes as-pulse { 0%, 100% { scale: .7; box-shadow: 0 0 0 0 rgba(255, 217, 143, .5); } 50% { scale: 1.1; box-shadow: 0 0 0 7px rgba(255, 217, 143, 0); } }
.as-meter { width: min(25rem, 100%); display: flex; flex-direction: column; gap: 10px; margin-top: var(--space-2); }
.as-meter__bar { height: 3px; border-radius: 3px; background: rgba(246, 239, 227, .16); overflow: hidden; }
.as-meter__bar i { display: block; height: 100%; background: var(--glow); transform-origin: 0 50%; transform: scaleX(0); }
.as-meter__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 500 var(--fs-caption)/1 var(--font-text); letter-spacing: var(--track-caption); text-transform: uppercase; color: var(--on-dusk-2); }
.as-meter__count b { color: var(--on-dusk); font-weight: 600; margin-left: .35em; font-variant-numeric: tabular-nums; }
.as-meter__pct { color: var(--glow); min-width: 3.4ch; text-align: right; font-variant-numeric: tabular-nums; }
.as-compute__skip { position: relative; z-index: 1; display: flex; justify-content: center; }
@media (min-width: 1024px) {
  .as-compute__inner { width: min(44rem, 100%); }
  .as-arc { width: min(30rem, 46vh, 100%); }
  .as-node { width: 44px; height: 44px; }
  .as-node svg { width: 20px; height: 20px; }
  .as-compute__title { font-size: clamp(2.5rem, min(4.6vw, 7.2vh), 4.75rem); max-width: 14em; }
  .as-lines { width: min(30rem, 100%); }
  .as-line { font-size: 1.0625rem; }
  .as-meter { width: min(30rem, 100%); }
}

/* ───────────────────────── 2 · the film ───────────────────────── */
.as-film { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--as-gap); padding: 0 var(--gutter) calc(10px + var(--safe-b)); }
.as-head { flex: none; display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.as-head__cap { color: var(--glow); }
.as-title { font-size: clamp(1.625rem, 2.6vw, 2.5rem); line-height: 1.05; font-weight: 500; letter-spacing: -.01em; max-width: 24em; }
.as-main { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.as-stage {
  position: relative; flex: 1 1 var(--as-stage-h); min-height: 168px;
  border-radius: 24px; overflow: hidden; isolation: isolate;
  background: var(--grad-dusk); box-shadow: var(--shadow-dusk);
}
.as-backdrop, .as-stage .as-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.screen[data-screen="assemble"] .as-slot { grid-column: auto; box-shadow: none; border-radius: 0; z-index: 1; pointer-events: none; }
.as-film.has-scene .as-backdrop { display: none; }
.as-scrim { display: none; }
.as-clock-mount { position: absolute; left: 14px; top: 8px; z-index: 3; pointer-events: none; }
.as-cap-mount { position: relative; z-index: 3; flex: none; }
.as-dock { flex: none; display: flex; flex-direction: column; gap: 4px; }
.as-scrub-mount { min-width: 0; }
.as-ctrl-mount { display: flex; }
.as-note { flex: none; font: 400 var(--fs-micro)/1.35 var(--font-text); color: var(--on-dusk-2); text-align: center; text-wrap: balance; }

/* ───────────────────────── 3 · the question ───────────────────────── */
.as-q {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 20px calc(var(--page-pad) + var(--safe-r)) calc(14px + var(--safe-b)) calc(var(--page-pad) + var(--safe-l));
  border-radius: var(--r-sheet); background: var(--dusk); color: var(--on-dusk);
  border-top: 1px solid var(--hair); box-shadow: 0 -26px 60px -22px rgba(0, 0, 0, .7);
  display: flex; flex-direction: column; gap: 6px;
}
.as-q::before { content: ""; align-self: center; width: 36px; height: 4px; border-radius: 4px; background: rgba(246, 239, 227, .28); margin: -8px 0 8px; }
.as-q__line { font: italic 500 1.5rem/1.1 var(--font-display); color: var(--glow); }
.as-q__title { font-size: clamp(2rem, 8vw, 2.5rem); line-height: 1.02; font-weight: 500; letter-spacing: var(--track-display); }
.as-q__sub { color: var(--on-dusk-2); font-size: var(--fs-small); line-height: 1.4; margin-bottom: 6px; }
.as-q__note { display: none; margin-top: 2px; font: 400 var(--fs-micro)/1.35 var(--font-text); color: var(--on-dusk-2); text-align: center; }
.as-q__actions { display: flex; flex-direction: column; gap: 10px; }
.as-q__actions .btn { min-height: 52px; }

/* ───────────────────────── day timeline parts (.dt-) ───────────────────────── */
.dt { display: contents; }

/* clock */
.dt-clock { color: var(--on-dusk); }
.dt-clock__time { display: flex; align-items: center; font: 500 var(--as-clock)/1 var(--font-display); font-variant-numeric: lining-nums; letter-spacing: 0; }
.dt-d { position: relative; display: inline-block; width: .54em; height: 1.12em; overflow: hidden; }
.dt-d__col { display: block; will-change: transform; }
.dt-d__n { display: block; height: 1.12em; line-height: 1.12; text-align: center; }
.dt-colon { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: .16em; width: .26em; height: 1.12em; }
.dt-colon__dot { display: block; width: .075em; height: .075em; border-radius: 50%; background: currentColor; opacity: .9; animation: dt-blink 2.4s var(--ease-breath) infinite; }
.dt.is-paused .dt-colon__dot, .dt-clock.is-paused .dt-colon__dot { animation-play-state: paused; }
@keyframes dt-blink { 0%, 100% { opacity: .95; } 50% { opacity: .3; } }
.dt-clock__cap { margin-top: .5rem; padding-left: .25rem; font: 500 var(--fs-caption)/1 var(--font-text); letter-spacing: var(--track-caption); text-transform: uppercase; color: var(--on-dusk-2); }

/* caption (stacked beats in one grid cell, so the card never jumps) */
.dt-cap { background: var(--dusk-2); border: 1px solid rgba(246, 239, 227, .14); border-radius: 20px; padding: 16px 18px 18px; box-shadow: var(--shadow-dusk); }
.dt-cap__stack { display: grid; }
.dt-cap__item, .dt-final { grid-area: 1 / 1; min-width: 0; }
.dt-cap__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.dt-cap__chip {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px 0 9px; border-radius: var(--r-pill);
  background: var(--dusk-3); color: var(--glow); font: 600 13px/1 var(--font-text); letter-spacing: .08em; font-variant-numeric: tabular-nums;
}
.dt-cap__ico { display: inline-flex; width: 16px; height: 16px; }
.dt-cap__ico svg { width: 100%; height: 100%; }
.dt-cap__metric { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--font-text); color: var(--on-dusk-2); }
.dt-cap__metric svg { width: 15px; height: 15px; color: var(--glow); }
.dt-cap__num { color: var(--on-dusk); font-weight: 600; font-variant-numeric: tabular-nums; }
.dt-cap__title { font: italic 500 clamp(1.5rem, 2.2vw, 1.95rem)/1.1 var(--font-display); letter-spacing: 0; color: var(--on-dusk); }
.dt-cap__text { margin-top: 6px; font: 400 var(--fs-body)/1.5 var(--font-text); color: var(--on-dusk-2); max-width: 42em; }
.dt-final { align-self: center; font: italic 500 clamp(2rem, 4vw, 3rem)/1.05 var(--font-display); color: var(--glow); letter-spacing: 0; }
.dt-cap .ln--word { padding-block: .12em; margin-block: -.12em; }

/* scrubber */
.dt-scrub { padding: 0 28px; touch-action: none; user-select: none; -webkit-user-select: none; }
.dt-scrub__rail { position: relative; height: 56px; cursor: pointer; }
.dt-scrub__line { position: absolute; left: 0; right: 0; top: 14px; height: 3px; border-radius: 3px; background: rgba(246, 239, 227, .22); }
.dt-scrub__fill { position: absolute; inset: 0; border-radius: 3px; background: var(--glow); transform-origin: 0 50%; transform: scaleX(0); }
.dt-scrub__thumb {
  position: absolute; left: 0; top: 15.5px; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; z-index: 2;
  background: var(--grad-sun); border: 1.5px solid var(--ink); pointer-events: none;
  box-shadow: 0 0 0 6px rgba(255, 217, 143, .16), 0 0 24px rgba(255, 217, 143, .55);
}
.dt-scrub.is-dragging .dt-scrub__thumb { box-shadow: 0 0 0 10px rgba(255, 217, 143, .2), 0 0 30px rgba(255, 217, 143, .6); }
.dt-mark {
  position: absolute; top: 0; width: 56px; height: 56px; margin-left: -28px; z-index: 1; border-radius: var(--r-sm);
  color: var(--on-dusk-2); -webkit-tap-highlight-color: transparent;
}
.dt-mark__node {
  position: absolute; left: 50%; top: 9px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%;
  background: var(--dusk); border: 1.5px solid rgba(246, 239, 227, .55);
  transition: background-color var(--dur-s), border-color var(--dur-s), scale var(--dur-s) var(--ease-spring), box-shadow var(--dur-s);
}
.dt-mark__time { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font: 500 12px/1 var(--font-text); letter-spacing: .06em; font-variant-numeric: tabular-nums; transition: color var(--dur-s); }
.dt-mark.is-done .dt-mark__node { background: var(--on-dusk); border-color: var(--on-dusk); }
.dt-mark.is-active { color: var(--glow); }
.dt-mark.is-active .dt-mark__node { background: var(--glow); border-color: var(--glow); scale: 1.25; box-shadow: 0 0 0 5px rgba(255, 217, 143, .18); }
@media (hover: hover) and (pointer: fine) { .dt-mark:hover { color: var(--on-dusk); } .dt-mark:hover .dt-mark__node { scale: 1.3; } }

/* controls */
.dt-ctrl { display: flex; align-items: center; gap: 8px; }
.dt-ctrl__play {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; flex: none;
  color: var(--on-dusk); border: 1.5px solid rgba(246, 239, 227, .5); background: transparent;
  transition: background-color var(--dur-xs), scale var(--dur-press);
}
.dt-ctrl__play:active { scale: .92; }
.dt-ctrl__play svg { width: 22px; height: 22px; }
@media (hover: hover) and (pointer: fine) { .dt-ctrl__play:hover { background: rgba(246, 239, 227, .12); } }
.dt-ctrl .btn--ghost { color: var(--on-dusk); }
.dt-ctrl .btn { padding-inline: 14px; gap: 6px; white-space: nowrap; }
.dt-ctrl .btn__icon { width: 18px; height: 18px; }

/* ───────────────────────── fallback scene (.bd-) ───────────────────────── */
.bd { position: absolute; inset: 0; overflow: hidden; }
.bd-svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; }
.bd .o { stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.bd .hl { stroke: var(--line-strong); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.bd .fp2 { fill: var(--paper-2); } .bd .fp3 { fill: var(--paper-3); } .bd .fcard { fill: var(--card); }
.bd .fsun { fill: var(--sun); } .bd .fglow { fill: var(--glow); } .bd .fsage { fill: var(--sage); }
.bd .fterra { fill: var(--terra); } .bd .fterrasoft { fill: var(--terra-soft); } .bd .fdusk { fill: var(--dusk-2); }
.bd-far { stroke-width: 2; }
.bd-crane { fill: none; stroke: inherit; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.bd-fac { stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bd-fac2 { stroke-linejoin: round; }
.bd-band, .bd-office { fill: var(--glow); }
.bd-band { transition: opacity .45s var(--ease-standard); }
.bd-wall { fill: #F7E9D0; }
.bd-rug { fill: var(--terra-soft); }
.bd-curtain { fill: var(--terra-soft); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bd-beam, .bd-lampglow, .bd-deskglow, .bd-candle circle:first-child { pointer-events: none; }
.bd-roomdusk { fill: #2B2A3D; pointer-events: none; }
.bd-steam path { fill: none; stroke: #fff; stroke-opacity: .85; stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bd-lap { fill: var(--glow); }
.bd-lobby { fill: var(--dusk-3); }
.bd-dash { stroke-dasharray: 10 14; }
.bd-route { fill: none; stroke: var(--terra); stroke-width: 2.6; stroke-dasharray: 2 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bd-badge__bg { fill: var(--dusk-3); stroke: var(--glow); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bd-badge__tip { fill: var(--dusk-3); }
.bd-badge__t { fill: var(--glow); font: 600 12.5px var(--font-text); font-variant-numeric: tabular-nums; }
.bd-m { fill: #fff; font: 600 17px var(--font-text); }
.bd-slamp { transition: opacity .5s var(--ease-standard); }
.bd-slamp path { fill: none; }

/* ───────────────────────── phase switching ───────────────────────── */
.screen[data-screen="assemble"][data-phase="compute"] .as-film { visibility: hidden; }

/* ───────────────────────── desktop & landscape phones ─────────────────────────
   Film on the left, a side column on the right: the clock on top, the step card (or the final question) below.
   Nothing but the scene itself sits on the scene, so no text ever fights the illustration. */
@media (min-width: 1024px), (orientation: landscape) and (max-height: 520px) {
  .screen[data-screen="assemble"] {
    --as-clock: clamp(4rem, min(10.2vw, 16vh), 9.25rem);
    --as-col: clamp(21rem, 27vw, 28rem);
    padding-bottom: 60px; /* keeps the timeline labels clear of the demo tag */
  }
  .as-film { padding: 0; }
  .as-head { flex-direction: row; align-items: baseline; justify-content: space-between; gap: var(--space-5); padding-top: 0; }
  .as-head__cap { order: 2; flex: none; }
  .as-title { max-width: none; white-space: nowrap; }
  .as-main {
    display: grid; gap: 0 var(--space-5);
    grid-template-columns: minmax(0, 1fr) var(--as-col); grid-template-rows: auto minmax(0, 1fr);
  }
  .as-stage { position: relative; inset: auto; grid-column: 1; grid-row: 1 / -1; min-height: 0; border-radius: var(--r-scene); }
  .as-clock-mount { position: static; grid-column: 2; grid-row: 1; align-self: start; padding: 0 0 0 4px; transition: opacity var(--dur-m) var(--ease-standard); }
  .as-cap-mount { position: static; grid-column: 2; grid-row: 2; align-self: end; width: auto; transition: opacity var(--dur-s) var(--ease-standard); }
  .dt-cap { padding: 20px 22px 22px; border-radius: 24px; }
  .screen[data-screen="assemble"].is-final .as-cap-mount { opacity: 0; pointer-events: none; }
  .as-dock { flex-direction: row; align-items: center; gap: var(--space-5); height: var(--as-dock-h); }
  .as-scrub-mount { flex: 1; min-width: 0; }
  .as-ctrl-mount { flex: none; min-width: 15.5rem; justify-content: flex-end; }
  .dt-scrub { padding-inline: 36px; }
  .as-note { position: absolute; right: 0; bottom: -38px; text-align: right; max-width: 52%; }
  /* the question takes the place of the step card */
  .as-q {
    left: auto; right: 0; width: var(--as-col);
    bottom: calc(var(--as-dock-h) + var(--as-gap));
    border-radius: 24px; border: 1px solid rgba(246, 239, 227, .16); background: var(--dusk-2); box-shadow: var(--shadow-dusk);
    padding: 24px 24px 22px; gap: 4px;
  }
  .as-q::before, .as-q__again { display: none; }
  .as-q__line { font-size: 1.375rem; margin-bottom: 4px; }
  .as-q__title { font-size: clamp(1.875rem, 2.5vw, 2.5rem); }
  .as-q__sub { font-size: var(--fs-body); margin-bottom: 14px; }
  .as-q__actions { flex-direction: column; }
  .as-q__actions .btn { width: 100%; white-space: nowrap; }
}
@media (min-width: 1024px) and (max-height: 860px) {
  .screen[data-screen="assemble"].is-final .as-clock-mount { opacity: 0; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .screen[data-screen="assemble"] { --as-dock-h: 52px; --as-gap: 8px; --as-col: clamp(15rem, 31vw, 19rem); --as-clock: 3.25rem; padding-top: calc(var(--header-h) + var(--safe-t) + 8px); }
  .as-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .as-clock-mount { padding-bottom: 8px; }
  .dt-clock__cap { display: none; }
  .dt-cap { padding: 12px 14px 14px; border-radius: 18px; }
  .dt-cap__head { margin-bottom: 4px; }
  .dt-cap__title { font-size: 1.25rem; }
  .dt-cap__text { margin-top: 4px; font-size: .8125rem; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
  .dt-final { font-size: 1.5rem; }
  .dt-scrub__rail { height: 48px; }
  .dt-mark { height: 48px; }
  .as-note, .as-q__line, .as-q__sub { display: none; }
  .screen[data-screen="assemble"].is-final .as-clock-mount { opacity: 0; }
  .as-q { padding: 16px 18px; gap: 8px; }
  .as-q__title { font-size: 1.5rem; margin-bottom: 4px; }
  .as-q__actions { gap: 8px; }
  .as-q__actions .btn { min-height: 44px; }
}
/* landscape phones: the computing moment becomes two columns (arc and title | steps and meter) */
@media (max-height: 520px) and (orientation: landscape) {
  .as-compute { row-gap: 10px; padding-bottom: calc(10px + var(--safe-b)); }
  .as-compute__inner {
    width: min(48rem, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto; column-gap: var(--space-6); row-gap: 14px; align-items: center; justify-items: center;
  }
  .as-compute__eyebrow { grid-column: 1; grid-row: 1; }
  .as-arc { grid-column: 1; grid-row: 2; width: min(13rem, 100%); margin: 0; }
  .as-node { width: 30px; height: 30px; }
  .as-node svg { width: 15px; height: 15px; }
  .as-compute__title { grid-column: 1; grid-row: 3; font-size: 1.625rem; max-width: none; }
  .as-lines { grid-column: 2; grid-row: 1 / span 2; width: 100%; margin: 0; gap: 8px; min-height: calc(4 * 24px + 3 * 8px); align-self: end; }
  .as-line { font-size: .9375rem; }
  .as-meter { grid-column: 2; grid-row: 3; width: 100%; margin: 0; }
}
@media (max-height: 520px) and (orientation: landscape) and (max-width: 1023px) {
  .screen[data-screen="assemble"] { padding-bottom: calc(12px + var(--safe-b)); }
}

/* ───────────────────────── phones: sheet layout ───────────────────────── */
@media (max-width: 1023px) and (not ((orientation: landscape) and (max-height: 520px))) {
  .screen[data-screen="assemble"] { --as-clock: clamp(3.25rem, 14vw, 4.25rem); }
  /* the clock rides on its own dark pill, so it reads on any time of day */
  .as-clock-mount {
    left: 12px; top: 12px; padding: 8px 14px 9px; border-radius: 18px;
    background: rgba(28, 27, 42, .66); box-shadow: 0 0 0 1px rgba(246, 239, 227, .12), 0 10px 30px -12px rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1);
  }
  .dt-clock__cap { margin-top: .35rem; font-size: 10.5px; letter-spacing: .1em; }
  .dt-scrub { padding-inline: 24px; }
  .as-dock { gap: 0; }
  .as-ctrl-mount { justify-content: space-between; align-items: center; }
  .dt-ctrl { width: 100%; justify-content: space-between; }
  .dt-ctrl__skip, .dt-ctrl__again { margin-left: auto; }
  .as-note { display: none; }
  .dt-cap__text { font-size: .9375rem; line-height: 1.45; }
  .dt-cap__title { font-size: 1.5rem; }
  .as-q__note { display: block; }
}
@media (max-width: 1023px) and (max-height: 760px) {
  .screen[data-screen="assemble"] { --as-stage-h: 34svh; }
  .as-head__cap { display: none; }
  .dt-cap { padding: 12px 14px 14px; }
  .dt-cap__head { margin-bottom: 6px; }
  .dt-cap__text { font-size: var(--fs-small); margin-top: 4px; }
  .as-note { display: none; }
}
@media (max-width: 1023px) and (max-height: 760px) and (not ((orientation: landscape) and (max-height: 520px))) {
  .screen[data-screen="assemble"] { --as-clock: 3rem; }
  .as-clock-mount { padding: 6px 12px 7px; border-radius: 16px; }
  .dt-clock__cap { display: none; }
}
@media (max-width: 380px) {
  .dt-mark__time { font-size: 11px; letter-spacing: .03em; }
  .dt-scrub { padding-inline: 20px; }
}

/* ───────────────────────── reduced motion ───────────────────────── */
html.rm .dt-colon__dot, html.rm .as-line.is-active .as-line__dot { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .dt-colon__dot, .as-line.is-active .as-line__dot { animation: none !important; }
}

/* clock legibility: it sits on dusk (side column) or on its own pill (phones) */
.dt-clock { text-shadow: none; }
.dt-clock__cap { color: var(--on-dusk-2); text-shadow: none; }
