* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--line) 45%, var(--bg)) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
#content:focus, [tabindex="-1"]:focus { outline: none; }

.account-form { display: grid; gap: 12px; margin-top: 16px; }
.account-form label { display: grid; gap: 4px; color: var(--muted); font-size: var(--text-meta); }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.account-error { color: var(--danger); margin: 0; }
.value { margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.market-when::before { content: " · "; }
@media (max-width: 800px) {
  .market-when { display: block; }
  .market-when::before { content: none; }
}
.view-toggle .active, .pip.on, .pill.on, .set-modes .on, .detail-side .on {
  background: transparent;
  color: var(--gold);
  border-color: transparent;
}
.page-title {
  margin: 0 0 var(--space-4);
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: var(--text-title);
}
.crumb { margin: 0 0 4px; color: var(--muted); font-size: var(--text-meta); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--text); }
.crumb [aria-current="page"] { color: var(--text); }

#content { flex: 1 0 auto; display: flex; flex-direction: column; min-width: 0; }
#content > .gate, #content > .view, #content > .landing { flex: 1 0 auto; }
.gate { display: grid; place-items: center; min-height: 0; padding: 24px; }
.gate-card { max-width: 460px; }
.gate-card h1 { font-family: Georgia, serif; font-weight: 500; font-size: var(--text-title); line-height: 1.05; }
.muted { color: var(--muted); }
.bar { height: var(--space-1); background: var(--line); border-radius: var(--radius-pill); margin-top: 16px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--gold); }

.view { padding: var(--space-2) var(--space-5) var(--space-6); }
.missing-links { display: flex; flex-wrap: wrap; gap: 8px; }
.missing-links .btn { min-height: 44px; }
.composer { padding: 0 0 12px; }
.intake {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--space-2);
  align-items: center;
  margin: 0;
}
.intake label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.line-wrap { position: relative; min-width: 0; }
.line-wrap .field { width: 100%; }
.line-suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--raised);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--elev-shadow);
  max-height: min(320px, 50vh);
  overflow: auto;
}
.line-suggest li { margin: 0; }
.line-suggest button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: var(--radius-row);
  cursor: pointer;
}
.line-suggest button[aria-selected="true"] {
  background: color-mix(in srgb, var(--gold) 22%, transparent);
}
.toast {
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  position: sticky;
  bottom: var(--space-2);
  z-index: 8;
}
.toast button { margin-left: var(--space-2); flex: none; }
@media (max-width: 800px) {
  .toast {
    position: fixed;
    left: var(--space-2);
    right: var(--space-2);
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: auto;
    margin: 0;
    box-shadow: var(--elev-shadow);
  }
}
.recent { margin: 0 0 var(--space-4); }
.recent-wide { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-narrow { display: none; }
.recent-more summary {
  cursor: pointer;
  color: var(--muted);
  padding: 14px 0;
  font-size: var(--text-meta);
}
.recent button {
  max-width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-3);
  color: var(--muted);
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
}

.tools, .facets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: var(--space-2); min-width: 0; max-width: 100%; }
.tools input { flex: 1; min-width: min(180px, 100%); max-width: 100%; }
.tools select, .facets select { max-width: 100%; }
.view-toggle button { border-radius: var(--radius-pill); border: 1px solid var(--line); background: transparent; padding: 8px 12px; }
.pips, .pills, .chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pip, .pill, .chip {
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: transparent;
  padding: var(--space-2) var(--space-3);
}
.chip button { border: 0; background: transparent; color: var(--gold); padding: 0 0 0 var(--space-2); }
.tally { margin: 4px 0 12px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr));
  gap: 16px;
}
.tile {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  min-width: 0;
}
.frame {
  position: relative;
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: var(--raised);
  aspect-ratio: 488 / 680;
  box-shadow: 0 10px 24px rgb(0 0 0 / 28%);
}
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.foil .frame { box-shadow: 0 0 0 1px var(--foil), 0 10px 24px rgb(0 0 0 / 28%); }
.tile.selected .frame { box-shadow: 0 0 0 3px var(--gold), 0 10px 24px rgb(0 0 0 / 28%); }
.qty {
  position: absolute;
  left: 8px;
  top: 8px;
  background: var(--ink);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-meta);
}
.pick {
  display: none;
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgb(0 0 0 / 55%);
}
.tile.selected .pick { display: block; background: var(--gold); border-color: var(--gold); }
.tile.selected .pick::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.sheet tr.selected td { background: color-mix(in srgb, var(--gold) 18%, transparent); }
body.selecting .tile,
body.selecting .sheet tr {
  -webkit-touch-callout: none;
  user-select: none;
}
.tile .name { font-family: Georgia, serif; margin: 0 0 var(--space-1); line-height: 1.2; min-height: 2.4em; }
.tile .sub { margin: 0 0 8px; }
.thumb .sub { margin: 0 0 var(--space-1); }
.tile .sub, .sheet td { color: var(--muted); font-size: var(--text-meta); }
.sheet-scroll { max-width: 100%; overflow-x: auto; }
.sheet { width: 100%; border-collapse: collapse; }
.sheet th { text-align: left; font-weight: 500; color: var(--muted); font-size: var(--text-meta); }
.sheet th, .sheet td { padding: var(--space-2); border-bottom: 1px solid var(--line); }
.sheet button { background: none; border: 0; padding: 0; text-align: left; }
.card-more { min-height: 24px; margin: var(--space-4) 0; }

.set-board { margin: var(--space-2) 0 var(--space-4); }
.set-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-2);
}
.set-board h2, #owned-block h2, .set-board-head h2 {
  margin: var(--space-4) 0 var(--space-2);
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: var(--text-section);
}
.set-board-head h2 { margin: 0; }
.sort-label { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: var(--text-meta); }
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.page-head .page-title { margin: 0; }
#set-find { width: min(280px, 100%); }
.sets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr));
  gap: 8px;
}
.set-tile {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: var(--space-2);
  row-gap: var(--space-1);
  align-items: start;
  text-align: left;
  text-decoration: none;
  color: inherit;
  font: inherit;
  padding: var(--space-2) var(--space-3);
}
.sets-owned .set-tile { padding: 12px; grid-template-columns: 48px minmax(0, 1fr); }
.sets-owned .set-tile img,
.sets-owned .set-tile .set-code-fallback { width: 44px; height: 44px; }
.sets-rest { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.set-tile img, .set-code-fallback {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
}
.set-tile img {
  object-fit: contain;
  filter: invert(0.92) sepia(0.25) saturate(0.45) hue-rotate(350deg);
}
.set-code-fallback {
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: var(--text-micro);
  font-variant: all-small-caps;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-align: center;
  color: var(--gold);
}
.set-count {
  font-variant-numeric: tabular-nums;
  font-size: var(--text-label);
  line-height: 1.2;
}
.set-count strong { color: var(--gold); font-weight: 600; }
.set-name {
  color: var(--text);
  font-size: var(--text-meta);
  line-height: 1.25;
  white-space: normal;
}
.set-tile.empty .set-count { color: var(--muted); }
.set-tile.empty img,
.set-tile.empty .set-code-fallback { opacity: 0.85; }
.set-tile.has, .set-tile.on, .set-tile:hover { opacity: 1; }
.set-tile:hover { opacity: 1; border-color: var(--gold); }

.set-hero { margin-bottom: var(--space-4); }
.back {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--text-meta);
}
.back:hover { color: var(--text); }
.set-hero-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: var(--space-2); }
.set-hero-copy { flex: 1; min-width: min(100%, 220px); }
.set-hero-row .variants-toggle { margin-left: auto; }
.set-hero-icon { width: 72px; height: 72px; object-fit: contain; filter: invert(0.92) sepia(0.25) saturate(0.45) hue-rotate(350deg); }
.set-hero-row > .set-code-fallback {
  width: 72px;
  height: 72px;
  flex: none;
  font-size: var(--text-label);
}
.set-hero h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: var(--text-title);
}
.set-fraction { margin: 4px 0 0; font-size: var(--text-section); font-variant-numeric: tabular-nums; }
.set-fraction strong { color: var(--gold); }
.progress { height: 4px; width: min(280px, 100%); background: var(--line); border-radius: var(--radius-pill); margin-top: var(--space-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--gold); }
.set-modes { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 8px 0 16px; }
.set-modes button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: var(--space-2) 0;
  color: var(--muted);
}
.set-modes .on { color: var(--text); border-bottom-color: var(--gold); }
.missing-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.missing {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 4px;
  color: var(--text);
}
.missing .num { color: var(--gold); font-variant-numeric: tabular-nums; }

.queue-body { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: var(--space-5); align-items: start; }
.queue-column {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow: auto;
  padding-right: var(--space-2);
}
.queue-column h2 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 0 var(--space-2);
  padding: var(--space-1) 0 var(--space-2);
  background: var(--bg);
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: var(--text-section);
}
.queue-column h2 span {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--line);
  color: var(--gold);
  font-family: "Segoe UI", Candara, sans-serif;
  font-size: var(--text-meta);
  text-align: center;
}
.q-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  margin-bottom: 12px;
}
.q-item {
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
}
.q-copy { min-width: 0; }
.q-copy strong,
.q-copy .sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
/* Help copy sits behind the list; keep it from colliding with long waiting titles. */
#queue-list { position: relative; z-index: 1; }
#queue-detail > .muted { position: relative; z-index: 0; }
.q-item.active { border-color: var(--gold); background: var(--raised); }
.q-row.fresh .q-item { background: var(--raised); }
.q-dismiss { justify-self: start; }
.picker-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 8px;
}
.picker-title { flex: 1; min-width: 180px; }
.picker-title h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: var(--text-section);
}
.picker-title p { margin: var(--space-1) 0 0; color: var(--muted); font-size: var(--text-meta); }
.picker-head input { width: min(240px, 100%); }
.picker {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: stretch;
  min-height: 0;
}
.preview {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.preview-scroll { min-height: 0; overflow: auto; flex: 0 1 auto; }
.preview-act { flex: none; }
.preview img {
  width: 100%;
  max-height: min(42vh, 360px);
  object-fit: contain;
  object-position: top center;
  border-radius: var(--radius-panel);
  display: block;
}
.preview .meta { margin: 0 0 8px; }
.thumb-wrap { min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.detail h2 { margin-top: 8px; }
.detail .hero { margin-top: 8px; }
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, 72px);
  gap: var(--space-1);
  align-content: start;
}
.thumb {
  width: auto;
  min-width: 0;
  padding: var(--space-1);
  border-radius: var(--radius-row);
  border: 1px solid var(--line);
  background: transparent;
  text-align: center;
}
.thumb img, .thumb-fallback {
  width: 100%;
  height: auto;
  aspect-ratio: 488 / 680;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-thumb);
}
.thumb-fallback { background: var(--raised); }
.thumb .sub {
  display: block;
  margin: 0 0 var(--space-1);
  font-size: var(--text-micro);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumbs.dense .sub { display: none; }
.retry { display: grid; gap: 8px; max-width: 560px; }
.retry input { width: 100%; }
#use-printing { width: 100%; white-space: normal; }
.thumb.picked { border-color: var(--gold); }
.finish { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

.detail {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(440px, 100%);
  background: var(--raised);
  border-left: 1px solid var(--line);
  overflow: auto;
  padding: var(--space-5);
  z-index: 12;
  box-shadow: -20px 0 40px rgb(0 0 0 / 35%);
}
body[data-detail-side="left"] .detail {
  right: auto;
  left: 0;
  border-left: 0;
  border-right: 1px solid var(--line);
  box-shadow: 20px 0 40px rgb(0 0 0 / 35%);
}
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11;
  background: var(--overlay);
  border: 0;
  padding: 0;
  cursor: pointer;
}
.detail-handle {
  display: none;
  width: 40px;
  height: 4px;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--line);
}
@media (max-width: 800px) {
  .detail,
  body[data-detail-side="left"] .detail {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: min(86svh, 720px);
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--line);
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
    box-shadow: var(--sheet-shadow);
    padding: var(--space-3) var(--space-4) calc(var(--space-5) + env(safe-area-inset-bottom));
    padding-bottom: calc(var(--space-5) + 64px + env(safe-area-inset-bottom));
  }
  .detail-handle { display: block; }
  body.detail-open { overflow: hidden; }
}
.detail img.hero { width: 100%; border-radius: var(--radius-panel); }
.detail h2 { font-family: Georgia, serif; font-weight: 500; margin-bottom: 0; }
.face { white-space: pre-wrap; }
.holding-edit { display: grid; gap: 8px; margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.holding-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.detail-bar .close-detail { float: none; }
.detail-side { display: flex; align-items: center; gap: 8px; }
.detail-side button {
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 12px;
}
.shelf-field { display: block; position: relative; margin-top: var(--space-1); }
.shelf-field .field { width: 100%; }
.shelf-field.has-shelves .field { padding-right: 2.25rem; }
.shelf-open {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 2.25rem;
  height: 100%;
  pointer-events: none;
}
.shelf-field.has-shelves .shelf-open { display: grid; place-items: center; }
.shelf-open::before {
  content: "";
  border: 5px solid transparent;
  border-top-color: var(--muted);
  transform: translateY(3px);
}
.shelf-field.open .shelf-open::before { transform: translateY(-2px) rotate(180deg); }
.shelf-menu {
  position: fixed;
  z-index: 20;
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-row);
  box-shadow: 0 12px 28px rgb(0 0 0 / 35%);
  overflow: auto;
}
.shelf-menu button {
  display: block;
  width: 100%;
  text-align: left;
  white-space: normal;
  background: transparent;
  border: 0;
  border-radius: var(--radius-thumb);
  color: var(--text);
  padding: var(--space-2) var(--space-3);
}
.shelf-menu button.on,
.shelf-menu button:hover {
  background: var(--raised);
  color: var(--gold);
}
.siblings { display: flex; gap: 8px; overflow: auto; }
.siblings button { width: 92px; background: none; border: 0; padding: 0; }
.siblings img { width: 92px; border-radius: var(--radius-row); }
.close-detail { float: right; }

.rail {
  margin-top: auto;
  flex-shrink: 0;
  padding: var(--space-2) var(--space-5);
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: var(--text-micro);
  line-height: 1.45;
}
.rail p { margin: 0; }

body.reviewing, body.scanning {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.reviewing #content, body.scanning #content { flex: 1 1 auto; min-height: 0; }
body.reviewing .site-header, body.scanning .site-header { padding-top: 6px; padding-bottom: 4px; }
body.reviewing .wordmark, body.scanning .wordmark { font-size: var(--text-section); }
body.reviewing .value, body.scanning .value { font-size: var(--text-meta); }
body.reviewing .intake { gap: 8px; }
body.reviewing .intake input { padding: var(--space-2) var(--space-3); }

body.reviewing .toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-2);
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  z-index: 8;
  margin: 0;
}
body.reviewing footer, body.scanning footer, body.reviewing .recent, body.scanning .recent { display: none; }
body.scanning #scan-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 4px 12px 8px;
}
.scan-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
}
.scan-stage, .scan-rail { min-height: 0; overflow: auto; }
.scan-stage {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#scan-live {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.scan-rail { border-left: 1px solid var(--line); padding-left: 12px; }
.scan-rail-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.scan-rail-head h2 { margin: 0; font-size: var(--text-label); font-weight: 500; }
.scan-rail-actions { display: flex; gap: var(--space-2); align-items: center; }
.scan-row { display: grid; grid-template-columns: var(--thumb) minmax(0, 1fr); gap: var(--space-2); align-items: center; margin-bottom: 12px; }
.scan-row button[data-scan] { min-width: 0; text-align: left; background: none; border: 0; padding: 0; }
.scan-row img { width: var(--thumb); border-radius: var(--radius-thumb); display: block; background: var(--bg); }
.scan-row strong { display: block; }
.scan-row .sub { display: block; color: var(--muted); font-size: var(--text-meta); }
.scan-row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.scan-frame {
  position: relative;
  flex: 1;
  min-height: 280px;
  background: #000;
  border-radius: var(--radius-panel);
}
#scan-video {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: var(--radius-panel);
  object-fit: contain;
  display: block;
}
.scan-sheet {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: var(--radius-row);
  cursor: move;
  touch-action: none;
}
.scan-sheet-handle {
  position: absolute;
  width: var(--space-4);
  height: var(--space-4);
  border: 1px solid var(--gold);
  background: var(--raised);
  border-radius: var(--radius-thumb);
}
.scan-sheet-handle[data-corner="nw"] { left: calc(var(--space-2) * -1); top: calc(var(--space-2) * -1); cursor: nwse-resize; }
.scan-sheet-handle[data-corner="ne"] { right: calc(var(--space-2) * -1); top: calc(var(--space-2) * -1); cursor: nesw-resize; }
.scan-sheet-handle[data-corner="sw"] { left: calc(var(--space-2) * -1); bottom: calc(var(--space-2) * -1); cursor: nesw-resize; }
.scan-sheet-handle[data-corner="se"] { right: calc(var(--space-2) * -1); bottom: calc(var(--space-2) * -1); cursor: nwse-resize; }
.scan-guess {
  position: absolute;
  z-index: 3;
  left: var(--space-2);
  bottom: var(--space-2);
  max-width: calc(100% - var(--space-4));
  padding: 8px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  pointer-events: none;
}
.scan-guess strong { display: block; }
.scan-guess .sub { display: block; color: var(--muted); font-size: var(--text-meta); }
.scan-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: var(--space-2); }
.scan-qty { display: flex; align-items: center; gap: var(--space-2); color: var(--muted); }
.scan-qty input { width: 4.5rem; }
#scan-pick {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}
.scan-modal {
  width: min(720px, 100%);
  max-height: min(84vh, 680px);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 16px;
}
#scan-pick .picker { min-height: 0; }
body.reviewing #queue-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  /* Same side and title padding as Collection and Decks. Bottom stays short so the list fills the screen. */
  padding: var(--space-4) var(--space-5) 8px;
}
body.reviewing .queue-body {
  flex: 1;
  min-height: 0;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
body.reviewing .queue-column {
  position: static;
  top: auto;
  max-height: none;
  height: 100%;
}
body.reviewing .queue-detail {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.reviewing .picker {
  flex: 1;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
}

@media (max-width: 800px) {
  .view, footer, .composer { padding-left: 16px; padding-right: 16px; }
  body.reviewing #queue-view { padding-left: 16px; padding-right: 16px; }
  .value, .recent, .tools, .facets { width: 100%; min-width: 0; }
  .recent { display: block; max-width: calc(100vw - 32px); }
  .recent-wide { display: none; }
  .recent-narrow { display: block; max-width: 100%; }
  .recent button { display: block; width: 100%; max-width: 100%; margin-top: 8px; }
  .tools { flex-direction: column; align-items: stretch; }
  .tools input, .tools select { width: 100%; max-width: 100%; min-width: 0; }
  .page-title, .set-hero h1 { font-size: var(--text-brand); }
  .page-head { flex-direction: column; align-items: flex-start; }
  .sort-label, .set-hero-row .variants-toggle { margin-left: 0; }
  .set-hero-row .variants-toggle { flex-basis: 100%; }
  .intake { grid-template-columns: 1fr; }
  .intake .btn { width: 100%; }
  .queue-body, .scan-body { grid-template-columns: 1fr; }
  .scan-body { grid-template-rows: minmax(0, 1fr) auto; }
  .scan-rail { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: var(--space-2); max-height: 34vh; }
  .queue-column { position: static; max-height: 34vh; }
  .picker { grid-template-columns: 1fr; }
  body.reviewing .queue-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(140px, 32vh) minmax(0, 1fr);
  }
  body.reviewing .queue-column {
    max-height: none;
    height: 100%;
    min-height: 0;
    overflow: auto;
  }
  body.reviewing .queue-detail {
    overflow: auto;
    min-height: 0;
  }
  body.reviewing .picker { grid-template-columns: 92px minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #table { min-width: 640px; }
  .facets select { flex: 1 1 140px; }
  .import-actions {
    position: sticky;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    z-index: 2;
    background: var(--bg);
    padding-top: var(--space-2);
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .import-actions .btn { flex: 1; min-height: 48px; }
  .import-map { grid-template-columns: 1fr; }
  .import-link, .import-account { flex-direction: column; align-items: stretch; }
  .import-link .btn, .import-account .btn { min-height: 44px; width: 100%; }
  .import-drop { justify-items: stretch; text-align: center; }
  .import-drop #import-pick { width: 100%; }
  .import-drop-hint { display: none; }
  .import-table-wrap { max-height: 36vh; }
}

.import-drop {
  border-style: dashed;
  padding: var(--space-5);
  margin-bottom: 8px;
  display: grid;
  gap: var(--space-2);
  justify-items: start;
}
.import-drop.over { border-color: var(--gold); }
.import-drop p { margin: 0; }
.import-drop-lead { font-weight: 600; }
.import-drop #import-pick { min-height: 48px; }
.import-remote .btn, .import-actions .btn, .import-list {
  min-height: 44px;
}
.import-list {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0;
  padding: 8px 0;
}
.import-list input { width: 22px; height: 22px; flex: 0 0 auto; }
.import-map {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(140px, 220px) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin: 8px 0;
}
.import-map select { width: 100%; }
#import-grid input {
  width: 100%;
  min-width: 7rem;
  background: transparent;
  border: 0;
  padding: var(--space-2) var(--space-1);
}
#import-grid td { padding: 0 var(--space-2); }
.import-table-wrap { overflow: auto; max-height: 42vh; }
.import-choices { margin: 16px 0; }
.import-choices label { display: flex; gap: 8px; align-items: baseline; margin: 8px 0; }
.import-needs, .import-assumed { margin-top: 8px; }
.import-assumed h2, .import-needs h2 { font-size: var(--text-label); font-weight: 500; margin: 16px 0 8px; }
.import-card {
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
}
.import-card.active { border-color: var(--gold); background: var(--raised); }
#import-printing-picker { margin: 8px 0 12px; }
#import-printing-picker .thumbs { max-height: 280px; overflow: auto; }
#import-print-filter {
  width: min(100%, 280px);
  margin-bottom: 8px;
}
.import-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-4);
  padding-bottom: 8px;
}
.import-remote { margin: var(--space-4) 0 var(--space-2); }
.import-link, .import-account {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}
.import-account { margin-top: 8px; }
.import-link input, .import-account input { flex: 1; min-width: 12rem; }
#import-lists { margin-top: 8px; }
.import-error { color: var(--danger); }
.import-banner { margin: 0 0 var(--space-4); }
.import-banner button { margin-left: 8px; }

/* Bot tokens (Cloudflare build) */
.token-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.5rem; }
.token-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.token-list li .btn { margin-left: auto; }
.token-new code, .token-list code { word-break: break-all; }
.token-new code { user-select: all; }
/* "Can clear Queue items" (test accounts only): a full-width row with a thumb-sized target. */
.account-form .token-scope { display: grid; gap: var(--space-1); }
.account-form .token-scope[hidden] { display: none; }
.account-form .token-scope-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--text);
  font-size: var(--text-label);
}
.account-form .token-scope input { margin: 0; width: 20px; height: 20px; }
.account-form .token-scope .hint { margin: 0 0 0 28px; }
.token-list .token-badge { font-size: var(--text-meta); }

/* ------------------------------------------------------------------ header */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -100px;
  z-index: 50;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: var(--space-3) var(--space-5);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 44px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: var(--text-brand);
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-row);
}
.wordmark-glyph { width: 0.8em; height: 1.07em; flex: none; }
.wordmark-glyph rect { fill: var(--raised); stroke: var(--gold); stroke-width: 2; }
.wordmark-glyph path { fill: var(--gold); }

.primary-nav { flex: 1; min-width: 0; }
.nav-list { display: flex; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  border-radius: 2px;
}
.nav-list a:hover { color: var(--text); }
.nav-list a.active { color: var(--text); border-bottom-color: var(--gold); }
.nav-list a .count { color: var(--gold); margin-left: 4px; }

.header-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; flex: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 40px; font-weight: 600; }
.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn.quiet:hover:not(:disabled) { border-color: var(--muted); }

.user-menu { position: relative; }
.user-menu summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--raised);
  color: var(--text);
  list-style: none;
  cursor: pointer;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { border-color: var(--gold); }
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9375rem;
}
.user-email { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; }
.caret { width: 12px; height: 12px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.user-menu[open] .caret { transform: rotate(180deg); }
.user-menu .menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--space-2));
  right: 0;
  display: grid;
  gap: 2px;
  min-width: 240px;
  padding: var(--space-2);
  box-shadow: 0 16px 36px rgb(0 0 0 / 28%);
}
.menu-who { margin: 0; padding: var(--space-2) var(--space-3) var(--space-3); border-bottom: 1px solid var(--line); margin-bottom: var(--space-1); font-size: var(--text-meta); overflow-wrap: anywhere; }
.menu-who strong { font-size: 0.9375rem; font-weight: 600; }
.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-row);
  background: none;
  text-align: left;
  color: inherit;
  font: inherit;
  text-decoration: none;
  line-height: 1.3;
}
.menu-item:hover, .menu-item:focus-visible { background: color-mix(in srgb, var(--line) 60%, transparent); }
.menu-item[hidden] { display: none; }
.menu-sep { height: 1px; margin: 4px var(--space-2); background: var(--line); }
#sign-out { color: var(--muted); }

.site-header .value { margin: var(--space-1) 0 0; }
body:not(.signed-in) .site-header .value { display: none; }
/* Until /api/session answers, show neither "Sign in" nor the account menu. */
body.booting .header-actions, body.booting .primary-nav { visibility: hidden; }

@media (max-width: 720px) {
  .site-header { padding: var(--space-2) var(--space-4); }
  .header-row { gap: var(--space-3); }
  .wordmark { font-size: 1.375rem; }
  .user-email { display: none; }
  .user-menu summary { padding: 4px; gap: 4px; }
  /* Signed in: the bottom tab bar replaces the header links. */
  body.signed-in .primary-nav { display: none; }
}
/* ------------------------------------------------------------------ landing */
/* Everything fits one screen at 390x844 and 1280x800: no scrolling. */

.landing {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(var(--space-4), 4vh, var(--space-6)) var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(var(--space-4), 4vh, var(--space-6));
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.95fr);
  gap: var(--space-6);
  align-items: center;
}
.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--gold);
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 var(--space-4);
  font-family: Georgia, "Iowan Old Style", serif;
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  line-height: 1.05;
  text-wrap: balance;
}
.hero-lead { max-width: 36rem; margin: 0 0 var(--space-5); color: var(--muted); font-size: 1.125rem; line-height: 1.5; }
.btn-lg { min-height: 48px; padding: 12px 28px; font-size: 1rem; }
.hero-note { margin: var(--space-3) 0 0; font-size: var(--text-meta); }
.hero-note a { color: var(--gold); text-underline-offset: 3px; }

.still { min-width: 0; }
.still-app {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 70%, var(--raised));
  box-shadow: var(--elev-shadow);
}
.still-kicker {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-micro);
  letter-spacing: 0.02em;
  font-weight: 600;
}
.still-kicker span:first-child { letter-spacing: 0.08em; text-transform: uppercase; }
.still-value { padding: 12px 14px 8px; }
.still-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.still .stat-big { font-size: 2.15rem; }
.still .stat-change { display: block; }
.still .up { color: var(--up); font-weight: 700; }
.range-mini { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius-pill); }
.range-mini span { padding: 3px 7px; border-radius: var(--radius-pill); color: var(--muted); font-size: 10px; font-weight: 600; }
.range-mini .on { background: var(--gold); color: var(--ink); }
.still-chart { display: block; width: 100%; height: 72px; margin-top: 4px; }
.still-chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.still-chart .line { fill: none; stroke: var(--gold); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.still-deck { padding: 10px 12px 8px; }
.still-deck h2 { margin: 0; font-family: Georgia, "Iowan Old Style", serif; font-weight: 500; font-size: 1.05rem; }
.still-sub { margin: 2px 0 8px; color: var(--muted); font-size: var(--text-meta); }
.still-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.still-rows li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 0; }
.still-swatch { width: 26px; height: 36px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 35%); }
.still-swatch.w { background: linear-gradient(160deg, #f4ecd8, #c4b48a); }
.still-swatch.u { background: linear-gradient(160deg, #d5e4f2, #6e93b6); }
.still-name { min-width: 0; display: grid; }
.still-name strong { font-weight: 600; font-size: 0.92rem; }
.still-name span, .still-where { color: var(--muted); font-size: 11px; }
.still-where { text-align: right; }
.still-where.have { color: var(--up); font-weight: 700; }
.still-pull { margin: 0; padding: 8px 12px; border-radius: var(--radius-row); background: var(--raised); color: var(--muted); font-size: var(--text-meta); }
.still-pull strong { color: var(--text); font-weight: 600; }

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-4) 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.feature { display: flex; align-items: flex-start; gap: var(--space-3); margin: 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }
.feature strong { display: block; color: var(--text); font-weight: 600; }
.feature-icon { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  display: inline-block;
  margin: 0 0 0 4px;
  padding: 1px 7px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-pill);
  color: var(--gold);
  font-family: "Segoe UI", Candara, sans-serif;
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

@media (max-width: 720px) {
  .landing { padding: var(--space-4) var(--space-4) var(--space-3); justify-content: flex-start; gap: var(--space-4); }
  .hero { grid-template-columns: 1fr; gap: var(--space-3); }
  .still { order: -1; }
  .still-chart, .still-rows, .still-pull, .range-mini { display: none; }
  .still-app { gap: 8px; padding: 8px; }
  .still-sub { margin-bottom: 0; }
  .still .stat-big { font-size: 1.7rem; }
  .eyebrow { margin-bottom: var(--space-2); }
  .hero h1 { margin-bottom: var(--space-3); font-size: clamp(1.85rem, 9vw, 2.15rem); }
  .hero-lead { font-size: 1rem; margin-bottom: var(--space-4); }
  .hero-cta { width: 100%; }
  .feature-row { grid-template-columns: 1fr; gap: var(--space-3); padding-top: var(--space-3); }
  .feature { font-size: 0.875rem; }
}
@media (max-height: 740px) and (max-width: 720px) {
  .still { display: none; }
}

/* ------------------------------------------------------------------ sign-in */

.auth-gate { padding: var(--space-6) var(--space-4); align-content: start; }
.auth-card { width: min(100%, 420px); padding: var(--space-5); }
.auth-title { margin: 0 0 var(--space-1); font-family: Georgia, serif; font-weight: 500; font-size: var(--text-brand); line-height: 1.1; }
.auth-sub { margin: 0 0 var(--space-5); }
.auth-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  color: var(--muted);
  font-size: var(--text-meta);
}
.auth-or::before,
.auth-or::after {
  content: "";
  height: 1px;
  background: var(--line);
}
.google-signin { min-height: 48px; width: 100%; }
.form-field { display: grid; gap: 6px; margin-bottom: var(--space-4); }
.form-field label { font-weight: 600; font-size: 0.9375rem; }
.form-field .field { width: 100%; min-height: 46px; font-size: 1rem; }
.field[readonly] { color: var(--muted); }
.field[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field-error, .hint { margin: 0; font-size: var(--text-meta); line-height: 1.4; }
.field-error { color: var(--danger); font-weight: 600; }
.hint { color: var(--muted); }
.form-error {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line));
  border-radius: var(--radius-row);
  background: color-mix(in srgb, var(--danger) 12%, var(--raised));
  line-height: 1.4;
}
.form-note {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: var(--radius-row);
  background: color-mix(in srgb, var(--gold) 12%, var(--raised));
  line-height: 1.4;
}
.account-view .page-head,
.account-page { width: min(100%, 560px); }
.account-page {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
}
.account-page h2 {
  margin: 0 0 var(--space-2);
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: var(--text-section);
}
.account-page section + section {
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
.account-kicker {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.account-email {
  margin: var(--space-1) 0 var(--space-2);
  font-size: 1.0625rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.account-note { margin: var(--space-4) 0 0; }
.account-tools { display: grid; gap: var(--space-2); margin: 0; }
.account-tools .menu-item {
  justify-content: space-between;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: var(--radius-row);
}
.account-tools .menu-item::after {
  content: "›";
  color: var(--muted);
}
.account-page .form-field .field { width: 100%; min-height: 46px; font-size: 1rem; }
.account-page .reveal,
.account-page .account-actions .btn,
.account-page .menu-theme-btn { min-height: 44px; }
.account-page .field,
.account-page .account-actions,
.account-page .account-actions .btn,
.account-page .account-tools,
.account-page .menu-theme-btn { scroll-margin-bottom: calc(80px + env(safe-area-inset-bottom)); }
.password-wrap { position: relative; }
.password-wrap .field { padding-right: 72px; }
.reveal {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  min-width: 60px;
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-row);
  background: none;
  color: var(--gold);
  font-size: var(--text-meta);
  font-weight: 600;
}
.reveal:hover { background: color-mix(in srgb, var(--line) 50%, transparent); }
.wide { width: 100%; }
.submit { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font-weight: 600; }
.submit:disabled { opacity: 0.75; cursor: progress; }
.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.busy .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-right-color: currentColor; opacity: 0.7; } }
.auth-foot { margin: var(--space-4) 0 0; font-size: var(--text-meta); color: var(--muted); line-height: 1.5; }
.auth-foot a { color: var(--gold); }
.forgot-toggle,
#forgot-back {
  min-height: 44px;
  margin-top: var(--space-3);
}
.forgot-toggle,
#forgot-form .field,
#forgot-form .submit,
#forgot-back {
  scroll-margin-bottom: calc(80px + env(safe-area-inset-bottom));
}
@media (max-width: 720px) {
  .auth-gate {
    align-items: start;
    padding-bottom: calc(40vh + env(safe-area-inset-bottom));
  }
  .forgot-toggle,
  #forgot-form .field,
  #forgot-form .submit,
  #forgot-back {
    scroll-margin-bottom: 45vh;
  }
}

.account-form .invite-role {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}
.account-form .invite-role legend {
  padding: 0;
  margin-bottom: var(--space-1);
  color: var(--muted);
  font-size: var(--text-meta);
}
.account-form .invite-role label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  font-size: var(--text-label);
}
.account-form .invite-role input { margin: 0; }
.account-form .invite-role .hint { margin: 0 0 var(--space-2) 28px; }

.invite-new { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.copy-row { display: flex; gap: var(--space-2); }
.copy-row .field { flex: 1; min-width: 0; }

/* Scryfall set symbols are black SVGs; the dark theme inverts them. */
@media (prefers-color-scheme: light) {
  .set-tile img, .set-hero-icon { filter: sepia(0.35) saturate(0.6) brightness(0.55); }
}
.view { padding-top: var(--space-4); }

/* ------------------------------------------------------------------ app nav */

.queue-link a .count, .queue-chip .count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  font-size: var(--text-micro);
  font-weight: 700;
}
.queue-chip {
  display: none;
  align-items: center;
  min-height: 40px;
  padding: 0 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--raised);
  color: var(--text);
  text-decoration: none;
  font-size: var(--text-meta);
}
.queue-chip.active { border-color: var(--gold); }

.select-bar {
  position: fixed;
  z-index: 16;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--raised);
  border-top: 1px solid var(--line);
}
.select-bar[hidden] { display: none; }
.select-count { margin: 0; flex: 1 1 140px; }
.select-actions { display: flex; gap: 8px; }
body.selecting { padding-bottom: 72px; }
@media (max-width: 720px) {
  .select-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.selecting.signed-in { padding-bottom: calc(64px + 72px + env(safe-area-inset-bottom)); }
}

.tabbar { display: none; }
@media (max-width: 720px) {
  body.signed-in .queue-chip { display: inline-flex; }
  body.signed-in { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.signed-in .tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 15;
    display: grid;
    /* Scan sits exactly in the middle: two tabs left, Sets on the right half. */
    grid-template-columns: 1fr 1fr 84px 2fr;
    align-items: end;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 0 var(--space-2) env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  body.signed-in.reviewing { height: auto; }
}
.tabbar a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  height: 64px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active { color: var(--gold); }
.tabbar .tab-scan { position: relative; align-content: end; padding-bottom: 8px; color: var(--text); }
.tab-scan-disc {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 6px 18px rgb(0 0 0 / 30%), 0 0 0 4px var(--bg);
}
.tab-scan-disc svg { width: 28px; height: 28px; }
.tabbar .tab-scan.active { color: var(--gold); }

/* Collection › Cards | Insights | Import */
.subtabs { display: flex; gap: var(--space-4); margin: -4px 0 var(--space-4); border-bottom: 1px solid var(--line); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.subtabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-1);
  flex: 0 0 auto;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.subtabs a:hover { color: var(--text); }
.subtabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }

/* ------------------------------------------------------------------ shared bits */

.delta { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--muted); }
.notice-stack:empty { display: none; }
.notice-stack { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.notice {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-row);
  background: var(--raised);
  line-height: 1.45;
}
.notice.bad { border-left-color: var(--danger); }
.notice a { color: var(--gold); }
.empty-state { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-5) var(--space-3); text-align: center; }
.empty-state p { margin: 0; max-width: 34rem; }
.empty-title { font-family: Georgia, serif; font-size: var(--text-section); }
.list-empty { padding: var(--space-2) 0; }
.range-toggle, .seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg); }
.range-toggle button, .seg button {
  min-width: 44px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-meta);
  font-weight: 600;
}
.range-toggle button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
.card-head h2 { margin: 0; }
.more-link { color: var(--gold); font-size: var(--text-meta); }

/* ------------------------------------------------------------------ dashboard */

.page-head .dash-asof { margin: 0; font-size: var(--text-meta); }
.dash-head-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-3); }
#dash-whats-new { min-height: 44px; }

.whats-new[open] {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--text);
  width: min(480px, calc(100vw - 32px));
  max-height: min(70dvh, 560px);
  padding: var(--space-5);
  overflow: hidden;
  box-shadow: var(--elev-shadow);
}
.whats-new::backdrop { background: var(--overlay); }
.whats-new h2 { margin: 0 0 var(--space-3); font-family: Georgia, serif; font-weight: 500; font-size: 1.5rem; }
.whats-new-body { overflow: auto; min-height: 0; }
.whats-new-date { margin: 0 0 var(--space-3); color: var(--muted); font-size: var(--text-meta); }
.whats-new-list { margin: 0; padding-left: 1.15rem; display: grid; gap: var(--space-2); }
.whats-new-list li { line-height: 1.45; }
.whats-new-earlier, .whats-new-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: var(--space-2);
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: var(--text-meta);
  cursor: pointer;
}
.whats-new-past { margin: 0 0 var(--space-4); }
.whats-new-past h3 { margin: 0 0 var(--space-2); font-size: var(--text-label); font-weight: 600; }
.whats-new-actions { display: flex; justify-content: flex-end; flex: none; margin-top: var(--space-3); }
.whats-new-actions .btn { min-height: 44px; padding: 8px 20px; }
@media (max-width: 720px) {
  .whats-new[open] {
    width: 100%;
    max-width: 100%;
    max-height: min(78svh, 720px);
    margin: 0;
    position: fixed;
    inset: auto 0 calc(64px + env(safe-area-inset-bottom)) 0;
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
    box-shadow: var(--sheet-shadow);
  }
  .whats-new-actions .btn { width: 100%; }
}
.dash-value { padding: var(--space-4) var(--space-5) var(--space-3); margin-bottom: var(--space-4); }
.dash-value.loading .stat-big, .dash-value.loading .chart { opacity: 0.6; transition: opacity 0.2s; }
.dash-value-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.stat-label { margin: 0; color: var(--muted); font-size: var(--text-meta); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.stat-big { margin: 2px 0; font-family: Georgia, serif; font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-change { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; }
.stat-sub { font-size: var(--text-meta); align-self: center; }
.chart { position: relative; min-height: 170px; margin-top: var(--space-3); }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-svg .line { fill: none; stroke: var(--gold); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .fill-top { stop-color: var(--gold); stop-opacity: 0.28; }
.chart-svg .fill-bottom { stop-color: var(--gold); stop-opacity: 0; }
.chart-svg .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart-svg text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-svg .dot { fill: var(--gold); stroke: var(--bg); stroke-width: 2; }
.chart-svg .cursor { stroke: var(--muted); stroke-dasharray: 2 3; }
.chart-tip {
  position: absolute;
  top: -6px;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-row);
  background: var(--raised);
  font-size: var(--text-meta);
  white-space: nowrap;
  pointer-events: none;
}
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.dash-card { padding: var(--space-4); min-width: 0; }
.dash-card h2, .ins-card h2, .ins-movers h2 { margin: 0 0 var(--space-2); font-size: var(--text-label); font-weight: 600; }
.queue-big { margin: 0 0 var(--space-3); }
.queue-big strong { font-family: Georgia, serif; font-size: var(--text-brand); color: var(--gold); margin-right: 4px; }
.dash-insights { margin-top: var(--space-4); }
.mover-list { list-style: none; margin: 0; padding: 0; display: grid; }
.mover {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  padding: 6px 4px;
  border: 0;
  border-radius: var(--radius-row);
  background: none;
  text-align: left;
}
.mover:hover { background: color-mix(in srgb, var(--line) 45%, transparent); }
.mover img, .thumb-blank { width: 34px; height: 47px; border-radius: 3px; object-fit: cover; background: var(--line); display: block; }
.mover-name { min-width: 0; display: grid; }
.mover-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover .sub { color: var(--muted); font-size: var(--text-micro); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-delta { display: grid; justify-items: end; font-variant-numeric: tabular-nums; }

@media (max-width: 800px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-value { padding: var(--space-3) var(--space-3) var(--space-2); }
  .dash-value-top .range-toggle { width: 100%; justify-content: space-between; }
  .dash-value-top .range-toggle button { flex: 1; min-width: 0; }
  .dash-head-meta .dash-asof { margin-top: 0; }
}

/* ------------------------------------------------------------------ insights */

.insights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.ins-card, .ins-movers { padding: var(--space-4); min-width: 0; }
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bar-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-2); font-size: 0.875rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.bar-value { font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 6px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 25%); }
.bar-foot { margin: var(--space-2) 0 0; font-size: var(--text-meta); }
.cost-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: 0 0 var(--space-2); }
.cost-stats div { min-width: 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-row); }
.cost-stats dt { color: var(--muted); font-size: var(--text-micro); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.cost-stats dd { margin: 2px 0 0; font-size: 1.0625rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.cost-stats small { display: block; font-weight: 500; }
.movers-more { margin-top: var(--space-3); }
.cost-note { margin: 0 0 var(--space-2); font-size: var(--text-meta); }
.mini-head { margin: var(--space-3) 0 var(--space-1); font-size: var(--text-meta); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.movers-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.movers-tools p { margin: 0; font-size: var(--text-meta); }
.movers-table th.num, .movers-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.movers-table th button { padding: 0; border: 0; background: none; color: inherit; font-weight: 500; }
.movers-table th[aria-sort="ascending"] button::after { content: " ▲"; color: var(--gold); }
.movers-table th[aria-sort="descending"] button::after { content: " ▼"; color: var(--gold); }
.movers-table td button { color: var(--text); }
.movers-table td button:hover { color: var(--gold); }
@media (max-width: 800px) {
  .insights-grid { grid-template-columns: 1fr; }
  .cost-stats dd { font-size: 0.9375rem; }
  .movers-table { min-width: 560px; }
}

/* ------------------------------------------------------------------ sets value */

.set-worth { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 8px; font-size: var(--text-meta); font-variant-numeric: tabular-nums; }
.set-value { color: var(--text); }
.set-worth .delta { font-weight: 500; }

/* The Dashboard shows the value itself; the header line would repeat it. */
body[data-view="dashboard"] .site-header .value { display: none; }
/* On the sign-in screen itself the header button would point at this page. */
body.on-auth #header-sign-in { visibility: hidden; }


/* ------------------------------------------------------------------ UI lock-in (Initiative C) */

.account-page .menu-theme { margin: 0 0 var(--space-2); }
.menu-theme-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
}
.menu-theme-btn {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-meta);
  font-weight: 600;
}
.menu-theme-btn[aria-pressed="true"] {
  background: var(--gold);
  color: var(--ink);
}
.menu-theme-btn:active { transform: scale(var(--press-scale)); }
.menu-theme-hint {
  margin: var(--space-2) 0 0;
  font-size: var(--text-micro);
  line-height: 1.35;
}
#price-shop { margin: 0 0 var(--space-2); }
#price-shop select { width: 100%; }
/* Prices sits on the same left edge as Account and Bot tokens. */
.menu-theme-label {
  display: block;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

/* Press feedback on chrome controls */
.nav-list a, .tabbar a, .tabbar button, .view-toggle button, .range-toggle button, .seg button, .menu-item {
  transition: transform var(--motion-fast) ease, filter var(--motion-fast) ease, color var(--motion-fast) ease, background var(--motion-fast) ease;
}
.nav-list a:active, .tabbar a:active, .view-toggle button:active, .range-toggle button:active, .seg button:active, .menu-item:active {
  transform: scale(var(--press-scale));
  filter: brightness(var(--press-brightness));
}
.tabbar .scan-disc:active, #sc-capture:active {
  transform: scale(0.94);
}

/* Calmer desktop chrome — content earns attention */
.site-header.top {
  border-bottom-color: var(--line-soft);
  background: color-mix(in srgb, var(--chrome) 92%, transparent);
}
.nav-list a { color: color-mix(in srgb, var(--muted) 90%, var(--text)); }
.nav-list a.active { border-bottom-width: 1.5px; }

/* Dashboard shield */
.dash-shield {
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--raised);
  font-size: var(--text-label);
  line-height: 1.45;
}
.dash-shield:empty { display: none; }
.dash-shield .delta { font-weight: 700; }
.dash-value { border-color: var(--line-soft); }

/* Collection facets as phone sheet */
.facets-sheet-trigger { display: none; }
@media (max-width: 800px) {
  .facets-sheet-trigger { display: inline-flex; align-items: center; min-height: 44px; }
  /* Above the sheet while it is open, so Filters stays a visible close control. */
  body.facets-open .facets-sheet-trigger { position: relative; z-index: 13; }
  .facets.is-sheet.open {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 12;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: min(70svh, 520px);
    overflow-x: clip;
    overflow-y: auto;
    padding: var(--space-4);
    padding-bottom: calc(var(--space-5) + 64px + env(safe-area-inset-bottom));
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
    background: var(--raised);
    border: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: var(--sheet-shadow);
    display: grid;
    gap: var(--space-3);
    /* A select's longest option must not widen the track past the screen. */
    grid-template-columns: minmax(0, 1fr);
  }
  .facets.is-sheet.open .pips,
  .facets.is-sheet.open .pills {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .facets.is-sheet.open .pip,
  .facets.is-sheet.open .pill,
  .facets.is-sheet.open select {
    min-height: 44px;
    max-width: 100%;
  }
  .facets.is-sheet.open select {
    width: 100%;
    min-width: 0;
  }
}

/* Command palette */
.cmdk {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: start center;
  padding: 12vh var(--space-4) var(--space-4);
}
.cmdk-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}
.cmdk-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: var(--space-3);
  box-shadow: var(--elev-shadow);
}
.cmdk-input { width: 100%; min-height: 48px; font-size: 1.0625rem; }
.cmdk-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; max-height: 50vh; overflow: auto; }
.cmdk-list li { margin: 0; }
.cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-row);
  background: none;
  text-align: left;
  color: var(--text);
}
.cmdk-item[aria-selected="true"], .cmdk-item:hover {
  background: color-mix(in srgb, var(--gold) 18%, var(--raised));
}
.cmdk-item .muted { font-size: var(--text-meta); }
.cmdk-hint { margin: var(--space-2) var(--space-3) 0; font-size: var(--text-micro); }
@media (max-width: 800px) {
  .cmdk { display: none !important; }
}

/* Skeleton layouts used while lists load */
.skel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-3);
}
.skel-rows { display: grid; gap: var(--space-2); }
.dash-value.loading .stat-big,
.dash-value.loading .chart {
  /* keep opacity fade as fallback; skeletons replace when present */
}

@media (prefers-reduced-motion: reduce) {
  .nav-list a, .tabbar a, .tabbar button, .view-toggle button, .range-toggle button, .seg button, .menu-item, .menu-theme-btn {
    transition: none;
  }
  .nav-list a:active, .tabbar a:active, .view-toggle button:active, .range-toggle button:active, .seg button:active, .menu-item:active, .menu-theme-btn:active,
  .tabbar .scan-disc:active, #sc-capture:active {
    transform: none;
    filter: none;
  }
  .sc-focus-pulse, .scan-focus, [class*="pulse"] { animation: none !important; }
}
