/* Mugdha Studio. The concierge inbox's design system (tokens, type, tab
   buttons, sheets), so Studio and the inbox read as one product. Phone first:
   the tab bar sits under the thumb; on a computer it becomes the plum rail. */
:root {
  --plum: #2a1330; --plum-2: #3a1c42; --plum-3: #4b2656;
  --gold: #e8d3a0; --gold-2: #d9bd7e; --gold-ink: #8a5a12;
  --bg: #f4f1f6; --bg-2: #ece7f0;
  --surface: #fff; --surface-2: #faf8fb; --surface-3: #f4f0f7;
  --ink: #1c161f; --ink-2: #4a4353; --muted: #6f6879;
  --line: #e6e0ec; --line-2: #d9d1e2;
  --teal: #116152; --teal-bg: #e4f3ee; --teal-line: #bfe0d6;
  --red: #9e2a1c; --red-bg: #fdeae7; --red-line: #f4cec7;
  --amber: #8a5a12; --amber-bg: #fdf2e0; --amber-line: #efdcb9;
  --lilac: #eadff5; --violet: #6b3fa0;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --e1: 0 1px 2px rgba(28,22,31,.05), 0 1px 1px rgba(28,22,31,.03);
  --e2: 0 2px 6px rgba(28,22,31,.07), 0 1px 2px rgba(28,22,31,.04);
  --e3: 0 12px 32px rgba(28,22,31,.16), 0 2px 8px rgba(28,22,31,.08);
  --e-up: 0 -10px 34px rgba(28,22,31,.2);
  --focus: 0 0 0 3px rgba(107,63,160,.32);
  --speed: .18s;
  --sans: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --nav-h: calc(66px + env(safe-area-inset-bottom, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --plum: #150f19; --plum-2: #1f1726; --plum-3: #33224a;
    --bg: #121016; --bg-2: #181420;
    --surface: #1c1822; --surface-2: #221d2a; --surface-3: #2a2333;
    --ink: #f2edf5; --ink-2: #cdc5d6; --muted: #9a91a6;
    --line: #302941; --line-2: #3c3450;
    --teal: #7fd9bf; --teal-bg: #123028; --teal-line: #1d4a3c;
    --red: #ff9d8c; --red-bg: #3a1a16; --red-line: #5a2820;
    --amber: #f0c476; --amber-bg: #372715; --amber-line: #523c1c;
    --lilac: #2e2440; --violet: #c5a6f0; --gold-ink: #f0c476;
    --e1: 0 1px 2px rgba(0,0,0,.4); --e2: 0 2px 8px rgba(0,0,0,.45);
    --e3: 0 14px 38px rgba(0,0,0,.6); --e-up: 0 -10px 34px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --plum: #150f19; --plum-2: #1f1726; --plum-3: #33224a;
  --bg: #121016; --bg-2: #181420;
  --surface: #1c1822; --surface-2: #221d2a; --surface-3: #2a2333;
  --ink: #f2edf5; --ink-2: #cdc5d6; --muted: #9a91a6;
  --line: #302941; --line-2: #3c3450;
  --teal: #7fd9bf; --teal-bg: #123028; --teal-line: #1d4a3c;
  --red: #ff9d8c; --red-bg: #3a1a16; --red-line: #5a2820;
  --amber: #f0c476; --amber-bg: #372715; --amber-line: #523c1c;
  --lilac: #2e2440; --violet: #c5a6f0; --gold-ink: #f0c476;
  --e1: 0 1px 2px rgba(0,0,0,.4); --e2: 0 2px 8px rgba(0,0,0,.45);
  --e3: 0 14px 38px rgba(0,0,0,.6); --e-up: 0 -10px 34px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--violet); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-family: var(--serif); font-size: 2rem; font-weight: 700; }
h2 { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; }
h3 { font-size: .98rem; font-weight: 800; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--gold-ink); }
.stack { display: grid; gap: 12px; min-width: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* ---------- frame: tab bar below on a phone, rail on the left on a computer ---------- */
.pane { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + 12px); }
.screen { max-width: 960px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
/* Scrolling rows (chips, tabs) must not widen the page to fit their contents. */
.screen > *, .card > *, .stack > *, .filters .line > * { min-width: 0; }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 4px;
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--line);
}
.nav button {
  flex: 1; height: 52px; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; position: relative;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: color var(--speed), background var(--speed), border-color var(--speed), transform var(--speed);
}
.nav button svg { width: 20px; height: 20px; }
.nav button:hover { background: var(--surface-3); color: var(--ink); }
.nav button:active { transform: scale(.94); }
.nav button[aria-pressed="true"] { color: var(--plum); background: var(--surface-3); }
/* On the phone's bottom bar a chosen tab is gold text in dark mode. Only there: on the
   rail the chosen tab is a gold button, and gold text on it would disappear. */
@media (max-width: 899px) {
  :root[data-theme="dark"] .nav button[aria-pressed="true"] { color: var(--gold); }
}
@media (max-width: 899px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav button[aria-pressed="true"] { color: var(--gold); }
}
.nav button.new { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #2a1330; border-color: var(--gold-2); }
.nav button.new[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #2a1330; }
/* The New button is gold in every theme, so its label stays dark whatever the theme says. */
.nav button.new, .nav button.new[aria-pressed] { color: #2a1330 !important; }
.nav .badge {
  position: absolute; top: 3px; right: 50%; transform: translateX(19px); min-width: 18px; height: 18px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  padding: 0 5px; box-shadow: 0 0 0 2px var(--surface);
}
.nav .brand { display: none; }
@media (min-width: 900px) {
  .pane { padding-bottom: 0; margin-left: 84px; }
  .screen { padding-top: 28px; padding-inline: 28px; }
  .nav {
    top: 0; right: auto; width: 84px; flex-direction: column; padding: 16px 10px; gap: 7px;
    border-top: 0; border-right: 1px solid rgba(0,0,0,.2);
    background: linear-gradient(176deg, var(--plum) 0%, var(--plum-2) 100%);
  }
  /* As in the inbox: glass buttons that share the rail's height, so each is a
     big, obvious target rather than a small chip at the top. */
  .nav button {
    flex: 1 1 0; height: auto; min-height: 64px; max-height: 128px; gap: 6px; font-size: 11.5px;
    color: #d9cfe2; background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.09);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .nav button svg { width: 22px; height: 22px; }
  .nav button:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.17); color: #fff; }
  .nav button[aria-pressed="true"],
  :root[data-theme="dark"] .nav button[aria-pressed="true"] {
    background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #2a1330; border-color: rgba(255,255,255,.28);
    box-shadow: 0 3px 12px rgba(232,211,160,.22);
  }
  .nav button.new { margin-block: 4px; }
  .nav .brand { display: block; font-family: var(--serif); color: var(--gold); font-size: 1.6rem; font-weight: 700; text-align: center; padding: 2px 0 12px; }
  .nav .badge { top: 8px; right: 8px; transform: none; box-shadow: 0 0 0 2px var(--plum); }
}

/* ---------- screen header ---------- */
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.top .titles { display: grid; gap: 2px; min-width: 0; }
.top h1 { overflow-wrap: anywhere; }
.top .tools { display: flex; gap: 8px; flex: none; }
.avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--violet); font-weight: 800; font-size: .9rem; box-shadow: var(--e1);
}
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: .88rem; }
.back svg { width: 18px; height: 18px; }
.icon-btn {
  flex: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--ink-2); box-shadow: var(--e1);
}
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--e1); display: grid; gap: 14px; min-width: 0; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: .9rem; border: 1px solid; }
.banner > div { display: grid; gap: 2px; min-width: 0; }
.banner.amber { background: var(--amber-bg); border-color: var(--amber-line); }
.banner.red { background: var(--red-bg); border-color: var(--red-line); }
.banner.teal { background: var(--teal-bg); border-color: var(--teal-line); }
.banner.lilac { background: var(--lilac); border-color: var(--line-2); }
.banner b { font-weight: 800; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 2px; box-shadow: var(--e1); text-decoration: none; color: var(--ink); min-width: 0; }
.tile .n { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile .l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.tile.hot { background: var(--amber-bg); border-color: var(--amber-line); }
a.tile:hover { border-color: var(--line-2); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform var(--speed), background var(--speed);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: #2a1330; border-color: #2a1330; color: #fff; }
.btn.gold { background: linear-gradient(180deg, var(--gold), var(--gold-2)); border-color: var(--gold-2); color: #2a1330; box-shadow: 0 3px 12px rgba(217,189,126,.3); }
.btn.danger { color: var(--red); border-color: var(--red-line); }
.btn.ghost { border-color: transparent; background: none; color: var(--violet); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.teal { background: var(--teal-bg); color: var(--teal); }
.pill.lilac { background: var(--lilac); color: var(--violet); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* segmented control */
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; border: 0; background: none; border-radius: 9px; padding: 8px 12px; font-weight: 700; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #2a1330; color: var(--gold); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--plum-3); }
.seg .c { font-weight: 600; opacity: .75; margin-left: 4px; }
.seg .warn-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 5px; vertical-align: 1px; }

/* list rows */
.rows { display: grid; gap: 8px; }
.prow {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 8px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); min-width: 0;
}
.prow:hover { border-color: var(--line-2); }
.prow .ph { width: 52px; height: 66px; border-radius: 9px; object-fit: cover; background: var(--surface-3); }
.prow .t { font-weight: 700; font-size: .92rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow .m { font-size: .8rem; color: var(--muted); }
.prow > div { display: grid; gap: 2px; min-width: 0; }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-md); display: grid; gap: 10px; justify-items: center; }

/* piece grid */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
.pcard { display: grid; gap: 6px; text-decoration: none; color: var(--ink); min-width: 0; align-content: start; }
.pcard .img { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pcard:hover .img img { transform: scale(1.03); }
.pcard .img .pill { position: absolute; left: 6px; bottom: 6px; box-shadow: var(--e2); max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; }
.pcard .t { font-weight: 700; font-size: .86rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .m { font-size: .78rem; color: var(--muted); }

/* search and filters */
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; }
.chiprow { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chiprow::-webkit-scrollbar { display: none; }
.fchip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 7px 13px; font-weight: 700; font-size: .82rem; color: var(--ink-2); }
.fchip[aria-pressed="true"] { background: var(--lilac); border-color: var(--line-2); color: var(--violet); }
.filters { display: grid; gap: 10px; }
.filters .line { display: flex; gap: 8px; align-items: center; }
.filters .line > :first-child { flex: 1; min-width: 0; }
.filters select { width: auto; min-width: 130px; }

/* forms */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .8rem; font-weight: 800; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--muted); }
.field.has-problem input, .field.has-problem textarea, .field.has-problem select, .field.has-problem .chips { border-color: var(--red); }
input[type="text"], input[type="number"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2);
  transition: border-color var(--speed), box-shadow var(--speed);
}
textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: var(--focus); background: var(--surface); }
input:disabled, select:disabled, textarea:disabled { opacity: .7; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.check { display: flex; gap: 10px; align-items: center; min-height: 40px; cursor: pointer; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: #6b3fa0; flex: none; }
.counter { font-size: .76rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--red); font-weight: 800; }
.money { position: relative; }
.money span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.money input { padding-left: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); min-height: 46px; align-items: center; }
.chips:focus-within { border-color: var(--violet); box-shadow: var(--focus); }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 11px; border-radius: 99px; background: var(--lilac); color: var(--violet); font-size: .86rem; font-weight: 700; }
.chip.new { background: var(--amber-bg); color: var(--amber); }
.chip button { border: 0; background: none; color: inherit; width: 24px; height: 24px; border-radius: 50%; font-size: 1rem; line-height: 1; }
.chips input { border: 0 !important; background: none !important; box-shadow: none !important; flex: 1 1 120px; min-width: 100px; min-height: 34px; padding: 4px; }

/* piece page */
.ptabs { position: sticky; top: 0; z-index: 10; padding-block: 6px; margin-block: -6px; background: var(--bg); }
.statuscard { display: flex; gap: 12px; align-items: center; }
.statuscard .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.checks { display: grid; gap: 8px; }
.checks .item { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; font-size: .9rem; }
.checks .item .i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; margin-top: 1px; }
.checks .item.bad .i { background: var(--red-bg); color: var(--red); }
.checks .item.warn .i { background: var(--amber-bg); color: var(--amber); }
.checks .item.ok .i { background: var(--teal-bg); color: var(--teal); }
.checks .fix { border: 0; background: none; color: var(--violet); font-weight: 800; font-size: .82rem; padding: 0 2px; }
.checks label.item { cursor: pointer; }
.checks label.item input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: #6b3fa0; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: var(--nav-h); z-index: 20; padding: 10px 16px;
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(28,22,31,.06);
}
@media (min-width: 900px) { .actionbar { left: 84px; bottom: 0; } }
.actionbar .inner { max-width: 960px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.actionbar .state { flex: 1; min-width: 0; font-size: .82rem; color: var(--muted); font-weight: 700; display: flex; gap: 6px; align-items: center; }
.pane.has-actionbar { padding-bottom: calc(var(--nav-h) + 84px); }
@media (min-width: 900px) { .pane.has-actionbar { padding-bottom: 90px; } }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.pick { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick .open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pick .cap { position: absolute; left: 0; right: 0; top: 0; padding: 5px 7px 12px; font-size: .68rem; font-weight: 700; line-height: 1.25; background: linear-gradient(180deg, rgba(20,10,18,.75), rgba(20,10,18,0)); color: #fff; pointer-events: none; }
.pick .badge { position: absolute; left: 6px; bottom: 6px; font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--gold); color: #2a1330; pointer-events: none; }
.pick .acts { position: absolute; right: 5px; bottom: 5px; display: flex; gap: 4px; }
.pick .acts button { border: 0; border-radius: 8px; padding: 5px 8px; font-size: .7rem; font-weight: 800; background: rgba(255,255,255,.94); color: #2a1330; box-shadow: var(--e2); }
.pick.off img { opacity: .3; }
.pick.doubt { outline: 3px solid var(--amber); outline-offset: -3px; }
.pick .x { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(20,10,18,.72); color: #fff; font-size: 1rem; }
.adder {
  aspect-ratio: 3 / 4; border: 1.5px dashed var(--line-2); border-radius: var(--r-md); display: grid; place-items: center; align-content: center; gap: 6px;
  color: var(--violet); background: var(--surface); text-align: center; font-size: .8rem; font-weight: 800; padding: 8px;
}
.adder svg { width: 22px; height: 22px; }
.adder:hover { border-color: var(--violet); }

/* website preview, in a phone frame */
.mock { width: min(100%, 360px); margin: 0 auto; border-radius: 30px; padding: 10px; background: #0d0a0f; box-shadow: var(--e3); }
.mock .scr { border-radius: 22px; overflow: hidden; background: #fbf8f4; color: #2a2226; max-height: 680px; overflow-y: auto; }
.mock .bar { background: #2e0a24; color: #fff; padding: 10px 14px; font-family: var(--serif); font-size: 1.05rem; border-bottom: 2px solid #c9a227; }
.mock .bar span { color: #c9a227; }
.mock .gal { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mock .gal img { flex: 0 0 100%; aspect-ratio: 3 / 4; object-fit: cover; scroll-snap-align: start; }
.mock .count { text-align: center; font-size: .72rem; color: #8a7f86; padding-top: 6px; }
.mock .info { padding: 14px; display: grid; gap: 9px; }
.mock .ttl { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: #2e0a24; line-height: 1.15; }
.mock .price { font-weight: 800; font-size: 1.05rem; }
.mock .price s { color: #8a7f86; font-weight: 600; margin-left: 6px; }
.mock .price .off { background: #c9a227; color: #2e0a24; font-size: .7rem; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.mock .cta { background: #2e0a24; color: #fff; text-align: center; border-radius: 8px; padding: 12px; font-weight: 700; }
.mock .desc { font-size: .88rem; display: grid; gap: 8px; color: #3d3438; }
.mock .desc p { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags span { font-size: .74rem; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); color: var(--ink-2); }

/* history */
.log { display: grid; }
.log .e { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding-bottom: 14px; position: relative; font-size: .9rem; }
.log .e::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--violet); margin-top: 6px; }
.log .e::after { content: ""; position: absolute; left: 4px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.log .e:last-child::after { display: none; }
.log time { display: block; font-size: .76rem; color: var(--muted); }

/* insights */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding-top: 6px; border-bottom: 1px solid var(--line); }
.bars .b { flex: 1; min-width: 2px; border-radius: 4px 4px 0 0; background: var(--violet); opacity: .85; }
.bars .b.zero { background: var(--line); height: 2px !important; opacity: 1; }
.bars .b:hover { opacity: 1; }
.bars.gold .b { background: var(--gold-2); }
.axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 32%) 1fr 48px; gap: 10px; align-items: center; font-size: .86rem; }
.hbar .track { height: 9px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 6px; background: var(--teal); }
.hbar .fill.amber { background: var(--amber); }
.hbar .fill.violet { background: var(--violet); }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.hbar span { overflow-wrap: anywhere; }
.cols { display: grid; gap: 14px; }
@media (min-width: 820px) { .cols { grid-template-columns: 1fr 1fr; } }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--surface-3) 25%, var(--bg-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* category picker */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cat { min-height: 84px; padding: 14px; border-radius: var(--r-md); text-align: left; background: var(--surface); border: 1.5px solid var(--line); display: grid; gap: 2px; align-content: start; box-shadow: var(--e1); }
.cat b { font-size: 1rem; }
.cat span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.cat[aria-pressed="true"] { border-color: var(--violet); background: var(--lilac); }

/* shot board */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.shot-card { display: grid; gap: 6px; align-content: start; }
.shot-card .frame { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--surface); border: 1.5px dashed var(--line-2); padding: 0; width: 100%; display: block; }
.shot-card .frame:hover { border-color: var(--violet); }
.shot-card .frame img { width: 100%; height: 100%; object-fit: cover; }
.shot-card .frame .outline .shape { stroke: var(--violet); fill: none; stroke-width: 1.4; }
.shot-card .frame .outline .shape-under, .shot-card .frame .outline .corner-under, .shot-card .frame .outline .mask, .shot-card .frame .outline .grid, .shot-card .frame .outline .label { display: none; }
.shot-card .frame .outline .corner { stroke: var(--line-2); }
.shot-card .name { font-size: .84rem; font-weight: 800; }
.shot-card .state { font-size: .78rem; color: var(--muted); font-weight: 600; }
.shot-card .state.warn { color: var(--amber); }
.shot-card .state.ok { color: var(--teal); }
.shot-card.taken .frame { border-style: solid; border-color: var(--teal-line); }
.shot-card.warn .frame { border-color: var(--amber); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; background: var(--violet); width: 0; transition: width .2s; }

/* ---------- sheet: bottom sheet on a phone, card on a computer ---------- */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: 88dvh; overflow: auto;
  border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--e-up);
}
.sheet::backdrop { background: rgba(20,14,24,.52); backdrop-filter: blur(2px); }
.sheet[open] { animation: up .2s ease both; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet .body { padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 8px auto 0; }
.sheet .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.sheet .actions .btn { flex: 1 1 140px; }
.sheet .menu { display: grid; gap: 2px; }
.sheet .menu button, .sheet .menu a {
  display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 12px; border: 0; background: none; text-align: left;
  font-weight: 700; color: var(--ink); text-decoration: none; width: 100%;
}
.sheet .menu button:hover, .sheet .menu a:hover { background: var(--surface-3); }
.sheet .menu svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sheet .menu .danger { color: var(--red); }
.sheet .menu .danger svg { color: var(--red); }
@media (min-width: 640px) {
  .sheet { margin: auto; width: min(480px, calc(100% - 40px)); border-radius: var(--r-lg); box-shadow: var(--e3); }
  .sheet .grab { display: none; }
  .sheet .body { padding: 22px; }
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 92px); transform: translateX(-50%); z-index: 100;
  background: #2a1330; color: #fff; padding: 11px 16px; border-radius: 12px; max-width: calc(100% - 32px);
  box-shadow: var(--e3); font-weight: 600; font-size: .9rem; animation: up .18s ease both;
}
.toast.bad { background: #9e2a1c; }
@media (min-width: 900px) { .toast { bottom: 100px; margin-left: 42px; } }

/* sign in */
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: linear-gradient(170deg, #2a1330, #4b2656); }
.signin .card { width: min(380px, 100%); padding: 26px; gap: 16px; }
.signin .mark { font-family: var(--serif); font-size: 2.3rem; font-weight: 700; line-height: 1; }
.signin .mark span { color: var(--gold-ink); }

.spinner { width: 18px; height: 18px; border: 2.5px solid var(--lilac); border-top-color: var(--violet); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- photo guide ---------- */
.guide-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.guide-shot { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: start; }
.guide-shot .pic { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: #241a22; border: 1px solid var(--line); }
.guide-shot .pic img { width: 100%; height: 100%; object-fit: cover; }
.guide-shot .pic .outline { position: absolute; inset: 0; }
.guide-shot .n { font-family: var(--serif); font-size: 2rem; color: var(--gold-ink); line-height: 1; font-weight: 700; }
.guide-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 5px; }
.donts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.dont { display: grid; gap: 6px; font-size: .86rem; margin: 0; }
.dont img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-md); border: 3px solid var(--red); }
.dont.do img { border-color: var(--teal); }
.dont b { font-weight: 800; }
@media (max-width: 520px) { .guide-shot { grid-template-columns: 1fr; } .guide-shot .pic { max-width: 260px; } }

/* ---------- photo viewer ---------- */
body.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); background: rgba(14,8,13,.97); color: #fff; }
.viewer-top { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; }
.viewer-caption { flex: 1; min-width: 0; font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.viewer-close { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; font-size: 1.8rem; line-height: 1; }
.viewer-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 8px 8px; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; transition: opacity .15s; }
.viewer-img.loading { opacity: .25; }
.viewer-spin { position: absolute; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; font-size: 2rem; line-height: 1; }
.viewer-nav.prev { left: 8px; }
.viewer-nav.next { right: 8px; }
.viewer-note { margin: 0 16px 12px; padding: 10px 12px; border-radius: 10px; background: rgba(240,196,118,.18); border: 1px solid rgba(240,196,118,.4); font-size: .9rem; }

/* ---------- guided camera ---------- */
body.cam-open { overflow: hidden; }
.cam {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  background: #0b0709; color: #fff;
}
.cam-top { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 10px; }
.cam-heading { flex: 1; display: grid; gap: 4px; justify-items: center; text-align: center; line-height: 1.25; min-width: 0; }
.cam-step { font-size: .72rem; color: #b9adc4; letter-spacing: .05em; font-weight: 700; }
.cam-title { font-size: 1rem; font-weight: 800; color: #fff; }
.cam-progress { display: flex; gap: 4px; }
.cam-progress span { width: 18px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.22); }
.cam-progress span.done { background: #7fd9bf; }
.cam-progress span.warn { background: #f0c476; }
.cam-progress span.now { background: var(--gold); }
.cam-icon { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #fff; font-size: 1.3rem; display: grid; place-items: center; flex: none; }

.cam-stage { position: relative; width: min(100%, calc((100dvh - 290px) * 3 / 4)); max-width: 560px; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; background: #000; flex: none; }
.cam-video, .cam-still, .cam-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-ghost { opacity: .32; pointer-events: none; inset: 5% 5%; width: 90%; height: 90%; mix-blend-mode: screen; }
.cam-outline { position: absolute; inset: 0; pointer-events: none; }
.cam-stage.reviewing .cam-outline { opacity: .3; }
.cam-stage.flash::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: .7; pointer-events: none; animation: flashout .18s ease-out forwards; }
@keyframes flashout { to { opacity: 0; } }

/* outline drawing (camera, guide and shot cards) */
.outline { width: 100%; height: 100%; display: block; }
.outline path, .outline rect { vector-effect: non-scaling-stroke; }
.outline .mask { fill: rgba(5,3,6,.55); }
.outline .frame { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1; }
.outline .corner { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.outline .grid { stroke: rgba(255,255,255,.26); stroke-width: .8; }
.outline .shape { fill: rgba(232,211,160,.08); stroke: #e8d3a0; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); transition: stroke .25s, fill .25s; }
.outline .label { font: 800 11.5px var(--sans); fill: #fff; paint-order: stroke; stroke: rgba(20,8,18,.75); stroke-width: 3.5px; letter-spacing: .02em; }
.cam-stage.fit .outline .shape { stroke: #7fd9bf; fill: rgba(127,217,191,.1); }

.cam-coach {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%); max-width: calc(100% - 140px);
  padding: 7px 13px; border-radius: 99px; font-size: .82rem; font-weight: 800; text-align: center;
  background: rgba(13,10,15,.74); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.14);
}
.cam-coach:empty { display: none; }
.cam-coach.warn { border-color: rgba(240,196,118,.45); color: #ffe3b3; }
.cam-coach.ok { border-color: rgba(127,217,191,.5); color: #c9f2e4; }
.cam-level { position: absolute; top: 10px; right: 10px; width: 52px; height: 52px; border-radius: 50%; background: rgba(13,10,15,.6); backdrop-filter: blur(6px); display: grid; place-items: center; }
.cam-level .ring { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.8); }
.cam-level .bubble { width: 11px; height: 11px; border-radius: 50%; background: #f0c476; transition: transform .12s linear; }
.cam-level.ok .bubble { background: #7fd9bf; }
.cam-level.ok { box-shadow: 0 0 0 2px #7fd9bf; }
.cam-tools { position: absolute; right: 10px; top: 72px; display: grid; gap: 8px; }
.cam-tool { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(13,10,15,.6); color: #fff; font-weight: 800; font-size: .82rem; backdrop-filter: blur(6px); }
.cam-tool.on { background: var(--gold); color: #2a1330; border-color: var(--gold-2); }
.cam-meters { position: absolute; left: 8px; right: 8px; bottom: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cam-meter { background: rgba(13,10,15,.66); backdrop-filter: blur(8px); border-radius: 9px; padding: 5px 7px; display: grid; gap: 4px; font-size: .68rem; font-weight: 800; color: #e3d9ea; }
.cam-meter u { display: block; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; text-decoration: none; }
.cam-meter i { display: block; height: 100%; border-radius: 3px; background: #7fd9bf; transition: width .2s; }
.cam-meter.mid i { background: #f0c476; }
.cam-meter.bad i { background: #ff9d8c; }
.cam-meter.off { opacity: .45; }
.cam-meter.off i { width: 0 !important; }
.cam-check { position: absolute; left: 8px; right: 8px; bottom: 52px; padding: 9px 12px; border-radius: 10px; font-size: .84rem; font-weight: 600; background: rgba(13,10,15,.8); backdrop-filter: blur(8px); }
.cam-check.ok { background: rgba(17,97,82,.92); }
.cam-check.warn { background: rgba(138,90,18,.95); }
.cam-countdown { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 5rem; font-weight: 700; color: rgba(255,255,255,.92); text-shadow: 0 2px 18px rgba(0,0,0,.6); pointer-events: none; }
.cam-focus { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: 2px solid var(--gold); border-radius: 12px; pointer-events: none; }
.cam-focus.pulse { animation: focuspulse .6s ease-out; }
@keyframes focuspulse { from { transform: scale(1.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.cam-instruction { margin: 0; max-width: 560px; text-align: center; font-size: .9rem; color: #e3d9ea; min-height: 2.8em; }
.cam-strip { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cam-dot { width: 38px; height: 50px; border-radius: 8px; border: 2px solid rgba(255,255,255,.18); background: #1f141c; color: #b9adc4; padding: 0; overflow: hidden; display: grid; place-items: center; font-weight: 800; }
.cam-dot img { width: 100%; height: 100%; object-fit: cover; }
.cam-dot.optional { border-style: dashed; }
.cam-dot.done { border-color: #7fd9bf; }
.cam-dot.warn { border-color: #f0c476; }
.cam-dot.checking { border-color: #c5a6f0; }
.cam-dot.on { outline: 3px solid var(--gold); outline-offset: 2px; }
.cam-controls { width: 100%; max-width: 560px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: auto; }
.cam-shoot { display: grid; justify-items: center; gap: 6px; }
.cam-side { min-height: 48px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #fff; font-weight: 700; padding: 8px 10px; }
.cam-controls > .cam-side:last-child { background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #2a1330; border-color: var(--gold-2); }
.cam-shutter {
  --p: 0; width: 74px; height: 74px; border-radius: 50%; border: 0; padding: 0; position: relative;
  background: conic-gradient(var(--gold) calc(var(--p) * 360deg), rgba(255,255,255,.25) 0);
}
.cam-shutter::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #8a7a86; border: 3px solid #0b0709; transition: background .2s; }
.cam-shutter.ready::after { background: var(--gold); }
.cam-shutter:active { transform: scale(.94); }
.cam-auto { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #b9adc4; border-radius: 99px; padding: 3px 10px; font-size: .66rem; font-weight: 800; letter-spacing: .08em; }
.cam-auto.on { color: #7fd9bf; border-color: rgba(127,217,191,.45); background: rgba(127,217,191,.12); }
.cam-message { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 120px); z-index: 3; background: #fdeae7; color: #9e2a1c; border-radius: 12px; padding: 12px 14px; font-weight: 700; }
.cam-help { position: absolute; inset: 0; z-index: 4; background: rgba(11,7,9,.96); overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 24px; }
.cam-help-card { max-width: 480px; margin: 0 auto; display: grid; gap: 12px; color: #e3d9ea; }
.cam-help-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cam-help-head b { color: var(--gold); font-size: 1.1rem; }
.cam-help-pic { position: relative; width: min(100%, 300px); aspect-ratio: 3 / 4; justify-self: center; border-radius: 12px; overflow: hidden; background: #1f141c; }
.cam-help-pic img { width: 100%; height: 100%; object-fit: cover; }
.cam-help-pic .outline { position: absolute; inset: 0; }
.cam-help-card p { margin: 0; }
.cam-help-card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 6px; }

/* ---------- after live: sold, hold, choosing several, batch, scanning ---------- */
.pill.gold { background: var(--gold); color: #2a1330; }
.banner.gold { background: color-mix(in srgb, var(--gold) 35%, var(--surface)); border-color: var(--gold-2); }
.banner .btn { min-height: 40px; padding: 8px 14px; justify-self: start; }

.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); flex: none; display: grid; place-items: center; }
.tick.on { background: var(--violet); border-color: var(--violet); }
.tick.on::after { content: ""; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translate(0, -1px) rotate(-45deg); }
.pcard .img .tick { position: absolute; top: 8px; right: 8px; box-shadow: var(--e2); }
.pgrid.selecting .pcard .img img { transition: transform .15s, opacity .15s; }
.pcard.picked .img { outline: 3px solid var(--violet); outline-offset: -3px; }
.pcard.picked .img img { transform: scale(.94); }
.prow[aria-checked="true"] { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet); }

.batch .batch-head { align-items: flex-start; }
.batch .batch-head > span { display: grid; gap: 2px; }

.scan-box { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: #000; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-aim { position: absolute; inset: 22% 12%; border: 2px solid var(--gold); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }

/* ---------- price tags ---------- */
.print-area { display: grid; gap: 12px; justify-content: start; }
.ptag {
  background: #fff; color: #000; display: grid; grid-template-rows: 1fr auto auto; gap: .6mm; overflow: hidden;
  font-family: var(--sans); border: 1px dashed #bbb; break-inside: avoid;
}
.print-label .ptag { width: 50mm; height: 25mm; padding: 1.5mm 2mm 1mm; }
.print-a4 { grid-template-columns: repeat(3, 63.5mm); grid-auto-rows: 38.1mm; column-gap: 2.5mm; row-gap: 0; }
.print-a4 .ptag { width: 63.5mm; height: 38.1mm; padding: 3mm 3.5mm 2mm; }
.ptag-top { display: flex; gap: 2mm; min-height: 0; align-items: flex-start; }
.ptag .qr { flex: none; height: 100%; max-height: 14mm; width: auto; aspect-ratio: 1; }
.print-a4 .ptag .qr { max-height: 20mm; }
.ptag-info { display: grid; gap: .3mm; min-width: 0; align-content: start; }
.ptag-brand { font-family: var(--serif); font-weight: 700; font-size: 6.5pt; letter-spacing: .08em; text-transform: uppercase; }
.ptag-title { font-size: 5.6pt; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptag-price { font-size: 11pt; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ptag-price s { font-size: 6.5pt; font-weight: 600; margin-left: 1.5mm; color: #555; }
.print-a4 .ptag-brand { font-size: 8pt; }
.print-a4 .ptag-title { font-size: 7pt; }
.print-a4 .ptag-price { font-size: 14pt; }
.ptag .bc { width: 100%; height: 5.5mm; display: block; }
.print-a4 .ptag .bc { height: 8mm; }
.ptag-sku { font-size: 5.5pt; text-align: center; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.print-a4 .ptag-sku { font-size: 7pt; }

@page label { size: 50mm 25mm; margin: 0; }
@page sheet { size: A4; margin: 15.1mm 7.2mm 0; }
@media print {
  .nav, .toast, .no-print, .actionbar, dialog { display: none !important; }
  html, body { background: #fff !important; }
  .pane { padding: 0 !important; min-height: 0; }
  .screen { padding: 0 !important; max-width: none; display: block; }
  .ptag { border: 0; }
  .print-label { page: label; display: block; }
  .print-label .ptag:not(:last-child) { break-after: page; }
  .print-a4 { page: sheet; gap: 0 2.5mm; }
}
.row.inline { flex-wrap: nowrap; }
.row.inline > input { flex: 1; min-width: 0; width: auto; }

/* ---------- stock ---------- */
.stepper { display: flex; gap: 6px; align-items: center; }
.stepper input { width: 84px; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .icon-btn { font-size: 1.3rem; font-weight: 700; line-height: 1; }
.stock-rows { display: grid; gap: 8px; }
.stock-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.stock-row:last-child { border-bottom: 0; }
.stock-row label { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.chiprow.wrap { flex-wrap: wrap; overflow: visible; }
.icon-btn.spinning svg { animation: spin 1s linear infinite; }

/* ---------- filters from the store's menus ---------- */
.fchip .c { font-weight: 600; opacity: .7; margin-left: 5px; font-variant-numeric: tabular-nums; }
.fchip.none { opacity: .55; }
.filter-btn { min-height: 40px; padding: 8px 14px; }
.filter-btn .badge { background: var(--violet); color: #fff; border-radius: 99px; font-size: .72rem; padding: 1px 7px; }
.filters .line .grow { flex: 1; }
.small-btn { min-height: 32px; padding: 4px 10px; font-size: .82rem; }
.fgroup { display: grid; gap: 2px; }
.fgroup h3 { margin-bottom: 4px; }
.frow { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.frow:hover { background: var(--surface-3); }
.frow input { width: 20px; height: 20px; accent-color: var(--violet); flex: none; }
.frow span:first-of-type { flex: 1; min-width: 0; }
.frow .c { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.frow.none span { color: var(--muted); }
.fnode details { margin-left: 36px; }
.fnode summary { font-size: .8rem; color: var(--violet); font-weight: 700; cursor: pointer; padding: 2px 0 6px; }
.fkids { display: grid; gap: 2px; }
.filters { grid-template-columns: minmax(0, 1fr); }
.filters .line { min-width: 0; }

/* ---------- deleting photos ---------- */
.pick .acts { left: 5px; flex-wrap: wrap; justify-content: flex-end; }
.pick .acts button.del { color: #9e2a1c; }
.shot-card { position: relative; }
.shot-card .x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(20,10,18,.72); color: #fff; font-size: 1.05rem; line-height: 1; z-index: 2; }

/* ---------- viewer: zoom, move, turn ---------- */
.viewer-tools { display: flex; gap: 6px; align-items: center; flex: none; }
.viewer-tool { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; }
.viewer-tool svg { width: 20px; height: 20px; }
.viewer-tool:hover, .viewer-close:hover { background: rgba(255,255,255,.16); }
.viewer-stage { overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.viewer-stage.zoomed { cursor: grab; }
.viewer-stage.zoomed:active { cursor: grabbing; }
.viewer-img { transform-origin: center center; transition: opacity .15s, transform .12s ease-out; will-change: transform; pointer-events: none; -webkit-user-drag: none; }
.viewer-save { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 10px 16px; font-size: .9rem; font-weight: 600; }
.viewer-save .btn { min-height: 40px; padding: 8px 16px; }
@media (max-width: 520px) { .viewer-tools { gap: 4px; } .viewer-tool { width: 40px; height: 40px; } .viewer-top { padding-left: 12px; } }
