:root { --ink: #2b211b; --muted: #75675d; --bg: #f7f3ee; --card: #fff; --line: #e4dbd1; --brand: #8a3324; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
main { max-width: 1280px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; }
h2 { font-size: 1.1rem; margin: 28px 0 10px; }
a { color: var(--brand); }
small { display: block; color: var(--muted); font-weight: 400; }
.muted { color: var(--muted); }
.top { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; padding: 8px max(16px, calc((100% - 1248px) / 2)); background: var(--card); border-bottom: 3px solid var(--brand); }
.top .home { display: block; flex: none; padding: 2px 0; color: var(--brand); }
.top .home span { display: block; width: 46px; height: 51px; background: currentColor; -webkit-mask: url(/images/system/altai-logo-white.png) center / contain no-repeat; mask: url(/images/system/altai-logo-white.png) center / contain no-repeat; }
.top nav { display: flex; gap: 4px; margin-right: auto; }
.top nav a { padding: 9px 16px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.top nav a:hover { background: var(--bg); }
.top nav a.on { background: var(--bg); font-weight: 600; }
.top .btn.new { white-space: nowrap; }
.bell { position: relative; display: grid; flex: none; place-items: center; width: 40px; height: 40px; margin-left: -16px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); }
.bell:hover, .bell.on { background: var(--bg); }
.bell .badge-count { position: absolute; top: -7px; right: -7px; margin: 0; border: 2px solid var(--card); line-height: 18px; }
.bell .badge-count[hidden] { display: none; }
.settings { position: relative; margin-left: -20px; }
.settings summary { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; list-style: none; cursor: pointer; user-select: none; }
.settings summary::-webkit-details-marker { display: none; }
.settings summary::after { content: ""; width: 7px; height: 7px; margin-top: -4px; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; }
.settings[open] summary::after { margin-top: 4px; rotate: 225deg; }
.settings[open] summary, .settings.on summary { background: var(--bg); }
.settings .drop { position: absolute; z-index: 70; top: calc(100% + 8px); right: 0; width: 260px; max-width: calc(100vw - 24px); max-height: calc(100vh - 140px); overflow-y: auto; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 44px rgb(43 33 27 / 20%); }
.settings .drop p { margin: 10px 12px 2px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.settings .drop a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.settings .drop a:hover { background: var(--bg); }
.settings .drop a.on { background: var(--bg); font-weight: 600; }
.settings .drop form { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
.settings .drop button.link { width: 100%; padding: 10px 12px; text-align: left; }
/* Phones: logo and buttons on one line, the three main pages as big tabs under them */
@media (max-width: 700px) {
  .top { gap: 8px; padding: 6px 12px 0; }
  .top .home { margin-right: auto; }
  .top .home span { width: 40px; height: 45px; }
  .top nav { order: 3; width: 100%; margin: 0; border-top: 1px solid var(--line); }
  .top nav a { flex: 1; padding: 12px 4px; border-bottom: 3px solid transparent; border-radius: 0; text-align: center; font-size: 1rem; }
  .top nav a.on { border-bottom-color: var(--brand); background: none; }
  .bell, .settings { margin: 0; }
  .settings summary { padding: 8px 10px; }
}
@media (max-width: 420px) { .top .btn.new span { display: none; } }
@media (max-width: 360px) { .top { gap: 6px; padding-inline: 8px; } .top .btn.new { padding-inline: 10px; } .settings summary { gap: 6px; padding-inline: 8px; font-size: .92rem; } }
.btn { display: inline-block; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: 8px 16px; border-radius: 6px; font: inherit; cursor: pointer; text-decoration: none; }
.btn.light { background: #fff; color: var(--brand); }
.btn:disabled { opacity: .5; cursor: default; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }
input, select, textarea { font: inherit; padding: 8px; border: 1px solid #c9bdb1; border-radius: 6px; background: #fff; color: inherit; max-width: 100%; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
label input, label select, label textarea { color: var(--ink); width: 100%; font-size: 1rem; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
label.check input { width: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 10px; }
.narrow { max-width: 420px; margin: 8vh auto; display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.wide { grid-column: 1 / -1; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.grow { flex: 1; min-width: 200px; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.bar form { margin: 0; }
.msg { padding: 10px 14px; border-radius: 8px; border: 1px solid; }
.msg.ok { background: #e9f6ec; border-color: #9ccfa8; }
.msg.warn { background: #fff5dc; border-color: #e5c675; }
.msg.error { background: #fdeaea; border-color: #e3a1a1; }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; color: var(--muted); }
.stats b { display: block; font-size: 1.8rem; color: var(--ink); }
.scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
table { border-collapse: collapse; width: 100%; }
.list th, .list td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list .num { text-align: right; white-space: nowrap; }
.due { color: #b3261e; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .8rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.s-request { background: #fff0c2; color: #6b4e00; }
.s-confirmed { background: #cfe3ff; color: #0d3f86; }
.s-checked_in { background: #c5ecd0; color: #12602b; }
.s-checked_out { background: #e5e1dc; color: #544a42; }
.s-blocked { background: #5f5650; color: #fff; }
.s-cancelled, .s-no_show { background: #f6d5d5; color: #8a1c1c; }
.s-dirty { background: #ffdcb5; color: #7a3d00; }
.stats div.alert { background: #fff1e0; border-color: #e8a45c; }
.clean-board { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.clean-board article { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.clean-board article.is-dirty { background: #fff1e0; border: 2px solid #e08a35; }
.clean-board header { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 1.1rem; }
.clean-board p { margin: 6px 0 10px; font-size: .9rem; }
.clean-board form { margin: auto 0 0; }
.clean-board .btn { width: 100%; min-height: 44px; }
.cal { table-layout: fixed; min-width: 900px; }
.cal th, .cal td { border: 1px solid var(--line); padding: 2px; text-align: center; height: 46px; }
.cal thead th { font-size: .75rem; height: auto; width: 56px; }
.cal thead th:first-child { width: 150px; }
.cal th:first-child { position: sticky; left: 0; background: var(--card); text-align: left; padding: 4px 8px; z-index: 1; }
.cal tbody th small { font-size: .7rem; line-height: 1.2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal .today { background: #fff5dc; }
.cal .weekend { background: #f3ece4; }
.cal a { display: block; height: 100%; line-height: 38px; border-radius: 5px; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal a.stay { padding: 0 4px; font-size: .8rem; font-weight: 600; }
.cal a.stay b { font-weight: 600; }
.cal a.stay small { display: none; }
.cal a.free { color: transparent; }
.cal a.free:hover, .cal a.free:focus-visible { background: var(--bg); color: var(--brand); }
.legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .cal thead th:first-child { width: 96px; }
  .cal { min-width: 820px; }
}
/* One booking: summary on the side, the next step in the middle */
.booking-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.booking-head h1 { margin: 0; overflow-wrap: anywhere; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
.steps li { display: flex; flex: 1 1 150px; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.steps li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); font-size: .85rem; font-weight: 700; }
.steps li.done span { background: #c5ecd0; color: #12602b; }
.steps li.now { border: 2px solid var(--brand); color: var(--ink); font-weight: 600; }
.steps li.now span { background: var(--brand); color: #fff; }
.booking-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.booking-main { min-width: 0; }
.summary dl { margin: 0; }
.summary dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.summary .note { padding: 10px 12px; background: #fff5dc; border-radius: 8px; overflow-wrap: anywhere; }
.now { border: 2px solid var(--brand); }
.now h2, #payment h2 { margin-top: 0; font-size: 1.25rem; }
.btn.big { min-height: 52px; padding: 12px 32px; font-size: 1.1rem; font-weight: 600; }
.todo { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.todo > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.todo h3 { margin: 5px 0 6px; font-size: 1.05rem; }
.todo p { margin: 0 0 10px; }
.room-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.room-pick label { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px; background: #fff; border: 2px solid var(--line); border-radius: 10px; color: var(--ink); cursor: pointer; }
.room-pick input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.room-pick label:has(input:checked) { border-color: var(--brand); background: #fbf0ed; }
.room-pick label.busy { opacity: .65; cursor: default; background: var(--bg); }
.room-pick i { font-style: normal; margin-left: 4px; }
.pick-count { margin: 0 0 12px; font-weight: 700; color: #12602b; }
.pick-count.short { color: #a52a1d; }
.s-group { background: #ece3f7; color: #4b2a80; }
.group-card h2 { margin-top: 0; font-size: 1.1rem; }
.group-card ul { margin: 0; padding: 0; list-style: none; }
.group-card li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 64px; gap: 4px 16px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.group-card li.here { background: #fdf5f2; border-radius: 8px; }
.group-card small { display: block; color: var(--muted); }
.group-card .num { text-align: right; white-space: nowrap; }
.group-card .open { text-align: right; }
.group-card .tag { justify-self: start; }
@media (max-width: 520px) { .group-card li { grid-template-columns: minmax(0, 1fr) auto; } .group-card .open { text-align: right; } }
label.short { max-width: 280px; }
.aside-action { padding-top: 12px; border-top: 1px solid var(--line); text-align: right; }
.contact { margin: 8px 0 0; }
.pay-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.pay-head h2 { margin: 0; }
.pay-head .tag { padding: 4px 14px; font-size: .9rem; }
/* One colour per situation: red owes, amber check it, green settled, grey nothing to take */
.pay-debt { --pay: #b3261e; --pay-bg: #fdeaea; }
.pay-part { --pay: #8a5300; --pay-bg: #fff2d6; }
.pay-done { --pay: #12602b; --pay-bg: #e3f4e8; }
.pay-none { --pay: #544a42; --pay-bg: #eeeae5; }
.tag.pay-debt { background: var(--pay); color: #fff; }
.tag.pay-part, .tag.pay-done, .tag.pay-none { background: var(--pay-bg); color: var(--pay); }
.pay-state { margin-bottom: 14px; padding: 16px 18px; border-left: 6px solid var(--pay); border-radius: 10px; background: var(--pay-bg); color: var(--pay); }
.pay-state > span { display: block; font-weight: 600; }
.pay-state strong { display: block; font-size: 2.1rem; line-height: 1.25; }
.pay-state small { display: block; color: var(--ink); }
.pay-track { height: 8px; margin: 10px 0 6px; overflow: hidden; border-radius: 99px; background: #fff; }
.pay-track i { display: block; height: 100%; background: #1d8a45; }
.pay summary { display: block; width: fit-content; list-style: none; text-align: center; }
.pay summary::-webkit-details-marker { display: none; }
.pay[open] summary { display: none; }
.pay form { margin-top: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.pay form > label { margin-bottom: 4px; font-weight: 600; }
.pay-amount { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pay-amount input { flex: 1 1 160px; max-width: 260px; min-height: 52px; font-size: 1.4rem; font-weight: 600; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; }
.pay-methods legend { margin-bottom: 6px; padding: 0; color: var(--muted); font-size: .9rem; }
.pay-methods label { position: relative; flex-direction: row; cursor: pointer; }
.pay-methods input { position: absolute; opacity: 0; }
.pay-methods span { display: block; padding: 10px 16px; border: 1px solid #c9bdb1; border-radius: 8px; background: #fff; color: var(--ink); font-size: 1rem; }
.pay-methods input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.pay-methods input:focus-visible + span { outline: 3px solid #c58a3e; outline-offset: 2px; }
.pay .grid { margin-bottom: 14px; }
.pay form p { margin: 10px 0 0; }
details.edit { margin-bottom: 10px; }
details.edit summary { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-weight: 600; cursor: pointer; }
details.edit[open] summary { margin-bottom: 10px; }
.grid h3 { margin: 4px 0 -4px; font-size: 1rem; }
@media (max-width: 860px) { .booking-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .steps li { flex-basis: 130px; } .pay summary, .pay form > .btn { width: 100%; } .pay-amount input { max-width: none; } }
/* Cash desk */
.stats .drawer-total { border: 2px solid var(--brand); }
.plus { color: #12702f; }
.minus { color: #b3261e; }
.stats b.plus { color: #12702f; }
.stats b.minus { color: #b3261e; }
.cash-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.cash-action summary { padding: 12px 20px; background: var(--card); border: 1px solid var(--brand); border-radius: 8px; color: var(--brand); font-weight: 600; list-style: none; cursor: pointer; }
.cash-action summary::-webkit-details-marker { display: none; }
.cash-action.in summary { border-color: #12702f; color: #12702f; }
.cash-action.out summary { border-color: #b3261e; color: #b3261e; }
.cash-action[open] { flex-basis: 100%; order: 1; padding: 14px; background: var(--card); border: 2px solid var(--brand); border-radius: 10px; }
.cash-action[open] summary { margin: -4px 0 12px; border: 0; padding: 0; background: none; font-size: 1.15rem; }
label.inline { flex-direction: row; align-items: center; gap: 6px; }
label.inline input { width: auto; }
tr.voided td { color: var(--muted); text-decoration: line-through; }
tr.voided td small { text-decoration: none; }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats b { font-size: 1.25rem; white-space: nowrap; } .stats div { padding: 10px 12px; } }
/* Notifications and platform calendars */
.badge-count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 99px; background: #c62828; color: #fff; font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; }
.badge-count[hidden] { display: none; }
.reminders { padding-left: 34px; }
.reminders li { padding: 4px 0; }
.notice { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.notice p { margin: 4px 0; }
.notice.new { border-left: 5px solid var(--brand); }
.notice.conflict { background: #fdeaea; border-color: #e3a1a1; }
.browser-notify p { margin: 0 0 10px; }
input.copy { width: 100%; font: .85rem ui-monospace, Menlo, monospace; background: var(--bg); }
.sync-room h2 { margin-top: 0; }
.sync-room h3 { margin: 18px 0 4px; font-size: 1rem; }
.sync-room .row { margin-bottom: 8px; }
.sync-room label { margin-bottom: 8px; }
.connected { padding: 8px 12px; background: var(--bg); border-radius: 8px; align-items: center; }
/* Main page calendar and guest bonuses */
.head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.bonus-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 12px 14px; background: #fff5dc; border-radius: 10px; }
.bonus-line form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.bonus-line input { width: 110px; }
/* Room photos */
.room-type h3 { margin: 16px 0 8px; font-size: 1rem; }
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 6px; }
.gallery figure { position: relative; margin: 0; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--bg); }
.gallery .main { position: absolute; top: 8px; left: 8px; padding: 2px 10px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; }
.gallery figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding-top: 4px; }
.gallery figcaption form { margin: 0; }
.gallery button.link { padding: 4px 0; }
.gallery button.danger { color: #b3261e; }
.photo-add { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.photo-add label { position: relative; display: grid; place-items: center; flex: 1; aspect-ratio: 4 / 3; padding: 8px; border: 2px dashed #c9bdb1; border-radius: 8px; color: var(--brand); font-weight: 600; text-align: center; cursor: pointer; }
.photo-add label:hover, .photo-add label:focus-within { border-color: var(--brand); background: var(--bg); }
.photo-add label b { display: block; font-size: 2rem; line-height: 1; }
.photo-add input[type="file"] { width: 100%; font-size: .75rem; }
.photo-add.ready input[type="file"] { position: absolute; inset: 0; height: 100%; opacity: 0; cursor: pointer; }
.photo-add.ready .btn { display: none; }
@media (max-width: 520px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Everything about one room */
.edit-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 0; }
.room-edit fieldset { min-width: 0; margin: 0 0 10px; }
.room-edit legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; font-size: 1.15rem; font-weight: 700; }
.room-edit legend + * { clear: both; }
.room-edit textarea { resize: vertical; line-height: 1.45; }
.room-edit small { color: var(--muted); font-size: .8rem; }
.room-edit .checks { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.languages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.languages fieldset { display: flex; flex-direction: column; gap: 12px; }
.languages legend { margin-bottom: 0; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 -6px 20px rgb(43 33 27 / 10%); }
@media (max-width: 860px) { .languages { grid-template-columns: 1fr; } .save-bar .btn { width: 100%; } }
/* New booking and "change booking" */
.bform { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.bform-main { min-width: 0; }
.bform h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.15rem; }
.bform h2 b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; }
.when { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.when .dr { flex: 1 1 320px; max-width: 460px; }
.when .people { width: 190px; }
.counter { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 6px; }
.counter input { grid-column: 2; grid-row: 1; min-height: 54px; text-align: center; font-size: 1.3rem; font-weight: 600; appearance: textfield; }
.counter input::-webkit-inner-spin-button { appearance: none; }
.counter button { grid-row: 1; border: 1px solid #c9bdb1; border-radius: 6px; background: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.counter button:first-child { grid-column: 1; }
.counter button:last-child { grid-column: 3; }
.counter button:hover { background: var(--bg); }
.counter button[hidden] { display: none; }
.room-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.room-card { position: relative; flex-direction: row; cursor: pointer; }
.room-card input { position: absolute; opacity: 0; width: 1px; }
.room-card .body { display: flex; flex: 1; flex-direction: column; gap: 3px; padding: 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.room-card .body b { font-size: 1.05rem; }
.room-card small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.room-card .state { align-self: flex-start; margin-top: auto; padding: 2px 10px; border-radius: 99px; background: #e3f4e8; color: #12602b; font-size: .8rem; font-weight: 700; }
.room-card.busy .body { background: #f4f1ee; }
.room-card.busy .state { background: #fdeaea; color: #a52a1d; }
.room-card:hover .body { border-color: #c9bdb1; }
.room-card input:checked + .body { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #fdf5f2; }
.room-card input:checked + .body::after { content: "✓"; position: absolute; top: 10px; right: 12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.room-card input:focus-visible + .body { outline: 3px solid #c58a3e; outline-offset: 2px; }
.room-card.none .body { justify-content: center; border-style: dashed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; }
.chips legend { margin-bottom: 6px; padding: 0; color: var(--muted); font-size: .9rem; }
.chips label { position: relative; flex-direction: row; cursor: pointer; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: block; padding: 9px 16px; border: 1px solid #c9bdb1; border-radius: 99px; background: #fff; color: var(--ink); font-size: .95rem; }
.chips input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid #c58a3e; outline-offset: 2px; }
.bform .hint { margin: -4px 0 14px; font-size: .82rem; }
.bform .big-input { min-height: 50px; font-size: 1.2rem; }
.bform-total { position: sticky; top: 12px; margin: 0; border: 2px solid var(--brand); }
.bform-total dl { margin: 0; }
.bform-total dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.bform-total dt { color: var(--muted); }
.bform-total dd { margin: 0; text-align: right; font-weight: 600; }
.bform-total .sum { margin: 14px 0; font-size: 2rem; font-weight: 700; line-height: 1.2; }
.bform-total input { min-height: 44px; }
.bform-total .hint { margin: 6px 0 12px; }
.warnings { margin: 0 0 12px; padding: 0; list-style: none; }
.warnings li { margin-bottom: 6px; padding: 9px 12px; border-radius: 8px; background: #fff2d6; color: #6b4000; font-size: .9rem; }
.bform-total .btn { width: 100%; }
/* Inside a booking page the form sits in a narrow column */
.edit .bform { grid-template-columns: minmax(0, 1fr); }
.edit .bform-total { position: static; }
@media (max-width: 860px) { .bform { grid-template-columns: minmax(0, 1fr); } .bform-total { position: static; } }
@media (max-width: 520px) { .when .dr { flex-basis: 100%; max-width: none; } .when .people { width: 100%; } .room-cards { grid-template-columns: minmax(0, 1fr); } }
/* The first page: the calendar takes the whole screen, everything else follows below */
body.wide main { max-width: none; padding-top: 12px; }
.board { display: flex; flex-direction: column; height: calc(100vh - 100px); height: calc(100dvh - 100px); min-height: 440px; margin-bottom: 24px; }
.board:fullscreen { height: 100vh; margin: 0; padding: 12px 16px; background: var(--bg); }
.board-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.board-bar h1 { margin: 0 auto 0 0; font-size: 1.5rem; line-height: 1.2; }
.board-bar h1 small { display: inline; color: inherit; font-size: inherit; }
.board-bar .jump { display: flex; gap: 6px; margin: 0; }
.board-bar .icon { position: relative; display: grid; flex: none; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--brand); border-radius: 8px; background: var(--card); color: var(--brand); cursor: pointer; }
.board-bar .icon:hover, .board-bar .icon:focus-within { background: var(--brand); color: #fff; }
.board-bar .icon[hidden] { display: none; }
/* Without scripts the ordinary date field and its button stay visible. */
.board-bar .jump:not(.ready) .icon { display: flex; width: auto; gap: 6px; padding: 0 8px; }
.board-bar .jump.ready button { display: none; }
.board-bar .jump.ready input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.board-bar .i-shrink, .board:fullscreen .i-expand { display: none; }
.board:fullscreen .i-shrink { display: block; }
.board .scroll { flex: 1; min-height: 0; margin: 0; overflow: auto; }
.board .cal { width: 100%; height: 100%; min-width: 2300px; border-collapse: separate; border-spacing: 0; }
.board .cal th, .board .cal td { height: 64px; padding: 4px; border-width: 0 1px 1px 0; }
.board .cal thead th { position: sticky; top: 0; z-index: 2; height: 54px; background: var(--card); font-size: 1rem; }
.board .cal thead th small { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.board .cal thead th.weekend { background: #f3ece4; }
.board .cal thead th.today { background: var(--brand); color: #fff; }
.board .cal thead th.today small { color: #fff; }
.board .cal thead th:first-child { left: 0; z-index: 3; width: 190px; }
.board .cal tbody th { font-size: 1.05rem; padding: 6px 12px; border-right-width: 2px; }
.board .cal tbody th small { display: block; margin-top: 2px; font-size: .78rem; font-weight: 400; color: var(--muted); }
.board .cal tbody tr:last-child > * { border-bottom: 0; }
.board .cal td { height: 1px; } /* lets the bars fill however tall the row becomes */
.board .cal a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; line-height: 1.3; border-radius: 8px; }
.board .cal a.stay { padding: 4px 8px; font-size: 1rem; }
.board .cal a.stay b, .board .cal a.stay small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.board .cal a.stay small { display: block; font-size: .78rem; font-weight: 500; opacity: .85; }
.board .cal a.free { font-size: 1.6rem; }
.board .legend { flex: none; margin: 8px 0 0; }
@media (max-width: 700px) {
  body.wide main { padding: 8px; }
  .board { height: calc(100vh - 136px); height: calc(100dvh - 136px); }
  .board-bar { gap: 6px; margin-bottom: 8px; }
  .board-bar h1 { font-size: 1.05rem; }
  .board-bar h1 span { display: none; }
  .board-bar h1 small { display: block; color: var(--muted); font-size: .8rem; font-weight: 500; }
  .board-bar .icon { width: 40px; height: 40px; }
  .board .cal { min-width: 1770px; }
  .board .cal thead th { font-size: .9rem; }
  .board .cal th, .board .cal td { padding: 2px; }
  .board .cal thead th:first-child { width: 90px; }
  .board .cal a.stay { padding: 4px; font-size: .9rem; }
  .board .cal tbody th { padding: 4px 6px; font-size: .88rem; }
  .board .cal tbody th .tag { padding: 0 6px; font-size: .7rem; }
  .board .cal tbody th small { display: none; }
  .board .legend { display: none; }
}
@media print { .top, .bar, form { display: none; } body { background: #fff; } }
