/* Solkez design system v7 «Альбом» — components. Values come only from tokens.css. */

/* ---------- base: the green album page ---------- */
.es { margin: 0; min-height: 100dvh; background: var(--page); color: var(--ink); font: 400 var(--fs-body)/var(--lh-body) var(--sans);
  --ink: var(--on-page); --ink-2: var(--on-page-2); --ink-3: var(--on-page-3); --fill: var(--page-fill); --fill-2: var(--page-fill-2); --sep: var(--page-sep);
  --b2: var(--btn2); --b2-ink: var(--btn2-ink); --b2-edge: var(--btn2-edge); --b2-line: transparent; --link: var(--on-page); --pick: var(--tape-1);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease); }
/* paper grain (a grey kraft scan, blended so it takes any page colour) + a soft vignette, fixed behind everything */
.es::before, .es::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.es::before { background: url("./img/paper-grain.webp") 0 0 / 300px; mix-blend-mode: soft-light; opacity: .9; }
.es::after { background: radial-gradient(130% 95% at 50% 35%, transparent 52%, var(--vignette)); }
.es *, .es *::before, .es *::after { box-sizing: border-box; }
.es :focus-visible { outline: 0; box-shadow: var(--focus); border-radius: var(--r-field); }
.es :where(a) { color: var(--link); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.es :where(button) { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; letter-spacing: inherit; -webkit-tap-highlight-color: transparent; }
.es :where(input, textarea) { font: inherit; color: inherit; letter-spacing: inherit; }
.es :where(img, video, canvas) { display: block; max-width: 100%; }
.es :where(h1, h2, h3, p) { margin: 0; }
.ic { width: 22px; height: 22px; flex: none; }
[hidden] { display: none !important; }
.ambient { display: none; }

/* ---------- paper: a cream note on the page. Everything inside reads in dark ink. ---------- */
.paper, .sheet, .panel-host, .ed-side, .pick-side, .how-steps li, .price-list, .faq-list, .drop, .co-paper {
  --ink: var(--on-paper); --ink-2: var(--on-paper-2); --ink-3: var(--on-paper-3); --fill: rgb(60 50 20 / .07); --fill-2: rgb(60 50 20 / .13); --sep: var(--line);
  --b2: var(--card); --b2-ink: var(--on-paper); --b2-edge: var(--line-2); --b2-line: var(--line); --link: var(--pen); --pick: var(--pen);
  color: var(--ink); }
:root[data-theme="dark"] :is(.paper, .sheet, .panel-host, .ed-side, .pick-side, .how-steps li, .price-list, .faq-list, .drop, .co-paper),
.is-night :is(.paper, .sheet, .panel-host, .ed-side, .pick-side, .how-steps li, .price-list, .faq-list, .drop, .co-paper) { --fill: rgb(255 255 255 / .07); --fill-2: rgb(255 255 255 / .13); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.paper, .sheet, .panel-host, .ed-side, .pick-side, .how-steps li, .price-list, .faq-list, .drop, .co-paper) { --fill: rgb(255 255 255 / .07); --fill-2: rgb(255 255 255 / .13); } }
/* cream paper with the same grain */
.paper, .sheet, .panel-host, .ed-side, .pick-side, .how-steps li, .price-list, .faq-list, .drop {
  background-color: var(--paper); background-image: url("./img/paper-grain.webp"); background-size: 300px; background-blend-mode: soft-light; }
.paper { border-radius: var(--r-label); box-shadow: var(--sh-paper); }

/* ---------- print: a photo with a white border (and optional black corners, tape) ---------- */
.print { position: relative; display: block; padding: 7px; border-radius: var(--r-print); background: var(--print); box-shadow: var(--sh-print); }
.print > img, .print > video, .print > .ph { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--media); }
.corner { position: absolute; z-index: 2; width: 18px; height: 18px; background: var(--corner); opacity: .9; pointer-events: none; }
.corner.tl { left: -3px; top: -3px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.corner.tr { right: -3px; top: -3px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.corner.bl { left: -3px; bottom: -3px; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.corner.br { right: -3px; bottom: -3px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* washi tape: a translucent strip with torn zig-zag ends. --c picks the colour, --tr the angle. */
.tape { position: absolute; z-index: 3; display: block; width: 84px; height: 24px; pointer-events: none;
  background: var(--c, var(--tape-1)); opacity: var(--tape-a); transform: rotate(var(--tr, -6deg));
  background-image: linear-gradient(rgb(255 255 255 / .28), transparent 40%, rgb(0 0 0 / .06)); }
.tape::before, .tape::after { content: ""; position: absolute; top: 0; bottom: 0; width: 6px; background: inherit;
  clip-path: polygon(0 0, 100% 15%, 0 30%, 100% 45%, 0 60%, 100% 75%, 0 90%, 100% 100%, 0 100%); }
.tape::before { left: -5px; transform: scaleX(-1); }
.tape::after { right: -5px; }
.tape.t2 { --c: var(--tape-2); } .tape.t3 { --c: var(--tape-3); } .tape.t4 { --c: var(--tape-4); }

/* ---------- buttons ----------
   primary: the yellow tape colour with a pressed-paper edge, one per screen.
   outline: cream paper on the page / a white card on paper. ghost: quiet fill. text: an underlined link. */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 var(--s5); border-radius: var(--r-btn); white-space: nowrap; text-decoration: none;
  font: 800 19px/1.15 var(--sans); letter-spacing: 0;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
.es .btn { text-decoration: none; }
.btn .ic { width: 22px; height: 22px; }
.btn:active { transform: translateY(2px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-primary, .btn-light { background: var(--btn); color: var(--btn-ink); box-shadow: 0 3px 0 var(--btn-edge), 0 8px 18px rgb(0 0 0 / .22); }
.btn-primary:active { box-shadow: 0 1px 0 var(--btn-edge), 0 3px 8px rgb(0 0 0 / .2); }
.btn-primary[disabled] { opacity: .55; }
.btn-outline { background: var(--b2); color: var(--b2-ink); box-shadow: inset 0 0 0 1.5px var(--b2-line), 0 3px 0 var(--b2-edge), 0 6px 14px rgb(0 0 0 / .14); font-weight: 700; }
.btn-outline:active { box-shadow: inset 0 0 0 1.5px var(--b2-line), 0 1px 0 var(--b2-edge); }
.btn-ghost { background: var(--fill); color: var(--ink); font-weight: 700; font-size: var(--fs-small); min-height: var(--tap); padding: 0 var(--s4); }
.btn-text, .link { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 var(--s1); color: var(--link);
  font: 700 var(--fs-small)/1.3 var(--sans); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.btn-sm { min-height: var(--tap); padding: 0 var(--s4); font-size: var(--fs-small); }
.btn-block { width: 100%; white-space: normal; text-align: center; padding-block: 8px; }
.btn-icon { min-width: var(--tap); min-height: var(--tap); padding: 0 14px; gap: 6px; border-radius: var(--r-btn); background: var(--fill); color: var(--ink);
  font: 700 var(--fs-small)/1 var(--sans); box-shadow: none; }
.btn-icon:not(:has(span)) { width: var(--tap); padding: 0; }
.btn-icon .ic { width: 19px; height: 19px; }
.btn small { font: 600 var(--fs-micro)/1 var(--sans); color: inherit; opacity: .8; margin-left: auto; font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .btn-primary:hover { filter: brightness(1.04); }
  .btn-outline:hover { filter: brightness(1.03); }
  .btn-ghost:hover, .btn-icon:hover { background: var(--fill-2); }
}

/* ---------- index tabs (segmented choices) ----------
   On the page: translucent tabs, the chosen one is cream paper. On paper: the chosen one is a white card in blue ink. */
.seg, .chips { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 0; background: none; }
.seg button, .chip { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s3);
  border-radius: var(--r-label); color: var(--ink); background: var(--fill); font: 700 var(--fs-small)/1.2 var(--sans); white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.seg button.on, .chip.on { background: var(--paper); color: var(--on-paper); box-shadow: 0 2px 0 rgb(0 0 0 / .18); }
:where(.paper, .sheet, .panel-host, .ed-side, .pick-side) :is(.seg button, .chip).on { background: var(--card); color: var(--pen); box-shadow: inset 0 0 0 2px var(--pen); }
@media (hover: hover) { .seg button:not(.on):hover, .chip:not(.on):hover { background: var(--fill-2); } }
.chips { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; width: max-content; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 0 var(--s4); }
.chip .ic { width: 18px; height: 18px; }
/* wrapping chips = choices of a phrase (dua, voice text group) */
.wrapchips { display: flex; flex-wrap: wrap; gap: var(--s2); width: auto; }
.wrapchips .chip { white-space: normal; text-align: left; line-height: 1.3; padding: 10px var(--s4); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font-weight: 600; }
.wrapchips .chip.on { box-shadow: inset 0 0 0 2px var(--pen); color: var(--pen); font-weight: 800; }

/* ---------- fields: white card, warm border, blue ink when focused ---------- */
.field { display: grid; gap: 6px; }
.field > span { font: 700 var(--fs-small)/1.3 var(--sans); color: var(--ink-2); padding-left: 2px; }
.field input, .field textarea { width: 100%; min-height: 56px; padding: 0 var(--s4); border: 0; border-radius: var(--r-field);
  background: var(--card); color: var(--on-paper); box-shadow: inset 0 0 0 1.5px var(--line-2);
  font: 600 18px/1.3 var(--sans); outline: none; transition: box-shadow var(--t-fast) var(--ease); }
.field input::placeholder, .field textarea::placeholder { color: var(--on-paper-3); opacity: .85; font-weight: 400; }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 2.5px var(--pen); }
.field .help { font: 400 var(--fs-small)/1.4 var(--sans); color: var(--ink-3); padding-left: 2px; }
.field.is-error input { box-shadow: inset 0 0 0 2.5px var(--danger); }
.field.is-error .help { color: var(--danger); font-weight: 700; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); align-items: end; }

/* ---------- step number: a ballpoint circle ---------- */
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  border: 2px solid var(--pick); color: var(--pick); font: 700 23px/1 var(--hand); }

/* ---------- template card: a print with the name written underneath ---------- */
.tcard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; min-width: 0;
  padding: 7px 7px 0; border-radius: var(--r-print); background: var(--print); box-shadow: var(--sh-print); transform: rotate(var(--r, 0deg)); cursor: pointer;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.tcard-media { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; background: var(--media); }
.tcard-media .ph { position: absolute; inset: 0; overflow: hidden; background: var(--media); }
.tcard-media img, .tcard-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard-media video { opacity: 0; transition: opacity var(--t) var(--ease); }
.tcard-media video.on { opacity: 1; }
.tcard-name { font: 700 25px/1 var(--hand); color: #2343A3; letter-spacing: 0; }

/* ---------- photo thumbnails: little prints ---------- */
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; list-style: none; padding: 4px 2px; margin: 0; }
@media (min-width: 560px) { .thumbs { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .thumbs { grid-template-columns: repeat(3, 1fr); } }
.thumb { position: relative; aspect-ratio: 1; padding: 4px; border-radius: var(--r-print); background: var(--print); box-shadow: 0 1px 1px rgb(0 0 0 / .18), 0 4px 10px rgb(0 0 0 / .22);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.thumb:nth-child(3n+1) { transform: rotate(-1.2deg); } .thumb:nth-child(3n+2) { transform: rotate(.9deg); } .thumb:nth-child(3n) { transform: rotate(-.5deg); }
.thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thumb-n { position: absolute; left: 0; top: 0; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 0 0 var(--r-label) 0;
  display: grid; place-items: center; background: var(--btn); color: var(--btn-ink); font: 800 15px/1 var(--sans); font-variant-numeric: tabular-nums; }
.thumb-n .ic { width: 16px; height: 16px; }
.thumb-ed { position: absolute; right: -6px; top: -6px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); color: var(--on-paper); box-shadow: 0 2px 6px rgb(0 0 0 / .3); }
.thumb-ed .ic { width: 18px; height: 18px; }
.thumb-cap { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 2px 6px; background: rgb(251 248 241 / .94); color: #2343A3;
  font: 700 18px/1.1 var(--hand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb.ghosting { opacity: .35; }
.thumb.chosen { box-shadow: 0 0 0 3px var(--pen), var(--sh-lift); }
.thumb.is-portrait { box-shadow: 0 0 0 3px var(--btn), 0 4px 10px rgb(0 0 0 / .22); }

/* ---------- drop zone: an empty album page with prints waiting to be added ---------- */
.drop { position: relative; display: grid; justify-items: center; gap: var(--s2); padding: var(--s7) var(--s5) var(--s6); border-radius: var(--r-label); text-align: center; cursor: pointer;
  box-shadow: var(--sh-paper); transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
.drop::after { content: ""; position: absolute; inset: 10px; border: 2px dashed var(--line-2); border-radius: 4px; pointer-events: none; }
.drop.over { box-shadow: 0 0 0 4px var(--btn), var(--sh-lift); }
.drop-prints { position: relative; display: block; width: 190px; height: 96px; margin-bottom: var(--s2); }
.drop-prints i { position: absolute; top: 8px; width: 70px; height: 80px; background: var(--print); box-shadow: var(--sh-paper); border: 6px solid var(--print);
  background-image: linear-gradient(160deg, var(--tape-3), var(--tape-4)); }
.drop-prints i:nth-child(1) { left: 6px; transform: rotate(-9deg); }
.drop-prints i:nth-child(2) { left: 60px; top: 0; transform: rotate(3deg); z-index: 1; background-image: linear-gradient(160deg, var(--tape-1), var(--tape-2)); }
.drop-prints i:nth-child(3) { left: 114px; transform: rotate(10deg); }
.drop-ic { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; margin: -40px 0 var(--s2);
  background: var(--btn); color: var(--btn-ink); box-shadow: 0 3px 0 var(--btn-edge), 0 8px 16px rgb(0 0 0 / .2); }
.drop-ic .ic { width: 28px; height: 28px; }
.drop-t { font: 400 var(--fs-display)/var(--lh-display) var(--head); }
.drop-s { font: 400 var(--fs-body)/1.45 var(--sans); color: var(--ink-2); max-width: 30ch; }
.drop-p { display: flex; align-items: flex-start; gap: 8px; margin-top: var(--s3); font: 400 var(--fs-small)/1.45 var(--sans); color: var(--ink-3); max-width: 34ch; text-align: left; }
.drop-p .ic { width: 18px; height: 18px; margin-top: 2px; color: var(--ink-3); }

/* ---------- lists on paper: one white card, rows ruled like a notebook ---------- */
.rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.row { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s2) var(--s2) var(--s2) var(--s4); background: var(--card); cursor: pointer;
  box-shadow: inset 1.5px 0 0 var(--line), inset -1.5px 0 0 var(--line); transition: background-color var(--t-fast) var(--ease); }
.row:first-child, .rows-h + .row { border-top-left-radius: var(--r-label); border-top-right-radius: var(--r-label); box-shadow: inset 0 1.5px 0 var(--line), inset 1.5px 0 0 var(--line), inset -1.5px 0 0 var(--line); }
.row:last-child, .row:has(+ .rows-h) { border-bottom-left-radius: var(--r-label); border-bottom-right-radius: var(--r-label); box-shadow: inset 0 -1.5px 0 var(--line), inset 1.5px 0 0 var(--line), inset -1.5px 0 0 var(--line); }
.row:only-child, .rows-h + .row:last-child, .rows-h + .row:has(+ .rows-h) { box-shadow: inset 0 0 0 1.5px var(--line); }
.row + .row::before { content: ""; position: absolute; top: 0; left: var(--s4); right: var(--s4); height: 1px; background: var(--line); }
@media (hover: hover) { .row:hover { background: color-mix(in srgb, var(--card) 94%, var(--tape-1)); } }
.row:active { background: color-mix(in srgb, var(--card) 88%, var(--tape-1)); }
.row.on { background: color-mix(in srgb, var(--card) 78%, var(--tape-1)); }
.row-main { flex: 1; min-width: 0; }
.row-t { font: 700 var(--fs-body)/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-s { font: 400 var(--fs-small)/1.35 var(--sans); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.on .row-t { font-weight: 800; }
.rows-h { padding: var(--s5) var(--s1) var(--s2); font: 700 24px/1.1 var(--hand); color: var(--pen); }
.rows-h:first-child { padding-top: var(--s1); }
/* the choice mark: a blue ballpoint tick at the trailing edge */
.radio { order: 3; position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-2); }
.row.on .radio { background: var(--pen); box-shadow: none; }
.row.on .radio::after { content: ""; position: absolute; left: 10px; top: 5px; width: 7px; height: 13px; border: solid var(--card); border-width: 0 2.6px 2.6px 0; transform: rotate(45deg); }
.row .btn-icon { order: 2; min-height: 44px; padding: 0 14px 0 10px; background: var(--paper-2); color: var(--pen); box-shadow: inset 0 0 0 1.5px var(--line); }
.row .btn-icon .ic { width: 16px; height: 16px; }
.group { border-radius: var(--r-label); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }

/* ---------- sheet: a page torn from a notepad (perforated top), bottom on phones, centred on desktop ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; background: var(--scrim); opacity: 0; transition: opacity var(--t) var(--ease); }
.sheet-wrap.open { opacity: 1; }
.sheet { position: relative; width: 100%; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  padding: calc(var(--s5) + 10px) var(--gutter) calc(var(--s5) + env(safe-area-inset-bottom));
  -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;
  transform: translateY(40px); transition: transform var(--t-slow) var(--ease); }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grab { display: none; }
.sheet-x { position: absolute; right: var(--s3); top: calc(var(--s3) + 10px); z-index: 2; }
@media (min-width: 720px) {
  .sheet-wrap { align-items: center; justify-items: center; padding: var(--s5); }
  .sheet { width: min(540px, 100%); padding: calc(var(--s6) + 10px) var(--s6) var(--s6); }
}

/* ---------- pay ---------- */
.price { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.price b { font: 700 var(--fs-hand-l)/1 var(--hand); color: var(--pen); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price span { font: 600 var(--fs-small)/1.3 var(--sans); color: var(--ink-3); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.checks li { display: flex; gap: var(--s2); align-items: flex-start; color: var(--ink-2); font-weight: 600; }
.checks .ic { color: var(--ok); margin-top: 3px; width: 20px; height: 20px; stroke-width: 2.4; }
/* copy rows: white cards on the notepad */
.copyline { position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 70px; padding: var(--s2) var(--s2) var(--s2) var(--s4);
  background: var(--card); border-radius: var(--r-label); box-shadow: inset 0 0 0 1.5px var(--line); }
.copyline div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.copyline small { font: 600 var(--fs-small)/1.3 var(--sans); color: var(--ink-3); }
.copyline b { font: 800 20px/1.3 var(--sans); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copyline .btn-icon { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 2px 0 var(--line-2); }
.status { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); border-radius: var(--r-label); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.status .ic { margin-top: 2px; width: 24px; height: 24px; }
.status b { display: block; margin-bottom: 2px; font-weight: 800; }
.status.ok { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ok) 60%, transparent); } .status.ok .ic { color: var(--ok); stroke-width: 2.4; }
.status.bad { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--danger) 60%, transparent); } .status.bad .ic { color: var(--danger); }
.status.bad b { color: var(--danger); }
.kaspi { display: inline-block; padding: 3px 7px; border-radius: 4px; background: var(--kaspi); color: #fff; font: 800 14px/1.1 var(--sans); vertical-align: 2px; }

/* ---------- watermark over the free preview ---------- */
.wm { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wm span { position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; transform: rotate(-24deg);
  display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; gap: 28px 44px;
  font: 800 14px/1 var(--sans); letter-spacing: .08em; color: rgb(255 255 255 / .42); text-shadow: 0 0 2px rgb(0 0 0 / .35); }

/* ---------- progress ring ---------- */
.ring { position: relative; width: 160px; height: 160px; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .trk { stroke: var(--fill); }
.ring .val { stroke: var(--btn); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .3s linear; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 46px/1 var(--hand); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- toast: a dark label ---------- */
.toast { position: fixed; left: 50%; bottom: calc(190px + env(safe-area-inset-bottom)); z-index: 90; transform: translateX(-50%) rotate(-.6deg);
  display: inline-flex; align-items: center; gap: var(--s2); width: max-content; max-width: calc(100vw - 32px); min-height: 52px; padding: var(--s3) var(--s5);
  border-radius: var(--r-label); color: #FBF8F1; background: var(--hud); font: 700 var(--fs-small)/1.35 var(--sans); box-shadow: var(--sh-lift); }
@media (min-width: 1000px) { .toast { bottom: var(--s6); } }

.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--fill-2); border-top-color: var(--pick); animation: spin .9s linear infinite; flex: none; margin-top: 1px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

/* theme button (sun / moon) */
.btn-theme { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-btn); background: var(--fill); color: var(--ink); transition: background-color var(--t-fast) var(--ease); }
.btn-theme:hover { background: var(--fill-2); }
.btn-theme .ic { width: 22px; height: 22px; color: var(--tape-1); }

/* motion: prints drop onto the page, tape lands after (one moment, off when reduced) */
@keyframes drop { from { opacity: 0; transform: translateY(-60px) rotate(calc(var(--r, 0deg) - 9deg)) scale(1.1); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes tapein { from { opacity: 0; transform: rotate(var(--tr, -6deg)) scaleX(.2); } to { opacity: var(--tape-a); transform: rotate(var(--tr, -6deg)); } }
@media (prefers-reduced-motion: no-preference) {
  .drop-in { animation: drop .9s var(--ease-drop) both; }
  .tape-in { animation: tapein .35s ease-out both; }
}
