/* The shop, the storefronts, the creation pages, the orders and the feed's chrome: one sheet over the site's tokens
   (cream paper, ink pills, orange accent, Outfit headlines; /styles.css defines them). Also the classes the shared
   client (/lib/maker.js) uses for its sign-in sheet, toasts and buttons. */
:root {
  --paper: #f1ece4; --paper-2: #e9e2d6; --ink: #141414; --muted: #5e5a55; --line: rgba(20,20,20,.12);
  --orange: #ff6a2b; --cobalt: #4a6cf0; --yellow: #ffd23f; --pink: #ffb6e1; --mint: #8af5dc; --green: #1f9d6b;
  --card: #fff; --r: 20px;
  --head: "Outfit", "Figtree", system-ui, sans-serif; --sans: "Figtree", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(20,20,20,.06), 0 10px 30px rgba(20,20,20,.08);
}
*, *::before, *::after { box-sizing: border-box; }
body.cx { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.cx h1, .cx h2, .cx h3 { font-family: var(--head); letter-spacing: -.02em; line-height: 1.05; margin: 0; }
:where(.cx) a { color: inherit; }
:where(.cx) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.cx :focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 14px; } .tiny { font-size: 12.5px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; } .grow { flex: 1 1 auto; min-width: 0; }
.link { text-decoration: underline; text-underline-offset: .18em; }

/* header */
.cx-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); }
.cx-top .logo img { display: block; height: 36px; width: auto; }
.cx-top nav { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.cx-top nav a, .cx-top nav button { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 14.5px; text-decoration: none; border: 0; background: transparent; cursor: pointer; white-space: nowrap; }
.cx-top nav [hidden] { display: none; }
.cx-top nav a:hover, .cx-top nav button:hover, .cx-top nav [aria-current="page"] { background: #fff; }
.cx-top nav .cart b { min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; }
.cx-top nav .me { background: var(--ink); color: var(--paper); }
.cx-top nav .me:hover { background: var(--orange); }
@media (max-width: 760px) {
  .cx-top { flex-wrap: wrap; row-gap: 4px; }
  .cx-top nav { width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .cx-top nav::-webkit-scrollbar { display: none; }
  .cx-top nav a, .cx-top nav button { padding: 0 12px; }
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 8px clamp(16px, 3vw, 32px) 80px; }
.page-head { display: grid; gap: 10px; margin: 18px 0 22px; }
.page-head h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 800; }
.page-head .accent { color: var(--orange); }
.lead { font-size: clamp(16px, 1.6vw, 18px); margin: 0; max-width: 62ch; }

/* buttons, fields, chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.3); transition: transform .12s, background .15s, box-shadow .12s; }
.btn:hover { background: var(--orange); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; background: var(--ink); }
.btn.secondary { background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(20,20,20,.12); }
.btn.secondary:hover { background: var(--yellow); }
.btn.ghost { background: transparent; color: inherit; box-shadow: none; }
.btn.ghost:hover { background: rgba(20,20,20,.06); }
.btn.accent { background: var(--orange); color: #fff; } .btn.accent:hover { background: var(--ink); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn.big { min-height: 56px; padding: 0 28px; font-size: 16.5px; }
.btn.full { width: 100%; }
.btn.icon { width: 44px; padding: 0; }
.btn svg { width: 20px; height: 20px; flex: none; }
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 14px; font-weight: 700; }
.hint { font-size: 13px; color: var(--muted); }
.input, .textarea, .select { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 16px; }
.textarea { resize: vertical; min-height: 96px; }
.grid2 { display: grid; gap: 12px; } @media (min-width: 600px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; border: 0; background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: #fff; white-space: nowrap; }
.badge.concept { background: #dfe7ff; } .badge.engineering { background: #ffe7b3; } .badge.validated { background: #c9f2df; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.notice { display: flex; gap: 10px; padding: 14px 16px; border-radius: 16px; background: #fff; font-size: 14px; align-items: flex-start; }
.notice svg { flex: none; width: 20px; height: 20px; }
.notice.warn { background: #fff1d6; } .notice.good { background: #dbf6ea; }
.empty { padding: 44px 24px; border-radius: var(--r); background: #fff; text-align: center; }
.empty h3 { font-size: 22px; } .empty p { color: var(--muted); margin: 8px auto 20px; max-width: 46ch; }
.card { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: cx-spin .7s linear infinite; }
@keyframes cx-spin { to { transform: rotate(360deg); } }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; background: var(--yellow); color: var(--ink); flex: none; }
.avatar.xl { width: 96px; height: 96px; font-size: 40px; font-family: var(--head); }
.creator-chip { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; min-height: 44px; }

/* the product grid */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.tile { display: grid; background: #fff; border-radius: var(--r); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .18s; }
.tile:hover { transform: translateY(-3px) rotate(-.4deg); }
.tile .pic { aspect-ratio: 1; background: var(--paper-2); overflow: hidden; position: relative; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .meta { padding: 12px 14px 14px; display: grid; gap: 4px; }
.tile h3 { font-size: 18px; font-weight: 800; }
.tile .by { font-size: 13.5px; color: var(--muted); }
.tile .price { font-family: var(--head); font-weight: 800; font-size: 17px; }
.placeholder-pic { width: 100%; height: 100%; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--muted); font-weight: 700; }
.search { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 999px; padding: 4px 4px 4px 18px; box-shadow: var(--shadow); max-width: 560px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 44px; font-size: 16px; outline: none; }

/* a creation or product page */
.product { display: grid; gap: 28px; }
@media (min-width: 900px) { .product { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: start; } }
.product > * { min-width: 0; }
.strip-wrap { position: relative; }
.strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; scrollbar-width: none; border-radius: 28px; }
.strip::-webkit-scrollbar { display: none; }
.strip > * { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1; background: #fff; overflow: hidden; display: grid; place-items: center; border-radius: 28px; }
.strip img, .strip video, .strip model-viewer { width: 100%; height: 100%; object-fit: contain; display: block; }
.strip-dots { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.strip-dots button { width: 28px; height: 28px; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.strip-dots button::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(20,20,20,.25); }
.strip-dots button[aria-current="true"]::after { background: var(--ink); }
.buybox h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; }
.offer { background: #fff; border-radius: var(--r); padding: 16px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.offer.focus { outline: 3px solid var(--orange); }
.variants { display: flex; gap: 8px; flex-wrap: wrap; }
.variants button { min-height: 44px; padding: 6px 16px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; text-align: left; }
.variants button[aria-pressed="true"] { border-color: var(--ink); background: var(--paper); }
.price-big { font-family: var(--head); font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.qty { display: inline-flex; align-items: center; background: var(--paper); border-radius: 999px; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; font-weight: 800; cursor: pointer; border-radius: 50%; }
.qty b { min-width: 28px; text-align: center; }
details.panel { background: #fff; border-radius: 16px; margin-top: 8px; }
details.panel summary { min-height: 52px; display: flex; align-items: center; padding: 0 16px; font-weight: 800; cursor: pointer; list-style: none; }
details.panel summary::-webkit-details-marker { display: none; }
details.panel summary::after { content: "+"; margin-left: auto; font-size: 20px; }
details.panel[open] summary::after { content: "–"; }
details.panel .body { padding: 0 16px 16px; font-size: 15px; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.specs dt { font-weight: 700; } .specs dd { margin: 0; }
.parts { list-style: none; margin: 0; padding: 0; }
.parts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.parts li:first-child { border-top: 0; }

/* lists, orders */
.list { display: grid; gap: 8px; }
.list > a, .list > div { display: flex; gap: 12px; align-items: center; padding: 10px; background: #fff; border-radius: 16px; text-decoration: none; min-height: 64px; }
.list img, .list .ph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--paper-2); flex: none; }
.list svg { width: 20px; height: 20px; flex: none; } .list .avatar svg { width: 18px; height: 18px; }
.list .t { font-weight: 800; } .list .s { font-size: 13.5px; color: var(--muted); }
.kv { display: grid; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.kv > div:first-child { border-top: 0; }
.kv > div > span:first-child { color: var(--muted); }
.progress { height: 8px; background: #fff; border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--orange); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 14px; }
.timeline .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); }
.timeline .done .dot { background: var(--ink); color: var(--paper); }
.timeline .dot svg { width: 14px; height: 14px; }
.timeline .now .dot { background: var(--orange); }
.timeline .todo .t { color: var(--muted); }
.timeline .t { font-weight: 700; } .timeline .when { font-size: 13px; color: var(--muted); }
.two { display: grid; gap: 24px; } @media (min-width: 900px) { .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

/* the store manager */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; background: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat { background: #fff; border-radius: 16px; padding: 14px 16px; }
.stat .n { font-family: var(--head); font-size: 28px; font-weight: 800; } .stat .l { color: var(--muted); font-size: 13.5px; }
.kind-pick { display: grid; gap: 8px; }
.kind-pick label { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--paper); cursor: pointer; min-height: 44px; }
.vrow { display: grid; grid-template-columns: 1fr 120px 44px; gap: 8px; align-items: end; }

/* the shared client's sheet, toast */
.scrim { position: fixed; inset: 0; background: rgba(20,20,20,.38); z-index: 90; }
.sheet-dialog { position: fixed; z-index: 91; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: 28px 28px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0,0,0,.25); }
@media (min-width: 700px) { .sheet-dialog { top: 50%; bottom: auto; transform: translate(-50%, -50%); border-radius: 28px; } }
.sheet-dialog h2 { font-size: 26px; font-weight: 800; padding-right: 48px; }
.sheet-dialog .grab { width: 44px; height: 5px; border-radius: 9px; background: rgba(20,20,20,.18); margin: -8px auto 12px; }
.sheet-dialog .close { position: absolute; top: 12px; right: 12px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; }
.seg button { border: 0; background: transparent; min-height: 44px; border-radius: 999px; font-weight: 700; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 99; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }

/* the cart drawer */
.drawer { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgba(20,20,20,.35); }
.drawer[hidden] { display: none; }
.drawer .panel { width: min(440px, 100%); height: 100%; background: var(--paper); display: grid; grid-template-rows: auto 1fr auto; box-shadow: -20px 0 60px rgba(0,0,0,.2); }
.drawer .bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.drawer .bar b { font-family: var(--head); font-size: 22px; }
.drawer .lines { overflow-y: auto; padding: 0 16px; display: grid; gap: 8px; align-content: start; }
.drawer .line { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; background: #fff; border-radius: 16px; padding: 8px; }
.drawer .line img, .drawer .line .ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--paper-2); }
.drawer .foot { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 10px; border-top: 1px solid var(--line); }
.drawer .total { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; }

/* social */
.nets { display: grid; gap: 8px; }
.net { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px 12px; min-height: 60px; }
.net .name { font-weight: 800; } .net .st { font-size: 13px; color: var(--muted); }
.pick-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pick-media button { aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 3px solid transparent; padding: 0; background: var(--paper-2); cursor: pointer; position: relative; }
.pick-media button[aria-pressed="true"] { border-color: var(--orange); }
.pick-media img, .pick-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-media .kind { position: absolute; left: 4px; bottom: 4px; background: rgba(20,20,20,.7); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 999px; }

.cx-foot { max-width: 1160px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 40px; color: var(--muted); font-size: 13.5px; display: flex; gap: 16px; flex-wrap: wrap; }
.cx-foot a { min-height: 44px; display: inline-flex; align-items: center; }
.track { display: grid; gap: 18px; max-width: 760px; margin: 18px auto 0; }
#ps-direct[hidden] { display: none; }
