/* The seller's page (web/seller.html, seller.js): the way in, opening a shop, and the shop itself — products,
   a file from a marketplace, orders, payments, connections, settings. The colours and type are base.css's. */

.sc {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 36px) max(var(--gutter), env(safe-area-inset-right, 0px)) clamp(44px, 7vw, 88px) max(var(--gutter), env(safe-area-inset-left, 0px));
}
.sc[aria-busy="true"] > :not(.sc-wait) { visibility: hidden; }
.sc-wait { margin: 80px 0; text-align: center; color: var(--muted); }
.sc a { color: var(--brand-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sc-h1 { margin: 0; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -0.052em; font-weight: 670; color: var(--ink); text-wrap: balance; }
.sc-h2 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -0.035em; font-weight: 660; color: var(--ink); }
.sc-h3 { margin: 0; font-size: 17px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 640; color: var(--ink); }
.sc-lead { margin: 0; max-width: 36em; font-size: clamp(16.5px, 1.6vw, 19px); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.sc-sub { margin: 4px 0 0; max-width: 62ch; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.sc-fine { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.sc-note { margin: 14px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.sc-gap { margin-top: 28px; }
.sc-flex { flex: 1; }
.sc-mono { font-family: var(--font-mono); font-size: 14px; }

/* buttons and fields */
.sc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  font: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.2;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.sc a.sc-btn { color: var(--ink); }
.sc-btn:hover { border-color: var(--brand-line); }
.sc-btn:active { transform: translateY(1px); }
.sc-btn:focus-visible, .sc-input:focus-visible, .sc-nav a:focus-visible, .sc-filter:focus-visible, .sc-chip:focus-visible, .sc-tab:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.sc-btn svg { width: 18px; height: 18px; flex: none; }
.sc-btn-main { color: var(--btn-ink); background: var(--btn); border-color: transparent; box-shadow: var(--btn-shadow); }
.sc a.sc-btn-main { color: var(--btn-ink); }
.sc-btn-main:hover { background: var(--btn-hover); border-color: transparent; }
.sc-btn-wide { width: 100%; }
.sc-btn-danger { color: #fff; background: #c4321f; border-color: transparent; }
.sc-btn-danger:hover { background: #a92816; border-color: transparent; }
.sc-btn-danger-ghost { color: #c4321f; border-color: rgba(196, 50, 31, 0.35); }
.sc-btn[disabled] { opacity: 0.55; cursor: default; }

.sc-form { display: grid; gap: 0; }
.sc-form .sc-btn { margin-top: 12px; justify-self: start; }
.sc-label { display: block; margin: 10px 0 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--ink-2); }
.sc-label small { margin-left: 4px; font-weight: 450; color: var(--muted); }
.sc-label > .sc-input { display: block; margin-top: 6px; }
.sc-form > .sc-label + .sc-input, .sc-ed-fields > .sc-label + .sc-input, .sc-ed-pics > .sc-label + .sc-input { margin-top: 6px; }
.sc-input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  font: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sc-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); outline: none; }
.sc-area { min-height: 0; resize: vertical; line-height: 1.5; }
select.sc-input { appearance: auto; padding-right: 10px; }
.sc-said { margin: 12px 0 0; padding: 11px 14px; font-size: 14px; line-height: 1.5; color: var(--ink-2); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 12px; white-space: pre-line; }
.sc-said.bad { color: #9a2a14; background: rgba(196, 50, 31, 0.07); border-color: rgba(196, 50, 31, 0.3); }
.sc-row-form { display: flex; gap: 10px; margin-top: 12px; }
.sc-row-form .sc-input { flex: 1; min-width: 0; }
.sc-grid2, .sc-grid3 { display: grid; gap: 0 14px; }
.sc-grid2, .sc-grid3 { align-items: end; }
.sc-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sc-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sc-switch { display: inline-flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 14.5px; font-weight: 550; color: var(--ink-2); cursor: pointer; }
.sc-switch input { width: 18px; height: 18px; accent-color: var(--brand); }
.sc-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-form .sc-acts .sc-btn { margin-top: 12px; }

.sc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; }
.sc-chip {
  min-height: 40px; padding: 0 14px;
  font: inherit; font-size: 14px; font-weight: 550; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer;
}
.sc-chip[aria-pressed="true"] { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand-line); }

.sc-panel { min-width: 0; padding: clamp(18px, 2.4vw, 26px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1); }
.sc-panel + .sc-panel, .sc-tiles + .sc-panel, .sc-panel + .sc-tiles { margin-top: 16px; }
.sc-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sc-more { font-size: 14px; font-weight: 600; }
.sc-danger { border-color: rgba(196, 50, 31, 0.22); }

/* the way in */
/* On a wide screen the words and what it gives stand on the left, the way in on the right; on a phone the way in
   comes right after the heading, and what it gives under it. */
.sc-gate { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); grid-template-areas: "head card" "points card"; gap: 22px clamp(28px, 5vw, 72px); align-items: start; padding-top: clamp(8px, 3vw, 40px); }
.sc-gate-text { grid-area: head; display: grid; gap: 22px; justify-items: start; min-width: 0; }
.sc-gate-card { grid-area: card; }
.sc-points { grid-area: points; display: grid; gap: 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.sc-points li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.sc-points svg { width: 40px; height: 40px; padding: 9px; color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 12px; }
.sc-points b { color: var(--ink); font-weight: 640; }
.sc-gate-card { padding: clamp(20px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-3); }
.sc-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.sc-tab { min-height: 42px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.sc-tab[aria-selected="true"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1); }
.sc-gate-card .sc-form .sc-btn { justify-self: stretch; }
.sc-key-way { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sc-key-way summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--brand-ink); }
/* A listing file brought from /sell: said on the way in, so the seller knows it waits. */
.sc-brought { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px; font-size: 14.5px; line-height: 1.45; color: var(--ink); background: color-mix(in srgb, var(--good) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); border-radius: 14px; }
.sc-brought[hidden] { display: none; }
.sc-brought-tick { flex: none; position: relative; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--good); }
.sc-brought-tick::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sc-open-card .sc-brought { margin: 4px 0 2px; }

/* opening a shop */
.sc-open { display: grid; gap: 22px; max-width: 760px; margin: 0 auto; padding-top: clamp(4px, 2vw, 24px); }
.sc-steps { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.sc-steps li { display: inline-flex; align-items: center; gap: 9px; }
.sc-steps span { display: grid; place-items: center; width: 26px; height: 26px; font-size: 13px; border: 1px solid var(--line-2); border-radius: 50%; }
.sc-steps .on { color: var(--ink); }
.sc-steps .on span { color: #fff; background: var(--brand); border-color: var(--brand); }
.sc-steps .done span { color: var(--good); border-color: var(--good); }

/* the shop: a column of its pages beside the page open */
.sc-dash { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.sc-side { position: sticky; top: 84px; display: grid; gap: 14px; }
.sc-shop { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 4px 4px 6px; }
.sc-avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; font-size: 18px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 13px; box-shadow: var(--shadow-2); }
.sc-shop-id { min-width: 0; }
.sc-shop-name { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 650; color: var(--ink); }
.sc-shop-link { font-size: 13.5px; font-weight: 550; }
.sc-nav { display: grid; gap: 2px; }
.sc-nav a {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 12px;
  font-size: 15px; font-weight: 560; color: var(--ink-2); text-decoration: none; border-radius: 12px;
}
.sc-nav a:hover { background: var(--surface); }
.sc-nav a[aria-current="page"] { color: var(--brand-ink); background: var(--surface); box-shadow: var(--shadow-1); }
.sc-nav svg { width: 20px; height: 20px; }
.sc-nav em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-nav a { position: relative; }
.sc-dot { position: absolute; top: 12px; left: 28px; width: 8px; height: 8px; background: var(--amber); border: 2px solid var(--bg); border-radius: 50%; }
.sc-out { justify-self: start; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 550; color: var(--muted); background: none; border: 0; cursor: pointer; }
.sc-out:hover { color: var(--ink); }
.sc-door-pick .sc-input { min-height: 42px; font-size: 14.5px; }

.sc-body { min-width: 0; }
.sc-banner { margin: 0 0 16px; padding: 12px 16px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); background: var(--surface); border: 1px solid var(--brand-line); border-radius: 14px; }
.sc-banner .sc-btn { margin-left: 8px; min-height: 36px; }
.sc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.sc-head > div:first-child { min-width: 0; }
.sc-live { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; font-size: 13.5px; font-weight: 600; border-radius: 999px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.sc-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.sc-live.on { color: var(--good); border-color: rgba(8, 128, 108, 0.3); background: rgba(8, 128, 108, 0.07); }
.sc-live.on::before { background: var(--good); box-shadow: 0 0 0 4px rgba(8, 128, 108, 0.16); }

/* overview */
.sc-check { display: grid; gap: 0; margin: 10px 0 0; padding: 0; list-style: none; }
.sc-check li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.sc-check li:first-child { border-top: 0; }
.sc-tick { display: grid; place-items: center; width: 30px; height: 30px; font-size: 14px; font-weight: 700; color: var(--muted); border: 1.5px dashed var(--line-2); border-radius: 50%; }
.sc-check .ok .sc-tick { color: #fff; background: var(--good); border: 0; }
.sc-check .wait .sc-tick { color: var(--amber); border: 1.5px solid var(--amber); }
.sc-check b { display: block; font-size: 15px; font-weight: 620; color: var(--ink); }
.sc-check span.sc-why { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.sc-check .sc-btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
.sc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.sc-tile { min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1); }
.sc-tile p { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.sc-tile strong { display: block; margin-top: 6px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 680; letter-spacing: -0.035em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sc-tile small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

/* products */
.sc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.sc-search { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; min-width: 0; min-height: 44px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; }
.sc-search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.sc-search input { flex: 1; min-width: 0; height: 42px; font: inherit; font-size: 15px; color: var(--ink); background: none; border: 0; outline: none; }
.sc-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.sc-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-filter { min-height: 38px; padding: 0 12px; font: inherit; font-size: 13.5px; font-weight: 580; color: var(--ink-2); background: none; border: 1px solid transparent; border-radius: 999px; cursor: pointer; }
.sc-filter.on { color: var(--ink); background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.sc-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1); }
.sc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.sc-table th { padding: 12px 14px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; text-align: left; color: var(--muted); border-bottom: 1px solid var(--line); }
.sc-table td { padding: 10px 14px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.sc-table tr:last-child td { border-bottom: 0; }
.sc-table tbody tr { cursor: pointer; transition: background 0.12s ease; }
.sc-table tbody tr:hover { background: var(--surface-2); }
.sc-table .c-pic { width: 72px; }
.sc-table .c-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-table .c-act { width: 60px; text-align: right; }
.sc-thumb { display: block; width: 52px; height: 52px; object-fit: cover; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.sc-thumb.none { display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-style: dashed; }
.sc-p-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-weight: 600; line-height: 1.35; color: var(--ink); }
.sc-p-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.sc-p-meta .mono { font-family: var(--font-mono); }
.sc-price { font-weight: 640; color: var(--ink); }
.sc-was { display: block; font-size: 12.5px; font-weight: 450; color: var(--muted); }
.sc-stock { font-weight: 600; color: var(--good); }
.sc-stock.out { color: var(--muted); }
.sc-edit { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.sc-empty { padding: clamp(28px, 5vw, 56px) 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line-2); border-radius: 22px; }
.sc-empty h2 { margin: 0 0 6px; }
.sc-empty p { margin: 0 auto 18px; max-width: 46ch; color: var(--muted); line-height: 1.5; }
.sc-empty .sc-acts { justify-content: center; }
#pr-more { margin-top: 14px; }

/* import */
.sc-drop {
  display: grid; justify-items: center; gap: 6px; padding: clamp(28px, 5vw, 52px) 20px; text-align: center; cursor: pointer;
  background: radial-gradient(80% 120% at 50% 0%, var(--brand-soft), transparent 70%), var(--surface);
  border: 2px dashed var(--brand-line); border-radius: 24px; transition: border-color 0.15s ease, transform 0.15s ease;
}
.sc-drop:hover, .sc-drop.over { border-color: var(--brand); transform: translateY(-1px); }
.sc-drop b { font-size: 17px; font-weight: 650; color: var(--ink); }
.sc-drop span:not(.sc-drop-ico) { font-size: 14px; color: var(--muted); }
.sc-drop-ico svg { width: 46px; height: 46px; padding: 11px; color: #fff; background: var(--btn); border-radius: 14px; box-shadow: var(--btn-shadow); }
.sc-less { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 2px 0; font-size: 14.5px; font-weight: 560; color: var(--ink-2); }
.sc-less .sc-fine { flex-basis: 100%; margin-top: 0; font-weight: 450; }
.sc-less-field { display: inline-flex; align-items: center; gap: 6px; }
.sc-less-field input { width: 76px; min-height: 40px; padding: 0 10px; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; }
.sc-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.sc-source { min-width: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.sc-source h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15.5px; font-weight: 640; color: var(--ink); }
.sc-source h3 i { display: grid; place-items: center; width: 30px; height: 30px; font-style: normal; font-size: 13px; font-weight: 750; color: #fff; border-radius: 9px; }
.sc-source p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.sc-source p b { color: var(--ink-2); font-weight: 600; }
.sc-source p a { display: inline-block; margin-top: 4px; color: var(--brand); font-weight: 600; text-decoration: none; }
.sc-source p a:hover { text-decoration: underline; }
/* The marketplace files the seller brought (seller.js drawFiles). */
.sc-files { margin: 0 0 18px; }
.sc-files-rows { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.sc-files-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.sc-files-rows li.old { background: color-mix(in srgb, var(--warn) 7%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.sc-files-rows i { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; font-style: normal; font-size: 17px; font-weight: 760; color: #fff; }
.sc-files-words { display: grid; gap: 3px; flex: 1 1 180px; min-width: 0; }
.sc-files-words b { font-size: 15px; font-weight: 640; color: var(--ink); }
.sc-files-words span { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.sc-files-rows li.old .sc-files-words span { color: var(--ink-2); }
.sc-files-get { flex: none; text-decoration: none; }
.sc-files .sc-hold { margin-top: 12px; }
/* A new file of the same marketplace: what the last one had and this one has not goes off sale (seller.js preview). */
.sc-hold.sc-gone { display: flex; margin: 14px 0 0; background: color-mix(in srgb, var(--warn) 7%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.sc-ebay { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.sc-ebay > div { min-width: 0; flex: 1 1 320px; }
.sc-pv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.sc-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; font-size: 13px; font-weight: 650; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 999px; }
.sc-has { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.sc-has li { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.sc-has li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.sc-has li.part::before { background: var(--amber); }
.sc-has li.none::before { background: var(--line-2); }
.sc-pv-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sc-refused { margin: 12px 0 0; padding: 12px 14px 12px 32px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); background: rgba(196, 50, 31, 0.05); border: 1px solid rgba(196, 50, 31, 0.2); border-radius: 12px; }
.sc-pv-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sc-done-lines { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sc-done-lines li { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-line; }
.sc-tag { display: inline-block; padding: 1px 8px; font-size: 12px; font-weight: 650; border-radius: 999px; color: var(--good); background: rgba(8, 128, 108, 0.08); }
.sc-tag.up { color: var(--brand-ink); background: var(--brand-soft); }

/* orders, payments, connections */
.sc-list { display: grid; margin: 0; padding: 0; list-style: none; }
.sc-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.sc-list li:first-child { border-top: 0; }
.sc-list b { font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.sc-list span { font-size: 13.5px; color: var(--muted); }
.sc-list .sc-amt { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.sc-none { margin: 4px 0; font-size: 14.5px; color: var(--muted); }
.sc-pay { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; align-items: start; }
.sc-pay-mark { display: grid; place-items: center; width: 56px; height: 56px; color: #fff; background: linear-gradient(135deg, #635bff, #8f6bff); border-radius: 16px; box-shadow: var(--shadow-2); }
.sc-pay-mark svg { width: 28px; height: 28px; }
.sc-pay-mark.ok { background: linear-gradient(135deg, #0a9a7e, #12c49f); }
.sc-pay ul { margin: 10px 0 0; padding: 0 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.sc-key { margin: 12px 0 0; padding: 12px 14px; font-family: var(--font-mono); font-size: 14px; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; }

.sc-orders .sc-order { grid-template-columns: minmax(0, 1fr) auto; }
.sc-order-right { display: flex; align-items: center; gap: 12px; }
.sc-state { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; font-size: 12.5px; font-weight: 650; border-radius: 999px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.sc-state.s-awaiting_shipment { color: var(--warn); background: rgba(180, 86, 10, 0.08); border-color: rgba(180, 86, 10, 0.25); }
.sc-state.s-shipped { color: var(--good); background: rgba(8, 128, 108, 0.08); border-color: rgba(8, 128, 108, 0.25); }
.sc-order-more { grid-column: 1 / -1; display: grid; gap: 8px; }
.sc-order-more > .sc-btn { justify-self: start; min-height: 38px; font-size: 14px; }
.sc-ship-to { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.sc-ship-to .sc-label { margin: 0 0 4px; }
.sc-address { margin: 0; white-space: pre-line; font-size: 15px; line-height: 1.5; color: var(--ink); }
.sc-ship-form { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto; gap: 8px; }
@media (max-width: 640px) { .sc-ship-form { grid-template-columns: minmax(0, 1fr); } .sc-order-right { flex-direction: column; align-items: flex-end; gap: 4px; } }

/* Orders whose buyer's card is held, waiting for the seller to confirm the piece (src/holds.ts). */
.sc-held { border-color: var(--brand-line); box-shadow: var(--shadow-1), 0 0 0 4px var(--brand-soft); }
.sc-held > .sc-sub { margin: 0 0 6px; }
.sc-list .sc-held-row { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "pic what sum" "pic acts acts"; gap: 8px 14px; align-items: center; }
.sc-held-row > .sc-thumb { grid-area: pic; align-self: start; }
.sc-held-what { grid-area: what; display: grid; gap: 2px; min-width: 0; }
.sc-held-row > .sc-amt { grid-area: sum; font-size: 15px; }
.sc-list .sc-held-when { font-size: 13.5px; font-weight: 600; color: var(--warn); }
.sc-held-acts { grid-area: acts; display: flex; flex-wrap: wrap; gap: 8px; }
.sc-held-acts .sc-btn { min-height: 42px; font-size: 14.5px; }
.sc-held-row > .sc-said { grid-column: 1 / -1; margin: 0; }

/* Delivery and returns (src/door-terms.ts) and the card hold, in Payments. */
.sc-terms-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 2px; }
.sc-terms-row .sc-switch { margin: 0; }
.sc-terms-row .sc-fine { font-size: 14px; color: var(--muted); }
.sc-money { position: relative; display: inline-flex; align-items: center; width: 150px; }
.sc-money-sign { position: absolute; left: 14px; font-size: 15.5px; color: var(--muted); pointer-events: none; }
.sc-money .sc-input { padding-left: 32px; font-variant-numeric: tabular-nums; }
.sc-input.sc-days { width: 84px; text-align: center; font-variant-numeric: tabular-nums; }
.sc-terms .sc-label > select.sc-input { max-width: 260px; }
.sc-terms .sc-chips { margin-top: 8px; }
.sc-hold { align-items: flex-start; margin-top: 18px; padding: 13px 15px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.sc-hold input { flex: none; margin-top: 2px; }
.sc-hold > span { display: grid; gap: 4px; }
.sc-hold b { font-size: 15px; font-weight: 620; color: var(--ink); }
.sc-hold .sc-fine { font-size: 13.5px; font-weight: 450; line-height: 1.45; color: var(--muted); }
@media (max-width: 640px) {
  .sc-list .sc-held-row { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "pic what" "pic sum" "acts acts"; }
  .sc-held-row > .sc-amt { text-align: left; }
  .sc-held-acts .sc-btn { flex: 1 1 auto; }
}

.sc-creds { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 14px 0 0; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.sc-creds dt { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.sc-creds dd { margin: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 640px) { .sc-creds { grid-template-columns: minmax(0, 1fr); } .sc-creds dd { margin-bottom: 6px; } }

/* the options and variants of one product, in its dialog */
.sc-ed-vars { margin-top: 16px; }
.sc-ed-vars summary span { font-weight: 500; color: var(--muted); }
.sc-opt-rows { display: grid; gap: 8px; margin: 10px 0 4px; }
.sc-opt-row { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr) 40px; gap: 8px; align-items: center; }
.sc-opt-row .sc-x, .sc-var-table .sc-x { width: 36px; height: 36px; font-size: 20px; }
.sc-var-wrap { margin-top: 12px; border-radius: 14px; box-shadow: none; }
.sc-var-table { font-size: 14px; }
.sc-var-table th { padding: 8px 8px; white-space: nowrap; }
.sc-var-table td { padding: 6px 6px; }
.sc-var-table tbody tr { cursor: default; }
.sc-var-table tbody tr:hover { background: none; }
.sc-var-val { font-weight: 600; color: var(--ink); white-space: nowrap; }
.sc-var-in { min-height: 38px; padding: 6px 8px; font-size: 14px; border-radius: 9px; min-width: 70px; }
.sc-var-sku { min-width: 140px; font-family: var(--font-mono); font-size: 13px; }

/* the product dialog */
.sc-dialog { width: min(980px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-3); }
.sc-dialog::backdrop { background: rgba(2, 10, 23, 0.46); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sc-ed { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; max-height: calc(100dvh - 26px); }
.sc-ed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.sc-x { display: grid; place-items: center; width: 40px; height: 40px; font-size: 24px; line-height: 1; color: var(--ink-2); background: none; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; }
.sc-ed-body { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; padding: 20px 22px; overflow-y: auto; }
.sc-ed-main { display: grid; place-items: center; aspect-ratio: 1 / 1; overflow: hidden; font-size: 14px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 18px; }
.sc-ed-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.sc-ed-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.sc-ed-thumbs img { width: 52px; height: 52px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; }
.sc-ed-pics .sc-btn { margin-top: 4px; }
.sc-ed-fields { min-width: 0; }
.sc-ed-fields .sc-label:first-child { margin-top: 0; }
.sc-ed-more { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.sc-ed-more summary { cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--brand-ink); }
.sc-ed > .sc-said { margin: 0 22px 12px; }
.sc-ed-foot { display: flex; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 24px 24px; }

@media (max-width: 1100px) {
  .sc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sc-gate { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "card" "points"; gap: 24px; }
  .sc-gate-text { gap: 16px; }
  .sc-dash { grid-template-columns: minmax(0, 1fr); }
  .sc-side { position: static; gap: 10px; }
  .sc-shop { padding: 0; }
  /* On a narrow screen the shop's pages are a row that scrolls sideways, under the shop's name. */
  .sc-nav { display: flex; gap: 6px; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; overflow-x: auto; scrollbar-width: none; }
  .sc-nav::-webkit-scrollbar { display: none; }
  .sc-nav a { flex: none; grid-template-columns: 18px auto auto; gap: 8px; min-height: 42px; padding: 0 14px; font-size: 14.5px; background: var(--surface); border: 1px solid var(--line); }
  .sc-nav a[aria-current="page"] { border-color: var(--brand-line); }
  .sc-nav svg { width: 18px; height: 18px; }
  .sc-dot { top: 8px; left: 24px; }
  .sc-out { position: absolute; top: 4px; right: 0; }
  .sc-side { position: relative; top: auto; }
  .sc-ed-body { grid-template-columns: minmax(0, 1fr); }
  .sc-ed-main { max-width: 280px; }
}
@media (max-width: 640px) {
  .sc-tiles, .sc-pv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-sources { grid-template-columns: minmax(0, 1fr); }
  .sc-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-grid3 > :first-child { grid-column: 1 / -1; }
  .sc-grid2 { grid-template-columns: minmax(0, 1fr); }
  .sc-check li { grid-template-columns: 30px minmax(0, 1fr); }
  .sc-check li .sc-btn { grid-column: 2; justify-self: start; }
  .sc-head .sc-acts { width: 100%; }
  .sc-head .sc-acts .sc-btn { flex: 1; }
  .sc-row-form { flex-direction: column; }
  /* The products become cards: picture, name, price and stock, no table to scroll. */
  .sc-table:not(.sc-var-table) thead { display: none; }
  .sc-table:not(.sc-var-table), .sc-table:not(.sc-var-table) tbody { display: block; }
  .sc-table:not(.sc-var-table) tr { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "pic name name" "pic price stock"; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .sc-table:not(.sc-var-table) tr:last-child { border-bottom: 0; }
  .sc-table:not(.sc-var-table) td { padding: 0; border: 0; }
  .sc-table td.c-pic { grid-area: pic; width: auto; }
  .sc-table td.c-name { grid-area: name; }
  .sc-table td.c-price { grid-area: price; text-align: left; }
  .sc-table td.c-stock { grid-area: stock; }
  .sc-table td.c-act { display: none; }
  /* The import's preview: the marketplace's price beside the price here, "$18.00 on Etsy", not under the picture. */
  .sc-table.sc-pv-table:not(.sc-var-table) tr { grid-template-columns: 60px auto minmax(0, 1fr) auto; grid-template-areas: "pic name name name" "pic price was stock"; }
  .sc-table.sc-pv-table td.c-was { grid-area: was; align-self: center; text-align: left; font-size: 13px; color: var(--muted); }
  .sc-table.sc-pv-table td.c-was[data-where]::after { content: " on " attr(data-where); }
  .sc-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .sc-ed { max-height: 100dvh; height: 100dvh; }
  .sc-ed-foot { border-radius: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}

:root[data-theme="dark"] .sc-thumb, :root[data-theme="dark"] .sc-ed-main img { background: #0b1830; }
:root[data-theme="dark"] .sc-said.bad { color: #ffb4a6; }

/* The shop window on the overview: the code a phone opens the shop with, beside its address and how to share it. */
.sc-share { display: flex; gap: 22px; align-items: center; }
.sc-qr { flex: none; display: block; width: 120px; height: 120px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.sc-share-text { min-width: 0; }
.sc-share-url { margin: 10px 0 12px; font-family: var(--font-mono); font-size: 14.5px; letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
.sc-share .sc-fine { margin-top: 12px; }
@media (max-width: 640px) {
  .sc-share { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* Base.com in Connections (seller.js drawBase). */
.sc-base-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 12px 14px; margin-top: 14px; }
.sc-base-form .sc-said { grid-column: 1 / -1; }
.sc-base-less { white-space: nowrap; }
.sc-base-pct { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 600; color: var(--ink); }
.sc-base-pct .sc-input { width: 5.2em; margin: 0; }
.sc-base-facts { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.sc-base-facts li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 14px; font-size: 14.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.sc-base-facts li span { min-width: 11em; color: var(--muted); }
.sc-base-facts li b { font-weight: 600; color: var(--ink); }
.sc-base-facts li.bad { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
@media (max-width: 760px) { .sc-base-form { grid-template-columns: minmax(0, 1fr); } .sc-base-form .sc-btn { width: 100%; } }

