/* Ornament skin — the look of both modes, loaded after editor.css (and ornament3d.css).
   The composition stays theirs (library | stage | settings); this layer sets the material.
   To go back, drop the <link> to this file.

   Character: a studio bench for one object. The stage is the lit table; the panels are
   instruments laid around it on a dark ground — separate, rounded, quiet.

   The system (frontend-quality, the dense-interface scale from reference/product.md):
   - type: 11 the words under rail icons · 12 captions and group names · 14 the working size · 16 names of things · 20 the title
   - weights: 400 text, 500 the current choice and names, 600 titles and the main button
   - line height: 1.3 names and titles, 1.5 running text
   - spacing: 4 / 8 / 12 / 16 / 24 / 32
   - radii: 8 controls · 12 pictures and cards · 16 panels · pill for switches
   - colours: ground, panel, raised, hover, sunk, two rules, text, muted, faint, acid
   - shadows: lift (raised choice), float (menus, stage tools), ring (selection)
   - motion: 150 ms on colour and background; none under reduced motion
   - numbers: tabular figures; monospace only inside a code block */
:root {
  --ground: #050506; --bg: #0b0b0d; --panel: #131316; --raise: #1b1b1f; --hover: #25252a; --sunk: #0e0e10;
  --line: rgba(255, 255, 255, 0.07); --line-2: rgba(255, 255, 255, 0.12);
  --text: #edece8; --mute: #a19e96; --faint: #8a877f; --on-acid: #111111;
  --fs-xs: 12px; --fs-rail: 11px; --fs-s: 14px; --fs: 16px; --fs-l: 20px;
  --t: 14px; --t-h: 16px;
  --r: 8px; --r-m: 12px; --r-l: 16px; --pill: 999px;
  --gutter: 8px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --lift: 0 1px 2px rgba(0, 0, 0, 0.5);
  --float: 0 0 0 1px var(--line-2), 0 16px 48px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 2px var(--panel), 0 0 0 4px var(--acid);
  --bar: 48px;
  --rail: 72px;
  --ease: 150ms ease;
}
html, body { background: var(--ground); }
body { font: 400 var(--fs-s)/1.5 var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
::selection { background: var(--acid); color: var(--on-acid); }
button, input, select { font-size: var(--fs-s); }

/* ---------- the bench: panels on a dark ground, a gutter between them ---------- */
.app, .v3 { gap: var(--gutter); padding: 0 var(--gutter) var(--gutter); background: var(--ground); }
/* the 3D page: a rail, a sheet (its column is its width plus the gutter, and nothing when folded), the stage, and the same on the right */
.v3 { column-gap: 0; --col-l: calc(var(--pane-l, 300px) + var(--gutter)); --col-r: calc(var(--pane-r, 340px) + var(--gutter)); }
.v3.is-left-off { --col-l: 0px; }
.v3.is-right-off { --col-r: 0px; }
.app { grid-template-columns: var(--pane-l, var(--lib)) minmax(0, 1fr) var(--pane-r, var(--side)); }
.app[data-state="empty"] { grid-template-columns: var(--pane-l, var(--lib)) minmax(0, 1fr); }
.lib, .order, .set, .canvas, .v3__stage, .sheet {
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel); overflow: hidden;
}
.lib, .set, .sheet__body { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--hover) transparent; }
.canvas { background: var(--sunk); position: relative; }
.v3__stage { background: radial-gradient(110% 85% at 50% 42%, #1a1a1e 0%, var(--bg) 72%); }
.v3__stage--light { background: radial-gradient(110% 85% at 50% 42%, #f5f3ee 0%, var(--v3-light) 75%); }
.v3__stage--clear { background: repeating-conic-gradient(var(--raise) 0 25%, var(--bg) 0 50%) 0 0 / 24px 24px; }
/* a folded pane takes no room; its gutter goes with it (Графика; the 3D page folds through --col-l / --col-r) */
.is-left-off .lib { display: none; }
.is-right-off .set, .is-right-off .order { display: none; }
.app.is-left-off { grid-template-columns: 0 minmax(0, 1fr) var(--pane-r, 340px); column-gap: 0; }
.app.is-right-off { grid-template-columns: var(--pane-l, 300px) minmax(0, 1fr) 0; column-gap: 0; }
.app.is-left-off.is-right-off { grid-template-columns: 0 minmax(0, 1fr) 0; }
.is-left-off:not(.is-right-off) .canvas { margin-right: var(--gutter); }
.is-right-off:not(.is-left-off) .canvas { margin-left: var(--gutter); }
.app[data-state="empty"].is-left-off, .app[data-state="empty"].is-left-off.is-right-off { grid-template-columns: 0 minmax(0, 1fr); }
.app[data-state="empty"].is-right-off:not(.is-left-off) { grid-template-columns: var(--pane-l, var(--lib)) minmax(0, 1fr); column-gap: var(--gutter); }
.app[data-state="empty"].is-right-off .canvas { margin-left: 0; }
.is-resizing, .is-resizing * { cursor: col-resize; user-select: none; }

/* the drag handles: a full-height strip in the gutter between a pane and the stage. Nothing
   shows at rest; on hover a hairline appears along the whole edge, acid while you drag. */
.app, .v3 { position: relative; }
.panes__handle {
  position: absolute; top: var(--bar); bottom: var(--gutter); z-index: 6; width: calc(var(--gutter) + 8px);
  cursor: col-resize; touch-action: none;
}
.panes__handle--left { left: calc(var(--pane-l, 300px) + var(--gutter) - 4px); }
.panes__handle--right { right: calc(var(--pane-r, 340px) + var(--gutter) - 4px); }
.is-left-off .panes__handle--left { left: 0; width: var(--gutter); }
.is-right-off .panes__handle--right { right: 0; width: var(--gutter); }
/* 3D: the handles sit in the gutter between a sheet and the stage, one rail further in */
.v3 .panes__handle--left { left: calc(var(--rail) + var(--pane-l, 300px) + var(--gutter)); }
.v3 .panes__handle--right { right: calc(var(--rail) + var(--pane-r, 340px) + var(--gutter)); }
.v3.is-left-off .panes__handle--left { left: calc(var(--rail) + var(--gutter)); width: var(--gutter); }
.v3.is-right-off .panes__handle--right { right: calc(var(--rail) + var(--gutter)); width: var(--gutter); }
.panes__handle::after {
  content: ""; position: absolute; top: var(--s3); bottom: var(--s3); left: 50%; width: 2px; margin-left: -1px;
  border-radius: var(--pill); background: transparent; transition: background var(--ease) 80ms;
}
.panes__handle:hover::after { background: rgba(255, 255, 255, 0.3); }
.panes__handle:focus-visible::after, .is-resizing .panes__handle:active::after, .panes__handle:active::after { background: var(--acid); transition-delay: 0s; }
.panes__handle:focus-visible { outline: none; }
.panes__btns { display: flex; gap: var(--s1); padding-right: var(--s2); margin-right: var(--s1); border-right: 1px solid var(--line); }
.panes__btn[aria-pressed="false"] { color: var(--faint); }
.panes__btn svg { width: 20px; height: 20px; }

/* ---------- bar: sits on the ground, no strip of its own ---------- */
.bar { gap: var(--s3); padding: 0 var(--gutter); border-bottom: 0; background: var(--ground); }
.bar__home { color: var(--mute); }
.bar__hist, .bar__photos { border-left-color: var(--line); }
.modes { gap: var(--s1); padding: var(--s1); border: 0; border-radius: var(--pill); background: var(--panel); box-shadow: 0 0 0 1px var(--line-2); }
.modes__a { min-height: 28px; padding: 0 var(--s3); border-radius: var(--pill); color: var(--mute); transition: background var(--ease), color var(--ease); }
.modes__a:hover { color: var(--text); }
.modes__a[aria-current="page"] { background: var(--hover); color: var(--text); font-weight: 500; box-shadow: var(--lift); }
.ibtn { width: 36px; height: 36px; border-radius: var(--r); transition: background var(--ease), color var(--ease); }
.ibtn svg { width: 20px; height: 20px; }
.btn { min-height: 36px; padding: 0 var(--s4); border: 0; border-radius: var(--r); background: var(--raise); font-weight: 500; transition: background var(--ease); }
.btn:hover { background: var(--hover); }
.btn--main { background: var(--acid); color: var(--on-acid); font-weight: 600; }
.btn--main:hover { background: var(--acid); filter: brightness(1.08); }
.ph { width: 32px; height: 32px; }
.ibtn--txt { width: auto; min-width: 36px; padding: 0 var(--s2); }   /* «100%» needs its width */

/* ---------- panel content ---------- */
.lib { padding: var(--s3); }
.set { padding: var(--s4); }
.order { padding: var(--s3); }
.h { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); margin-bottom: var(--s3); }
.set .h { font-size: var(--fs-l); font-weight: 600; letter-spacing: -0.01em; text-transform: none; line-height: 1.3; color: var(--text); margin-bottom: var(--s1); }
.set__d { color: var(--mute); margin-bottom: var(--s6); }
.grp { margin: var(--s6) 0 var(--s3); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.grp:first-child { margin-top: var(--s1); }

/* tabs and segmented choices: a sunk track, the current option raised */
.tabs, .seg {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 0;
  border-radius: var(--r); background: var(--sunk); box-shadow: 0 0 0 1px var(--line-2);
}
.tabs { margin-bottom: var(--s4); }
.seg { margin-bottom: var(--s4); }
.tabs button, .seg button {
  flex: 1 1 auto; min-height: 30px; padding: 0 var(--s2); border-radius: 6px; color: var(--mute); white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}
.tabs button:hover, .seg button:hover { color: var(--text); }
.tabs button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--hover); color: var(--text); font-weight: 500; box-shadow: var(--lift); }

/* sliders: one line for the name and the value, a thin track under it */
.rng { gap: var(--s2); margin-bottom: var(--s4); }
.rng__top { align-items: baseline; color: var(--text); }
.rng output { color: var(--mute); }
.rng input { height: 16px; }
.rng input::-webkit-slider-runnable-track { height: 4px; border-radius: var(--pill); background: linear-gradient(90deg, var(--text) var(--p), var(--hover) var(--p)); }
.rng input::-moz-range-track { height: 4px; border-radius: var(--pill); background: var(--hover); }
.rng input::-moz-range-progress { height: 4px; border-radius: var(--pill); background: var(--text); }
.rng input::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; box-shadow: var(--lift); }
.rng input::-moz-range-thumb { width: 14px; height: 14px; box-shadow: var(--lift); }
.rng input:hover::-webkit-slider-thumb { transform: scale(1.15); }
.rng__ends { display: none; }   /* the name says what grows; the ends were noise */

/* cards: the picture is the object; the choice is a ring */
.card { gap: var(--s2); padding: 0; border: 0; border-radius: var(--r-m); background: none; }
.card img { margin: 0; border-radius: var(--r-m); box-shadow: none; transition: box-shadow var(--ease); }
.card:hover { background: none; }
.card:hover img { box-shadow: 0 0 0 1px var(--line-2); }
.card[aria-pressed="true"] img, .card.is-on img { box-shadow: var(--ring); }
.card__n { font-weight: 500; color: var(--text); line-height: 1.3; }
.card__d { font-size: var(--fs-xs); color: var(--mute); line-height: 1.3; }
.card--save { padding: var(--s3); border: 1px dashed var(--line-2); border-radius: var(--r-m); color: var(--mute); }
.card__add, .card__x { border-radius: var(--r); }

/* the chain, photos, snapshots, empty start */
.end { min-height: 32px; }
.end.is-sel { box-shadow: none; color: var(--text); font-weight: 500; }
.row { min-height: 48px; border-radius: var(--r); }
.row img { width: 36px; height: 36px; border-radius: 6px; }
.row.is-sel { border-color: transparent; background: var(--raise); box-shadow: var(--lift); }
.ph, .snap { border: 0; border-radius: var(--r); overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); }
.ph.is-on, .snap.is-on { box-shadow: var(--ring); }
.ph__x, .snap__x { border-radius: var(--pill); }
.snaps { border-top-color: var(--line); }
.snap--add { border: 1px dashed var(--line-2); box-shadow: none; color: var(--mute); }
.canvas__tools { padding: var(--s2) var(--s3); }
.canvas__scroll img { border-radius: var(--r); box-shadow: var(--float); }
.canvas__msg { border-radius: var(--r-m); }
.app[data-state="empty"] .drop { border: 1px dashed var(--line-2); border-radius: var(--r-l); }
.drop__big { font-size: var(--fs-l); font-weight: 600; }
.sample { gap: var(--s2); padding: 0; border: 0; border-radius: var(--r-m); }
.sample img { border-radius: var(--r-m); }

/* floating surfaces */
.menu { padding: var(--s1); border: 0; border-radius: var(--r-m); background: var(--raise); box-shadow: var(--float); }
.menu__i { min-height: 52px; padding: var(--s2) var(--s3); border-radius: var(--r); }
.menu__i b { font-weight: 500; font-size: var(--fs-s); }
.menu__i span { font-size: var(--fs-xs); color: var(--mute); line-height: 1.3; }
.menu__i:hover, .menu__i:focus-visible { background: var(--hover); box-shadow: none; }
.menu__sep { margin: var(--s1) 0; border-top-color: var(--line); }
.dlg { border: 0; border-radius: var(--r-l); background: var(--raise); box-shadow: var(--float); }
.dlg__h { font-size: var(--fs-l); font-weight: 600; line-height: 1.3; }
.dlg__p { line-height: 1.5; }
.dlg__code { border: 0; border-radius: var(--r); background: var(--sunk); font: var(--fs-xs)/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.toast { padding: var(--s2) var(--s4); border-radius: var(--pill); box-shadow: var(--float); }

/* ---------- 3D: picture row and library ---------- */
.v3__libbody { padding: var(--s3); gap: var(--s4); }
.pics__head { align-items: center; margin-bottom: var(--s3); }
.pics__h { margin: 0; }
.pics__own { min-height: 28px; padding: 0 var(--s3); border-radius: var(--pill); background: var(--raise); color: var(--text); text-decoration: none; font-weight: 500; transition: background var(--ease); }
.pics__own:hover { background: var(--hover); }
.pics__row { gap: var(--s2); }
.pic { gap: var(--s1); padding: 0; border: 0; border-radius: var(--r-m); align-content: start; }
.pic img { border-radius: var(--r-m); box-shadow: none; transition: box-shadow var(--ease); }
.pic:hover img { box-shadow: 0 0 0 1px var(--line-2); }
.pic[aria-pressed="true"] img { box-shadow: var(--ring); }
.pic__n { padding: 0; font-size: var(--fs-xs); line-height: 1.3; color: var(--mute); }
.pic[aria-pressed="true"] .pic__n { color: var(--text); }
.pic__sub { color: var(--faint); }
.pics__note { font-size: var(--fs-xs); line-height: 1.5; color: var(--faint); }
.v3__grid { gap: var(--s3) var(--s2); }
.v3__card { gap: var(--s2); padding: 0; }
.v3__card img { border-radius: var(--r-m); }
.v3__card[aria-pressed="true"] { background: none; }
.v3__cardtext { padding: 0; gap: 0; }
.v3__card .card__n { line-height: 1.3; }
.v3__cardsub { font-size: var(--fs-xs); color: var(--mute); line-height: 1.3; }

/* ---------- 3D: settings — the effect's name is the title ---------- */
.set3__h { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.set3__lead { margin: 0 0 var(--s4); color: var(--mute); line-height: 1.5; }
.grp3 { margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--line); }
.grp3--fx { margin-top: var(--s2); padding-top: 0; border-top: 0; }
.grp3__h { margin-bottom: var(--s3); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.grp3--fx .grp3__h { font-size: var(--fs-l); font-weight: 600; letter-spacing: -0.01em; text-transform: none; line-height: 1.3; color: var(--text); }
.set3__common { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s8); padding-top: 0; border-top: 0; font-size: var(--fs-xs); color: var(--faint); }
.set3__common::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.set3__common + .grp3 { margin-top: var(--s4); padding-top: 0; border-top: 0; }
.v3__seg button { min-height: 30px; }
.v3__row { min-height: 32px; gap: var(--s2); }
.v3__check { width: 16px; height: 16px; }
.tints { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0; margin: 0 0 var(--s4); }
.tint { height: 32px; }
.tint::before { width: 22px; height: 22px; border-radius: var(--pill); }

/* ---------- 3D: things on the stage ---------- */
.v3__hint, .v3__load, .v3__rec { border: 0; border-radius: var(--pill); background: rgba(27, 27, 31, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--float); }
.v3__hint { padding: var(--s1) var(--s4); color: var(--mute); }
.v3__msg { border: 0; border-radius: var(--r-m); background: var(--raise); box-shadow: var(--float); }
.v3__msg::before { content: ""; position: absolute; left: 0; top: var(--s3); bottom: var(--s3); width: 2px; border-radius: var(--pill); background: var(--acid); }
.v3__msg--error::before { background: #e0a24a; }
.v3__drop { border-width: 1px; border-radius: var(--r-l); }

/* ---------- phone: one column, edge to edge; panes are not resizable there ---------- */
@media (max-width: 899px) {
  .app, .v3 { gap: 0; padding: 0; }
  .v3 { grid-template-columns: minmax(0, 1fr); }
  .app, .app[data-state="empty"] { grid-template-columns: minmax(0, 1fr); }
  .lib, .order, .set, .canvas, .v3__stage, .sheet { border: 0; border-radius: 0; }
  .lib, .order, .set { border-top: 1px solid var(--line); }
  .panes__handle, .panes__btns { display: none; }
  .is-left-off .lib, .is-right-off .set, .is-right-off .order { display: revert; }
  .v3__tabs { background: var(--panel); border-color: var(--line); }
  .bar { gap: var(--s2); }
  .modes__a { padding: 0 var(--s3); }
  .dl__btn { padding: 0 var(--s3); }
}
@media (pointer: coarse), (max-width: 899px) {
  .modes__a, .btn, .bar .btn, .pics__own { min-height: 44px; }
  .modes__a { min-width: 48px; justify-content: center; }
  .ph { width: 44px; height: 44px; }
  .end { min-height: 44px; }
  .ibtn { width: 44px; height: 44px; }
  .tabs button, .seg button, .v3__seg button { min-height: 44px; }
  .tint { height: 44px; }
  .tints { grid-template-columns: repeat(auto-fill, 44px); }
  .v3__row { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .modes__a, .ibtn, .btn, .tabs button, .seg button, .card img, .pic img, .pics__own, .sbtn, .rail__btn, .cam, .panes__handle::after { transition: none; }
  .rng input:hover::-webkit-slider-thumb { transform: none; }
}

/* ---------- «Лента»: the row of states under the stage ----------
   A panel like the others. Blocks are the frames of one object: width = seconds, the hatched
   wedge on a block's left is the transition into it, the right edge stretches it. */

/* ---------- the start screen of Графика: what comes out, then the drop zone ---------- */
.start { display: none; }
.app[data-state="empty"] .canvas__stage { grid-template-rows: auto minmax(120px, 180px) auto auto; align-content: start; gap: var(--s5, 20px); }
.app[data-state="empty"] .start, .app[data-state="empty"] .drop, .app[data-state="empty"] .samples { width: 100%; max-width: 880px; justify-self: center; }
.app[data-state="empty"] .start { display: grid; gap: var(--s3); }
.start__h { margin: 0; font-size: var(--fs-l); font-weight: 600; line-height: 1.3; text-wrap: balance; }
.start__p { margin: 0; font-size: var(--fs-s); color: var(--mute); line-height: 1.5; max-width: 66ch; }
.start__steps { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); counter-reset: st; }
.start__step { counter-increment: st; display: grid; gap: 4px; align-content: start; padding: var(--s2); border-radius: var(--r-m); background: var(--raise); border: 1px solid var(--line); min-width: 0; }
.start__step img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); background: var(--sunk); margin-bottom: 4px; }
.start__step b { font-size: var(--fs-s); font-weight: 500; }
.start__step b::before { content: counter(st) " · "; color: var(--faint); font-weight: 400; }
.start__step span { font-size: var(--fs-xs); color: var(--mute); line-height: 1.5; }
@media (max-width: 599px) {
  .start__steps { grid-template-columns: minmax(0, 1fr); }
  .start__step { grid-template-columns: 96px minmax(0, 1fr); column-gap: var(--s2); align-items: center; }
  .start__step img { grid-row: 1 / 3; margin: 0; }
}

.btn--ghost { background: transparent; }



/* ---------- the stage frame: a video's shape, or a block on a sketched page ---------- */
.v3__frame { position: absolute; inset: 0; z-index: 1; }
.v3__stage.is-video, .v3__stage.is-site { background: var(--ground); }
.is-video .v3__frame { border-radius: var(--r); overflow: hidden; outline: 1px solid var(--line-2); background: radial-gradient(110% 85% at 50% 42%, #1a1a1e 0%, var(--bg) 72%); }
.is-site .v3__frame { overflow: hidden; }
.v3__ftag { position: absolute; left: var(--s2); top: var(--s2); z-index: 3; height: 24px; padding: 0 var(--s2); border-radius: var(--pill); background: rgba(5, 5, 6, .7); color: var(--mute); font-size: var(--fs-xs); line-height: 1.3; display: inline-flex; align-items: center; pointer-events: none; white-space: nowrap; }
.v3__ftag[hidden] { display: none; }
.v3__site { position: absolute; inset: var(--s4); display: grid; grid-template-rows: 44px minmax(0, 1fr); border-radius: var(--r-m); background: var(--sunk); border: 1px solid var(--line); overflow: hidden; pointer-events: none; }
.v3__site[hidden] { display: none; }
.pg__nav { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--s4); border-bottom: 1px solid var(--line); }
.pg__logo { width: 56px; height: 10px; border-radius: 5px; background: var(--mute); }
.pg__links { display: flex; gap: var(--s3); }
.pg__links i { width: 36px; height: 6px; border-radius: 3px; background: var(--hover); }
.pg__hero { position: relative; }
.pg__slot { position: absolute; inset: 0; }
.v3__site[data-layout="block"] .pg__slot { left: 50%; right: 4%; top: 8%; bottom: 8%; }
.pg__over { position: absolute; left: 0; right: 0; top: 44px; bottom: 0; z-index: 2; overflow: hidden; }
.pg__move { position: absolute; inset: 0; }
.v3__site[data-scroll="true"] .pg__move { transform: translateY(calc(var(--scroll, 0) * -150%)); }
.pg__copy { position: absolute; display: grid; gap: 10px; }
.pg__copy i, .pg__flow i { display: block; border-radius: 4px; }
.v3__site[data-layout="full"] .pg__copy { left: var(--s6, 24px); bottom: var(--s6, 24px); width: 38%; }
.v3__site[data-layout="block"] .pg__copy { left: var(--s6, 24px); top: 50%; transform: translateY(-50%); width: 40%; }
.v3__site[data-layout="bg"] .pg__copy { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52%; justify-items: center; }
.pg__h1 { height: 22px; width: 90%; background: var(--text); opacity: .9; }
.pg__h1--s { width: 60%; }
.pg__p { height: 8px; width: 100%; background: var(--mute); opacity: .45; }
.pg__p--s { width: 70%; }
.pg__btn { width: 112px; height: 30px; margin-top: 6px; border-radius: var(--r) !important; background: var(--text); }
.pg__flow { position: absolute; top: 100%; left: 0; right: 0; display: grid; gap: var(--s4); padding: var(--s4) var(--s6, 24px); }
.v3__site[data-scroll="false"] .pg__flow { display: none; }
.pg__flow section { display: grid; gap: 10px; padding: var(--s4); border-radius: var(--r-m); background: var(--panel); border: 1px solid var(--line); max-width: 60%; }
.pg__h2 { height: 14px; width: 50%; background: var(--text); opacity: .8; }

@media (max-width: 899px) { .v3__site { inset: var(--s2); } }


/* the path of the object on the stage */
.v3__path { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.v3__path path { fill: none; stroke: rgba(232, 232, 12, .6); stroke-width: 1.5; stroke-dasharray: 4 5; }
.v3__path .k { fill: var(--acid); }
.v3__path .now { fill: none; stroke: var(--text); stroke-width: 2; }

.v3__ftag { top: auto; bottom: var(--s2); }



/* ===== the 3D shell: rails, sheets, the strip, the split line ===== */
.v3 { grid-template-rows: var(--bar) minmax(0, 1fr) auto; grid-template-areas: "bar bar bar bar bar" "rl lib stage set rr" "tl tl tl tl tl"; row-gap: var(--gutter); }
/* the side panes' drag handles stop above the timeline */
.v3 .panes__handle { bottom: calc(var(--tlh, 0px) + var(--gutter) * 2); }

/* rails: an icon and a small word, always visible; the open sheet's button is raised and carries the acid mark */
.rail { display: flex; flex-direction: column; gap: var(--s1); min-height: 0; padding: var(--s1); overflow-y: auto; scrollbar-width: none; }
.rail--l { grid-area: rl; }
.rail--r { grid-area: rr; }
.rail__btn {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; padding: var(--s1) 0;
  border-radius: var(--r-m); color: var(--mute); font-size: var(--fs-rail); line-height: 1.2; white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}
.rail__btn svg { width: 24px; height: 24px; }
.rail__btn:hover { background: var(--panel); color: var(--text); }
.rail__btn:active { background: var(--raise); }
.rail__btn:focus-visible { outline-offset: -2px; }
.rail__btn:disabled:hover { background: none; color: var(--mute); }
.rail__btn[aria-selected="true"] { background: var(--raise); color: var(--text); box-shadow: var(--lift); }
.rail__btn[aria-selected="true"]::before { content: ""; position: absolute; top: 14px; bottom: 14px; width: 2px; border-radius: var(--pill); background: var(--acid); }
.rail--l .rail__btn::before { left: -3px; }    /* in the rail's own padding: clear of the word */
.rail--r .rail__btn::before { right: -3px; }

/* sheets: a head of 48 with the title and a close button, a body that scrolls */
.v3 .sheet { display: flex; flex-direction: column; min-width: 0; min-height: 0; margin-inline: var(--s1); padding: 0; }
.v3 .sheet[hidden] { display: none; }
.sheet__head { flex: none; height: 48px; display: flex; align-items: center; gap: var(--s1); padding: 0 var(--s2) 0 var(--s4); border-bottom: 1px solid var(--line); }
.sheet__h { min-width: 0; margin: 0 auto 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-s); font-weight: 600; line-height: 1.3; color: var(--text); }
.sheet__x { color: var(--mute); }
.sheet__x:hover { background: var(--hover); color: var(--text); }
.sheet__x:active { background: var(--sunk); }
.sheet__body { flex: 1; min-height: 0; overscroll-behavior: contain; padding: var(--s4); }
.v3__libbody { display: flex; flex-direction: column; }
.v3__stage { margin-inline: var(--s1); container-type: inline-size; container-name: stage; }

/* the strip: raised, soft shadow, like the notes on the stage */
.v3__strip { z-index: 4; gap: 2px; padding: var(--s1); border-radius: var(--r-m); background: var(--raise); box-shadow: var(--float); }
.sbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-width: 36px; height: 36px; padding: 0; border-radius: var(--r); color: var(--mute); font-size: var(--fs-s); font-weight: 500; line-height: 1; white-space: nowrap; transition: background var(--ease), color var(--ease); }
.sbtn svg { width: 20px; height: 20px; }
.sbtn--txt { padding: 0 var(--s3) 0 var(--s2); }
.sbtn:hover { background: var(--hover); color: var(--text); }
.sbtn:active { background: var(--sunk); }
.sbtn:disabled:hover { background: none; color: var(--mute); }
.sbtn[aria-pressed="true"] { color: var(--acid); }
.sbtn .i-play, .sbtn[aria-pressed="true"] .i-pause { display: none; }
.sbtn[aria-pressed="true"] .i-play { display: block; }
#proj .i-ortho, #proj[aria-pressed="true"] .i-persp { display: none; }
#proj[aria-pressed="true"] .i-ortho { display: block; }
.sbtn__t--mode { display: inline-grid; }
.sbtn__t--mode > span { grid-area: 1 / 1; text-align: left; }
#proj[aria-pressed="false"] .t-ortho, #proj[aria-pressed="true"] .t-persp { visibility: hidden; }
.strip__sep { flex: none; width: 1px; height: 20px; margin: 0 var(--s1); background: var(--line-2); }
.strip__pct { flex: none; min-width: 52px; text-align: center; font-size: var(--fs-s); font-weight: 500; color: var(--text); }
.sfov { flex: none; display: inline-flex; align-items: center; gap: var(--s2); height: 36px; padding: 0 var(--s2); border-radius: var(--r); color: var(--mute); font-size: var(--fs-s); font-weight: 500; cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; transition: background var(--ease), opacity var(--ease); }
.sfov b { min-width: 4ch; text-align: right; color: var(--text); font-weight: 500; }
.sfov:hover { background: var(--hover); }
.sfov:active { background: var(--sunk); }
.sfov.is-off { opacity: 0.4; }
.strip__br, .strip__more { display: none; }
@container stage (max-width: 700px) {
  #proj .sbtn__t { display: none; }
  #proj { padding: 0; }
}
@container stage (max-width: 560px) {
  .sbtn__t { display: none; }
  .sbtn--txt { padding: 0; }
}
@container stage (max-width: 520px) {
  .strip__sep { margin: 0; }
  .strip__pct { min-width: 48px; }
}

/* compare: a handle on the line the shader draws */
.v3__split { position: absolute; top: 0; bottom: 0; left: calc(var(--x, 0.5) * 100%); z-index: 3; width: 32px; margin-left: -16px; display: grid; place-items: center; cursor: ew-resize; touch-action: none; outline: none; }
.v3__split[hidden] { display: none; }
.v3__splitknob { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--pill); background: var(--raise); color: var(--text); box-shadow: var(--float); transition: background var(--ease); }
.v3__splitknob svg { width: 16px; height: 16px; }
.v3__split:hover .v3__splitknob, .v3__split.is-drag .v3__splitknob { background: var(--hover); }
.v3__split:focus-visible .v3__splitknob { outline: 2px solid var(--acid); outline-offset: 2px; }

@media (pointer: coarse), (max-width: 899px) {
  .sbtn, .sfov { min-width: 44px; height: 44px; }
  .sheet__x { width: 44px; height: 44px; }
}
@media (max-width: 899px) {
  .rail { display: none; }
  .v3 { grid-template-rows: auto minmax(36vh, 1fr) auto auto minmax(0, 30%); grid-template-areas: "bar" "stage" "tl" "tabs" "panel"; row-gap: 0; }
  .v3 .sheet { margin-inline: 0; border-top: 1px solid var(--line); }
  .v3__stage { margin-inline: 0; }
  .sheet__x { display: none; }
  .sheet__head { height: 44px; }
  .v3 #lib > .sheet__head, .v3 .v3__ls > .sheet__head, .v3 .v3__rs > .sheet__head { display: none; }
  .v3__strip { flex-wrap: wrap; justify-content: center; }
  .strip__sep, .strip__x { display: none; }
  .strip__more { display: inline-flex; }
  .v3__strip.is-more .strip__x:not(.strip__sep) { display: inline-flex; order: -1; }
  .v3__strip.is-more .strip__br { display: block; order: 0; flex-basis: 100%; height: 0; }
  .v3__strip.is-more > :not(.strip__x):not(.strip__br) { order: 1; }
  .v3__strip.is-more .strip__more { color: var(--text); background: var(--hover); }
}
