/* Ansatz 4 · Nach Maß – Papier + Tinte auf dem 50-cm-Raster. Archivo für Zahlen und Überschriften, Geist für kleine Texte.
   Bühne mit feinem Raster und Maßlinien am Modell, Werkzeuge als quadratische Leiste oben links.
   Panel in 5 nummerierten Schritten, Würfel-Zähler statt Regler, unten Preis + Warenkorb in Tinte.
   Eckig, Orange nur als Signal (Fokus, aktiver Schritt, kurz geänderte Maßzahl). */
.v4 {
  --paper: #FAF9F6; --stage: #F3F2EE; --ink: #17181A; --ink-2: rgba(23, 24, 26, 0.64); --ink-3: rgba(23, 24, 26, 0.4);
  --line: rgba(23, 24, 26, 0.14); --line-2: rgba(23, 24, 26, 0.065); --on-ink: #F4F2EE; --on-ink-2: rgba(244, 242, 238, 0.66);
  --accent: #EC8306; --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --head: 4rem; --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sq: 2.5rem;
  background: var(--paper); color: var(--ink); font: 400 0.9375rem/1.45 "Geist", "Helvetica Neue", Arial, sans-serif;
}
.v4 a { color: inherit; }
:where(.v4) :where(h1, h2, h3) { margin: 0; }

/* ---- header ---- */
.v4-head { position: relative; z-index: 5; display: flex; align-items: center; gap: 1.5rem; height: var(--head); padding: 0 1rem 0 2.75rem; border-bottom: 1px solid var(--ink); background: var(--paper); }
.v4-head .st-logo svg { width: 1.625rem; height: 1.625rem; }
.v4-head__t { display: flex; align-items: baseline; gap: 0.75rem; margin: 0; padding-left: 1.5rem; border-left: 1px solid var(--line); font: 600 1rem/1 var(--display); }
.v4-head__t span { color: var(--ink-2); font: 400 0.8125rem/1 "Geist", sans-serif; }
.v4-head__nav { margin-left: auto; font-size: 0.875rem; }
.v4-head__nav a { color: var(--ink-2); text-decoration: none; transition: color 200ms ease; }
.v4-head__nav a:hover { color: var(--ink); }
.v4-head__icons { display: flex; }
.v4-ico { position: relative; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; transition: background-color 200ms ease; }
.v4-ico:hover { background: var(--stage); }
.v4-ico svg { width: 1.25rem; height: 1.25rem; }
.v4-ico i { position: absolute; top: 0.375rem; right: 0.25rem; min-width: 1rem; height: 1rem; padding: 0 0.25rem; background: var(--ink); color: var(--on-ink); font: 600 0.625rem/1rem "Geist", sans-serif; font-style: normal; text-align: center; }
.v4-ico.is-pop i { animation: v4-flash-bg 900ms ease; }

/* ---- layout: stage | panel, one screen ---- */
.v4-main { display: grid; grid-template-columns: minmax(0, 1fr) 28rem; height: calc(100vh - var(--head)); height: calc(100dvh - var(--head)); }

/* ---- stage: paper with the 50 cm grid ---- */
.v4-stage { position: relative; overflow: hidden; background-color: var(--stage);
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem; background-position: -1px -1px; }
.v4-gl { position: absolute; inset: 0; --q-night-950: #F3F2EE; }
.v4-gl canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.v4-stage.is-pick .v4-gl canvas { cursor: pointer; }
.v4-measure { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.v4-m__l { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.v4-m__ext { fill: none; stroke: var(--ink); stroke-width: 1; stroke-opacity: 0.35; stroke-dasharray: 2 3; }
.v4-m text { fill: var(--ink); font: 600 0.8125rem/1 var(--display); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--stage); stroke-width: 0.375rem; stroke-linejoin: round; }
.v4-m.is-hot text { fill: var(--accent); }
.v4-m.is-hot .v4-m__l { stroke: var(--accent); }

.v4-tools { position: absolute; top: 1rem; left: 1rem; z-index: 3; display: flex; background: var(--paper); box-shadow: 0 0 0 1px var(--ink); }
.v4-tool { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; color: var(--ink); transition: background-color 200ms ease, color 200ms ease; }
.v4-tool + .v4-tool { box-shadow: -1px 0 0 var(--line); }
.v4-tool:nth-child(4) { box-shadow: -1px 0 0 var(--ink); }   /* zoom group | display group */
.v4-tool:hover { background: var(--stage); }
.v4-tool svg { width: 1.25rem; height: 1.25rem; }
.v4-tool[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.v4-tool:focus-visible { outline-offset: -2px; position: relative; z-index: 1; }

.v4-cap { position: absolute; left: 1.25rem; bottom: 1.25rem; z-index: 2; display: grid; gap: 0.25rem; pointer-events: none; }
.v4-cap__name { font: 600 1.75rem/1.1 var(--display); letter-spacing: -0.01em; }
.v4-cap__meta { margin: 0; color: var(--ink-2); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

.v4-pick { position: absolute; left: 50%; width: max-content; bottom: 1.25rem; z-index: 3; display: flex; align-items: center; gap: 1rem; max-width: calc(100% - 2rem); padding: 0.5rem 0.5rem 0.5rem 1rem; background: var(--ink); color: var(--on-ink); font-size: 0.875rem; transform: translateX(-50%); }
.v4-pick.is-hint { animation: v4-ring 1.4s ease 2; }
.v4-pick__end { min-height: 2.25rem; padding: 0 0.875rem; box-shadow: inset 0 0 0 1px var(--on-ink-2); white-space: nowrap; transition: background-color 200ms ease, color 200ms ease; }
.v4-pick__end:hover { background: var(--on-ink); color: var(--ink); }
.v4-stage.is-pick .v4-cap { opacity: 0; }

/* ---- panel ---- */
.v4-panel { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; border-left: 1px solid var(--ink); background: var(--paper); }
.v4-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.v4-steps a { position: relative; display: grid; gap: 0.125rem; padding: 0.75rem 0.25rem 0.75rem 0.875rem; color: var(--ink-2); font-size: 0.75rem; text-decoration: none; transition: color 200ms ease, background-color 200ms ease; }
.v4-steps a + a { box-shadow: -1px 0 0 var(--line); }
.v4-steps a b { color: var(--ink); font: 600 0.9375rem/1 var(--display); font-variant-numeric: tabular-nums; }
.v4-steps a:hover { background: var(--stage); color: var(--ink); }
.v4-steps a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; transition: background-color 200ms ease; }
.v4-steps a[aria-current="step"] { color: var(--ink); }
.v4-steps a[aria-current="step"]::after { background: var(--accent); }

.v4-views { position: relative; display: grid; min-height: 0; overflow: hidden; }
.v4-view { grid-area: 1 / 1; min-width: 0; min-height: 0; overflow: auto; padding: 0 1.75rem 2rem; background: var(--paper); transition: transform 460ms var(--ease), opacity 300ms ease; scrollbar-width: thin; overscroll-behavior: contain; }
.v4-view--sub { padding-top: 1.25rem; transform: translateX(100%); opacity: 0; }
.v4-views.is-sub #v-main { transform: translateX(-12%); opacity: 0; }
.v4-views.is-sub .v4-view--sub { transform: none; opacity: 1; }

.v4-sec { padding: 1.5rem 0 1.75rem; border-bottom: 1px solid var(--line); }
.v4-sec:last-child { border-bottom: 0; }
.v4-sec__h { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1rem; }
.v4-num { color: var(--ink-3); font: 600 0.875rem/1 var(--display); font-variant-numeric: tabular-nums; }
.v4-num--sub { margin: 0 0 0.375rem; color: var(--ink-2); font-size: 0.8125rem; }
.v4-sec__h h2 { font: 600 1.375rem/1.15 var(--display); letter-spacing: -0.01em; }
.v4-lead { margin: -0.25rem 0 1.25rem; color: var(--ink-2); font-size: 0.875rem; }
.v4-hint { margin: 0.5rem 0 0; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.4; }
.v4-hint:empty { display: none; }
.v4-sub { margin: 1.5rem 0 0.75rem; font: 600 1rem/1.2 "Geist", sans-serif; }

/* form choice: top-view icons on the grid, one square segmented row */
.v4-forms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 1.5rem; box-shadow: 0 0 0 1px var(--ink); }
.v4-forms button { display: grid; justify-items: center; gap: 0.375rem; padding: 0.75rem 0.25rem 0.625rem; color: var(--ink); font-size: 0.75rem; transition: background-color 200ms ease, color 200ms ease; }
.v4-forms button + button { box-shadow: -1px 0 0 var(--line); }
.v4-forms button:hover { background: var(--stage); }
.v4-forms button[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
.v4-forms svg { width: 2.8125rem; height: 2.125rem; }
.v4-forms button:focus-visible { outline-offset: -3px; }

/* Würfel-Zähler */
.v4-count { padding: 0.875rem 0; border-top: 1px solid var(--line); }
.v4-count__l { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 0.625rem; }
.v4-count__l span { font-size: 0.875rem; font-weight: 500; }
.v4-count__l output { font: 600 1rem/1 var(--display); font-variant-numeric: tabular-nums; }
.v4-count__row { display: flex; align-items: center; gap: 0.5rem; }
.v4-cubes { display: flex; gap: 0.25rem; flex: 1; }
.v4-cubes button { flex: 0 0 var(--sq); width: var(--sq); height: var(--sq); box-shadow: inset 0 0 0 1px var(--line); background: transparent; transition: background-color 180ms ease, box-shadow 180ms ease; }
.v4-cubes button.is-pre { background: rgba(23, 24, 26, 0.14); }
.v4-cubes button.is-on { background: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.v4-cubes button:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ink); }
.v4-cubes button:disabled { cursor: default; background: repeating-linear-gradient(135deg, transparent 0 0.25rem, var(--line-2) 0.25rem 0.375rem); }
.v4-cubes button.is-on:disabled { background: rgba(23, 24, 26, 0.3); box-shadow: none; }
.v4-sq { display: grid; place-items: center; flex: 0 0 auto; width: 2.75rem; height: 2.75rem; box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); transition: background-color 200ms ease, color 200ms ease, opacity 200ms ease; }
.v4-sq svg { width: 1.125rem; height: 1.125rem; }
.v4-sq:hover:not(:disabled) { background: var(--ink); color: var(--on-ink); }
.v4-sq:disabled { opacity: 0.3; cursor: default; }
.v4-count__row .v4-sq { width: var(--sq); height: var(--sq); }
.v4-count.is-off .v4-count__l { color: var(--ink-3); }

.v4-dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0.5rem 0 0; box-shadow: 0 0 0 1px var(--line); }
.v4-dims div { padding: 0.75rem 0.875rem; }
.v4-dims div + div { box-shadow: -1px 0 0 var(--line); }
.v4-dims dt { color: var(--ink-2); font-size: 0.75rem; }
.v4-dims dd { margin: 0.25rem 0 0; font: 600 1.25rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.v4-link { margin-top: 1rem; color: var(--ink-2); font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line); transition: color 200ms ease, text-decoration-color 200ms ease; }
.v4-link:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* square segmented controls */
.v4-field { margin-bottom: 1.25rem; }
.v4-field__l { margin: 0 0 0.625rem; font-size: 0.875rem; font-weight: 500; }
.v4-field__l span { color: var(--ink-2); font-weight: 400; }
.v4-seg { display: grid; box-shadow: 0 0 0 1px var(--ink); }
.v4-seg--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.v4-seg--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v4-seg button { min-height: 2.75rem; padding: 0 0.25rem; font: 600 0.9375rem/1 var(--display); font-variant-numeric: tabular-nums; transition: background-color 200ms ease, color 200ms ease; }
.v4-seg--2 button { font: 500 0.875rem/1 "Geist", sans-serif; }
.v4-seg button + button { box-shadow: -1px 0 0 var(--line); }
.v4-seg button:hover { background: var(--stage); }
.v4-seg button[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
.v4-seg button:focus-visible { outline-offset: -3px; }

/* buttons */
.v4-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3rem; padding: 0 1.25rem; background: var(--ink); color: var(--on-ink); font-size: 0.9375rem; font-weight: 500; transition: background-color 200ms ease, box-shadow 200ms ease, color 200ms ease; }
.v4-btn:hover { background: #33363A; }
.v4-btn svg { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; }
.v4-btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.v4-btn--line:hover { background: var(--ink); color: var(--on-ink); }
.v4-btn--line[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.v4-btn--wide { white-space: normal; text-align: left; width: 100%; justify-content: space-between; margin-top: 0.25rem; }
.v4-btn--wide svg:first-child { order: 0; }
#t-edit { justify-content: flex-start; }

/* colour */
.v4-fin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.v4-fin button { display: grid; gap: 0.5rem; padding: 0.5rem 0.5rem 0.625rem; box-shadow: inset 0 0 0 1px var(--line); text-align: left; font-size: 0.8125rem; transition: box-shadow 200ms ease; }
.v4-fin i { display: block; height: 3rem; background: var(--c); }
.v4-fin button:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.v4-fin button[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 500; }

/* accessories (shared Übersicht markup, page tokens) */
.v4-so .so { --so-ink: #17181A; --so-ink-2: rgba(23, 24, 26, 0.64); --so-line: rgba(23, 24, 26, 0.14); --so-bg: #F3F2EE; --so-accent: #EC8306; --so-display: "Archivo", sans-serif; gap: 1.75rem; }
.v4-so .so-h { font: 600 1rem/1.2 "Geist", sans-serif; }
.v4-so .so-sug__b { border-color: var(--so-line); }
.v4-so .so-sug__b i, .v4-acc i { border-color: var(--so-ink); }
.v4-so .so-facts dd { font-family: var(--display); font-weight: 600; }
.v4-so .so-facts .so-total { font-size: 1.375rem; }
.v4-so .so-acts button { border-color: var(--so-ink); }
.v4-acc { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.v4-acc button { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 2rem; align-items: center; gap: 0.875rem; width: 100%; padding: 0.5rem; text-align: left; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 200ms ease, background-color 200ms ease, opacity 200ms ease; }
.v4-acc button:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ink); }
.v4-acc button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--ink); background: var(--stage); }
.v4-acc button:disabled { opacity: 0.45; cursor: default; }
.v4-acc img { width: 3.5rem; height: 3.5rem; object-fit: cover; }
.v4-acc span { display: grid; gap: 0.125rem; min-width: 0; }
.v4-acc b { font-size: 0.9375rem; font-weight: 500; }
.v4-acc small { color: var(--ink-2); font-size: 0.8125rem; }
.v4-acc i { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid; transition: background-color 200ms ease, color 200ms ease; }
.v4-acc i svg { width: 1rem; height: 1rem; }
.v4-acc button[aria-pressed="true"] i { background: var(--ink); color: var(--on-ink); }
.v4-anchor:empty { display: none; }
.v4-anchor { margin-top: 1.25rem; }
.v4-anchor__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.125rem 0.75rem; align-items: center; margin: 0; padding: 0.875rem 1rem; box-shadow: inset 0 0 0 1px var(--line); font-size: 0.875rem; }
.v4-anchor__row b { font-weight: 500; }
.v4-anchor__row span { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.8125rem; }
.v4-check { grid-template-columns: 1.25rem minmax(0, 1fr); cursor: pointer; }
.v4-check span { grid-column: 2; }
.v4-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v4-check i { width: 1.25rem; height: 1.25rem; box-shadow: inset 0 0 0 1px var(--ink); transition: background-color 200ms ease; }
.v4-check input:checked + i { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3.5 3.5L15 7' fill='none' stroke='%23F4F2EE' stroke-width='1.8'/%3E%3C/svg%3E") center / 100% no-repeat; }
.v4-check input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

#ov-facts { margin-bottom: 1rem; }

/* module edit view */
.v4-back { display: inline-flex; align-items: center; gap: 0.25rem; margin: 0 0 1rem -0.375rem; padding: 0.25rem 0.375rem; color: var(--ink-2); font-size: 0.875rem; transition: color 200ms ease; }
.v4-back:hover { color: var(--ink); }
.v4-back svg { width: 1.125rem; height: 1.125rem; }
.v4-mod__t { margin-bottom: 0.75rem !important; font: 600 1.75rem/1.1 var(--display); letter-spacing: -0.01em; }
.v4-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.v4-types button { display: grid; gap: 0.375rem; padding: 0.375rem 0.375rem 0.5rem; box-shadow: inset 0 0 0 1px var(--line); font-size: 0.75rem; text-align: left; line-height: 1.25; transition: box-shadow 200ms ease, opacity 200ms ease; animation: v4-fade 360ms ease both; animation-delay: calc(var(--i) * 40ms); }
.v4-types button:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ink); }
.v4-types button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 500; }
.v4-types button:disabled { opacity: 0.35; cursor: default; }
.v4-types img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--stage); }
.v4-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 1.25rem 0 0.75rem; }

/* buy bar: ink */
.v4-buy { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.5rem; padding: 1rem 1.25rem 1rem 1.75rem; background: var(--ink); color: var(--on-ink); }
.v4-buy__p { display: grid; gap: 0.125rem; min-width: 0; }
.v4-price { white-space: nowrap; font: 600 1.75rem/1.05 var(--display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.v4-price.is-flash { animation: v4-flash 900ms ease; }
.v4-buy__p small { color: var(--on-ink-2); font-size: 0.75rem; }
.v4-buy .v4-sq { width: 3rem; height: 3rem; box-shadow: inset 0 0 0 1px var(--on-ink-2); color: var(--on-ink); }
.v4-buy .v4-sq:hover { background: var(--on-ink); color: var(--ink); }
.v4-sq--save[aria-pressed="true"] { color: var(--accent) !important; --fill: currentColor; }
.v4-btn--cart { min-height: 3rem; background: var(--on-ink); color: var(--ink); }
.v4-btn--cart:hover { background: #FFFFFF; }

/* dialogs: dim through the dialog itself */
.v4-dlg { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(23, 24, 26, 0); color: var(--ink); transition: background-color 260ms ease; }
.v4-dlg::backdrop { background: transparent; }
.v4-dlg.is-on { background: rgba(23, 24, 26, 0.42); }
.v4-sheet__in { position: absolute; top: 0; right: 0; bottom: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(62rem, 100%); background: var(--paper); box-shadow: -1px 0 0 var(--ink); transform: translateX(2.5rem); opacity: 0; transition: transform 420ms var(--ease), opacity 260ms ease; }
.v4-sheet.is-on .v4-sheet__in { transform: none; opacity: 1; }
.v4-sheet__head { display: flex; align-items: baseline; gap: 0.75rem; padding: 1.25rem 1.25rem 1.25rem 2rem; border-bottom: 1px solid var(--line); }
.v4-sheet__head h2 { font: 600 1.5rem/1.1 var(--display); }
.v4-sheet__head .v4-sq { margin-left: auto; align-self: center; }
.v4-sheet__body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2.5rem; align-items: start; overflow: auto; padding: 2rem; overscroll-behavior: contain; }
.v4-sheet__pic { position: sticky; top: 0; }
.v4-sheet__pic .so-pic { box-shadow: 0 0 0 1px var(--line); }
.v4-sheet__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem 1rem 2rem; background: var(--ink); color: var(--on-ink); }

.v4-cartd__in { position: absolute; top: 50%; left: 50%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); width: min(56rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; background: var(--paper); box-shadow: 0 0 0 1px var(--ink); transform: translate(-50%, -48%); opacity: 0; transition: transform 420ms var(--ease), opacity 260ms ease; }
.v4-cartd.is-on .v4-cartd__in { transform: translate(-50%, -50%); opacity: 1; }
.v4-cartd__img { width: 100%; height: 100%; object-fit: cover; background: var(--stage); }
.v4-cartd__txt { display: grid; align-content: center; gap: 0.25rem; padding: 2.5rem 2rem 2rem; }
.v4-cartd__txt h2 { font: 600 1.75rem/1.1 var(--display); letter-spacing: -0.01em; }
.v4-cartd__meta { margin: 0.25rem 0 0; color: var(--ink-2); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.v4-cartd__price { margin: 0.75rem 0 0; font: 600 2rem/1 var(--display); font-variant-numeric: tabular-nums; }
.v4-cartd__x { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 1; background: var(--paper); }

@keyframes v4-flash { 0% { color: var(--accent); } 100% { color: inherit; } }
@keyframes v4-flash-bg { 0% { background: var(--accent); } 100% { background: var(--ink); } }
@keyframes v4-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes v4-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(236, 131, 6, 0.6); } 50% { box-shadow: 0 0 0 0.375rem rgba(236, 131, 6, 0); } }

/* ---- tablet + phone ---- */
@media (max-width: 63.99rem) {
  .v4 { --head: 3.5rem; }
  .v4-head { gap: 1rem; padding: 0 0.5rem 0 2.25rem; }
  .v4-head__t { padding-left: 1rem; }
  .v4-head__t span { display: none; }
  .v4-main { display: block; height: auto; }
  .v4-stage { position: sticky; top: 0; z-index: 3; height: 50vh; height: 50svh; border-bottom: 1px solid var(--ink); }
  .v4-tools { top: 0.75rem; left: 0.75rem; }
  .v4-cap { left: 2.25rem; bottom: 0.75rem; }
  .v4-cap__name { font-size: 1.25rem; }
  .v4-cap__meta { font-size: 0.8125rem; }
  .v4-pick { left: 2.25rem; right: 0.75rem; bottom: 0.75rem; width: auto; max-width: none; justify-content: space-between; transform: none; font-size: 0.8125rem; }
  #panel { scroll-margin-top: 50svh; }
  .v4-two .v4-btn { padding: 0 0.75rem; font-size: 0.875rem; }
  .v4-panel { display: block; border-left: 0; }
  .v4-steps { display: none; }
  .v4-views { overflow: hidden; }   /* the edit view waits off-screen to the right */
  .v4-view { overflow: visible; padding: 0 1rem 2rem 2.25rem; }
  .v4-view--sub { position: absolute; inset: 0 0 auto; padding-top: 1.25rem; }
  .v4-views.is-sub #v-main { visibility: hidden; }
  .v4-views.is-sub { min-height: 40rem; }
  .v4-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom)) 2.25rem; }
  .v4-panel { padding-bottom: 5rem; }
  .v4-price { font-size: 1.375rem; }
  .v4-buy .v4-sq { width: 2.75rem; height: 2.75rem; }
  .v4-btn--cart { min-height: 2.75rem; padding: 0 1rem; }
  .v4-sheet__body { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 1.25rem 1rem 1.5rem 2.25rem; }
  .v4-sheet__pic { position: static; }
  .v4-sheet__head { padding: 1rem 0.75rem 1rem 2.25rem; }
  .v4-sheet__foot { padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom)) 2.25rem; }
  .v4-cartd__in { grid-template-columns: minmax(0, 1fr); width: min(30rem, calc(100% - 1.5rem)); }
  .v4-cartd__img { height: auto; aspect-ratio: 16 / 10; }
  .v4-cartd__txt { padding: 1.25rem 1.25rem 1.25rem; }
}
@media (max-width: 30rem) {
  .v4 { --sq: 2.25rem; }
  .v4-head__nav { display: none; }
  .v4-head__icons { margin-left: auto; }
  .v4-head__t { border-left: 0; padding-left: 0; }
  .v4-btn--cart svg { display: none; }
  .v4-cartd__txt h2 { font-size: 1.375rem; }
  .v4-cartd__price { font-size: 1.5rem; }
  .v4-dims dd { font-size: 1.0625rem; }
}
@media (max-width: 23rem) {
  .v4 { --sq: 1.75rem; }
  .v4-forms button { font-size: 0.6875rem; }
  .v4-forms svg { width: 2.25rem; height: 1.75rem; }
  .v4-head__t { display: none; }
  .v4-buy__p small { display: none; }
  .v4-two { grid-template-columns: minmax(0, 1fr); }
  .v4-price { font-size: 1.1875rem; }
  .v4-btn--cart { padding: 0 0.75rem; font-size: 0.875rem; }
  .v4-buy { gap: 0.375rem; padding-left: 2rem; }
}
