/* Salas · StartSe — ferramenta interna, registro produto, tema claro.
   Cena: colaborador no escritório, luz ambiente, precisa achar sala em segundos. */

:root {
  /* Neutros frios, alinhados à hue da marca (253.5) */
  --bg: oklch(0.985 0.003 253.5);
  --surface: oklch(0.995 0.002 253.5);
  --surface-2: oklch(0.965 0.005 253.5);
  --border: oklch(0.905 0.008 253.5);
  --border-strong: oklch(0.83 0.012 253.5);
  --text: oklch(0.26 0.014 253.5);
  --text-2: oklch(0.48 0.016 253.5);
  --text-3: oklch(0.56 0.014 253.5);

  /* Azul StartSe — --brand é #0080ED exato.
     --brand-strong (4.9:1) e --brand-deep (7.2:1) existem porque o #0080ED puro
     faz só 3.96:1 com branco: usa-se a marca em traço/preenchimento e as
     variantes onde há texto por cima. */
  --brand: oklch(0.602 0.189 253.5);
  --brand-strong: oklch(0.55 0.185 253.5);
  --brand-deep: oklch(0.46 0.155 253.5);
  --brand-tint: oklch(0.955 0.025 253.5);
  --brand-tint-2: oklch(0.90 0.055 253.5);
  --on-brand: oklch(0.985 0.004 253.5);

  --busy: oklch(0.945 0.008 253.5);
  --busy-border: oklch(0.865 0.012 253.5);
  --busy-text: oklch(0.44 0.016 253.5);

  --danger: oklch(0.55 0.19 25);
  --now: oklch(0.60 0.20 25);
  --free: oklch(0.62 0.16 155);

  --scroll-thumb: oklch(0.83 0.012 253.5);
  --scroll-thumb-hover: oklch(0.70 0.03 253.5);

  --shadow-panel: -12px 0 32px oklch(0.26 0.03 253.5 / 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --row-h: 30px;      /* 30 min */
  --col-w: 132px;
  --time-w: 56px;
  --head-h: 56px;
  --now-top: -100px;  /* atualizado pelo JS a cada minuto */

  font-size: 15px;
  accent-color: var(--brand);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.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;
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--brand-deep);
  color: var(--on-brand);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Escolha de sala ---------- */

.room-picker {
  min-height: 100%;
  overflow: auto;
  background: var(--bg);
}

.picker-shell {
  width: min(1040px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(32px, 7vw, 76px) clamp(20px, 5vw, 56px) 28px;
  display: flex;
  flex-direction: column;
}

.picker-intro { max-width: 680px; }

.picker-brand, .app-name {
  margin: 0;
  font-weight: 750;
  letter-spacing: -0.015em;
}
.picker-brand { font-size: 1.05rem; }
.picker-brand span, .app-name span { color: var(--brand); font-weight: 650; }

.picker-kicker {
  margin: clamp(36px, 8vh, 72px) 0 10px;
  color: var(--brand-deep);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.picker-intro h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.picker-copy {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.55;
}

.picker-controls {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  align-items: end;
  gap: 8px 20px;
  margin-top: clamp(34px, 7vh, 64px);
}

.room-search-label {
  grid-column: 1;
  color: var(--text-2);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.room-search-wrap { position: relative; grid-column: 1; }
.room-search-wrap span {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--text-3);
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}
.room-search-wrap span::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 1.5px;
  right: -5px;
  bottom: -2px;
  border-radius: 2px;
  background: var(--text-3);
  transform: rotate(45deg);
}
.room-search-wrap input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 0 14px 0 38px;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.room-search-wrap input:hover { border-color: var(--brand); }
.room-search-wrap input:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px oklch(0.602 0.189 253.5 / 0.18);
}
.room-count {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  margin: 0;
  color: var(--text-3);
  font-size: 0.8rem;
}

.room-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  list-style: none;
}
.room-list li:nth-child(odd) { border-right: 1px solid var(--border); }
.room-list li { border-bottom: 1px solid var(--border); }
.room-list li:nth-last-child(-n+2) { border-bottom: 0; }

.room-option {
  appearance: none;
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.room-option:hover { background: var(--brand-tint); }
.room-option:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--brand-tint); }
.room-option-index {
  color: var(--brand-deep);
  font-size: 0.72rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.room-option-copy { min-width: 0; }
.room-option-name { display: block; font-size: 0.92rem; font-weight: 680; }
.room-option-email {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-option-arrow {
  color: var(--brand-deep);
  font-size: 1.1rem;
  transition: transform 160ms var(--ease-out);
}
.room-option:hover .room-option-arrow { transform: translateX(3px); }

.no-rooms {
  margin: 18px 0 0;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  text-align: center;
}

.picker-footer {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 32px;
  color: var(--text-3);
  font-size: 0.76rem;
}
.picker-footer span::before { content: '•'; margin-right: 7px; color: var(--brand); }

/* ---------- Scrollbars ---------- */

* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 3px solid transparent;
  border-radius: 99px;
  background-clip: padding-box;
  transition: background-color 150ms ease-out;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
::-webkit-scrollbar-thumb:active { background: var(--brand); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex: none;
  position: relative;
  z-index: 5;
}
/* fio da marca no topo */
.topbar::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), oklch(0.68 0.16 230));
}

.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }

.selected-room-heading { min-width: 0; }
.app-name { font-size: 0.72rem; }
.selected-room-heading h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.selected-room-email {
  max-width: 240px;
  margin: 1px 0 0;
  overflow: hidden;
  color: var(--text-3);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-room {
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--brand-deep);
  padding: 7px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.change-room:hover { border-color: var(--brand); background: var(--brand-tint); }
.change-room:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.hint { margin: 0; color: var(--text-3); font-size: 0.85rem; }

.datenav { display: flex; align-items: center; gap: 8px; }

.nav-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 7px;
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out,
              color 150ms ease-out, transform 120ms var(--ease-out);
}
.nav-btn:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-deep); }
.nav-btn:active { transform: scale(0.94); }
.nav-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.today-btn { font-size: 0.85rem; font-weight: 600; }

.date-label {
  margin-left: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 220px;
}
/* só a inicial: "capitalize" viraria "17 A 23 De Agosto De 2026" */
.date-label::first-letter { text-transform: uppercase; }
.date-label.shift { animation: date-in 260ms var(--ease-out); }
@keyframes date-in {
  from { opacity: 0; transform: translateY(var(--date-from, -4px)); }
}

/* ---------- Layout ---------- */

.layout { display: flex; flex: 1; min-height: 0; }

.grid-wrap {
  flex: 1;
  overflow: auto;
  min-width: 0;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.grid {
  display: grid;
  grid-template-columns: var(--time-w) repeat(var(--day-count, 7), minmax(var(--col-w), 1fr));
  min-width: max(100%, 980px);
}

/* Cabeçalhos */
.corner, .day-head {
  position: sticky;
  top: 0;
  z-index: 3;
  height: var(--head-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border-strong);
}
.corner { left: 0; z-index: 4; }

.day-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 12px;
  border-left: 1px solid var(--border);
  transition: background-color 150ms ease-out;
}
.day-head .day-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.day-head .day-date {
  color: var(--text-3);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-head.today .day-name { color: var(--brand-deep); }
.day-head.weekend { background: var(--surface-2); }
/* realce da coluna sob o cursor */
.day-head.hot { background: var(--brand-tint); }

/* Bolinha de status "agora" */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--border-strong);
}
.dot.free { background: var(--free); }
.dot.busy { background: var(--busy-border); }

/* Coluna de horários */
.time-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  border-right: 1px solid var(--border-strong);
}
.time-slot {
  height: calc(var(--row-h) * 2); /* rótulo por hora */
  position: relative;
}
.time-slot span {
  position: absolute;
  top: -0.55em;
  right: 10px;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  transition: opacity 200ms ease-out;
}
.time-slot span.dim { opacity: 0; }
/* Etiqueta do horário atual. Ocupa a largura da coluna de horas de propósito:
   encostada à direita ela se sobrepunha pela metade ao rótulo da hora cheia. */
.now-badge {
  position: absolute;
  left: 4px;
  right: 5px;
  top: var(--now-top);
  transform: translateY(-50%);
  background: var(--now);
  color: var(--on-brand);
  font-size: 0.66rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 1px 0;
  border-radius: 4px;
  z-index: 3;
  pointer-events: none;
  transition: top 400ms var(--ease-out);
}

/* Colunas dos dias */
.day-col {
  position: relative;
  border-left: 1px solid var(--border);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--row-h) - 1px),
      var(--border) calc(var(--row-h) - 1px),
      var(--border) var(--row-h)
    );
  cursor: pointer;
  transition: background-color 160ms ease-out;
}
.day-col.hot { background-color: oklch(0.602 0.189 253.5 / 0.035); }
.day-col.weekend { background-color: oklch(0.965 0.005 253.5 / 0.34); }
.day-col.unavailable {
  cursor: default;
  background: repeating-linear-gradient(-45deg, var(--surface-2) 0 8px, var(--bg) 8px 16px);
}

/* Bloco ocupado */
.event {
  position: absolute;
  left: 3px;
  right: 3px;
  background: var(--busy);
  border: 1px solid var(--busy-border);
  border-radius: 5px;
  padding: 3px 7px;
  overflow: hidden;
  font-size: 0.74rem;
  line-height: 1.25;
  color: var(--busy-text);
  cursor: default;
  z-index: 1;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}
.event:hover { background: oklch(0.925 0.010 253.5); border-color: var(--text-3); }
.event .ev-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.event .ev-title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Bloco de 30 min tem 27px úteis: duas linhas não cabem e o texto era cortado
   no meio. Abaixo de 1h o conteúdo vira uma linha só. */
.event.short {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  line-height: 1;
}
.event.short .ev-title { flex: 1; min-width: 0; }
.event.short .ev-time::after { content: ' ·'; }
/* entrada curta, apenas quando os dados mudam */
.grid.fresh .event { animation: block-in 240ms var(--ease-out) backwards; }
@keyframes block-in {
  from { opacity: 0; transform: translateY(-4px) scaleY(0.94); }
}

/* Seleção pendente */
.selection {
  position: absolute;
  left: 3px;
  right: 3px;
  background: var(--brand-tint);
  border: 1.5px solid var(--brand);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand-deep);
  z-index: 2;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 3px oklch(0.602 0.189 253.5 / 0.14);
  animation: selection-in 200ms var(--ease-out);
  transition: top 160ms var(--ease-out), height 160ms var(--ease-out);
}
@keyframes selection-in {
  from { opacity: 0; transform: scale(0.96); }
}

/* Hover de célula livre — elemento único, movido por transform */
.hover-slot {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 1px;
  height: calc(var(--row-h) - 2px);
  border: 1px dashed var(--brand);
  border-radius: 5px;
  background: oklch(0.602 0.189 253.5 / 0.07);
  color: var(--brand-deep);
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
  z-index: 1;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: transform 110ms var(--ease-out), opacity 110ms ease-out;
}
.hover-slot.on { opacity: 1; }

/* Alvos semânticos de teclado. Permanecem invisíveis até receber foco. */
.slot-target {
  appearance: none;
  position: absolute;
  left: 3px;
  right: 3px;
  height: calc(var(--row-h) - 2px);
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--brand-deep);
  cursor: pointer;
  z-index: 0;
}
.slot-target:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  background: var(--brand-tint);
  z-index: 3;
}

/* Linha do agora — posição vem de --now-top, sem re-render */
.now-line {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--now-top);
  height: 0;
  border-top: 2px solid var(--now);
  z-index: 2;
  pointer-events: none;
  transition: top 400ms var(--ease-out);
}
.now-line::before {
  content: '';
  position: absolute;
  left: -1px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--now);
}
/* pulso só na primeira coluna, para não virar discoteca */
.now-line.lead::after {
  content: '';
  position: absolute;
  left: -1px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--now);
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

/* Skeleton de carregamento */
.skeleton {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 5px;
  background: var(--surface-2);
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, oklch(0.995 0.002 253.5 / 0.85), transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* ---------- Diálogo de agendamento ---------- */

.booking-dialog {
  width: min(430px, calc(100% - 32px));
  max-height: min(720px, calc(100% - 32px));
  margin: auto;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 22px;
  overflow-y: auto;
  box-shadow: 0 24px 70px oklch(0.26 0.03 253.5 / 0.24);
  animation: dialog-in 220ms var(--ease-out);
}
.booking-dialog[open] { display: flex; flex-direction: column; gap: 14px; }
.booking-dialog::backdrop {
  background: oklch(0.20 0.025 253.5 / 0.48);
  animation: backdrop-in 180ms ease-out;
}
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes backdrop-in { from { opacity: 0; } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }

.dialog-close {
  appearance: none;
  border: none;
  background: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background-color 150ms ease-out, color 150ms ease-out, transform 150ms var(--ease-out);
}
.dialog-close:hover { background: var(--surface-2); color: var(--text); }
.dialog-close:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.panel-email { margin: -10px 0 0; color: var(--text-3); font-size: 0.78rem; }
.panel-date { margin: 0; font-size: 0.9rem; font-weight: 600; }
.panel-date::first-letter { text-transform: uppercase; }

.field { display: flex; flex-direction: column; gap: 6px; border: none; margin: 0; padding: 0; }
.field > span, .field > legend {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0;
}

.field select, .field input {
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  padding: 8px 10px;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.field select:hover, .field input:hover { border-color: var(--brand); }
.field select:focus-visible, .field input:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px oklch(0.602 0.189 253.5 / 0.18);
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
                    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: right 14px center, right 9px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out,
              color 150ms ease-out, transform 120ms var(--ease-out);
}
.chip:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-deep); }
.chip:active { transform: scale(0.94); }
.chip[aria-pressed="true"] {
  background: var(--brand-tint-2);
  border-color: var(--brand);
  color: var(--brand-deep);
}
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.conflict {
  margin: 0;
  font-size: 0.82rem;
  color: var(--danger);
  background: oklch(0.96 0.02 25);
  border: 1px solid oklch(0.88 0.05 25);
  border-radius: 7px;
  padding: 8px 10px;
  animation: shake 320ms ease-out;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.primary {
  appearance: none;
  border: none;
  border-radius: 8px;
  background: var(--brand-strong);
  color: var(--on-brand);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 11px 14px;
  cursor: pointer;
  box-shadow: 0 1px 2px oklch(0.46 0.155 253.5 / 0.25);
  transition: background-color 150ms ease-out, box-shadow 180ms var(--ease-out),
              transform 120ms var(--ease-out);
}
.primary:hover:not(:disabled) {
  background: var(--brand-deep);
  box-shadow: 0 4px 14px oklch(0.46 0.155 253.5 / 0.3);
  transform: translateY(-1px);
}
.primary:active:not(:disabled) { transform: translateY(0) scale(0.985); box-shadow: 0 1px 2px oklch(0.46 0.155 253.5 / 0.25); }
.primary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.panel-note { margin: 0; color: var(--text-3); font-size: 0.78rem; line-height: 1.45; }

.load-error {
  grid-column: 1 / -1;
  align-self: start;
  max-width: 440px;
  margin: 48px auto;
  padding: 18px 20px;
  border: 1px solid oklch(0.88 0.05 25);
  border-radius: 9px;
  background: oklch(0.97 0.012 25);
  color: var(--danger);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .hint { display: none; }
  .date-label { min-width: 0; }
}

@media (max-width: 640px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 10px; padding: 12px 14px; }
  .topbar-left { width: 100%; }
  .datenav { width: 100%; flex-wrap: wrap; }
  .date-label { flex: 1 0 100%; margin: 2px 0 0; }
  .picker-shell { padding-top: 28px; }
  .picker-kicker { margin-top: 40px; }
  .picker-controls { grid-template-columns: 1fr; }
  .room-count { grid-column: 1; grid-row: auto; justify-self: start; }
  .room-list { grid-template-columns: 1fr; }
  .room-list li:nth-child(odd) { border-right: 0; }
  .room-list li:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .room-list li:last-child { border-bottom: 0; }
  .picker-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .booking-dialog { width: calc(100% - 20px); max-height: calc(100% - 20px); padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .grid-wrap { scroll-behavior: auto; }
}

@media (forced-colors: active) {
  .slot-target:focus-visible, .selection, .hover-slot { forced-color-adjust: none; }
}
