/* Canvas: an infinite pinboard. Pale lilac board with a dot grid, black ink, acid-lime marker, a little hot pink
   for sale tags. Syne (display), Space Grotesk (text), Caveat (handwritten notes); Arabic: Lalezar, Tajawal, Aref Ruqaa.
   Logical properties throughout, so Arabic mirrors. */

:root {
  --board: #e7e3f3;
  --board-deep: #d6cfec;
  --dot: #b2a8d6;
  --ink: #000;
  --muted: #47415c;
  --paper: #fffef8;
  --lime: #d4ff3a;
  --lime-soft: #ecffa6;
  --pink: #ff3d8b;
  --pink-soft: #ffd2e5;
  --lilac-note: #cbc1ef;
  --err: #b0003a;
  --f-display: "Syne", "Space Grotesk", system-ui, sans-serif;
  --f-body: "Space Grotesk", system-ui, sans-serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
  --shadow: 0 14px 22px -14px rgba(46, 26, 110, .55), 0 2px 3px rgba(46, 26, 110, .12);
  --r: 0deg;
  --rv-bg: #e7e3f3; --rv-surface: #fffef8; --rv-text: #000; --rv-muted: #47415c; --rv-line: #000;
  --rv-accent: #000; --rv-accent-text: #d4ff3a; --rv-radius: 12px;
  --rv-font: "Space Grotesk", Tajawal, system-ui, sans-serif; --rv-font-display: "Syne", Lalezar, system-ui, sans-serif;
  color-scheme: light;
}
:root:lang(ar) {
  --f-display: Lalezar, Tajawal, system-ui, sans-serif;
  --f-body: Tajawal, "Space Grotesk", system-ui, sans-serif;
  --f-hand: "Aref Ruqaa", Tajawal, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 17px/1.55 var(--f-body);
  background: var(--board) radial-gradient(circle, var(--dot) 1.15px, transparent 1.6px) 0 0 / 26px 26px;
  min-height: 100vh;
}
:lang(ar) body { font-size: 18px; }
img, svg { display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px var(--lime); border-radius: 6px; }
.skip { position: fixed; inset-inline-start: 12px; top: -80px; z-index: 50; background: var(--ink); color: var(--lime); padding: 12px 18px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.hand { font-family: var(--f-hand); font-weight: 700; line-height: 1.1; }
:lang(ar) .hand { font-weight: 700; }
.ico { width: 24px; height: 24px; flex: none; }
:dir(rtl) .ico--dir { transform: scaleX(-1); }
[hidden] { display: none !important; }

/* ---------- ink drawings ---------- */
.ink { width: 100%; height: auto; overflow: visible; color: var(--ink); }
.ink .s { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ink .s--thin { stroke-width: 1.6; }
.ink .f, .mark .f, .doodle .f { fill: var(--patch, var(--lime)); }
.ink .w { fill: var(--paper); }
.ink .dot, .mark .dot { fill: currentColor; }
.ink .hand { font: 700 22px var(--f-hand); fill: currentColor; }
.mark { width: 40px; height: 40px; flex: none; overflow: visible; }
.mark .s, .doodle .s, .arrow .s { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.doodle .s--thin { stroke-width: 1.6; }
.mark .pin { fill: var(--pink); stroke: var(--ink); stroke-width: 2; }
.arrow { overflow: visible; }

/* ---------- header ---------- */
.hdr {
  position: relative; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 64px;
  padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: var(--board); border-block-end: 2px solid var(--ink);
}
.brand { display: flex; align-items: center; justify-content: center; min-width: 44px; gap: 8px; text-decoration: none; min-height: 44px; flex: none; }
.brand__w { font: 800 21px/1 "Syne", var(--f-display); letter-spacing: -.01em; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 600; text-decoration: none; border-radius: 8px; white-space: nowrap;
  background: linear-gradient(var(--lime), var(--lime)) no-repeat 50% 78% / 0 9px; transition: background-size .2s; }
.nav a:hover { background-size: calc(100% - 20px) 9px; }
.tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.nav + .tools { margin-inline-start: 0; }
.iconbtn, .langbtn, .cartbtn { position: relative; display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; text-decoration: none; }
.iconbtn:hover, .langbtn:hover, .cartbtn:hover { border-color: var(--ink); }
.langbtn { font: 700 16px/1 Tajawal, var(--f-body); }
.langbtn:lang(en) { font-family: "Space Grotesk", sans-serif; }
.badge { position: absolute; top: 0; inset-inline-end: -2px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; background: var(--lime); border: 2px solid var(--ink); font: 700 12px/17px "Space Grotesk", sans-serif; text-align: center; }
.badge.is-zero { background: var(--paper); }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 12px; padding: 2px; gap: 2px; background: var(--paper); }
.seg button { min-height: 44px; min-width: 52px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-weight: 600; font-size: 15px; cursor: pointer; }
.seg [aria-pressed="true"] { background: var(--ink); color: var(--lime); }
@media (max-width: 899px) {
  .hdr { margin-block-end: 48px; }
  .nav { position: absolute; inset-inline: 0; top: 100%; margin: 0; padding: 0 8px; height: 48px; align-items: center; overflow-x: auto; scrollbar-width: none; background: var(--board); border-block-end: 2px solid var(--ink); }
  .nav a { min-height: 44px; font-size: 15px; }
}
@media (max-width: 520px) {
  .brand__w { display: none; }
  .hdr { gap: 4px; }
  .tools { gap: 2px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 2px solid var(--ink); border-radius: 12px;
  font: 700 17px/1.1 var(--f-body); text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--ink { background: var(--ink); color: var(--lime); }
.btn--lime { background: var(--lime); }
.btn--line { background: var(--paper); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; }
.linkbtn { min-width: 44px; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 600; min-height: 44px; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- prices, tags ---------- */
.pr { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pr__now { font: 700 20px/1.1 var(--f-display); }
:lang(ar) .pr__now { font-family: Tajawal, sans-serif; font-weight: 800; }
.pr__was { color: var(--muted); font-size: 14px; text-decoration-thickness: 2px; }
.tag { position: absolute; top: 12px; inset-inline-start: -10px; z-index: 2; padding: 5px 10px 4px; background: var(--pink); color: var(--ink); border: 2px solid var(--ink);
  font: 800 15px/1 "Syne", var(--f-display); transform: rotate(-7deg); border-radius: 4px; }
.mat { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 2px solid var(--ink); border-radius: 999px; font: 700 13px/1 "Space Grotesk", sans-serif; background: var(--paper); }
.mat--petg { background: var(--lime); }

/* ---------- pinned card ---------- */
.card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px;
  box-shadow: var(--shadow); transform: rotate(var(--r)); transition: transform .18s; }
.card:hover { transform: rotate(0deg) translateY(-3px); }
.card:focus-within { transform: rotate(0deg); }
.card__fix { position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--pink); border: 2px solid var(--ink); box-shadow: 2px 4px 0 rgba(0,0,0,.18); }
.card--tape .card__fix { width: 92px; height: 26px; margin-left: -46px; top: -13px; border-radius: 2px; border: 0; background: color-mix(in srgb, var(--lime) 78%, transparent); box-shadow: none; transform: rotate(-3deg); }
.card__art { display: block; aspect-ratio: 1; padding: 6px 10px; }
.card__n { font: 600 16px/1.3 var(--f-body); margin-block-start: 2px; }
.card__n a { display: block; padding-block: 2px; text-decoration: none; }
.card__n a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__n a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 6px; text-underline-offset: -1px; text-decoration-skip-ink: none; }
.card__by { font-size: 14px; color: var(--muted); }
.card__note { position: absolute; top: 18px; inset-inline-end: 12px; font-size: 24px; transform: rotate(6deg); padding: 0 6px; background: var(--lime-soft); border-radius: 3px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-start: auto; padding-block-start: 8px; }
.add { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 8px; border: 2px solid var(--ink); border-radius: 10px; background: var(--lime); font-weight: 700; font-size: 15px; cursor: pointer; }
.add .ico { width: 20px; height: 20px; }
.add:hover { background: var(--ink); color: var(--lime); }

/* ---------- notes ---------- */
.note { position: relative; padding: 22px 20px 20px; background: var(--paper); box-shadow: var(--shadow); transform: rotate(var(--r)); border-radius: 2px; }
.note--lime { background: var(--lime); }
.note--pink { background: var(--pink-soft); }
.note--lilac { background: var(--lilac-note); }
.note h3.hand { font-size: 28px; margin-block-end: 6px; }
:lang(ar) .note h3.hand { font-size: 24px; line-height: 1.5; }
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.notes .note:nth-child(1) { --r: -1.5deg; } .notes .note:nth-child(2) { --r: 1.2deg; } .notes .note:nth-child(3) { --r: .8deg; } .notes .note:nth-child(4) { --r: -1deg; }
.notes .note::before { content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; margin-left: -35px; background: rgba(255, 255, 255, .55); transform: rotate(2deg); }

/* ---------- zones (shared by both views) ---------- */
.zone { position: relative; }
.zone:focus { outline: none; }
.zone:focus-visible { outline: 3px dashed var(--ink); outline-offset: 14px; box-shadow: none; }
.zone__head { position: relative; margin-block-end: 26px; max-width: 46rem; }
.zone__h { font: 800 44px/1 var(--f-display); letter-spacing: -.02em; }
:lang(ar) .zone__h { font-weight: 400; letter-spacing: 0; line-height: 1.3; }
.zone__sub { margin-block-start: 8px; color: var(--muted); font-size: 18px; }
.zone__note { position: absolute; top: -30px; inset-inline-end: -10px; font-size: 26px; transform: rotate(-4deg); }
.scrawl { display: inline-block; font-size: 30px; padding: 0 10px; background: var(--lime); transform: rotate(-2deg); margin-block-end: 14px; }
:lang(ar) .scrawl { font-size: 26px; padding-block: 2px; }
.display { font: 800 76px/.95 var(--f-display); letter-spacing: -.03em; }
:lang(ar) .display { font-weight: 400; letter-spacing: 0; line-height: 1.25; font-size: 68px; }
.lede { font-size: 20px; max-width: 30rem; margin-block: 20px 26px; }

/* start */
.zone--start { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.minis { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 26px; }
.minis li { padding: 6px 12px; background: var(--paper); border: 1.5px solid var(--ink); font-weight: 600; font-size: 15px; transform: rotate(-1deg); }
.minis li:nth-child(2) { transform: rotate(1.4deg); }
.start__art { position: relative; display: block; padding: 22px 22px 18px; background: var(--paper); box-shadow: var(--shadow); text-decoration: none; transform: rotate(2deg); }
#heroArt { display: block; }
.start__art .ink { max-width: 300px; margin-inline: auto; }
.sheetpin { position: absolute; top: -10px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); z-index: 2; }
.start__lbl { display: flex; flex-direction: column; gap: 2px; margin-block-start: 6px; }
.start__lbl b { font-weight: 600; }
.start__lbl .hand { font-size: 24px; }
.start__art:hover b { text-decoration: underline; }
.start__art.is-printing #heroArt { animation: print 2.4s cubic-bezier(.4, 0, .3, 1) .3s both; }
.start__art.is-printing #heroArt::after { content: ""; }
@keyframes print { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.hint { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font: 700 26px/1.2 var(--f-hand); }
.hint__k { font: 500 15px var(--f-body); color: var(--muted); }

/* how */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 46px; counter-reset: s; }
.step { position: relative; padding: 18px 18px 20px; background: var(--paper); box-shadow: var(--shadow); transform: rotate(var(--r)); }
.step:nth-child(odd) { --r: -1deg; } .step:nth-child(even) { --r: 1.2deg; }
.step__n { position: absolute; top: -16px; inset-inline-start: -12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--lime); font: 800 20px/1 "Syne", sans-serif; }
.doodle { width: 64px; height: 64px; margin-block-end: 8px; }
.step__t { font: 700 19px/1.25 var(--f-body); margin-block-end: 4px; }
.step p { font-size: 15px; color: var(--muted); }
.step .arrow { position: absolute; top: 34px; inset-inline-end: -58px; width: 70px; height: 36px; z-index: 2; }
:dir(rtl) .step .arrow { transform: scaleX(-1); }

/* cards grid */
.grid { display: grid; gap: 28px 24px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* categories */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.catc { position: relative; padding: 18px 18px 10px; background: var(--paper) repeating-linear-gradient(transparent 0 43px, #d9d2f2 43px 44px); background-position: 0 6px; box-shadow: var(--shadow); border-block-start: 10px solid var(--lime); }
.catc:nth-child(3n+2) { border-block-start-color: var(--lilac-note); } .catc:nth-child(3n) { border-block-start-color: var(--pink-soft); }
.catc__art { position: absolute; top: 10px; inset-inline-end: 10px; width: 70px; }
.catc__t { font: 700 20px/1.2 var(--f-body); padding-inline-end: 80px; }
.catc__n { font: 700 22px var(--f-hand); color: var(--muted); margin-block-end: 6px; }
.catc li a { display: flex; align-items: center; min-height: 44px; font-weight: 500; text-underline-offset: 3px; }

/* pin your design */
.mini { --r: -1.5deg; display: grid; gap: 12px; padding: 24px 22px; margin-block-end: 26px; }
.mini::before { content: ""; position: absolute; top: -11px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--pink); border: 2px solid var(--ink); }
.mini__t { font-size: 32px; }
.mini__row { display: grid; gap: 4px; border: 0; padding: 0; margin: 0; }
.mini__row > label { font-weight: 600; font-size: 15px; }
.mini__mats { display: flex; gap: 8px; }
.mini select, .money { min-height: 48px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-size: 17px; }
.mini select { padding: 0 12px; width: 100%; min-width: 0; }
.mini, .mini__row { min-width: 0; }
.money { display: flex; align-items: center; padding-inline-start: 12px; }
.money__cur { font-weight: 700; color: var(--muted); }
.money input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; padding: 0 10px; font-size: 18px; font-weight: 700; }
.money input:focus { outline: none; }
.money:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; background: var(--paper); }
.chip input:checked + span { background: var(--ink); color: var(--lime); }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.mini__min { font-size: 15px; font-weight: 600; }
.mini__min.is-err { color: var(--err); }
.mini__earn { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; padding-block-start: 10px; border-block-start: 2px dashed var(--ink); font-weight: 600; }
.mini__earn output { font: 800 clamp(24px, 7vw, 30px)/1 "Syne", var(--f-display); }
.mini__rates { font-size: 14px; color: var(--ink); opacity: .8; }

/* footer */
.foot { padding: 28px 26px 22px; background: var(--paper); box-shadow: var(--shadow); }
.foot__brand { display: flex; align-items: center; gap: 10px; font-size: 26px; margin-block-end: 18px; }
.foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.foot__h { font: 800 15px/1.2 "Syne", var(--f-display); margin-block-end: 4px; }
:lang(ar) .foot__h { font-family: Tajawal, sans-serif; }
.foot li a, .foot li .linkbtn { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.foot__small { margin-block-start: 14px; font-size: 14px; color: var(--muted); }

/* ---------- board view ---------- */
.board-only { display: none; }
.v-board .board-only { display: revert; }
.v-board .hint.board-only { display: flex; }
.v-board body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: clip; background: var(--board); }
.v-board .stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; outline: none; }
.v-board .stage.is-dragging { cursor: grabbing; }
.v-board .stage.is-dragging * { cursor: grabbing !important; }
.v-board .board { position: absolute; left: 0; top: 0; width: 3060px; height: 1960px; transform-origin: 0 0; will-change: transform;
  background: radial-gradient(circle, var(--dot) 1.15px, transparent 1.6px) 0 0 / 26px 26px; }
.v-board .zone { position: absolute; inset-inline-start: var(--x); top: var(--y); width: var(--w); }
.v-board .zone--start { --x: 80px; --y: 90px; --w: 1040px; }
.v-board .zone--how { --x: 1180px; --y: 120px; --w: 1140px; }
.v-board .zone--trust { --x: 2420px; --y: 90px; --w: 560px; }
.v-board .zone--col { --x: 80px; --y: 830px; --w: 1040px; }
.v-board .zone--trend { --x: 1220px; --y: 690px; --w: 1100px; }
.v-board .zone--cats { --x: 80px; --y: 1380px; --w: 1040px; }
.v-board .zone--pin { --x: 2420px; --y: 780px; --w: 540px; }
.v-board .zone--foot { --x: 2420px; --y: 1580px; --w: 560px; }
.v-board .zone--trend .grid--4 { gap: 34px 26px; }

.dock { position: fixed; z-index: 15; bottom: calc(16px + env(safe-area-inset-bottom)); inset-inline-end: 16px; width: 236px; padding: 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 6px 0 var(--ink); }
.mm { position: relative; width: 100%; height: 130px; background: var(--board); border-radius: 6px; overflow: hidden; cursor: pointer; direction: ltr; }
.mm__z { position: absolute; background: var(--dot); border-radius: 1px; }
.mm__z--collection, .mm__z--trending { background: var(--muted); }
.mm__z--pin { background: #8fae15; }
.mm__view { position: absolute; border: 2px solid var(--ink); background: color-mix(in srgb, var(--lime) 40%, transparent); border-radius: 2px; pointer-events: none; }
.dock__zoom { position: relative; display: flex; gap: 6px; margin-block-start: 8px; }
.dock__zoom .iconbtn { border-color: var(--ink); min-width: 44px; }
.dock__menu { flex: 1; }
.dock__menu summary { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; border: 2px solid var(--ink); border-radius: 10px; background: var(--lime); font-weight: 700; font-size: 15px; cursor: pointer; list-style: none; white-space: nowrap; }
.dock__menu summary::-webkit-details-marker { display: none; }
.dock__menu[open] summary { background: var(--ink); color: var(--lime); }
.dock__zones { position: absolute; bottom: calc(100% + 10px); inset-inline: -10px; display: grid; padding: 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 0 5px 0 var(--ink); }
.dock__zones a { display: flex; align-items: center; min-height: 44px; padding-inline: 10px; font-weight: 600; font-size: 16px; text-decoration: none; border-radius: 8px; }
.dock__zones a:hover { background: var(--lime); }
@media (max-width: 699px) {
  .dock { width: 236px; padding: 8px; inset-inline-end: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .mm { display: none; }
  .dock__zoom { gap: 4px; margin: 0; }
  .dock__zoom .iconbtn { min-width: 44px; padding: 0; }
}

/* ---------- list view ---------- */
.v-list .board { padding: 34px 16px 40px; }
.v-list .zone { max-width: 1160px; margin: 0 auto 72px; scroll-margin-top: 24px; }
.v-list .zone--foot { margin-block-end: 0; }
@media (max-width: 1100px) {
  .v-list .grid--4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .v-list .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-list .step .arrow { display: none; }
  .v-list .cats { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 899px) {
  .v-list .zone--start { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .v-list .start__art { max-width: 380px; }
  .v-list .zone--pin { display: grid; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 699px) {
  body { font-size: 16px; }
  .v-list .board { padding-block-start: 22px; }
  .v-list .zone { margin-block-end: 56px; }
  .display { font-size: clamp(34px, 11.4vw, 46px); }
  :lang(ar) .display { font-size: 42px; }
  .zone__h { font-size: 32px; }
  .lede { font-size: 18px; }
  .zone__note { position: static; display: inline-block; margin-block-start: 8px; font-size: 23px; }
  .v-list .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .card { padding: 12px 10px 10px; }
  .card__art { padding: 4px; }
  .card__n { font-size: 15px; }
  .card__note { font-size: 20px; top: 10px; inset-inline-end: 6px; }
  .card__foot { flex-direction: column; align-items: stretch; }
  .add { justify-content: center; }
  .v-list .steps { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctas .btn { flex: 1 1 auto; }
}


/* ---------- inner pages: sheets pinned on the board ---------- */
.desk { max-width: 1240px; margin: 0 auto; padding: 22px 16px 64px; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; margin-block-end: 22px; color: var(--muted); }
.crumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; }
.crumb [aria-current] { color: var(--ink); }
.sheet, .psheet { position: relative; background: var(--paper); box-shadow: var(--shadow); }
.psheet { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; padding: 34px; transform: rotate(-.4deg); }
.psheet__tape { position: absolute; top: -14px; inset-inline-start: 40px; width: 120px; height: 30px; background: color-mix(in srgb, var(--lime) 80%, transparent); transform: rotate(-4deg); }
.psheet::after { content: ""; position: absolute; top: -14px; inset-inline-end: 40px; width: 110px; height: 30px; background: color-mix(in srgb, var(--lime) 80%, transparent); transform: rotate(5deg); }
.pfoot { max-width: 1240px; margin: 0 auto; padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); border-block-start: 2px solid var(--ink); }
.pfoot .foot__brand { margin-block-end: 6px; }

/* product viewer */
.pv { position: relative; min-width: 0; }
.v3d { position: relative; aspect-ratio: 1 / 1.02; max-height: 640px; width: 100%; background: var(--board) radial-gradient(circle, var(--dot) 1.15px, transparent 1.6px) 0 0 / 22px 22px; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.v3d__host { position: absolute; inset: 0; outline: none; touch-action: pan-y; }
.v3d__host:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; box-shadow: inset 0 0 0 8px var(--lime); }
.v3d__host canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity .4s; }
.v3d.is-live .v3d__host canvas { opacity: 1; }
.v3d__poster { position: absolute; inset: 14% 18%; display: grid; place-items: center; transition: opacity .4s; }
.v3d.is-live .v3d__poster { opacity: 0; }
.v3d.is-drawn .v3d__poster { inset: 10% 14%; }
.v3d .ink .f { opacity: .85; }
.v3d__toast { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 6px 12px; background: var(--ink); color: var(--lime); border-radius: 8px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap; }
.v3d__toast.is-on { opacity: 1; }
.v3d__fail { position: absolute; bottom: 12px; inset-inline: 12px; text-align: center; font-size: 14px; background: var(--paper); padding: 6px; }
.v3d__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-start: 10px; }
.v3d__hint { font-size: 24px; }
.v3d__ctrls { display: flex; gap: 6px; }
.v3d__ctrls .iconbtn { border-color: var(--ink); background: var(--paper); }
.v3d__ctrls [aria-pressed="true"] { background: var(--lime); }
.anns { position: absolute; inset: 0; pointer-events: none; }
.ann { position: absolute; display: flex; align-items: flex-start; gap: 2px; max-width: 46%; font-size: 25px; line-height: 1.05; }
:lang(ar) .ann { font-size: 21px; line-height: 1.5; }
.ann span { background: color-mix(in srgb, var(--paper) 80%, transparent); padding: 0 4px; border-radius: 3px; }
.ann .arrow { width: 54px; height: 36px; flex: none; margin-block-start: 8px; }
:dir(rtl) .ann .arrow { transform: scaleX(-1); }
.ann--1 { top: 14px; inset-inline-start: 14px; }
.ann--2 { top: 24%; max-width: 34%; inset-inline-end: 12px; flex-direction: row; text-align: end; }
.ann--3 { bottom: 14px; inset-inline-start: 14px; align-items: flex-end; }
.ann--3 .arrow, .ann--4 .arrow { margin: 0 0 14px; }
.ann--4 { bottom: 14px; inset-inline-end: 14px; align-items: flex-end; text-align: end; }
.v3d.is-live .ann { transition: opacity .3s; }

/* buy box */
.buy { display: flex; flex-direction: column; gap: 14px; min-width: 0; align-self: start; }
.buy__lane { font-size: 26px; transform: rotate(-2deg); align-self: flex-start; padding: 0 8px; background: var(--lime-soft); }
.buy__name { font: 800 44px/1.02 "Syne", var(--f-display); letter-spacing: -.02em; }
.buy__maker { color: var(--muted); font-size: 16px; }
.buy__price { display: flex; align-items: center; gap: 14px; }
.pr--hero .pr__now { font-size: 34px; }
.pr--hero .pr__was { font-size: 18px; }
.tag--inline { position: static; }
.buy__mat { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.buy__colors { border: 0; padding: 0; margin: 0; }
.buy__colors legend { padding: 0; margin-block-end: 8px; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; display: inline-flex; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch__c { position: absolute; inset-inline-start: 8px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); pointer-events: none; }
.swatch__n { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px 0 42px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; font-size: 15px; background: var(--paper); }
:dir(rtl) .swatch__n { padding: 0 42px 0 14px; }
.swatch input:checked ~ .swatch__n { background: var(--lime); box-shadow: 0 3px 0 var(--ink); }
.swatch input:focus-visible ~ .swatch__n { outline: 3px solid var(--ink); outline-offset: 3px; }
.pod { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.buy__row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.buy__add { flex: 1; min-width: 180px; }
.buy__add.is-done { background: var(--lime); color: var(--ink); }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.stepper button { display: grid; place-items: center; width: 46px; height: 46px; border: 0; background: none; cursor: pointer; border-radius: 10px; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output, .stepper .num { min-width: 30px; text-align: center; font-weight: 700; font-size: 18px; }
.rv-note { margin-block-start: -6px; font-size: 14px; color: var(--muted); text-align: center; }

.pinrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-block: 50px 64px; }
.pinrow .note h2.hand { font-size: 30px; margin-block-end: 8px; }
.pinrow .about { --r: 1deg; } .pinrow .specs { --r: -1.2deg; } .pinrow .matnote { --r: .6deg; }
.pinrow .note p + p { margin-block-start: 8px; }
.specs dl div { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-block-end: 1.5px dashed var(--ink); }
.specs dt { font-weight: 600; }
.morepins .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 979px) {
  .psheet { grid-template-columns: minmax(0, 1fr); padding: 26px 16px 22px; gap: 24px; transform: none; }
  .pinrow { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .morepins .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
}
@media (max-width: 699px) {
  .desk { padding-block-start: 10px; }
  .crumb { margin-block-end: 12px; }
  .buy__name { font-size: 32px; }
  .ann { font-size: 21px; max-width: 48%; }
  .ann .arrow { width: 36px; height: 26px; }
  .ann--2 { top: 12px; max-width: 44%; }
  .ann--2 .arrow { display: none; }
  .ann--1 { max-width: 48%; }
}


/* ---------- sell ---------- */
.pitch { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; padding-block: 26px 40px; }
.slot { position: relative; display: grid; justify-items: center; gap: 8px; padding: 26px 20px 22px; border: 2.5px dashed var(--ink); border-radius: 6px; transform: rotate(3deg); background: color-mix(in srgb, var(--paper) 45%, transparent); }
.slot .card__fix { top: -11px; }
.slot__art { width: 70%; opacity: .5; }
.slot__t { font-size: 28px; text-align: center; }
.pitch__txt { max-width: 52rem; }
.display--sell { font-size: 68px; }
.nos { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-block-end: 28px; }
.nos li { position: relative; font: 700 30px/1.2 var(--f-hand); padding-inline: 4px; }
.nos li::after { content: ""; position: absolute; inset-inline: -4px; top: 52%; height: 4px; background: var(--pink); border-radius: 2px; transform: rotate(-3deg); }
.sixsteps { margin-block: 30px 70px; }
.steps--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 56px; }
.steps--6 .step:nth-child(3) .arrow { display: none; }
.steps--6 .step:nth-child(n+5) { background: var(--lime-soft); }
.calcwrap { margin-block-end: 70px; scroll-margin-top: 16px; }
.calcgrid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.sketch { position: relative; display: grid; gap: 26px; padding: 34px 30px 30px 54px; background: var(--paper) repeating-linear-gradient(transparent 0 31px, #ddd6f4 31px 32px); box-shadow: var(--shadow); }
:dir(rtl) .sketch { padding: 34px 54px 30px 30px; }
.sketch::before { content: ""; position: absolute; inset-block: 18px; inset-inline-start: 14px; width: 18px; background: radial-gradient(circle at 50% 50%, var(--board) 5px, var(--ink) 5.5px, var(--ink) 7px, transparent 7.5px) 0 0 / 18px 30px repeat-y; }
.sketch__rates { position: absolute; top: 10px; inset-inline-end: 18px; font-size: 22px; transform: rotate(3deg); padding: 0 8px; background: var(--lime); }
.sketch__q { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.sketch__q legend, .sketch__l { display: flex; align-items: center; gap: 10px; padding: 0; margin-block-end: 10px; font: 700 20px/1.2 var(--f-body); }
.sketch__n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--lime); font: 800 17px/1 "Syne", sans-serif; flex: none; }
.drop { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px dashed var(--ink); border-radius: 12px; background: color-mix(in srgb, var(--board) 50%, transparent); }
.drop > span { display: grid; font-size: 15px; }
.files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fopt { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); cursor: pointer; min-height: 64px; }
.fopt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fopt__art { width: 50px; flex: none; }
.fopt__t { display: grid; font-weight: 600; font-size: 15px; line-height: 1.25; min-width: 0; }
.fopt__t small { font-weight: 400; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.fopt:has(input:checked) { background: var(--lime); box-shadow: 0 4px 0 var(--ink); }
.fopt:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.est { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; font-weight: 500; }
.est__ico .ico { width: 22px; height: 22px; }
.matopts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.matopt { position: relative; display: flex; }
.matopt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.matopt > span { flex: 1; display: grid; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.matopt b { font: 800 20px/1.1 "Syne", sans-serif; }
.matopt small { font-size: 14px; color: var(--muted); }
.matopt input:checked + span { background: var(--lime); box-shadow: 0 4px 0 var(--ink); }
.matopt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.sketch .linkbtn { justify-self: start; font-size: 15px; }
.money--big { min-height: 56px; max-width: 280px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.money--big input { font-size: 24px; height: 52px; }
.is-err .money--big { border-color: var(--err); box-shadow: 0 0 0 3px var(--pink-soft); }
.sketch__help { font-size: 14px; color: var(--muted); }
.perr { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--err); font-weight: 600; font-size: 15px; }
.perr__fix { min-height: 44px; padding: 0 14px; font-size: 15px; box-shadow: 0 3px 0 var(--ink); color: var(--ink); }
.receipt h3 { font-size: 26px; margin-block-end: 6px; }
.receipt dl div, .sumrows div { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; font-size: 15px; }
.receipt dt small { display: block; color: var(--muted); font-size: 13px; }
.receipt dd { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.receipt .is-total { border-block: 2px solid var(--ink); font-weight: 700; margin-block: 4px; }
.receipt .is-dim { color: var(--muted); }
.receipt .is-earn { background: var(--lime); padding-inline: 8px; font-weight: 700; }
.preview { position: sticky; top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.preview__t { font-size: 28px; }
.preview__card { max-width: 280px; justify-self: center; width: 100%; transition: transform .25s, opacity .25s; }
.preview__card.is-unpinned { opacity: .55; transform: rotate(-6deg) translateY(8px); border-style: dashed; }
.preview__card.is-unpinned .card__fix { display: none; }
.earn { display: grid; justify-items: center; gap: 2px; padding: 16px; background: var(--ink); color: var(--paper); border-radius: 12px; text-align: center; }
.earn b { font: 800 clamp(28px, 8vw, 40px)/1.05 "Syne", var(--f-display); color: var(--lime); }
.earn.is-err b { color: var(--pink-soft); font-size: 26px; }
.earn small { font-size: 14px; }
.preview__note { font-size: 15px; text-align: center; }
.hownote { --r: 1.2deg; }
.hownote h3 { font-size: 26px; }
.hownote p { font-size: 15px; }
.guide { margin-block-end: 64px; scroll-margin-top: 16px; }
.guide__sheet { padding: 26px; overflow-x: auto; }
.mg { width: 100%; border-collapse: collapse; font-size: 15px; }
.mg th, .mg td { padding: 12px 14px; text-align: start; vertical-align: top; border-block-end: 1.5px solid #d6cfec; }
.mg thead th { border-block-end: 2px solid var(--ink); }
.mg tbody th { font-weight: 700; width: 22%; }
.mg__after { display: grid; gap: 8px; margin-block-start: 18px; font-size: 15px; }
.mg__after .hand { font-size: 24px; }
.rulesrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 34px; }
.rules { --r: -.8deg; }
.rules h2.hand { font-size: 32px; margin-block-end: 8px; }
.rules__h { font: 700 17px var(--f-body); margin-block: 16px 6px; }
.banned li { display: flex; gap: 10px; align-items: baseline; padding-block: 4px; font-weight: 500; }
.banned li::before { content: ""; flex: none; width: 14px; height: 14px; border: 2.5px solid var(--ink); border-radius: 50%; background: linear-gradient(45deg, transparent 44%, var(--ink) 44% 56%, transparent 56%); transform: translateY(2px); }
.scta { --r: 1deg; display: grid; gap: 14px; align-content: start; }
.scta .zone__h { font-size: 34px; }
@media (max-width: 979px) {
  .calcgrid, .rulesrow { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
  .steps--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 30px; }
  .steps--6 .arrow { display: none; }
}
@media (max-width: 699px) {
  .display--sell { font-size: clamp(30px, 9.6vw, 42px); }
  .pitch { grid-template-columns: minmax(0, 1fr); }
  .slot { display: none; }
  .nos li { font-size: 26px; }
  .steps--6 { grid-template-columns: minmax(0, 1fr); }
  .sketch { padding: 30px 16px 22px 40px; }
  :dir(rtl) .sketch { padding: 30px 40px 22px 16px; }
  .sketch::before { inset-inline-start: 8px; width: 16px; background-size: 16px 30px; }
  .files { grid-template-columns: minmax(0, 1fr); }
  .guide__sheet { padding: 8px; }
  .mg, .mg tbody, .mg tr, .mg th, .mg td { display: block; width: auto; }
  .mg thead { display: none; }
  .mg tr { padding-block: 10px; border-block-end: 1.5px solid #d6cfec; }
  .mg tbody th { width: auto; padding: 0 6px 4px; border: 0; }
  .mg td { padding: 2px 6px; border: 0; }
  .mg td::before { font-weight: 800; font-family: "Syne", sans-serif; margin-inline-end: 6px; }
  .mg td:nth-of-type(1)::before { content: "PLA"; }
  .mg td:nth-of-type(2)::before { content: "PETG"; }
}


/* ---------- cart and checkout: clean paper sheets on the board ---------- */
.cartgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 34px; align-items: start; }
.cartmain { display: grid; gap: 34px; min-width: 0; }
.cartsheet, .ck-sec, .sum, .empty, .done__main { padding: 30px 28px; }
.pagetitle { font: 800 40px/1.05 var(--f-display); letter-spacing: -.02em; outline: none; }
:lang(ar) .pagetitle { font-weight: 400; letter-spacing: 0; line-height: 1.35; }
.pagesub { color: var(--muted); font-size: 16px; margin-block-start: 6px; }
.lines { margin-block-start: 18px; border-block-start: 2px solid var(--ink); }
.line { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; grid-template-areas: "art info price" "art ctrl ctrl"; gap: 6px 16px; padding-block: 18px; border-block-end: 1.5px dashed var(--ink); }
.line.is-new { animation: flash 1s; }
@keyframes flash { from { background: var(--lime); } }
.line__art .f, .ckl__art .f { opacity: .7; }
.line__art { grid-area: art; width: 92px; padding: 4px; background: var(--board); border-radius: 6px; align-self: start; }
.line__info { grid-area: info; min-width: 0; }
.line__n { font: 600 17px/1.3 var(--f-body); }
.line__n a { display: inline-block; padding-block: 2px; text-decoration: none; }
.line__n a:hover { text-decoration: underline; }
.line__by { font-size: 15px; color: var(--muted); }
.line__spec { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: 6px; font-size: 15px; }
.line__col { display: inline-flex; align-items: center; gap: 6px; }
.line__sw { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-block; flex: none; }
.line__price { grid-area: price; display: grid; justify-items: end; text-align: end; }
.line__each { font-size: 13px; color: var(--muted); }
.line__ctrl { grid-area: ctrl; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.line__rm { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 0; background: none; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; border-radius: 8px; }
.line__rm:hover { background: var(--pink-soft); }
.line__rm .ico { width: 20px; height: 20px; }
.stepper .ico { width: 20px; height: 20px; }
.sum { position: sticky; top: 16px; display: grid; gap: 14px; }
.sum__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sum__t { font-size: 32px; }
.sumrows { border-block-start: 2px solid var(--ink); }
.sumrows div { border-block-end: 1px solid #ddd6f4; }
.sumrows dt small { display: block; color: var(--muted); font-size: 13px; }
.sumrows dd { font-weight: 600; text-align: end; }
.sumrows .is-save dd { color: #8a0b45; }
.sumrows .is-total { border-block-end: 2px solid var(--ink); font-size: 18px; font-weight: 700; }
.sumrows .is-total dd { font: 800 22px/1.2 "Syne", var(--f-display); }
:lang(ar) .sumrows .is-total dd { font-family: Tajawal, sans-serif; }
.rates { font-size: 13px; color: var(--muted); font-weight: 500; }
.sum__note { font-size: 15px; color: var(--muted); }
.sum__more { justify-self: center; }
.sum__trust { display: grid; gap: 8px; font-size: 15px; padding-block-start: 12px; border-block-start: 1.5px dashed var(--ink); }
.nextnote { --r: -.8deg; }
.nextnote h2.hand { font-size: 30px; margin-block-end: 8px; }
.next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: n; }
.next li { display: grid; gap: 2px; align-content: start; font-size: 15px; counter-increment: n; }
.next li::before { content: counter(n); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--lime); font: 800 14px/1 "Syne", sans-serif; margin-block-end: 4px; }
.next li .ico { display: none; }
.next li > span { display: grid; }
.next b { font-weight: 700; }
.emptyboard { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.empty { display: grid; gap: 14px; justify-items: start; }
.empty__pins { display: flex; gap: 10px; opacity: .45; }
.empty__pins .ink { width: 90px; }
.empty__note { font-size: 26px; }
.emptyboard .next { grid-template-columns: minmax(0, 1fr); }

/* checkout */
.ck-top { padding-block: 26px 22px; }
.ck-sec { display: grid; gap: 16px; }
.ck-h { display: flex; align-items: center; gap: 10px; font: 700 22px/1.2 var(--f-body); }
.err { display: flex; gap: 8px; align-items: flex-start; padding: 12px 16px; background: var(--pink-soft); border: 2px solid var(--err); border-radius: 10px; color: var(--err); font-weight: 600; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld__label { font-weight: 600; font-size: 16px; }
.fld__opt { font-weight: 400; color: var(--muted); }
.fld__in { width: 100%; min-height: 50px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-size: 17px; }
.fld__in:focus { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 7px var(--lime); }
.fld__ta { padding-block: 12px; min-height: 84px; resize: vertical; }
.fld__sel { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 20px; }
:dir(rtl) .fld__sel { background-position: left 12px center; }
.fld__box { display: flex; align-items: stretch; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); }
.fld__box .fld__in { border: 0; min-height: 46px; border-radius: 0 8px 8px 0; }
.fld__box:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 7px var(--lime); }
.fld__box .fld__in:focus { outline: none; box-shadow: none; }
.fld__pre { display: grid; place-items: center; padding: 0 12px; font-weight: 700; background: var(--board); border-inline-end: 2px solid var(--ink); border-radius: 8px 0 0 8px; }
.fld__help { font-size: 14px; color: var(--muted); }
.fld__err { display: flex; gap: 6px; align-items: flex-start; color: var(--err); font-weight: 600; font-size: 15px; }
.fld__err .ico, .err .ico { width: 20px; height: 20px; flex: none; margin-block-start: 1px; }
.fld.is-err .fld__in, .fld.is-err .fld__box { border-color: var(--err); }
.fld-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.paynote { padding: 12px 14px; background: var(--lime-soft); border-radius: 8px; font-size: 15px; }
.ck-check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; font-size: 16px; cursor: pointer; }
.ck-check input { width: 26px; height: 26px; margin: 0; flex: none; accent-color: var(--ink); }
.ck-check a { font-weight: 600; }
.ck-lines { display: grid; gap: 10px; }
.ckl { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.ckl__art { width: 52px; padding: 2px; background: var(--board); border-radius: 6px; }
.ckl__txt { display: grid; min-width: 0; }
.ckl__name { font-weight: 600; font-size: 15px; text-decoration: none; padding-block: 2px; }
.ckl__meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ckl__price .pr__now { font-size: 16px; }
.ck-go { min-height: 56px; }
.done { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; align-items: start; }
.done__main { grid-column: 1 / -1; display: grid; gap: 12px; justify-items: start; }
.done__num { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.done__num b { font: 800 40px/1 "Syne", sans-serif; background: var(--lime); padding: 4px 12px; }
.done address { font-style: normal; line-height: 1.7; }
.done .sum { position: static; }
.done__act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block-start: 14px; }
@media (max-width: 979px) {
  .cartgrid, .emptyboard { grid-template-columns: minmax(0, 1fr); }
  .sum { position: static; }
}
@media (max-width: 699px) {
  .cartsheet, .ck-sec, .sum, .empty, .done__main { padding: 22px 16px; }
  .pagetitle { font-size: 30px; }
  .line { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "art info" "art price" "ctrl ctrl"; }
  .line__art { width: 72px; }
  .line__price { justify-items: start; text-align: start; }
  .next { grid-template-columns: minmax(0, 1fr); }
  .fld-row { grid-template-columns: minmax(0, 1fr); }
  .done { grid-template-columns: minmax(0, 1fr); }
  .done__num b { font-size: 30px; }
}

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 60; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 420px; width: 100%; padding: 10px 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 0 5px 0 var(--ink);
  opacity: 0; transform: translateY(14px) rotate(-1deg); transition: opacity .2s, transform .25s; }
.toast.is-on { opacity: 1; transform: none; }
.toast__art { width: 52px; flex: none; }
.toast__txt { display: grid; flex: 1; font-size: 15px; }
.toast__txt span { color: var(--muted); }
.toast__undo { min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--lime); font-weight: 700; cursor: pointer; }

/* ---------- search dialog ---------- */
.dlg { border: 0; padding: 0; background: none; max-width: min(640px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 40px); margin: 20px auto auto; }
.dlg::backdrop { background: rgba(30, 20, 70, .45); }
.dlg__in { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; max-height: calc(100dvh - 44px); }
.dlg__h { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-block-end: 2px solid var(--ink); }
.dlg__h input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; font-size: 18px; }
.dlg__h input:focus { outline: none; }
.dlg__b { overflow: auto; padding: 12px 14px 16px; }
.sres__n { font-weight: 600; color: var(--muted); margin-block-end: 8px; }
.srow { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none; }
.srow:hover { background: var(--lime-soft); }
.srow__art { width: 56px; flex: none; }
.srow > span:nth-child(2) { flex: 1; display: grid; }
.srow small { color: var(--muted); font-size: 14px; }

/* ---------- reduced motion ---------- */
.rm *, .rm *::before, .rm *::after { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
