/* OPM: a modern ops app for a four-person shirt shop, in the store's own colours.
   The OPM crest leads the top bar and sign-in; store black for type, primary buttons and number patches
   (every shirt number is a black patch); store red is the one accent (main action, ticked rows, counters,
   current step); store navy for dark sheets. Stage colours only in stage icons and dots. Sold shirts go grey.
   Shape rule: controls 12px, cards 16px, floating sheets 20px, chips and tabs full pill.
   Motion rule: only feedback and state changes (press, tick, action sheet, toast, fold);
   nothing animates on page load; everything collapses under prefers-reduced-motion.
   Type: Golos Text for everything, Fira Mono for tracking codes. Icons: Phosphor regular. */
@import url("/static/fonts/fonts.css");

:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --sunk: #efeff1;
  --ink: #121212;
  --ink-2: #3f3f46;
  --muted: #64646d;
  --faint: #74747d;  /* 4.6:1 on white: placeholders and hints stay readable */
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --navy: #242833;

  --accent: #d72727;
  --accent-hover: #bd1f1f;
  --accent-soft: #fdeeee;
  --accent-ring: rgb(215 39 39 / 0.22);
  --ring: rgb(18 18 18 / 0.12);

  --danger: #b3261e;
  --danger-soft: #fdeeee;
  --ok: #1f7a45;

  --z-intake: #2563c9;
  --z-ready: #0d7f73;
  --z-repair: #c2570c;
  --z-awaiting_ship: #6d4ad1;
  --z-in_parcel: #8a5a2b;
  --z-at_brother: #23824a;
  --z-listed: #121212;
  --z-failed: #c0262d;
  --z-sold: #71717a;

  --ui: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Fira Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-ctl: 12px;
  --r-card: 16px;
  --r-sheet: 20px;
  --tap: 44px;

  --sh-1: 0 1px 2px rgb(23 23 26 / 0.05);
  --sh-2: 0 1px 2px rgb(23 23 26 / 0.04), 0 4px 12px -4px rgb(23 23 26 / 0.08);
  --sh-pop: 0 2px 6px rgb(23 23 26 / 0.10), 0 18px 40px -12px rgb(23 23 26 / 0.35);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.5 var(--ui);
  color: var(--ink);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--accent-soft); color: var(--ink); }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color 150ms ease; }
@media (hover: hover) { a:hover { text-decoration-color: currentColor; } }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- icons ---------- */
.i { width: 20px; height: 20px; flex: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  min-height: 60px; padding: 0 16px;
  background: rgb(255 255 255 / 0.84);
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  border-bottom: 1px solid var(--line);
}
.topbar .brand {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding-right: 2px; flex: none;
  color: var(--ink); text-decoration: none; transition: transform 160ms var(--ease-out);
}
.topbar .brand:active { transform: scale(0.95); }
.topbar .brand .crest { display: block; width: auto; height: 34px; }
.topbar .brand .wm { display: none; font: 700 15px/1 var(--ui); letter-spacing: -0.015em; white-space: nowrap; }
.topbar nav {
  display: flex; gap: 2px; padding: 3px; margin-left: 4px;
  background: var(--sunk); border-radius: var(--r-ctl);
  overflow-x: auto; scrollbar-width: none; min-width: 0;
}
.topbar .side { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: 9px; white-space: nowrap; text-decoration: none;
  color: var(--muted); font: 500 14.5px/1 var(--ui);
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.topbar nav a .i { width: 18px; height: 18px; display: block; }
/* phone: icon only, the current section keeps its name (the text stays for screen readers) */
.topbar nav a { min-width: 40px; justify-content: center; padding: 0 10px; height: 40px; }
.topbar nav a:not([aria-current]) .nl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topbar .who { display: none; color: var(--muted); font-size: 14px; white-space: nowrap; padding-left: 8px; }
.topbar nav a[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--sh-1); }
@media (hover: hover) { .topbar nav a:not([aria-current]):hover { color: var(--ink); } }
.topbar .logout {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px;
  background: none; border: 0; border-radius: 10px; color: var(--muted); font: 500 14.5px var(--ui); cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.topbar .logout .lbl { display: none; }
.topbar .logout:active { transform: scale(0.95); }
@media (hover: hover) { .topbar .logout:hover { color: var(--ink); background: var(--sunk); } }

.topbar.bare { display: none; }
main { max-width: 880px; margin: 0 auto; padding: 20px 16px 140px; }
main.narrow { max-width: 560px; }
/* board, sales, parcels use a big screen (17.11: 880 px looked thin on a 4K monitor); forms stay at 880 to read */
@media (min-width: 1200px) { main.wide { max-width: 1120px; } }
@media (min-width: 1600px) { main.wide { max-width: 1240px; } }
/* the sections sit in the middle of the bar on a computer; on a phone they follow the crest */
@media (min-width: 760px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .topbar .brand { grid-column: 1; justify-self: start; }
  .topbar nav { grid-column: 2; justify-self: center; margin-left: 0; }
  .topbar .side { grid-column: 3; justify-self: end; }
}

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font: 700 28px/1.15 var(--ui); letter-spacing: -0.03em; }
h2 { font: 600 19px/1.3 var(--ui); letter-spacing: -0.015em; margin: 36px 0 12px; }
h2 .muted { font-weight: 500; margin-left: 2px; }
h3 { font: 600 16px/1.35 var(--ui); margin: 20px 0 8px; }
p { margin: 8px 0; }
b, strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.code { font-family: var(--mono); font-size: 0.95em; letter-spacing: 0.03em; }
input.code { font-size: 16px; }  /* under 16px iPhone zooms the page on focus */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 0 0 20px; }
.page-head + h2 { margin-top: 24px; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; font-size: 15px; }
/* board summary: the one dark brand card, crest as a watermark */
.deck {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 12px; margin: 0 0 14px; padding: 20px;
  background: var(--ink); color: #fff; border-radius: 20px; box-shadow: var(--sh-2);
}
.deck .deck-crest { position: absolute; z-index: -1; right: -34px; top: -26px; width: auto; height: 210px; color: #fff; opacity: 0.06; }
.deck .deck-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.deck h1 { color: #fff; }
.deck .drop { margin: 0; justify-self: start; background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.12); box-shadow: none; color: rgb(255 255 255 / 0.86); }
.tally { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 0; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / 0.12); }
.tally > div { min-width: 0; }
.tally dt { font: 500 12.5px/1.2 var(--ui); color: rgb(255 255 255 / 0.56); white-space: nowrap; }
.tally dd { margin: 4px 0 0; font: 700 26px/1 var(--ui); letter-spacing: -0.03em; }
.tally dd { white-space: nowrap; }
/* money figures are long: two columns on a phone */
@media (max-width: 559px) { .money-deck .tally { grid-template-columns: repeat(2, 1fr); row-gap: 14px; } }
.drop {
  display: inline-flex; align-items: center; gap: 7px; margin: 10px 0 0; min-height: 32px; padding: 6px 13px 6px 10px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
  font: 500 14px/1.25 var(--ui); color: var(--ink-2);
}
.drop .i { width: 17px; height: 17px; color: var(--accent); }
.back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-left: -2px;
  color: var(--muted); text-decoration: none; font: 500 14.5px var(--ui);
  transition: color 150ms ease;
}
.back .i { width: 18px; height: 18px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) { .back:hover { color: var(--ink); } .back:hover .i { transform: translateX(-2px); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 16px;
  font: 600 15px/1.1 var(--ui); color: var(--ink); text-decoration: none; text-align: center; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-ctl); box-shadow: var(--sh-1);
  cursor: pointer; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
@media (hover: hover) { .btn:hover { background: #fafafa; border-color: #c4c4ca; } }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fafafa; }
@media (hover: hover) { .btn-primary:hover { background: #2a2a2e; border-color: #2a2a2e; } }
.btn-mark { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgb(215 39 39 / 0.25); }
@media (hover: hover) { .btn-mark:hover { background: var(--accent-hover); border-color: var(--accent-hover); } }
.btn-quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
@media (hover: hover) { .btn-quiet:hover { background: rgb(23 23 26 / 0.05); border-color: transparent; } }
.btn-danger { color: var(--danger); border-color: #efc4c6; }
@media (hover: hover) { .btn-danger:hover { background: var(--danger-soft); border-color: #e7a9ac; } }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.btn-icon { padding: 0; width: var(--tap); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.35; cursor: not-allowed; transform: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.split { justify-content: space-between; }
.inline { display: inline; }

/* ---------- forms ---------- */
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font: 500 14px/1.3 var(--ui); color: var(--ink-2); }
label .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input, select, textarea {
  font: 400 16px/1.35 var(--ui); color: var(--ink);
  width: 100%; min-height: var(--tap); padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  box-shadow: inset 0 1px 2px rgb(23 23 26 / 0.04);
  transition: border-color 150ms ease, box-shadow 180ms var(--ease-out);
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%2364646d'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
}
textarea { min-height: 88px; resize: vertical; }
@media (hover: hover) { input:hover, select:hover, textarea:hover { border-color: #b4b4bb; } }
/* focus: a soft graphite edge and a wide quiet halo — neutral, so red never reads as an error.
   A list chosen with the mouse does not keep the halo after it closes; with the keyboard it does. */
input:focus, textarea:focus, select:focus-visible { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 4px var(--ring); }
select:focus { outline: none; }
/* Chrome / Edge: the list itself is ours (customizable select). Safari and iOS keep their own picker. */
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select { display: flex; align-items: center; gap: 8px; padding-right: 12px; background-image: none; }
  select::picker-icon {
    content: ""; flex: none; width: 16px; height: 16px; margin-left: auto; background: var(--muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: rotate 220ms var(--ease-out);
  }
  select:open { border-color: var(--ink-2); box-shadow: 0 0 0 4px var(--ring); }
  select:open::picker-icon { rotate: 180deg; }
  ::picker(select) {
    margin-block: 6px; padding: 6px; min-inline-size: anchor-size(inline); max-block-size: min(22rem, 70dvh);
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-pop);
    opacity: 0; translate: 0 -4px;
    transition: opacity 140ms ease, translate 200ms var(--ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete;
  }
  select:open::picker(select) { opacity: 1; translate: 0 0; }
  @starting-style { select:open::picker(select) { opacity: 0; translate: 0 -4px; } }
  option {
    display: flex; align-items: center; gap: 10px; min-block-size: 40px; padding: 8px 10px 8px 12px;
    border-radius: 9px; color: var(--ink-2); font: 500 15px/1.25 var(--ui); cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
  }
  option:hover, option:focus-visible { outline: none; background: var(--sunk); color: var(--ink); }
  option:checked { color: var(--ink); font-weight: 600; }
  option::checkmark {
    order: 1; margin-left: auto; content: ""; flex: none; width: 16px; height: 16px; background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  option:disabled { color: var(--faint); cursor: default; }
  option[value=""], option[value=""]:checked { color: var(--muted); font-weight: 500; }
  option[value=""]::checkmark { display: none; }
  @media (prefers-reduced-motion: reduce) { ::picker(select), select:open::picker(select) { translate: none; } }
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="search"] { padding-left: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%238b8b94'%3E%3Cpath d='M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z'/%3E%3C/svg%3E") 13px center / 18px no-repeat; }
input[type="file"] { padding: 7px; border-style: dashed; color: var(--muted); font-size: 14px; cursor: pointer; }
input[type="file"]::file-selector-button {
  margin-right: 10px; height: 30px; padding: 0 12px; border: 0; border-radius: 8px;
  background: var(--sunk); color: var(--ink); font: 500 14px var(--ui); cursor: pointer;
}
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; cursor: pointer;
  width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0;
  border: 1.5px solid #b4b4bb; border-radius: 7px; background-color: var(--surface);
  background-position: center; background-repeat: no-repeat; background-size: 14px;
  transition: background-color 140ms ease, border-color 140ms ease, transform 160ms var(--ease-out);
}
input[type="checkbox"]:active { transform: scale(0.88); }
input[type="checkbox"]:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23ffffff'%3E%3Cpath d='M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E"); }
input[type="checkbox"]:indeterminate { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23ffffff'%3E%3Cpath d='M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z'/%3E%3C/svg%3E"); }
input[type="checkbox"]:focus { box-shadow: none; }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ring); }
label.check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); font: 500 15px var(--ui); color: var(--ink); cursor: pointer; }
label.check.small { font-size: 14px; color: var(--muted); }
fieldset > label.check + label.check { margin-top: -14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* three fields in a row; columns may shrink below their content (minmax 0), or iOS's wide date field pushes out */
.three { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
.three > * { min-width: 0; }
/* phones up to the Pro Max (430 pt): the first field gets the whole row, the other two share the next */
@media (max-width: 520px) { .three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .three > :first-child { grid-column: 1 / -1; } }
/* iOS Safari gives a date field its own minimum width and centres the text: let it fill the cell, text on the left */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
fieldset {
  display: grid; gap: 14px; margin: 0; padding: 16px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-1);
}
fieldset[disabled] { opacity: 0.7; }
legend { float: left; width: 100%; padding: 0; margin: 0 0 -2px; font: 600 15px/1.3 var(--ui); color: var(--ink); }
.form-actions {
  position: sticky; bottom: 0; z-index: 10;
  margin: 4px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgb(244 244 245 / 0.86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
}
.form-actions.single { grid-template-columns: 1fr; }
/* the card's own suggestions (seller, club, size, brand): right under the field, the field's width */
.combo { position: relative; display: block; }
.combo-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 340px; overflow-y: auto; list-style: none; margin: 0; padding: 4px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-ctl); box-shadow: var(--sh-pop); }
.combo-opt { padding: 9px 10px; border-radius: 8px; cursor: pointer; font: 500 15px/1.25 var(--ui); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-opt:hover, .combo-opt.is-active { background: var(--sunk); }
/* the card's own save state: quiet when fine, red when it could not save */
.form-actions .autosave { grid-column: 1 / -1; margin: -2px 0 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font: 500 13px/1.3 var(--ui); }
.form-actions .autosave:empty { display: none; }
.form-actions .autosave.ok::before { content: ""; width: 14px; height: 14px; flex: none; background: var(--ok); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.form-actions .autosave.bad { color: var(--danger); }

/* ---------- toasts and notices ---------- */
.slips { display: grid; gap: 8px; margin: 0 0 16px; }
.slip {
  margin: 0; padding: 12px 16px 12px 14px; display: flex; gap: 10px; align-items: flex-start;
  background: var(--navy); color: #f4f4f5; border-radius: 14px; box-shadow: var(--sh-pop);
  font: 500 15px/1.4 var(--ui);
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
.slip::before { content: ""; width: 20px; height: 20px; flex: none; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'/%3E%3C/svg%3E") center / contain no-repeat; }
@starting-style { .slip { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.error { color: var(--danger); }
.notice {
  display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; padding: 12px 14px;
  border-radius: var(--r-ctl); background: var(--danger-soft); color: var(--danger); border: 1px solid #f4d0d2;
  font: 500 14.5px/1.45 var(--ui);
}
.notice::before { content: ""; width: 18px; height: 18px; flex: none; margin-top: 1px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.notice.calm { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.notice.calm::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E"); color: var(--muted); background: var(--muted); }
.backup-alert { margin: 0 0 16px; }

/* ---------- stage colours ---------- */
.zone { --z: var(--z-sold); }
.zone-intake { --z: var(--z-intake); }
.zone-ready { --z: var(--z-ready); }
.zone-repair { --z: var(--z-repair); }
.zone-awaiting_ship { --z: var(--z-awaiting_ship); }
.zone-in_parcel { --z: var(--z-in_parcel); }
.zone-at_brother { --z: var(--z-at_brother); }
.zone-queued, .zone-uploaded, .zone-live, .zone-listed, .zone-ebay { --z: var(--z-listed); }
.zone-failed { --z: var(--z-failed); }
.zone-sold { --z: var(--z-sold); }

.num {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; white-space: nowrap;
  border-radius: 6px; font: 700 14px/1 var(--ui); letter-spacing: -0.01em;
  background: var(--ink); color: #fff;
}
.num.zone-sold { background: var(--z-sold); }
.state { display: inline-flex; align-items: center; gap: 6px; font: 500 13.5px var(--ui); color: var(--ink-2); }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--z); flex: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--sunk); font: 500 12.5px/1 var(--ui); color: var(--ink-2); white-space: nowrap; }
.pill .i { width: 14px; height: 14px; }
.pill.mark { background: var(--ink); color: #fff; }
.pill.quiet { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--faint); }
/* Ready to ship: what a card still lacks before the parcel / it is complete */
.pill.lacks { background: rgb(215 39 39 / 0.08); color: #b42318; white-space: normal; height: auto; min-height: 24px; padding: 4px 9px; line-height: 1.25; }
.pill.ok { background: rgb(22 128 61 / 0.1); color: #166534; }
.pill.fake { background: rgb(215 39 39 / 0.1); color: #b42318; font-weight: 600; }
.below-cost { margin: -4px 0 0; color: var(--danger); font: 500 14px/1.35 var(--ui); }

/* ---------- board: stage tabs ---------- */
.rail {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  margin: 14px -16px 0; padding: 2px 16px 6px; scroll-padding-inline: 16px; /* 14 + 2 = 16 to the pills */
}
.rail::-webkit-scrollbar { display: none; }
/* on a computer the path (Picked up → US warehouse) is one row and the sale (Listed, Sold, Unclear) the next;
   a phone keeps one scrolling row */
.rail-break { display: none; }
.rail a {
  flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 8px 0 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: var(--sh-1);
  color: var(--ink-2); text-decoration: none; font: 500 14.5px/1 var(--ui); white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
}
.rail a .i { width: 18px; height: 18px; color: var(--z); }
.rail a .n {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px;
  border-radius: 999px; background: var(--sunk); color: var(--muted); font: 600 12.5px/1 var(--ui);
}
.rail a:active { transform: scale(0.97); }
@media (hover: hover) { .rail a:not(.on):hover { border-color: var(--line-2); color: var(--ink); } }
.rail a.on { background: var(--ink); border-color: var(--ink); color: #fafafa; font-weight: 600; }
.rail a.on .i { color: #fff; }
.rail a.on .n { background: var(--accent); color: #fff; }
.rail a.empty:not(.on) { color: var(--faint); box-shadow: none; background: transparent; }
.rail a.empty:not(.on) .i { opacity: 0.55; }

.deck ~ .notice { margin: 16px 0 14px; }
.tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 6px 0 12px; }
.tools select { width: 148px; padding-right: 32px; background-position: right 10px center; color: var(--ink-2); font-weight: 500; }
@media (min-width: 560px) { .tools select { width: 190px; } }
/* eBay lot: the last row of the card's facts box — field + Save, one quiet line under it */
.label .lrow.ebay-lot { align-items: start; }
.label .lrow.ebay-lot .k { padding-top: 13px; }
.ebay-lot form { display: grid; gap: 6px; min-width: 0; }
.ebay-lot .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ebay-lot .hint { margin: 0; font-size: 13px; color: var(--muted); }
.ebay-lot .hint a { font-size: 13px; }
@media (max-width: 479px) {  /* a 12-digit lot doesn't fit beside the key: the key goes on top */
  .label .lrow.ebay-lot { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .label .lrow.ebay-lot .k { padding-top: 0; }
}
/* Listed: Site · Site + eBay · eBay only, in the search row (the search gives up the width) */
.tools.has-seg { grid-template-columns: minmax(0, 1fr) auto auto; }
.seg { display: flex; gap: 2px; padding: 3px; min-height: var(--tap); background: var(--sunk); border-radius: var(--r-ctl); }
.seg a { display: flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 9px;
  font: 500 14px/1 var(--ui); color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease; }
@media (hover: hover) { .seg a:not(.on):hover { color: var(--ink); background: rgb(255 255 255 / 0.55); } }
.seg a.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(23 23 26 / 0.08), 0 0 0 1px var(--line); }
.seg a:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
@media (max-width: 759px) {  /* phone: search and sort stay on top, the switch gets its own full row */
  .tools.has-seg { grid-template-columns: minmax(0, 1fr) auto; }
  .tools.has-seg .seg { grid-column: 1 / -1; grid-row: 2; }
  .tools.has-seg .seg a { flex: 1; padding: 0 6px; }
}

/* ---------- board: item list ---------- */
/* every shirt is its own card with air between; a tap on the card opens the shirt, the circle on the right selects */
.pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pick > li {
  position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-1);
  -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease-out);
}
.pick > li.sel { grid-template-columns: 84px minmax(0, 1fr) 44px; padding-right: 8px; }
.pick > li:has(.title):active:not(:has(.tick:active, button:active, form:active)) { transform: scale(0.99); }
@media (hover: hover) { .pick > li:has(.title):hover { border-color: var(--line-2); box-shadow: var(--sh-2); } }
.pick > li:has(.tick input:checked) { background: var(--accent-soft); border-color: var(--accent); }
/* the title link stretches over the whole card; the circle, buttons and inner links stay on top of it */
.pick .title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pick > li :is(.tick, button, form, select, input, .meta a, a.pill) { position: relative; z-index: 1; }
.pick .title:focus-visible { outline: none; }
.pick > li:has(.title:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.pick .pic { display: block; width: 84px; height: 84px; }
/* the circle: its own 44px column on the right */
.pick .tick { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; justify-self: center; }
.pick .tick input { width: 26px; height: 26px; border-radius: 999px; background-size: 15px; }
.pick .tick input:checked { background-color: var(--accent); border-color: var(--accent); }
.thumb { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; background: var(--sunk); box-shadow: inset 0 0 0 1px rgb(18 18 18 / 0.06); }
.pick > li.st-sold .thumb { filter: grayscale(1); opacity: 0.7; }
.thumb.none { display: grid; place-items: center; color: var(--faint); }
.thumb.none .i { width: 24px; height: 24px; }
.pick .body { display: grid; gap: 5px; min-width: 0; }
.pick .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pick .title { color: var(--ink); text-decoration: none; font: 600 16.5px/1.35 var(--ui); overflow-wrap: anywhere; }
.pick .meta { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); font-size: 14px; }
.pick .meta:empty { display: none; }
.pick .meta a { color: var(--ink-2); }
.pick .line-input { margin-top: 6px; min-height: 40px; padding: 8px 12px; font-size: 15px; }
.pick .err { color: var(--danger); font-size: 13.5px; margin: 2px 0 0; }
.pick form { margin-top: 4px; }

.more { margin-top: 12px; }
#results { transition: opacity 120ms ease; }
#results.loading { opacity: 0.55; }
.found { margin: -4px 0 10px; font-size: 14px; }
.more.busy { opacity: 0.55; pointer-events: none; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14.5px; }
.pick > li.empty-state { display: block; }
.empty-state .es-ico {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 16px; background: var(--sunk); color: var(--faint);
}
.empty-state .es-ico .i { width: 26px; height: 26px; }
.empty-state b { display: block; color: var(--ink); font: 600 16px/1.3 var(--ui); margin-bottom: 4px; }

/* ---------- action sheet: appears when something is ticked ---------- */
.actionbar {
  position: fixed; z-index: 30; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(100% - 24px, 760px); max-height: calc(100dvh - 96px); overflow-y: auto;
  display: grid; gap: 10px; padding: 12px;
  background: rgb(36 40 51 / 0.96); color: #fafafa;
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border-radius: var(--r-sheet); box-shadow: var(--sh-pop), inset 0 1px 0 rgb(255 255 255 / 0.08);
  transform: translate(-50%, 0); opacity: 1; visibility: visible;
  transition: transform 300ms var(--ease-drawer), opacity 200ms ease, visibility 0s;
}
.actionbar.idle {
  transform: translate(-50%, calc(100% + 32px)); opacity: 0; visibility: hidden;
  transition: transform 220ms var(--ease-out), opacity 160ms ease, visibility 0s linear 220ms;
}
.actionbar .count { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 0 4px; font: 600 15px/1 var(--ui); }
.actionbar [data-count] {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; margin-right: 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font: 700 14px/1 var(--ui);
}
.actionbar [data-count].bump { animation: bump 180ms var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.actionbar .when-off { display: none; }
.actionbar .clear { color: #c9c9cf; font: 500 14px var(--ui); background: none; border: 0; border-radius: 8px; cursor: pointer; min-height: 32px; padding: 0 10px; transition: color 150ms ease, background-color 150ms ease; }
@media (hover: hover) { .actionbar .clear:hover { color: #fff; background: rgb(255 255 255 / 0.08); } }
.actionbar .count-acts { display: flex; align-items: center; gap: 2px; }
.actionbar [data-select-all] { color: #fff; }
.actionbar [data-select-all][hidden] { display: none; }
.actionbar .acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
/* while the sheet is up, the last cards can still scroll out from under it */
main:has(.actionbar:not(.idle)) { padding-bottom: 340px; }
.actionbar .manage { display: flex; flex-wrap: wrap; gap: 8px; }
.actionbar .move { flex: 1 1 260px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.actionbar .manage > .btn-danger { flex: 0 0 auto; }
.actionbar .btn-danger { background: transparent; border-color: rgb(255 140 130 / 0.38); color: #ff9e95; }
@media (hover: hover) { .actionbar .btn-danger:hover { background: rgb(255 140 130 / 0.12); border-color: rgb(255 140 130 / 0.6); } }
.actionbar .btn { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.14); color: #fafafa; box-shadow: none; font-size: 15px; padding: 6px 12px; white-space: normal; line-height: 1.2; }
@media (hover: hover) { .actionbar .btn:hover { background: rgb(255 255 255 / 0.14); border-color: rgb(255 255 255 / 0.2); } }
.actionbar .btn-mark { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (hover: hover) { .actionbar .btn-mark:hover { background: var(--accent-hover); border-color: var(--accent-hover); } }
.actionbar select, .actionbar input { border-color: transparent; }
.actionbar input:focus, .actionbar select:focus-visible { border-color: transparent; box-shadow: 0 0 0 3px rgb(255 255 255 / 0.32); }
.actionbar .extra { border-top: 1px solid rgb(255 255 255 / 0.1); padding-top: 4px; }
.actionbar .extra summary {
  list-style: none; display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 4px;
  color: #c9c9cf; font: 500 14px var(--ui); cursor: pointer;
}
.actionbar .extra summary::-webkit-details-marker { display: none; }
.actionbar .extra summary::after { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 200ms var(--ease-out); }
.actionbar .extra[open] summary { margin-bottom: 8px; }
.actionbar .extra[open] summary::after { transform: rotate(180deg); }
.actionbar label { color: #d4d4d8; }
.actionbar .field-row { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 8px; }

/* ---------- item card ---------- */
.binhead {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  margin: 6px 0 16px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-1);
}
.binhead .big {
  display: grid; place-items: center; min-width: 84px; height: 68px; padding: 0 14px; border-radius: 12px;
  font: 700 27px/1 var(--ui); letter-spacing: -0.035em; white-space: nowrap;
  background: var(--ink); color: #fff;
}
.binhead.zone-sold .big { background: var(--z-sold); }
.binhead .what { font: 600 17px/1.3 var(--ui); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.binhead .stage { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; font: 500 14px/1.45 var(--ui); color: var(--muted); }
.binhead .stage::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--z); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photos figure { margin: 0; display: grid; gap: 4px; }
.photos > figure:only-child { grid-column: 1 / -1; }  /* one photo: the whole column (Ruslan 20.11) */
.photos > figure:only-child img { aspect-ratio: auto; max-height: 80vh; object-fit: contain; }
.jersey-search { margin: 4px 0 0; }
.photos figure > a { display: block; border-radius: 12px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--sunk); box-shadow: inset 0 0 0 1px rgb(23 23 26 / 0.06); }
.photos .ph-none { aspect-ratio: 1; border-radius: 12px; background: var(--sunk); display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.photos figcaption { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.photos figcaption .n { font: 600 13px/1 var(--ui); color: var(--muted); padding-left: 4px; }
.photos figcaption .btn { min-height: 44px; width: 44px; padding: 0; border-radius: 12px; }
.photos figcaption .btn .i { width: 19px; height: 19px; }
.photos figcaption .inline:last-child .btn { color: var(--danger); }
.upload { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.upload .pick-photos, .upload .up-progress { display: none; }
/* with JS: one big «Add photos», choosing uploads; the plain input + Upload stay for no-JS */
.upload.js { grid-template-columns: 1fr; }
.upload.js input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload.js > .btn:not(.pick-photos) { display: none; }
.upload.js .pick-photos { display: inline-flex; min-height: 52px; border-style: dashed; border-color: var(--line-2); background: var(--surface); cursor: pointer; }
.upload.js .pick-photos:focus-within, .upload.js input:focus-visible + .btn + .pick-photos { outline: 2px solid var(--ink); outline-offset: 2px; }
.upload.busy .pick-photos { opacity: 0.5; pointer-events: none; }
.upload .up-progress:not([hidden]) { display: grid; gap: 6px; }
.up-progress .bar { display: block; height: 6px; border-radius: 999px; background: var(--accent); transform-origin: left; transform: scaleX(0.04); transition: transform 200ms linear; }
.up-progress .txt { color: var(--muted); font: 500 13.5px/1.3 var(--ui); }
.up-progress.bad .txt { color: var(--danger); }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; box-shadow: var(--sh-1); }

/* ---------- People (admin): one row per person — who, access, actions in one line ---------- */
.people { list-style: none; margin: 0; padding: 4px 16px; }
.person { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who state" "acts acts";
  align-items: center; gap: 10px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person .who { grid-area: who; min-width: 0; }
.person .name { font: 600 16px/1.25 var(--ui); color: var(--ink); }
.person .you { font: 500 12.5px/1 var(--ui); color: var(--muted); margin-left: 4px; }
.person .handle { font: 400 13.5px/1.3 var(--ui); color: var(--muted); margin-top: 2px; }
.person .pill { grid-area: state; justify-self: end; }
.person .pill.off { background: rgb(215 39 39 / 0.08); color: #b42318; }
.person .acts { grid-area: acts; display: flex; flex-wrap: wrap; gap: 8px; }
.person .acts form { margin: 0; }
.person .acts .btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
.person .acts .btn .i { width: 16px; height: 16px; }
.ledger { width: 100%; border-collapse: collapse; font-size: 15px; }
.ledger th { text-align: left; font: 500 13px/1 var(--ui); color: var(--muted); padding: 0 6px 10px; border-bottom: 1px solid var(--line); }
.ledger td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger tbody tr:last-child td { border-bottom: 0; padding-bottom: 2px; }
.ledger td.money, .ledger th.money { text-align: right; white-space: nowrap; }
.ledger td.money { font-weight: 600; }
.ledger td .note { color: var(--muted); font-size: 13.5px; }
.ledger .del { width: 44px; text-align: right; }
.scroll-x { overflow-x: auto; }
/* a table wider than the phone: a soft shadow on the side that has more (scrolling shadows) */
.box.scroll-x {
  background:
    linear-gradient(to right, var(--surface) 30%, rgb(255 255 255 / 0)) left / 28px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgb(255 255 255 / 0)) right / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(23 23 26 / 0.14), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(23 23 26 / 0.14), transparent) right / 12px 100% no-repeat scroll,
    var(--surface);
}
.ledger.report th, .ledger.report td { white-space: nowrap; }
.ledger.report td:first-child { font-weight: 600; }
.ledger .del .btn { min-height: 34px; width: 34px; border-radius: 10px; }

/* path: a small vertical track */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 84px 1fr; font-size: 15px; }
.timeline .d { padding: 9px 0; color: var(--muted); font-size: 14px; }
.timeline li > span:last-child { position: relative; padding: 9px 0 9px 20px; border-left: 2px solid var(--line); }
.timeline li > span:last-child::before {
  content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-2);
}
.timeline li:last-child > span:last-child::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.timeline li:first-child > span:last-child { border-image: linear-gradient(to bottom, transparent 15px, var(--line) 15px) 1; }
.timeline li:last-child > span:last-child { border-image: linear-gradient(to bottom, var(--line) 15px, transparent 15px) 1; }
.timeline li:only-child > span:last-child { border-left-color: transparent; border-image: none; }
.timeline .who { color: var(--muted); }
/* a field edit (20.11): quieter than a status step, a small dot */
.timeline li.tl-edit > span:last-child { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.timeline li.tl-edit > span:last-child::before { width: 6px; height: 6px; left: -4px; top: 17px; }

details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-1); }
details.fold > summary {
  list-style: none; cursor: pointer; min-height: 52px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 600 15px var(--ui);
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after {
  content: ""; width: 18px; height: 18px; flex: none; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 200ms var(--ease-out);
}
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > .inner { padding: 0 16px 16px; display: grid; gap: 14px; }
details.fold[open] > .inner { animation: unfold 220ms var(--ease-out); }
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.danger-zone { margin-top: 28px; }
details.fold.danger-zone > summary { color: var(--danger); }
details.fold.danger-zone > summary::after { background: var(--danger); }

/* ---------- parcel ---------- */
.label { margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-1); overflow: hidden; }
.label .lhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.label .lhead .big { font: 600 22px/1.15 var(--ui); letter-spacing: -0.02em; }
.label .lrow { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: baseline; font-size: 15px; }
.label .lrow:last-child { border-bottom: 0; }
.label .k { font: 500 13.5px/1.3 var(--ui); color: var(--muted); }
.label .track { font: 500 18px/1.3 var(--mono); letter-spacing: 0.05em; overflow-wrap: anywhere; }
.label a { font-size: 14px; }
.label a .i { display: inline-block; width: 15px; height: 15px; margin-left: 2px; vertical-align: -2px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; white-space: nowrap;
  border-radius: 999px; font: 600 13px/1 var(--ui); background: var(--sunk); color: var(--ink-2);
}
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-chip.packing { background: color-mix(in oklab, var(--navy) 10%, white); color: var(--navy); }
.status-chip.sent { --z: var(--z-in_parcel); background: color-mix(in oklab, var(--z) 13%, white); color: color-mix(in oklab, var(--z) 85%, black); }
.status-chip.received { --z: var(--z-at_brother); background: color-mix(in oklab, var(--z) 13%, white); color: color-mix(in oklab, var(--z) 85%, black); }
.parcels { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.parcels a.card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-1);
  text-decoration: none; color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease-out);
}
.parcels a.card:active { transform: scale(0.985); }
@media (hover: hover) { .parcels a.card:hover { border-color: var(--line-2); box-shadow: var(--sh-2); } }
.parcels .pn {
  display: grid; place-items: center; min-width: 56px; height: 48px; padding: 0 10px; border-radius: 10px;
  background: var(--ink); color: #fff; font: 700 17px/1 var(--ui); letter-spacing: -0.02em;
}
.parcels .pd { display: grid; gap: 2px; font-size: 15px; min-width: 0; }
.parcels .pd .code { overflow: hidden; text-overflow: ellipsis; }
.parcels > li.muted { padding: 4px 0; font-size: 14px; }

/* ---------- Vlad ---------- */
.jobs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.job { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-1); }
.job .what { font: 600 16px/1.35 var(--ui); }
.job .fix { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--accent-soft); font: 500 15px/1.4 var(--ui); }
.job .fix::before { content: ""; width: 18px; height: 18px; flex: none; margin-top: 1px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23000'%3E%3Cpath d='M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.job .photos { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.job .done { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.job.empty-state { display: block; }

/* ---------- brother: price and publish ---------- */
.preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.preview .gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding-inline: 16px; }
.preview .gallery::-webkit-scrollbar { display: none; }
.preview .gallery img { width: 78%; max-width: 360px; flex: none; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; scroll-snap-align: start; background: var(--sunk); }
.preview .desc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; box-shadow: var(--sh-1); }
.preview .desc :first-child { margin-top: 0; }
.price-box { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: var(--sh-2); }
.price-input { font: 700 30px/1 var(--ui); letter-spacing: -0.02em; min-height: 60px; padding: 10px 14px; }
.price-box .btn { white-space: normal; line-height: 1.25; padding-block: 8px; }

/* ---------- login: the store's black, the crest in white ---------- */
body.auth { background: var(--ink); }
body.auth main { padding: 0 16px; }
body.auth .slip { background: var(--surface); color: var(--ink); }
body.auth .slip::before { background: var(--accent); }
.login { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 32px; padding: 48px 0 64px; }
.login .hero { display: grid; justify-items: center; text-align: center; color: #fff; }
.login .crest-hero { display: block; width: auto; height: 112px; margin-bottom: 20px; }
.login .name { margin: 0; font: 700 22px/1.2 var(--ui); letter-spacing: -0.02em; }
.login .tagline { margin: 4px 0 0; color: rgb(255 255 255 / 0.58); font-size: 15px; }
.login .sheet {
  width: 100%; max-width: 400px; display: grid; gap: 18px; padding: 24px;
  background: var(--surface); border-radius: 24px; box-shadow: 0 32px 64px -24px rgb(0 0 0 / 0.7);
}
.login h1 { font-size: 24px; }
.login .hero, .login .sheet { transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.login .sheet { transition-delay: 80ms; }
@starting-style { .login .hero, .login .sheet { opacity: 0; transform: translateY(10px); } }

/* ---------- import ---------- */
.steps { padding-left: 36px; }
.steps li { padding-left: 4px; }
.steps li::marker { color: var(--muted); font-weight: 600; }

/* ---------- helpers ---------- */
.mt { margin-top: 12px; }
.mt-lg { margin-top: 24px; }
label.check .num { flex: none; }

/* ---------- wider screens ---------- */
@media (min-width: 760px) {
  .topbar { padding: 0 24px; }
  .topbar nav a { padding: 0 12px; height: 36px; }
  .topbar nav a:not([aria-current]) .nl { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .topbar .who { display: inline; }
  .topbar .logout .lbl { display: inline; }
  .topbar .brand .wm { display: inline; }
  main { padding: 28px 24px 140px; }
  h1 { font-size: 32px; }
  .deck { padding: 24px; gap: 14px; }
  .deck .deck-crest { right: -20px; top: -40px; height: 260px; }
  .tally { grid-template-columns: repeat(4, minmax(0, 150px)); }
  .tally dd { font-size: 30px; }
  .pick > li { grid-template-columns: 96px minmax(0, 1fr); padding: 14px 16px; gap: 16px; }
  .pick > li.sel { grid-template-columns: 96px minmax(0, 1fr) 44px; padding-right: 10px; }
  .thumb, .pick .pic { width: 96px; height: 96px; }
  .rail { margin: 14px 0 0; padding: 2px 0 6px; flex-wrap: wrap; overflow: visible; }
  .rail { row-gap: 4px; }  /* the break makes its own empty line: two 4 px gaps = the usual 8 between the rows */
  .rail-break { display: block; flex-basis: 100%; height: 0; }
  .form-actions { bottom: 12px; margin: 8px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-2); background: rgb(255 255 255 / 0.9); }
  .preview { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; column-gap: 20px; }
  .preview > .gallery, .preview > .desc, .preview > .google { grid-column: 1; }
  .preview > .price-box { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 84px; }
  .preview .gallery { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .preview .gallery img { width: calc(50% - 4px); }
}
@media (max-width: 400px) {
  .topbar { gap: 4px; padding: 0 10px; }
  .topbar nav { margin-left: 2px; }
  .topbar nav a { padding: 0 9px; font-size: 14px; }
  .topbar .who { display: none; }
}
@media (max-width: 559px) { .topbar .who { display: none; } }
/* phone, long menu (admin 5, owner 4 sections): icons only, the current one is the dark pill without its name.
   Nothing may shrink (the bar would squeeze the pills); below 400 px the paddings tighten so admin fits 360 px. */
.topbar nav a { flex: none; }
@media (max-width: 759px) {
  .topbar nav.nav-icons a[aria-current] .nl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 400px) {
  .topbar:has(nav.nav-icons) { padding: 0 8px; }
  .topbar nav.nav-icons a { min-width: 38px; padding: 0 8px; }
  .topbar:has(nav.nav-icons) .side { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .btn:active, .rail a:active, .parcels a.card:active, input[type="checkbox"]:active, .topbar .logout:active, .topbar .brand:active { transform: none; }
  .login .hero, .login .sheet { transition: none; }
  .actionbar, .actionbar.idle { transform: translate(-50%, 0); transition: opacity 150ms ease, visibility 0s linear 150ms; }
  .actionbar:not(.idle) { transition: opacity 150ms ease; }
  @starting-style { .slip { transform: none; } }
  .back .i { transition: none; }
}

/* For Marketplace: fields to paste, each with its own copy button */
.mk { margin-top: 24px; }
.mk h2 { margin: 0 0 10px; }
.mk .photos img { border-radius: 12px; }
.mk-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mk .label .lrow { grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; }
.mk .val { overflow-wrap: anywhere; }
.mk .copy { min-height: 44px; padding: 0 12px; font-size: 14px; gap: 6px; }
.mk .copy .i { width: 16px; height: 16px; }
.mk .copy.done { color: var(--ok); }
.mk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mk-head h2 { margin: 0; }
.mk-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.55 var(--ui); padding: 14px 16px; margin: 0; color: var(--ink); }

/* ---------- Help: reading page, one white card per section ---------- */
.topbar a.logout { text-decoration: none; }
.topbar .logout .i { width: 20px; height: 20px; }
.topbar a.help[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.guide .gnav { display: flex; gap: 6px; overflow-x: auto; margin: -4px -16px 16px; padding: 2px 16px 4px; scrollbar-width: none; }
.guide .gnav::-webkit-scrollbar { display: none; }
.guide .gnav a {
  flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font: 500 14px/1 var(--ui);
  text-decoration: none; transition: border-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
}
.guide .gnav a:active { transform: scale(0.97); }
@media (hover: hover) { .guide .gnav a:hover { border-color: var(--line-2); color: var(--ink); } }
.guide .gsec {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-1);
  padding: 4px 18px 18px; margin: 0 0 14px; scroll-margin-top: 76px;
  font-size: 15.5px; line-height: 1.6; color: var(--ink-2);
}
.guide .gsec > h2 { margin: 16px 0 8px; }
.guide .gsec h3 { margin: 22px 0 6px; }
.guide .gsec p { margin: 8px 0; max-width: 68ch; }
.guide .gsec ol, .guide .gsec ul { margin: 6px 0 8px; padding-left: 22px; display: grid; gap: 8px; max-width: 70ch; }
.guide .gsec li ul { margin-top: 8px; }
.guide .gsec li::marker { color: var(--faint); font-weight: 600; }
.guide .gsec a:not(.k) { color: var(--ink); text-underline-offset: 2px; text-decoration-color: var(--line-2); overflow-wrap: anywhere; }
/* a button or field name as it reads on screen */
.guide .k {
  display: inline; padding: 1px 7px; border-radius: 7px; background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); font-weight: 600; font-size: 0.93em; white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.guide .path { line-height: 2.1; }
.guide .gsec .num { display: inline-block; padding: 1px 6px; border-radius: 6px; background: var(--ink); color: #fff; font: 700 13px/1.5 var(--ui); }
.guide .gfold { margin: 0 0 14px; }
.guide .gfold > summary { padding: 0 18px; }
.guide .gfold > .inner { padding: 0 6px 6px; }
.guide .gfold .gsec { border: 0; box-shadow: none; margin: 0; padding-top: 0; }
.guide .gfold .gsec > h2 { display: none; }
.gwords { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 14.5px; }
.gwords th, .gwords td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.4; }
.gwords th { width: 46%; padding-right: 12px; color: var(--ink); font-weight: 600; }
.gwords td { color: var(--muted); }
.gwords tr:last-child > * { border-bottom: 0; }
@media (min-width: 760px) { .guide .gnav { margin: -4px 0 18px; padding: 2px 0 4px; flex-wrap: wrap; } .guide .gsec { padding: 6px 24px 22px; } }

/* ---------- «Undo» after a move: a navy slip at thumb height, a line that runs out ---------- */
.undo {
  position: fixed; z-index: 31; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(100% - 24px, 560px); transform: translate(-50%, 0);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 10px 12px 16px; overflow: hidden;
  background: var(--navy); color: #f4f4f5; border-radius: 16px; box-shadow: var(--sh-pop), inset 0 1px 0 rgb(255 255 255 / 0.08);
  font: 500 15px/1.35 var(--ui);
  transition: transform 240ms var(--ease-out), opacity 200ms ease;
}
@starting-style { .undo { transform: translate(-50%, 12px); opacity: 0; } }
.undo.gone { transform: translate(-50%, 12px); opacity: 0; pointer-events: none; }
.undo .msg { overflow-wrap: anywhere; }
.undo .btn { min-height: 40px; padding: 0 14px; background: #fff; border-color: #fff; color: var(--ink); box-shadow: none; }
@media (hover: hover) { .undo .btn:hover { background: #ececee; border-color: #ececee; } }
.undo .timer {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent);
  transform-origin: left; animation: undo-run var(--undo-ms, 3000ms) linear forwards;
}
@keyframes undo-run { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .undo, .undo.gone { transform: translate(-50%, 0); } .undo .timer { animation: none; opacity: 0.5; } }

/* ---------- date fields: our calendar on a computer (static/datepicker.js); phones keep the system one ---------- */
html.dp-on input[type="date"] {
  cursor: pointer; padding-right: 40px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%2364646d'%3E%3Cpath d='M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Z'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
}
html.dp-on input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
html.dp-on input[type="date"][aria-expanded="true"] { border-color: var(--ink-2); box-shadow: 0 0 0 4px var(--ring); }
.dp {
  position: absolute; z-index: 60; width: 300px; padding: 12px 12px 10px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-pop);
  font: 500 14px/1 var(--ui); opacity: 0; transform: translateY(-4px);
  transition: opacity 140ms ease, transform 200ms var(--ease-out);
}
.dp.up { transform: translateY(4px); }
.dp.on { opacity: 1; transform: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; padding-left: 8px; }
.dp-title { font: 600 15.5px/1 var(--ui); letter-spacing: -0.01em; }
.dp-nav { display: flex; gap: 2px; }
.dp button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dp-nav button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--ink-2); transition: background-color 120ms ease, transform 160ms var(--ease-out); }
.dp-nav button:active { transform: scale(0.94); }
.dp-nav .i { width: 16px; height: 16px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-wd { display: grid; place-items: center; height: 28px; color: var(--faint); font: 600 11px/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; }
.dp-day {
  height: 36px; border-radius: 10px; font-weight: 500; font-variant-numeric: tabular-nums;
  transition: background-color 120ms ease, color 120ms ease;
}
.dp-day.out { color: var(--faint); }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--line-2); font-weight: 650; }
.dp-day.sel, .dp-day.sel.today { background: var(--accent); color: #fff; font-weight: 650; box-shadow: none; }
.dp-day:disabled { color: var(--line-2); cursor: default; }
.dp-day:focus-visible, .dp-nav button:focus-visible, .dp-foot button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-foot button { height: 32px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 13.5px; transition: background-color 120ms ease; }
.dp-foot [data-today] { color: var(--ink); }
@media (hover: hover) {
  .dp-nav button:hover, .dp-foot button:hover, .dp-day:not(:disabled):not(.sel):hover { background: var(--sunk); }
  .dp-day.sel:hover { background: var(--accent-hover); }
}
@media (prefers-reduced-motion: reduce) { .dp, .dp.up { transform: none; } }

/* ---------- messages: news on navy, errors on white with a red edge and a warning sign ---------- */
.slip.error { background: var(--surface); color: var(--danger); box-shadow: var(--sh-2), inset 0 0 0 1px #f0c9c7; }
.slip.error::before {
  background: var(--danger);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z'/%3E%3C/svg%3E");
}
.linkish { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.price-box .notice { margin: 0 0 4px; }
.set-number { display: grid; gap: 10px; margin: 12px 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sheet); }
.set-number .notice { margin: 0; }
.set-number input { max-width: 10em; }

/* a field «Done» is waiting for */
[aria-invalid="true"], [aria-invalid="true"]:hover, [aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgb(179 38 30 / 0.12); }
label.missing { color: var(--danger); }
section.missing { border-radius: var(--r-card); box-shadow: 0 0 0 2px var(--danger); padding: 4px 8px 8px; }

/* error page: what happened in plain words, and two ways out */
.oops { margin: 48px 0 0; padding: 28px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-1); }
.oops .code { margin: 0 0 8px; color: var(--faint); font: 700 14px/1 var(--ui); letter-spacing: 0.08em; }
.oops h1 { font-size: 22px; line-height: 1.3; margin: 0 0 20px; }

/* filter chips above a tab's list (Sold → «No sale recorded») */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font: 500 14px/1 var(--ui); text-decoration: none; transition: border-color 150ms ease, transform 160ms var(--ease-out); }
.chip .n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--sunk); font-size: 12.5px; font-weight: 600; }
.chip .i { width: 14px; height: 14px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on .n { background: var(--accent); color: #fff; }
.chip:active { transform: scale(0.97); }
@media (hover: hover) { .chip:not(.on):hover { border-color: var(--line-2); color: var(--ink); } }
a.pill.quiet { text-decoration: none; color: var(--muted); }
@media (hover: hover) { a.pill.quiet:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); } }

/* ---------- Recount (Unclear one at a time): big photos, three thumb-size answers ---------- */
.triage { display: grid; gap: 14px; }
.tri-photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.tri-photos::-webkit-scrollbar { display: none; }
.tri-photos img { flex: none; width: min(100%, 520px); aspect-ratio: 1; object-fit: cover; border-radius: var(--r-card); background: var(--sunk); scroll-snap-align: center; }
.tri-none { display: grid; place-items: center; gap: 6px; aspect-ratio: 2; border-radius: var(--r-card); background: var(--sunk); color: var(--faint); }
.tri-none .i { width: 34px; height: 34px; }
.tri-body h2 { margin: 6px 0 4px; }
.tri-body .top { display: flex; align-items: center; gap: 10px; }
.tri-body .num { display: inline-block; padding: 2px 7px; border-radius: 6px; background: var(--ink); color: #fff; font: 700 14px/1.4 var(--ui); }
.tri-acts { display: grid; gap: 8px; }

/* ---------- small things from the 17.11 audit ---------- */
.pick .title { text-wrap: pretty; }
.actionbar .clear { min-height: 40px; padding: 0 12px; }
/* messages stay in view below the top bar while the page scrolls to an anchor */
.slips { position: sticky; top: 72px; z-index: 25; }
.slip { cursor: pointer; }
.slip.gone { opacity: 0; transform: translateY(-6px); }
/* a tapped button waits for the server */
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy .i { opacity: 0; }
.btn.busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) var(--muted); animation: spin 700ms linear infinite;
}
.btn-mark.busy::after, .btn-primary.busy::after { border-color: #fff transparent #fff #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- photo viewer (static/lightbox.js): over the page, with a way back ---------- */
[data-lightbox] { cursor: zoom-in; }
html.lb-open { overflow: hidden; }
dialog.lb {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: #0c0c0e; color: #fff; display: grid; place-items: center; overscroll-behavior: contain;
  opacity: 1; transition: opacity 160ms ease, display 160ms allow-discrete, overlay 160ms allow-discrete;
}
dialog.lb:not([open]) { display: none; opacity: 0; }
@starting-style { dialog.lb[open] { opacity: 0; } }
dialog.lb::backdrop { background: transparent; }
dialog.lb img {
  max-width: 100vw; max-height: calc(100dvh - 128px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  object-fit: contain; user-select: none; -webkit-user-select: none; touch-action: pan-y pinch-zoom;
}
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: rgb(0 0 0 / 0.55); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.lb-btn .i { width: 22px; height: 22px; }
.lb-btn:active { transform: scale(0.94); }
@media (hover: hover) { .lb-btn:hover { background: rgb(0 0 0 / 0.75); } }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-prev, .lb-next { top: 50%; margin-top: -22px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
dialog.lb.single .lb-prev, dialog.lb.single .lb-next { display: none; }
.lb-count { position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); text-align: center; color: rgb(255 255 255 / 0.8); font: 600 14px/1 var(--ui); font-variant-numeric: tabular-nums; }

/* ---- Tasks board (tl- = board, task- = card sheet). Phone columns and drag styles: tasks.js / Task 3. ---- */
/* position: relative so the absolutely positioned hidden labels (.sr) inside the scroller cannot widen the page */
.tl-board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; position: relative; }
.tl-list { flex: 0 0 280px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px; display: grid; gap: 8px; }
.tl-list-head { display: flex; gap: 6px; align-items: center; }
.tl-rename { flex: 1; min-width: 0; position: relative; } /* holds its visually hidden submit inside the board scroller */
.tl-list-title { font-weight: 600; background: transparent; border-color: transparent; box-shadow: none; }
.tl-icon-btn { min-height: 36px; padding: 0 10px; }
.tl-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-height: 44px; border-radius: var(--r-ctl); }  /* an empty list is still a target to drop on */
.tl-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: var(--sh-1); }
.tl-card-link { cursor: inherit; display: grid; gap: 8px; padding: 10px 12px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.tl-card-top { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.tl-card-mark { color: var(--muted); display: inline-flex; flex: none; }
.tl-card-mark .i { width: 16px; height: 16px; }
.tl-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; position: relative; }
.task-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.task-backdrop { position: absolute; inset: 0; background: rgb(18 18 18 / 0.45); }
/* The card: a fixed head (where, Save, Close) over a body that scrolls on its own, so the scrollbar runs inside the card
   under the head and clear of the rounded corners (Ruslan 20.11: «скролл всередине карточки»). */
.task-sheet { position: relative; width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: var(--r-sheet); box-shadow: var(--sh-pop); }
.task-sheet:focus, .task-sheet:focus-visible { outline: none; }  /* the script focuses the card itself for the keys; a ring round the whole card is not a control (Ruslan 20.11: «рамка не красивая») */
/* the sheet's rhythm (Ruslan 19.11: «отступы ужасные»): the head, then blocks 16px apart with a hairline between */
.task-head { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.task-head > .task-where { flex: 1 1 150px; }  /* too narrow beside Save and Close: it takes its own line above them */
.task-head-acts { flex: none; display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 479px) {  /* a phone: Close is its cross alone (it keeps aria-label), so the head stays one line */
  .task-close { width: 44px; padding: 0; justify-content: center; }
  .task-close-word { display: none; }
}
.task-save[disabled] { opacity: 0.4; cursor: default; box-shadow: none; transform: none; }
.task-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; padding: 0 8px 24px 20px; margin: 0 6px 8px 0; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.task-where { margin: 0; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; color: var(--muted); font-size: 13px; }  /* wraps: Save and Close share the head with it on a phone */
.task-where b { color: var(--ink-2); font-weight: 600; }
.task-close { flex: none; }
.task-body > .task-form, .task-body > .task-linked, .task-body > .task-sec { padding: 16px 0; }
.task-body > .task-sec { border-top: 1px solid var(--line); }
.task-body > .task-linked { padding-top: 0; }
/* Move and Archive close the card as one block: a hairline above, room between them (Ruslan 20.11: «отступы») */
.task-body > .task-move { padding-top: 16px; border-top: 1px solid var(--line); }
.task-body > .task-act { margin: 12px 0 0; }
.task-sec > .sub { margin: 0; }
.task-form > .btn { justify-self: start; }
.task-due-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.task-due-row .task-check { min-height: 44px; }
.task-form, .task-move { display: grid; gap: 12px; }
.task-move { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
.task-archived { justify-self: start; margin: 0; }
main.tl-main { max-width: 1240px; }  /* centred like the other pages (Ruslan 19.11: full width was awkward); fits 3 lists + "Add a list", more scroll inside .tl-board */
.tl-board.tl-dragging .tl-cards { outline: 2px dashed var(--line-2); outline-offset: -2px; }
main:has(.task-overlay) .slips { position: fixed; top: 12px; left: 16px; right: 16px; z-index: 60; margin: 0; }  /* messages above an open card */
.tl-board.tl-dragging { scroll-snap-type: none; }
/* Card badges (tile and sheet). Text/background pairs are WCAG AA (4.5:1 and better). */
.tl-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tl-badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 999px; font: 500 12.5px/1 var(--ui); background: var(--sunk); color: #4a4a52; white-space: nowrap; }  /* 7.6:1 */
.tl-badge .i { width: 14px; height: 14px; }
.due-later { background: var(--sunk); color: #4a4a52; }
.due-soon { background: #fff1cc; color: #7a4a00; }  /* 6.7:1 */
.due-overdue { background: #fde7e7; color: #9b1c1c; }  /* 6.9:1 */
.due-done, .tl-check-done { background: #dff3e6; color: #14603a; }  /* 6.6:1 */
.tl-avatars { display: inline-flex; margin-left: auto; }
.tl-avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.tl-avatars .avatar:first-child { margin-left: 0; }
.tl-more { display: inline-flex; align-items: center; margin-left: 4px; font: 600 12px/1 var(--ui); color: var(--muted); }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 50%; font: 600 11px/1 var(--ui); color: #fff; letter-spacing: 0; }
.av-0 { background: #2563c9; } .av-1 { background: #0d7f73; } .av-2 { background: #b34a08; }  /* white text: 5.7, 4.9, 5.4 */
.av-3 { background: #6d4ad1; } .av-4 { background: #8a5a2b; } .av-5 { background: #1f7a45; }  /* 5.9, 5.9, 5.4 */
.task-sec { display: grid; gap: 10px; }
.task-sec h2 { margin: 0; font-size: 15px; }
.task-sec-form { display: grid; gap: 10px; }
.task-sec-form > .btn { justify-self: start; }
.task-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.task-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.task-pick, .task-check { display: flex; gap: 10px; align-items: center; min-height: 38px; font-weight: 500; }
.task-pick .avatar { width: 28px; height: 28px; font-size: 12px; }
.task-due { grid-template-columns: minmax(0, 1fr); }
.task-bar { height: 8px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.task-bar span { display: block; height: 100%; background: var(--ok); }
.task-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.task-ci { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.task-ci-text { position: relative; }  /* holds its visually hidden submit */
.task-ci.is-done .task-ci-text input { color: var(--muted); text-decoration: line-through; }
.task-tick { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: transparent; cursor: pointer; }
.task-tick .i { width: 18px; height: 18px; }
.task-tick[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
/* Labels. Text on each colour is AA: white on green 5.4, red 5.2, purple 5.5, blue 5.7; dark on yellow 12.2, orange 6.3. */
.label-green { background: #1f7a45; color: #fff; }
.label-yellow { background: #f5cd47; color: #121212; }
.label-orange { background: #e07b00; color: #121212; }
.label-red { background: #c9372c; color: #fff; }
.label-purple { background: #7c4dcc; color: #fff; }
.label-blue { background: #2563c9; color: #fff; }
.tl-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.tl-label { display: inline-flex; align-items: center; max-width: 100%; min-height: 20px; padding: 0 8px; border-radius: 6px; font: 600 12px/1.2 var(--ui); overflow-wrap: anywhere; }
.tl-label-bare { width: 40px; height: 8px; min-height: 0; padding: 0; border-radius: 4px; }
.task-lab { min-height: 28px; font-size: 14px; padding: 2px 12px; }
.task-lab.tl-label-bare { width: 56px; height: 20px; min-height: 0; padding: 0; }
.task-newlabel summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 6px; margin-left: -6px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.task-newlabel summary::-webkit-details-marker { display: none; }
.task-newlabel summary:hover { background: var(--sunk); }
.task-newlabel summary .i { width: 16px; height: 16px; }
.task-newlabel[open] summary { margin-bottom: 8px; }
/* Shirts on a card (sheet and tile) and a shirt's Tasks block. */
.tl-js [data-autosubmit] .autosubmit-save { display: none; }  /* tasks.js sends these forms on a tick; without it the button stays */
.tl-shirts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 12px 10px; }
.tl-card.has-shirts .tl-card-link { padding-bottom: 8px; }
.tl-shirt { position: relative; z-index: 1; padding-left: 2px; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; }
a.tl-shirt:hover { text-decoration: underline; }
.tl-shirt-pic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; overflow: hidden; background: var(--surface); color: var(--faint); flex: none; }
.tl-shirt-pic img { width: 100%; height: 100%; object-fit: cover; }
.tl-shirt-pic .i { width: 12px; height: 12px; }
.task-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.task-thumb { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--sunk); color: var(--faint); box-shadow: inset 0 0 0 1px rgb(18 18 18 / 0.06); }
.task-thumb img { width: 100%; height: 100%; object-fit: cover; }
.task-thumb .i { width: 22px; height: 22px; }
.task-item-body { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.task-item-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.task-item-sm { grid-template-columns: 32px minmax(0, 1fr); }  /* the shirt right under the card's title: no «Remove», no status */
.task-item-sm .task-thumb { width: 32px; height: 32px; border-radius: 8px; }
.task-item-sm .task-thumb .i { width: 16px; height: 16px; }
.task-item-sm .task-item-body { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.tl-sg-wrap { min-width: 0; }  /* static on purpose: the suggestions hang under the whole .tl-add row, so names get the full width */
.tl-board:has(.tl-suggest) { padding-bottom: 150px; }  /* the board scrolls (overflow-x), so room for the open list under the last field */
.tl-sg-wrap input { width: 100%; }
.tl-suggest { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; list-style: none; margin: 0; padding: 4px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-ctl); box-shadow: var(--sh-pop); }
.tl-suggest-opt { display: grid; grid-template-columns: 32px auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px; border-radius: 8px; cursor: pointer; min-height: 40px; }
.tl-suggest-opt:hover, .tl-suggest-opt.is-active { background: var(--sunk); }
.tl-suggest-pic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; overflow: hidden; background: var(--sunk); color: var(--faint); }
.tl-suggest-pic img { width: 100%; height: 100%; object-fit: cover; }
.tl-suggest-pic .i { width: 16px; height: 16px; }
.tl-suggest-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-suggest-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 13px; }
.item-tasks { display: grid; gap: 10px; margin-top: 18px; }
.item-tasks h2 { margin: 0; font-size: 16px; }
.item-task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item-task-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.item-task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-head-links { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.swatch { position: relative; display: block; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.swatch span:not(.sr) { display: block; width: 32px; height: 32px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgb(18 18 18 / 0.15); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.swatch input:focus-visible + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.lab-list { list-style: none; margin: 0; padding: 0; display: grid; }
.lab-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.lab-row:first-child { border-top: 0; }
.lab-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lab-form input[name="name"] { flex: 1 1 160px; min-width: 0; }
.lab-new { padding: 12px; }
.tl-grip { flex: none; width: 32px; height: 36px; cursor: grab; touch-action: none; border-radius: var(--r-ctl); color: var(--muted); background: radial-gradient(circle, currentColor 1.5px, transparent 2px) center / 10px 10px; }
.tl-card, .tl-card-link { cursor: grab; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }  /* no iOS link preview fighting the drag delay */
.tl-card-link { cursor: inherit; }
.tl-ghost { opacity: 0.4; }
.tl-chosen { box-shadow: var(--sh-pop); }
.tl-drag { transform: rotate(1.5deg); }
@media (max-width: 759px) {
  .tl-board { scroll-snap-type: x mandatory; scroll-padding-inline: 16px; }
  .tl-list { flex-basis: 86vw; scroll-snap-align: start; }
  .task-overlay { padding: 0; place-items: stretch; }
  .task-sheet { width: 100%; max-height: none; height: 100%; border-radius: 0; }
  .task-head { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .task-body { margin: 0; padding: 0 20px calc(24px + env(safe-area-inset-bottom, 0px)); scrollbar-gutter: auto; }
}
@media (min-width: 760px) { .task-sheet { width: min(640px, 100%); } }
@media (prefers-reduced-motion: reduce) { .tl-drag { transform: none; } }
.task-arch { list-style: none; margin: 0 0 16px; padding: 0; }
.task-arch li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.task-arch li:first-child { border-top: 0; }
.task-arch .t { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
/* ---- Tasks part 3: comments and activity in the sheet ---- */
.task-comment-form textarea { width: 100%; }
.task-mentions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-mention { min-height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 14px/1 var(--ui); cursor: pointer; }
@media (hover: hover) { .task-mention:hover { background: var(--sunk); } }
.task-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.task-comment, .task-event { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.task-comment .avatar, .task-event .avatar { width: 28px; height: 28px; font-size: 12px; }
.task-comment-body, .task-event > div { min-width: 0; display: grid; gap: 4px; }
.task-comment-head, .task-event-text, .task-comment-text, .task-event p { margin: 0; }
.task-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.task-comment-text .mention { color: var(--accent); font-weight: 600; }
.task-comment-text a { color: var(--ink); font-weight: 600; }
.task-comment-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: flex-start; }
.task-comment-acts form { margin: 0; }
.task-cedit summary, .task-link-btn { cursor: pointer; color: var(--muted); font: 500 14px/1.2 var(--ui); padding: 8px 0; min-height: 36px; background: none; border: 0; }
.task-link-btn:hover, .task-cedit summary:hover { color: var(--ink); text-decoration: underline; }
.task-cedit[open] { flex: 1 1 100%; }
.task-cedit .task-sec-form { margin-top: 4px; }
.task-activity { border-top: 1px solid var(--line); padding-top: 8px; }
.task-activity summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.task-activity .task-feed { margin-top: 8px; }
.tl-comments { color: var(--muted); }
/* ---- Tasks part 3: «new for you» ---- */
.topbar nav a { position: relative; }
.nav-count { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 11px/16px var(--ui); text-align: center; box-shadow: 0 0 0 2px var(--sunk); font-variant-numeric: tabular-nums; }
.topbar nav a[aria-current="page"] .nav-count { box-shadow: 0 0 0 2px var(--ink); }
@media (min-width: 760px) { .nav-count { position: static; margin-left: 2px; box-shadow: none !important; } }
/* the current item of a menu with words shows its label: the count sits after it, never on top of it */
.topbar nav:not(.nav-icons) a[aria-current] { white-space: nowrap; }
.topbar nav:not(.nav-icons) a[aria-current] .nav-count { position: static; margin-left: 4px; box-shadow: none; }
.tl-card.is-new { border-color: var(--accent); }
.tl-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }  /* stretched link: the whole tile opens the card; the shirt chips sit above it */
.tl-card-link:focus-visible { outline: none; }
.tl-card-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-ctl); }
.tl-new-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); vertical-align: middle; flex: none; }
.tl-card .tl-new-dot { position: absolute; top: 8px; right: 8px; }
.tl-card.is-new .tl-card-link { padding-right: 24px; } /* room for the dot: it never sits on the title or the icons */
.tl-head-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 12px/1 var(--ui); }
.task-mine { list-style: none; padding: 0; margin: 0 0 16px; }
.task-mine-row { display: grid; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.task-mine-row:first-child { border-top: 0; }
.task-mine-main { display: grid; gap: 4px; min-width: 0; }
.task-mine-title { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.task-mine-title .tl-new-dot { margin-left: 4px; }
/* ---- Tasks part 4: photos and files on a card, the cover on the tile ---- */
.tl-cover { display: block; width: calc(100% + 24px); max-width: none; height: auto; max-height: 160px; margin: 0 -12px; object-fit: cover; border-radius: calc(var(--r-ctl) - 1px) calc(var(--r-ctl) - 1px) 0 0; background: var(--sunk); pointer-events: none; -webkit-user-drag: none; user-select: none; }
.tl-card.has-cover .tl-card-link { padding-top: 0; }
.tl-card.is-new.has-cover .tl-card-link { padding-right: 12px; }  /* the dot sits on the picture, not beside the title */
.tl-files { color: var(--muted); }
.task-pics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.task-pic { position: relative; display: grid; align-content: start; gap: 2px; min-width: 0; }  /* position: the badge stays inside the tile */
.task-pic-img { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sunk); box-shadow: inset 0 0 0 1px rgb(18 18 18 / 0.06); }
.task-pic-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.task-pic.is-cover .task-pic-img { box-shadow: 0 0 0 2px var(--accent); }
.task-pic-badge { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 11px/1.3 var(--ui); }
.task-pic-name { margin: 0; overflow-wrap: anywhere; color: var(--muted); }
.task-pic-acts { display: flex; flex-wrap: wrap; gap: 0 12px; }
.task-pic-acts form, .task-file form { margin: 0; }
.task-file { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.task-file-name { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.task-upload input[type="file"] { max-width: 100%; }
.task-sec.is-drop { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: var(--r-ctl); }

/* ---------- Sales page and sellers (Ruslan 19.11) ---------- */
/* a seller's nickname: a tap copies it (no search); red with a warning when a fake came from them */
.copy-nick { position: relative; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin: -3px -6px; padding: 3px 6px; border: 0; border-radius: 6px; background: none; font: inherit; color: var(--ink); text-align: left; cursor: copy; }
.copy-nick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-nick:hover { background: var(--sunk); }
.copy-nick .i { width: 15px; height: 15px; flex: none; }
.copy-nick.is-fake { color: var(--danger); font-weight: 600; }
.copy-nick.copied::after { content: "Copied"; position: absolute; left: 100%; top: 50%; transform: translate(6px, -50%); padding: 3px 8px; border-radius: 6px; background: var(--ink); color: #fff; font: 600 12px/1.2 var(--ui); white-space: nowrap; pointer-events: none; }
/* «Margin» explained on hover / tap instead of a footnote */
.money-deck { overflow: visible; }
.tip { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: help; outline: none; }
.tip > .i { width: 14px; height: 14px; }
.tip-body { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: min(340px, 78vw); padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); box-shadow: var(--sh-pop); font: 400 13px/1.45 var(--ui); white-space: normal; text-transform: none; letter-spacing: 0; opacity: 0; visibility: hidden; transition: opacity 120ms ease, visibility 120ms; pointer-events: none; }
.tip:hover .tip-body, .tip:focus .tip-body { opacity: 1; visibility: visible; }
.tip:focus-visible { border-radius: 4px; box-shadow: 0 0 0 2px rgb(255 255 255 / 0.5); }
.report abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.report tr.undated td { color: var(--muted); border-top: 1px dashed var(--line-2); }
/* latest sales: the shirt's photo and what it earned, in a green box on the right */
.pick > li.sale-row { grid-template-columns: 84px minmax(0, 1fr) auto; }
.earned { display: grid; justify-items: end; gap: 3px; padding: 8px 12px; border-radius: 12px; background: #dff3e6; color: #14603a; font: 700 19px/1.05 var(--ui); font-variant-numeric: tabular-nums; white-space: nowrap; }  /* 6.6:1 */
.earned-k { font: 600 11px/1 var(--ui); letter-spacing: 0.04em; text-transform: uppercase; }
.earned.loss { background: #fde7e7; color: #9b1c1c; }  /* 6.9:1 */

/* ---------- Parcels: what the shirts inside cost (Nikita 20.11) ---------- */
.warn-text { display: inline-flex; align-items: center; gap: 4px; color: #8a4b00; font-weight: 600; }  /* 6.1:1 on white */
.warn-text .i { width: 14px; height: 14px; flex: none; }
.parcels .pd .warn-text { margin-top: 2px; }
.parcel-total { margin-top: 12px; }
.parcel-total .sub-row .k, .parcel-total .sub-row > span:last-child { color: var(--muted); font-size: 14px; }

/* ---------- Vlad's namesets: the card's Repair block, batches (Nikita 20.11) ---------- */
.repair-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.repair-fields { display: grid; gap: 12px; }
.repair-fields[hidden] { display: none; }
.btn.is-off { opacity: 0.45; cursor: not-allowed; }
.patches { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.patches legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.patch-list { display: flex; flex-wrap: wrap; gap: 6px; }
.patch { position: relative; display: inline-flex; }
.patch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.patch span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font: 500 14px/1.2 var(--ui); }
.patch input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.patch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ref { display: grid; gap: 8px; justify-items: start; }
.ref-k { font-weight: 600; }
.ref-img { width: 140px; height: 140px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.ref-acts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.pill.repair-badge { background: #fff1cc; color: #7a4a00; }  /* 6.7:1 */
.pill.repair-badge .i { width: 13px; height: 13px; }
.chips .chip .i { width: 15px; height: 15px; }
.pick > li.repair-row { grid-template-columns: 84px minmax(0, 1fr) auto; }
.pick > li.repair-row.is-fixed { background: #f3fbf6; }
.repair-what { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tick-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--muted); font: 600 12px/1 var(--ui); cursor: pointer; }
.tick-btn .i { width: 22px; height: 22px; }
.tick-btn.on { background: #dff3e6; border-color: #9fd5b3; color: #14603a; }
.status-chip.batch-draft { background: var(--sunk); color: var(--ink-2); }
.status-chip.batch-sent { background: #fff1cc; color: #7a4a00; }
.status-chip.batch-done { background: #dff3e6; color: #14603a; }

/* Vlad's read-only board and sheet (20.11): names and texts in place of the fields he may not change */
.tl-list-name { flex: 1; min-width: 0; margin: 0; padding: 8px 10px; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.task-read-title { margin: 0; font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
.task-read-desc { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.task-ci-read { overflow-wrap: anywhere; }
.task-ci:has(.task-ci-read) { grid-template-columns: auto minmax(0, 1fr); }
.task-ci.is-done .task-ci-read { color: var(--muted); text-decoration: line-through; }

/* a linked shirt: №, then «Site» / «eBay» pills while it is for sale there; the name links to the shirt (Ruslan 20.11) */
.task-item-top { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.task-ext { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); font: 600 12px/1 var(--ui); text-decoration: none; white-space: nowrap; }
.task-ext .i { width: 12px; height: 12px; }
.task-ext:hover { background: var(--line); color: var(--ink); }
a.task-item-name { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a.task-item-name:hover { text-decoration-color: currentColor; }

/* Payroll (20.11): one row per half-month or per Vlad's job — when, how much, «Paid» */
.pay-person { margin-top: 24px; }
.pay-list { list-style: none; margin: 0; padding: 0 16px; display: grid; }
.pay-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.pay-row:first-child { border-top: 0; }
.pay-when, .pay-sum { display: grid; gap: 2px; min-width: 0; }
.pay-sum { text-align: right; font-variant-numeric: tabular-nums; }
.pay-act { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.pay-row.is-paid .pay-sum b { color: var(--muted); }
.pay-note { grid-column: 1 / -1; margin: 0; color: #b42318; }
.pay-src { grid-column: 1 / -1; margin: 0; color: var(--muted); }
.pay-edit { grid-column: 1 / -1; }
.pay-edit-form { display: flex; gap: 8px; margin: 8px 0; }
.pay-edit-form input { max-width: 140px; }
.pay-edit-period { flex-wrap: wrap; align-items: flex-end; }
.pay-edit-period label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.pay-edit-period label input { width: 110px; }
.pay-edit-period label.wide { flex: 1 1 100%; }
.pay-edit-period label.wide input { width: 100%; max-width: none; }
.step-back { margin: 8px 0 12px; }
.pay-items { grid-column: 1 / -1; }
.pay-items summary { cursor: pointer; color: var(--muted); }
.pay-items p { margin: 6px 0 0; }
@media (max-width: 479px) { .pay-row { grid-template-columns: minmax(0, 1fr) auto; } .pay-act { grid-column: 1 / -1; justify-content: flex-start; } }
.repair-ticks { display: flex; flex-direction: column; gap: 6px; }
