.desk-home { min-width: 0; }

.span-bar {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  min-width: 0;
}

.span-scroll {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.span-label {
  min-width: 7.2rem;
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.span-step {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
}

.span-label { flex: 0 0 auto; white-space: nowrap; }

.desk-home .home-head { align-items: center; }

.desk-home .home-tabs {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.desk-home .home-tabs button {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: var(--ink);
  padding: 2px 9px 5px;
  font-size: 13px;
  font-weight: 500;
  flex: 0 0 auto;
  white-space: nowrap;
}

.desk-home .home-tabs button + button { box-shadow: inset 1px 0 0 var(--line); }

.desk-home .home-tabs button[aria-pressed="true"] {
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--mark);
}

.desk-home .home-tabs button + button[aria-pressed="true"] {
  box-shadow: inset 1px 0 0 var(--line), inset 0 -2px 0 var(--mark);
}

.desk-home .span-step {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--r-8);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.desk-home .span-label {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}

.desk-home .desk-chips .pill {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--ink);
  box-shadow: none;
  padding: 3px 10px;
  font-size: 12.5px;
  gap: 5px;
}

.desk-home .desk-chips .pill .pill-count {
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
}

.desk-home .desk-chips .pill[aria-pressed="true"] {
  background: var(--ink);
  color: var(--chip);
  border-color: var(--ink);
  box-shadow: none;
}

.desk-home .desk-chips {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.span-modes {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.span-modes button {
  border: 0;
  border-right: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 11px;
  box-shadow: none;
}

.span-modes button:last-child { border-right: 0; }

.span-modes button[aria-pressed="true"] {
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--brand);
}

.span-pop {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  z-index: 800;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: end;
  width: min(22rem, calc(100vw - 3rem));
  padding: 0.6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-10);
  box-shadow: var(--shadow-pop);
}

.span-pop[hidden] { display: none !important; }

.span-pop label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.span-pop input {
  width: auto;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.28rem 0.4rem;
}

.span-hint { flex: 1 0 100%; margin: 0; color: var(--muted); font-size: 12.5px; }

.span-pop .error { flex: 1 0 100%; margin: 0; min-height: 0; }

main.desk-main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--top));
  min-height: 0;
  overflow: auto;
  container-type: inline-size;
}

.desk-home {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  min-height: 100%;
  width: max-content;
  min-width: 100%;
}

.desk-home .home-head {
  position: sticky;
  left: 0;
  z-index: 6;
  width: var(--view, 100%);
  width: 100cqw;
  box-sizing: border-box;
}

.desk-home .home-stats {
  position: sticky;
  left: 0;
  width: var(--view, 100%);
  width: 100cqw;
  box-sizing: border-box;
  z-index: 6;
  margin: 0 0 12px;
}

.desk-home .home-stats .stat-label {
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  min-height: calc(2 * 1.35em);
  max-height: calc(2 * 1.35em);
}

@container (max-width: 900px) {
  .desk-home .home-stats article {
    padding-left: 6px;
    padding-right: 6px;
  }
  .desk-home .home-stats .stat-label {
    font-size: 10px;
  }
}

.desk-home .span-bar {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 9;
  width: var(--view, 100%);
  width: 100cqw;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 4px 0 8px;
  background: var(--paper);
  border: 0;
}

.desk-home .span-scroll {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  overflow: visible;
  gap: 6px;
}

.desk-home .tl-head {
  top: var(--home-band, 0px);
}

.desk-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  flex: 1 0 auto;
  min-height: min-content;
  align-items: start;
}

.desk-stage {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.desk-stage { min-width: 0; }

.desk-legend {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  background: transparent;
}

.desk-legend span { display: inline-flex; align-items: center; }

.desk-legend i {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
}

.desk-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; min-width: 0; }

.sheet-page { display: flex; flex-direction: column; gap: 0.75rem; }

.desk-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0;
}

.desk-counts .tile {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  padding: 0.5rem 0.6rem 0.55rem;
}

.desk-counts b {
  display: block;
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

.desk-counts span { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.78rem; }

.tl-scroll { min-width: 0; overflow: visible; }

.tl-sheet { --gutter: 17.5rem; position: relative; width: calc(var(--gutter) + var(--scale, 0px)); min-width: 100%; }

.desk-home .tl-sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-12);
  overflow: clip;
}

.tl-sheet.is-fit { width: var(--view, 100%); width: 100cqw; }

.tl-head, .tl-row {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  align-items: stretch;
  min-height: 38px;
}

.tl-head {
  position: sticky;
  top: 0;
  z-index: 8;
  isolation: isolate;
  min-height: 2.75rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.tl-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--card);
}

.tl-group { position: relative; }

.tl-body-rows { position: relative; }

.tl-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--gutter);
  width: calc(100% - var(--gutter));
  pointer-events: none;
}

.tl-gutter {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 0;
  background: var(--card);
  padding: 6px 12px;
}

.tl-row:hover .tl-gutter,
.tl-row.is-hot .tl-gutter { background: var(--hover); }

.tl-head .tl-gutter {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--card);
}

.tl-gutter b, .tl-gutter span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-gutter b {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.tl-gutter span { color: var(--muted); font-size: 12px; }

.tl-x { min-width: 0; overflow-x: auto; overflow-y: hidden; }

.tl-row .tl-x { overflow: hidden; }

.tl-track { position: relative; width: max(100%, var(--scale, 100%)); min-height: 38px; }

.tl-head .tl-track { min-height: 2.75rem; }

.tl-row {
  border-top: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
}

.tl-row.is-hot, .tl-row:hover { background: var(--hover); }

.tl-row:focus-visible { outline: var(--focus); outline-offset: -2px; }

.tl-col {
  position: absolute;
  top: 0;
  bottom: 0;
  border-right: 1px solid var(--line-2);
  pointer-events: none;
}

.tl-head .tl-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
}

.tl-head .tl-col b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.tl-head .tl-col.today {
  background: var(--today);
  color: var(--ink);
}

.tl-head .tl-col.today b { color: var(--ink); }

.tl-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--mark);
  z-index: 3;
  pointer-events: none;
  transform: translateX(-1px);
}

.desk-home .tl-bar {
  position: absolute;
  top: 50%;
  height: 20px;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 0.4rem;
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}

.tl-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.tl-bar.v { background: color-mix(in srgb, var(--accent-sold) 16%, var(--bg)); color: color-mix(in srgb, var(--accent-sold) 72%, var(--text)); }

.tl-bar.r { background: color-mix(in srgb, var(--accent-held) 16%, var(--bg)); color: color-mix(in srgb, var(--accent-held) 72%, var(--text)); }

.tl-bar.o { background: color-mix(in srgb, var(--accent-option) 20%, var(--bg)); color: color-mix(in srgb, var(--accent-option-text) 80%, var(--text)); }

.tl-bar.f { background: color-mix(in srgb, var(--accent-fixed) 16%, var(--bg)); color: color-mix(in srgb, var(--accent-fixed) 72%, var(--text)); }

.tl-bar.mute { background: color-mix(in srgb, var(--muted) 12%, var(--bg)); color: transparent; }

.desk-home .tl-group-head {
  position: sticky;
  left: 0;
  z-index: 4;
  box-sizing: border-box;
  width: var(--view, 100%);
  width: 100cqw;
}

.tl-group-head .group-meta { color: var(--free-ink); font-weight: 500; }

.desk-home .tl-group-head .group-note { margin-left: 2px; }

.tl-row.on { box-shadow: inset 3px 0 0 var(--brand); }

.tl-row .hold-actions { display: none; }

.tl-row:hover .hold-actions,
.tl-row:focus-within .hold-actions { display: flex; flex-wrap: wrap; }

.tl-group.shut .tl-rows { display: none; }

.leaflet-container { font: inherit; background: var(--map); }

.leaflet-marker-icon.face-pin { overflow: visible; }

.face-pin { background: none; border: 0; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--surface);
  box-shadow: var(--pin-shadow);
  transition: transform 120ms ease;
}

.dot.big { width: 12px; height: 12px; }

.dot.picked { box-shadow: 0 0 0 2px var(--text); }

.dot.is-hot {
  transform: scale(1.6);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}

.s-free { background: var(--accent-free); }

.s-sold { background: var(--accent-sold); }

.s-option { background: var(--accent-option); }

.s-reserve { background: var(--accent-held); }

.s-fixe { background: var(--accent-fixed); }

.s-comu { background: var(--accent-comu); }

.s-out { background: var(--accent-out); }

.face-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-12);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  margin-top: 8px;
}

.face-card .code { font-family: var(--mono); font-weight: 650; }

.face-card p { margin: 0.12rem 0; }

.face-card .code { font-weight: 700; }

.desk-home .home-empty {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-12);
  padding: 24px;
}

.desk-home .home-empty .quiet,
.desk-home .tl-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.desk-home .tl-note { padding: 12px; }

html[data-theme="dark"] .tl-bar.v { background: color-mix(in srgb, var(--accent-sold) 28%, var(--bg)); color: color-mix(in srgb, var(--accent-sold) 55%, var(--mix-light)); }

html[data-theme="dark"] .tl-bar.r { background: color-mix(in srgb, var(--accent-held) 28%, var(--bg)); color: color-mix(in srgb, var(--accent-held) 55%, var(--mix-light)); }

html[data-theme="dark"] .tl-bar.o { background: color-mix(in srgb, var(--accent-option) 28%, var(--bg)); color: color-mix(in srgb, var(--accent-option) 55%, var(--mix-light)); }

html[data-theme="dark"] .tl-bar.f { background: color-mix(in srgb, var(--accent-fixed) 28%, var(--bg)); color: color-mix(in srgb, var(--accent-fixed) 55%, var(--mix-light)); }

html[data-theme="dark"] .tl-bar.mute { background: color-mix(in srgb, var(--muted) 22%, var(--bg)); }

html[data-theme="dark"] .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) saturate(0.35) brightness(0.9);
}

html[data-theme="dark"] .leaflet-bar a,
html[data-theme="dark"] .leaflet-bar a:hover {
  background: var(--surface);
  color: var(--text);
  border-bottom-color: var(--line);
}

html[data-theme="dark"] .leaflet-control-attribution {
  background: var(--scrim);
  color: var(--muted);
}

.slot-bar { display: inline-flex; gap: 2px; }

.slot-bar i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--line);
}

.slot-bar i.is-on { background: var(--ink); }

.mode-badge {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-10);
  font-size: 0.75rem;
}

.mode-seg { display: flex; gap: 6px; flex-wrap: wrap; }

.mode-seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--chip);
}

.slot-count { width: 3.2rem; }

@media (min-width: 901px) {
  .desk-home .tl-gutter {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
  }
  .desk-home .tl-row:hover .hold-actions,
  .desk-home .tl-row:focus-within .hold-actions { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
.desk-body { grid-template-columns: 1fr; }
.tl-gutter span { display: none; }
.tl-sheet { --gutter: 7.4rem; }
.home-search-row {
  width: 100%;
  min-width: 0;
  margin: 0 0 8px;
}
.home-search-row .home-search-slot {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.home-search-row .home-search-count { white-space: normal; }
}

@media (max-width: 700px) {
.desk-home .home-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
.desk-home .home-tabs { margin-left: -9px; max-width: calc(100% + 9px); }
.span-label { min-width: 0; }
.span-modes {
    flex-wrap: nowrap;
    max-width: 100%;
  }
.span-modes button {
    flex: 1 1 auto;
    min-width: 0;
    padding: 5px 6px;
    font-size: 11px;
    white-space: nowrap;
  }
.tl-sheet { --gutter: 6.25rem; }
.tl-sheet.is-fit .tl-track { width: 100%; }
.tl-gutter { padding: 6px 8px 6px 12px; }
.tl-head .tl-col { font-size: 10px; }
.tl-head .tl-col b { font-size: 12px; }
.home-search-row { margin-bottom: 6px; }
.home-search { padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
.dot { transition: none; }
.dot.is-hot { transform: none; }
main.desk-main, .tl-x { scroll-behavior: auto; }
}

/* Out of flow so the sticky corner keeps the height the style snapshot measures. */
.home-search-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.tl-head .tl-gutter > .home-search-slot {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 36px;
  transform: translateY(-50%);
}

.home-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-8);
  background: var(--paper);
  color: var(--muted);
}

.home-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.home-search input.home-search-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}

.home-search input.home-search-input::-webkit-search-cancel-button,
.home-search input.home-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.home-search input.home-search-input:focus,
.home-search input.home-search-input:focus-visible {
  outline: none;
}

.home-search:focus-within {
  background: var(--card);
  border-color: var(--ink);
  outline: var(--focus);
  outline-offset: 2px;
}

.home-search-clear {
  display: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.home-search.is-on .home-search-clear {
  display: grid;
  place-items: center;
}

.home-search-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.home-search-hit {
  background: var(--soon-bg);
  color: var(--ink);
  border-radius: 3px;
}

.home-search-none {
  margin: 0;
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13px;
}


