:root {
  --ink: #17211b; --ink-2: #36423b; --muted: #5b675f;
  --paper: #ffffff; --sage: #f2f5f1; --sage-2: #e6ebe4;
  --line: #e1e6df; --line-strong: #c5cdc4;
  --sidebar-bg: #17211b; --sidebar-ink: #e8ede6; --sidebar-muted: #a3aea0;
  --brass: #b08a45; --brass-ink: #7a5a1f; --brass-bg: #f5ecda;
  --ok: #2c6b44; --ok-bg: #e3efe5; --alert: #ad3527; --alert-bg: #f9e4e0; --warn: #855709; --warn-bg: #f6ead1;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --radius: 8px; --sidebar: 236px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.sprite { display: none; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius); background: none; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn .icon { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { color: #fff; background: var(--ink); }
.btn-primary:hover:not(:disabled) { background: #2a3830; }
.btn-secondary { background: var(--paper); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink-2); background: var(--sage); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--sage); }
.btn-danger { color: #fff; background: var(--alert); }
.btn-danger:hover:not(:disabled) { background: #8f2a1e; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--ink-2); cursor: pointer; }
.icon-button:hover:not(:disabled) { background: var(--sage); }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.text-link { color: var(--brass-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.row-button { min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--alert); font-size: 14px; font-weight: 600; cursor: pointer; }
.row-button:hover { text-decoration: underline; }

/* Fields */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.field input, .field select, .toolbar select, .search input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; font-size: 15px; }
.field input:focus, .field select:focus, .toolbar select:focus, .search input:focus { outline: 2px solid var(--brass); outline-offset: -1px; border-color: transparent; }
.field.invalid input { border-color: var(--alert); }
.field-error { color: var(--alert); font-size: 13px; }
.field-error:empty { display: none; }
.check { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); }
.check-box { padding: 14px 16px; border-radius: var(--radius); background: var(--sage); font-size: 15px; }
.check-box.invalid { outline: 2px solid var(--alert); }
.form-error { margin: 0; color: var(--alert); font-size: 14px; }
.form-error:empty { display: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-wide { grid-column: 1 / -1; }
.hint { margin: 0; color: var(--muted); }
kbd { padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: #fff; font: 600 13px var(--sans); }

/* Chips */
.chip { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; color: var(--ink-2); background: var(--sage-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.ok, .chip.connected { color: var(--ok); background: var(--ok-bg); }
.chip.alert { color: var(--alert); background: var(--alert-bg); }
.chip.warn { color: var(--warn); background: var(--warn-bg); }
.chip.brass { color: var(--brass-ink); background: var(--brass-bg); }

/* Login */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--sidebar-bg); }
.login-card { width: min(400px, 100%); display: grid; gap: 18px; padding: 32px; border-radius: 12px; background: var(--paper); }
.login-card h1 { margin-top: 8px; font-size: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { display: block; border-radius: 8px; }
.brand strong { display: block; font: 600 17px/1.2 var(--serif); }
.brand span { display: block; color: var(--muted); font-size: 13px; }

/* Sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); display: flex; flex-direction: column; gap: 24px; padding: 22px 14px 14px; color: var(--sidebar-ink); background: var(--sidebar-bg); }
.sidebar .brand { padding: 0 8px; }
.sidebar .brand span { color: var(--sidebar-muted); }
.sidebar nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--radius); color: var(--sidebar-muted); font-weight: 500; text-decoration: none; }
.sidebar nav a:hover { color: var(--sidebar-ink); background: rgba(255,255,255,.05); }
.sidebar nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.sidebar nav a.active .icon { color: var(--brass); }
.nav-count { margin-left: auto; }
/* Avenir Next sits digits about half a pixel high; the top padding re-centres them optically. */
.nav-count, .count { display: inline-grid; place-items: center; box-sizing: border-box; height: 22px; min-width: 22px; padding: 1px 7px 0; border-radius: 11px; color: #fff; background: var(--alert); font-size: 13px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.sidebar-foot { display: grid; gap: 2px; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.status-stamp { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sidebar-muted); }
.status-stamp.ok .status-dot { background: #79bb8e; }
.status-stamp.alert .status-dot { background: #e2826d; }
.status-stamp.degraded .status-dot, .status-stamp.stale .status-dot { background: #e1b45d; }
.sidebar-foot p { margin: 0 0 8px 18px; color: var(--sidebar-muted); font-size: 13px; }
.sidebar-foot .version { margin: 6px 0 0; font-size: 12px; }
.sidebar-button { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 -8px; padding: 0 8px; border: 0; border-radius: var(--radius); background: none; color: var(--sidebar-muted); cursor: pointer; }
.sidebar-button:hover { color: var(--sidebar-ink); background: rgba(255,255,255,.05); }

/* Shell */
.app-shell { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 40px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.topbar h1 { font-size: 24px; letter-spacing: -.01em; }
.menu-button { display: none; }
.topbar-run { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar-meta { color: var(--muted); font-size: 14px; }
.topbar-meta strong { color: var(--ink); font-weight: 600; }
.topbar-meta.stale, .topbar-meta.stale strong { color: var(--warn); }
.run-spin .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
main { width: min(1120px, 100%); margin: 0 auto; padding: 28px 40px 64px; }
.view { display: grid; gap: 44px; }

/* Sections and flat lists */
.section { min-width: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.section-head h2 { font-size: 18px; }
.section-head h2 .count { margin-left: 8px; vertical-align: 2px; }
.section-head p { max-width: 70ch; margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.count { color: var(--ink-2); background: var(--sage-2); }
.count.alert { color: #fff; background: var(--alert); }
.count.warn, .nav-count.warn { color: var(--warn); background: var(--warn-bg); }
.confirm-list { margin: 0; padding-left: 18px; }
.confirm-list:empty { display: none; }
.confirm-list li + li { margin-top: 4px; }
.list:empty::after { content: attr(data-empty); display: block; padding: 18px 0; color: var(--muted); }
.empty { margin: 0; padding: 18px 0; color: var(--muted); }
.empty.positive { display: flex; align-items: center; gap: 10px; color: var(--ok); font-weight: 600; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 4px 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.row-icon { width: 20px; height: 20px; margin-top: 2px; }
.row-icon.alert { color: var(--alert); }
.row-icon.ok { color: var(--ok); }
.row-icon.warn { color: var(--warn); }
.row-main { min-width: 0; }
.row-title { display: block; font-size: 16px; font-weight: 600; }
.row-text { margin: 2px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.row-side { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 14px; }
.row.compact { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.row.compact .row-side:last-child { grid-column: -2 / -1; }
.range-dates { font-variant-numeric: tabular-nums; white-space: nowrap; }
.occurrences { margin-top: 10px; }
.occurrences summary { width: fit-content; min-height: 32px; display: flex; align-items: center; gap: 6px; color: var(--brass-ink); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.occurrences summary::-webkit-details-marker { display: none; }
.occurrences summary .icon { width: 16px; height: 16px; transition: transform .15s; }
.occurrences[open] summary .icon { transform: rotate(180deg); }
.occurrences .table-wrap { overflow-x: auto; }
.occurrences table { font-size: 14px; }
.occurrences th { position: sticky; top: 0; background: var(--paper); }
.occurrences td, .occurrences th { padding: 6px 16px 6px 0; }

/* Overview */
.status-line { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 18px 22px; border-left: 4px solid var(--muted); border-radius: 0 var(--radius) var(--radius) 0; background: var(--sage); }
.status-line .status-icon { width: 28px; height: 28px; color: var(--muted); }
.status-line h2 { font-size: 20px; }
.status-line p { margin: 2px 0 0; color: var(--ink-2); }
.status-line.ok { border-color: var(--ok); background: var(--ok-bg); }
.status-line.ok .status-icon { color: var(--ok); }
.status-line.alert { border-color: var(--alert); background: var(--alert-bg); }
.status-line.alert .status-icon { color: var(--alert); }
.status-line.degraded { border-color: var(--warn); background: var(--warn-bg); }
.status-line.degraded .status-icon { color: var(--warn); }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.facts { display: grid; grid-template-columns: auto 1fr; margin: 0; }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Availability calendar */
.availability-wrap { padding-top: 16px; overflow-x: auto; }
.availability { display: grid; grid-template-rows: auto repeat(7, auto); grid-auto-flow: column; grid-template-columns: 28px; grid-auto-columns: minmax(22px, 1fr); gap: 3px; min-width: 520px; }
.availability .month { min-width: 0; padding-bottom: 2px; overflow: visible; color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.availability .wd { align-self: center; color: var(--muted); font-size: 12px; font-weight: 600; }
.day { position: relative; display: grid; place-items: center; aspect-ratio: 1.15; min-height: 22px; border-radius: 4px; color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.day.open { color: var(--ok); background: var(--ok-bg); }
.day.full { color: var(--muted); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong); }
.day.blocked { color: var(--muted); background: repeating-linear-gradient(135deg, var(--sage-2) 0 3px, var(--sage) 3px 7px); }
.day.closed { color: #fff; background: repeating-linear-gradient(135deg, #6b776f 0 3px, #808b83 3px 7px); }
.day.exception { color: var(--brass-ink); background: var(--brass-bg); box-shadow: inset 0 0 0 2px var(--brass); }
.day.alert { color: #fff; background: var(--alert); font-weight: 700; }
.day.notice { color: var(--warn); background: var(--paper); outline: 2px dashed #c27d0e; outline-offset: -2px; font-weight: 700; }
.day.today::after { content: ""; position: absolute; inset: -3px; border: 2px solid var(--ink); border-radius: 6px; }
button.day { padding: 0; border: 0; font: inherit; font-size: 12px; cursor: pointer; }
button.day:hover { box-shadow: inset 0 0 0 2px var(--ink); }
button.day[aria-expanded="true"] { outline: 3px solid var(--brass); outline-offset: 1px; z-index: 1; }

/* Day popover */
.day-popover { position: fixed; inset: auto; margin: 0; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; padding: 4px 16px 16px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: var(--paper); box-shadow: 0 18px 50px rgba(10,20,14,.22); }
.day-popover:focus { outline: none; }
.day-popover-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-right: -10px; padding-top: 8px; }
.day-popover-head h3 { margin-bottom: 4px; font-size: 16px; }
.day-popover h4 { margin: 14px 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.day-popover-text { margin: 8px 0 0; }
.day-popover h4 + .day-popover-text { margin-top: 0; }
.day-reasons { margin: 0; padding-left: 18px; }
.day-alerts { margin: 0; padding: 0; list-style: none; }
.day-alerts li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.day-alerts a { color: var(--alert); font-weight: 600; }
.day-alerts span { color: var(--muted); white-space: nowrap; }
.day-popover-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend b { font-variant-numeric: tabular-nums; }
.sw { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 3px; }
.sw.open { background: var(--ok-bg); box-shadow: inset 0 0 0 1px #b9d3bf; }
.sw.full { box-shadow: inset 0 0 0 1px var(--line-strong); }
.sw.blocked, .sw-blocked { background: repeating-linear-gradient(135deg, #d5ddd3 0 2px, var(--sage) 2px 5px); }
.sw.closed { background: #6b776f; }
.sw.exception { background: var(--brass-bg); box-shadow: inset 0 0 0 2px var(--brass); }
.sw.alert { background: var(--alert); }
.sw.notice { outline: 2px dashed #c27d0e; outline-offset: -2px; }
.sw-selected { background: var(--ink); }
.sw-managed { position: relative; }
.sw-managed::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--alert); }

/* Rules */
.weekday-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; }
.weekday-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.weekday-choices label { position: relative; cursor: pointer; }
.weekday-choices input { position: absolute; opacity: 0; }
.weekday-choices span { display: grid; place-items: center; width: 52px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; font-weight: 600; }
.weekday-choices label:hover span { border-color: var(--ink-2); }
.weekday-choices input:checked + span { border-color: var(--ink); background: repeating-linear-gradient(135deg, var(--sage-2) 0 3px, var(--paper) 3px 7px); box-shadow: inset 0 0 0 1px var(--ink); }
.weekday-choices input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.dirty-note { color: var(--warn); font-size: 14px; font-weight: 600; }

/* Prices */
.price-group h3 { padding: 18px 0 4px; font-size: 15px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar select { width: auto; min-height: 40px; }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; color: var(--muted); transform: translateY(-50%); }
.search input { width: 250px; min-height: 40px; padding-left: 36px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 16px 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; }
th:last-child, td:last-child { padding-right: 0; }
th .sort-icon { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }
td { padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.num { font-weight: 600; }
td.muted { color: var(--muted); }
.price-table th.num, .price-table td.num { width: 150px; }
.price-table td.same { color: var(--alert); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding-top: 10px; color: var(--muted); font-size: 14px; }
.pager span { margin-right: 8px; font-variant-numeric: tabular-nums; }

/* Settings */
.notification-form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; padding-top: 20px; }
.channel { display: grid; gap: 14px; align-content: start; }
.channel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.channel-head h3 { font-size: 16px; }
.notification-form .form-actions { grid-column: 1 / -1; }

/* Modals */
.modal { width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 12px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 80px rgba(10,20,14,.35); }
.modal-wide { width: min(860px, calc(100% - 24px)); }
.modal-small { width: min(420px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(16,24,19,.55); }
.modal[open] { animation: modal-in .16s ease-out both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(6px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 10px 10px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 19px; }
.modal-body { display: grid; gap: 16px; padding: 20px 24px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); }
.modal-foot .form-error { margin-right: auto; }
.calendar-toolbar { position: relative; z-index: 1; display: flex; justify-content: space-between; height: 0; }
.calendar-toolbar .icon-button { margin-top: 6px; }
.calendar-toolbar strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.calendar { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; touch-action: none; user-select: none; }
.calendar-month h4 { margin: 0 0 12px; font-size: 15px; font-weight: 600; line-height: 24px; text-align: center; }
.weekday-row, .day-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.weekday-row span { padding-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.calendar-day { position: relative; height: 38px; padding: 0; border: 0; border-radius: 6px; background: none; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
.calendar-day:hover:not(:disabled) { background: var(--sage-2); }
.calendar-day.blocked { color: var(--muted); background: repeating-linear-gradient(135deg, var(--sage-2) 0 3px, var(--sage) 3px 7px); }
.calendar-day.managed::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--alert); }
.calendar-day.selected, .calendar-day.selected:hover:not(:disabled) { color: #fff; background: var(--ink); }
.calendar-day.selected::after { background: #fff; }
.calendar-day:disabled { color: #b5bdb4; background: none; cursor: not-allowed; }
.selection-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.selection-bar .legend { margin: 0; color: var(--muted); font-size: 13px; }
.selection-bar #selection-summary { margin-left: auto; font-weight: 600; }
.range-fields { grid-template-columns: 1fr 1fr 1fr; }

#toast { position: fixed; right: 24px; bottom: 24px; z-index: 70; max-width: 380px; padding: 12px 16px; border-radius: var(--radius); color: #fff; background: var(--ink); box-shadow: 0 12px 40px rgba(0,0,0,.25); transform: translateY(16px); opacity: 0; pointer-events: none; transition: .2s ease; }
#toast.visible { transform: none; opacity: 1; }
#toast.error { background: var(--alert); }

@media (max-width: 1080px) {
  .overview-columns { grid-template-columns: 1fr; }
  .notification-form { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { width: min(280px, 84vw); transform: translateX(-102%); transition: transform .2s ease; }
  body.menu-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  body.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(16,24,19,.5); }
  .app-shell { margin-left: 0; }
  .menu-button { display: grid; margin-left: -10px; }
  .topbar { padding: 8px 16px; }
  .topbar h1 { font-size: 20px; }
  .topbar-meta { display: none; }
  main { padding: 20px 16px 48px; }
  .view { gap: 36px; }
  .calendar { grid-template-columns: 1fr; }
  .calendar-month + .calendar-month { display: none; }
}
@media (max-width: 600px) {
  html { font-size: 16px; }
  .topbar-run .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar-run .btn { width: 44px; min-height: 44px; padding: 0; }
  .status-line { grid-template-columns: auto 1fr; align-items: start; padding: 16px; }
  .status-line .btn { grid-column: 1 / -1; }
  .status-line .status-icon { width: 24px; height: 24px; }
  .section-head { flex-wrap: wrap; align-items: flex-start; }
  .row { grid-template-columns: auto minmax(0, 1fr); }
  .row-side { grid-column: 2; }
  .row.compact { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .row.compact .row-side:last-child { grid-column: 1; }
  .range-dates { white-space: normal; }
  .availability { min-width: 0; grid-template-columns: 22px; grid-auto-columns: minmax(0, 1fr); gap: 2px; }
  .availability .month { font-size: 11px; }
  .day, button.day { font-size: 0; min-height: 0; border-radius: 3px; }
  .day.today::after { inset: -2px; border-radius: 4px; }
  .weekday-choices { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .weekday-choices span { width: 100%; }
  .weekday-form .form-actions { width: 100%; }
  .search, .search input { width: 100%; }
  .toolbar { width: 100%; }
  .toolbar .search { flex: 1; }
  .form-grid, .range-fields { grid-template-columns: 1fr; }
  .modal-body { padding: 16px; }
  .modal-head { padding-left: 16px; }
  .modal-foot { flex-wrap: wrap; padding: 12px 16px; }
  .modal-foot .form-error { flex-basis: 100%; }
  .modal-foot .btn { min-height: 50px; flex: 1; }
  .selection-bar #selection-summary { margin-left: 0; }
  .price-table td:first-child, #offers td:nth-child(2) { min-width: 140px; white-space: normal; }
  .facts dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
