@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --stage: #f1f0ec;
  --stage-shadow: 0.11;
  --surface: #ffffff;
  --well: #f4f3f0;
  --well-press: #eae9e4;
  --ink: #17181a;
  --ink-soft: #62646b;
  --line: rgba(23, 24, 26, 0.09);
  --accent: #ff4d1f;
  --accent-ink: #c8330a;
  --solid: #17181a;
  --on-solid: #ffffff;
  --on-solid-soft: #b9bbc2;
  --lift: 0 -1px 0 rgba(23, 24, 26, 0.04), 0 -18px 44px -18px rgba(23, 24, 26, 0.2);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --panel-wide: 420px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --stage: #141516;
    --stage-shadow: 0.5;
    --surface: #1e1f22;
    --well: #2a2b2f;
    --well-press: #34353a;
    --ink: #f3f2ee;
    --ink-soft: #a3a5ac;
    --line: rgba(243, 242, 238, 0.1);
    --accent-ink: #ff7a55;
    --solid: #f3f2ee;
    --on-solid: #17181a;
    --on-solid-soft: #5d5f66;
    --lift: 0 -1px 0 rgba(255, 255, 255, 0.05), 0 -18px 44px -18px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--stage);
  color: var(--ink);
  font: 400 16px/1.35 "Geist", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, input { font: inherit; color: inherit; }
button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- stage ---------- */

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  outline: none;
}
#stage:active { cursor: grabbing; }

#top {
  position: fixed;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 10px) 12px 10px 20px;
  pointer-events: none;
}
.wordmark { min-width: 0; display: flex; font-size: 19px; font-weight: 640; letter-spacing: -0.035em; }
.wordmark svg { width: 24px; height: 24px; flex: none; }
#rigs {
  pointer-events: auto;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: -8px;
  padding: 0 8px;
  border-radius: 22px;
  letter-spacing: inherit;
  transition: background-color 140ms var(--ease-out), transform 140ms var(--ease-out);
}
#rigs:active { background: var(--well-press); transform: scale(0.97); }
/* with more than one saved rig, the current one's name: on a phone it takes the wordmark's place */
.rig-name {
  min-width: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rig-name:empty { display: none; }
#rigs.has-name .wordmark-text { display: none; }
.wordmark .wordmark-more { width: 16px; height: 16px; margin-left: -3px; color: var(--ink-soft); stroke-width: 2.2; }
.icon-button {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background-color 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.icon-button:active { background: var(--well-press); transform: scale(0.94); }
.top-end { flex: none; display: flex; align-items: center; gap: 2px; }
.weight {
  pointer-events: auto;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 540;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.weight:active { background: var(--well-press); transform: scale(0.96); }
.weight[aria-expanded="true"] { color: var(--ink); }

/* ---------- panel ---------- */

#panel {
  position: fixed;
  inset: auto 0 0 0;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  box-shadow: var(--lift);
  padding: 14px 0 calc(var(--safe-bottom) + 14px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}
.is-ready #panel { opacity: 1; transform: none; }

.rail {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 14px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  min-width: 112px;
  max-width: 190px;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 14px 11px;
  border-radius: 16px;
  background: var(--well);
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: background-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.chip:active { transform: scale(0.97); background: var(--well-press); }
.chip[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--surface); }
.chip-label { font-size: 13px; color: var(--ink-soft); }
.chip-value {
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip.is-empty {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip.is-empty svg { width: 16px; height: 16px; stroke-width: 2.2; }
.chip.is-empty[aria-expanded="true"] { color: var(--ink); }
.rail-add { display: contents; }

/* a quiet dot: a note (grey) or something that does not work (accent) */
.mark { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; vertical-align: 2px; background: var(--ink-soft); }
.mark.is-warn { background: var(--accent); }

.bar { display: flex; gap: 8px; padding: 0 14px; }
.dates, .total {
  min-height: 60px;
  border-radius: 18px;
  text-align: left;
  transition: transform 140ms var(--ease-out), background-color 140ms var(--ease-out);
}
.dates:active, .total:active { transform: scale(0.975); }
.dates { flex: 0 0 auto; display: grid; align-content: center; gap: 1px; padding: 0 16px; background: var(--well); }
.dates:active { background: var(--well-press); }
.dates-range { font-size: 15px; font-weight: 560; letter-spacing: -0.01em; white-space: nowrap; }
.dates-days { font-size: 13px; color: var(--ink-soft); }
.total {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  background: var(--solid);
  color: var(--on-solid);
}
.total-text { display: grid; gap: 1px; min-width: 0; }
.total-house { font-size: 15px; font-weight: 560; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.total-note { font-size: 13px; color: var(--on-solid-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.total-amount { font-size: 22px; font-weight: 620; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.empty { padding: 20px; color: var(--ink-soft); text-wrap: balance; }

/* ---------- sheet ---------- */

#scrim { position: fixed; inset: 0; }
#sheet {
  position: fixed;
  inset: auto 0 0 0;
  max-height: min(58dvh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  box-shadow: var(--lift);
  transform: translateY(102%);
  transition: transform 340ms var(--ease-sheet);
  outline: none;
}
#sheet.is-open { transform: none; }
#sheet.is-dragging { transition: none; }
#sheet[data-kind="houses"] { max-height: min(70dvh, 720px); }
#sheet[data-kind="dates"] { max-height: none; }

.sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 12px 10px 20px;
  position: relative;
  touch-action: none;
}
.sheet-head::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  border-radius: 2px;
  background: var(--line);
}
.sheet-head h2 { font-size: 20px; font-weight: 620; letter-spacing: -0.025em; }
.done {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 560;
  color: var(--accent-ink);
  transition: background-color 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.done:active { background: var(--well); transform: scale(0.96); }

.filters {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  padding: 2px 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--well);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}
.filter[aria-pressed="true"] { background: var(--solid); color: var(--on-solid); }

.rows, .houses {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 8px calc(var(--safe-bottom) + 14px);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.row {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 14px;
  text-align: left;
  transition: background-color 120ms var(--ease-out);
}
.row:active { background: var(--well); }
.row-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.row-name { font-size: 16px; font-weight: 540; letter-spacing: -0.012em; overflow-wrap: anywhere; }
.row-meta { font-size: 14px; color: var(--ink-soft); text-wrap: pretty; }
.row-price { flex: 0 0 auto; font-size: 16px; font-weight: 540; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-from, .row-unit { font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.row-check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: transparent;
  transition: background-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.row-check svg { width: 14px; height: 14px; stroke-width: 2.6; }
.row[aria-pressed="true"] .row-check { background: var(--accent); box-shadow: none; color: #fff; }
.row-none { color: var(--ink-soft); font-size: 16px; }
.row.is-unfit .row-name { color: var(--ink-soft); font-weight: 480; }
.row-price { display: grid; justify-items: end; gap: 1px; }
.was { font-size: 14px; font-weight: 400; color: var(--ink-soft); }
.was.is-down { color: var(--accent-ink); }

/* actions on the picked row: units, or rename and delete a saved rig */
.rig-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px 12px; }
.pill {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--well);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.pill:active { background: var(--well-press); transform: scale(0.97); }
.row.is-renaming { cursor: auto; }
.rename {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  margin: 0 0 0 -4px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--well);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  font-size: 16px;
  font-weight: 540;
  letter-spacing: -0.012em;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.row-none svg { width: 18px; height: 18px; margin: 0 -4px 0 2px; stroke-width: 2.2; }
.row-action { min-height: 60px; gap: 14px; }
.row-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--well); }
.row-action .row-name { flex: 1 1 auto; }

.shoot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px calc(var(--safe-bottom) + 16px);
  border-top: 1px solid var(--line);
}
#sheet[data-kind="rigs"] .rows { padding-bottom: 8px; }

.qty {
  display: inline-flex;
  align-items: center;
  margin: -4px 0 10px 12px;
  border-radius: 22px;
  background: var(--well);
}
.qty-step {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background-color 140ms var(--ease-out), transform 120ms var(--ease-out);
}
.qty-step svg { width: 18px; height: 18px; stroke-width: 2.2; }
.qty-step:active:not(:disabled) { background: var(--well-press); transform: scale(0.92); }
.qty-step:disabled { color: var(--ink-soft); opacity: 0.4; cursor: default; }
.qty-n { min-width: 22px; text-align: center; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

.notice {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 20px 12px;
  font-size: 16px;
  text-wrap: pretty;
}
.notice .mark { flex: none; margin: 0; vertical-align: 0; transform: translateY(-2px); }
.notice.is-note { color: var(--ink-soft); }
.sheet-sub { font-size: 16px; font-weight: 450; letter-spacing: -0.005em; color: var(--ink-soft); white-space: nowrap; }

/* ---------- houses ---------- */

.house { border-radius: 18px; }
.house + .house { margin-top: 4px; }
.house details[open] { background: var(--well); border-radius: 18px; }
.house summary {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
}
.house summary::-webkit-details-marker { display: none; }
.house summary svg { width: 18px; height: 18px; color: var(--ink-soft); transition: transform 200ms var(--ease-out); }
.house details[open] summary svg { transform: rotate(90deg); }
.house-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.house-name { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.house-status { font-size: 14px; color: var(--ink-soft); }
.house-total { font-size: 20px; font-weight: 620; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-partial .house-total { color: var(--ink-soft); font-weight: 500; }

.lines { padding: 2px 12px 4px; }
.line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.line-name { min-width: 0; overflow-wrap: anywhere; text-decoration: none; }
.line-name svg { width: 13px; height: 13px; margin-left: 4px; vertical-align: -1px; color: var(--ink-soft); }
.line-price { flex: 0 0 auto; display: grid; justify-items: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line.is-missing { color: var(--ink-soft); }
.house-note { padding: 6px 12px 0; font-size: 14px; color: var(--ink-soft); max-width: 60ch; }
.ask {
  display: grid;
  place-items: center;
  min-height: 48px;
  margin: 12px;
  border-radius: 16px;
  background: var(--solid);
  color: var(--on-solid);
  font-size: 15px;
  font-weight: 560;
  text-decoration: none;
  transition: transform 140ms var(--ease-out);
}
.ask:active { transform: scale(0.98); }
.source { flex: 0 0 auto; padding: 10px 20px calc(var(--safe-bottom) + 16px); font-size: 13px; color: var(--ink-soft); border-top: 1px solid var(--line); }
#sheet[data-kind="houses"] .houses { padding-bottom: 12px; }

.split { margin-top: 12px; }
.split.is-first { margin: 0 0 12px; }
.split-part + .split-part { margin-top: 4px; }
.split-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 4px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.split-house { min-width: 0; overflow-wrap: anywhere; }
.split-total { flex: none; font-variant-numeric: tabular-nums; }

/* ---------- dates ---------- */

.calendar { padding: 0 14px calc(var(--safe-bottom) + 18px); }
.cal-head { display: flex; align-items: center; gap: 4px; padding: 0 0 6px 8px; }
.cal-month { flex: 1; font-size: 17px; font-weight: 580; letter-spacing: -0.015em; }
.cal-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.cal-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cal-nav[data-month="-1"] svg { transform: rotate(180deg); }
.cal-nav:active { background: var(--well); transform: scale(0.94); }
.cal-nav:disabled { color: var(--ink-soft); opacity: 0.35; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-week { padding-bottom: 4px; font-size: 13px; color: var(--ink-soft); text-align: center; }
.cal-grid { row-gap: 2px; }
.day {
  position: relative;
  display: grid;
  place-items: center;
  height: 46px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.day span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: transform 120ms var(--ease-out);
}
.day:active:not(:disabled) span { transform: scale(0.92); }
.day:disabled { color: var(--ink-soft); opacity: 0.38; }
.day.is-today span { box-shadow: inset 0 0 0 1.5px var(--line); }
.day.is-between { background: linear-gradient(var(--well), var(--well)) center / 100% 42px no-repeat; }
.day.is-from { background: linear-gradient(var(--well), var(--well)) right center / 50% 42px no-repeat; }
.day.is-to { background: linear-gradient(var(--well), var(--well)) left center / 50% 42px no-repeat; }
.day.is-edge span { background: var(--solid); color: var(--on-solid); font-weight: 600; box-shadow: none; }
.cal-hint { min-height: 22px; margin-top: 12px; padding: 0 8px; font-size: 16px; color: var(--ink-soft); }

/* ---------- toast ---------- */

#toast {
  position: fixed;
  top: calc(var(--safe-top) + 62px);
  left: 50%;
  padding: 10px 16px;
  border-radius: 20px;
  background: var(--solid);
  color: var(--on-solid);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translate(-50%, -6px);
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
#toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
#toast { max-width: calc(100vw - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#toast.has-action { display: flex; align-items: center; gap: 4px; padding: 0 4px 0 18px; border-radius: 24px; font-size: 16px; }
#toast.has-action.is-visible { pointer-events: auto; }
.toast-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.toast-action { flex: none; min-height: 44px; padding: 0 14px; border-radius: 20px; color: var(--accent); font-weight: 600; }
.toast-action:active { background: rgba(127, 127, 127, 0.2); }

/* ---------- embed: /?embed=1#<rig>, the rig and one line ---------- */

.is-embed #top, .is-embed #panel, .is-embed #sheet, .is-embed #scrim, .is-embed #toast { display: none; }
.embed-line {
  position: fixed;
  left: 50%;
  bottom: 14px;
  max-width: calc(100% - 28px);
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 22px;
  background: var(--solid);
  color: var(--on-solid);
  font-size: 16px;
  font-weight: 560;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-50%);
}

/* ---------- pointer devices ---------- */

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover, .done:hover, .weight:hover, #rigs:hover { background: var(--well); }
  .pill:hover { background: var(--well-press); }
  .toast-action:hover { background: rgba(127, 127, 127, 0.2); }
  .qty-step:hover:not(:disabled) { background: var(--well-press); }
  .chip:hover, .dates:hover, .filter:hover { background: var(--well-press); }
  .cal-nav:hover:not(:disabled) { background: var(--well); }
  .day:hover:not(:disabled):not(.is-edge) span { background: var(--well-press); }
  .chip[aria-expanded="true"]:hover { background: var(--surface); }
  .filter[aria-pressed="true"]:hover { background: var(--solid); }
  .row:hover { background: var(--well); }
  .line-name:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* ---------- desktop: the rig on the left, the panel on the right ---------- */

@media (min-width: 900px) {
  #top { right: var(--panel-wide); padding: 22px 20px 0 28px; }
  .wordmark { font-size: 21px; }
  #rigs.has-name .wordmark-text { display: inline; }
  .rig-name { font-weight: 520; color: var(--ink-soft); }

  #panel {
    inset: 0 0 0 auto;
    width: var(--panel-wide);
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: -1px 0 0 var(--line);
    padding: 22px 0 20px;
    transform: none;
  }
  .rail {
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    gap: 4px;
    padding: 0 14px 14px;
    overflow: hidden auto;
  }
  .chip {
    max-width: none;
    grid-template-columns: 108px 1fr;
    align-items: center;
    gap: 12px;
    padding: 16px 14px;
    background: none;
  }
  .chip-label { font-size: 15px; }
  .chip-value { font-size: 16px; }
  .rail-add { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 0; }
  .chip.is-empty { min-height: 44px; padding: 0 16px 0 12px; border-radius: 22px; background: var(--well); }
  .bar { padding: 0 20px; }

  #sheet[data-kind] { max-height: none; }
  #sheet {
    inset: 0 0 0 auto;
    width: var(--panel-wide);
    border-radius: 0;
    box-shadow: -1px 0 0 var(--line);
    transform: translateX(102%);
    transition-duration: 300ms;
  }
  #sheet.is-open { transform: none; }
  .sheet-head { padding: 24px 14px 14px 26px; touch-action: auto; }
  .sheet-head::before { display: none; }
  .filters { padding-inline: 26px; }
  .rows, .houses { padding-inline: 14px; }
  .source, .shoot { padding-inline: 26px; }
  .calendar { padding-inline: 18px; }
  #scrim { right: var(--panel-wide); }
  #toast { left: calc((100% - var(--panel-wide)) / 2); top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; }
}
