/* Solkez — screen layouts (v7 «Альбом»). Components live in ui.css, values in tokens.css. */

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
#home { overflow-x: clip; }
.sec-head { display: grid; gap: var(--s2); margin-bottom: var(--s5); max-width: 40ch; }
.sec-head .t-lead { margin-top: var(--s1); }
.sec-head .t-small { font-size: var(--fs-body); color: var(--ink-2); }

/* ---------- nav: the top edge of the album page ---------- */
.nav { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--page-2) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--page-sep); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 64px; }
.nav-r { display: flex; align-items: center; gap: 6px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--on-page); text-decoration: none; white-space: nowrap; line-height: 0; }
.es a.brand { text-decoration: none; }
/* logo (2026-12-06): one-colour «solkez» wordmark, Inter Tight ExtraBold outlines, the «o» is a rewind arrow (#es-word sprite).
   #es-mark = the bare «o» with a --tape-1 arrowhead: stands in for the wordmark when the bar is tight. Class names kept from the old logo. */
.brand-bird { display: none; width: 31px; height: 32px; flex: none; }
.brand-word { width: 112px; height: 28px; flex: none; }
.langs { display: grid; grid-auto-flow: column; gap: 4px; }
.langs button { min-width: 46px; min-height: var(--tap); padding: 0 6px; border-radius: var(--r-label) var(--r-label) 3px 3px; background: var(--fill); color: var(--ink-2);
  font: 800 14px/1 var(--sans); letter-spacing: .02em; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.langs button.on { background: var(--paper); color: var(--on-paper); }
#bMine { min-height: 44px; padding: 0 12px; font-size: 15px; }
@media (max-width: 420px) {
  .nav .langs button { min-width: 42px; padding: 0 3px; font-size: 13px; }
  .nav:has(#bMine:not([hidden])) .brand-word { display: none; }
  .nav:has(#bMine:not([hidden])) .brand-bird { display: block; }
}

/* ---------- hero: prints dropped on the page, then the words and the one action ---------- */
.hero { display: grid; gap: var(--s4); padding-top: var(--s4); padding-bottom: var(--s6); }
.hero-copy { display: grid; gap: var(--s4); }
.hero h1 { color: var(--on-page); max-width: 16ch; }
.hero h1 u { text-decoration: none; background: linear-gradient(transparent 82%, color-mix(in srgb, var(--tape-1) 88%, transparent) 82% 96%, transparent 0); padding: 0 2px; }
.hero-lead { max-width: 34ch; color: var(--ink-2); }
.hero-acts { display: grid; gap: var(--s3); margin-top: var(--s2); }
#bHeroGo { min-height: var(--tap-main); font-size: 21px; }
#bHeroSample { min-height: 54px; font-size: 18px; }
.hero-price { color: var(--ink-2); font-size: var(--fs-small); }
.hero-stack { order: -1; position: relative; width: 100%; max-width: 380px; height: 318px; margin: 0 auto; }
.hero-stack .print-back, .hero-print { position: absolute; display: block; padding: 7px; border-radius: var(--r-print); background: var(--print); box-shadow: var(--sh-print); transform: rotate(var(--r, 0deg)); }
.hero-stack .scr { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; background: var(--media); }
.hero-stack .scr img, .hero-stack .scr video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.print-back { width: 38%; top: 30px; }
.print-back.b1 { left: 1%; --r: -7deg; animation-delay: .15s; }
.print-back.b2 { right: 1%; top: 18px; --r: 6deg; animation-delay: .4s; }
.hero-print { left: 50%; top: 0; width: 45%; margin-left: -22.5%; z-index: 2; --r: -1.5deg; cursor: pointer; animation-delay: .7s; }
.hero-print video { opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.hero-print video.on { opacity: 1; }
.hero-stack .tape { top: -10px; }
.hero-stack .tape.h1 { left: 50%; margin-left: -42px; --tr: -4deg; z-index: 4; animation-delay: 1.3s; }
.hero-stack .tape.h2 { left: 6%; top: 22px; width: 62px; --tr: -20deg; --c: var(--tape-2); animation-delay: 1.5s; }
.hero-stack .tape.h3 { right: 5%; top: 8px; width: 62px; --tr: 16deg; --c: var(--tape-3); animation-delay: 1.7s; }
/* the cream label stuck on the main print: «▶ Мысалды көру» */
.hero-cap { position: absolute; left: 50%; bottom: -16px; z-index: 3; transform: translateX(-50%) rotate(-3deg); display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; white-space: nowrap; background: var(--paper); color: #2343A3; box-shadow: 0 6px 12px rgb(0 0 0 / .28); font: 700 24px/1 var(--hand); }
:root[data-theme="dark"] .hero-cap { color: var(--pen); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-cap { color: var(--pen); } }
.hero-cap i { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--btn); color: var(--btn-ink); }
.hero-cap .ic { width: 14px; height: 14px; margin-left: 2px; }
@media (hover: hover) { .hero-print:hover { box-shadow: var(--sh-lift); } }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) 520px; align-items: center; gap: var(--s7); padding-top: var(--s7); padding-bottom: var(--s7); }
  .hero-copy { gap: var(--s5); }
  .hero-stack { order: 0; max-width: 520px; height: 520px; }
  .hero-acts { grid-template-columns: auto auto; justify-content: start; }
  #bHeroGo, #bHeroSample { padding: 0 var(--s6); }
  .hero-price { grid-column: 1 / -1; }
  .hero-cap { font-size: 28px; }
}

/* ---------- gallery: the templates as prints ---------- */
.pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); align-items: start; padding-top: var(--s7); scroll-margin-top: 64px; }
@media (min-width: 1000px) { .pick { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s7); padding-top: var(--s8); } }
.cat-chips { margin-bottom: var(--s6); }
@media (max-width: 999px) { .cat-chips { max-width: calc(100% + var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); } }
@media (min-width: 1000px) { .cat-chips { flex-wrap: wrap; } }
.tgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s4); }
@media (min-width: 720px) { .tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s7) var(--s5); } }
@media (min-width: 1200px) { .tgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tgrid .tcard:nth-child(4n+1) { --r: -1.6deg; --c: var(--tape-1); }
.tgrid .tcard:nth-child(4n+2) { --r: 1.8deg; --c: var(--tape-2); }
.tgrid .tcard:nth-child(4n+3) { --r: 1.2deg; --c: var(--tape-3); }
.tgrid .tcard:nth-child(4n+4) { --r: -1.4deg; --c: var(--tape-4); }
/* a strip of tape on top of each print */
.tcard::before { content: ""; position: absolute; z-index: 2; left: 50%; top: -11px; width: 74px; height: 22px; margin-left: -37px; background: var(--c, var(--tape-1));
  opacity: var(--tape-a); transform: rotate(calc(var(--r, 0deg) * -2)); background-image: linear-gradient(rgb(255 255 255 / .28), transparent 40%, rgb(0 0 0 / .06)); }
@media (hover: hover) { .tgrid .tcard:hover { transform: rotate(0deg) translateY(-3px); box-shadow: var(--sh-lift); } }
.tcard.on { box-shadow: 0 0 0 4px var(--tape-1), var(--sh-lift); }
.tcard-play { position: absolute; left: 8px; bottom: 8px; z-index: 1; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(251 248 241 / .94); color: #1D2A22; box-shadow: 0 2px 6px rgb(0 0 0 / .35); }
.tcard-play .ic { width: 15px; height: 15px; margin-left: 2px; }
.tcard-mem { position: absolute; right: 8px; top: 8px; z-index: 1; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(20 22 26 / .7); color: #F4EBD0; }
.tcard-mem .ic { width: 18px; height: 18px; }
.tcard-meta { display: grid; gap: 0; padding: 8px 2px 9px; text-align: center; }
.tcard-meta .tcard-name { min-width: 0; text-wrap: balance; }
.tcard-price { flex: none; font: 700 15px/1.3 var(--sans); color: #4E5A53; font-variant-numeric: tabular-nums; }

.pick-side { display: none; }
@media (min-width: 1000px) {
  .pick-side { display: grid; gap: var(--s4); position: sticky; top: 88px; padding: var(--s5); border-radius: var(--r-label); box-shadow: var(--sh-paper); transform: rotate(.4deg); }
  .side-phone { position: relative; display: block; border: 0; font: inherit; cursor: pointer; height: clamp(260px, calc(100dvh - 560px), 480px); aspect-ratio: 9 / 16; margin: 6px auto 0; padding: 7px; background: var(--print); box-shadow: var(--sh-print); transform: rotate(-1.5deg); transition: transform .2s; }
  .side-phone:hover { transform: rotate(-1.5deg) scale(1.015); }
  .side-phone:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
  .side-play { position: absolute; left: 16px; bottom: 16px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
    background: rgb(251 248 241 / .94); color: #1D2A22; box-shadow: 0 3px 10px rgb(0 0 0 / .35); }
  .side-play .ic { width: 17px; height: 17px; margin-left: 2px; }
  #bSideWatch { min-height: var(--tap); gap: var(--s2); }
  #bSideWatch .ic { width: 20px; height: 20px; }
  .side-phone .scr { display: block; width: 100%; height: 100%; background: var(--media); overflow: hidden; }
  .side-phone video { width: 100%; height: 100%; object-fit: cover; }
  .side-info { display: grid; gap: var(--s1); }
  .side-info .t-h2 { font: 700 34px/1 var(--hand); color: var(--pen); }
  .side-price { margin-top: var(--s2); font: 700 var(--fs-small)/1.4 var(--sans); color: var(--ink-2); }
  #bSideGo { min-height: var(--tap-main); }
}

/* ---------- how it works: three cream labels ---------- */
.how { padding-top: var(--s8); }
.how .sec-head .t-lead { color: var(--ink-2); }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.how-steps li { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s5); border-radius: var(--r-label); box-shadow: var(--sh-paper); }
.how-steps li:nth-child(1) { transform: rotate(-.6deg); } .how-steps li:nth-child(2) { transform: rotate(.5deg); } .how-steps li:nth-child(3) { transform: rotate(-.3deg); }
.how-steps .t-small { margin-top: 4px; color: var(--ink-2); font-size: var(--fs-body); max-width: 40ch; }
@media (min-width: 900px) {
  .how { padding-top: var(--s9); }
  .how-steps { grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
  .how-steps li { flex-direction: column; gap: var(--s4); padding: var(--s6); }
}

/* ---------- prices + trust ---------- */
.prices { padding-top: var(--s8); }
.prices-in { display: grid; gap: var(--s6); }
@media (min-width: 900px) { .prices { padding-top: var(--s9); } .prices-in { grid-template-columns: 1.3fr 1fr; gap: var(--s7); align-items: start; } }
.price-list { list-style: none; margin: 0; padding: var(--s2) 0; border-radius: var(--r-label); box-shadow: var(--sh-paper); }
.price-list li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 80px; padding: var(--s4) var(--s5); }
.price-list li + li::before { content: ""; position: absolute; top: 0; left: var(--s5); right: var(--s5); height: 1.5px; background: var(--line); }
.price-list li div { display: grid; gap: 2px; min-width: 0; }
.price-list li div b { font: 800 var(--fs-body)/1.3 var(--sans); }
.price-list li div span { font: 400 var(--fs-small)/1.45 var(--sans); color: var(--ink-3); }
.pl-v { flex: none; font: 700 32px/1 var(--hand); color: var(--pen); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-v b { font-weight: 700; }
.trust { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); }
.trust li { display: flex; gap: var(--s4); align-items: flex-start; }
.trust .ic { width: 30px; height: 30px; color: var(--tape-1); margin-top: 0; }
.trust b { display: block; font: 800 var(--fs-body)/1.3 var(--sans); color: var(--on-page); }
.trust span { font: 400 var(--fs-small)/1.45 var(--sans); color: var(--ink-2); }

/* ---------- faq: a cream card of questions ---------- */
.faq { padding-top: var(--s8); padding-bottom: var(--s8); }
@media (min-width: 900px) { .faq { padding-top: var(--s9); padding-bottom: var(--s9); } }
.faq-list { max-width: 760px; border-radius: var(--r-label); box-shadow: var(--sh-paper); overflow: hidden; }
.faq details { position: relative; }
.faq details + details::before { content: ""; position: absolute; top: 0; left: var(--s5); right: var(--s5); height: 1.5px; background: var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 68px; padding: var(--s3) var(--s5);
  font: 800 var(--fs-body)/1.35 var(--sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 24px; height: 24px; color: var(--pen); transition: transform var(--t) var(--ease); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details p { padding: 0 var(--s5) var(--s5); color: var(--ink-2); max-width: 62ch; }

/* ---------- footer: the darker back cover ---------- */
.foot { padding: var(--s6) 0 calc(var(--s7) + env(safe-area-inset-bottom)); background: var(--page-2); box-shadow: inset 0 1px 0 var(--page-sep); }
.foot-in { display: grid; gap: var(--s4); justify-items: start; }
.foot .brand .brand-word { width: 96px; height: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 var(--s4); margin-left: calc(-1 * var(--s1)); }
.foot-links .btn-text { color: var(--on-page); }
.foot-c { color: var(--ink-3); font-weight: 400; }

/* =================== editor =================== */
.sq { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: var(--tap); min-height: var(--tap); padding: 0 14px; border-radius: var(--r-btn); flex: none;
  color: var(--ink); background: var(--fill); font: 700 var(--fs-small)/1 var(--sans); }
.sq .ic { width: 18px; height: 18px; }
@media (hover: hover) { .sq:hover { background: var(--fill-2); } }

.ed-top { position: sticky; top: 0; z-index: 25; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--s2);
  padding: env(safe-area-inset-top) var(--s3) 0; background: color-mix(in srgb, var(--page-2) 95%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--page-sep); }
.ed-back { grid-row: 1; justify-self: start; display: inline-flex; align-items: center; gap: 2px; min-height: var(--tap); margin: 6px 0; padding: 0 12px 0 6px; border-radius: var(--r-btn);
  background: var(--fill); color: var(--on-page); font: 700 var(--fs-small)/1 var(--sans); }
.ed-back .ic { width: 24px; height: 24px; stroke-width: 2.4; }
@media (hover: hover) { .ed-back:hover { background: var(--fill-2); } }
.ed-title { grid-row: 1; display: grid; justify-items: center; text-align: center; min-width: 0; padding: 6px 0; }
.ed-name { font: 400 22px/1.15 var(--head); color: var(--on-page); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ed-sub { font: 600 var(--fs-micro)/1.3 var(--sans); color: var(--on-page-3); font-variant-numeric: tabular-nums; }

/* where you are: «2/3» and three labelled strips of tape */
.stepper { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: auto minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.4fr); align-items: start; column-gap: 8px;
  list-style: none; margin: 0; padding: 2px var(--s1) 10px; }
.stepper::before { content: attr(data-pos); grid-row: 1; align-self: center; padding-right: 4px; font: 700 26px/1 var(--hand); color: var(--tape-1); }
.stepper li { display: grid; gap: 5px; min-width: 0; font: 600 14px/1.2 var(--sans); color: var(--on-page-3); }
.stepper li::before { content: ""; display: block; height: 6px; border-radius: 1px; background: var(--page-fill-2); }
.stepper li.done::before, .stepper li.cur::before { background: var(--tape-1); opacity: .9; }
.stepper li.cur { color: var(--on-page); font-weight: 800; }
.stepper i { display: none; }
.stepper span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ed-body { position: relative; }
.ed-center { max-width: 520px; margin: 0 auto; padding: var(--s4) var(--gutter) calc(var(--dock-h, 170px) + var(--s4)); display: grid; gap: var(--s3); justify-items: center; }
.ed-center > * { width: 100%; }
.ed-empty { min-height: calc(100dvh - 120px - var(--dock-h, 170px) - 2 * var(--s4)); align-content: center; margin-top: var(--s3); }
#sPreview { position: relative; display: grid; gap: var(--s3); justify-items: center; }
/* the preview is the big print on the page, taped at the top */
#sPreview::before { content: ""; position: absolute; z-index: 3; left: 50%; top: -14px; width: 96px; height: 26px; margin-left: -48px; background: var(--tape-1); opacity: var(--tape-a);
  transform: rotate(-3deg); background-image: linear-gradient(rgb(255 255 255 / .28), transparent 40%, rgb(0 0 0 / .06)); }
.is-night #sPreview::before { background-color: var(--tape-1); }

/* bottom dock (phones): what to do next, the one big action, then the tool tabs */
.ed-dock { position: fixed; z-index: 31; left: 0; right: 0; bottom: 0; display: grid; gap: var(--s2);
  padding: var(--s3) var(--s3) calc(var(--s1) + env(safe-area-inset-bottom)); background: var(--page-2); box-shadow: 0 -1px 0 var(--page-sep), 0 -10px 24px rgb(0 0 0 / .18); }
.dock-hint { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 24px; text-align: center; font: 600 var(--fs-small)/1.3 var(--sans); color: var(--on-page-2); }
.dock-hint .ic { width: 19px; height: 19px; color: var(--tape-1); }
.dock-hint.need .ic { color: var(--on-page-3); }
.dock-row { display: flex; flex-direction: column-reverse; gap: var(--s2); }
.dock-get { width: 100%; min-height: var(--tap-main); font-size: 21px; }
/* tool tabs: icon + word, the open one in tape yellow */
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.tools:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; } /* voice tab on: five tabs, one row */
.tool { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 58px; padding: 4px 2px; border-radius: var(--r-btn);
  color: var(--on-page-2); font: 700 13px/1.15 var(--sans); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.tool span:not(.tool-badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool .ic { width: 25px; height: 25px; }
.tool.on { color: var(--tape-1); background: var(--page-fill); }
@media (hover: hover) { .tool:not(.on):hover { color: var(--on-page); background: var(--page-fill); } }
.tool-badge { position: absolute; top: 2px; left: calc(50% + 8px); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center;
  background: var(--btn); color: var(--btn-ink); font: 800 13px/1 var(--sans); font-variant-numeric: tabular-nums; }
.tool-badge.low { background: var(--page-fill-2); color: var(--on-page); }

/* tool panel (phones): a notepad page on the dock; the preview shrinks above it */
.panel-host { position: fixed; z-index: 30; left: 0; right: 0; bottom: var(--dock-h, 170px); height: min(48dvh, 460px);
  display: flex; flex-direction: column; box-shadow: 0 -12px 30px -8px rgb(0 0 0 / .4);
  -webkit-mask: linear-gradient(#000, #000) 0 10px / 100% 100% no-repeat, radial-gradient(circle at 10px 0, transparent 7px, #000 7.5px) 0 0 / 20px 10px repeat-x;
  mask: linear-gradient(#000, #000) 0 10px / 100% 100% no-repeat, radial-gradient(circle at 10px 0, transparent 7px, #000 7.5px) 0 0 / 20px 10px repeat-x;
  animation: rise var(--t-slow) var(--ease); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.ph-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: calc(var(--s3) + 10px) var(--s3) var(--s2) var(--s4); }
.ph-head b { font: 400 var(--fs-h2)/1.15 var(--head); min-width: 0; }
.ph-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--s2) var(--s4) var(--s5); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-content: start; }
.ed-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
.ed-fields { display: grid; gap: var(--s4); }
.importing { display: flex; align-items: center; gap: var(--s3); font: 600 var(--fs-small)/1.3 var(--sans); color: var(--ink-2); }
.importing .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.importing .bar i { display: block; height: 100%; width: 0; background: var(--btn); transition: width .2s; }
.thumbs:empty { display: none; }
.ed-privacy { display: flex; gap: var(--s2); align-items: flex-start; font: 400 var(--fs-micro)/1.4 var(--sans); color: var(--ink-3); }
.ed-privacy .ic { width: 17px; height: 17px; margin-top: 1px; color: var(--ink-3); }
#reorderHint { color: var(--ink-2); }
/* «Қосымша»: everything optional, out of the main path; headings are handwritten */
.more-h { padding: var(--s2) var(--s1) 0; font: 700 25px/1.1 var(--hand); color: var(--pen); }
.more-h:first-child { padding-top: 0; }
.more-lead { color: var(--ink-2); }
@media (max-width: 999px) {
  .ed-body.has-panel .transport, .ed-body.has-panel .dock-hint { display: none; }
  .ed-body.has-panel .bigplay span { width: 58px; height: 58px; }
  .ed-body.has-panel .bigplay .ic { width: 22px; height: 22px; }
  .ed-body.has-panel .ed-center { padding-top: var(--s3); }
}

/* desktop: preview left on the page, a cream working column right */
@media (min-width: 1000px) {
  .ed-top { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); min-height: 68px; padding: 0 var(--s5); }
  .stepper { grid-column: 3; grid-row: 1; justify-self: end; width: 400px; padding: 0; align-self: center; }
  .stepper::before { grid-row: 1; }
  .ed-body { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: var(--s6); max-width: 1400px; margin: 0 auto; padding: var(--s5) var(--s5) 0; align-items: start; }
  .ed-center { max-width: none; padding: 0 0 var(--s6); }
  .ed-empty { min-height: calc(100dvh - 68px - 2 * var(--s5)); width: min(560px, 100%); }
  .ed-side { position: sticky; top: calc(68px + var(--s5)); height: calc(100dvh - 68px - 2 * var(--s5)); display: flex; flex-direction: column;
    border-radius: var(--r-label); box-shadow: var(--sh-paper); overflow: hidden; }
  .ed-dock, .dock-row { display: contents; }
  .tools { order: 1; display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 6px; margin: var(--s4) var(--s4) 0; }
  .tools:has(> :nth-child(5)) { grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); }
  .tool { grid-auto-flow: column; justify-content: center; gap: 6px; min-height: var(--tap); border-radius: var(--r-label); color: var(--on-paper); background: rgb(60 50 20 / .07); font-size: var(--fs-small); }
  .tool.on { background: var(--card); color: var(--pen); box-shadow: inset 0 0 0 2px var(--pen); }
  .tool .ic { display: none; }
  .tool-badge { position: static; }
  .tool-badge.low { background: var(--line); color: var(--on-paper); }
  .panel-host { order: 2; position: static; flex: 1; min-height: 0; height: auto; background: none; box-shadow: none; animation: none; -webkit-mask: none; mask: none; }
  .ph-head { display: none; }
  .ph-body { padding: var(--s4) var(--s4) var(--s5); }
  .dock-hint { order: 3; justify-content: flex-start; text-align: left; padding: var(--s4) var(--s5) 0; color: var(--on-paper-2); box-shadow: inset 0 1.5px 0 var(--line); }
  .dock-hint .ic { color: var(--pen); }
  .dock-get { order: 4; flex: none; width: auto; margin: var(--s3) var(--s4) var(--s5); }
}
#encWarn { margin-top: var(--s2); }
#encWarn.status { --ink: var(--on-paper); color: var(--on-paper); background: var(--paper); }

/* preview stage: a white-bordered print */
.stage { position: relative; margin: 0 auto; overflow: hidden; background: var(--media); isolation: isolate; border-radius: 1px;
  box-shadow: 0 0 0 8px var(--print), 0 1px 1px 8px rgb(0 0 0 / .2), 0 16px 34px 4px rgb(0 0 0 / .4); }
.stage canvas { width: 100%; height: 100%; }
.bigplay { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity var(--t) var(--ease); }
.bigplay span { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #1D2A22; background: rgb(251 248 241 / .94);
  box-shadow: 0 6px 18px rgb(0 0 0 / .35); transition: transform var(--t) var(--ease); }
@media (hover: hover) { .bigplay:hover span { transform: scale(1.05); } }
.bigplay .ic { width: 32px; height: 32px; margin-left: 4px; }
.bigplay.hide { opacity: 0; pointer-events: none; }
.transport { display: flex; align-items: center; gap: var(--s3); max-width: 520px; }
.transport .btn-icon { flex: none; width: 52px; min-height: 52px; border-radius: 50%; background: var(--btn2); color: var(--btn2-ink); box-shadow: 0 3px 0 var(--btn2-edge); }
.transport input[type=range] { flex: 1; min-width: 0; accent-color: var(--tape-1); height: 36px; }
.transport .t-micro { min-width: 84px; text-align: right; color: var(--on-page-2); font-weight: 700; }

/* ---------- sample viewer: a dark screening room ---------- */
.viewer { position: fixed; inset: 0; z-index: 70; background: var(--page); color: var(--ink); display: flex; flex-direction: column; align-items: center;
  gap: var(--s3); padding: max(var(--s3), env(safe-area-inset-top)) var(--s3) max(var(--s3), env(safe-area-inset-bottom)); }
.v-media { position: relative; flex: 1 1 0; min-height: 0; width: 100%; }
#vVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.v-bar { width: min(520px, 100%); display: grid; gap: var(--s3); padding: var(--s1) var(--s1) 0; }
.v-t { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px var(--s3); }
.v-t b { font: 700 34px/1.05 var(--hand); color: var(--tape-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-price { font: 700 var(--fs-small)/1 var(--sans); color: var(--ink-2); white-space: nowrap; }
.v-blurb { grid-column: 1 / -1; font: 400 var(--fs-small)/1.45 var(--sans); color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#vPick { width: 100%; min-height: var(--tap-main); font-size: 21px; }
.v-next { text-align: center; font: 600 var(--fs-micro)/1.4 var(--sans); color: var(--ink-3); }
.v-x { position: absolute; top: max(var(--s3), env(safe-area-inset-top)); right: var(--s3); z-index: 1; color: #1D2A22; background: rgb(251 248 241 / .94); box-shadow: 0 3px 10px rgb(0 0 0 / .4); }

/* desktop / landscape: the film fills the whole height, the title + «Таңдау» sit beside it */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .viewer { flex-direction: row; justify-content: center; align-items: stretch; gap: var(--s6); padding: var(--s4) var(--s6); }
  .v-media { flex: 0 1 auto; width: auto; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100vw - 480px); }
  .v-bar { width: 380px; flex: none; align-self: center; }
}

/* ---------- checkout sheet ---------- */
/* the pay steps are written on a ruled notepad */
.sheet:has(.co-steps) { background-image: repeating-linear-gradient(transparent 0 33px, var(--rule) 33px 34px), url("./img/paper-grain.webp");
  background-size: auto, 300px; background-position: 0 18px, 0 0; background-blend-mode: normal, soft-light; }
.co { display: grid; gap: var(--s5); }
.co-h { display: grid; gap: 2px; }
.co-h > :first-child { padding-right: 104px; }
.co-h h2 { font: 400 var(--fs-h2)/1.15 var(--head); }
.co-h span.t-small { font-weight: 700; color: var(--ink-3); }
.co-h p.t-small { color: var(--ink-2); font-size: var(--fs-body); }
.co-preview { display: flex; gap: var(--s4); align-items: center; padding-right: 104px; }
.co-preview .print { width: 66px; height: 108px; flex: none; padding: 4px; transform: rotate(-3deg); }
.co-preview .print img { width: 100%; height: 100%; object-fit: cover; }
.co-preview div { display: grid; gap: 2px; min-width: 0; }
.co-preview b { font: 400 var(--fs-h2)/1.15 var(--head); }
.co-preview span { font: 600 var(--fs-small)/1.35 var(--sans); color: var(--ink-3); }
.co-offer { display: grid; gap: var(--s3); padding: var(--s4) var(--s5) var(--s5); border-radius: var(--r-label); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.co-how { display: grid; gap: var(--s2); }
.co-how h3 { padding: 0 var(--s1); font: 700 25px/1.1 var(--hand); color: var(--pen); }
.co-how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.co-how li { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s2) var(--s4); border-radius: var(--r-label);
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font: 700 var(--fs-body)/1.35 var(--sans); color: var(--ink); }
.co-help { display: inline-flex; align-items: center; gap: 8px; justify-self: center; min-height: var(--tap); color: var(--pen); font: 700 var(--fs-small)/1.3 var(--sans); }
.co-help .ic { width: 18px; height: 18px; }
.co-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); }
.co-steps > li { display: grid; gap: var(--s2); }
.co-n { display: flex; align-items: center; gap: var(--s3); min-height: 40px; font: 800 var(--fs-body)/1.25 var(--sans); }
.co-code { display: inline-flex; font: 800 34px/1.1 var(--sans); letter-spacing: .04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.co-file { position: relative; }
.co-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.co-file .btn { min-height: var(--tap-main); font-size: 20px; }
.co-prep:empty { display: none; }
.co-prep { color: var(--ink-2); margin: -4px 0 0; font-weight: 600; }

/* photo edit sheet */
.pe { display: grid; gap: var(--s4); }
.pe .t-h2 { padding-right: 104px; }
.pe img { width: auto; max-width: 100%; max-height: 42dvh; margin: 6px auto; object-fit: contain; background: var(--media); border: 7px solid var(--print); box-shadow: var(--sh-print); transform: rotate(-1deg); }
.pe-acts { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); }

/* ---------- render overlay: the album page with a yellow ring ---------- */
.render { position: fixed; inset: 0; z-index: 80; overflow: auto; display: grid; place-items: center;
  padding: max(var(--s5), env(safe-area-inset-top)) var(--gutter) max(var(--s5), env(safe-area-inset-bottom));
  background-color: var(--page); background-image: radial-gradient(130% 95% at 50% 35%, transparent 52%, var(--vignette)), url("./img/paper-grain.webp");
  background-size: auto, 300px; background-blend-mode: normal, soft-light; }
.render-in { width: min(440px, 100%); display: grid; gap: var(--s4); justify-items: center; text-align: center; }
.render-t { font-size: var(--fs-display); color: var(--on-page); }
.render .t-small { color: var(--ink-2); }
#outVideo { max-width: 100%; max-height: 52dvh; background: var(--media); border: 8px solid var(--print); box-shadow: var(--sh-lift); transform: rotate(-1deg); margin: var(--s2) 0; }
.done-acts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); width: 100%; }
.done-acts .btn { min-height: var(--tap-main); }
.done-acts .btn:only-child, .done-acts .btn:has(+ [hidden]) { grid-column: 1 / -1; }
#bLink { min-height: 60px; }
#bLink .lk { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.2; }
#bLink small { margin: 0; font-weight: 600; opacity: .75; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
#bDoneBack, .render .btn-text { color: var(--on-page); }

/* on a phone a tap opens the sample, so there is no «selected» state to show */
@media (max-width: 999px) { .tcard.on { box-shadow: var(--sh-print); } }
@media (prefers-reduced-motion: no-preference) { html:has(#home:not([hidden])) { scroll-behavior: smooth; } }
/* the pay button stays in thumb reach while the offer scrolls under it */
#coGo { position: sticky; bottom: 0; z-index: 1; min-height: var(--tap-main); font-size: 21px; }
