/* Plain: neutral greys, one dark blue-green, the system font. */
:root {
  --bg: #f3f4f5;
  --surface: #ffffff;
  --panel: #f5f6f7;
  --raised: #ffffff;
  --line: #e2e5e8;
  --line-soft: #eef0f2;
  --ink: #1b2225;
  --muted: #5e676b;
  --faint: #979ea2;
  --primary: #1a2e33;
  --on-primary: #ffffff;
  --hover: #f1f3f4;
  --chosen: #e7ebec;
  --cell: #f2f4f5;
  --hatch: rgba(27, 34, 37, 0.05);
  --now: #d0443a;
  --green: #2f7a4f;
  --card-bg: #e9f0f0; --card-line: #c7d6d7; --card-fg: #1a2e33;
  --free-bg: #e7f3eb; --free-fg: #22633d;
  --busy-bg: #fbeaea; --busy-fg: #a3302a;
  --note-bg: #f2f4f5; --note-fg: #3a4347; --note-line: #e2e5e8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .05);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .08), 0 12px 28px rgba(0, 0, 0, .12);
  --focus: #4f7a80;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111416; --surface: #1a1e20; --panel: #15181a; --raised: #1e2325;
    --line: #2c3235; --line-soft: #23282a; --ink: #e8eaeb; --muted: #a3aaad; --faint: #6f777a;
    --primary: #2d5c62; --on-primary: #ffffff;
    --hover: #24292b; --chosen: #2b3235; --cell: #22272a; --hatch: rgba(255, 255, 255, 0.04); --now: #ef6a5f; --green: #6cc08f;
    --card-bg: #1f2f32; --card-line: #33494d; --card-fg: #d3e2e3;
    --free-bg: #1b3326; --free-fg: #9bd6b1; --busy-bg: #3b2222; --busy-fg: #f1aaa4;
    --note-bg: #22272a; --note-fg: #c9cfd1; --note-line: #2c3235;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 16px rgba(0, 0, 0, .3);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .5), 0 12px 28px rgba(0, 0, 0, .45);
    --focus: #7fa9ae;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111416; --surface: #1a1e20; --panel: #15181a; --raised: #1e2325;
  --line: #2c3235; --line-soft: #23282a; --ink: #e8eaeb; --muted: #a3aaad; --faint: #6f777a;
  --primary: #2d5c62; --on-primary: #ffffff;
  --hover: #24292b; --chosen: #2b3235; --cell: #22272a; --hatch: rgba(255, 255, 255, 0.04); --now: #ef6a5f; --green: #6cc08f;
  --card-bg: #1f2f32; --card-line: #33494d; --card-fg: #d3e2e3;
  --free-bg: #1b3326; --free-fg: #9bd6b1; --busy-bg: #3b2222; --busy-fg: #f1aaa4;
  --note-bg: #22272a; --note-fg: #c9cfd1; --note-line: #2c3235;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 16px rgba(0, 0, 0, .3);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .5), 0 12px 28px rgba(0, 0, 0, .45);
  --focus: #7fa9ae;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14.5px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.locked { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.tone-blue, .tone-green, .tone-peach, .tone-lilac, .tone-sand, .tone-rose { --t-bg: var(--card-bg); --t-line: var(--card-line); --t-fg: var(--card-fg); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  height: 40px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 14px;
  background: var(--surface);
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
  transition: background .12s, box-shadow .12s, opacity .12s, border-color .12s;
}
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.primary:hover { opacity: .92; }
.btn.primary:disabled { opacity: .35; cursor: default; }
.btn.outline { border-color: var(--line); background: var(--surface); }
.btn.outline:hover { background: var(--hover); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.wide { width: 100%; height: 46px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.plain { border: 0; background: transparent; }
.btn.icon.plain:hover { background: var(--hover); }
.btn.danger { background: var(--busy-fg); color: var(--surface); }
.btn.danger-ghost { background: transparent; color: var(--busy-fg); padding-left: 0; }
.btn.danger-ghost:hover { text-decoration: underline; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: contents; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: contents; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}
.i-moon { display: contents; }

.seg {
  display: inline-flex;
  background: var(--cell);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}
.seg button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  height: 34px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(26, 42, 46, .1); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill.free { background: var(--free-bg); color: var(--free-fg); }
.pill.busy { background: var(--busy-bg); color: var(--busy-fg); }
.pill.today { background: var(--primary); color: var(--on-primary); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; display: inline-block; }

/* ---------- page frame ---------- */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px;
}
.brand { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
.brand-name { font-weight: 700; font-size: 18px; }
.brand-addr { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13.5px; }
.brand-addr svg { width: 16px; height: 16px; }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who-name { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 6px; }

.board { flex: 1; min-height: 0; padding: 0 28px 28px; display: flex; }
.board-card {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.nav, .views { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.views { gap: 10px; }
.date-btn { font-size: 14.5px; min-width: 0; }
.date-btn svg { color: var(--muted); }

/* ---------- calendar grid ---------- */

.grid-scroll {
  flex: 1;
  overflow: auto;
  max-height: calc(100vh - 168px);
  min-height: 460px;
  overscroll-behavior: contain;
}
.grid { display: grid; user-select: none; -webkit-user-select: none; min-width: 100%; }

.corner, .colhead { position: sticky; top: 0; z-index: 4; background: var(--surface); }
.corner { left: 0; z-index: 6; }
.colhead {
  padding: 12px 10px 10px;
  border: 0;
  text-align: left;
  min-width: 0;
  box-shadow: 0 1px 0 var(--line), inset 1px 0 0 var(--line-soft);
  display: flex; flex-direction: column; gap: 2px;
  font: inherit;
}
.room-photo {
  display: block;
  width: 100%; height: 118px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--t-bg);
  margin-bottom: 8px;
}
.room-photo.empty {
  display: grid; place-items: center;
  color: var(--t-fg);
  font-size: 22px; font-weight: 600;
}
.colhead-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.colhead-meta { display: flex; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--muted); min-height: 22px; flex-wrap: wrap; }
.colhead-meta .cap { display: inline-flex; align-items: center; gap: 4px; }
.colhead-meta svg { width: 14px; height: 14px; }
.mail-copy {
  display: block; max-width: 100%;
  border: 0; background: transparent; padding: 0; text-align: left;
  font-size: 12px; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mail-copy:hover { color: var(--ink); }
.colhead.day { cursor: pointer; padding-top: 14px; }
.colhead.day:hover { background: var(--hover); }
.colhead.day.is-today { background: var(--panel); }
.colhead.day .colhead-name { font-size: 15px; }

.axis { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.axis span {
  position: absolute; right: 10px;
  transform: translateY(-50%);
  font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; font-weight: 600;
}
.axis .now-pill {
  right: 4px;
  background: var(--now); color: #fff;
  border-radius: 999px; padding: 1px 6px;
  font-size: 11px;
  z-index: 2;
}

.col {
  position: relative;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(var(--line-soft) 1px, transparent 1px);
  background-size: 100% 56px, 100% 28px;
  box-shadow: inset 1px 0 0 var(--line-soft);
  cursor: crosshair;
}
.past {
  position: absolute; left: 0; right: 0; top: 0;
  background: repeating-linear-gradient(135deg, var(--hatch) 0 6px, transparent 6px 12px);
  pointer-events: none;
}
.now-line { position: absolute; left: 0; right: 0; height: 2px; margin-top: -1px; background: var(--now); z-index: 2; pointer-events: none; }

.card {
  position: absolute; left: 5px; right: 5px;
  border: 1px solid var(--t-line); border-radius: 10px;
  background: var(--t-bg); color: var(--t-fg);
  padding: 6px 9px;
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left; overflow: hidden;
  font-size: 12px; line-height: 1.35;
  cursor: pointer;
  z-index: 1;
  transition: box-shadow .12s, transform .12s;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); z-index: 3; }
.card-title { font-weight: 600; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-time, .card-who { opacity: .85; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.card-who { display: none; }
.card.tall .card-who { display: block; }
.card.short { flex-direction: row; gap: 6px; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.card.short .card-time { order: -1; }

.sel {
  position: absolute; left: 5px; right: 5px;
  background: var(--t-bg); color: var(--t-fg);
  border: 1px solid var(--t-line);
  opacity: .9;
  border-radius: 10px;
  padding: 4px 9px;
  font-size: 12px; font-weight: 600;
  pointer-events: none; z-index: 2;
}
.no-rooms { padding: 56px 24px; text-align: center; color: var(--muted); }

/* ---------- dialogs ---------- */

.layer { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; }
.scrim { position: absolute; inset: 0; background: rgba(15, 26, 29, .45); }
.sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--raised);
  border-radius: 20px;
  box-shadow: var(--shadow-lift);
}
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 4px 24px; }
.sheet-head h2 { margin: 5px 0 0; font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
.sheet-body { padding: 8px 24px 8px; display: flex; flex-direction: column; gap: 16px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px 20px; }
.sheet-foot .foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; flex-wrap: wrap; }
.foot-btns { display: flex; gap: 8px; }
.confirm-q { font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field input, .chipbox {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  height: 42px;
  padding: 0 12px;
  font-size: 14.5px;
}
.field input:focus, .chipbox:focus-within { border-color: var(--focus); outline: none; }
.field input::placeholder { color: var(--faint); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row .grow { flex: 1 1 200px; }
.row .field:not(.grow) { flex: 1 1 110px; }

.notice { margin: 0; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; }
.notice.bad { background: var(--busy-bg); color: var(--busy-fg); }
.note {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0; border-radius: 12px; padding: 11px 13px;
  font-size: 13.5px; font-weight: 600; line-height: 1.4;
  border: 1px solid var(--note-line); background: var(--note-bg); color: var(--note-fg);
}
.note.free { border-color: transparent; background: var(--free-bg); color: var(--free-fg); }
.note.busy { border-color: transparent; background: var(--busy-bg); color: var(--busy-fg); }
.note svg { margin-top: 1px; }

.chipbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; height: auto; min-height: 42px; padding: 5px 8px; cursor: text; }
.chipbox input { flex: 1 1 140px; border: 0 !important; height: 30px; padding: 0 4px; width: auto; background: transparent; }
.chips { display: contents; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--cell);
  border-radius: 999px;
  padding: 3px 4px 3px 10px;
  font-size: 13px;
}
.chip button { border: 0; background: transparent; width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0; color: var(--muted); }
.chip button:hover { background: var(--hover); color: var(--ink); }
.chip svg { width: 12px; height: 12px; }

/* ---------- the booking window: room · month · times ---------- */

.sheet.book { width: min(1080px, 100%); background: var(--panel); padding: 14px; }
.sheet.book .sheet-head { padding: 6px 6px 12px 10px; }
.book-grid { display: grid; grid-template-columns: 300px minmax(300px, 1fr) 270px; gap: 12px; }
.pnl { background: var(--surface); border-radius: 16px; padding: 20px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.book-photo { width: 112px; height: 112px; border-radius: 14px; object-fit: cover; background: var(--t-bg); display: block; }
.book-photo.empty { display: grid; place-items: center; color: var(--t-fg); font-size: 26px; font-weight: 600; }
.book-title { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.25; }
.facts-line { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13.5px; }
.facts-line span { display: flex; align-items: center; gap: 8px; }
.facts-line svg { width: 17px; height: 17px; }
.sheet.book .sheet-foot { padding: 12px 6px 4px; justify-content: space-between; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cal-head strong { font-size: 16px; font-weight: 600; }
.cal-head strong span { color: var(--faint); font-weight: 500; margin-left: 6px; }
.cal-head .arrows { display: flex; gap: 2px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.cal-dn { font-size: 12.5px; color: var(--muted); padding: 6px 0 2px; font-weight: 600; }
.cal-day {
  position: relative;
  border: 0; background: var(--cell);
  height: 46px; border-radius: 10px;
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.cal-day.weekend { background: transparent; color: var(--muted); }
.cal-day:hover:not(:disabled) { background: var(--chosen); }
.cal-day.other { background: transparent; color: var(--faint); font-weight: 500; }
.cal-day.today::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--green); }
.cal-day[aria-selected="true"] { background: var(--primary); color: var(--on-primary); }
.cal-day[aria-selected="true"]::after { background: var(--on-primary); }
.cal-day:disabled { background: transparent; color: var(--faint); opacity: .55; cursor: default; }

.times-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.times-head strong { font-size: 16px; font-weight: 600; }
.times-head strong span { color: var(--faint); font-weight: 500; }
.select {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 9px; height: 34px; padding: 0 10px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.select:hover { background: var(--hover); }
.select svg { width: 14px; height: 14px; color: var(--muted); }
.slots { display: flex; flex-direction: column; gap: 8px; overflow: auto; max-height: 392px; margin: 0 -4px; padding: 2px 4px; }
.slot {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px solid transparent; background: var(--cell);
  border-radius: 10px; min-height: 44px; padding: 0 12px;
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.slot:hover:not(:disabled) { background: var(--chosen); }
.slot[aria-selected="true"] { border-color: var(--green); background: var(--free-bg); color: var(--free-fg); }
.slot:disabled { cursor: default; color: var(--faint); background: transparent; }
.slot:disabled .dot { background: var(--faint); opacity: .5; }
.slot small { font-size: 11.5px; font-weight: 600; }
.slots .none { color: var(--muted); font-size: 13.5px; text-align: center; padding: 16px 0; }

/* ---------- details ---------- */

.detail-photo { width: 100%; height: 150px; object-fit: cover; border-radius: 14px; display: block; }
.detail-room {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 8px;
  background: var(--t-bg); color: var(--t-fg); border: 1px solid var(--t-line);
  border-radius: 999px; padding: 3px 12px;
  font-weight: 600; font-size: 13.5px;
}
.detail-when { margin: -6px 0 0; font-size: 15.5px; font-weight: 600; }
.facts { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13.5px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts a { color: inherit; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

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

.room-list { display: flex; flex-direction: column; gap: 4px; margin: 0 -10px; }
.room-row {
  display: flex; align-items: center; gap: 12px;
  border: 0; background: transparent; text-align: left;
  border-radius: 12px; padding: 10px;
}
.room-row:hover { background: var(--hover); }
.room-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--t-bg); flex: none; display: grid; place-items: center; color: var(--t-fg); font-size: 17px; font-weight: 600; }
.room-row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.room-row-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-row-mail { font-size: 12.5px; color: var(--faint); }
.room-row-edit { font-size: 13px; font-weight: 600; color: var(--muted); }
.photo-edit { display: flex; gap: 14px; align-items: center; }
.photo-edit .room-photo { width: 168px; height: 112px; margin: 0; flex: none; }
.photo-edit .btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.suffix-input { display: flex; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; }
.suffix-input:focus-within { border-color: var(--focus); }
.suffix-input input { border: 0 !important; padding-right: 2px; min-width: 0; flex: 1; }
.suffix-input span { padding-right: 12px; color: var(--muted); white-space: nowrap; font-size: 14px; }

/* ---------- popovers ---------- */

.pop {
  position: fixed; z-index: 40;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  padding: 10px;
  max-height: 340px;
  overflow: auto;
}
.pop .cal { width: 320px; }
.pop .cal-day { height: 40px; }
.list { display: flex; flex-direction: column; min-width: 140px; }
.list button {
  border: 0; background: transparent;
  padding: 8px 12px; border-radius: 8px; text-align: left;
  font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums;
}
.list button:hover { background: var(--hover); }
.list button[aria-selected="true"] { background: var(--chosen); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translate(-50%, 20px);
  background: var(--primary); color: var(--on-primary);
  padding: 12px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--busy-fg); color: var(--surface); }

/* ---------- login ---------- */

.login-page { align-items: center; justify-content: center; padding: 24px 16px; }
.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 34px 30px;
}
.login-card .brand { flex-direction: column; gap: 4px; }
.login-card h1 { font-size: 22px; font-weight: 700; margin: 26px 0 6px; }
.login-card p { margin: 0 0 20px; }
.login-card .stack { display: flex; flex-direction: column; gap: 14px; }
.login-card .stack .btn { margin-top: 6px; }

/* ---------- smaller screens ---------- */

@media (max-width: 980px) {
  .book-grid { grid-template-columns: 1fr 1fr; }
  .book-grid .pnl.room { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .top { padding: 12px 16px; }
  .brand-name { font-size: 17px; white-space: nowrap; }
  .who { gap: 4px; }
  .who .btn { height: 34px; padding: 0 10px; font-size: 13px; }
  .who .btn.icon { width: 34px; padding: 0; }
  .brand-addr { display: none; }
  .who-name { display: none; }
  .board { padding: 0; }
  .board-card { border-radius: 0; box-shadow: none; }
  .bar { padding: 12px 16px; }
  .views { width: 100%; justify-content: space-between; }
  .grid-scroll { max-height: none; height: calc(100vh - 200px); }
  .room-photo { height: 72px; }
  .layer { place-items: end center; padding: 0; }
  .sheet { border-radius: 20px 20px 0 0; max-height: 94vh; }
  .sheet-head { padding: 18px 16px 4px 20px; }
  .sheet-body { padding: 8px 20px; }
  .sheet-foot { padding: 12px 20px 20px; }
  .sheet.book { padding: 10px; }
  .book-grid { grid-template-columns: 1fr; }
  .pnl { padding: 16px; }
  .pnl.room { display: grid; grid-template-columns: 64px 1fr; gap: 4px 14px; align-items: center; }
  .pnl.room > * { grid-column: 1 / -1; }
  .pnl.room > .book-photo { grid-column: 1; grid-row: 1 / span 2; width: 64px; height: 64px; font-size: 26px; }
  .pnl.room > .book-title { grid-column: 2; font-size: 18px; align-self: end; }
  .pnl.room > .facts-line { grid-column: 2; align-self: start; font-size: 12.5px; }
  .pnl.room > .seg, .pnl.room > .field, .pnl.room > .note { margin-top: 10px; }
  .sheet.book .sheet-foot { position: sticky; bottom: -10px; background: var(--panel); margin: 0 -10px -10px; padding: 12px 16px 16px; box-shadow: 0 -1px 0 var(--line); z-index: 2; }
  .sheet.book .sheet-foot .muted { display: none; }
  .slots { flex-direction: row; flex-wrap: wrap; max-height: 260px; }
  .slot { flex: 1 1 calc(50% - 8px); }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .photo-edit { flex-direction: column; align-items: stretch; }
  .photo-edit .room-photo { width: 100%; }
  .photo-edit .btns { flex-direction: row; }
}
