/* Positano Bron: one neat light system for the guest page and the admin book.
   White page, dark text, pale grey fills instead of borders and shadows, pills, one olive action colour. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 500 15px/22px var(--font); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.loading { padding-top: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 19px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.h1 { font-size: 28px; line-height: 34px; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.h2, .section-title { font-size: 20px; line-height: 26px; font-weight: 800; }
.zone-title { font-size: 16px; line-height: 22px; font-weight: 800; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border: 0; border-radius: var(--r-pill);
  background: var(--soft); color: var(--text); font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.btn:hover { background: var(--line); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-lg { min-height: 58px; font-size: 17px; }
.btn-outline { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-outline:hover { background: var(--soft); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--soft); }
.btn-danger { background: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger-tint); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-split { justify-content: space-between; padding: 0 24px; }
/* a switch that stays on: pressed = filled with the action colour */
.btn-toggle[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.btn-toggle[aria-pressed="true"]:hover { background: var(--accent-ink); }
.icon-btn {
  width: var(--touch); height: var(--touch); flex: none; border: 0; border-radius: var(--r-pill);
  background: var(--soft); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: var(--line); }
.icon-btn svg { width: 22px; height: 22px; }
.link-btn { border: 0; background: transparent; padding: 12px 0; color: var(--accent-ink); font-weight: 700; cursor: pointer; text-align: left; }
.link-btn.is-danger { color: var(--danger); }

/* ---------- pills: dates, categories, lengths ---------- */

.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.pills::-webkit-scrollbar { display: none; }
.pills-wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.pill-btn {
  flex: none; min-height: var(--touch); padding: 0 18px; border: 0; border-radius: var(--r-pill);
  background: var(--soft); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast) var(--ease);
}
.pill-btn:hover { background: var(--line); }
.pill-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.pill-btn.is-dark[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.pill-btn[disabled] { background: var(--soft-2); color: var(--disabled); cursor: not-allowed; }
select.pill-btn { appearance: none; -webkit-appearance: none; padding-right: 18px; }

/* small labels that are not pressed: summary, price, status */
.tag { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--soft); font-size: 13px; line-height: 18px; font-weight: 700; white-space: nowrap; }
.tag-accent { background: var(--accent-tint); color: var(--accent-ink); }
.tag-orange { background: var(--orange-tint); color: var(--orange-ink); }

/* ---------- time grid ---------- */

.times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.time {
  min-height: var(--touch); padding: 0; border: 0; border-radius: var(--r-ctl);
  background: var(--soft); color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.time:hover { background: var(--line); }
.time[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.time[disabled] { background: var(--soft-2); color: var(--disabled); text-decoration: line-through; cursor: not-allowed; }
@media (min-width: 480px) { .times { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- stepper and segmented switch ---------- */

.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border-radius: var(--r-pill); background: var(--soft); }
.stepper button { width: 44px; height: 44px; border: 0; border-radius: var(--r-pill); background: var(--bg); font-size: 22px; line-height: 1; font-weight: 600; cursor: pointer; }
.stepper button[disabled] { opacity: .4; cursor: not-allowed; }
.stepper output { min-width: 36px; text-align: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }

.tabs { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--soft); }
.tabs button { min-height: 38px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button[aria-pressed="true"] { background: var(--bg); color: var(--text); font-weight: 700; }
/* «Условия брони»: one card per place type, three short number fields in a row */
.terms-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-card); background: var(--soft); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.holiday-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
/* language switch in the guest top bar: small, next to the round contact buttons */
.tabs-sm button { min-height: 38px; padding: 0 10px; font-size: 13px; }

/* ---------- place cards (like product cards) ---------- */

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
@media (min-width: 520px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; min-width: 0; }
.card[disabled], .card.is-off { cursor: default; }
.card-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: var(--r-card); background: var(--soft); object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; text-align: center; }
.card.is-off .card-photo { opacity: .6; }
.card:not(.is-off):hover .card-photo { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-name { font-size: 16px; line-height: 22px; font-weight: 800; }
.card-meta { font-size: 13px; line-height: 18px; color: var(--muted); }
.card-state { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--accent-ink); }
.card.is-off .card-name, .card.is-off .card-state { color: var(--muted); }
.card-state.is-quiet { color: var(--muted); font-weight: 600; }
.card-price { display: flex; flex-direction: column; font-size: 15px; line-height: 20px; font-weight: 800; }
.card-price small { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); }

/* photo strip in the booking sheet */
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; height: 240px; width: auto; max-width: 88%; object-fit: cover; border-radius: var(--r-big); scroll-snap-align: center; background: var(--soft); }
.gallery img:only-child { width: 100%; max-width: 100%; }
.photo-empty { aspect-ratio: 4 / 3; max-height: 128px; width: 100%; border-radius: var(--r-big); background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }

/* ---------- floor plan ---------- */

.scheme { border-radius: var(--r-big); background: var(--soft); padding: 10px; }
.scheme-svg { display: block; width: 100%; height: auto; max-height: 78vh; }
.sc-wall { fill: var(--bg); stroke: none; }
.sc-block { fill: var(--soft); stroke: none; }
.sc-decor-text { fill: var(--muted); font-size: 3.2px; font-weight: 600; font-family: var(--font); }
.sc-place { cursor: pointer; outline: none; }
.sc-place rect { fill: var(--soft); stroke: none; transition: fill var(--t-fast) var(--ease); }
.sc-label { fill: var(--text); font-size: 4.6px; font-weight: 800; font-family: var(--font); pointer-events: none; }
.sc-sub { fill: var(--muted); font-size: 2.7px; font-weight: 600; font-family: var(--font); pointer-events: none; }
.sc-place[data-state="free"] rect { fill: var(--accent-tint); }
.sc-place[data-state="free"]:hover rect { fill: var(--accent-tint-hover); }
.sc-place[data-state="free"] .sc-label, .sc-place[data-state="free"] .sc-sub { fill: var(--accent-ink); }
.sc-place[data-state="busy"] rect { fill: var(--soft); }
.sc-place[data-state="busy"] .sc-label { fill: var(--muted); }
.sc-place[data-state="small"] rect { fill: transparent; stroke: var(--line-strong); stroke-width: .5; stroke-dasharray: 1.4 1.2; }
.sc-place[data-state="small"] .sc-label { fill: var(--muted); }
.sc-place[data-state="hold"] rect { fill: var(--amber); }
.sc-place[data-state="hold"] text { fill: var(--amber-ink); }
.sc-place[data-state="confirmed"] rect, .sc-place[data-state="expected"] rect { fill: var(--navy); }
.sc-place[data-state="arrived"] rect { fill: var(--accent); }
.sc-place[data-state="confirmed"] text, .sc-place[data-state="expected"] text, .sc-place[data-state="arrived"] text { fill: var(--on-navy); }
.sc-place:focus-visible rect { stroke: var(--focus); stroke-width: 1.2; }
.scheme-wrap { max-width: 720px; }
.viewbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; line-height: 18px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; line-height: 18px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border: 1px solid var(--line-input); border-radius: var(--r-ctl);
  background: var(--bg); color: var(--text); font-size: 16px;
}
.textarea { min-height: 88px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 13px; line-height: 19px; color: var(--muted); cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
details > summary { cursor: pointer; }

/* Error regions and slots sit in the DOM empty until they have something to say. Out of the flow they take no gap,
   and unlike display: none they stay in the accessibility tree, so a message put into them is still announced. */
[role="alert"]:empty, .stack:empty { position: absolute; }
.alert { padding: 12px 16px; border-radius: var(--r-ctl); background: var(--danger-tint); color: var(--text); font-size: 14px; line-height: 20px; }
.note { padding: 14px 18px; border-radius: var(--r-card); background: var(--soft); font-size: 14px; line-height: 20px; }
.note-warn { background: var(--amber-tint); color: var(--amber-tint-ink); }
/* choices and the cancel button inside a grey block stand on white, or they vanish into it */
.note .pill-btn:not([aria-pressed="true"]), .note .btn-danger { background: var(--bg); }

.total { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--r-card); background: var(--soft); }
.total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-weight: 600; }
.total-sum { font-size: 22px; line-height: 28px; font-weight: 800; white-space: nowrap; }

.facts { display: flex; flex-direction: column; padding: 4px 18px; border-radius: var(--r-card); background: var(--soft); }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); flex: none; }
.facts dd { font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.facts dd a { color: inherit; }

/* ---------- sheet (dialog) ---------- */

dialog.sheet {
  width: 100%; max-width: 560px; max-height: 94vh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: var(--r-big) var(--r-big) 0 0; background: var(--bg); color: var(--text); overflow: hidden;
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in var(--t-base) var(--ease); }
dialog.sheet::backdrop { background: rgba(23, 23, 23, .45); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px var(--gutter) 10px; }
.sheet-title { font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -.01em; }
.sheet-body { padding: 6px var(--gutter) 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.sheet-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: var(--r-pill); background: var(--soft); font-size: 24px; line-height: 1; cursor: pointer; color: var(--text); }
.sheet-close:hover { background: var(--line); }
/* the main button stays in view while the form scrolls */
.sheet-foot { position: sticky; bottom: -24px; margin: 0 calc(var(--gutter) * -1) -24px; padding: 14px var(--gutter) 20px; background: var(--bg); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) {
  dialog.sheet { margin: auto; border-radius: var(--r-big); }
  dialog.sheet.side { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; max-width: 480px; border-radius: 0; }
}

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); padding: 14px 20px; border-radius: var(--r-pill); background: var(--text); color: var(--bg); font-weight: 700; text-align: center; }

/* ---------- status pills (admin) ---------- */

.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; }
/* a neutral pill on a grey row or block needs a white ground (the coloured ones below still win) */
.brow > .pill, .note .pill { background: var(--bg); }
.pill[data-status="pending_payment"] { background: var(--amber); color: var(--amber-ink); }
.pill[data-status="confirmed"] { background: var(--navy); color: var(--on-navy); }
.pill[data-status="arrived"] { background: var(--accent); color: var(--on-accent); }
.pill[data-status="vip"] { background: var(--orange-tint); color: var(--orange-ink); }

/* ---------- guest page ---------- */

.guest { max-width: var(--guest-max); margin: 0 auto; padding: 0 var(--gutter) 56px; display: flex; flex-direction: column; gap: 30px; }
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 0; }
.g-logo { height: 40px; width: auto; }
.g-top .row { flex-wrap: nowrap; }
/* logo, «Қаз | Рус» and two round buttons have to fit a 375 px phone */
@media (max-width: 380px) { .g-logo { height: 34px; } .g-top { gap: 8px; } .g-top .row { gap: 6px; } }
.hero { display: flex; flex-direction: column; gap: 16px; margin-top: -14px; }
/* height: auto lets aspect-ratio win over the height attribute on the <img> */
/* on a low screen (a laptop, a side panel) the photo must not push the first question below the fold */
.hero-photo { width: 100%; height: auto; max-height: max(150px, 34vh); aspect-ratio: 35 / 19; object-fit: cover; border-radius: var(--r-big); background: var(--soft); }
.hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.section { display: flex; flex-direction: column; gap: 12px; }
.footer { color: var(--muted); font-size: 13px; line-height: 19px; display: flex; flex-direction: column; gap: 6px; }

.status-top { display: flex; flex-direction: column; gap: 8px; }
.timer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-radius: var(--r-big); background: var(--navy); color: var(--on-navy); }
.timer small { display: block; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--navy-muted); }
.timer-clock { font-size: 44px; line-height: 50px; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer-sum { font-size: 22px; line-height: 28px; font-weight: 800; text-align: right; white-space: nowrap; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---------- admin ---------- */

.admin { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); }
.brandmark { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brandmark img { height: 30px; width: auto; }
.nightnav { display: flex; align-items: center; gap: 4px; }
.nightnav strong { min-width: 10ch; text-align: center; font-weight: 800; }
.counts { display: flex; flex-wrap: wrap; gap: 6px; }
.counts .tag b { margin-left: 6px; font-variant-numeric: tabular-nums; }
.topbar .grow { flex: 1; }
.search { width: 220px; min-height: 44px; padding: 10px 16px; border-radius: var(--r-pill); border-color: transparent; background: var(--soft); font-size: 15px; }
.admin-main { width: 100%; max-width: var(--admin-max); margin: 0 auto; padding: 18px var(--gutter) 56px; display: flex; flex-direction: column; gap: 16px; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 12px 12px 18px; border-radius: var(--r-card); background: var(--amber-tint); color: var(--amber-tint-ink); font-weight: 700; }
.banner .btn, .banner .icon-btn { background: var(--bg); color: var(--text); }
.banner .icon-btn { width: 40px; height: 40px; }
.banner .icon-btn svg { width: 18px; height: 18px; }

.timeline { border-radius: var(--r-card); background: var(--soft); overflow-x: auto; padding: 0 0 8px; }
.tl-inner { min-width: 980px; position: relative; }
.tl-head, .tl-row { display: grid; grid-template-columns: 140px 1fr; }
.tl-hours { position: relative; height: 36px; }
.tl-hour { position: absolute; top: 10px; transform: translateX(-50%); font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Zone and place names stay in view while the hours scroll sideways on a narrow screen. */
.tl-zone { position: sticky; left: 0; width: max-content; padding: 12px 18px 4px; font-size: 13px; font-weight: 800; color: var(--muted); }
.tl-label, .tl-corner { position: sticky; left: 0; z-index: 3; background: var(--soft); }
.tl-label { padding: 0 18px; display: flex; flex-direction: column; justify-content: center; min-height: 56px; font-weight: 700; }
.tl-label small { color: var(--muted); font-size: 12px; font-weight: 500; }
.tl-track { position: relative; min-height: 56px; margin: 3px 8px 3px 0; border-radius: var(--r-ctl); cursor: copy; background-color: var(--bg);
  background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / var(--hours))); }
.tl-track[data-off="true"] { cursor: not-allowed; background-color: var(--soft-2); }
.tl-block { position: absolute; top: 5px; bottom: 5px; min-width: 8px; padding: 4px 10px; border: 0; border-radius: 10px; overflow: hidden; text-align: left; cursor: pointer;
  background: var(--navy); color: var(--on-navy); font-size: 13px; line-height: 17px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.tl-block b { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.tl-block[data-status="pending_payment"] { background: var(--amber); color: var(--amber-ink); }
.tl-block[data-status="arrived"] { background: var(--accent); color: var(--on-accent); }
.tl-block[data-status="closed"] { background: var(--line); color: var(--text); }
.tl-block[data-source="block"] { background: repeating-linear-gradient(135deg, var(--line) 0 8px, var(--soft) 8px 16px); color: var(--text); }
.tl-block[data-unseen="true"] { box-shadow: 0 0 0 3px var(--orange-ink); }
/* late or over time: a red stripe under a white line, so it reads on navy and olive too */
.tl-block[data-warn="true"] { box-shadow: inset 0 -4px 0 var(--danger), inset 0 -6px 0 var(--bg); }
.tl-block[data-unseen="true"][data-warn="true"] { box-shadow: 0 0 0 3px var(--orange-ink), inset 0 -4px 0 var(--danger), inset 0 -6px 0 var(--bg); }
/* the white edge keeps the now line visible where it crosses a booking */
.tl-now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--danger); box-shadow: 0 0 0 1px var(--bg); pointer-events: none; z-index: 2; }

.blist { display: flex; flex-direction: column; gap: 22px; }
.bgroup { display: flex; flex-direction: column; gap: 8px; }
.bgroup h2 { font-size: 16px; line-height: 22px; font-weight: 800; }
.brow { display: grid; grid-template-columns: 64px 1fr auto; gap: 4px 14px; align-items: center; width: 100%; padding: 14px 18px; border: 0; border-radius: var(--r-card); background: var(--soft); text-align: left; cursor: pointer; }
.brow:hover { background: var(--line); }
.brow-time { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.brow-main { min-width: 0; }
.brow-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.brow-main span { color: var(--muted); font-size: 13px; line-height: 18px; }
/* the place is what the admin needs when the guest is at the door */
.brow-main strong { color: var(--text); font-weight: 700; }
.brow[data-unseen="true"] { box-shadow: inset 0 0 0 2px var(--orange-ink); }

.events { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 19px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.photo-card { display: flex; flex-direction: column; gap: 6px; text-align: center; }
/* The caption of the main photo takes the same row as the button of the others, so "Delete" lines up. */
.photo-card > .small { min-height: 40px; display: grid; place-items: center; }
.photo-card .btn { padding-inline: 8px; white-space: nowrap; }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-ctl); background: var(--bg); }
.photo-card[data-cover="true"] img { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.center-card { max-width: 420px; margin: 10vh auto 0; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 22px; }
.center-card img { height: 44px; width: auto; align-self: flex-start; }

@media (min-width: 641px) and (max-width: 1100px) {
  /* A tablet: two rows instead of three. The night and the main button on top; counts, search and sound under them. */
  .counts { order: 2; }
  .search { order: 3; flex: 1 1 140px; min-width: 140px; width: auto; }
  .topbar > .btn[aria-pressed] { order: 4; }
}
@media (max-width: 640px) {
  /* A phone has no room for a pinned bar this tall: it scrolls away with the page, in five short rows
     (logo and menu, night, new booking and sound, counts in one line, search). */
  .topbar { position: static; gap: 8px; }
  .topbar .grow { display: none; }
  .brandmark { order: 1; }
  .brandmark img { height: 24px; }
  .topbar > .btn-ghost { order: 2; margin-left: auto; max-width: 60%; overflow: hidden; white-space: nowrap; }
  .nightnav { order: 3; width: 100%; }
  .nightnav strong { flex: 1; }
  .topbar > .btn-primary { order: 4; flex: 1; }
  .topbar > .btn[aria-pressed] { order: 5; }
  .counts { order: 6; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .counts .tag { flex: none; }
  .search { order: 7; width: 100%; }
  /* a status pill beside the name would squeeze it: it goes under the text */
  .brow { grid-template-columns: 56px 1fr; }
  .brow > .pill { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
