:root {
  --page: #f3f4f5;
  --surface: #ffffff;
  --surface-alt: #f8f9fa;
  --border: #e3e5e8;
  --border-strong: #cfd3d8;
  --text: #1b1d20;
  --muted: #6a7078;
  --accent: #2f6f5e;
  --accent-hover: #24594b;
  --accent-soft: #e8f1ee;
  --accent-border: #cfe4dc;
  --flag: #b3441e;
  --flag-soft: #fdf1ea;
  --flag-border: #f0d3bf;
  --flag-selected: #f8e4d8;
  --danger: #b3301e;
  --danger-soft: #fdf1ef;
  --danger-border: #e6bdb4;
  --ok: #2f7a4d;
  --ok-soft: #e6f3ec;
  --ok-border: #c9e4d5;
  --warn: #9a6a12;
  --warn-soft: #fbf3df;
  --warn-border: #efdcae;
  --image-bg: #ecedef;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(20, 24, 28, 0.06);
  --scrim: rgba(20, 24, 28, 0.4);
  --modal-shadow: 0 12px 40px rgba(20, 24, 28, 0.22);
  color-scheme: light;
}

/* Dark mode: automatic (follows the OS) unless overridden, or explicit via the
   toggle in the header (dashboard/common.js sets data-theme on <html> and
   remembers the choice in localStorage, like the timezone setting). The two
   blocks below carry the same values on purpose: one for "system prefers dark
   and the user hasn't chosen light", one for "the user explicitly chose dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #16191c;
    --surface: #1e2226;
    --surface-alt: #24282d;
    --border: #32373d;
    --border-strong: #40464d;
    --text: #e8eaed;
    --muted: #9aa2ab;
    --accent: #52b699;
    --accent-hover: #6bcab0;
    --accent-soft: #1d332c;
    --accent-border: #2f4a42;
    --flag: #e2895a;
    --flag-soft: #3a2a20;
    --flag-border: #4a3626;
    --flag-selected: #3d2f26;
    --danger: #e2685a;
    --danger-soft: #3a2321;
    --danger-border: #4a2f29;
    --ok: #57b880;
    --ok-soft: #1e3327;
    --ok-border: #2c4636;
    --warn: #d1a655;
    --warn-soft: #3a3120;
    --warn-border: #4a3d22;
    --image-bg: #26292d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    --scrim: rgba(0, 0, 0, 0.55);
    --modal-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --page: #16191c;
  --surface: #1e2226;
  --surface-alt: #24282d;
  --border: #32373d;
  --border-strong: #40464d;
  --text: #e8eaed;
  --muted: #9aa2ab;
  --accent: #52b699;
  --accent-hover: #6bcab0;
  --accent-soft: #1d332c;
  --accent-border: #2f4a42;
  --flag: #e2895a;
  --flag-soft: #3a2a20;
  --flag-border: #4a3626;
  --flag-selected: #3d2f26;
  --danger: #e2685a;
  --danger-soft: #3a2321;
  --danger-border: #4a2f29;
  --ok: #57b880;
  --ok-soft: #1e3327;
  --ok-border: #2c4636;
  --warn: #d1a655;
  --warn-soft: #3a3120;
  --warn-border: #4a3d22;
  --image-bg: #26292d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --scrim: rgba(0, 0, 0, 0.55);
  --modal-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* Author display rules (e.g. display:flex on the settings overlay and detail
   panel) otherwise beat the UA's [hidden] { display: none }. */
[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 20px 28px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  background: var(--page);
  display: flex;
  flex-direction: column;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --- header --- */

#page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}

h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 10px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

#session-info {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* --- toolbar --- */

#toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

#toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

#toolbar label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 7px;
  height: 31px;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  cursor: pointer;
}

#toolbar input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  margin: 0;
}

#toolbar input[type="text"],
#toolbar select {
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  height: 31px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

#toolbar input[type="text"]:focus,
#toolbar select:focus,
.stacked input:focus,
.stacked select:focus,
.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

#count {
  margin-left: auto;
  align-self: center;
  font-size: 12px;
}

#export-csv {
  align-self: center;
}

.field-value a {
  color: var(--accent);
  text-decoration: none;
}

.field-value a:hover {
  text-decoration: underline;
}

/* --- two-pane layout --- */

#layout {
  flex: 1;
  min-height: 0;
  display: flex;
}

#log-panel {
  flex: 1;
  min-width: 260px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#panel-resizer {
  flex-shrink: 0;
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: col-resize;
  touch-action: none;
  z-index: 1;
}

#panel-resizer::before {
  content: "";
  width: 4px;
  height: 44px;
  border-radius: 2px;
  background: var(--border);
}

#panel-resizer:hover::before,
#panel-resizer:focus-visible::before,
#panel-resizer.dragging::before {
  background: var(--accent);
}

#panel-resizer:focus-visible {
  outline: none;
}

body.resizing-panels {
  cursor: col-resize;
  user-select: none;
}

body.resizing-panels * {
  cursor: col-resize !important;
}

#detail-panel {
  width: 390px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#detail-panel.auto-following {
  border-top-color: var(--accent);
}

#detail-empty {
  margin: auto;
  text-align: center;
  font-size: 13px;
  max-width: 220px;
}

/* --- log table --- */

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-alt);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: default;
}

thead th[data-sort] {
  cursor: pointer;
  user-select: none;
}

thead th[data-sort]:hover,
thead th.sorted {
  color: var(--text);
}

thead th.sorted::after {
  content: " " attr(data-dir);
  color: var(--accent);
}

tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr {
  cursor: pointer;
  transition: background 0.08s;
}

tbody tr:hover {
  background: var(--surface-alt);
}

tbody tr.selected {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

tbody tr.flagged {
  background: var(--flag-soft);
}

tbody tr.flagged.selected {
  background: var(--flag-selected);
  box-shadow: inset 3px 0 0 var(--flag);
}

.thumb {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-alt);
}

.price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.flag-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--flag);
  margin-right: 6px;
  vertical-align: middle;
}

/* --- badges --- */

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  text-transform: capitalize;
  background: var(--surface-alt);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge-high {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: var(--ok-border);
}

.badge-medium {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn-border);
}

.badge-low {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}

/* --- detail panel content --- */

#detail-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
}

#detail-content img.detail-image {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  background: var(--image-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.detail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.detail-title {
  font-weight: 650;
  font-size: 14px;
}

.detail-price {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.warning-banner,
.corrected-banner {
  font-size: 12px;
  border-radius: var(--radius-sm);
  padding: 6px 9px;
}

.warning-banner {
  color: var(--flag);
  background: var(--flag-soft);
  border: 1px solid var(--flag-border);
}

.corrected-banner {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  overflow-y: auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.field-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.field-value {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.field input,
.field select {
  font: inherit;
  font-size: 13px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.detail-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* --- buttons --- */

.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.btn:hover {
  background: var(--surface-alt);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn-danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.btn-danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.button-row {
  display: flex;
  gap: 8px;
}

/* --- settings modal --- */

#settings-overlay {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#settings-modal {
  width: 540px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--modal-shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#settings-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
}

#settings-modal section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

#settings-modal section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.stacked {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.stacked input,
.stacked select {
  font: inherit;
  font-size: 13px;
  color: var(--text);
  height: 33px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 10px;
}

/* --- header actions / link buttons --- */

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

a.btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* --- Insights page --- */

body.scroll-page {
  display: block;
  height: auto;
  min-height: 100vh;
}

body.scroll-page #toolbar {
  margin-bottom: 16px;
}

#tz-note {
  margin-left: auto;
  align-self: center;
  font-size: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-head h3 {
  margin: 0;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-svg .grid {
  stroke: var(--border);
  stroke-width: 1;
}

.chart-svg .axis {
  stroke: var(--border-strong);
  stroke-width: 1;
}

.chart-svg .tick {
  font-size: 10px;
  fill: var(--muted);
}

.chart-svg .bar {
  fill: var(--accent);
}

.chart-svg .bar:hover {
  fill: var(--accent-hover);
}

.empty-chart {
  padding: 40px 0;
  text-align: center;
}

.buyers-wrap {
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.buyers-wrap thead th {
  background: var(--surface-alt);
}

th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.strong,
.strong {
  font-weight: 600;
}

.buyer-name {
  font-weight: 600;
}

.badge-repeat,
.badge-top {
  margin-left: 6px;
}

.badge-repeat {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

.badge-top {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn-border);
}

.buyer-row.open {
  background: var(--accent-soft);
}

.buyer-detail:hover {
  background: transparent;
}

.buyer-detail td {
  background: var(--surface-alt);
  padding: 6px 10px 10px 42px;
}

.purchase-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.purchase {
  display: grid;
  grid-template-columns: 150px 1fr 80px;
  gap: 12px;
  font-size: 13px;
}

/* --- fees --- */

.detail-net {
  font-size: 12px;
  color: var(--muted);
  margin-top: -6px;
}

.detail-net strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.fee-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.subhead {
  font-size: 12px;
  font-weight: 650;
  margin: 12px 0 4px;
}

.fee-row {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 1.1fr 0.7fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.fee-row input {
  font: inherit;
  font-size: 13px;
  min-width: 0;
  height: 31px;
  padding: 0 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.fee-row-head {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 2px;
}

.fee-row-head span:last-child {
  width: 30px;
}

.error-text {
  color: var(--danger);
  font-size: 12px;
  margin: 6px 0 0;
}

/* --- market comps --- */

.market-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.market-block > .btn {
  align-self: flex-start;
  margin-top: 2px;
}

.market-summary {
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.market-note {
  font-size: 12px;
  color: var(--warn);
}

.market-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
}

.comp-list {
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 168px;
  overflow-y: auto;
}

.comp-row {
  display: grid;
  grid-template-columns: 70px 48px 1fr;
  gap: 8px;
  padding: 4px 8px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

.comp-row:last-child {
  border-bottom: 0;
}

.comp-price {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.comp-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

a.comp-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* --- big-buyer alerts --- */

#alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.alert-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.alert-head {
  font-size: 14px;
  margin-bottom: 2px;
}

.alert-line {
  color: var(--text);
}

.alert-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* --- inventory scanner --- */

#inv-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

#inv-banner {
  margin-bottom: 12px;
}

#cam-panel {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cam-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #15181b;
  border-radius: var(--radius-sm);
}

#cam-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#cam-empty {
  position: absolute;
  color: #9aa0a6;
}

#cam-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

#cam-flash.on {
  animation: cam-flash 0.25s ease-out;
}

@keyframes cam-flash {
  from { opacity: 0.85; }
  to { opacity: 0; }
}

.cam-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cam-controls select {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.upload-btn {
  text-align: center;
  cursor: pointer;
}

#inv-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#inv-table tbody tr {
  cursor: default;
}

.inv-thumb {
  width: 56px;
  height: 72px;
  object-fit: contain;
}

.inv-title {
  font-weight: 650;
}

.inv-value {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.inv-actions {
  white-space: nowrap;
  text-align: right;
}

.star {
  font-size: 16px;
  color: var(--muted);
}

.star.on {
  color: var(--warn);
}

#heavy-hitters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

#heavy-hitters:empty {
  display: none;
}

.chip {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

tr.pending td,
tr.sub-row td {
  background: var(--surface-alt);
}

.edit-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  #inv-layout {
    grid-template-columns: 1fr;
  }

  #cam-panel {
    position: static;
  }
}

#inv-table .comp-row {
  grid-template-columns: 80px 56px 1fr;
}

/* --- now selling (live price check) --- */

.now-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.now-strip.verdict-under { border-left-color: var(--danger); background: var(--danger-soft); }
.now-strip.verdict-fair { border-left-color: var(--accent); }
.now-strip.verdict-over { border-left-color: var(--ok); background: var(--ok-soft); }

.now-left { min-width: 200px; flex: 1; }
.now-kicker, .now-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.now-title { font-size: 15px; font-weight: 650; }
.now-figure { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.now-pending { color: var(--muted); }
.now-verdict { font-size: 13px; font-weight: 700; }

/* big-screen page */

body.now-page {
  display: block;
  height: auto;
  min-height: 100vh;
  padding: 24px 32px;
}

#now-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
#now-title { font-size: 34px; font-weight: 700; line-height: 1.15; }
#now-card { font-size: 20px; margin-top: 6px; }
.now-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 32px 0 24px; }
.now-huge { font-size: clamp(56px, 11vw, 140px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
#now-bidmeta, #now-medmeta { font-size: 20px; margin-top: 8px; }
#now-band { font-size: clamp(28px, 5vw, 56px); font-weight: 800; padding: 14px 20px; border-radius: var(--radius); background: var(--surface-alt); }
body.verdict-under #now-band { background: var(--danger-soft); color: var(--danger); }
body.verdict-over #now-band { background: var(--ok-soft); color: var(--ok); }
#now-status { font-size: 22px; margin-top: 16px; }
