:root {
  --bg: #f8f7fc;
  --panel: #ffffff;
  --panel-soft: #fbfafd;
  --text: #191726;
  --muted: #5e5a6e;
  --text-subtle: #8d8999;
  --line: #e5e2ed;
  --line-soft: #eeeaf3;
  --line-strong: #d9d4e4;
  --accent: #8566e8;
  --accent-strong: #6547cb;
  --accent-hover: #7656db;
  --accent-soft: #eee9fc;
  --accent-softer: #f5f1fd;
  --brand-magenta: #e56bb6;
  --brand-magenta-soft: #fbeaf5;
  --danger: #b4232f;
  --success: #217a4b;
  --warning: #9a5b13;
  --sidebar: #fbfafd;
  --sidebar-text: #5e5a6e;
  --topbar-height: 4.25rem;
  --focus: 0 0 0 3px rgba(133, 102, 232, 0.24);
  --ui-scale: 1;
  --font-scale: 1;
  --calendar-font-scale: 1;
  --tv-scale: 1;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: clip; font-size: calc(16px * var(--ui-scale)); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Noto Sans KR", sans-serif;
  line-height: 1.5;
  font-size: calc(1rem * var(--font-scale));
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent-strong); text-decoration: none; }
button, input, select, textarea { max-width: 100%; font: inherit; }
button, select, input[type="checkbox"] { cursor: pointer; }
textarea { resize: vertical; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; box-shadow: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--topbar-height);
  padding: 0 clamp(0.75rem, 1.7vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  backdrop-filter: none;
}
.topbar-start, .topbar-user { display: flex; min-width: 0; align-items: center; }
.topbar-start { gap: 0.65rem; }
.service-switcher { display:flex; align-items:center; gap:.2rem; margin-left:.45rem; padding:.2rem; border:1px solid var(--line); border-radius:.7rem; background:var(--panel); }
.service-switcher a { display:inline-flex; align-items:center; min-height:2.2rem; padding:0 .7rem; border-radius:.5rem; color:var(--muted); text-decoration:none; font-size:.82rem; font-weight:750; }
.service-switcher a:hover { background:var(--panel-soft); color:var(--text); }
.service-switcher a.active { background:var(--accent-soft); color:var(--accent-strong); }
@media(max-width:700px){.service-switcher{gap:.1rem;margin-left:.1rem}.service-switcher a{min-height:2rem;padding:0 .48rem;font-size:.72rem}}
.brand { display: inline-flex; align-items: center; color: var(--text); }
.brand img { display: block; width: 3.1rem; height: 3.1rem; object-fit: contain; }
.tex-launch { display: inline-flex; align-items: center; justify-content: center; margin-left: 0.85rem; width: 2.85rem; height: 2.85rem; border: 1px solid var(--line); border-radius: 0.6rem; background: #fff; color: var(--text); transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.tex-launch:hover { border-color: var(--brand-magenta); background: var(--brand-magenta-soft); transform: translateY(-1px); }
.tex-launch img { display: block; width: 2.5rem; height: 2.5rem; object-fit: contain; }
.topbar-user { justify-content: flex-end; gap: clamp(0.65rem, 1.5vw, 1.25rem); font-size: 0.875rem; }
.topbar-user form { flex: 0 0 auto; margin: 0; }
.user-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-button { min-height: 2.75rem; padding: 0.5rem 0; border: 0; background: none; color: var(--accent-strong); }
.nav-toggle, .nav-close {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  color: var(--text);
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { position: absolute; left: 0; content: ""; }
.menu-icon::before { top: -0.36rem; }
.menu-icon::after { top: 0.36rem; }

.app-shell {
  display: grid;
  grid-template-columns: clamp(12.5rem, 13vw, 14.5rem) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
  min-height: calc(100dvh - var(--topbar-height));
}
.sidebar {
  position: sticky;
  top: var(--topbar-height);
  align-self: start;
  height: calc(100vh - var(--topbar-height));
  height: calc(100dvh - var(--topbar-height));
  overflow-y: auto;
  padding: clamp(1rem, 2vw, 1.5rem) 0.75rem;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  transition: transform 160ms ease, opacity 120ms ease;
}
.sidebar-heading { display: none; }
.sidebar-collapse-button,
.sidebar-expand-button {
  display: none;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
}
.sidebar-collapse-button {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 0.55rem auto;
}
.sidebar-expand-button {
  position: fixed;
  left: 0.45rem;
  top: calc(var(--topbar-height) + 0.55rem);
  z-index: 25;
}
@media (min-width: 75rem) {
  .sidebar-collapse-button { display: grid; }
  .sidebar-collapsed .app-shell { grid-template-columns: 0 minmax(0, 1fr); }
  .sidebar-collapsed .sidebar {
    visibility: hidden;
    padding: 0;
    border-right: 0;
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
  }
  .sidebar-collapsed .sidebar-expand-button { display: grid; }
}
.sidebar nav, .nav-section { display: grid; gap: 0.3rem; }
.nav-section + .nav-section { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--line-soft); }
.nav-section-label { padding: 0 0.8rem 0.25rem; color: var(--text-subtle); font-size: 0.75rem; font-weight: 650; text-transform: uppercase; }
.sidebar a {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.8rem;
  border-radius: 0.625rem;
  color: var(--sidebar-text);
  overflow-wrap: anywhere;
}
.sidebar a:hover, .sidebar a:focus-visible { background: #f5f2fa; color: var(--text); }
.sidebar a.active { background: var(--accent-soft); color: #6547cb; font-weight: 650; }
.nav-icon { width: 1.15rem; height: 1.15rem; flex: 0 0 1.15rem; }
.nav-backdrop { display: none; }
.content { width: 100%; min-width: 0; padding: clamp(1rem, 1.5vw, 2rem); }
.auth-content {
  display: grid;
  min-height: calc(100vh - var(--topbar-height));
  min-height: calc(100dvh - var(--topbar-height));
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.card { border: 1px solid var(--line); border-radius: 0.5rem; background: var(--panel); box-shadow: none; }
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  margin-bottom: clamp(1rem, 1.7vw, 1.5rem);
}
.page-heading > * { min-width: 0; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }
h1, h2, p { margin-top: 0; }
button, [role="button"] { word-break: keep-all; overflow-wrap: normal; }
h1 { margin-bottom: 0.2rem; font-size: 1.75rem; font-weight: 600; line-height: 1.2; }
h2 { margin-bottom: 0.65rem; font-size: 1.125rem; line-height: 1.3; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.page-heading p { margin-bottom: 0; }

.button {
  display: inline-flex;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  min-height: 2.75rem;
  min-width: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.625rem;
  background: var(--panel);
  color: var(--text);
  text-align: center;
}
.button:hover { border-color: #bbb4cc; background: var(--accent-softer); }
.button.primary { border-color: var(--accent-hover); background: var(--accent-hover); color: #fff; font-weight: 650; }
.button.primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.button.ghost { background: transparent; }
.button.danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.button.danger.ghost { background: transparent; color: var(--danger); }

.input,
.stack-form input[type="text"],
.stack-form input[type="email"],
.stack-form input[type="password"],
.stack-form input[type="date"],
.stack-form select,
.stack-form textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.625rem;
  background: #fff;
  color: var(--text);
}
.stack-form { display: grid; min-width: 0; gap: 0.95rem; }
.stack-form label { display: grid; min-width: 0; gap: 0.38rem; font-size: 0.875rem; font-weight: 650; }
.stack-form fieldset { min-width: 0; margin: 0; padding: 0.85rem; border: 1px solid var(--line); border-radius: 0.5rem; }
.stack-form legend { padding: 0 0.4rem; font-size: 0.875rem; font-weight: 700; }
.errorlist { margin: 0.25rem 0 0; padding-left: 1.1rem; color: var(--danger); font-size: 0.8125rem; }
.form-help { margin-top: -0.55rem; color: var(--muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
.form-help ul { margin: 0; padding-left: 1.1rem; }
.password-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; }
.password-control input { border-radius: 0.5rem 0 0 0.5rem !important; }
.password-toggle { display: grid; width: 2.75rem; min-height: 2.75rem; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 0.5rem 0.5rem 0; background: var(--panel-soft); color: var(--accent-strong); }
.password-icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-icon-visible, .password-toggle[data-password-visible="true"] .password-icon-hidden { display: none; }
.password-toggle[data-password-visible="true"] .password-icon-visible { display: block; }
.caps-lock-warning { color: var(--warning); font-size: 0.75rem; font-weight: 700; }
.profile-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1rem; align-items: start; }
.one-time-secret { margin-bottom: 1rem; border-color: #c9c5fa; background: #f7f6ff; }
.one-time-secret code { display: block; padding: 0.75rem; border: 1px solid #d8d5ff; border-radius: 0.375rem; background: #fff; overflow-wrap: anywhere; user-select: all; }
.storage-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1px; margin-bottom: 1rem; overflow: hidden; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--line); }
.storage-summary > div { display: grid; gap: 0.1rem; padding: 1rem; background: var(--panel); }
.storage-summary strong { font-size: 1.35rem; }
.storage-summary span { color: var(--muted); font-size: 0.8125rem; }
.storage-filters { display: grid; grid-template-columns: repeat(2, minmax(12rem, 1fr)) auto; align-items: end; gap: 0.75rem; margin-bottom: 1rem; }
.storage-filters label { display: grid; min-width: 0; gap: 0.35rem; font-size: 0.8125rem; font-weight: 700; }
.storage-filename { overflow-wrap: anywhere; }
.messages { display: grid; gap: 0.5rem; margin-bottom: 0.9rem; }
.message { padding: 0.7rem 0.85rem; border: 1px solid #d9d7ff; border-radius: 0.5rem; background: var(--accent-soft); overflow-wrap: anywhere; }
.message.error { border-color: #fecaca; background: #fff1f2; color: #991b1b; }
.message.success { border-color: #bbf7d0; background: #ecfdf3; color: #166534; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(16rem, 17vw, 20rem);
  gap: clamp(1rem, 1.4vw, 1.5rem);
  align-items: start;
}
.calendar-card { min-width: 0; overflow: hidden; box-shadow: none; }
.calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(20rem, 1fr);
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem clamp(0.75rem, 1.2vw, 1.1rem);
  border-bottom: 1px solid var(--line);
}
.month-nav { display: flex; align-items: center; gap: 0.35rem; }
.month-nav h2 { min-width: 7rem; margin: 0 0.2rem; font-size: 1.25rem; font-weight: 600; text-align: center; }
.month-nav .button { padding-inline: 0.5rem; font-size: 1.25rem; }
.today-control { font-size: 0.8125rem !important; }
.icon-control { width: 2.75rem; padding: 0; }
.icon-control svg { width: 1.25rem; height: 1.25rem; }
.filters { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.45rem; }
.filters .input { width: min(100%, 13rem); min-width: 7rem; }
.check-inline { display: flex; flex: 0 0 auto; align-items: center; gap: 0.4rem; min-height: 2.75rem; font-size: 0.875rem; }
.check-inline input { width: 1.1rem; height: 1.1rem; }
/* Opt-in modern checkbox surface. Deliberately not applied globally: calendar/TV
   controls retain their established layout and interaction contract. */
.box-toggle-group { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: stretch; }
.box-toggle {
  position: relative;
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.6rem;
  padding: 0.58rem 0.78rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.7rem;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.box-toggle:hover { border-color: var(--accent); background: var(--panel-soft); }
.box-toggle input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.box-toggle::before {
  content: '✓';
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 1.35rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 0.42rem;
  color: transparent;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--panel);
}
.box-toggle:has(input[type="checkbox"]:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.box-toggle:has(input[type="checkbox"]:checked)::before {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.box-toggle:has(input[type="checkbox"]:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.box-toggle-copy { display: grid; gap: 0.08rem; line-height: 1.25; }
.box-toggle-copy strong { font-size: 0.86rem; }
.box-toggle-copy small { color: var(--muted); font-size: 0.72rem; font-weight: 400; }
.box-toggle.compact { min-height: 2.5rem; padding: 0.42rem 0.65rem; }
.calendar { width: 100%; min-width: 0; }
.calendar-weekdays, .calendar-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays > div { padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; font-weight: 600; text-align: center; }
.calendar-body { grid-auto-rows: minmax(clamp(7rem, calc((100dvh - 16rem) / 6), 14rem), auto); }
.calendar.next-two-weeks .calendar-body { grid-auto-rows: minmax(clamp(12rem, calc((100dvh - 16rem) / 2), 28rem), auto); }
.calendar-day {
  container-type: inline-size;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 0.3rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: var(--surface-secondary, #fbfafd); color: #9895a4; }
.calendar-day.today { background: #f0ebfc; box-shadow: none; }
.calendar-day.selected:not(.today) { background: #faf8fe; }
.day-number {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.125rem;
  font-weight: 600;
}
.day-number:hover, .day-number:focus-visible { background: var(--accent-soft); color: var(--accent-strong); }
.calendar-day.today .day-number { color: #6547cb; }
.events { display: grid; min-width: 0; gap: 0.28rem; margin-top: 0.1rem; }
.event {
  --event-accent: #8766de;
  --event-fill: #eee9fb;
  display: grid;
  min-width: 0;
  gap: 0.05rem;
  overflow: hidden;
  padding: 0.3rem 0.45rem;
  border: 0;
  border-left: 0.25rem solid var(--event-accent);
  border-radius: 0.375rem;
  background: var(--event-fill);
  color: #20202a;
  font-size: 0.8125rem;
  line-height: 1.3;
}
.event:hover { filter: none; }
.event strong, .event span, .event small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event strong { font-size: 0.875rem; font-weight: 600; }
.event-owner { color: #4f4b5d; font-weight: 500; }
.event small { color: #676273; }
.event.readonly { cursor: default; }
.event.continues-before { margin-left: -0.3rem; padding-left: 0.45rem; border-left: 0; border-radius: 0 0.375rem 0.375rem 0; }
.event.continues-after { margin-right: -0.3rem; border-radius: 0.375rem 0 0 0.375rem; }
.event.continues-before.continues-after { border-radius: 0; }
.event-summary { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-summary-wide, .event-summary-full { display: none; }
.events > .event:nth-child(n + 4) { display: none; }
.more-events {
  min-height: 2rem;
  padding: 0.2rem 0.35rem;
  overflow: hidden;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.more-events:hover { background: var(--accent-soft); }
.day-occupancy, .mobile-day-agenda, .mobile-reserve-bar { display: none; }

@container (max-width: 9rem) {
  .event small { display: none; }
}
@container (min-width: 12rem) {
  .event-summary-compact { display: none; }
  .event-summary-wide { display: block; }
}
@container (min-width: 21rem) {
  .event-summary-wide { display: none; }
  .event-summary-full { display: block; }
}

.side-stack { display: grid; min-width: 0; gap: 1rem; }
.compact-card { min-width: 0; padding: 1rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.section-heading > * { min-width: 0; }
.upcoming-list, .quick-actions { display: grid; gap: 0.5rem; }
.upcoming { display: grid; min-width: 0; gap: 0.12rem; padding: 0.6rem 0; border-top: 1px solid var(--line); color: var(--text); }
.upcoming strong, .upcoming span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.upcoming span { color: var(--muted); font-size: 0.8125rem; white-space: normal; overflow-wrap: anywhere; }

.reservation-dialog, .day-agenda-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-width: 100%;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 0.75rem;
  box-shadow: none;
}
.reservation-dialog::backdrop, .day-agenda-dialog::backdrop { background: rgba(25, 25, 32, 0.52); }
.reservation-dialog form { padding: clamp(1rem, 2.5vw, 1.5rem); }
.dialog-heading, .day-agenda-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dialog-heading > div { min-width: 0; }
.dialog-heading p { margin-bottom: 0; }
.icon-button {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 1.75rem;
}
.icon-button:hover { background: #f1f1f5; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.equipment-checks ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.45rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.equipment-checks li { min-width: 0; }
.equipment-checks label { display: flex; min-width: 0; align-items: flex-start; gap: 0.5rem; font-weight: 400; overflow-wrap: anywhere; }
.equipment-checks input { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; margin-top: 0.15rem; }
.dialog-actions, .form-actions, .card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; }

.day-agenda-dialog { width: min(36rem, calc(100vw - 2rem)); }
.day-agenda-dialog-heading { position: sticky; top: 0; z-index: 1; padding: 1rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.day-agenda-dialog-heading h2 { margin: 0; }
.day-agenda-dialog [data-day-agenda-dialog-content] { padding: 0 1rem 1rem; }
.day-agenda-content { display: grid; gap: 0.65rem; }
.agenda-event {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) minmax(10rem, 1.4fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.agenda-event-main, .agenda-equipment { display: grid; min-width: 0; gap: 0.15rem; }
.agenda-event-main > *, .agenda-equipment > * { min-width: 0; overflow-wrap: anywhere; }
.agenda-event-main span, .agenda-event-main small { color: var(--muted); }
.agenda-equipment span { padding-left: 0.65rem; position: relative; }
.agenda-equipment span::before { position: absolute; left: 0; content: ""; width: 0.3rem; height: 0.3rem; margin-top: 0.55rem; border-radius: 50%; background: #8b85d2; }
.agenda-detail { white-space: nowrap; }
.agenda-empty { border-bottom: 0; }

.table-card { max-width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.data-table th, .data-table td { min-width: 0; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.data-table th { color: var(--muted); font-size: 0.75rem; }
.status { display: inline-block; max-width: 100%; padding: 0.2rem 0.5rem; border-radius: 999px; background: #ececf0; font-size: 0.75rem; overflow-wrap: anywhere; }
.status.active { background: #dcfce7; color: #166534; }
.status.warning { background: #fff3df; color: #8a5417; }
.status.cancelled { background: #fee2e2; color: #991b1b; }
.status.upcoming { background: var(--accent-soft); color: #373171; }
.status.current { background: #dff7f0; color: #12614a; }
.status.completed { background: #e8eaee; color: #555b66; }
.empty { padding: clamp(1.5rem, 4vw, 2.5rem); color: var(--muted); text-align: center; }
.detail-card, .form-card { width: min(100%, 52rem); padding: clamp(1rem, 2vw, 1.5rem); }
.detail-list { display: grid; margin: 0 0 1.25rem; }
.detail-list > div { display: grid; grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr); gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); }
.detail-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.equipment-names { overflow-wrap: anywhere; }

.reservation-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.reservation-tabs a { min-height: 2.75rem; padding: 0.62rem 0.9rem; border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; }
.reservation-tabs a.active { border-color: var(--accent); color: var(--accent-strong); font-weight: 750; }
.reservation-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.9rem;
}
.reservation-filters label { display: grid; min-width: 0; gap: 0.3rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.filter-actions { display: flex; align-items: end; gap: 0.5rem; }
.reservation-records { display: grid; gap: 0.65rem; }
.reservation-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(0.9rem, 1.5vw, 1.15rem);
}
.reservation-record-main { display: grid; min-width: 0; gap: 0.25rem; }
.reservation-record-heading { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.reservation-record-heading h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.reservation-dates, .reservation-record .equipment-names, .reservation-note { margin: 0; }
.cancelled-record { opacity: 0.7; background: #fafafa; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1rem; }
.compact-pagination { margin-top: 0.75rem; }
.bulk-cancel-form { display: grid; gap: 1rem; }
.bulk-cancel-form .reservation-record { grid-template-columns: auto minmax(0, 1fr) auto; }
.bulk-select { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; }
.bulk-select input { width: 1.2rem; height: 1.2rem; }
.bulk-action-bar, .confirmation-action { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1rem; }
.bulk-action-bar label { display: grid; min-width: min(100%, 28rem); flex: 1; gap: 0.3rem; }
.confirmation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.confirmation-action { margin-top: 1rem; }
.confirmation-action p { margin: 0; }
.cancellation-confirmation { padding-top: 1rem; border-top: 1px solid var(--line); }
.cancellation-confirmation label { display: grid; gap: 0.35rem; margin-bottom: 0.75rem; }
.cancellation-confirmation .check-inline { display: flex; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.equipment-detail-layout, .management-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(16rem, 20vw, 22rem);
  align-items: start;
  gap: clamp(1rem, 1.4vw, 1.5rem);
}
.equipment-detail-main, .management-main { display: grid; min-width: 0; gap: 1rem; }
.content-section { min-width: 0; padding: clamp(1rem, 1.8vw, 1.35rem); }
.management-list, .audit-list { display: grid; min-width: 0; }
.management-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.management-row > * { min-width: 0; }
.management-row p { margin: 0.2rem 0 0; }
.management-row-main { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; }
.management-row-main > span:not(.status) { color: var(--muted); }
.manual-row { align-items: center; }
.row-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; }
.row-actions form { margin: 0; }
.row-meta { color: var(--muted); font-size: 0.75rem; }
.subdued { opacity: 0.62; background: #fafafa; }
.inline-disclosure { margin-top: 0.85rem; border-top: 1px solid var(--line); padding-top: 0.85rem; }
.inline-disclosure summary { min-height: 2.75rem; color: var(--accent-strong); font-weight: 700; cursor: pointer; }
.inline-disclosure .stack-form { padding-top: 0.75rem; }
.audit-list > div { display: grid; gap: 0.1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.audit-list span { color: var(--muted); font-size: 0.75rem; overflow-wrap: anywhere; }
.stack-form p { display: grid; gap: 0.35rem; margin: 0; }

.equipment-grid, .preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(0.75rem, 1.2vw, 1rem);
}
.equipment-card, .preset-card { display: grid; min-width: 0; align-content: start; gap: 0.85rem; padding: clamp(1rem, 1.5vw, 1.25rem); }
.equipment-card > *, .preset-card > * { min-width: 0; overflow-wrap: anywhere; }
.equipment-card.disabled { opacity: 0.68; }
.equipment-rules, .notice-list { display: grid; gap: 0.65rem; }
.equipment-rules > div, .notice-item { padding-top: 0.65rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.equipment-rules p, .notice-item p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.8125rem; }
.notice-band { display: grid; gap: 0.65rem; margin-bottom: 1rem; padding: 0.9rem 1rem; border: 1px solid #fed7aa; border-radius: 0.5rem; background: #fff7ed; }
.notice-band p { margin: 0.25rem 0 0; overflow-wrap: anywhere; }
.eyebrow { color: var(--muted); font-size: 0.6875rem; letter-spacing: 0; text-transform: uppercase; }
.preset-card ul { margin: 0; padding-left: 1.25rem; overflow-wrap: anywhere; }
.login-card { width: min(100%, 25rem); padding: clamp(1.25rem, 4vw, 1.75rem); }
.login-card h1 { letter-spacing: 0; }
.registration-card { width: min(100%, 31rem); padding: clamp(1.25rem, 4vw, 1.75rem); }
.auth-switch { margin: 1.1rem 0 0; color: var(--muted); font-size: 0.875rem; text-align: center; }
.pending-card { text-align: center; }

.filter-surface {
  display: grid;
  min-width: 0;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
}
.library-filters {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  align-items: end;
  gap: 0.65rem;
}
.library-filters label { display: grid; min-width: 0; gap: 0.3rem; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
/* History filters: keep the paired category selectors and action buttons on
   dedicated rows so controls never collide at desktop/intermediate widths. */
.history-filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.history-filters .category-filter-pair {
  grid-column: 1 / -1;
  width: min(100%, 34rem);
  min-width: 0;
}
.history-filters .filter-actions {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.equipment-browser { overflow: hidden; box-shadow: none; }
.equipment-list, .library-list { display: grid; min-width: 0; }
.equipment-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(8rem, auto);
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.equipment-list-row:last-child, .library-row:last-child { border-bottom: 0; }
.equipment-list-main { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 0.15rem 0.65rem; }
.equipment-list-main .eyebrow, .equipment-list-main p { grid-column: 1 / -1; }
.equipment-list-main h2 { min-width: 0; margin: 0; font-size: 1.0625rem; font-weight: 600; overflow-wrap: anywhere; }
.equipment-list-main code { color: var(--muted); font-size: 0.8125rem; }
.equipment-list-main p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.875rem; }
.equipment-list-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 0.65rem; }
.equipment-list-actions > span { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equipment-state { border: 1px solid transparent; font-weight: 650; }
.equipment-state.state-available { border-color: #bfe6cf; background: #e9f6ef; color: #1c6846; }
.equipment-state.state-fix { border-color: #f1c4d0; background: #fcebee; color: #963147; }
.equipment-state.state-maintain { border-color: #f0d5a7; background: #fff3df; color: #815213; }
.equipment-state.state-inactive { border-color: #d9d6df; background: #eeedf1; color: #625e69; }
.library-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.library-row-main { display: grid; min-width: 0; gap: 0.15rem; }
.library-row-main > * { min-width: 0; overflow-wrap: anywhere; }
.library-row-main p { margin: 0.25rem 0; }
.history-row { align-items: flex-start; }
.storage-summary { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.storage-filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.storage-row .management-row-main { display: grid; flex: 1; gap: 0.12rem; }
.agenda-event { --event-accent: #8766de; border-left: 0.25rem solid var(--event-accent); padding-left: 0.75rem; }
.calendar-day.range-selected { background: #e7f5ef; box-shadow: none; }
.calendar-general-event {
  --event-accent: #4d7567;
  --event-fill: #edf5f1;
  border-left-color: var(--event-accent);
  background: var(--event-fill);
}
.range-actions {
  position: fixed;
  right: clamp(0.75rem, 2vw, 2rem);
  bottom: clamp(0.75rem, 2vw, 2rem);
  z-index: 35;
  display: flex;
  max-width: calc(100vw - 1.5rem);
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: none;
}
.range-actions[hidden] { display: none; }
.range-actions strong { min-width: 0; overflow-wrap: anywhere; }

/* Dedicated authenticated 14-day wall display. */
.display-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #f8f7fc;
}
.display-header {
  display: grid;
  grid-template-columns: auto minmax(20rem, 1fr) auto;
  align-items: center;
  gap: clamp(0.75rem, 1.4vw, 1.5rem);
  min-width: 0;
  padding: clamp(0.65rem, 1.2vh, 1rem) clamp(0.85rem, 1.6vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.display-identity { display: flex; min-width: 0; align-items: center; gap: 0.75rem; }
.display-logo { width: clamp(2.5rem, 5vh, 3.5rem); height: clamp(2.5rem, 5vh, 3.5rem); object-fit: contain; }
.display-identity h1 { margin: 0; font-size: clamp(1.75rem, 3vh, 2.125rem); font-weight: 600; white-space: nowrap; }
.display-filters { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 0.5rem; }
.display-filters label { min-width: 0; }
.display-filters .input { width: clamp(10rem, 14vw, 18rem); }
.display-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.display-clock { margin-right: 0.35rem; font-size: clamp(2.125rem, 4vh, 2.75rem); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.display-board {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  min-width: 0;
  min-height: 0;
  gap: clamp(0.45rem, 0.8vh, 0.75rem);
  padding: clamp(0.55rem, 1vh, 0.9rem) clamp(0.55rem, 1vw, 1rem);
}
.display-week { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; }
.display-weekdays, .display-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; }
.display-weekdays > div { padding: clamp(0.3rem, 0.7vh, 0.55rem) 0.2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: clamp(1.125rem, 2vh, 1.375rem); font-weight: 600; text-align: center; }
.display-weekdays > div:last-child { border-right: 0; }
.display-days { min-height: 0; }
.display-day { container-type: inline-size; min-width: 0; min-height: 0; overflow: hidden; padding: clamp(0.35rem, 0.7vh, 0.65rem); border-right: 1px solid var(--line); background: #fff; }
.display-day:last-child { border-right: 0; }
.display-day.today { background: #f0ebfc; }
.display-day-number { display: block; min-height: 1.2em; margin-bottom: clamp(0.25rem, 0.5vh, 0.45rem); color: #292635; font-size: clamp(1.5rem, 2.7vh, 1.875rem); font-weight: 600; line-height: 1.05; }
.display-day.today .display-day-number { color: #6547cb; }
.display-events { display: grid; min-width: 0; gap: clamp(0.25rem, 0.55vh, 0.45rem); }
.display-event {
  --event-accent: #8766de;
  --event-fill: #eee9fb;
  display: grid;
  min-width: 0;
  gap: 0.08rem;
  overflow: hidden;
  padding: clamp(0.35rem, 0.65vh, 0.55rem) clamp(0.45rem, 0.55vw, 0.75rem);
  border-left: clamp(0.2rem, 0.3vw, 0.3rem) solid var(--event-accent);
  border-radius: 0.375rem;
  background: var(--event-fill);
  color: #20202a;
  font-size: clamp(0.9375rem, 1.7vh, 1.125rem);
  line-height: 1.2;
}
.display-event strong, .display-event span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.display-event strong { font-size: clamp(1rem, 1.85vh, 1.25rem); font-weight: 600; }
.display-event .event-owner { color: #4f4b5d; font-weight: 500; }
.display-event.continues-before { margin-left: calc(-1 * clamp(0.35rem, 0.7vh, 0.65rem)); padding-left: 0.55rem; border-left: 0; border-radius: 0 0.375rem 0.375rem 0; }
.display-event.continues-after { margin-right: calc(-1 * clamp(0.35rem, 0.7vh, 0.65rem)); border-radius: 0.375rem 0 0 0.375rem; }
.display-event.continues-before.continues-after { border-radius: 0; }
.display-events > .display-event:nth-of-type(n + 5) { display: none; }
.display-more { color: #6547cb; font-size: clamp(0.875rem, 1.5vh, 1rem); font-weight: 650; }

@container (min-width: 16rem) {
  .display-event .event-summary-compact { display: none; }
  .display-event .event-summary-wide { display: block; }
}
@container (min-width: 25rem) {
  .display-event .event-summary-wide { display: none; }
  .display-event .event-summary-full { display: block; }
}

.palette-lavender { --event-accent: #8766de; --event-fill: #eee9fb; }
.palette-blue { --event-accent: #4688e8; --event-fill: #eaf2fd; }
.palette-cyan { --event-accent: #42a9bc; --event-fill: #e8f7f9; }
.palette-mint { --event-accent: #4db786; --event-fill: #e9f6ef; }
.palette-rose { --event-accent: #df6aa5; --event-fill: #fbeaf3; }
.palette-amber { --event-accent: #e9a43b; --event-fill: #fff3df; }
.palette-lilac { --event-accent: #a271d8; --event-fill: #f3eafb; }
.palette-sky { --event-accent: #619bcf; --event-fill: #eaf4fc; }
.palette-teal { --event-accent: #3f9f9a; --event-fill: #e8f6f5; }
.palette-sage { --event-accent: #7aa46f; --event-fill: #eef6eb; }
.palette-peach { --event-accent: #d88d62; --event-fill: #fcefe7; }
.palette-coral { --event-accent: #d66f71; --event-fill: #fbeaec; }
.palette-plum { --event-accent: #a8689b; --event-fill: #f5eaf3; }
.palette-aqua { --event-accent: #5aa6a9; --event-fill: #eaf6f7; }
.palette-olive { --event-accent: #9b9a55; --event-fill: #f5f4e6; }
.palette-sand { --event-accent: #b18a61; --event-fill: #f7efe6; }

.booking-warning-panel { padding: 0.8rem 0.9rem; border: 1px solid #efd8ae; border-radius: 0.5rem; background: #fff9ed; color: #5f4523; }
.booking-warning-panel strong { display: block; margin-bottom: 0.35rem; color: #754b17; }
.booking-warning-panel ul { margin: 0 0 0.35rem; padding-left: 1.2rem; }
.booking-warning-panel li + li { margin-top: 0.2rem; }
.booking-warning-panel .form-help { margin: 0; color: #795c37; }
.toggle-field { align-content: start; }
.toggle-control { display: flex; min-height: 2.75rem; align-items: center; gap: 0.55rem; padding: 0.55rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 0.5rem; background: var(--panel-soft); font-weight: 500; }
.toggle-control input { width: 1.1rem; height: 1.1rem; }
.equipment-status-stack { display: grid; justify-items: start; gap: 0.35rem; }
.equipment-list-actions form { margin: 0; }
.reservation-color-fieldset { min-width: 0; }
.reservation-color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.5rem; }
.reservation-color-choice { --event-accent: #8766de; --event-fill: #eee9fb; display: grid !important; grid-template-columns: auto 1.4rem minmax(0, 1fr); align-items: center; gap: 0.5rem !important; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; font-weight: 550 !important; }
.reservation-color-choice:has(input:checked) { border-color: var(--event-accent); background: var(--event-fill); box-shadow: none; }
.reservation-color-swatch { width: 1.25rem; height: 1.25rem; border: 2px solid var(--event-accent); border-radius: 50%; background: var(--event-fill); }

@media (max-width: 74.99rem) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: grid; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(20rem, calc(100vw - 3rem));
    height: 100dvh;
    padding: 1rem 0.75rem;
    transform: translateX(-102%);
    transition: transform 180ms ease;
    box-shadow: none;
  }
  .sidebar-heading { display: flex; min-height: 2.75rem; align-items: center; justify-content: space-between; padding: 0 0.4rem 0.8rem 0.75rem; color: var(--text); }
  .nav-close { display: grid; border-color: var(--line); background: transparent; color: var(--text); font-size: 1.5rem; }
  .nav-backdrop { position: fixed; inset: 0; z-index: 40; width: 100%; height: 100%; border: 0; background: rgba(25, 25, 32, 0.45); }
  .nav-open { overflow: hidden; }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-open .nav-backdrop { display: block; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .side-stack { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
  .equipment-detail-layout, .management-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 63.99rem) {
  .display-header { grid-template-columns: minmax(0, 1fr) auto; }
  .display-filters { grid-column: 1 / -1; grid-row: 2; }
  .display-filters label { flex: 1; }
  .display-filters .input { width: 100%; }
}

@media (max-width: 47.99rem) {
  .topbar { padding-inline: 0.65rem; }
  .brand img { width: 2.8rem; height: 2.8rem; }
  .topbar-user { max-width: 46%; }
  .content { padding: 0.75rem 0.65rem 5.5rem; }
  .page-heading { align-items: flex-start; }
  .dashboard-heading .dashboard-reserve { display: none; }
  h1 { font-size: 1.5rem; }
  .calendar-toolbar { grid-template-columns: minmax(0, 1fr); padding: 0.7rem; }
  .month-nav { justify-content: center; }
  .month-nav h2 { flex: 1; max-width: 12rem; }
  .filters { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; justify-content: stretch; }
  .filters .input { grid-column: 1 / -1; width: 100%; }
  .filters .button { min-width: 4.5rem; }
  .calendar-weekdays > div { padding: 0.45rem 0.05rem; }
  .calendar-body { grid-auto-rows: 4.25rem; }
  .calendar.next-two-weeks .calendar-body { grid-auto-rows: 4.75rem; }
  .calendar-day { align-items: center; padding: 0.15rem; }
  .calendar-day.outside { opacity: 0.58; }
  .calendar-day.selected:not(.today) { background: var(--accent-soft); box-shadow: none; }
  .calendar-day.today { background: #f0ebfc; box-shadow: none; }
  .calendar-day.range-selected { background: #e7f5ef; box-shadow: none; }
  .day-number { width: min(100%, 2.65rem); height: 2.5rem; flex-basis: 2.5rem; }
  .events { display: none; }
  .day-occupancy { display: flex; min-height: 1rem; align-items: center; justify-content: center; gap: 0.22rem; color: var(--accent-strong); font-size: 0.7rem; font-weight: 700; }
  .occupancy-dot { width: 0.38rem; height: 0.38rem; border-radius: 50%; background: var(--accent); }
  .mobile-day-agenda { display: block; padding: 0.9rem; border-top: 1px solid var(--line); }
  .day-agenda-panel[hidden] { display: none; }
  .day-agenda-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
  .day-agenda-heading h2 { margin: 0.1rem 0 0; }
  .agenda-event { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .agenda-equipment { grid-column: 1 / -1; }
  .agenda-detail { grid-column: 2; grid-row: 1; }
  .mobile-reserve-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 25;
    display: flex;
    justify-content: center;
    padding: 0.65rem max(0.75rem, env(safe-area-inset-right)) calc(0.65rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: #ffffff;
    backdrop-filter: none;
  }
  .mobile-reserve-bar .button { width: min(100%, 32rem); }
  .range-actions { right: 0.65rem; bottom: 5.25rem; left: 0.65rem; flex-wrap: wrap; justify-content: center; }
  .range-actions strong { flex: 1 0 100%; text-align: center; }
  .side-stack { grid-template-columns: minmax(0, 1fr); }
  .reservation-dialog, .day-agenda-dialog {
    inset: auto 0 0;
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 0.75rem);
    margin: auto auto 0;
    border-radius: 0.75rem 0.75rem 0 0;
  }
  .reservation-dialog form { padding: 1rem; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .equipment-checks ul { grid-template-columns: minmax(0, 1fr); }
  .dialog-actions, .form-actions { position: sticky; bottom: 0; padding-top: 0.6rem; background: var(--panel); }
  .dialog-actions .button, .form-actions .button { flex: 1 1 8rem; }
  .table-card { overflow: hidden; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tr { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .data-table td { display: grid; grid-template-columns: minmax(4.5rem, 6rem) minmax(0, 1fr); gap: 0.75rem; padding: 0.4rem 0.85rem; border: 0; }
  .data-table td::before { color: var(--muted); font-size: 0.75rem; font-weight: 700; content: attr(data-label); }
  .data-table .empty { display: block; padding: 1.5rem; }
  .data-table .empty::before { content: none; }
  .detail-list > div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .equipment-grid, .preset-grid { grid-template-columns: minmax(0, 1fr); }
  .reservation-filters { grid-template-columns: minmax(0, 1fr); }
  .storage-filters { grid-template-columns: minmax(0, 1fr); }
  .filter-actions .button { flex: 1; }
  .history-filters .filter-actions { width: 100%; justify-content: stretch; }
  .reservation-record { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .bulk-cancel-form .reservation-record { grid-template-columns: auto minmax(0, 1fr); }
  .bulk-cancel-form .reservation-record > .button { grid-column: 1 / -1; }
  .reservation-record > .button { width: 100%; }
  .reservation-record-heading { flex-wrap: wrap; }
  .management-row, .manual-row { align-items: stretch; flex-direction: column; }
  .equipment-list-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .equipment-list-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .library-row { align-items: stretch; flex-direction: column; }
  .row-actions { width: 100%; justify-content: stretch; }
  .row-actions > *, .row-actions .button { flex: 1; }
  .page-actions { width: 100%; justify-content: stretch; }
  .page-actions .button { flex: 1; }
  .bulk-action-bar, .confirmation-action { align-items: stretch; flex-direction: column; }
  .bulk-action-bar .button, .confirmation-action .button { width: 100%; }
  .display-header { grid-template-columns: minmax(0, 1fr); }
  .display-identity, .display-actions { justify-content: space-between; }
  .display-actions { grid-row: 2; }
  .display-filters { grid-row: 3; }
  .display-logo { width: 2.5rem; height: 2.5rem; }
  .display-identity h1 { font-size: 1.5rem; }
  .display-clock { font-size: 2rem; }
}

@media (max-width: 34.99rem) {
  .user-name { display: none; }
  .page-heading { flex-wrap: wrap; }
  .page-heading > .button { width: 100%; }
  .card-actions { justify-content: stretch; }
  .card-actions > * { flex: 1 1 8rem; }
  .card-actions .button { width: 100%; }
  .agenda-event { grid-template-columns: minmax(0, 1fr); }
  .agenda-detail { grid-column: 1; grid-row: auto; width: 100%; }
  .equipment-list-row { grid-template-columns: minmax(0, 1fr); }
  .equipment-list-row > .status { justify-self: start; }
  .display-exit { padding-inline: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* Shared announcements */
.announcement-section { margin: 0 0 1rem; }
.announcement-list { display: grid; gap: 0.55rem; }
.announcement-item {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-left: 4px solid #b8add8;
  border-radius: 0.7rem;
  background: var(--panel);
}
.announcement-item.important { border-left-color: #d85da4; background: #fff8fc; }
.announcement-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; }
.announcement-title-row .small { margin-left: auto; }
.announcement-item p { margin: 0.35rem 0 0; }
.status.important { background: #fbeaf5; color: #8f2f69; border-color: #efc9df; }

/* User-editable shared Storage */
.storage-upload-disclosure { position: relative; }
.storage-upload-disclosure > summary { list-style: none; cursor: pointer; }
.storage-upload-disclosure > summary::-webkit-details-marker { display: none; }
.storage-upload-form {
  position: absolute;
  z-index: 12;
  right: 0;
  top: calc(100% + 0.5rem);
  width: min(32rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--panel);
  box-shadow: none;
}
.status.private { background: #f1eef7; color: #5e566d; border-color: #ded8e8; }
.storage-row .storage-filename { overflow-wrap: anywhere; }

@media (max-width: 47.99rem) {
  .storage-upload-disclosure { width: 100%; }
  .storage-upload-disclosure > summary { width: 100%; text-align: center; }
  .storage-upload-form { position: static; width: 100%; margin-top: 0.6rem; box-shadow: none; }
  .announcement-title-row .small { width: 100%; margin-left: 0; }
}

/* 2026-08-12 UI/UX consolidation: compact filters and Google-like calendar interaction. */
.category-filter-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(10.5rem, 1fr));
  gap: 0.45rem;
  min-width: min(100%, 21.5rem);
}
.filter-field { display: grid; min-width: 0; gap: 0.3rem; }
.filter-label { color: var(--muted); font-size: 0.72rem; font-weight: 700; line-height: 1; }
.multi-select { position: relative; min-width: 0; }
.multi-select > summary { list-style: none; cursor: pointer; }
.multi-select > summary::-webkit-details-marker { display: none; }
.multi-select-summary {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  padding-right: 2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-select-summary::after {
  content: "⌄";
  position: absolute;
  right: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.multi-select[open] .multi-select-summary { border-color: #bdb2df; box-shadow: none; }
.multi-select-popover {
  position: absolute;
  z-index: 45;
  top: calc(100% + 0.35rem);
  left: 0;
  width: max(100%, 15rem);
  max-width: min(24rem, calc(100vw - 2rem));
  max-height: min(22rem, 55vh);
  padding: 0.45rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  box-shadow: none;
}
.multi-select-options { display: grid; gap: 0.15rem; }
.multi-select-option {
  display: flex !important;
  min-height: 2.2rem;
  align-items: center;
  gap: 0.55rem !important;
  padding: 0.42rem 0.5rem;
  border-radius: 0.45rem;
  font-size: 0.84rem !important;
  font-weight: 550 !important;
  cursor: pointer;
}
.multi-select-option:hover { background: var(--accent-soft); }
.multi-select-option input { width: 1rem; height: 1rem; flex: 0 0 auto; }
.multi-select-option.none-option { border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.filters .category-filter-pair { flex: 1 1 22rem; max-width: 30rem; }
.filters .filter-label, .display-filters .filter-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.display-filters .category-filter-pair { width: min(34vw, 28rem); min-width: 20rem; }
.display-filters .multi-select-summary { width: 100%; }

/* Reservation equipment chooser: collapsed until the user asks for it. */
.equipment-picker .multi-select-popover { position: static; width: 100%; max-width: none; margin-top: 0.35rem; box-shadow: none; }
.equipment-picker:not([open]) .multi-select-popover { display: none; }
.equipment-picker .equipment-checks { max-height: 15rem; overflow: auto; padding: 0.1rem; }
.equipment-picker .equipment-checks ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.2rem 0.55rem; margin: 0; padding: 0; list-style: none; }
.equipment-picker .equipment-checks label { display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem; border-radius: 0.4rem; font-weight: 550; }
.equipment-picker .equipment-checks label:hover { background: var(--accent-soft); }

/* Continuous weekly event lanes. */
.calendar-body { display: block; }
.calendar-week-row {
  position: relative;
  display: grid;
  min-height: clamp(7.4rem, calc((100dvh - 16rem) / 6), 12rem);
  overflow: hidden;
}
.calendar.next-two-weeks .calendar-week-row { min-height: clamp(12rem, calc((100dvh - 16rem) / 2), 28rem); }
.calendar-week-days,
.calendar-week-events {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
}
.calendar-week-days { z-index: 0; }
.calendar-week-events {
  z-index: 2;
  grid-template-rows: repeat(3, minmax(1.45rem, auto));
  align-content: start;
  gap: 0.2rem 0;
  padding: 3.05rem 0.28rem 0.35rem;
  pointer-events: none;
}
.calendar-day { min-height: 100%; padding: 0.3rem; }
.calendar-week-row .calendar-day:nth-child(7) { border-right: 0; }
.calendar-segment {
  display: flex;
  height: 1.55rem;
  min-width: 0;
  align-items: center;
  gap: 0.42rem;
  margin: 0 0.12rem;
  padding: 0.18rem 0.5rem;
  pointer-events: auto;
  white-space: nowrap;
}
.calendar-segment strong { flex: 0 1 auto; font-size: 0.79rem; }
.calendar-segment .event-owner { flex: 0 1 auto; font-size: 0.74rem; }
.calendar-segment.segment-continues-before { margin-left: -0.28rem; border-left: 0; border-radius: 0 0.375rem 0.375rem 0; }
.calendar-segment.segment-continues-after { margin-right: -0.28rem; border-radius: 0.375rem 0 0 0.375rem; }
.calendar-segment.segment-continues-before.segment-continues-after { border-radius: 0; }
.calendar-more { position: absolute; left: 0.35rem; bottom: 0.15rem; z-index: 4; max-width: calc(100% - 0.7rem); }
.calendar-day { position: relative; }
.calendar-day.holiday .day-number { color: #c94152; }
.calendar-day.outside.holiday .day-number { color: #c58b92; }
.calendar-day.today.holiday .day-number { color: #c94152; }

/* TV uses the same weekly lane model while keeping the current visual theme. */
.display-week-body { position: relative; display: grid; min-width: 0; min-height: 0; }
.display-week-body > .display-days,
.display-week-events { grid-area: 1 / 1; }
.display-week-events {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(1.8rem, auto));
  align-content: start;
  gap: clamp(0.18rem, 0.35vh, 0.32rem) 0;
  min-width: 0;
  padding: clamp(2.5rem, 5vh, 3.3rem) clamp(0.3rem, 0.5vw, 0.55rem) 0.4rem;
  pointer-events: none;
}
.display-segment {
  display: flex;
  height: clamp(1.8rem, 3.5vh, 2.5rem);
  align-items: center;
  gap: 0.55rem;
  margin: 0 0.12rem;
  pointer-events: auto;
}
.display-segment.segment-continues-before { margin-left: -0.42rem; border-left: 0; border-radius: 0 0.375rem 0.375rem 0; }
.display-segment.segment-continues-after { margin-right: -0.42rem; border-radius: 0.375rem 0 0 0.375rem; }
.display-segment.segment-continues-before.segment-continues-after { border-radius: 0; }
.display-day.holiday .display-day-number { color: #c94152; }
.display-day.today.holiday .display-day-number { color: #c94152; }
.display-day .display-more { position: absolute; left: 0.55rem; bottom: 0.35rem; }
.display-day { position: relative; }

/* Compact dashboard announcements in the previously unused sidebar area. */
.announcement-add { width: 2rem; height: 2rem; min-height: 2rem; font-size: 1.15rem; }
.compact-announcement-list { display: grid; gap: 0; margin-top: 0.45rem; }
.compact-announcement { padding: 0.65rem 0; border-top: 1px solid var(--line-soft); }
.compact-announcement:first-child { border-top: 0; }
.compact-announcement > div { display: flex; min-width: 0; align-items: center; gap: 0.35rem; }
.compact-announcement strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; }
.compact-announcement p { display: -webkit-box; margin: 0.25rem 0; overflow: hidden; color: #575264; font-size: 0.78rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.compact-announcement.important strong { color: #8f2f69; }
.announcement-dialog form { padding: 1.25rem; }

/* Storage is a normal filter surface, not a collection of mismatched metric cards. */
.storage-usage { display: grid; gap: 0.65rem; margin-bottom: 1rem; padding: 0.9rem 1rem; box-shadow: none; }
.storage-usage-heading, .storage-usage-foot { display: flex; min-width: 0; align-items: end; justify-content: space-between; gap: 1rem; }
.storage-usage-heading > div { display: grid; gap: 0.05rem; }
.storage-usage-heading strong { font-size: 1rem; }
.storage-usage-track { height: 0.55rem; overflow: hidden; border-radius: 99rem; background: #ece9f3; }
.storage-usage-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9b84e8, #8566e8); }
.storage-usage-foot { color: var(--muted); font-size: 0.74rem; }
.storage-runtime-status{display:inline-flex;align-items:center;gap:.4rem;color:var(--muted);font-size:.76rem;font-weight:750}
.storage-runtime-dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--muted)}
.storage-runtime-status.online .storage-runtime-dot{background:#4f9d72}
.storage-runtime-status.offline{color:#a34242}.storage-runtime-status.offline .storage-runtime-dot{background:#b64f4f}
.storage-runtime-warning{display:flex;flex-wrap:wrap;gap:.45rem .7rem;align-items:center;padding:.65rem .75rem;border:1px solid #d8a3a3;border-radius:.45rem;background:#fff8f8;color:#7d3030;font-size:.78rem}
.storage-filters { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); align-items: end; }
.storage-filters .category-filter-pair { grid-column: span 2; }
.library-filters .category-filter-pair, .filter-panel .category-filter-pair { align-self: end; }
.admin-edit-note { display: grid; gap: 0.15rem; padding: 0.75rem; border-left: 3px solid #8566e8; background: #f7f4ff; }
.admin-edit-note span { color: var(--muted); font-size: 0.82rem; }

@media (max-width: 61.99rem) {
  .filters .category-filter-pair { max-width: none; }
  .display-filters .category-filter-pair { min-width: 17rem; }
}

@media (max-width: 47.99rem) {
  .category-filter-pair { grid-template-columns: minmax(0, 1fr); min-width: 0; width: 100%; }
  .filters .category-filter-pair, .storage-filters .category-filter-pair { grid-column: 1 / -1; }
  .multi-select-popover { width: 100%; }
  .storage-usage-heading, .storage-usage-foot { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .calendar-week-row { min-height: 4.25rem; }
  .calendar.next-two-weeks .calendar-week-row { min-height: 4.75rem; }
  .calendar-week-events { display: none; }
  .calendar-week-days { min-height: inherit; }
  .calendar-week-row .calendar-day { min-height: inherit; align-items: center; padding: 0.15rem; }
  .calendar-more { display: none; }
}


/* Per-device display preferences from My Profile. */
.calendar .event, .calendar .day-number, .calendar .calendar-weekdays > div, .calendar .more-events {
  font-size: calc(1em * var(--calendar-font-scale));
}
body[data-display-mode] { font-size: calc(1rem * var(--font-scale)); }

/* --------------------------------------------------------------------------
   QuPID shared web/app calendar refresh — 2026-08-14
   -------------------------------------------------------------------------- */

/* Stronger, larger reservation palette. The left rail is the primary cue. */
.palette-lavender { --event-accent: #7c3aed; --event-fill: #f3e8ff; }
.palette-blue { --event-accent: #2563eb; --event-fill: #eff6ff; }
.palette-cyan { --event-accent: #0891b2; --event-fill: #ecfeff; }
.palette-mint { --event-accent: #059669; --event-fill: #ecfdf5; }
.palette-rose { --event-accent: #e11d48; --event-fill: #fff1f2; }
.palette-amber { --event-accent: #d97706; --event-fill: #fffbeb; }
.palette-lilac { --event-accent: #9333ea; --event-fill: #faf5ff; }
.palette-sky { --event-accent: #0284c7; --event-fill: #f0f9ff; }
.palette-teal { --event-accent: #0f766e; --event-fill: #f0fdfa; }
.palette-sage { --event-accent: #4d7c0f; --event-fill: #f7fee7; }
.palette-peach { --event-accent: #ea580c; --event-fill: #fff7ed; }
.palette-coral { --event-accent: #dc2626; --event-fill: #fef2f2; }
.palette-plum { --event-accent: #a21caf; --event-fill: #fdf4ff; }
.palette-aqua { --event-accent: #0d9488; --event-fill: #f0fdfa; }
.palette-olive { --event-accent: #65a30d; --event-fill: #f7fee7; }
.palette-sand { --event-accent: #a16207; --event-fill: #fffbeb; }
.palette-indigo { --event-accent: #4f46e5; --event-fill: #eef2ff; }
.palette-cobalt { --event-accent: #1d4ed8; --event-fill: #eff6ff; }
.palette-azure { --event-accent: #0369a1; --event-fill: #f0f9ff; }
.palette-emerald { --event-accent: #047857; --event-fill: #ecfdf5; }
.palette-lime { --event-accent: #84a900; --event-fill: #f7fee7; }
.palette-magenta { --event-accent: #db2777; --event-fill: #fdf2f8; }
.palette-crimson { --event-accent: #be123c; --event-fill: #fff1f2; }
.palette-orange { --event-accent: #c2410c; --event-fill: #fff7ed; }
.palette-gold { --event-accent: #ca8a04; --event-fill: #fefce8; }
.palette-violet { --event-accent: #6d28d9; --event-fill: #f5f3ff; }
.palette-turquoise { --event-accent: #14b8a6; --event-fill: #ecfeff; }
.palette-slate { --event-accent: #475569; --event-fill: #f8fafc; }
.palette-coffee { --event-accent: #92400e; --event-fill: #fff7ed; }
.palette-orchid { --event-accent: #c026d3; --event-fill: #fdf4ff; }
.palette-marine { --event-accent: #075985; --event-fill: #f0f9ff; }
.palette-moss { --event-accent: #3f6212; --event-fill: #f7fee7; }
.calendar-general-event { --event-accent: #64748b; --event-fill: #f1f5f9; }

.event,
.calendar-segment,
.agenda-event,
.mobile-cell-event,
.tv-event {
  border-left: 0.34rem solid var(--event-accent, #7c3aed);
  background: var(--event-fill, #f3e8ff);
}
.calendar-segment.segment-continues-before,
.tv-event.segment-continues-before { border-left: 0.34rem solid var(--event-accent, #7c3aed); }
.overflow-hidden { display: none !important; }

/* Calendar event bars use the same single-line title form as Google Calendar. */
.calendar-week-events {
  grid-template-rows: none;
  grid-auto-rows: 1.95rem;
  padding-top: 2.7rem;
}
.calendar-segment {
  display: flex;
  height: 1.84rem;
  min-width: 0;
  align-items: center;
  padding: 0.18rem 0.48rem;
  line-height: 1.08;
}
.calendar-segment strong {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  font-size: 0.79rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-more {
  min-height: 1rem;
  padding: 0.05rem 0.22rem;
  color: #4f46e5;
  font-size: 0.68rem;
  line-height: 1;
}
.mobile-cell-events { display: none; }

/* More saturated dates for information that is meant to stand out. */
.calendar-day.holiday .day-number,
.calendar-day.today.holiday .day-number { color: #d60000; }
.calendar-day.outside.holiday .day-number { color: #b91c1c; }
.calendar-day.today:not(.holiday) {
  background: #eef2ff;
  box-shadow: none;
}
.calendar-day.today:not(.holiday) .day-number { color: #4338ca; }

/* Native Android shell: card-based equipment selection, browser UI unchanged. */
html.qupid-native-app .native-equipment-cards > .multi-select-summary { display: none !important; }
html.qupid-native-app .native-equipment-cards .equipment-picker-popover {
  display: block !important;
  position: static;
  width: 100%;
  max-width: none;
  max-height: min(46vh, 30rem);
  margin: 0;
  padding: 0.2rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}
html.qupid-native-app .native-equipment-cards .equipment-checks ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
}
html.qupid-native-app .equipment-card-option {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 4.2rem;
  align-items: center;
  gap: 0.6rem !important;
  padding: 0.75rem 0.8rem !important;
  border: 1px solid #d9d7e2;
  border-radius: 0.8rem !important;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
}
html.qupid-native-app .equipment-card-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
html.qupid-native-app .equipment-card-option.is-selected {
  border-color: #6366f1;
  background: #f5f3ff;
  box-shadow: none;
}
.equipment-card-copy { display: grid; min-width: 0; gap: 0.1rem; }
.equipment-card-copy strong { overflow: hidden; color: #1f2937; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.equipment-card-copy small { color: #6b7280; font-size: 0.74rem; }
.equipment-card-state { margin-top: 0.15rem; color: #b42318; font-size: 0.72rem; font-weight: 750; }
.equipment-card-check {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border: 2px solid #cbc7d7;
  border-radius: 50%;
  color: transparent;
  font-weight: 900;
}
.equipment-card-option.is-selected .equipment-card-check { border-color: #4f46e5; background: #4f46e5; color: #fff; }

/* --------------------------------------------------------------------------
   QuPID unified calendar / mobile / TV layout — rebuilt 2026-08-15
   One reservation is one time-span bar. Mobile never falls back to per-day cards.
   -------------------------------------------------------------------------- */

.calendar-day[data-calendar-cell] { cursor: pointer; user-select: none; -webkit-user-select: none; }
.calendar-day[data-calendar-cell]:focus-visible { position: relative; z-index: 6; outline: 0; box-shadow: none; }
.calendar-segment { cursor: pointer; }
.overflow-hidden { display: none !important; }

/* System UI safe area. The sticky header itself stops below the status bar. */
:root {
  --qupid-safe-top: env(safe-area-inset-top, 0px);
  --qupid-safe-right: env(safe-area-inset-right, 0px);
  --qupid-safe-bottom: env(safe-area-inset-bottom, 0px);
  --qupid-safe-left: env(safe-area-inset-left, 0px);
}
html.qupid-native-app {
  --qupid-safe-top: max(env(safe-area-inset-top, 0px), 28px);
  --qupid-safe-right: max(env(safe-area-inset-right, 0px), 0px);
  --qupid-safe-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
  --qupid-safe-left: max(env(safe-area-inset-left, 0px), 0px);
}

/* Storage uses the same visual/touch scale as the rest of the application. */
.storage-usage {
  min-height: 6.25rem;
  gap: 0.85rem;
  padding: 1.2rem 1.25rem;
  border-radius: 0.5rem;
}
.storage-usage-heading strong { font-size: 1.125rem; }
.storage-usage-track { height: 0.75rem; }
.storage-usage-foot { font-size: 0.8125rem; }
.storage-filters {
  gap: 1rem;
  padding: 1.15rem 1.2rem;
}
.storage-filters label { gap: 0.45rem; font-size: 0.875rem; }
.storage-filters .input,
.storage-filters .multi-select-summary { min-height: 2.75rem; }
.storage-row { padding-block: 0.95rem; }

/* Mobile dashboard: calendar is primary and uses the SAME weekly span layer as desktop. */
@media (max-width: 47.99rem) {
  body {
    padding-top: var(--qupid-safe-top);
    padding-right: var(--qupid-safe-right);
    padding-left: var(--qupid-safe-left);
  }
  /* Opaque system-status zone: web content can never be visible behind time/battery icons. */
  html::before {
    content: "";
    position: fixed;
    z-index: 10000;
    top: 0;
    right: 0;
    left: 0;
    height: var(--qupid-safe-top);
    background: #ffffff;
    pointer-events: none;
  }
  .topbar {
    top: var(--qupid-safe-top);
    padding-inline: max(0.65rem, var(--qupid-safe-left)) max(0.65rem, var(--qupid-safe-right));
  }
  .sidebar {
    top: var(--qupid-safe-top);
    bottom: var(--qupid-safe-bottom);
    height: auto;
    padding-top: 1rem;
  }
  .dashboard-grid > .side-stack { display: none; }
  .calendar-card { border-radius: 0.65rem; }
  .calendar-week-row {
    min-height: clamp(8.4rem, 32vw, 10.5rem);
    overflow: hidden;
  }
  .calendar.next-two-weeks .calendar-week-row { min-height: clamp(10.5rem, 40vw, 13.5rem); }
  .calendar-week-days { min-height: inherit; }
  .calendar-week-row .calendar-day {
    align-items: stretch;
    min-height: inherit;
    padding: 0.12rem;
  }
  .day-number {
    position: relative;
    z-index: 3;
    width: 1.65rem;
    height: 1.55rem;
    flex: 0 0 1.55rem;
    align-self: flex-start;
    font-size: 0.8rem;
    line-height: 1;
  }
  .calendar-week-events {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 1.45rem;
    align-content: start;
    gap: 0.12rem 0;
    padding: 1.72rem 0.1rem 0.25rem;
    pointer-events: none;
  }
  .calendar-segment {
    display: grid;
    height: 1.4rem;
    min-width: 0;
    align-content: center;
    gap: 0;
    margin: 0 0.04rem;
    padding: 0.08rem 0.16rem 0.08rem 0.24rem;
    border-left-width: 0.22rem;
    border-radius: 0.22rem;
    line-height: 1.02;
    pointer-events: auto;
  }
  .calendar-segment strong,
  .calendar-segment .event-owner {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .calendar-segment strong { font-size: clamp(0.52rem, 2.1vw, 0.67rem); font-weight: 800; }
  .calendar-segment .event-owner { color: #374151; font-size: clamp(0.48rem, 1.9vw, 0.61rem); font-weight: 650; }
  .calendar-segment.segment-continues-before { margin-left: -0.1rem; border-left: 0; }
  .calendar-segment.segment-continues-after { margin-right: -0.1rem; }
  .calendar-more {
    display: block;
    position: absolute;
    top: 0.16rem;
    right: 0.18rem;
    bottom: auto;
    left: auto;
    z-index: 5;
    min-height: 0.95rem;
    margin: 0;
    padding: 0.02rem 0.16rem;
    background: rgba(255, 255, 255, 0.92);
    font-size: 0.58rem;
    line-height: 1;
  }
  .calendar-day[data-calendar-cell] { touch-action: pan-y; }
  .day-occupancy, .mobile-cell-events, .mobile-day-agenda { display: none !important; }
  .calendar-day.outside { opacity: 0.5; }
  .calendar-day.selected:not(.today) { background: #f5f3ff; box-shadow: none; }
  .calendar-day.today:not(.holiday) { background: #eef2ff; box-shadow: none; }
  .mobile-reserve-bar {
    padding-right: max(0.75rem, var(--qupid-safe-right));
    padding-bottom: calc(0.65rem + var(--qupid-safe-bottom));
    padding-left: max(0.75rem, var(--qupid-safe-left));
  }
  .range-actions { bottom: calc(5.25rem + var(--qupid-safe-bottom)); }
  .storage-usage { min-height: 7rem; padding: 1.15rem; }
  .storage-filters { padding: 1rem; }
}

/* TV wallboard: exactly 14 days (7 x 2), one weekday header, one span bar per reservation. */
.tv-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #f8fafc;
}
.tv-overlay[hidden] { display: none !important; }
.tv-overlay > [data-tv-content] { width: 100%; height: 100%; min-width: 0; min-height: 0; }
body.tv-active { overflow: hidden; }
.tv-loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: #f8fafc;
  color: #475569;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  text-align: center;
}
.tv-loading[hidden] { display: none !important; }
.tv-display {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #f8fafc;
  color: #111827;
}
.tv-header {
  display: flex;
  min-height: clamp(3.6rem, 7vh, 5.5rem);
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.55rem clamp(1rem, 2vw, 2rem);
  border-bottom: 1px solid #cbd5e1;
  background: #fff;
}
.tv-header h1 { margin: 0; font-size: clamp(1.8rem, 3.1vh, 2.7rem); font-weight: 800; }
.tv-clock { font-size: clamp(2rem, 3.8vh, 3.2rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.tv-calendar {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.tv-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #fff;
}
.tv-weekdays > div {
  padding: clamp(0.35rem, 0.7vh, 0.6rem) 0.2rem;
  border-right: 1px solid #d7dce3;
  border-bottom: 1px solid #cbd5e1;
  color: #334155;
  font-size: clamp(1rem, 1.75vh, 1.45rem);
  font-weight: 800;
  text-align: center;
}
.tv-weekdays > div:first-child { color: #d60000; }
.tv-weekdays > div:last-child { border-right: 0; color: #1d4ed8; }
.tv-two-weeks {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}
.tv-week-row {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr); /* reset legacy 7-column outer grid */
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.tv-week-row > .tv-week-days,
.tv-week-row > .tv-week-events { grid-area: 1 / 1; }
.tv-week-days {
  z-index: 0;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.tv-day {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(0.28rem, 0.55vh, 0.5rem);
  border-right: 1px solid #d7dce3;
  border-bottom: 1px solid #d7dce3;
  background: #fff;
}
.tv-week-days .tv-day:last-child { border-right: 0; }
.tv-day.today { background: #eef2ff; box-shadow: none; }
.tv-day-number {
  position: relative;
  z-index: 3;
  display: inline-block;
  margin: 0;
  color: #111827;
  font-size: clamp(1.18rem, 2.15vh, 1.8rem);
  font-weight: 850;
  line-height: 1;
}
.tv-day.holiday .tv-day-number,
.tv-day.today.holiday .tv-day-number { color: #d60000; }
.tv-week-events {
  z-index: 2;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: none;
  /* Scale the lane itself with the reservation font. Large text therefore
     consumes more lanes instead of painting over the reservation below it. */
  grid-auto-rows: max(clamp(2.4rem, 4.8vh, 3.4rem), calc(2.05rem * var(--tv-scale)));
  align-content: start;
  gap: clamp(0.14rem, 0.28vh, 0.28rem) 0;
  padding: clamp(2.35rem, 4.8vh, 3.4rem) clamp(0.24rem, 0.4vw, 0.45rem) clamp(0.45rem, 0.8vh, 0.7rem);
  overflow: hidden;
  pointer-events: none;
}
.tv-segment {
  display: flex;
  width: auto;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  align-items: center;
  margin: 0 0.08rem;
  padding: clamp(0.2rem, 0.38vh, 0.34rem) clamp(0.38rem, 0.55vw, 0.7rem);
  border-left: clamp(0.3rem, 0.42vw, 0.46rem) solid var(--event-accent, #64748b);
  border-radius: 0.32rem;
  background: var(--event-fill, #f1f5f9);
  color: #111827;
  line-height: 1.05;
  overflow: hidden;
}
.tv-segment strong {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  font-size: clamp(calc(0.98rem * var(--tv-scale)), calc(1.8vh * var(--tv-scale)), calc(1.5rem * var(--tv-scale)));
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-segment.segment-continues-before { margin-left: -0.24rem; border-left: 0; border-radius: 0 0.32rem 0.32rem 0; }
.tv-segment.segment-continues-after { margin-right: -0.24rem; border-radius: 0.32rem 0 0 0.32rem; }
.tv-segment.segment-continues-before.segment-continues-after { border-radius: 0; }
.tv-more {
  position: absolute;
  top: clamp(0.3rem, 0.55vh, 0.55rem);
  right: clamp(0.35rem, 0.6vw, 0.65rem);
  bottom: auto;
  left: auto;
  z-index: 4;
  margin: 0;
  padding: 0.08rem 0.28rem;
  border-radius: 0.25rem;
  background: rgba(255,255,255,0.94);
  color: #4338ca;
  font-size: clamp(calc(0.78rem * var(--tv-scale)), calc(1.25vh * var(--tv-scale)), calc(1.05rem * var(--tv-scale)));
  font-weight: 900;
  line-height: 1.1;
}
.display-body {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #f8fafc;
}


/* Flat/minimal visual language: no elevation or shadow effects. */
.card, dialog, .sidebar, .topbar, .mobile-reserve-bar, .multi-select-popover, .storage-upload-form {
  box-shadow: none;
}
.calendar-day.selected:not(.today):not(.range-selected) {
  outline: 1px solid #8b5cf6;
  outline-offset: -1px;
}
.calendar-day.today:not(.holiday) {
  outline: 2px solid #4f46e5;
  outline-offset: -2px;
}
.calendar-day.range-selected {
  outline: 2px solid #2d8b67;
  outline-offset: -2px;
}
.reservation-color-choice:has(input:checked) {
  outline: 2px solid var(--event-accent);
  outline-offset: -2px;
}
.tv-day.today {
  outline: 2px solid #4f46e5;
  outline-offset: -2px;
}

/* V5: browser-fullscreen TV mode, Google visibility toggle, admin-only permission map. */
.permissions-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1rem; }
.permission-role-card { display: grid; gap: 0.8rem; padding: 1rem; }
.permission-role-heading h2 { margin: 0 0 0.25rem; }
.permission-role-heading p { margin: 0; }
.permission-capability-list { display: grid; }
.permission-capability-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.58rem 0; border-top: 1px solid var(--line); }
.permission-capability-list strong { font-size: 0.78rem; }
.permission-yes { color: #166534; }
.permission-no { color: #9f1239; }
.permission-scope { color: #4338ca; }
.permission-member-list { display: grid; }
.permission-member-row { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(9rem, auto) minmax(14rem, 1.5fr); align-items: center; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.permission-member-main, .permission-member-scope { display: grid; gap: 0.18rem; min-width: 0; }
.permission-member-role { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.permission-member-scope span { overflow-wrap: anywhere; }
@media (max-width: 850px) {
  .permissions-role-grid { grid-template-columns: 1fr; }
  .permission-member-row { grid-template-columns: 1fr; gap: 0.45rem; }
}



/* --------------------------------------------------------------------------
   V7 dashboard toolbar: one-row desktop controls + compact Google visibility switch.
   -------------------------------------------------------------------------- */
.google-event-switch {
  min-height: 2.75rem;
  padding: 0 0.2rem;
  white-space: nowrap;
  cursor: pointer;
}
.google-event-switch input {
  accent-color: #2563eb;
  cursor: pointer;
}
.google-event-switch span { font-weight: 600; }

@media (min-width: 64rem) {
  .calendar-toolbar {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.65rem;
  }
  .calendar-toolbar .filters {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .calendar-toolbar .filters .category-filter-pair {
    flex: 1 1 18rem;
    min-width: 16rem;
    max-width: 22rem;
    grid-template-columns: repeat(2, minmax(7.5rem, 1fr));
    gap: 0.35rem;
  }
  .calendar-toolbar .filters > select[name="equipment"] {
    flex: 0 1 11rem;
    width: 11rem;
    min-width: 8.5rem;
  }
  .calendar-toolbar .filters > .button,
  .calendar-toolbar .filters > .check-inline {
    flex: 0 0 auto;
  }
  .calendar-toolbar .month-nav { flex: 0 0 auto; }
}

@media (max-width: 63.99rem) and (min-width: 48rem) {
  .calendar-toolbar .filters .category-filter-pair {
    min-width: 18rem;
  }
}

/* Calendar bars use one-line event titles. Google-origin visibility remains source-specific. */
html.qupid-hide-google-events .calendar-google-event { display: none !important; }

/* Existing TeX launch control geometry is retained; RESERAVATION's mark below is the canonical brand reference. */
.tex-launch{width:3.15rem;height:3.15rem;margin-left:.65rem;padding:0}
@media(max-width:700px){.tex-launch{width:2.95rem;height:2.95rem}.tex-launch img{width:2.8rem!important;height:2.8rem!important}}

/* RESERAVATION canonical brand mark. The source SVG has a compact 100x100
   viewBox with more internal whitespace than the older TeX mark, so the
   optical size is normalized here instead of relying on intrinsic SVG size. */
:root {
  --reservation-brand-slot: 3.45rem;
  --reservation-brand-image: 3.45rem;
  --reservation-brand-y: -0.04rem;
}
.brand {
  width: var(--reservation-brand-slot);
  height: var(--reservation-brand-slot);
  justify-content: center;
  flex: 0 0 var(--reservation-brand-slot);
  overflow: visible;
}
.brand img {
  width: var(--reservation-brand-image) !important;
  height: var(--reservation-brand-image) !important;
  max-width: none;
  object-fit: contain;
  transform: translateY(var(--reservation-brand-y));
}
/* TeX launch icon intentionally keeps its current geometry in this release. */
.tex-launch img { width: 3rem !important; height: 3rem !important; object-fit: contain; }

.reservation-index-meta,
.equipment-picker-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.reservation-index-meta { margin: .3rem 0 .45rem; }
.reservation-category-chip,
.equipment-tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8f6fd;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.1;
}
.equipment-tag-chip { background: #f4f8fb; }
.equipment-picker-tools {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: .45rem;
  margin: -.25rem -.25rem .45rem;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
}
.equipment-picker-tools .input { flex: 1 1 10rem; min-width: 0; }
.equipment-checks label[hidden] { display: none !important; }
.derived-reservation-range { margin: -.35rem 0 .2rem; font-weight: 600; }
.compact-field { margin-top: .55rem; }

@media (max-width: 700px) {
  :root { --reservation-brand-slot: 3.1rem; --reservation-brand-image: 3.1rem; }
  .equipment-picker-tools { display: grid; grid-template-columns: 1fr; }
}

/* R2C: explicit filter geometry. Nested category selectors never share a grid cell with another control. */
.library-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 1rem;
  padding: 1rem;
}
.library-filters > *,
.library-filters > label,
.library-filters > select { min-width: 0; max-width: 100%; }
.library-filters .category-filter-pair {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  min-width: 0;
}
.library-filters .category-filter-pair > .filter-field { min-width: 0; }
.library-filters .category-filter-pair .multi-select,
.library-filters .category-filter-pair .multi-select-summary { width: 100%; min-width: 0; }
.library-filters .filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

/* History has more fields than the catalog. Keep equipment type/wavelength on their own row. */
.history-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.history-filters .category-filter-pair {
  grid-column: 1 / -1;
}
.history-filters .filter-actions {
  grid-column: 1 / -1;
}

/* Reservation detail actions are visually separate from both the detail rows and each other. */
.detail-card .reservation-edit-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}
.detail-card .reservation-cancel-section {
  margin-top: 1.4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
}
.detail-card .reservation-cancel-section h2 { margin: 0 0 0.35rem; font-size: 1rem; }
.detail-card .reservation-cancel-section > p { margin: 0 0 0.75rem; }
.detail-card .reservation-cancel-equipment { margin: 0 0 1rem; }
.detail-card .cancellation-direct { display: grid; gap: 0.85rem; margin: 0; }
.detail-card .cancellation-direct .card-actions { margin: 0; }

/* Profile mobile auto-login revoke action: compact two-line label instead of one long button. */
.mobile-login-revoke {
  display: inline-grid;
  gap: 0.05rem;
  min-width: 6.5rem;
  justify-items: center;
  line-height: 1.08;
  white-space: normal;
}
.mobile-login-revoke > span { display: block; }

@media (max-width: 79.99rem) {
  .library-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-filters .category-filter-pair,
  .history-filters .category-filter-pair { grid-column: 1 / -1; }
}
@media (max-width: 47.99rem) {
  .library-filters { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; padding: 0.9rem; }
  .library-filters .category-filter-pair,
  .history-filters .category-filter-pair {
    grid-column: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }
  .library-filters .filter-actions,
  .history-filters .filter-actions { grid-column: 1; justify-content: stretch; }
  .library-filters .filter-actions .button { flex: 1 1 8rem; }
}

/* Workspace standalone-service navigation. Scoped to avoid Calendar/TV impact. */
.workspace-primary-nav{display:grid;gap:.12rem;padding:.18rem 0 .45rem;border-bottom:1px solid var(--line)}
.workspace-primary-nav a{display:flex;align-items:center;min-height:2rem;padding:.35rem .5rem;border-radius:.45rem;color:var(--muted);text-decoration:none;font-size:.8rem;font-weight:700}
.workspace-primary-nav a:hover{background:var(--panel-soft);color:var(--text)}
.workspace-primary-nav a.active{background:var(--accent-soft);color:var(--accent-strong)}
.workspace-directory-shell{display:grid;grid-template-columns:15.5rem minmax(0,1fr);gap:1rem;align-items:start}
.workspace-directory-rail{position:sticky;top:calc(var(--topbar-height) + .7rem);display:grid;gap:.15rem;padding:.6rem;border:1px solid var(--line);border-radius:.65rem;background:var(--sidebar);max-height:calc(100dvh - var(--topbar-height) - 1.4rem);overflow:auto}
.workspace-directory-rail .workspace-room-link{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:.4rem;padding:.38rem .48rem;border-radius:.45rem;color:var(--sidebar-text);text-decoration:none;font-size:.8rem}
.workspace-directory-rail .workspace-room-link:hover{background:var(--panel-soft);color:var(--text)}
.workspace-directory-label{margin:.45rem .4rem .14rem;color:var(--muted);font-size:.66rem;font-weight:800;text-transform:uppercase;letter-spacing:.055em}
.workspace-directory-main{min-width:0}
.workspace-directory-toolbar{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap;margin-bottom:.75rem}
.workspace-directory-toolbar .input{min-width:10rem}
.workspace-result-list{display:grid;gap:.45rem}
.workspace-result{display:grid;gap:.24rem;padding:.7rem .8rem;border:1px solid var(--line);border-radius:.55rem;background:var(--panel);color:var(--text);text-decoration:none}
.workspace-result:hover{border-color:var(--line-strong);background:var(--panel-soft)}
.workspace-result-meta{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:.7rem}
.workspace-result-body{font-size:.84rem;line-height:1.45;overflow-wrap:anywhere}
.workspace-result-unread{width:.45rem;height:.45rem;border-radius:999px;background:var(--accent);flex:0 0 auto}
.workspace-files-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.6rem;align-items:center}
.workspace-files-actions{display:flex;gap:.35rem;align-items:center}
.st-row.workspace-focus-message{background:var(--accent-soft);border-left:3px solid var(--accent)}
@media(max-width:74.99rem){.workspace-directory-shell{grid-template-columns:1fr}.workspace-directory-rail{position:static;max-height:none}.workspace-files-row{grid-template-columns:1fr}.workspace-files-actions{justify-content:flex-start}}


/* Workspace smartphone navigation/drawer. Scoped: no effect outside Workspace. */
.workspace-mobile-nav,
.workspace-mobile-conversations,
.workspace-mobile-rail-close,
.workspace-mobile-rail-backdrop{display:none}

@media (max-width: 74.99rem) {
  .workspace-mobile-conversations{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:3rem;
    margin:0 0 .55rem;
    padding:0 .85rem;
    border:1px solid var(--line);
    border-radius:.6rem;
    background:var(--panel);
    color:var(--text);
    font-size:.82rem;
    font-weight:750;
  }
  body.workspace-mobile-rail-open{overflow:hidden}
  .workspace-grid .workspace-rail{
    display:flex!important;
    position:fixed;
    z-index:125;
    inset:calc(var(--qupid-safe-top) + var(--topbar-height)) auto var(--qupid-safe-bottom) 0;
    width:min(22rem,88vw);
    max-height:none;
    border-radius:0 .75rem .75rem 0;
    transform:translateX(-102%);
    transition:transform 180ms ease;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
  .workspace-grid.mobile-rail-open .workspace-rail{transform:translateX(0)}
  .workspace-mobile-rail-close{display:grid}
  .workspace-grid .workspace-rail #collapse-workspace-rail{display:none}
  .workspace-mobile-rail-backdrop{
    position:fixed;
    inset:0;
    z-index:120;
    width:100%;
    height:100%;
    border:0;
    background:rgba(25,25,32,.42);
  }
  .workspace-mobile-rail-backdrop:not([hidden]){display:block}
}

@media (max-width: 47.99rem) {
  .workspace-mobile-nav{
    position:fixed;
    z-index:115;
    right:0;
    bottom:0;
    left:0;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    padding:.25rem max(.35rem,var(--qupid-safe-right)) calc(.25rem + var(--qupid-safe-bottom)) max(.35rem,var(--qupid-safe-left));
    border-top:1px solid var(--line);
    background:var(--panel);
  }
  .workspace-mobile-nav a,
  .workspace-mobile-nav button{
    display:flex;
    min-width:0;
    min-height:3rem;
    align-items:center;
    justify-content:center;
    padding:.35rem .2rem;
    border-radius:.55rem;
    color:var(--muted);
    text-decoration:none;
    font-size:.72rem;
    font-weight:750;
  }
  .workspace-mobile-nav a.active,.workspace-mobile-nav button[aria-expanded="true"]{background:var(--accent-soft);color:var(--accent-strong)}
  .workspace-directory-rail{display:none}
  .rm-rail .workspace-primary-nav{display:none}
  .workspace-directory-shell{display:block}
  .workspace-directory-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem}
  .workspace-directory-toolbar .input,
  .workspace-directory-toolbar .button{width:100%;min-width:0;min-height:3rem}
  .workspace-result{padding:.8rem .75rem}
  .workspace-files-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .workspace-files-actions .button{min-height:3rem}
  .workspace-heading{align-items:flex-start;flex-wrap:wrap;gap:.55rem}
  .workspace-heading-main{flex:1 1 9rem}
  .workspace-heading-main>.muted{display:none}
  .workspace-heading-actions{margin-left:auto}
  .workspace-icon-button{width:3rem!important;height:3rem!important;min-width:3rem;min-height:3rem}
  .workspace-calendar-nav button,.workspace-calendar-head button{width:3rem!important;height:3rem!important;min-width:3rem;min-height:3rem}
  .workspace-calendar-popover,.workspace-calendar-popover.expanded{
    inset:calc(var(--qupid-safe-top) + var(--topbar-height) + .35rem) .35rem calc(3.8rem + var(--qupid-safe-bottom)) .35rem!important;
  }
  .workspace-calendar-popover .workspace-calendar-day{min-height:3.6rem}
  .workspace-calendar-popover.expanded .workspace-calendar-day{min-height:5.6rem}
  .stream-card{min-height:calc(100dvh - var(--topbar-height) - 10rem)!important}
  .stream{padding:.4rem .25rem}
  .st-row{gap:.45rem;padding:.42rem .32rem}
  .st-avatar{width:1.9rem;height:1.9rem}
  .composer{padding:.5rem .45rem}
  .composer textarea{min-height:3rem;font-size:1rem}
  .composer-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.4rem}
  .composer-row .button,.composer-row .input,.composer-row label.button{min-height:3rem}
  .composer-row #st-slash{max-width:none!important;width:100%}
  .workspace-grid.side-open .workspace-side{padding:max(.75rem,var(--qupid-safe-top)) max(.65rem,var(--qupid-safe-right)) calc(4rem + var(--qupid-safe-bottom)) max(.65rem,var(--qupid-safe-left))!important}
  .thread-panel .stream{max-height:calc(100dvh - 17rem)}
}

@media (any-pointer: coarse) {
  .workspace-primary-nav a,
  .workspace-directory-rail .workspace-room-link,
  .workspace-room-link,
  .workspace-rail-button,
  .workspace-mobile-conversations,
  .workspace-result,
  .workspace-files-actions .button{min-height:3rem}
}

/* --------------------------------------------------------------------------
   QuPID sibling-service chrome — Calendar keeps lavender; Workspace owns sky.
   The service switcher/header geometry is shared, but product accents are not.
   -------------------------------------------------------------------------- */
.service-theme-control{position:relative;display:inline-flex;align-items:center}
.service-settings-button{display:grid;place-items:center;width:2.35rem;height:2.35rem;padding:0;border:1px solid var(--line);border-radius:.55rem;background:var(--panel);color:var(--muted);font-size:1rem;line-height:1}
.service-settings-button:hover,.service-settings-button[aria-expanded="true"]{background:var(--panel-soft);color:var(--text);border-color:var(--line-strong)}
.service-theme-menu{position:absolute;z-index:180;top:calc(100% + .4rem);right:0;width:9.5rem;padding:.4rem;border:1px solid var(--line);border-radius:.65rem;background:var(--panel);box-shadow:none;}
.service-theme-menu[hidden]{display:none!important}
.service-theme-title{padding:.35rem .5rem .3rem;color:var(--text-subtle);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.service-theme-menu button{display:flex;width:100%;min-height:2.15rem;align-items:center;padding:.35rem .55rem;border:0;border-radius:.45rem;background:transparent;color:var(--text);font-size:.8rem;text-align:left}
.service-theme-menu button:hover{background:var(--panel-soft)}
.service-theme-menu button.active{background:var(--accent-soft);color:var(--accent-strong);font-weight:750}

/* Main app dark palette. Calendar remains lavender in both themes. */
html[data-theme="dark"]{
  --bg:#11131a;--panel:#181b24;--panel-soft:#20242f;--text:#f3f1f8;--muted:#b8b3c5;--text-subtle:#918b9e;
  --line:#303440;--line-soft:#292d37;--line-strong:#414654;--accent:#9d83f1;--accent-strong:#b8a5f8;--accent-hover:#aa92f3;
  --accent-soft:#30284c;--accent-softer:#211d32;--sidebar:#161922;--sidebar-text:#c2bdcd;--focus:0 0 0 3px rgba(157,131,241,.28)
}
html[data-theme="dark"] .topbar{background:var(--panel)}
html[data-theme="dark"] .sidebar{background:var(--sidebar);border-color:var(--line)}
html[data-theme="dark"] .sidebar a:hover,html[data-theme="dark"] .sidebar a:focus-visible{background:var(--panel-soft)}
html[data-theme="dark"] .sidebar a.active{background:var(--accent-soft);color:var(--accent-strong)}
html[data-theme="dark"] .tex-launch{background:var(--panel)}
html[data-theme="dark"] .subdued{background:var(--panel-soft)}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{color:var(--text)}
html[data-theme="dark"]::before{background:var(--panel)!important}

/* Workspace is its own service shell, not a page inside the Calendar sidebar. */
body.workspace-service-body{
  --bg:#f5fbff;--panel:#ffffff;--panel-soft:#eef8ff;--text:#132133;--muted:#607286;--text-subtle:#8394a5;
  --line:#dbeaf4;--line-soft:#e9f3f8;--line-strong:#c5ddea;--accent:#4aaee8;--accent-strong:#147db8;--accent-hover:#309bd7;
  --accent-soft:#dff3ff;--accent-softer:#f0f9ff;--sidebar:#f4faff;--sidebar-text:#4d687d;--focus:0 0 0 3px rgba(74,174,232,.25)
}
html[data-theme="dark"] body.workspace-service-body{
  --bg:#0d1720;--panel:#121f2a;--panel-soft:#172b39;--text:#edf8ff;--muted:#a8bed0;--text-subtle:#7895aa;
  --line:#263b49;--line-soft:#20333f;--line-strong:#355164;--accent:#58bdf3;--accent-strong:#8fd5fa;--accent-hover:#6ac6f6;
  --accent-soft:#173b50;--accent-softer:#112a39;--sidebar:#101c26;--sidebar-text:#bad0df;--focus:0 0 0 3px rgba(88,189,243,.28)
}
.workspace-app-shell{grid-template-columns:minmax(0,1fr)}
.workspace-service-content{padding:clamp(.7rem,1.2vw,1.2rem);min-height:calc(100dvh - var(--topbar-height))}
.workspace-service-body .topbar{border-bottom-color:var(--line);background:var(--panel)}
.workspace-service-body .service-switcher a.active{background:var(--accent-soft);color:var(--accent-strong)}
.workspace-onboarding-card{min-height:18rem;padding:2rem;border:1px solid var(--line);border-radius:.8rem;background:var(--panel);display:flex;flex-direction:column;justify-content:center;align-items:flex-start}
.workspace-onboarding-card h2{margin:.35rem 0 .4rem;font-size:1.35rem}
.workspace-onboarding-card p{max-width:45rem;margin:0}

@media(max-width:47.99rem){
  .service-settings-button{width:2.6rem;height:2.6rem}
  .workspace-service-content{padding:.55rem .45rem calc(4rem + var(--qupid-safe-bottom))}
  .workspace-service-body .topbar{padding-inline:max(.55rem,var(--qupid-safe-left)) max(.55rem,var(--qupid-safe-right))}
  .workspace-service-body .brand img{width:2.65rem;height:2.65rem}
}

/* 2026-08-28 dark-surface completion.
   Theme tokens must reach the actual calendar/form surfaces; color-scheme alone
   only affects UA widgets and cannot override app-authored #fff/light colors. */
html[data-theme="dark"] .calendar-card,
html[data-theme="dark"] .calendar-toolbar,
html[data-theme="dark"] .calendar,
html[data-theme="dark"] .calendar-weekdays,
html[data-theme="dark"] .calendar-body,
html[data-theme="dark"] .calendar-week-row,
html[data-theme="dark"] .calendar-week-days,
html[data-theme="dark"] .calendar-day {
  background: var(--panel);
  color: var(--text);
}
html[data-theme="dark"] .calendar-day.outside {
  background: var(--panel-soft);
  color: var(--text-subtle);
}
html[data-theme="dark"] .calendar-day.today,
html[data-theme="dark"] .calendar-day.today:not(.holiday) {
  background: var(--accent-soft);
}
html[data-theme="dark"] .calendar-day.selected:not(.today) {
  background: var(--accent-softer);
}
html[data-theme="dark"] .calendar-day.range-selected {
  background: #17382f;
}
html[data-theme="dark"] .calendar-day .day-number,
html[data-theme="dark"] .calendar-day.today .day-number,
html[data-theme="dark"] .calendar-day.today:not(.holiday) .day-number {
  color: var(--text);
}
html[data-theme="dark"] .calendar-day.today:not(.holiday) .day-number {
  color: var(--accent-strong);
}
html[data-theme="dark"] .calendar-weekdays > div,
html[data-theme="dark"] .calendar-toolbar,
html[data-theme="dark"] .calendar-day {
  border-color: var(--line);
}
html[data-theme="dark"] .input,
html[data-theme="dark"] .stack-form input[type="text"],
html[data-theme="dark"] .stack-form input[type="email"],
html[data-theme="dark"] .stack-form input[type="password"],
html[data-theme="dark"] .stack-form input[type="date"],
html[data-theme="dark"] .stack-form input[type="number"],
html[data-theme="dark"] .stack-form input[type="search"],
html[data-theme="dark"] .stack-form select,
html[data-theme="dark"] .stack-form textarea,
html[data-theme="dark"] .filters select,
html[data-theme="dark"] .filters input,
html[data-theme="dark"] .equipment-picker-tools .input {
  background: var(--panel-soft);
  color: var(--text);
  border-color: var(--line-strong);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--text-subtle); }
html[data-theme="dark"] .multi-select-popover,
html[data-theme="dark"] .equipment-picker-popover,
html[data-theme="dark"] .reservation-dialog,
html[data-theme="dark"] .day-agenda-dialog,
html[data-theme="dark"] .reservation-dialog form,
html[data-theme="dark"] .day-agenda-dialog [data-day-agenda-dialog-content] {
  background: var(--panel);
  color: var(--text);
}
html[data-theme="dark"] .multi-select-option,
html[data-theme="dark"] .equipment-checks label { color: var(--text); }
html[data-theme="dark"] .multi-select-option:hover,
html[data-theme="dark"] .equipment-checks label:hover,
html[data-theme="dark"] .icon-button:hover { background: var(--panel-soft); }
html[data-theme="dark"] .booking-warning-panel {
  border-color: #6c5630;
  background: #2a2418;
  color: #f2dfb8;
}
html[data-theme="dark"] .reservation-color-choice { background: var(--panel-soft); color: var(--text); }
html[data-theme="dark"] html.qupid-native-app .equipment-card-option,
html[data-theme="dark"].qupid-native-app .equipment-card-option {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--text);
}
html[data-theme="dark"].qupid-native-app .equipment-card-option.is-selected { background: var(--accent-soft); }
html[data-theme="dark"] .equipment-card-copy strong { color: var(--text); }
html[data-theme="dark"] .equipment-card-copy small { color: var(--muted); }
html[data-theme="dark"] .mobile-reserve-bar,
html[data-theme="dark"] .range-actions { background: var(--panel); color: var(--text); }
html[data-theme="dark"] .calendar-more { color: var(--accent-strong); }
@media (max-width:47.99rem) {
  html[data-theme="dark"] .calendar-more { background: rgba(24,27,36,.94); color: var(--accent-strong); }
}

/* Workspace desktop contract: persistent 3-column shell.
   Left = dashboard/conversations, center = conversation, right = context. */
@media (min-width:75rem) {
  .workspace-grid,
  .workspace-grid.side-open {
    grid-template-columns: 15.5rem minmax(0,1fr) minmax(19rem,24rem) !important;
  }
  .workspace-grid.rail-collapsed,
  .workspace-grid.rail-collapsed.side-open {
    grid-template-columns: 0 minmax(0,1fr) minmax(19rem,24rem) !important;
  }
  .workspace-side { display:block !important; }
}

/* Workspace dark text completion. */
html[data-theme="dark"] body.workspace-service-body .workspace-heading-title h1,
html[data-theme="dark"] body.workspace-service-body .workspace-room-title,
html[data-theme="dark"] body.workspace-service-body .st-author,
html[data-theme="dark"] body.workspace-service-body .st-bodywrap,
html[data-theme="dark"] body.workspace-service-body .ctx-item,
html[data-theme="dark"] body.workspace-service-body .context-head,
html[data-theme="dark"] body.workspace-service-body .composer,
html[data-theme="dark"] body.workspace-service-body .workspace-main,
html[data-theme="dark"] body.workspace-service-body .workspace-side {
  color: var(--text);
}
html[data-theme="dark"] body.workspace-service-body .st-avatar {
  color: #dbeafe;
}

/* Workspace commercial-density pass: one continuous app surface, real project groups only. */
.workspace-surface{
  display:grid;
  grid-template-columns:15.5rem minmax(0,1fr) minmax(20rem,24rem);
  min-width:0;
  min-height:calc(100dvh - var(--topbar-height) - 1.5rem);
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:.72rem;
  background:var(--panel);
}
.workspace-surface.rail-collapsed{grid-template-columns:0 minmax(0,1fr) minmax(20rem,24rem)}
.workspace-surface-rail{
  min-width:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:var(--sidebar);
}
.workspace-surface.rail-collapsed .workspace-surface-rail{visibility:hidden;width:0;opacity:0;pointer-events:none}
.workspace-surface-main{min-width:0;border-left:1px solid var(--line);background:var(--panel)}
.workspace-surface-inspector{min-width:0;border-left:1px solid var(--line);background:var(--panel)}
.workspace-surface-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;padding:.78rem .9rem;border-bottom:1px solid var(--line)}
.workspace-surface-head h1{margin:0;font-size:1.08rem}
.workspace-surface-head .muted{margin-top:.12rem;font-size:.74rem}
.workspace-channel-tabs{display:flex;align-items:center;gap:.12rem;min-height:2.55rem;padding:0 .7rem;border-bottom:1px solid var(--line);overflow-x:auto}
.workspace-channel-tabs a,.workspace-channel-tabs button{flex:0 0 auto;min-height:2.1rem;padding:.38rem .56rem;border:0;border-radius:.4rem;background:transparent;color:var(--muted);font:inherit;font-size:.76rem;font-weight:720;text-decoration:none;cursor:pointer}
.workspace-channel-tabs a:hover,.workspace-channel-tabs button:hover{background:var(--panel-soft);color:var(--text)}
.workspace-channel-tabs .active{color:var(--text);background:var(--accent-soft)}
.workspace-sidebar-overline{padding:.62rem .5rem .16rem;color:var(--muted);font-size:.65rem;font-weight:850;letter-spacing:.065em;text-transform:uppercase}
.workspace-project-group{margin:0 .12rem}
.workspace-project-group>summary{display:flex;min-width:0;align-items:center;gap:.3rem;padding:.32rem .38rem;border-radius:.42rem;color:var(--muted);font-size:.73rem;font-weight:790;cursor:pointer;list-style:none}
.workspace-project-group>summary::-webkit-details-marker{display:none}
.workspace-project-group>summary:hover{background:var(--panel-soft);color:var(--text)}
.workspace-project-chevron{display:inline-block;transform:rotate(0deg);transition:transform .12s}
.workspace-project-group[open] .workspace-project-chevron{transform:rotate(90deg)}
.workspace-project-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-project-state{margin-left:auto;color:var(--muted);font-size:.62rem;font-weight:650}
.workspace-project-rooms{display:grid;margin-left:.32rem}
.workspace-room-link.has-unread .workspace-room-title{font-weight:820;color:var(--text)}
.workspace-sidebar-empty{padding:.3rem .48rem;color:var(--muted);font-size:.72rem}
.workspace-rail-scroll{overflow-y:auto;padding:.08rem .42rem .7rem}
.workspace-inline-calendar{margin-top:.8rem;padding-top:.72rem;border-top:1px solid var(--line)}
.workspace-inline-calendar-head{display:grid;grid-template-columns:2rem minmax(0,1fr) 2rem;align-items:center;gap:.2rem;margin-bottom:.38rem}
.workspace-inline-calendar-head button{display:grid;width:2rem;height:2rem;place-items:center;border:0;border-radius:.4rem;background:transparent;color:var(--muted);cursor:pointer}
.workspace-inline-calendar-head button:hover{background:var(--panel-soft);color:var(--text)}
.workspace-inline-calendar-title{text-align:center;font-size:.76rem;font-weight:820}
.workspace-inline-calendar-weekdays,.workspace-inline-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.workspace-inline-calendar-weekdays span{padding:.1rem 0;text-align:center;color:var(--muted);font-size:.58rem;font-weight:760}
.workspace-inline-calendar-day{display:grid;min-width:0;min-height:2.55rem;align-content:start;justify-items:center;gap:.1rem;padding:.24rem .08rem;border-top:1px solid var(--line-soft);color:var(--text);text-decoration:none}
.workspace-inline-calendar-day:hover{background:var(--panel-soft)}
.workspace-inline-calendar-day.outside{opacity:.42}
.workspace-inline-calendar-day.today{background:var(--accent-soft)}
.workspace-inline-calendar-number{font-size:.64rem;font-weight:740}
.workspace-inline-calendar-day.today .workspace-inline-calendar-number{color:var(--accent-strong);font-weight:900}
.workspace-inline-calendar-dots{display:flex;justify-content:center;gap:.08rem;max-width:100%}
.workspace-inline-calendar-dots i{display:block;width:.24rem;height:.24rem;border-radius:999px}
.workspace-inline-calendar-loading{grid-column:1/-1;padding:1rem;text-align:center;color:var(--muted);font-size:.72rem}
.workspace-inline-calendar-footer{display:flex;justify-content:flex-end;margin-top:.35rem;font-size:.7rem}
.workspace-home-dashboard{padding:.9rem}
.workspace-home-metrics{display:flex;gap:1.15rem;padding:.1rem 0 .75rem;border-bottom:1px solid var(--line)}
.workspace-home-metric{display:grid;gap:.03rem}
.workspace-home-metric strong{font-size:1.05rem}
.workspace-home-metric span{color:var(--muted);font-size:.65rem}
.workspace-home-section{padding:.8rem 0;border-bottom:1px solid var(--line)}
.workspace-home-section:last-child{border-bottom:0}
.workspace-home-section h2{margin:0 0 .42rem;font-size:.82rem}
.workspace-home-row{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:.6rem;padding:.48rem .2rem;color:var(--text);text-decoration:none}
.workspace-home-row:hover{background:var(--panel-soft)}
.workspace-home-row-main{display:grid;min-width:0;gap:.04rem}
.workspace-home-row-main strong,.workspace-home-row-main span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-home-row-main strong{font-size:.79rem}
.workspace-home-row-main span{color:var(--muted);font-size:.68rem}
.workspace-inspector-inner{max-height:calc(100dvh - var(--topbar-height) - 1.55rem);overflow-y:auto;padding:.82rem}
.workspace-inspector-title{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.62rem}
.workspace-inspector-title h2,.workspace-inspector-title h3{margin:0;font-size:.88rem}
.workspace-inspector-subsection{padding-top:.72rem;margin-top:.72rem;border-top:1px solid var(--line)}
.workspace-inspector-subsection>strong{font-size:.72rem}

@media(max-width:74.99rem){
  .workspace-surface,.workspace-surface.rail-collapsed{grid-template-columns:minmax(0,1fr);border-radius:.65rem;min-height:0}
  .workspace-surface-rail{display:none}
  .workspace-surface-main{border-left:0}
  .workspace-surface-inspector{display:none;border-left:0}
  .workspace-surface.context-open .workspace-surface-inspector{display:block;position:fixed;inset:calc(var(--qupid-safe-top) + var(--topbar-height)) 0 var(--qupid-safe-bottom) 0;z-index:120;overflow:auto;background:var(--panel)}
  .workspace-inspector-inner{max-height:none;padding:max(.8rem,var(--qupid-safe-top)) max(.7rem,var(--qupid-safe-right)) calc(4rem + var(--qupid-safe-bottom)) max(.7rem,var(--qupid-safe-left))}
}
.workspace-surface.workspace-grid{gap:0;align-items:stretch}
.workspace-surface .workspace-rail{position:static;max-height:none;border:0;border-radius:0;background:var(--sidebar)}
.workspace-surface .workspace-main{display:block;min-width:0}
.workspace-surface .stream-card{min-height:calc(100dvh - var(--topbar-height) - 7.15rem);border:0;border-radius:0;background:var(--panel)}
.workspace-surface .workspace-side{display:block;min-width:0}
.workspace-surface .thread-panel,.workspace-surface .room-context{position:static;max-height:none;border:0;border-radius:0}
.workspace-surface .workspace-context-close{display:none}
.workspace-surface .workspace-icon-button{border:0;background:transparent}
.workspace-surface .workspace-heading-actions{display:flex;align-items:center;gap:.25rem}
.workspace-surface .workspace-member-count{color:var(--muted);font-size:.7rem;font-weight:650;white-space:nowrap}
.workspace-surface .workspace-room-mark{color:var(--muted);font-weight:800}
@media(max-width:74.99rem){
  .workspace-surface .workspace-side{display:none}
  .workspace-surface.side-open .workspace-side{display:block;position:fixed;inset:calc(var(--qupid-safe-top) + var(--topbar-height)) 0 var(--qupid-safe-bottom) 0;z-index:120;background:var(--panel);overflow:auto}
  .workspace-surface .workspace-context-close{display:inline-flex}
  .workspace-surface.mobile-rail-open .workspace-surface-rail{display:flex!important;position:fixed;z-index:125;inset:calc(var(--qupid-safe-top) + var(--topbar-height)) auto var(--qupid-safe-bottom) 0;width:min(22rem,88vw);background:var(--sidebar)}
}
.workspace-result-is-unread .workspace-result-body{font-weight:650}
.workspace-home-context-toggle,.workspace-home-context-close{display:none}
@media(max-width:74.99rem){
  .workspace-home-context-toggle{display:inline-flex}
  .workspace-home-context-close{display:inline-flex}
}


/* Workspace stable-shell pass — controls stay quiet; center pane changes, chrome does not. */
.workspace-service-body{overflow:hidden}
.workspace-service-body .workspace-service-content{height:calc(100dvh - var(--topbar-height));min-height:0;padding:.65rem;overflow:hidden}
.workspace-service-body .app-shell{height:calc(100dvh - var(--topbar-height));min-height:0}
.workspace-service-body .topbar{gap:.75rem}
.workspace-top-search{flex:1 1 34rem;display:flex;align-items:center;gap:.5rem;max-width:40rem;min-width:12rem;height:2.4rem;margin-inline:auto;padding:0 .7rem;border:1px solid var(--line);border-radius:.55rem;background:var(--panel-soft);color:var(--muted)}
.workspace-top-search:focus-within{border-color:var(--accent);box-shadow:none;outline:2px solid var(--accent);outline-offset:-1px}
.workspace-top-search svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.8;flex:0 0 auto}
.workspace-top-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--text);font-size:.86rem;cursor:text}
.workspace-top-search input::placeholder{color:var(--text-subtle)}
.service-switcher{gap:.12rem;padding:.14rem;border:0;background:transparent}
.service-switcher a{width:2.25rem;height:2.25rem;min-height:2.25rem;padding:0;justify-content:center;border-radius:.5rem}
.service-switcher a svg{width:1.12rem;height:1.12rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.service-switcher a.active{background:var(--accent-soft)}
.workspace-surface{height:100%;min-height:0;border-radius:.6rem}
.workspace-surface-main,.workspace-surface-inspector,.workspace-surface-rail{min-height:0;overflow:hidden}
.workspace-pane-scroll{overflow:auto}
.workspace-rail-head{min-height:3rem;padding:.45rem .5rem}
.workspace-rail-button{width:2rem;height:2rem;min-width:2rem;min-height:2rem;border:0!important;border-radius:.45rem;background:transparent!important;color:var(--muted);padding:0}
.workspace-rail-button:hover,.workspace-rail-button.active{background:var(--panel-soft)!important;color:var(--text)}
.workspace-rail-section-head{display:grid!important;grid-template-columns:minmax(0,1fr) 2rem;width:100%;align-items:center;gap:.35rem;padding:.62rem .28rem .2rem .42rem}
.workspace-rail-add{justify-self:end;width:2rem!important;height:2rem!important;min-width:2rem;min-height:2rem;border:0!important;border-radius:.45rem!important;background:transparent!important;color:var(--muted);font-size:1.05rem;font-weight:500}
.workspace-rail-add:hover,.workspace-rail-add[aria-expanded="true"]{background:var(--panel-soft)!important;color:var(--text)}
.workspace-rail-label{font-size:.72rem;letter-spacing:.035em}
.workspace-room-link{font-size:.87rem;padding:.46rem .5rem}
.workspace-sidebar-overline{font-size:.7rem;padding-top:.72rem}
.workspace-sidebar-empty{font-size:.78rem}
.workspace-surface-head{min-height:3.4rem;align-items:center;padding:.62rem .82rem}
.workspace-surface-head h1{margin:0;font-size:1.02rem;line-height:1.2}
.workspace-search-query{color:var(--muted);font-weight:500}
.workspace-home-dashboard{font-size:.91rem}
.workspace-home-section h2{font-size:.9rem}
.workspace-home-row-main strong{font-size:.87rem}
.workspace-home-row-main span{font-size:.75rem}
.workspace-results-pane{padding:.7rem .82rem;overflow:auto}
.workspace-search-section+.workspace-search-section{margin-top:1rem;padding-top:.9rem;border-top:1px solid var(--line)}
.workspace-search-section h2{font-size:.85rem;margin:0 0 .45rem}
.workspace-result{font-size:.88rem}
.workspace-result-meta{font-size:.72rem}
.workspace-filter-menu{position:relative}
.workspace-filter-menu>summary{list-style:none}.workspace-filter-menu>summary::-webkit-details-marker{display:none}
.workspace-filter-popover{position:absolute;right:0;top:calc(100% + .35rem);z-index:40;display:grid;gap:.5rem;min-width:14rem;padding:.65rem;border:1px solid var(--line);border-radius:.55rem;background:var(--panel);box-shadow:none;}
.workspace-filter-popover label{display:grid;gap:.2rem;color:var(--muted);font-size:.72rem;font-weight:700}
.workspace-library-search{display:flex;align-items:center;gap:.45rem;height:2.35rem;padding:0 .55rem;border:1px solid var(--line);border-radius:.5rem;background:var(--panel-soft)}
.workspace-library-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--text);font-size:.8rem;cursor:text}
.workspace-library-browser-list{display:grid;margin-top:.45rem}
.workspace-library-browser-row{display:grid;grid-template-columns:1.6rem minmax(0,1fr);align-items:center;gap:.42rem;padding:.48rem .35rem;border-radius:.42rem;color:var(--text);text-decoration:none}
.workspace-library-browser-row:hover{background:var(--panel-soft)}
.workspace-library-kind{display:grid;width:1.6rem;height:1.6rem;place-items:center;color:var(--muted);font-size:.76rem}
.workspace-library-copy strong{font-size:.82rem}.workspace-library-copy small{font-size:.7rem}
.workspace-inspector-inner{height:100%;max-height:none;overflow:auto;padding:.72rem .75rem}
.workspace-inline-calendar{margin-top:.9rem;padding-top:.8rem}
.workspace-inline-calendar-dots{display:flex;flex-wrap:wrap;justify-content:center;gap:.08rem;width:1.35rem;max-width:1.35rem}
.workspace-inline-calendar-dots i{width:.58rem!important;height:.18rem!important;border-radius:999px!important}
.workspace-inline-calendar-day{min-height:2.8rem}
.workspace-inline-calendar-number{font-size:.7rem}
.workspace-icon-button{display:grid;width:2rem;height:2rem;min-width:2rem;place-items:center;padding:0;border:0;border-radius:.45rem;background:transparent;color:var(--muted);cursor:pointer}
.workspace-icon-button:hover,.workspace-icon-button:focus-visible,.workspace-icon-button.active{background:var(--panel-soft);color:var(--text)}
.workspace-icon-button .workspace-tool-icon,.workspace-tool-icon{width:1.05rem;height:1.05rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.workspace-notif-count{top:-.05rem;right:-.05rem}
@media(max-width:74.99rem){
  .workspace-service-body{overflow:auto}
  .workspace-service-body .app-shell,.workspace-service-body .workspace-service-content{height:auto;min-height:calc(100dvh - var(--topbar-height));overflow:visible}
  .workspace-top-search{max-width:none;flex:1 1 auto}
  .workspace-surface{height:auto;min-height:calc(100dvh - var(--topbar-height) - 1rem)}
}
@media(max-width:700px){
  .workspace-top-search{display:none}
  .service-switcher a{width:2rem;height:2rem;min-height:2rem}
}

/* Room-local compact controls and search mode. */
.workspace-room-menu,.workspace-member-menu{position:relative}
.workspace-room-menu>summary,.workspace-member-menu>summary{list-style:none}
.workspace-room-menu>summary::-webkit-details-marker,.workspace-member-menu>summary::-webkit-details-marker{display:none}
.workspace-room-menu-popover,.workspace-member-menu-popover{position:absolute;right:0;top:calc(100% + .35rem);z-index:70;padding:.65rem;border:1px solid var(--line);border-radius:.55rem;background:var(--panel);box-shadow:none;}
.workspace-room-menu-popover{width:min(20rem,calc(100vw - 2rem))}
.workspace-room-edit-form{display:grid;gap:.5rem}
.workspace-room-edit-form label{display:grid;gap:.2rem;color:var(--muted);font-size:.72rem;font-weight:700}
.workspace-room-menu-sep{height:1px;margin:.6rem 0;background:var(--line)}
.workspace-member-list{display:grid;margin-top:.35rem}
.workspace-member-row{display:flex;align-items:center;justify-content:space-between;gap:.45rem;min-height:2.35rem;padding:.25rem .15rem;border-bottom:1px solid var(--line-soft)}
.workspace-member-copy{display:grid;min-width:0}.workspace-member-copy strong{font-size:.82rem}.workspace-member-copy small{color:var(--muted);font-size:.68rem}
.workspace-member-menu-popover{min-width:10.5rem;padding:.35rem}
.workspace-menu-danger{display:flex;width:100%;min-height:2.2rem;align-items:center;padding:.4rem .55rem;border:0;border-radius:.4rem;background:transparent;color:#c23b4c;font:inherit;font-size:.78rem;font-weight:720;text-align:left}
.workspace-menu-danger:hover{background:rgba(194,59,76,.1)}
.workspace-member-add{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(5.5rem,.7fr) 2rem;gap:.35rem!important;align-items:center}
.workspace-member-add .input{min-width:0;max-width:none!important;font-size:.78rem}
.workspace-room-search-panel{height:calc(100% - 3.4rem);min-height:0;overflow:auto;padding:.65rem .8rem;background:var(--panel)}
.workspace-room-search-panel[hidden]{display:none!important}
.workspace-room-search-form{display:flex;align-items:center;gap:.45rem;min-height:2.65rem;padding:0 .55rem;border:1px solid var(--line-strong);border-radius:.55rem;background:var(--panel-soft)}
.workspace-room-search-form input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--text);font-size:.9rem;cursor:text}
.workspace-room-search-panel .workspace-result-list{margin-top:.7rem}
.workspace-room-search-panel .workspace-result{display:block;padding:.65rem .55rem;border-bottom:1px solid var(--line-soft);color:var(--text)}
.workspace-search-file{display:inline-flex;margin-top:.35rem;padding:.2rem .4rem;border-radius:.35rem;background:var(--panel-soft);color:var(--accent-strong);font-size:.75rem;text-decoration:none}
.workspace-main.search-active>.stream-card{display:none!important}
.workspace-main.search-active{display:block!important}
@media(max-width:74.99rem){
  .workspace-member-add{grid-template-columns:minmax(0,1fr)}
  .workspace-room-menu-popover{position:fixed;left:.7rem;right:.7rem;top:calc(var(--topbar-height) + .7rem);width:auto}
}
@media (max-width:47.99rem){
  .workspace-mobile-nav{grid-template-columns:repeat(3,minmax(0,1fr))}
  .workspace-mobile-nav a svg{width:1.2rem;height:1.2rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
}
.workspace-library-capture-compact{margin:.4rem 0 .55rem;padding:.5rem}
.workspace-room-library-row{display:grid;grid-template-columns:minmax(0,1fr) 2rem;align-items:center;gap:.25rem;border-bottom:1px solid var(--line-soft)}
.workspace-room-library-row:last-child{border-bottom:0}
.workspace-room-library-row .workspace-library-browser-row{min-width:0}
.workspace-room-library-row form{margin:0}
.workspace-linked-strip{display:flex;align-items:center;gap:.3rem;overflow-x:auto;margin:.5rem 0;padding:.35rem 0;border-bottom:1px solid var(--line-soft);white-space:nowrap}
.workspace-linked-strip>span{color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.workspace-linked-strip a{padding:.2rem .35rem;border-radius:.35rem;background:var(--accent-soft);color:var(--accent-strong);font-size:.7rem;text-decoration:none}
.workspace-linked-mark{display:grid;width:2rem;height:2rem;place-items:center;color:var(--accent-strong);font-size:.8rem;font-weight:900}

/* Google event visibility is a real two-state box switch, not a browser checkbox. */
.google-event-switch{display:inline-flex;min-height:2.45rem;align-items:center;gap:.45rem;padding:.3rem .58rem;border:1px solid var(--line-strong);border-radius:.55rem;background:var(--panel);color:var(--muted);font-size:.82rem;font-weight:700;white-space:nowrap;cursor:pointer;user-select:none;transition:background .12s,border-color .12s,color .12s}
.google-event-switch:hover{background:var(--panel-soft);color:var(--text)}
.google-event-switch:focus-within{outline:2px solid var(--accent-strong);outline-offset:2px}
.google-event-switch-box{display:grid;width:1.2rem;height:1.2rem;place-items:center;border:1px solid var(--line-strong);border-radius:.28rem;background:var(--panel-soft);color:transparent;font-size:.75rem;font-weight:900;line-height:1}
.google-event-switch[data-active="1"]{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-strong)}
.google-event-switch[data-active="1"] .google-event-switch-box{border-color:var(--accent-hover);background:var(--accent-hover);color:#fff}
.google-event-switch[data-active="0"] .google-event-switch-label{color:var(--muted)}

/* Final dark foreground/background pairing for generic controls. */
html[data-theme="dark"] .button:not(.primary):not(.danger){background:var(--panel);border-color:var(--line-strong);color:var(--text)}
html[data-theme="dark"] .button:not(.primary):not(.danger):hover{background:var(--panel-soft);border-color:var(--accent)}
html[data-theme="dark"] .button.ghost:not(.primary):not(.danger){background:transparent;color:var(--text)}
html[data-theme="dark"] option{background:var(--panel);color:var(--text)}

/* Django message framework renders as floating toasts; it never changes page geometry. */
.messages{position:fixed;top:calc(var(--topbar-height) + .7rem + var(--qupid-safe-top));right:max(.8rem,var(--qupid-safe-right));z-index:260;display:grid;width:min(25rem,calc(100vw - 1.6rem));gap:.45rem;margin:0;pointer-events:none}
.message{display:grid;grid-template-columns:minmax(0,1fr) 1.8rem;align-items:center;gap:.55rem;padding:.65rem .65rem .65rem .8rem;border:1px solid var(--line-strong);border-radius:.6rem;background:var(--panel);color:var(--text);box-shadow:none;pointer-events:auto;overflow-wrap:anywhere}
.message>button{display:grid;width:1.8rem;height:1.8rem;place-items:center;padding:0;border:0;border-radius:.38rem;background:transparent;color:inherit;font-size:1rem}
.message>button:hover{background:rgba(127,127,127,.14)}
.message.error{border-color:#9b3b46;background:#3a1d22;color:#ffdce1}
.message.warning{border-color:#8d6b31;background:#332918;color:#ffebb9}
.message.success{border-color:#3f7756;background:#183124;color:#d8f7e2}
html[data-theme="light"] .message.error{border-color:#fecaca;background:#fff1f2;color:#991b1b}
html[data-theme="light"] .message.warning{border-color:#f4d58d;background:#fff8e6;color:#7a5411}
html[data-theme="light"] .message.success{border-color:#bbf7d0;background:#ecfdf3;color:#166534}
@media(max-width:47.99rem){.messages{top:calc(var(--topbar-height) + .45rem + var(--qupid-safe-top));right:max(.55rem,var(--qupid-safe-right));left:max(.55rem,var(--qupid-safe-left));width:auto}}

/* Unified NAS-style file explorer. */
.filehub-shell{display:grid;grid-template-columns:13.5rem minmax(0,1fr);min-height:calc(100dvh - 7rem);overflow:hidden;border:1px solid var(--line);border-radius:.65rem;background:var(--panel)}
.filehub-sidebar{display:flex;min-width:0;flex-direction:column;border-right:1px solid var(--line);background:var(--panel-soft)}
.filehub-brand{display:grid;gap:.1rem;padding:1rem .9rem .7rem}.filehub-brand strong{font-size:1.05rem}
.filehub-sources{display:grid;gap:.12rem;padding:.15rem .45rem}.filehub-sources a{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-height:2.25rem;padding:.38rem .55rem;border-radius:.42rem;color:var(--text);text-decoration:none;font-size:.82rem}.filehub-sources a:hover,.filehub-sources a.active{background:var(--accent-soft)}.filehub-sources b{color:var(--muted);font-size:.68rem;font-weight:700}
.filehub-main{min-width:0;overflow:hidden}.filehub-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:3.5rem;padding:.6rem .8rem;border-bottom:1px solid var(--line)}
.filehub-path{display:flex;min-width:0;align-items:center;gap:.35rem;overflow:hidden;font-size:.8rem}.filehub-path a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);text-decoration:none;font-weight:700}.filehub-path span{color:var(--muted)}
.filehub-actions{display:flex;align-items:center;gap:.35rem}.filehub-new-folder,.filehub-upload{position:relative}.filehub-new-folder>summary,.filehub-upload>summary{list-style:none}.filehub-new-folder>summary::-webkit-details-marker,.filehub-upload>summary::-webkit-details-marker{display:none}.filehub-new-folder form,.filehub-upload form{position:absolute;right:0;z-index:20;display:grid;width:17rem;gap:.5rem;padding:.65rem;border:1px solid var(--line-strong);border-radius:.5rem;background:var(--panel)}
.filehub-search{padding:.6rem .8rem;border-bottom:1px solid var(--line-soft)}.filehub-search .input{width:min(34rem,100%)}
.filehub-table{min-width:45rem;overflow:auto}.filehub-row{display:grid;grid-template-columns:minmax(16rem,2.2fr) 7rem minmax(7rem,1fr) 6rem 8.5rem minmax(8rem,auto);align-items:center;gap:.65rem;min-height:3.1rem;padding:.42rem .8rem;border-bottom:1px solid var(--line-soft);font-size:.77rem}.filehub-row:hover:not(.filehub-head){background:var(--panel-soft)}.filehub-head{min-height:2.25rem;color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.035em}
.filehub-name{display:flex;min-width:0;align-items:center;gap:.65rem}.filehub-name>div{display:grid;min-width:0;gap:.08rem}.filehub-name strong,.filehub-name small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filehub-name small{color:var(--muted);font-size:.69rem;font-weight:500}.filehub-kind{position:relative;flex:0 0 1.35rem;width:1.35rem;height:1.1rem}.filehub-kind.folder{border:1px solid var(--accent);border-radius:.18rem;background:var(--accent-soft)}.filehub-kind.folder::before{content:'';position:absolute;top:-.28rem;left:.08rem;width:.62rem;height:.3rem;border:1px solid var(--accent);border-bottom:0;border-radius:.14rem .14rem 0 0;background:var(--accent-soft)}.filehub-kind.file{border:1px solid var(--line-strong);border-radius:.12rem;background:var(--panel)}.filehub-kind.file::after{content:'';position:absolute;right:-1px;top:-1px;width:.38rem;height:.38rem;border-left:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong);background:var(--panel-soft)}
.filehub-source{font-weight:700}.filehub-open{display:flex;justify-content:flex-end;gap:.3rem}.filehub-open .button{min-height:1.9rem;padding:.25rem .45rem;font-size:.68rem}.filehub-empty{padding:2rem;text-align:center;color:var(--muted)}
@media(max-width:74.99rem){.filehub-shell{grid-template-columns:1fr}.filehub-sidebar{border-right:0;border-bottom:1px solid var(--line)}.filehub-brand{display:none}.filehub-sources{display:flex;overflow:auto;padding:.4rem}.filehub-sources a{flex:0 0 auto}.filehub-table{overflow:auto}}
@media(max-width:47.99rem){.filehub-shell{min-height:calc(100dvh - 5rem);border:0;border-radius:0}.filehub-toolbar{min-height:3rem}.filehub-row{grid-template-columns:minmax(13rem,1fr) 6rem 7rem}.filehub-row>*:nth-child(3),.filehub-row>*:nth-child(4),.filehub-row>*:nth-child(5){display:none}.filehub-head{display:none}.filehub-new-folder form,.filehub-upload form{position:fixed;right:.5rem;left:.5rem;bottom:calc(.5rem + var(--qupid-safe-bottom));width:auto}}
.filehub-shell.has-details{grid-template-columns:13.5rem minmax(0,1fr) 22rem}.filehub-details{min-width:0;border-left:1px solid var(--line);background:var(--panel);overflow:auto}.filehub-details>header{display:flex;align-items:center;justify-content:space-between;gap:.6rem;min-height:3.5rem;padding:.65rem .75rem;border-bottom:1px solid var(--line)}.filehub-details>header>div{display:grid;min-width:0;gap:.1rem}.filehub-details>header strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filehub-detail-body{display:grid;gap:1rem;padding:.8rem}.filehub-detail-body dl{display:grid;gap:.45rem;margin:0}.filehub-detail-body dl>div{display:grid;grid-template-columns:5rem minmax(0,1fr);gap:.55rem}.filehub-detail-body dt{color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase}.filehub-detail-body dd{min-width:0;margin:0;font-size:.75rem;overflow-wrap:anywhere}.filehub-detail-body h3{margin:0 0 .55rem;font-size:.8rem}.filehub-version{display:grid;gap:.55rem;padding:.65rem 0;border-top:1px solid var(--line-soft)}.filehub-version>div{display:flex;align-items:baseline;gap:.45rem}.filehub-version>div span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.7rem}.filehub-version code{font-size:.63rem;word-break:break-all}
.filehub-row-menu{position:relative}.filehub-row-menu>summary{list-style:none}.filehub-row-menu>summary::-webkit-details-marker{display:none}.filehub-menu-card{position:absolute;right:0;z-index:30;display:grid;width:min(22rem,80vw);gap:.65rem;padding:.7rem;border:1px solid var(--line-strong);border-radius:.5rem;background:var(--panel)}.filehub-menu-card form{display:grid;gap:.35rem}.filehub-menu-card label{display:grid;gap:.25rem;color:var(--muted);font-size:.68rem;font-weight:700}.filehub-menu-card .danger{justify-self:start}
@media(max-width:74.99rem){.filehub-shell.has-details{grid-template-columns:1fr}.filehub-details{position:fixed;top:4.25rem;right:.5rem;bottom:calc(.5rem + var(--qupid-safe-bottom));z-index:80;width:min(24rem,calc(100vw - 1rem));border:1px solid var(--line-strong);border-radius:.55rem}.filehub-menu-card{position:fixed;right:.5rem;bottom:calc(.5rem + var(--qupid-safe-bottom));left:.5rem;width:auto}}

/* 2026-09-04 Reserve UX report fixes: calendar-first mobile + safe transient layers. */
.calendar-filter-disclosure{display:contents}
.calendar-filter-summary{display:none}
.preset-card-polished{gap:.8rem}
.preset-card-heading{display:flex;min-width:0;align-items:flex-start;justify-content:space-between;gap:.7rem}
.preset-card-heading>div{min-width:0}.preset-card-heading h2{margin-bottom:.16rem}.preset-card-heading p{margin:0;overflow-wrap:anywhere}
.preset-equipment-chips{display:flex;flex-wrap:wrap;gap:.35rem}
.preset-equipment-chips>span{display:inline-flex;align-items:center;gap:.3rem;max-width:100%;padding:.3rem .48rem;border:1px solid var(--line);border-radius:.45rem;background:var(--panel-soft);font-size:.78rem;font-weight:650}
.preset-equipment-chips small{color:var(--muted);font-size:.68rem;font-weight:500}
.preset-card-actions{margin-top:auto}.preset-card-actions form{margin:0}
.preset-empty{display:grid;justify-items:start;gap:.45rem;padding:1.1rem}.preset-empty .button{margin-top:.2rem}
.preset-form-card{max-width:54rem}.preset-picker-tools{position:sticky;top:0;z-index:2;padding:.15rem .1rem .5rem;background:var(--panel)}
.preset-picker-tools .input{width:100%}

@media(max-width:47.99rem){
  .content:has(.dashboard-grid){padding-top:.45rem}
  .dashboard-heading{margin-bottom:.45rem}
  .dashboard-heading p{display:none}
  .calendar-toolbar{gap:.45rem;padding:.5rem .55rem}
  .calendar-filter-disclosure{display:block}
  .calendar-filter-summary{display:flex;width:100%;min-height:2.4rem;justify-content:center}
  .calendar-filter-disclosure>.filters{display:none!important}
  .calendar-filter-disclosure.filter-open>.filters{display:grid!important;margin-top:.45rem;padding-top:.45rem;border-top:1px solid var(--line-soft)}
  .mobile-reserve-bar{bottom:var(--qupid-safe-bottom)}
  body.nav-open .mobile-reserve-bar,body.nav-open .range-actions{visibility:hidden;pointer-events:none}
  .preset-page-heading{gap:.55rem;margin-bottom:.65rem}.preset-page-heading p{font-size:.8rem}
  .preset-card-heading{align-items:center}.preset-equipment-chips{gap:.28rem}.preset-equipment-chips>span{font-size:.74rem}
  .preset-form .two-col{grid-template-columns:1fr}.preset-form-card{padding:.75rem}
}
.research-identity-color-fieldset{min-width:0}
.research-identity-color-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(8.5rem,1fr));gap:.5rem}
.research-identity-color-choice{--research-identity-choice:#4F46E5;display:grid!important;grid-template-columns:auto 1.4rem minmax(0,1fr);align-items:center;gap:.5rem!important;padding:.55rem .65rem;border:1px solid var(--line);border-radius:.5rem;background:var(--panel);font-weight:550!important}
.research-identity-color-choice:has(input:checked){border-color:var(--research-identity-choice);box-shadow:inset 0 0 0 1px var(--research-identity-choice)}
.research-identity-color-swatch{width:1.25rem;height:1.25rem;border:2px solid var(--research-identity-choice);border-radius:50%;background:var(--research-identity-choice)}
.research-identity-color-choice.is-custom .research-identity-color-swatch{border-style:dashed;background:linear-gradient(135deg,#4F46E5 0 25%,#059669 25% 50%,#EA580C 50% 75%,#C026D3 75%)}
.research-identity-custom-wrap{display:grid;gap:.28rem;margin-top:.55rem;max-width:15rem}
.research-identity-custom-hex:disabled{opacity:.58;cursor:not-allowed}
html[data-theme="dark"] .research-identity-color-choice{background:var(--panel-soft);color:var(--text)}
