:root {
  color-scheme: dark;
  --bg: #10130f;
  --panel: #171b16;
  --panel-2: #1e2320;
  --line: #2b322c;
  --fg: #e7ece6;
  --mut: #93a094;
  --accent: #4ec27e;
  --warn: #f0b429;
  --bad: #e5534b;
  font: 13px/1.35 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
h2 { font-size: 12px; margin: 0 0 6px; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0; }
a { color: #7fd0ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--mut); }

/* Top row: the boards, the drawers, and who you are. Pinned on every screen size. */
nav.top {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; flex-wrap: wrap; gap: 0 14px;
  min-height: 38px; padding: 0 10px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--fg); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.tabs { display: flex; align-self: stretch; }
.tabs a { display: flex; align-items: center; padding: 0 10px; color: var(--mut); border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--fg); text-decoration: none; }
.tabs a.on { color: var(--fg); font-weight: 600; border-bottom-color: var(--accent); }
.tools-nav { display: flex; gap: 2px; }
.tools-nav button, button.more { background: none; border-color: transparent; color: var(--mut); padding: 3px 8px; }
.tools-nav button:hover, button.more:hover { color: var(--fg); background: var(--panel-2); }
.tools-nav button.on { color: var(--fg); background: var(--panel-2); border-color: var(--line); }
button.more { display: none; font-size: 15px; line-height: 1; }
.me { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; color: var(--fg); white-space: nowrap; }
.me::before { content: "👤"; font-size: 12px; }
.me::after { content: "▾"; color: var(--mut); font-size: 10px; }
.me:hover { border-color: var(--mut); }
.chip.waiting {
  margin-left: -8px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: #130f00; background: var(--warn); border: 1px solid var(--warn); text-decoration: none;
}

.chip.update { padding: 1px 8px; border-radius: 999px; color: var(--warn); border: 1px solid var(--warn); background: transparent; white-space: nowrap; }
.chip.update:hover { text-decoration: none; background: #f0b42914; }

/* The board's own controls: what to show and how, then the filters, quieter, on their own row. */
header.bar {
  position: sticky; top: var(--top-h, 38px); z-index: 20;
  display: grid; gap: 5px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.bar-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.event { color: var(--mut); font-weight: 400; white-space: nowrap; }
.sep { flex: 1 1 0; }
input, select, button { font: inherit; color: var(--fg); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
input[type="search"] { min-width: 220px; }
button { cursor: pointer; }
select.quiet { background: transparent; border-color: transparent; font-weight: 600; padding-left: 2px; }
/* Sized to the chosen option, not the longest one, so a row of them still fits on one line. */
select.quiet, .bar select { field-sizing: content; max-width: 22rem; }
select.quiet:hover { border-color: var(--line); }
.check, .pick { color: var(--mut); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.check input { accent-color: var(--accent); }
.chips { display: inline-flex; gap: 4px; }
.chip { padding: 3px 8px; color: var(--mut); }
.chip.on { color: #0d130f; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.seg { gap: 0; }
.seg .chip { border-radius: 0; margin-left: -1px; }
.seg .chip:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.seg .chip:last-child { border-radius: 0 6px 6px 0; }
.counts { color: var(--mut); white-space: nowrap; }
.phone-only { display: none; }
.filters { font-size: 12px; gap: 4px 12px; }
.filters select, .filters input:not([type="checkbox"]), .filters .chip { background: transparent; border-color: transparent; color: var(--mut); padding: 1px 5px; }
.filters select:hover, .filters input:not([type="checkbox"]):hover, .filters .chip:hover { border-color: var(--line); color: var(--fg); }
/* A filter that is narrowing the board says so, so a short list never looks like the whole list. */
.filters .pick:has(option:checked:not([value=""])), .filters .pick:has(input:not(:placeholder-shown)),
.filters .check:has(input:checked) { color: var(--accent); }
.filters .pick:has(option:checked:not([value=""])) select, .filters .pick:has(input:not(:placeholder-shown)) input,
.filters .chip.on { color: var(--accent); background: #4ec27e17; border-color: #2f6a47; font-weight: 600; }
#filtersToggle.set { color: var(--accent); border-color: #2f6a47; }

/* Drawers: everything that is not the results opens in the side column, never above the results. */
[hidden] { display: none !important; }
.drawer { display: grid; gap: 18px; align-content: start; }
.drawer section { display: grid; gap: 6px; align-content: start; }
.drawer h2 { margin: 0; }
.side-head {
  position: sticky; top: -10px; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  margin: -10px -12px 0; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.side-head h3 { margin: 0; font-size: 15px; }
.links { display: flex; gap: 6px; flex-wrap: wrap; }
.links a { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.queue { display: flex; gap: 6px; flex-wrap: wrap; }
.queue span { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.queue b { color: var(--fg); }
.importance { display: grid; grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr)); gap: 4px 24px; }
/* The last cell is the one that can outgrow its track, so it is the one allowed to shrink and clip;
   without min-width 0 the row spills into the next column and the two read as one sentence. */
.importance-row { display: grid; grid-template-columns: 8rem minmax(3rem, 1fr) 2.5rem minmax(0, 12rem); align-items: center; gap: 8px; color: var(--mut); white-space: nowrap; }
.importance-row.on { color: var(--fg); }
/* A native range fills only as far as the thumb's centre, so a weight of 1 still shows a grey tail
   and does not read as full. The track is painted here instead, from the value alone. */
.importance-row input {
  width: 100%; min-width: 0; height: 16px; margin: 0; appearance: none; background: none; cursor: pointer;
}
.importance-row input::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--accent) calc(var(--fill) * 100%), var(--line) 0);
}
.importance-row input::-moz-range-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--accent) calc(var(--fill) * 100%), var(--line) 0);
}
.importance-row input::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px; margin-top: -4px; border: none;
  border-radius: 50%; background: var(--accent);
}
.importance-row input::-moz-range-thumb {
  width: 14px; height: 14px; border: none; border-radius: 50%; background: var(--accent);
}
.importance-row input:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.importance-row > span { overflow: hidden; text-overflow: ellipsis; }
.importance-value { text-align: right; font-variant-numeric: tabular-nums; }

.stays { display: flex; gap: 6px; flex-wrap: wrap; }
.stays span { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--mut); }
.stays span.on { border-color: var(--accent); color: var(--fg); }
.stays b { color: var(--fg); }
.stays i { font-style: normal; color: var(--mut); }
/* The dates are the button, because putting a range on screen is the thing a chip is for. */
.stays .stay-pick { padding: 0; border: none; background: none; color: var(--fg); font: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }

.stays .stay-default { padding: 0 3px; border: none; background: none; color: var(--line); font: inherit; }
.stays .stay-default.on { color: var(--accent); }
.stays .stay-propose { padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; background: none; color: var(--mut); font: inherit; font-size: 11px; }
.stays .stay-propose:hover { border-color: var(--accent); color: var(--fg); }
.stays .stay-drop { padding: 0 3px; border: none; background: none; color: var(--mut); font: inherit; }
.stays .stay-drop:hover { color: var(--bad); }
.stay-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.stay-add label { display: inline-flex; align-items: center; gap: 4px; color: var(--mut); }
.stay-add input { padding: 2px 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--fg); font: inherit; }
.stay-add input[name="guests"] { width: 78px; }
.notpriced { display: grid; gap: 4px; max-height: 320px; overflow-y: auto; }
.notpriced a { display: flex; align-items: baseline; gap: 8px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--fg); text-decoration: none; }
.notpriced a:hover { border-color: var(--accent); }
.notpriced .why { margin-left: auto; color: var(--mut); white-space: nowrap; }
.notpriced .more { color: var(--mut); padding: 3px 7px; }
.drawer details > summary { cursor: pointer; color: var(--mut); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.drawer details > summary b { color: var(--fg); }
.undated { display: grid; gap: 6px; margin-top: 8px; }
.undated form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); }
.undated .page { flex: 1 1 260px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mut); }
.undated input { padding: 2px 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); font: inherit; }
.undated input[name="guests"] { width: 70px; }
.captures { display: flex; gap: 6px; flex-wrap: wrap; }
.captures span { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--mut); }
.captures span.pending { color: var(--warn); border-color: #55471d; }
.captures span.error { color: var(--bad); border-color: #55231d; }
.feedback-hub { display: grid; gap: 6px; }
.feedback-item { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); }
.feedback-item p { color: var(--fg); margin: 3px 0; }
.feedback-item-head, .feedback-item-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.feedback-item-head .status { margin-left: auto; }
.feedback-item-actions { margin-top: 5px; }

/* Grid of candidates */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 8px; padding: 8px; align-content: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.card:hover { border-color: #3d4a3f; }
.card.rejected { opacity: .62; }
/* The tile's height comes from the ratio alone: the photo is positioned out of flow so a
   portrait shot swapped in on hover can never stretch the card. */
.shot { position: relative; aspect-ratio: 1 / 1; background: var(--panel-2); overflow: hidden; }
.shot.empty { aspect-ratio: auto; height: 20px; }
.shot img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block;
}
.shot .none { display: grid; place-items: center; height: 100%; color: #46503f; font-size: 22px; }
/* The marks shrink to share the width, but never below a width and a gap that can still be seen. */
/* The marks and the vote tally share one row, so neither has to guess how wide the other is. */
.shot .strip { position: absolute; left: 6px; right: 4px; bottom: 4px; display: flex; align-items: center; gap: 6px; }
.shot .strip .tally { position: static; flex: none; margin-left: auto; }
.shot .dots { flex: 1 1 auto; min-width: 0; display: flex; gap: 2px; align-items: center; }
.shot .dots i {
  flex: 0 1 12px; min-width: 3px; height: 3px; background: #ffffff8c; border-radius: 2px;
  /* Offset rather than spread, so the shadow does not close the gap it is there to reveal. */
  box-shadow: 0 1px 1px #0009;
}
.shot .dots i.on { background: #fff; height: 5px; }
.shot .dots b {
  margin-right: 6px; flex: none; font-size: 9px; font-weight: 600; line-height: 1;
  color: #fff; background: #0009; border-radius: 6px; padding: 2px 4px;
}
.shot .score { position: absolute; top: 4px; left: 4px; padding: 1px 6px; border-radius: 5px; font-weight: 700; font-size: 11px; background: #0e120fd9; }
.shot .avail { position: absolute; top: 4px; right: 4px; padding: 1px 6px; border-radius: 5px; font-size: 11px; background: #0e120fd9; }
.shot.empty .score, .shot.empty .avail { top: 1px; }
.score.match { color: var(--accent); }
.score.needs-review { color: var(--warn); }
.score.rejected { color: var(--bad); }
.avail.confirmed { color: var(--accent); }
.avail.unavailable { color: var(--bad); }
.avail.unknown { color: var(--mut); }
.body { padding: 5px 7px 6px; display: flex; flex-direction: column; gap: 3px; }
.name { font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.where { color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money { display: flex; align-items: baseline; gap: 6px; }
.money b { font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 3px; }
.f { padding: 0 5px; border-radius: 4px; background: var(--panel-2); color: var(--mut); font-size: 11px; white-space: nowrap; }
.f.yes { color: var(--accent); }
.f.no { color: var(--bad); }
.f.gap { color: var(--warn); }
.f.src { color: #7fd0ff; }
.f.star, td.star { color: #f3c657; }
.chip.on.superlike { color: #130f00; background: #f3c657; border-color: #f3c657; }
.vote-actions .chip[disabled] { opacity: .4; cursor: not-allowed; }
/* How sure we are, not just what we know: a dashed underline means the page never said it. */
.s-confirmed { text-decoration: none; }
.s-likely { border-bottom: 1px dotted currentColor; }
.s-inferred { border-bottom: 1px dashed currentColor; opacity: .78; font-style: italic; }
td.s-confirmed { color: var(--accent); }
td.s-likely { color: var(--fg); }
td.s-inferred { color: var(--warn); }
.s-unverified { border-bottom: 1px dashed var(--warn); opacity: .7; font-style: italic; }
td.s-unverified { color: var(--warn); }
.amenity-edit-row.unchecked { border-left: 2px solid var(--warn); padding-left: .5rem; }
.amenity-edit-quote { margin: .15rem 0 .3rem; font-style: italic; }

/* Table. Its own scroll box in both directions, so the header can stay pinned to it: a sticky
   header measured against the page detaches as soon as the box scrolls sideways. */
.table { padding: 0 8px 8px; overflow: auto; max-height: calc(100dvh - var(--bar, 34px)); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 2px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th {
  position: sticky; top: 0; background: var(--panel); color: var(--mut); font-weight: 600;
  cursor: pointer; z-index: 10; box-shadow: inset 0 -1px 0 var(--line);
}
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--panel); }
tr.rejected { opacity: .62; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.thumb { padding: 1px 6px; }
td.thumb img { width: 34px; height: 34px; object-fit: cover; border-radius: 3px; display: block; }
td.wide { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
td.trim { max-width: 150px; overflow: hidden; text-overflow: ellipsis; color: var(--mut); }

/* Column menus: sort, a value list or a range, per column, as a spreadsheet does it */
body:not([data-view="table"]) .table-only { display: none; }
.menu {
  position: fixed; z-index: 45; min-width: 230px; max-width: 330px; max-height: 72vh; overflow: auto;
  display: grid; gap: 4px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 34px #000a;
}
.menu-head { font-weight: 650; padding: 2px 4px; }
.menu .item { text-align: left; background: none; border: 0; padding: 5px 6px; border-radius: 5px; }
.menu .item:hover { background: var(--panel-2); }
.menu-split { height: 1px; background: var(--line); margin: 2px 0; }
.menu .values { max-height: 230px; overflow: auto; display: grid; gap: 1px; }
.menu .values .check { color: var(--fg); justify-content: flex-start; gap: 6px; padding: 2px 4px; }
.menu .values .check:hover { background: var(--panel-2); }
.menu .values .check .muted { margin-left: auto; font-variant-numeric: tabular-nums; }
.menu .row { display: flex; gap: 6px; }
.menu .range { display: flex; gap: 6px; align-items: center; color: var(--mut); }
.menu .range input, .menu .search { width: 100%; }
/* The amenity filter. One button per amenity, cycling through the three states, because four
   buttons each across twenty-seven amenities is a wall nobody reads. The state is the colour and
   the mark together, so it survives a colourblind reader and a screenshot alike. */
.menu .modes { flex-wrap: wrap; }
.menu .amenity-list { display: flex; flex-wrap: wrap; gap: 4px; max-height: 300px; overflow: auto; }
.chip.amenity { display: inline-flex; gap: 5px; align-items: baseline; }
.chip.amenity .mark { font-weight: 700; }
.chip.amenity.off .muted { color: var(--line); }
.chip.amenity.yes { color: #0d130f; background: var(--accent); border-color: var(--accent); }
.chip.amenity.no { color: #130d0d; background: var(--bad); border-color: var(--bad); }
.chip.amenity.unknown { color: #130f00; background: var(--warn); border-color: var(--warn); }
.chip.amenity.yes .muted, .chip.amenity.no .muted, .chip.amenity.unknown .muted { color: inherit; opacity: .7; }

th .label { vertical-align: middle; }
th .caret { padding: 0 2px; border: 0; background: none; color: var(--mut); font-size: 10px; }
th:hover .caret { color: var(--fg); }
th .arrow, th .funnel { color: var(--accent); font-size: 10px; }
th.filtered .label { color: var(--accent); }

/* The side column. It takes its own column rather than covering the results: everything it would
   hide is still readable while it is open. It starts below the pinned rows, so they never move. */
:root { --panel-w: 0px; }
body:has(> .side:not([hidden])) { --panel-w: min(480px, 42vw); }
main#results, .baseline { margin-right: var(--panel-w); }
.side {
  position: fixed; top: var(--side-top, 0px); right: 0; bottom: 0; width: var(--panel-w); z-index: 30;
  background: var(--panel); border-left: 1px solid var(--line); padding: 10px 12px 40px; overflow: auto;
}
.panel h3 { margin: 0 0 2px; font-size: 15px; }
.panel .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; margin: 8px 0; }
.panel .gallery img {
  width: 100%; height: auto; aspect-ratio: 1 / 1;
  object-fit: cover; object-position: center; border-radius: 4px; cursor: zoom-in; display: block;
}
.panel .gallery .tile { position: relative; padding: 0; border: 0; background: none; line-height: 0; }
.panel .gallery .more, .lightbox .thumbs .more {
  position: absolute; right: 3px; bottom: 3px; padding: 0 4px; border-radius: 4px;
  background: #000000b3; color: #fff; font-size: 10px; line-height: 15px; pointer-events: none;
}
.panel dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 8px 0; }
.panel dt { color: var(--mut); }
.panel dd { margin: 0; }
.panel ul { margin: 4px 0; padding-left: 16px; color: var(--mut); }
.panel .close { position: absolute; top: 8px; right: 10px; }
.candidate-notes { display: grid; gap: 5px; margin: 6px 0; }
.candidate-notes article { padding: 6px 8px; border-left: 2px solid var(--line); background: var(--panel-2); }
.candidate-notes article p { margin-top: 2px; white-space: pre-wrap; }
.candidate-note-form { display: grid; grid-template-columns: 1fr auto; gap: 5px; margin: 6px 0 14px; }
.candidate-note-form textarea { min-width: 0; resize: vertical; }
.candidate-note-form .chip { align-self: end; }
.candidate-note-error { grid-column: 1 / -1; color: var(--bad); font-size: 11px; }
.amenity-editor { display: grid; gap: 6px; margin: 8px 0 14px; }
.amenity-edit-row { display: grid; gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; }
.amenity-edit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.amenity-edit-head .muted { font-size: 11px; text-align: right; }
.amenity-edit-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.amenity-edit-actions input { flex: 1 1 180px; min-width: 0; }
.amenity-edit-actions .chip { padding: 3px 7px; }
.amenity-edit-actions .chip.on { color: #0d130f; background: var(--accent); border-color: var(--accent); }
.amenity-edit-actions .chip.on.no { color: #130d0d; background: var(--bad); border-color: var(--bad); }
.amenity-edit-error { color: var(--bad); font-size: 11px; }
/* Every preview is cropped square; only the lightbox shows a photo at its true shape. */
.shot img, .panel .gallery img, td.thumb img { object-fit: cover; }
/* The photo row takes what is left after the thumbnails, so a property with thirty photos still
   shows its picture rather than being pushed off the bottom of the screen. */
.lightbox {
  position: fixed; inset: 0; z-index: 40; background: #000000e6;
  display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: minmax(0, 1fr) auto;
  align-items: center; cursor: zoom-out;
}
.lightbox figure {
  margin: 0; height: 100%; min-height: 0; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto;
  align-items: center; justify-items: center; justify-self: center; gap: 8px; cursor: default;
}
.lightbox img { max-width: min(100%, 1400px); max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: var(--mut); }
.lightbox .nav {
  height: 100%; border: 0; background: none; color: #fff; font-size: 34px; line-height: 1;
  opacity: .55; cursor: pointer;
}
.lightbox .nav:hover { opacity: 1; background: #ffffff14; }
.lightbox .thumbs {
  grid-column: 1 / -1; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden;
  padding: 8px 12px; cursor: default; scrollbar-width: thin;
  /* safe: centring a strip that overflows would put its first thumbnails out of reach. */
  justify-content: safe center;
}
.lightbox .thumbs button {
  flex: 0 0 auto; padding: 0; line-height: 0; background: none; border: 2px solid transparent;
  border-radius: 6px; opacity: .5; position: relative;
}
.lightbox .thumbs button:hover { opacity: 1; }
.lightbox .thumbs button.on { opacity: 1; border-color: var(--accent); }
.lightbox .thumbs img { width: 76px; height: 52px; object-fit: cover; border-radius: 4px; display: block; }
.lightbox .shots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; cursor: default; }
.lightbox .shots button {
  flex: 0 0 auto; padding: 0; line-height: 0; background: none; border: 2px solid transparent;
  border-radius: 5px; opacity: .45;
}
.lightbox .shots button:hover { opacity: 1; }
.lightbox .shots button.on { opacity: 1; border-color: var(--accent); }
.lightbox .shots img { width: 54px; height: 38px; object-fit: cover; border-radius: 3px; display: block; }
.empty { padding: 40px; color: var(--mut); text-align: center; }

/* Setup page: read once, follow, done. */
.setup { max-width: 760px; padding: 14px 16px 60px; display: grid; gap: 18px; }
.step { border-left: 2px solid var(--line); padding-left: 14px; }
.step h2 { font-size: 13px; color: var(--accent); }
.step p { color: var(--mut); margin-bottom: 8px; }
.step ol { margin: 6px 0; padding-left: 18px; color: var(--fg); }
.step li { margin: 3px 0; }
.step .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.step .row select, .step .row input { min-width: 180px; }
.step code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
a.chip { text-decoration: none; }

/* Swipe voting: one candidate at a time, the queue order comes from the server.
   The toolbar deliberately stays put here: swiping is where you most want to say "no hotels", and
   the card is sized from the measured toolbar height, so a second row of controls costs the photo
   a little height rather than pushing the buttons off screen. */
body:not([data-view="results"]) .vote-only { display: none; }
/* The whole card, its buttons and the counters have to fit one screen, so the photo takes
   whatever height is left rather than dictating it. */
.voting {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 8px; padding: 8px;
  justify-items: center; height: calc(100dvh - var(--bar, 34px) - 16px);
}
.vote-top { display: flex; align-items: center; gap: 10px; width: min(760px, 100%); }
.bar-progress { flex: 1 1 0; height: 6px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.bar-progress i { display: block; height: 100%; background: var(--accent); }
.swipe {
  display: flex; flex-direction: column; min-height: 0;
  width: min(760px, 100%); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; touch-action: none; user-select: none; cursor: grab;
}
.swipe.voted.like { border-color: var(--accent); }
.swipe.voted.veto { border-color: var(--bad); }
.stage { position: relative; flex: 1 1 auto; min-height: 120px; background: var(--panel-2); }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.stage .none { display: grid; place-items: center; height: 100%; color: #46503f; font-size: 20px; }
.stage .badge { position: absolute; top: 8px; padding: 2px 8px; border-radius: 6px; background: #0e120fd9; }
.stage .score { left: 8px; font-weight: 700; }
.stage .avail { right: 8px; }
/* The whole half of the photo steps, not a 56px strip: on a big card the strip was a needle to
   hit, and dragging still works because a drag never fires a click. */
.stage .photo {
  position: absolute; top: 0; bottom: 0; width: 50%; border: 0; border-radius: 0;
  background: none; color: #fff; font-size: 30px; opacity: .45;
  display: grid; align-items: center; padding: 0 14px;
}
.stage .photo:first-of-type { left: 0; justify-items: start; }
.stage .photo.next { right: 0; justify-items: end; }
.stage .photo:hover { opacity: 1; background: linear-gradient(90deg, #ffffff1f, #ffffff00); }
.stage .photo.next:hover { background: linear-gradient(270deg, #ffffff1f, #ffffff00); }
.stage .photo[disabled] { opacity: .18; cursor: default; }
.stage .dots { position: absolute; left: 10px; right: 10px; bottom: 6px; display: flex; gap: 3px; justify-content: center; align-items: center; }
.stage .dots i { flex: 0 1 18px; min-width: 4px; height: 3px; border-radius: 2px; background: #ffffff8c; box-shadow: 0 1px 1px #0009; }
.stage .dots i.on { background: #fff; height: 5px; }
.stage .dots b {
  margin-right: 8px; flex: none; font-size: 11px; line-height: 1;
  color: #fff; background: #0009; border-radius: 8px; padding: 3px 6px;
}
.stage .verdict {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: 34px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.stage .verdict.like { color: var(--accent); background: #4ec27e22; }
.stage .verdict.pass { color: var(--fg); background: #00000055; }
.stage .verdict.veto { color: var(--bad); background: #e5534b22; }
.swipe .meta { padding: 8px 12px 12px; display: grid; gap: 5px; }
.swipe .meta h3 { margin: 0; font-size: 18px; }
.swipe .meta .money b { font-size: 18px; }
.vote-actions, .vote-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: min(760px, 100%); }
.vote-actions .chip { padding: 8px 18px; font-size: 15px; }
.vote-nav .chip[disabled] { opacity: .4; cursor: default; }
td.my .chip { padding: 1px 5px; }
.shot .tally { position: absolute; right: 4px; bottom: 4px; padding: 1px 6px; border-radius: 5px; font-size: 11px; background: #0e120fd9; }
.shot .tally.mine.like { color: var(--accent); }
.shot .tally.mine.veto { color: var(--bad); }

/* An estimate must never look like a captured price */
.est { color: var(--warn); border-bottom: 1px dashed currentColor; font-style: italic; }
td .est, .money .est { font-style: normal; }

/* One vote control, wherever a candidate is shown */
.vote { display: inline-flex; gap: 4px; }
.card .vote .chip, td.my .vote .chip { padding: 1px 7px; }
.chip.on.pass { color: #0d130f; background: var(--mut); border-color: var(--mut); }
.chip.on.veto { color: #130d0d; background: var(--bad); border-color: var(--bad); }

.reason {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center;
  width: min(760px, 100%); padding: 6px 10px;
  background: var(--panel); border: 1px solid #55231d; border-radius: 8px;
}
.reason input { flex: 1 1 200px; }
.reason-bar { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 35; width: min(760px, calc(100vw - 24px)); }

/* Identity gate: a name is required before anything, so this covers the page until one is picked */
.gate { position: fixed; inset: 0; z-index: 50; background: #0b0d0af2; display: grid; place-items: center; padding: 16px; }
.gate-box {
  position: relative; width: min(520px, 100%); display: grid; gap: 10px;
  padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.gate-box h2 { font-size: 15px; color: var(--fg); text-transform: none; letter-spacing: 0; margin: 0; }
.gate-box p { color: var(--mut); }
.gate-names { display: flex; flex-wrap: wrap; gap: 6px; }
.gate-names .chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 5px 10px; }
.gate-names .chip.on .muted { color: #0d130f; }
.gate-box .row { display: flex; gap: 8px; }
.gate-box .row input { flex: 1 1 auto; }
.gate-box .close { position: absolute; top: 10px; right: 12px; }

/* Past events: a read-only record, so the shortlist controls do not apply */
body.past #search, body.past #statusFilter, body.past #viewToggle,
body.past .check, body.past .pick { display: none; }
.record { padding: 10px 12px; max-width: 900px; }
.record h3 { margin: 0 0 6px; font-size: 16px; }
.record dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0 0 10px; }
.record dt { color: var(--mut); }
.record dd { margin: 0; }
.record table { margin-top: 4px; }
.record tbody tr.on td { color: var(--accent); }
.record p { margin: 6px 0 14px; }

/* Reporting a bug by pointing at it. The picker sits above everything and is deliberately not
   pickable itself, or the first thing anybody reports is the reporter. */
body.fb-picking,
body.fb-picking * {
  cursor: crosshair !important;
}

.fb-highlight,
.fb-mark {
  position: absolute;
  pointer-events: none;
  z-index: 9998;
  border-radius: 3px;
}

.fb-highlight {
  background: rgba(56, 132, 255, 0.18);
  outline: 1px solid rgba(56, 132, 255, 0.9);
}

/* The label rides above the box unless that would push it off the top of the page. */
.fb-highlight::after {
  content: attr(data-label);
  position: absolute;
  top: -1.45rem;
  left: 0;
  max-width: 22rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: rgba(56, 132, 255, 0.95);
  color: #fff;
  font-size: 0.72rem;
}

.fb-mark {
  outline: 2px dashed rgba(232, 120, 32, 0.95);
  background: rgba(232, 120, 32, 0.12);
}

.fb-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  width: 22rem;
  max-width: calc(100vw - 2rem);
  padding: 0.7rem;
  border: 1px solid var(--line, #d8d8d8);
  border-radius: 8px;
  background: var(--panel);
  color: var(--fg);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  font-size: 0.85rem;
}
.fb-panel.left { left: 1rem; right: auto; }

.fb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.fb-head-actions { display: flex; gap: 0.3rem; }

.fb-kinds {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.fb-kinds button,
.fb-actions button,
.fb-head button {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line, #d8d8d8);
  border-radius: 999px;
  color: var(--fg);
  background: var(--panel-2);
  cursor: pointer;
  font: inherit;
}

.fb-kinds button.on {
  color: #0d130f;
  background: var(--accent);
  border-color: var(--accent);
}

.fb-targets {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  max-height: 7rem;
  overflow-y: auto;
}

.fb-targets li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.15rem 0;
}

.fb-targets button {
  border: 0;
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  font: inherit;
  opacity: 0.6;
}

.fb-panel textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem;
  border: 1px solid var(--line, #d8d8d8);
  border-radius: 4px;
  color: var(--fg);
  background: var(--panel-2);
  font: inherit;
  resize: vertical;
}

.fb-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.fb-error {
  margin: 0.4rem 0 0;
  color: var(--bad);
}
.lightbox .photo-actions { display: flex; gap: 6px; align-items: center; cursor: default; }
.panel .gallery .tile.is-hidden img { filter: grayscale(1); opacity: .3; }
.panel .gallery .tile.is-hidden:hover img { opacity: .7; }
.grouping { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.threshold { display: flex; gap: 6px; align-items: center; color: var(--mut); }
.threshold input { width: 120px; }

/* Office board */
.baseline { padding: 4px 10px; color: var(--mut); border-bottom: 1px solid var(--line); }
.office-settings { display: grid; grid-template-columns: max-content 8rem; gap: 4px 10px; align-items: center; align-content: start; }
.office-settings h2 { grid-column: 1 / -1; margin-top: 6px; }
.office-settings label, .office-facts label { display: contents; color: var(--mut); }
.office-settings #settingsResult { grid-column: 1 / -1; }
.office-facts { display: grid; grid-template-columns: 1fr 7rem; gap: 4px 10px; align-items: center; margin: 6px 0 14px; }
.empty-board { padding: 20px; }
.captures > div { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.card .vote-actions { display: flex; gap: 3px; margin-top: 3px; }
.card .vote-actions .chip { flex: 1 1 0; padding: 1px 4px; font-size: 11px; }
.map-view { padding: 0; }
#officeMap, #dinnerMap, #foodMap { width: 100%; background: var(--panel-2); position: relative; z-index: 0; }
.leaflet-tooltip { font: 12px/1.35 system-ui, sans-serif; }
.map-legend { background: #171b16e6; color: var(--fg); padding: 6px 8px; border-radius: 6px; font: 11px/1.5 system-ui, sans-serif; }
.map-legend i { display: inline-block; vertical-align: middle; }
.map-legend .fill-scale { width: 48px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, hsl(0 80% 48%), hsl(60 80% 48%), hsl(120 80% 48%)); }
.map-legend .ring { width: 10px; height: 10px; border-radius: 50%; border: 3px solid; }
.map-legend .ring.blue { border-color: #3d8bff; }
.map-legend .ring.magenta { border-color: #e040c8; }
.map-badges { display: flex; gap: 1px; white-space: nowrap; font: 600 11px/1 system-ui, sans-serif; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.map-badges .mine { outline: 2px solid #f3c657; border-radius: 4px; }
.map-legend .ring.red { border-color: #ff2d2d; }
.map-popup { display: grid; gap: 4px; font: 12px/1.35 system-ui, sans-serif; color: #172019; }
.map-popup img { width: 100%; height: 120px; object-fit: cover; border-radius: 4px; }
.map-popup .vote-actions { display: flex; gap: 3px; }
.map-popup .chip { color: #172019; background: #eef2ee; border-color: #ccd6cc; padding: 2px 6px; }
.map-popup .chip.on { color: #0d130f; background: var(--accent); border-color: var(--accent); }
.map-popup .muted { color: #5b665e; }
.swipe-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; align-items: start; }
.swipe-split #officeMap, .swipe-split #dinnerMap { position: sticky; top: var(--bar, 34px); }
@media (max-width: 900px) {
  .swipe-split { grid-template-columns: 1fr; }
  .swipe-split #officeMap, .swipe-split #dinnerMap { position: relative; top: auto; order: -1; }
  .swipe-split .voting { height: calc(100dvh - var(--bar, 34px) - 260px - 16px); }
  .swipe-split .map-legend { display: none; }
}
.map-thumb { display: block; width: 180px; height: 110px; object-fit: cover; border-radius: 4px; margin-bottom: 4px; }
.map-focus { animation: map-focus 1.2s ease-in-out infinite; }
@keyframes map-focus { 50% { stroke-opacity: .25; } }
.map-home { display: flex; align-items: center; gap: 2px; white-space: nowrap; font: 600 11px/1 system-ui, sans-serif; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.map-home b { padding: 1px 4px; border-radius: 4px; background: #000000a0; text-shadow: none; }
.map-home.mine b { background: #f3c657; color: #130f00; }
.who-voted { font-size: 12px; }
.who-voted i { color: var(--mut); }
.leaflet-tooltip .who-voted i, .map-popup .who-voted i { color: #5b665e; }
.commutes { display: flex; flex-wrap: wrap; gap: 3px; }
.commutes .f.mine { color: #130f00; background: #f3c657; }
.map-popup .commutes .f { background: #eef2ee; color: #172019; }
.map-centre { position: relative; }
.map-centre i { position: absolute; inset: 0; border-radius: 50%; border: 4px solid #3d8bff; background: radial-gradient(circle, #3d8bff 0 5px, #3d8bff33 6px); box-shadow: 0 0 0 3px #ffffffcc; animation: map-centre 1.6s ease-in-out infinite; }
.map-centre b { position: absolute; left: 38px; top: 8px; white-space: nowrap; padding: 2px 6px; border-radius: 5px; background: #3d8bff; color: #fff; font: 700 12px/1.2 system-ui, sans-serif; }
@keyframes map-centre { 50% { box-shadow: 0 0 0 9px #3d8bff33; } }
#officeMap.pinning, #officeMap.pinning .leaflet-interactive { cursor: crosshair; }
.pin-hint { color: var(--warn); }
.map-poi { font-size: 13px; line-height: 16px; text-align: center; filter: drop-shadow(0 0 1px #000); }
.baseline-nearby { display: inline-flex; gap: 3px; vertical-align: middle; }

.cost-steps { margin: 4px 0 0; padding-left: 1.2rem; font-size: 0.9em; }
.cost-steps li { margin: 2px 0; }
.cost-steps li.gap > b { color: var(--warn, #e0a33a); }
.site-cost { margin: 4px 0; }
.site-cost summary { cursor: pointer; }

.dinner-dates { display: grid; gap: 6px; margin-bottom: 8px; }
.dinner-date { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
.dinner-date.best { border-color: var(--accent); }
.dinner-date > b { min-width: 7rem; }
.dinner-date-names { font-size: 12px; }
.dinner-date-add { display: flex; gap: 8px; align-items: center; }
.dinner-board .stage:has(.none) { flex: 0 0 72px; min-height: 72px; }
.dinner-board .stage .none { font-size: 32px; }
.dinner-card .shot { aspect-ratio: 16 / 10; }

.menu-section { margin: 10px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); }
.menu-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line); }
.menu-item.ordered .menu-name { color: var(--accent); }
.menu-item .fav { padding: 0 6px; }
.menu-item .fav.on { color: var(--warn); }
.menu-price { white-space: nowrap; color: var(--mut); }
.menu-qty { display: flex; gap: 4px; align-items: center; }
.menu-qty b { min-width: 1.2em; text-align: center; }
.menu-qty .chip { padding: 0 7px; }
.order-note input { width: 100%; margin: 6px 0; }
.order-line { padding: 2px 0; }
.order-send textarea { width: 100%; margin: 4px 0; font: inherit; }
.column-menu { position: absolute; z-index: 60; display: grid; gap: 4px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-height: 60vh; overflow: auto; min-width: 180px; }
.column-menu label { display: flex; gap: 6px; align-items: center; white-space: nowrap; }

/* Cards: name, place, price, then the facts, with what nobody knows yet kept quiet. */
.card .name { font-size: 13.5px; }
.f.unknown { background: none; color: var(--mut); opacity: .55; padding: 0 3px; }
td.f.unknown { opacity: .4; }
.card .vote, .card .vote-actions { display: flex; gap: 3px; margin-top: 3px; }
.card .vote .chip, .card .vote-actions .chip { flex: 1 1 0; padding: 1px 4px; font-size: 11px; }

/* Account page */
.account-page { max-width: 980px; padding: 14px 16px 40px; display: grid; gap: 22px; }
.account-page section { display: grid; gap: 8px; align-content: start; }
.account-page h2 { margin: 0; }
.account-page dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 0; }
.account-page dt { color: var(--mut); }
.account-page dd { margin: 0; }
.account-page th { position: static; cursor: default; }
.account-page table { table-layout: fixed; }
.account-page th:nth-child(1) { width: 9rem; }
.account-page th:nth-child(2) { width: 12rem; }
.account-page th:nth-child(3) { width: 17rem; }
.account-page td { overflow: hidden; text-overflow: ellipsis; }
.account-page td { vertical-align: middle; }
.account-page .actions { display: flex; gap: 4px; flex-wrap: wrap; }
.account-page form { margin: 0; }
.account-page .claim { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bad { color: var(--bad); }
.status-allowed { color: var(--accent); }
.status-waiting { color: var(--warn); }

@media (max-width: 820px) {
  nav.top { gap: 0 4px; }
  .brand { display: none; }
  .tabs a { padding: 0 7px; }
  .chip.waiting span, .chip.update span { display: none; }
  button.more { display: inline-block; }
  .tools-nav { display: none; order: 10; flex-basis: 100%; flex-wrap: wrap; padding: 2px 0 6px; }
  body.more-open .tools-nav { display: flex; }
  header.bar { position: static; }
  .phone-only { display: inline-block; }
  .bar-row.filters { display: none; }
  header.bar.show-filters .bar-row.filters { display: flex; }
  input[type="search"] { flex: 1 1 100%; min-width: 0; }
  body:has(> .side:not([hidden])) { --panel-w: 0px; }
  .side { width: 100vw; }
  .lightbox { grid-template-columns: 32px minmax(0, 1fr) 32px; }
}
.hidden-hits { grid-column: 1 / -1; margin: 12px 8px 0; font-size: 13px; font-weight: 600; color: var(--mut); }

/* Food board */
.food-grades { display: flex; gap: 2px; height: 16px; margin: 6px 0 4px; font-size: 11px; line-height: 16px; font-weight: 600; overflow: hidden; }
.food-grades .food-grade { min-width: 0; height: 16px; padding: 0 3px; overflow: hidden; white-space: nowrap; }
.food-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; padding: 1px 5px; border-radius: 4px; background: var(--panel-2); color: var(--fg); }
.food-fit { white-space: nowrap; }
.food-card .where, .food-card .name { overflow-wrap: anywhere; }
.food-more { grid-column: 1 / -1; justify-self: center; margin: 12px 0; }
.food-grade.gA { background: #1e8449; color: #fff; }
.food-grade.gB { background: #7dbb42; color: #10130f; }
.food-grade.gC { background: #f2c12e; color: #10130f; }
.food-grade.gD { background: #ee8100; color: #10130f; }
.food-grade.gE { background: #e5534b; color: #fff; }
.food-fit .muted { margin-left: 2px; }
.food-dish { padding: 6px 0; border-bottom: 1px solid var(--line); }
.food-dish.dim { opacity: 0.4; }
.food-dish-head { display: flex; gap: 8px; align-items: baseline; }
.food-dish-name { flex: 1; font-weight: 600; }
.food-dish-price { white-space: nowrap; }
.food-badges { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; font-size: 12px; }
.food-badge.yes { color: var(--accent); }
.food-badge.no { color: var(--bad); }
.food-badge.unknown { color: var(--mut); }
.food-allergens { font-size: 12px; margin-top: 2px; }
.food-check { border-collapse: collapse; margin: 6px 0; }
.food-check td { padding: 3px 8px 3px 0; vertical-align: middle; }
.food-allergens.warn, .food-board .warn { color: var(--warn); }
.chip.warn { border-color: var(--warn); color: var(--warn); }
.food-card .shot { aspect-ratio: 16 / 9; }
/* The grade bar and status sit on the card's bottom edge, so bars line up across a row of cards. */
.food-card .body { flex: 1; display: flex; flex-direction: column; }
.food-card-foot { margin-top: auto; }
.food-dish-img { float: right; width: 72px; height: 72px; object-fit: cover; border-radius: 6px; margin: 0 0 4px 8px; }
.food-dish::after { content: ""; display: block; clear: both; }
.food-cuisines { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; }
.food-locations { margin: 4px 0 8px; }
.food-locations div { padding: 2px 0; }
.food-dish-price.over { color: var(--bad); text-decoration: line-through; }
