:root {
  --bg: #f6f5f0;
  --fg: #252e2a;
  --muted: #6f756f;
  --card: #fff;
  --line: #e5e7df;
  --accent: #2b5948;
  --accent-fg: #fff;
  --free: #e8f5ec;
  --free-fg: #1d6b3a;
  --mine: #dcebfa;
  --taken: #f1f2f5;
  --err: #b42318;
  --err-bg: #fdecea;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    16px/1.45 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--bg);
  color: var(--fg);
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right))
    env(safe-area-inset-bottom) max(16px, env(safe-area-inset-left));
}
main,
header.top,
footer.foot {
  max-width: 960px;
  margin: 0 auto;
}
main.narrow {
  max-width: 360px;
  padding-top: 15vh;
}
h1 {
  font-size: 1.5rem;
  margin: 1rem 0 0.25rem;
}
h2 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}
a {
  color: var(--accent);
}
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}
header.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1rem;
}
.whoami {
  margin: 0;
  color: var(--muted);
}

button {
  font: inherit;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
}
button.secondary {
  background: var(--taken);
  color: var(--fg);
  border: 1px solid var(--line);
}
button.link {
  background: none;
  color: var(--accent);
  padding: 0;
  text-decoration: underline;
  font-size: 0.85rem;
}
button:disabled {
  opacity: 0.6;
}
input,
select,
textarea {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--fg);
  width: 100%;
}
input[type="checkbox"] {
  width: auto;
}
input.num {
  width: 5rem;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: flex-end;
}
.row > label {
  flex: 1 1 180px;
}

.apt-picker,
.push-banner,
.mine {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}
.apt-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.apt-picker label {
  flex: 1 1 200px;
}
.push-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}
.push-banner[hidden] {
  display: none;
}
.push-banner.on button {
  background: var(--taken);
  color: var(--fg);
}
.mine h2 {
  margin-top: 0;
}
.mine ul {
  margin: 0;
  padding-left: 1.2rem;
}

.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
}
.board {
  table-layout: fixed;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.board th,
.board td {
  border-bottom: 1px solid var(--line);
  padding: 0.4rem;
  text-align: center;
  vertical-align: middle;
}
.board th {
  font-size: 0.85rem;
}
.board th small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}
.board .time {
  width: 3.8rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--muted);
}
.board tr:last-child td {
  border-bottom: 0;
}
.cell {
  height: 3.6rem;
}
.cell form {
  margin: 0;
}
.cell.free {
  color: var(--muted);
}
.slot-btn {
  width: 100%;
  min-height: 2.8rem;
  background: var(--free);
  color: var(--free-fg);
  font-weight: 600;
}
.cell.taken {
  background: var(--taken);
}
.cell.mine {
  background: var(--mine);
}
.cell .apt {
  display: block;
  font-weight: 600;
}
.cell .note,
.cell .waiting {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
tr.over td {
  opacity: 0.45;
}
tr.over .slot-btn {
  display: none;
}

dialog {
  border: 0;
  border-radius: 14px;
  padding: 1.25rem;
  width: min(92vw, 420px);
  background: var(--card);
  color: var(--fg);
}
dialog::backdrop {
  background: rgb(0 0 0 / 0.4);
}
dialog h3 {
  margin: 0;
}
dialog menu {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

footer.foot {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
}
footer.foot a {
  color: var(--muted);
}

/* Admin */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
}
.admin-nav a {
  text-decoration: none;
}
.admin-nav a.active {
  font-weight: 700;
  color: var(--fg);
}
.admin-nav form {
  margin-left: auto;
}
section {
  margin-bottom: 2rem;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}
.kpis > div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.kpis strong {
  display: block;
  font-size: 1.5rem;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}
.bar {
  flex: 1;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  min-height: 1px;
}
.heat {
  width: auto;
}
.heat th,
.heat td {
  padding: 0.35rem 0.6rem;
  text-align: center;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.heat td {
  background: color-mix(
    in srgb,
    var(--accent) calc(var(--a) * 85%),
    var(--card)
  );
  min-width: 2.6rem;
  border: 1px solid var(--line);
}
.list th,
.list td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.list form {
  margin: 0;
}

/* Resident experience: a calm, compact tool for a shared daily routine. */
:root {
  --ink: #252e2a;
  --green: #2b5948;
  --green-soft: #eef4ee;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
body {
  -webkit-font-smoothing: antialiased;
}
button,
.button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 140ms var(--ease-out),
    background-color 140ms ease;
}
button:active,
.button:active,
.date-item:active,
.icon-button:active {
  transform: scale(0.97);
}
button[aria-disabled="true"] {
  opacity: 0.65;
  cursor: wait;
}
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--green) 70%, transparent);
  outline-offset: 2px;
}
/* Headings and messages the page focuses for screen readers need no ring. */
[tabindex="-1"]:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
.resident-top,
.resident-main,
.resident-foot {
  max-width: 1120px;
}
header.resident-top {
  height: 104px;
  flex-wrap: nowrap;
  align-items: center;
  border-bottom: 1px solid #dedfd7;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.6px;
  color: var(--ink);
}
.brand-icon {
  width: 43px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e1e8db;
  color: var(--green);
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.1px;
  margin-top: 2px;
}
.apartment-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid #dedfd7;
  background: #fafbf7;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  min-height: 44px;
}
.apartment-menu {
  position: relative;
}
.apartment-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 6;
  width: 290px;
  max-width: calc(100vw - 32px);
  padding: 18px;
  background: #fff;
  border: 1px solid #e1e5da;
  border-radius: 10px;
  box-shadow: 0 8px 30px #263e2a20;
}
/* One section per concern; later sections get a divider. */
.apartment-popover > section {
  margin: 0;
}
.apartment-popover > section + section {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.apartment-popover strong {
  font-size: 14px;
}
.apartment-popover p {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.apartment-popover .apt-picker {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.apartment-popover .apt-picker select,
.apartment-popover .apt-picker input {
  width: 100%;
}
.apartment-chip strong {
  font-weight: 650;
}
/* Calendar subscription, the second section of the apartment popover. */
.calendar-feed {
  display: grid;
  gap: 10px;
}
.calendar-feed > p {
  margin: -6px 0 2px;
}
.calendar-feed form {
  margin: 0;
}
button.calendar-switch {
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  background: #fafbf7;
  color: var(--ink);
  border: 1px solid #dedfd7;
}
.calendar-switch small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.35;
}
.switch-track {
  position: relative;
  width: 36px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #d5d9cf;
  transition: background-color 160ms ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px #263e2a33;
  transition: transform 160ms var(--ease-out);
}
.calendar-switch[aria-checked="true"] .switch-track {
  background: var(--green);
}
.calendar-switch[aria-checked="true"] .switch-track::after {
  transform: translateX(14px);
}
a.calendar-subscribe {
  width: 100%;
  gap: 8px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
}
.calendar-link {
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
.calendar-link > span {
  display: flex;
  gap: 6px;
}
.calendar-link input {
  min-width: 0;
  min-height: 36px;
  padding: 0.4rem 0.55rem;
  font-size: 12px;
  color: var(--ink);
  background: #fafbf7;
  text-overflow: ellipsis;
}
/* Copying needs the Clipboard API; without JS the field stays selectable. */
button.copy-button {
  display: none;
  padding: 0 12px;
  background: var(--green-soft);
  color: var(--green);
}
.js button.copy-button {
  display: inline-flex;
}
.apartment-popover .calendar-note {
  margin: -4px 0 0;
  font-size: 11px;
}
.calendar-rotate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
}
.calendar-rotate button.link {
  min-height: 32px;
  font-size: 12px;
}
.header-caption {
  font-size: 13px;
  color: var(--muted);
}
.page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 43px 0 32px;
  gap: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.75px;
  font-weight: 650;
  color: #71786c;
  margin: 0 0 11px;
}
.page-intro h1 {
  font-size: clamp(28px, 3.5vw, 38px);
  letter-spacing: -1.45px;
  font-weight: 550;
  line-height: 1.15;
  margin: 0;
}
.intro-copy {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 0;
}
.opening {
  display: flex;
  gap: 9px;
  font-size: 12px;
  align-items: flex-start;
  padding-top: 18px;
}
.opening .status-dot {
  margin-top: 6px;
}
.opening small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.status-dot,
.legend-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #56816a;
}
.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
  gap: 28px;
}
.schedule {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 26px 0;
  box-shadow: 0 3px 6px #242e2303;
  min-width: 0;
  margin: 0;
}
.schedule-toolbar,
.aside-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.schedule-toolbar h2,
.aside-heading h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.35px;
  margin: 0;
}
.duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.machine-options {
  display: flex;
  gap: 4px;
  background: #f2f3ef;
  padding: 4px;
  border-radius: 9px;
  margin: 22px 0 25px;
  overflow-x: auto;
}
.machine-options a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex: 1 0 auto;
  min-height: 40px;
  padding: 8px 12px;
  text-decoration: none;
  color: #70766f;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 6px;
}
.machine-options a.selected {
  color: var(--green);
  background: #fff;
  border-color: #dfe3d9;
  box-shadow: 0 1px 3px #29372509;
}
.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
}
.month {
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}
.calendar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.today-link {
  font-size: 12px;
  text-decoration: none;
  color: var(--muted);
  padding: 12px 9px;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 36px;
  font-size: 23px;
  color: #586250;
  text-decoration: none;
  border: 1px solid #e3e6de;
  border-radius: 6px;
  line-height: 1;
}
.icon-button.disabled {
  opacity: 0.3;
  pointer-events: none;
}
.date-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}
.date-item {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 0 10px;
  min-height: 100px;
  border: 1px solid #e7e9e3;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
  transition:
    background-color 140ms ease,
    transform 140ms var(--ease-out);
}
.date-item > span {
  color: var(--muted);
  font-size: 11px;
}
.date-item strong {
  font-size: 23px;
  font-weight: 550;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.date-item small {
  font-size: 10px;
  color: #718268;
}
.date-item.selected {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.date-item.selected > span {
  color: #fff;
}
.date-item.selected small {
  color: #d6e3d7;
}
.day-heading {
  margin: 26px 0 5px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.day-heading h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}
.day-heading h3::first-letter {
  text-transform: uppercase;
}
.day-heading > span {
  color: var(--muted);
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.time-slot {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr auto;
  align-items: center;
  gap: 15px;
  min-height: 83px;
  border-bottom: 1px solid #eceee7;
  padding: 14px 0;
}
.time-slot:last-child {
  border-bottom: 0;
}
.slot-time {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.slot-time > strong {
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.35px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.time-dash {
  color: #858b80;
  padding: 0 5px;
}
.slot-time > span {
  font-size: 11px;
  color: #7f857d;
}
.slot-status {
  min-width: 0;
}
.slot-status strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 550;
  color: var(--green);
}
.slot-status small {
  display: block;
  font-size: 10px;
  color: #7e857b;
  margin-top: 4px;
  line-height: 1.4;
}
.slot-action {
  min-width: 115px;
  text-align: right;
}
.reserve-button {
  background: #edf3ea;
  border: 1px solid #dce7d5;
  color: #345940;
  min-height: 40px;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 12px;
}
.time-slot.occupied .slot-status strong {
  color: #71776e;
}
.time-slot.elapsed .slot-time,
.time-slot.elapsed .slot-status {
  opacity: 0.45;
}
.time-slot.elapsed .slot-status strong {
  color: var(--muted);
}
.time-slot.reserved {
  background: #f1f6ef;
  margin: 0 -13px;
  padding-left: 13px;
  padding-right: 13px;
  border-radius: 8px;
  border-color: transparent;
}
.manage-link {
  font-size: 12px;
  text-decoration: none;
}
.slot-details {
  position: relative;
  font-size: 12px;
}
summary {
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
.slot-details > summary {
  min-height: 44px;
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  color: #697365;
}
.slot-popover {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 5;
  width: 270px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e1e5da;
  border-radius: 10px;
  box-shadow: 0 8px 30px #263e2a20;
  text-align: left;
}
.slot-popover > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
.slot-popover small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.slot-popover a,
.slot-popover .link {
  font-size: 12px;
  min-height: 32px;
}
.slot-message summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  color: var(--accent);
  font-weight: 600;
}
.slot-message details[open] summary span {
  transform: rotate(180deg);
}
.message-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}
.message-form fieldset {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}
.message-form legend {
  padding: 0 0 4px;
  font-size: 11px;
  font-weight: 500;
}
label.message-choice {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 450;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background-color 150ms ease;
}
label.message-choice:has(:checked) {
  border-color: var(--accent);
  background: #f2f6f3;
}
.message-choice input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}
.message-form > label {
  font-size: 11px;
}
.message-form input[name="note"] {
  font-size: 12px;
  min-height: 36px;
}
@media (pointer: coarse) {
  /* Below 16px, iOS zooms the page when the field gets focus. */
  .message-form input[name="note"] {
    font-size: 16px;
  }
}
.schedule-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 3px -26px 0;
  padding: 15px 26px;
  border-top: 1px solid var(--line);
  color: #7a8275;
  background: #fafbf8;
  font-size: 11px;
  border-radius: 0 0 16px 16px;
}
.schedule-note svg {
  color: #698164;
}
.next-day {
  font-size: 12px;
  line-height: 1.7;
  margin: 17px 0;
}
.sidebar {
  min-width: 0;
}
.my-bookings {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 22px;
  margin-bottom: 20px;
}
.count {
  background: #f1f3ed;
  color: #77816d;
  font-size: 11px;
  border-radius: 5px;
  min-width: 23px;
  text-align: center;
  padding: 3px 5px;
}
.empty-bookings {
  text-align: center;
  padding: 32px 0 17px;
}
.empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: #f4f5ef;
  border-radius: 50%;
  color: #9aa68d;
  margin: auto auto 15px;
}
.empty-bookings h3 {
  font-size: 14px;
  font-weight: 550;
  margin: 0 0 7px;
}
.empty-bookings p {
  color: #858a80;
  font-size: 12px;
  line-height: 1.75;
  margin: 0;
}
.reservation-card {
  border-top: 1px solid var(--line);
  padding: 20px 0 0;
  margin-top: 20px;
  scroll-margin-top: 24px;
}
.reservation-card:target {
  outline: 2px solid #b9caae;
  outline-offset: 10px;
  border-radius: 5px;
}
.reservation-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6b8061;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1px;
}
.reservation-card h3 {
  margin: 12px 0 2px;
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.4px;
}
.reservation-time {
  font-size: 26px;
  letter-spacing: -1px;
  font-weight: 500;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.reservation-machines {
  color: var(--muted);
  font-size: 11px;
  margin: 9px 0 16px;
}
.reservation-note {
  color: #7b806f;
  font-size: 12px;
  font-style: italic;
  overflow-wrap: anywhere;
}
.reservation-waiting {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #fbf3df;
  color: #6b5419;
  font-size: 12px;
  line-height: 1.4;
}
.reservation-waiting strong {
  font-weight: 600;
}
.waiting-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c58a16;
  transform: translateY(-1px);
}
.note-hint {
  color: #6b5419;
  font-size: 11px;
}
.reservation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  font-size: 11px;
}
.reservation-actions summary {
  padding: 10px 0;
  color: #687961;
  min-height: 36px;
}
.reservation-actions > details[open] {
  width: 100%;
}
button.cancel-link {
  font-size: 11px;
  font-weight: 450;
  text-decoration: none;
  color: #82887c;
  min-height: 36px;
}
.note-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 5px 0 10px;
}
.note-form label {
  font-size: 11px;
}
.note-form input,
.note-form select {
  font-size: 12px;
  min-height: 40px;
}
button.small-button {
  min-height: 36px;
  font-size: 12px;
}
.booking-limit {
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-bottom: 0;
}
.good-neighbor {
  background: #eeeede;
  border: 1px solid #e5e5d3;
  border-radius: 13px;
  padding: 22px;
}
.neighbor-symbol {
  display: block;
  color: #899170;
  font-size: 33px;
  line-height: 1;
  margin-bottom: 20px;
}
.good-neighbor h3 {
  font-size: 15px;
  font-weight: 550;
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}
.good-neighbor p {
  font-size: 12px;
  line-height: 1.8;
  color: #7d826e;
  margin: 0 0 20px;
}
.room-hours {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #777d68;
  font-size: 11px;
  border-top: 1px solid #dddfca;
  padding-top: 15px;
}
.waitlist-section {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 13px;
  margin-bottom: 20px;
}
.waitlist-section h2 {
  margin: 0 0 12px;
  font-size: 15px;
}
.wait-entry {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.wait-entry strong,
.wait-entry small {
  display: block;
  font-size: 12px;
}
.wait-entry small {
  color: var(--muted);
  margin-top: 4px;
}
.wait-entry .link {
  font-size: 11px;
}
.waitlist-section .muted {
  font-size: 11px;
}
.push-banner {
  padding: 12px;
  background: #f4f6ef;
  font-size: 12px;
}
.push-banner button {
  font-size: 12px;
  width: 100%;
}
.welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #eaf0e3;
  border: 1px solid #dfe7d6;
  border-radius: 13px;
  padding: 22px 25px;
  margin-bottom: 24px;
}
.welcome > div > svg {
  float: left;
  margin: 1px 10px 0 0;
  color: #6c8060;
}
.welcome h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 550;
}
.welcome p {
  margin: 7px 0 0;
  font-size: 12px;
  color: #728068;
}
.welcome .apt-picker {
  padding: 0;
  background: none;
  border: 0;
  margin: 0;
  flex-wrap: nowrap;
  min-width: 300px;
}
.apt-picker label {
  font-size: 11px;
  gap: 5px;
}
.apt-picker input,
.apt-picker select {
  min-height: 44px;
  font-size: 14px;
}
.apt-picker button {
  white-space: nowrap;
}
footer.resident-foot {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #dedfd7;
  padding: 23px 0 30px;
  margin-top: 34px;
  color: #969b8f;
  font-size: 11px;
}
.resident-foot a {
  text-decoration: none;
}
.foot-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.empty-state {
  text-align: center;
  padding: 36px 12px;
  color: var(--muted);
  font-size: 13px;
}
@media (hover: hover) and (pointer: fine) {
  .reserve-button:hover {
    background: var(--green);
    border-color: var(--green);
    color: white;
  }
  .date-item:not(.selected):hover {
    background: #f1f5ed;
    border-color: #c9d4be;
  }
  .machine-options a:not(.selected):hover {
    background: #e9ece4;
    color: var(--green);
  }
  .icon-button:not(.disabled):hover,
  .apartment-chip:hover {
    background: #eaf0e3;
  }
  .manage-link:hover,
  .cancel-link:hover,
  .reservation-actions summary:hover {
    text-decoration: underline;
  }
}
@media (max-width: 950px) {
  .booking-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 18px;
  }
  .schedule {
    padding: 20px 18px 0;
  }
  .schedule-note {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }
  .time-slot {
    gap: 10px;
    grid-template-columns: 1fr 1fr auto;
  }
  .slot-time > strong {
    font-size: 14px;
  }
  .slot-action {
    min-width: 95px;
  }
  .reserve-button {
    padding: 8px 10px;
  }
  .reserve-button svg {
    display: none;
  }
  .date-strip {
    gap: 4px;
  }
  .date-item span {
    font-size: 10px;
  }
  .date-item small {
    font-size: 9px;
  }
  .welcome {
    align-items: flex-start;
  }
}
@media (max-width: 740px) {
  body {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  header.resident-top {
    height: 85px;
    gap: 10px;
  }
  .brand {
    font-size: 16px;
    gap: 8px;
  }
  .brand-icon {
    width: 36px;
    height: 40px;
    border-radius: 10px;
  }
  .brand small {
    font-size: 10px;
    max-width: 155px;
  }
  .apartment-chip {
    gap: 7px;
    font-size: 11px;
    padding: 8px 10px;
  }
  .header-caption,
  .opening {
    display: none;
  }
  .page-intro {
    padding: 30px 0 25px;
  }
  .page-intro h1 {
    font-size: 31px;
    letter-spacing: -1px;
  }
  .intro-copy {
    font-size: 13px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .booking-layout {
    display: flex;
    flex-direction: column;
    gap: 23px;
  }
  .schedule,
  .sidebar {
    width: 100%;
  }
  .schedule {
    padding: 20px 15px 0;
    border-radius: 12px;
  }
  .schedule-toolbar h2 {
    font-size: 15px;
  }
  .duration {
    font-size: 10px;
  }
  .machine-options {
    margin: 18px 0;
  }
  .machine-options a {
    padding: 8px;
    font-size: 12px;
  }
  .date-item {
    min-height: 87px;
    border-radius: 7px;
    gap: 6px;
  }
  .date-item strong {
    font-size: 21px;
  }
  .date-item > span {
    font-size: 10px;
  }
  .date-item small {
    font-size: 8px;
  }
  .day-heading {
    margin-top: 22px;
  }
  .day-heading h3 {
    font-size: 11px;
  }
  .time-slot {
    min-height: 83px;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
  }
  .slot-time > strong {
    font-size: 14px;
  }
  .time-dash {
    padding: 0 2px;
  }
  .slot-time > span {
    font-size: 10px;
  }
  .slot-status strong {
    font-size: 11px;
    gap: 5px;
  }
  .slot-status small {
    font-size: 9px;
  }
  .slot-action {
    min-width: 82px;
  }
  .reserve-button {
    font-size: 11px;
    padding: 8px 11px;
    min-height: 44px;
  }
  .manage-link,
  .slot-details {
    font-size: 10px;
  }
  .slot-details > summary {
    gap: 4px;
  }
  .schedule-note {
    margin-left: -15px;
    margin-right: -15px;
    padding: 13px 15px;
    font-size: 10px;
  }
  .my-bookings {
    padding: 20px;
  }
  .reservation-card {
    padding-top: 16px;
    margin-top: 16px;
  }
  .empty-bookings {
    padding: 22px 0 8px;
  }
  .good-neighbor {
    padding: 20px;
  }
  .neighbor-symbol {
    float: left;
    margin: 3px 17px 8px 0;
  }
  .good-neighbor p {
    margin-bottom: 14px;
  }
  .welcome {
    flex-direction: column;
    gap: 16px;
    padding: 19px;
  }
  .welcome .apt-picker {
    width: 100%;
    min-width: 0;
  }
  .welcome p {
    line-height: 1.7;
  }
  .resident-foot {
    gap: 15px;
    font-size: 10px;
  }
  footer.resident-foot {
    margin-top: 6px;
  }
  .slot-popover {
    width: min(270px, 75vw);
  }
  .slot-action .button {
    font-size: 10px;
    padding: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
  button:active,
  .button:active,
  .date-item:active {
    transform: none;
  }
}
/* Keep the entire day scannable, and confirmation close to the action. */
header.top.resident-top,
footer.foot.resident-foot {
  max-width: 1120px;
}
header.resident-top {
  height: 88px;
}
.page-intro {
  padding: 32px 0 26px;
}
.schedule {
  padding-top: 22px;
}
.machine-options {
  margin-top: 18px;
  margin-bottom: 17px;
}
.date-item {
  min-height: 86px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.date-item > span {
  white-space: nowrap;
}
.day-heading {
  margin-top: 22px;
}
.time-slot {
  min-height: 70px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.mobile-mine-link {
  display: none;
}
@media (max-width: 740px) {
  header.resident-top {
    height: 80px;
  }
  .page-intro {
    padding: 26px 0 23px;
  }
  .date-item > span {
    font-size: 9px;
    letter-spacing: -0.15px;
  }
  .date-item {
    min-height: 83px;
  }
  .time-slot {
    min-height: 76px;
  }
  .mobile-mine-link {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    text-decoration: none;
    padding: 12px 15px;
    background: #e9eee1;
    border: 1px solid #dce4d2;
    border-radius: 8px;
    margin-bottom: 16px;
  }
  .mobile-mine-link > span {
    flex: 1;
  }
}
.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;
}
.resident-main.updating .slots {
  opacity: 0.55;
  pointer-events: none;
}
.slot-status small,
.slot-time > span,
.empty-bookings p,
.good-neighbor p,
.room-hours,
.schedule-note {
  color: #68735f;
}
.slot-status strong {
  font-size: 13px;
}
.slot-status small {
  font-size: 11px;
}
@media (max-width: 740px) {
  .slot-status strong {
    font-size: 11px;
  }
  .slot-status small {
    font-size: 10px;
  }
}
/* Secondary text stays readable on the warm surfaces, including elapsed slots. */
:root {
  --muted: #626d60;
}
.eyebrow,
.welcome p,
.machine-options a,
.good-neighbor p,
.room-hours,
footer.resident-foot,
.date-item small,
.reservation-actions summary,
button.cancel-link,
.reservation-kicker,
.reservation-note,
.count {
  color: #606d58;
}
.time-slot.elapsed .slot-time,
.time-slot.elapsed .slot-status {
  opacity: 1;
}
.time-slot.elapsed .slot-time > strong,
.time-slot.elapsed .slot-status strong {
  color: #636d5d;
}
.time-slot.elapsed {
  background: #fafbf8;
}
/* Past days: read-only record of who used which machine. */
.date-item.past:not(.selected) {
  background: #fafbf8;
}
.date-item.past:not(.selected) strong {
  color: #636d5d;
}
.date-item.unavailable {
  opacity: 0.35;
  border-style: dashed;
}
.time-slot.past-slot {
  grid-template-columns: 1fr 2.3fr;
}
.slot-usage {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.slot-usage li {
  display: grid;
  grid-template-columns: minmax(0, 10em) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}
.usage-machine {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.usage-who strong {
  display: block;
  font-weight: 550;
  color: var(--ink);
}
.usage-who small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.slot-usage.idle,
.usage-who.idle {
  color: #7b8476;
}
@media (max-width: 740px) {
  .time-slot.past-slot {
    grid-template-columns: 0.8fr 2.2fr;
  }
  .slot-usage {
    font-size: 11px;
  }
  .slot-usage li {
    grid-template-columns: 1fr;
    gap: 1px;
  }
}
.time-dash {
  color: #737b6c;
}
@media (max-width: 740px) {
  .date-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }
  .date-item {
    flex: 1 0 46px;
  }
  .date-item > span,
  .date-item small {
    font-size: 10px;
  }
}
/* Board rows: equal side padding everywhere; tinted rows are separate rounded rows. */
.slots {
  display: flex;
  flex-direction: column;
  margin: 0 -10px;
}
.schedule > .slots:last-child {
  padding-bottom: 14px;
}
.time-slot,
.time-slot.reserved {
  margin: 0;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 0;
}
.time-slot:is(.elapsed, .reserved, .partial),
.time-slot:has(+ :is(.elapsed, .reserved, .partial)) {
  border-bottom-color: transparent;
}
.time-slot:is(.elapsed, .reserved, .partial) {
  margin: 2px 0;
  border-radius: 10px;
}
.time-slot.elapsed {
  background: #f8f9f5;
}
.time-slot.partial {
  background: #faf6ec;
}
.time-slot.partial .slot-status strong {
  color: #7d5a1c;
}
.status-dot.half {
  background: linear-gradient(90deg, #b07a26 50%, transparent 50%);
  box-shadow: inset 0 0 0 1px #b07a26;
}
.slot-status .machine-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.machine-status > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.machine-status > .free {
  color: var(--green);
  font-weight: 600;
}
.machine-icons {
  display: inline-flex;
  gap: 1px;
}
.time-slot.partial .slot-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.time-slot.partial .slot-details:not(.slot-confirm) > summary {
  min-height: 32px;
}
summary.reserve-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #345940;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 140ms var(--ease-out);
}
summary.reserve-button:active {
  transform: scale(0.97);
}
.slot-confirm .slot-popover p {
  margin: 0;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.45;
  color: var(--ink);
}
.slot-confirm .slot-popover p small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
}
.slot-popover > .confirm-actions {
  flex-direction: row;
  gap: 8px;
  border-top: 0;
  padding-top: 0;
  margin-top: 14px;
}
.confirm-actions > * {
  flex: 1;
  margin: 0;
}
.confirm-actions button,
.confirm-actions .button {
  width: 100%;
  min-height: 40px;
  font-size: 13px;
  border-radius: 8px;
}
.confirm-actions .button.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid #dfe3d9;
}
/* Day strip: "Delvis" when only one machine is free; a truly full day stands out. */
.date-item.partial small {
  color: #7d5a1c;
  font-weight: 600;
}
.date-item.full:not(.selected) {
  background: #fbf1ec;
  border-color: #eed6ca;
}
.date-item.full small {
  padding: 1px 6px;
  border-radius: 99px;
  background: #a4532f;
  color: #fff;
  font-weight: 650;
}
.date-item.selected.partial small {
  color: #f3e2bd;
}
@media (max-width: 740px) {
  .slots {
    margin: 0 -8px;
  }
  .time-slot,
  .time-slot.reserved {
    padding-left: 8px;
    padding-right: 8px;
  }
  .date-item.full small {
    padding: 0 5px;
  }
}

/* Toasts: bottom-center on phones, bottom-right on desktop. Server-rendered and faded out by CSS alone;
   client/app.ts adds stacking, dismissal and in-place updates. Success toasts leave on their own,
   errors stay until closed. */
.toaster {
  position: fixed;
  z-index: 20;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  width: 100%;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 8px 12px 14px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid #e1e5da;
  border-radius: 12px;
  box-shadow:
    0 10px 30px #263e2a1f,
    0 1px 3px #263e2a14;
  font-size: 13px;
  line-height: 1.4;
  animation: toast-in 400ms var(--ease-out) both;
}
.toast.auto {
  animation:
    toast-in 400ms var(--ease-out) both,
    toast-out 300ms ease 4s forwards;
}
.toast.long {
  animation:
    toast-in 400ms var(--ease-out) both,
    toast-out 300ms ease 8s forwards;
}
/* Reading, hovering or tabbing to a toast keeps it on screen. */
.toast:hover,
.toast:focus-within,
.toaster.paused .toast {
  animation-play-state: paused;
}
.toaster .toast.leaving {
  animation: toast-leave 200ms ease forwards;
}
.toast-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: -1px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}
.toast.error .toast-icon {
  background: var(--err-bg);
  color: var(--err);
}
.toast-text {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}
.toast-text p {
  margin: 0;
}
.toast-title {
  font-weight: 600;
}
.toast-detail {
  margin-top: 2px !important;
  color: var(--muted);
  font-size: 12px;
}
.toast-action {
  margin: -4px 0;
}
.toast .toast-button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.toast-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -4px 0;
  border-radius: 8px;
  color: var(--muted);
  padding: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
}
.toast-close:hover {
  background: #f1f2ec;
  color: var(--ink);
}
@media (min-width: 741px) {
  .toaster {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 380px;
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    visibility: hidden;
  }
}
@keyframes toast-leave {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    visibility: hidden;
  }
}

/* Admin login: "Glemt adminpassordet?" */
.login-footer {
  margin: 0;
  text-align: center;
  font-size: 14px;
}

/* Demo buildings from the landing page: a slim note above the header. */
.demo-banner {
  max-width: 1120px;
  margin: 12px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 10px 14px;
  border: 1px solid #dce4d2;
  border-radius: 8px;
  background: var(--green-soft);
  font-size: 13px;
  color: #345940;
}
.demo-banner a {
  font-weight: 600;
  text-decoration: none;
}
/* The showcase's apartment is fixed, so its chip is only a label. */
span.apartment-chip:hover {
  background: #fafbf7;
}
