/* Layout: cartelera del campus. Encabezado con lo que pasa ahora, pestañas, tira de siete días y una lista horaria.
   El color fuerte queda reservado para identificar a cada entidad. */
:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --sunken: #e6eaf0;
  --ink: #16202e;
  --muted: #55607a;
  --line: #d7dde6;
  --accent: #1066b1;
  --on-accent: #ffffff;
  --accent-soft: #dce9f6;
  --alert: #bb1313;
  --alert-soft: #fbe4e2;
  --change: #7a5200;
  --change-soft: #faedcc;
  --ok: #1d6b3a;
  --brand-red: #bb1313;
  --mast-bg: #2f52a0;
  --mast-ink: #ffffff;
  --mast-muted: #c9d5ee;
  --mast-panel: #26438a;
  --mast-line: #4a6bb8;
  --e-club: #2f52a0;
  --e-nexus: #7740c0;
  --e-tenis: #5a7411;
  --e-paddle: #0b7c88;
  --e-escuela: #b82d79;
  --e-ugr: #556072;
  --e-fundacion: #bf560b;
  --e-pileta: #94700a;
  --e-albergue: #8a4b2d;
  --e-otros: #6b7280;
  --e-interna: #8a94a6;
  --font-display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-text: "Barlow", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131b;
    --surface: #161d28;
    --sunken: #212a38;
    --ink: #e8edf5;
    --muted: #9aa6ba;
    --line: #2a3445;
    --accent: #6db0f0;
    --on-accent: #06182b;
    --accent-soft: #15304d;
    --alert: #ff8f85;
    --alert-soft: #3b1815;
    --change: #f3c561;
    --change-soft: #382b0a;
    --ok: #7bd49a;
    --brand-red: #d64545;
    --mast-bg: #16264d;
    --mast-ink: #e8edf5;
    --mast-muted: #a9b8d8;
    --mast-panel: #1d3163;
    --mast-line: #2f4a8a;
    --e-club: #7aaaff;
    --e-nexus: #bd97ff;
    --e-tenis: #b9d353;
    --e-paddle: #55cfdc;
    --e-escuela: #ff86c2;
    --e-ugr: #aab5c6;
    --e-fundacion: #ff9f57;
    --e-pileta: #e6c34f;
    --e-albergue: #dba585;
    --e-otros: #a3a9b6;
    --e-interna: #7d8799;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e131b;
  --surface: #161d28;
  --sunken: #212a38;
  --ink: #e8edf5;
  --muted: #9aa6ba;
  --line: #2a3445;
  --accent: #6db0f0;
  --on-accent: #06182b;
  --accent-soft: #15304d;
  --alert: #ff8f85;
  --alert-soft: #3b1815;
  --change: #f3c561;
  --change-soft: #382b0a;
  --ok: #7bd49a;
  --brand-red: #d64545;
  --mast-bg: #16264d;
  --mast-ink: #e8edf5;
  --mast-muted: #a9b8d8;
  --mast-panel: #1d3163;
  --mast-line: #2f4a8a;
  --e-club: #7aaaff;
  --e-nexus: #bd97ff;
  --e-tenis: #b9d353;
  --e-paddle: #55cfdc;
  --e-escuela: #ff86c2;
  --e-ugr: #aab5c6;
  --e-fundacion: #ff9f57;
  --e-pileta: #e6c34f;
  --e-albergue: #dba585;
  --e-otros: #a3a9b6;
  --e-interna: #7d8799;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.45;
}
.wrap {
  max-width: 1040px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Encabezado */
.masthead { background: var(--mast-bg); color: var(--mast-ink); border-bottom: 4px solid var(--brand-red); }
.masthead :focus-visible { outline-color: var(--mast-ink); }
.masthead-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: 28px;
  align-items: end;
  padding-block: 28px;
}
.proto-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mast-muted);
  border: 1px solid var(--mast-line);
  border-radius: 4px;
  padding: 3px 8px;
}
.masthead-text p { margin: 0; }
h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 8vw, 64px);
  line-height: .95;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 12px 0 0;
}
.masthead-text .lede { margin-top: 10px; color: var(--mast-muted); max-width: 44ch; }
.now { background: var(--mast-panel); border-radius: 6px; padding: 14px 16px; min-width: 0; }
.now-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.now-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
}
.now-clock { font-size: 14px; color: var(--mast-muted); font-variant-numeric: tabular-nums; }
.now-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.now-list li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.3; }
.now-until { color: var(--mast-muted); font-variant-numeric: tabular-nums; }
.now-where { color: var(--mast-muted); font-size: 14px; }
.now-empty { margin: 10px 0 0; font-size: 15px; }
.now-next { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--mast-line); font-size: 14px; color: var(--mast-muted); }

/* Pestañas */
.tabs { background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-in::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 14px 14px 11px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.tabs a:first-child { padding-left: 0; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Estructura general */
.main { display: grid; gap: 20px; padding-block: 22px 36px; }
.view { display: grid; gap: 16px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
.section-sub { margin: 4px 0 0; color: var(--muted); max-width: 65ch; }
.muted { color: var(--muted); }

/* Tira de días */
.daybar { display: grid; gap: 12px; }
.daybar-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
.daybar-head p { margin: 0; font-size: 15px; color: var(--muted); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  appearance: none;
  font: inherit;
  display: grid;
  justify-items: center;
  padding: 8px 2px 7px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.day-abbr { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.day-num { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.day-count { font-size: 11px; color: var(--muted); }
.day.is-today .day-abbr { color: var(--accent); }
.day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day[aria-pressed="true"] .day-abbr,
.day[aria-pressed="true"] .day-count { color: var(--on-accent); }

/* Filtros */
.filters { display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 2px; background: var(--e, var(--muted)); flex: none; }
.etag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.filters-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.field-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); min-width: 0; }

select, input[type="text"], input[type="tel"], input[type="password"], input[type="time"], input[type="date"], textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  min-width: 0;
  max-width: 100%;
}
.btn {
  appearance: none;
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { padding: 3px 10px; font-size: 13px; }

/* Resumen para WhatsApp */
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 10px; }
.summary p { margin: 0; }
.summary-title { font-weight: 600; }
.summary textarea { width: 100%; resize: vertical; line-height: 1.4; }
.summary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; }
.summary-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.summary-range { font-weight: 600; }
.summary-days { display: grid; gap: 6px; }
.summary a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.summary-image { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.summary-frame { max-width: 520px; max-height: 620px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; }
.summary-frame[hidden] { display: none; }
.summary-frame img { display: block; width: 100%; height: auto; }

/* Lista horaria */
.slots, .news, .spaces { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.slot { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line); }
.slot:first-child { border-top: 0; }
.slot-time { display: grid; align-content: start; font-variant-numeric: tabular-nums; }
.t-start { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; }
.t-end { font-size: 13px; color: var(--muted); }
.slot-body { min-width: 0; }
.slot-title { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.25; }
.slot-meta { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; color: var(--muted); }
.slot-note { margin: 6px 0 0; font-size: 14px; }
.slot-contact { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.slot-contact a { color: var(--accent); font-weight: 600; }
.flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.flag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 4px;
}
.flag.live { background: var(--accent-soft); color: var(--accent); }
.flag.off, .flag.clash { background: var(--alert-soft); color: var(--alert); }
.flag.moved { background: var(--change-soft); color: var(--change); }
.flag.mine { background: var(--sunken); color: var(--muted); }
.slot.is-off .slot-title, .slot.is-off .t-start { text-decoration: line-through; color: var(--muted); }
.slot.is-new { animation: flash 1.8s ease-out 1; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }
.empty { margin: 0; padding: 22px 16px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.form-mode { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-radius: 6px; background: var(--accent-soft); font-weight: 600; }
.scope { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 0; }
.scope legend { padding: 0; margin-bottom: 4px; }
.scope-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.scope-ask strong { flex-basis: 100%; font-size: 14px; }
.weeknav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.time-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr); gap: 10px 14px; }
.time-row .mini { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.weeknav input { padding: 5px 8px; }
.repeat-range { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin-top: 4px; }
.repeat-note { margin: 0; font-size: 14px; color: var(--muted); }
.daybox.group-all span { border-style: dashed; }
.user-entities { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex-basis: 100%; }
.scope .check { justify-self: start; align-items: flex-start; }
.scope .check input { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

/* Espacios */
.notice { margin: 0; font-size: 15px; }
.notice.alert { background: var(--alert-soft); border-radius: 8px; padding: 12px 16px; }
.notice-lead { margin: 0; font-weight: 600; color: var(--alert); }
.notice ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.notice.calm { color: var(--muted); }
.space { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 8px 20px; padding: 14px 16px; border-top: 1px solid var(--line); }
.space:first-child { border-top: 0; }
.axis-row { padding-block: 10px 0; }
.axis-row + .space { border-top: 0; padding-top: 8px; }
.axis-track { position: relative; height: 16px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.axis-track span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.space-head h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.25; }
.space-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.space-main { min-width: 0; }
.bar {
  position: relative;
  height: calc(var(--lanes, 1) * 14px);
  background-color: var(--sunken);
  background-image: repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent calc(100% / 24));
  border-radius: 3px;
  overflow: hidden;
}
.seg { position: absolute; height: 14px; background: var(--e); border-radius: 2px; }
.seg.is-clash { box-shadow: inset 0 0 0 2px var(--alert); }
.nowline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); }
.bookings { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.bookings li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.bookings li.is-off .b-title { text-decoration: line-through; color: var(--muted); }
.b-time { min-width: 100px; color: var(--muted); font-variant-numeric: tabular-nums; }
.space-free { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* Grilla semanal de espacios */
.mode-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.mode-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.mode-btn { appearance: none; font: inherit; font-size: 14px; font-weight: 600; padding: 7px 18px; background: transparent; color: var(--muted); border: 0; cursor: pointer; }
.mode-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.mode-btn:focus-visible { outline-color: var(--ink); outline-offset: -3px; }
.week-pane { display: grid; gap: 12px; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.legend .etag { font-weight: 500; }
.grid-help { margin: 0; font-size: 14px; color: var(--muted); max-width: 75ch; }
.week-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.week { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.week th, .week td { padding: 0; border-top: 1px solid var(--line); font-weight: 400; }
.week thead th { border-top: 0; }
.week td, .week thead th + th { border-left: 1px solid var(--line); }
.week .wcorner, .week tbody th { position: sticky; left: 0; z-index: 1; width: 184px; padding: 8px 12px; background: var(--surface); text-align: left; }
.week .wcorner { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wname { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.wowner { display: block; font-size: 12px; color: var(--muted); }
.wusage { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.wday { appearance: none; font: inherit; width: 100%; padding: 10px 4px; background: transparent; color: var(--muted); border: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; cursor: pointer; }
.wday:hover { color: var(--ink); }
.wday.is-today { color: var(--accent); }
.wcell { appearance: none; display: block; width: 100%; padding: 12px 6px; background: transparent; border: 0; cursor: pointer; }
.wcell:hover { background: var(--accent-soft); }
.wcell[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.wcell:focus-visible, .wday:focus-visible { outline-offset: -2px; }
.bar.is-mini { display: block; background-image: repeating-linear-gradient(to right, var(--line) 0, var(--line) 1px, transparent 1px, transparent calc(100% / 4)); }
.bar.is-mini .seg.is-clash { box-shadow: none; }
.wcell.has-clash .bar { box-shadow: 0 0 0 2px var(--alert); }
.cell-detail { display: grid; gap: 8px; justify-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.cell-detail h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.1; margin: 0; }
.cell-detail .bookings, .cell-detail .space-free { margin: 0; }

/* Novedades */
.news-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; }
.news-when { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.news-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; }
.news-item h3 { margin: 6px 0 0; font-size: 18px; font-weight: 600; line-height: 1.25; text-wrap: balance; }
.news-body { margin: 4px 0 0; max-width: 65ch; }

/* Cargar */
.load { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field.wide, .form-error, .form-actions { grid-column: 1 / -1; }
.field > label, .field-label { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.field select, .field input { width: 100%; }
.daypick, .daypick-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.daybox { position: relative; display: inline-flex; }
.daybox input { position: absolute; inset: 0; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.daybox span { min-width: 48px; padding: 7px 10px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.daybox input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.daybox input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.spacepick { display: grid; gap: 10px; }
.spacegroup { display: grid; gap: 4px; }
.spacegroup-name { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Sesión, cuenta y usuarios */
.form.narrow { max-width: 460px; }
.news-form textarea { width: 100%; resize: vertical; }
.mast-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.session { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--mast-muted); }
.session a { color: var(--mast-ink); font-weight: 600; }
.sbtn { appearance: none; font: inherit; font-size: 13px; font-weight: 600; padding: 4px 10px; background: transparent; color: var(--mast-ink); border: 1px solid var(--mast-line); border-radius: 4px; cursor: pointer; }
.sbtn[aria-pressed="true"] { background: var(--mast-ink); color: var(--mast-bg); border-color: var(--mast-ink); }
.pane-title { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.1; margin: 8px 0 0; }
.users { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.users li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.users li:first-child { border-top: 0; }
.user-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.user-actions input[type="password"] { width: 180px; padding: 5px 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.form-error { margin: 0; color: var(--alert); font-weight: 500; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; }
.avail { min-width: 0; }
.avail h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.1; margin: 0; }
.avail p { margin: 8px 0 0; }
.avail .status { font-weight: 600; }
.avail .status.ok { color: var(--ok); }
.avail .status.bad { color: var(--alert); }
.avail .bookings { margin-top: 6px; }
.avail .b-time { min-width: 118px; }

.foot { padding-block: 0 32px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0; max-width: 75ch; padding-top: 16px; border-top: 1px solid var(--line); }
.foot-actions { margin-top: 10px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 20;
}

@media (max-width: 800px) {
  .masthead-in { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 20px; }
  .load { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .space { grid-template-columns: minmax(0, 1fr); }
  .axis-row > div:first-child { display: none; }
}
@media (max-width: 520px) {
  .tabs-in { gap: 0; }
  .tabs a, .tabs a:first-child { flex: 1 0 auto; padding: 12px 6px 9px; font-size: 15px; text-align: center; }
  .days { gap: 4px; }
  .day-num { font-size: 24px; }
  .slot { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; padding-inline: 12px; }
  .t-start { font-size: 26px; }
  .news-item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .repeat-range { grid-template-columns: minmax(0, 1fr); }
  .time-row { grid-template-columns: minmax(0, 1fr); }
  .section-title { font-size: 26px; }
  .week { min-width: 720px; }
  .week .wcorner, .week tbody th { width: 128px; padding-inline: 10px; }
  .wname { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .slot.is-new { animation: none; }
}
