:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-danger: #dc2626;
  --color-danger-hover: #b91c1c;
  --color-success: #16a34a;
  --color-success-hover: #15803d;
  --color-success-bg: #f0fdf4;
  --color-success-border: #bbf7d0;
  --color-accent: #ea580c;
  --color-accent-hover: #c2410c;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-text-faint: #9ca3af;
  --color-border: #e5e7eb;
  --color-surface: #ffffff;
  --color-bg: #f9fafb;
  --color-raised: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-height: 48px;
  --breakout: calc(50% - 50vw);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--color-text);
  padding: 0 20px 24px;
  max-width: 1120px;
  margin: 0 auto;
  background: var(--color-bg);
  line-height: 1.5;
}

/* ── Navbar ── */
#mainNav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  margin: -24px var(--breakout) 24px;
  width: 100vw;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-right: 8px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font);
  color: var(--color-text);
  cursor: pointer;
}

.nav-brand:hover {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-btn {
  padding: 6px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}

.nav-btn:hover {
  background: var(--color-raised);
  color: var(--color-text);
}

.nav-btn.active {
  background: var(--color-primary);
  color: white;
  font-weight: 600;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 140px;
  z-index: 200;
  padding: 4px;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.nav-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.nav-dropdown-item:hover {
  background: var(--color-raised);
}

.nav-dropdown-item.active {
  background: var(--color-primary);
  color: white;
  font-weight: 600;
}

.nav-logout {
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.1s,
    color 0.1s,
    border-color 0.1s;
}

.nav-logout:hover {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}

/* ── Loading ── */
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  z-index: 9999;
  font-size: 15px;
  color: var(--color-text-muted);
}

/* ── Login ── */
.login-screen {
  background: var(--color-surface);
  padding: 56px 48px 48px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  margin: 60px auto 0;
}

.login-logo {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.login-screen h1 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 36px;
}

.login-teams {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.login-team-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  width: 120px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font);
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}

.login-team-btn:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.login-team-icon {
  font-size: 28px;
  line-height: 1;
}

.login-team-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.roster-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin: 20px 16px 12px;
}

.staff-list {
  padding: 0 16px 24px;
}

.staff-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.staff-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.staff-row-room {
  font-size: 12px;
  font-weight: 600;
  min-width: 120px;
  flex-shrink: 0;
}

.staff-row-title {
  flex: 1;
  font-size: 13px;
  color: var(--color-text);
}

.staff-row-input {
  width: 160px;
  flex-shrink: 0;
  padding: 5px 8px;
  font-size: 13px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
}

.staff-row-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.editor-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 32px;
  max-width: 1000px;
}

.editor-section-header {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.editor-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.editor-ann-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.ann-slot-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ann-slot-card-header {
  padding: 8px 12px;
}

.ann-slot-label-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}

.ann-slot-label-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.ann-slot-text-input {
  flex: 1;
  resize: none;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font);
  background: var(--color-raised);
  color: var(--color-text);
  min-height: 80px;
  line-height: 1.5;
  outline: none;
}

.ann-slot-text-input:focus {
  background: var(--color-surface);
}

/* ── Container ── */
.container {
  display: none;
}

.container.active {
  display: block;
}

/* ── Header ── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
}

.header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--color-raised);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logout-btn {
  padding: 7px 14px;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  transition:
    background 0.1s,
    color 0.1s,
    border-color 0.1s;
}

.logout-btn:hover {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}

/* ── Overview toolbar ── */
.overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--color-border);
}

.overview-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.overview-toolbar-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.attendance-total {
  font-size: 13px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ── Filter dropdowns ── */
.filter-dropdown-wrap {
  position: relative;
}

.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--color-raised);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.12s,
    color 0.12s;
}

.filter-dropdown-btn:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

.filter-dropdown-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  font-weight: 600;
}

.filter-chevron {
  font-size: 10px;
  opacity: 0.6;
}

.filter-clear {
  font-size: 11px;
  opacity: 0.8;
  line-height: 1;
}

.filter-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0, 0, 0, 0.12));
  z-index: 200;
  min-width: 160px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text);
  user-select: none;
  white-space: nowrap;
}

.filter-option:hover {
  background: var(--color-raised);
}

.filter-option.is-checked {
  font-weight: 600;
  color: var(--color-primary);
}

.filter-option-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Announcement buttons row ── */
.ann-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--color-border);
}

#adminStickyPanel {
  position: sticky;
  top: var(--nav-height);
  z-index: 10;
  background: var(--color-bg);
}

#adminAnnBtns {
  background: var(--color-surface);
}

#adminAnnEditor {
  background: var(--color-raised);
}

.room-tab,
.timeslot-tab,
.ann-btn {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
}

/* ── Room tabs ── */
.room-tab {
  border: none;
  background: var(--color-raised);
  color: var(--color-text-muted);
  border-bottom: 3px solid transparent;
  transition:
    background 0.12s,
    box-shadow 0.12s;
}

.room-tab:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.room-tab.active {
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.room-tab.room-tab-all.active {
  background: var(--color-primary);
  color: white;
  border-bottom-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ── Tab section labels ── */
.tab-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-faint);
  margin-right: 2px;
  white-space: nowrap;
}

/* ── Timeslot tabs ── */

.timeslot-tab {
  border: none;
  background: var(--color-raised);
  color: var(--color-text-muted);
  transition:
    background 0.12s,
    box-shadow 0.12s;
}

.timeslot-tab:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.timeslot-tab.active {
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ── Announcement buttons ── */
.ann-btn {
  border: 2px solid transparent;
  font-weight: 600;
  color: white;
  filter: saturate(0.55) brightness(0.92);
  transition:
    filter 0.12s,
    box-shadow 0.12s;
  box-shadow: var(--shadow-sm);
}

.ann-btn:hover {
  filter: saturate(0.75) brightness(0.96);
}
.ann-btn.selected {
  filter: saturate(1.3) brightness(1.05);
  box-shadow: var(--shadow-md);
}

.ann-editor {
  padding: 10px 24px;
  background: var(--color-raised);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ann-editor-label {
  font-size: 11px;
  font-weight: 700;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.ann-editor input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
}

.ann-editor input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ann-editor .ann-live-btn {
  padding: 5px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.page-banner {
  position: sticky;
  top: var(--nav-height);
  z-index: 98;
  margin: -24px var(--breakout) 24px;
  width: 100vw;
  padding: 9px 24px;
  background: #f5f0e8;
  color: #6b5a3a;
  border-bottom: 1px solid #e5dcc8;
  font-size: 13px;
}

.offline-banner {
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
  padding: 10px 24px;
  background: #7a3d52;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
}

.info-message {
  position: sticky;
  top: var(--nav-height);
  z-index: 99;
  padding: 10px 24px;
  background: #dcfce7;
  color: #166534;
  border-bottom: 1px solid #bbf7d0;
  font-size: 13px;
  font-weight: 500;
  display: none;
}

.info-message.show {
  display: block;
}

.info-message.error {
  background: #fee2e2;
  color: #991b1b;
  border-bottom-color: #fecaca;
}

.save-status {
  position: sticky;
  top: calc(var(--nav-height) + 34px);
  z-index: 99;
  padding: 6px 16px;
  background: #f3f4f6;
  color: #4b5563;
  border-bottom: 1px solid #d1d5db;
  font-size: 12px;
  font-weight: 500;
  border-radius: 0 0 6px 6px;
  margin: 0 var(--breakout);
}

/* ── Content area ── */
.content-area {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

/* ── Admin inputs ── */
.admin-view label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-view input,
.admin-view textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--color-text);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.admin-view input:focus,
.admin-view textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.admin-view textarea {
  min-height: 60px;
  resize: vertical;
}

/* ── Admin buttons ── */
.admin-view button {
  padding: 9px 18px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.1s;
}

.admin-view button:hover {
  background: var(--color-primary-hover);
}

.admin-view button.delete {
  background: var(--color-danger);
}

.admin-view button.delete:hover {
  background: var(--color-danger-hover);
}

/* ── Announcements ── */
.announcement-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.announcement-input-group input {
  flex-grow: 1;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  background: var(--color-raised);
  color: var(--color-text);
}

.announcement-input-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.announcement-input-group button {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.announcement-input-group button:hover {
  opacity: 0.88;
}

.current-announcements {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.announcement-item {
  background: var(--color-raised);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  gap: 12px;
}

.announcement-item button {
  flex-shrink: 0;
  padding: 4px 10px;
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
}

.announcement-item button:hover {
  background: var(--color-danger);
  color: white;
}

/* ── Session list ── */
.admin-view .session-list-section h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.session-list-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
}

.select-all-btn {
  font-size: 12px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  cursor: pointer;
  padding: 3px 10px;
  transition:
    color 0.12s,
    border-color 0.12s;
}

.select-all-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.overview--readonly .session-list-toolbar,
.overview--readonly .logout-btn {
  display: none;
}

.admin-view .session-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-view .room-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-view .room-group-header {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 4px 10px;
  background: var(--color-raised);
  border-radius: var(--radius-sm);
}

.admin-view .session-card {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  border-left: 4px solid #ccc;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition:
    box-shadow 0.15s,
    transform 0.1s;
}

.admin-view .session-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.admin-view .session-card.dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.admin-view .room-group.drag-over {
  background: rgba(37, 99, 235, 0.05);
  border-radius: var(--radius-sm);
  outline: 2px dashed var(--color-primary);
}

.admin-view .session-card .card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.35;
}

.admin-view .session-card .card-row {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}

.admin-view .session-card .card-meta {
  font-size: 11px;
  color: var(--color-text-faint);
  margin-top: 8px;
  font-weight: 500;
}

.session-empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--color-text-muted);
}

.session-empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.session-empty-state p {
  margin: 4px 0 0;
  font-size: 14px;
}

.session-empty-state .empty-hint {
  font-size: 12px;
  color: var(--color-text-faint);
  margin-top: 6px;
}

/* ── Viewer ── */
.view-only .display-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 20px;
  border-radius: var(--radius-md);
  min-height: 150px;
}

.view-only .display-box h3 {
  margin-top: 0;
  font-size: 16px;
  font-weight: 700;
}

.view-only .display-box p {
  margin: 10px 0;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.view-only .empty {
  color: var(--color-text-faint);
  font-style: italic;
}

/* ── Public view ── */
.public-view {
  min-height: 100vh;
  position: relative;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 40%, #f9fafb 100%);
}

.public-hero {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-border);
  padding: 32px 24px 28px;
  border-bottom: 1px solid var(--color-border);
  padding: 32px 24px 28px;
  margin: 0 var(--breakout);
  width: 100vw;
}

.public-hero-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.public-login-btn {
  position: absolute;
  top: 12px;
  right: 24px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background 0.1s,
    border-color 0.1s,
    color 0.1s;
  z-index: 10;
}

.public-login-btn:hover {
  background: var(--color-raised);
  color: var(--color-text);
  border-color: var(--color-text-faint);
}

.public-menu-dropdown {
  position: absolute;
  top: 44px;
  right: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 20;
  min-width: 160px;
  padding: 4px;
}

.public-menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.public-menu-item:hover {
  background: var(--color-raised);
}

.public-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.public-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin: 0;
  line-height: 1.1;
}

.public-live-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-success);
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  border-radius: 20px;
  padding: 5px 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--color-success);
  border-radius: 50%;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

.public-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 0 48px;
}

.public-view .announcement-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.public-view .announcement-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}

.public-view .announcement-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.public-view .announcement-card.highlighted {
  border-left: 3px solid var(--color-accent);
}

.public-view .announcement-card .pub-meta {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.public-view .announcement-card .fields {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--color-text);
}

.public-view .no-announcements {
  text-align: center;
  padding: 80px 20px;
}

.no-ann-icon {
  font-size: 36px;
  margin-bottom: 14px;
}

.no-ann-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.no-ann-sub {
  font-size: 13px;
  color: var(--color-text-faint);
  margin-top: 5px;
}

/* ── Day tabs ── */
.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--color-border);
}

.day-tab {
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--color-raised);
  color: var(--color-text-muted);
  transition: background 0.12s;
}

.day-tab:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.day-tab.active {
  background: var(--color-primary);
  color: white;
}

/* ── Day/timeslot sections ── */
.ts-day {
  margin-bottom: 40px;
}

.ts-day-header {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 0 10px;
  margin-bottom: 4px;
  border-bottom: 3px solid var(--color-primary);
  margin-bottom: 16px;
}

.ts-section {
  margin-bottom: 28px;
}

.ts-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  padding: 6px 0 8px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ts-card {
  position: relative;
  background: var(--color-surface);
  border-left: 3px solid #ccc;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  flex: 1 1 200px;
  max-width: 320px;
  min-width: 160px;
  transition:
    box-shadow 0.12s,
    transform 0.1s;
}

.ts-card.expanded {
  flex: 1 1 100%;
  max-width: none;
  cursor: default;
  box-shadow: var(--shadow-md);
}

.ts-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.ts-card:focus,
.ts-card:focus-visible {
  outline: none;
}

.ts-card.dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.ts-card-room {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.ts-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
  margin-bottom: 3px;
}

.ts-card-speaker {
  font-size: 11px;
  color: var(--color-text-muted);
}

.ts-card-time {
  font-size: 10px;
  color: var(--color-text-faint);
  margin-top: 4px;
}

.ts-card-attendance {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 4px;
}

.ts-card--has-bottom {
  padding-bottom: 38px;
}

.ts-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 10px;
  margin-top: 0;
}

.ts-card-attendance-placeholder {
  min-width: 0;
  flex-shrink: 0;
}

.ts-card-vols {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.ts-card-vol {
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-card-note-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
  cursor: default;
}

.ts-card-note-badge--room {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.ts-card-note-badge--session {
  background: #fefce8;
  border: 1px solid #fde68a;
  font-size: 11px;
}

/* ── Session selection & ann assignment ── */
.ts-card .ts-card-checkbox {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 15px;
  height: 15px;
  padding: 0;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.1s;
  margin: 0;
  outline: none;
  border: none;
}

.ts-card .ts-card-checkbox:focus,
.ts-card .ts-card-checkbox:focus-visible {
  outline: none;
}

.ts-card .ts-card-checkbox:checked,
.ts-card:hover .ts-card-checkbox {
  opacity: 1;
}

.ts-card.ts-card-selected {
  outline: 2px solid var(--color-primary);
  background: rgba(37, 99, 235, 0.04);
}

.ts-card-ann-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}

.ts-card-ann-badge {
  font-size: 10px;
  font-weight: 700;
  color: white;
  padding: 1px 7px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.ann-assign-bar {
  background: var(--color-primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ann-assign-bar button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.ann-assign-bar button:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ── Expanded card fields ── */
.ts-card-expand {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.ts-card-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ts-card-field label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.ts-card-field input,
.ts-card-field select {
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
}

.ts-card-field input:focus,
.ts-card-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.ts-card-field--full {
  grid-column: 1 / -1;
}

.ts-card-notes-input {
  width: 100%;
  min-height: 60px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: var(--font);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  resize: vertical;
  line-height: 1.5;
}

.ts-card-notes-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

/* ── Session modal ── */
.auth-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-prompt {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  width: 320px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-prompt-label {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}
.auth-prompt-input {
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
}
.auth-prompt-input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.auth-prompt-error {
  color: #dc2626;
  font-size: 13px;
  margin: 0;
}
.auth-prompt-btns {
  display: flex;
  gap: 8px;
}
.auth-prompt-cancel {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.session-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.session-modal-panel {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  max-width: 580px;
  width: 100%;
}

.session-modal-panel--wide {
  max-width: 860px;
  max-height: 85vh;
  overflow-y: scroll;
  padding: 28px 28px 32px;
  position: relative;
}

.session-modal-overlay--fullscreen {
  padding: 0;
}

.session-modal-panel--fullscreen {
  max-width: 100%;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  border-radius: 0;
  overflow-y: auto;
  padding: 48px max(48px, calc(50% - 480px)) 80px;
  position: relative;
}
.session-modal-close {
  position: absolute;
  top: 28px;
  right: 28px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.session-modal-panel--fullscreen .session-modal-close {
  top: 48px;
  right: max(48px, calc(50% - 480px));
}
.session-modal-close:hover {
  background: var(--color-raised);
}
/* Viewer mode header keeps the left-border and padding */
.session-modal-header {
  padding-left: 14px;
  margin-bottom: 20px;
}
.session-modal-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
}
.session-modal-speaker {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.session-modal-meta {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 14px;
  color: var(--color-text-faint);
  flex-wrap: wrap;
}
.session-modal-room {
  font-weight: 600;
  font-size: 14px;
}
.session-modal-meta-sep {
  color: var(--color-text-faint);
  padding: 0 2px;
}
.session-modal-time {
  font-size: 14px;
  color: var(--color-text-faint);
}
.session-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}
.session-modal-field {
  display: flex;
  gap: 12px;
  font-size: 14px;
}
.session-modal-field-label {
  color: var(--color-text-muted);
  text-transform: capitalize;
  flex-shrink: 0;
  min-width: 90px;
}
.session-modal-anns {
  margin-bottom: 20px;
}
.session-modal-anns-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.session-modal-ann {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.session-modal-ann-label {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding-bottom: 0;
}
.session-modal-ann-chevron {
  font-size: 14px;
  transition: transform 0.15s;
}
.session-modal-ann.expanded .session-modal-ann-chevron {
  transform: rotate(90deg);
}
.session-modal-ann-body {
  display: none;
  margin-top: 8px;
  max-height: 180px;
  overflow-y: auto;
}
.session-modal-ann.expanded .session-modal-ann-body {
  display: block;
}

.session-modal-generic-notes {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}
.session-modal-generic-notes .session-modal-anns-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  margin-bottom: 0;
}
.session-modal-generic-notes-body {
  display: none;
  margin-top: 8px;
}
.session-modal-generic-notes-body p {
  margin: 10px 0 4px;
}
.session-modal-generic-notes-body ul {
  margin: 0;
  padding-left: 18px;
}
.session-modal-generic-notes-body li {
  margin-bottom: 3px;
}
.session-modal-generic-notes.expanded .session-modal-ann-chevron {
  transform: rotate(90deg);
}
.session-modal-generic-notes.expanded .session-modal-generic-notes-body {
  display: block;
}

.session-modal-att-input {
  padding: 6px 10px;
  font-size: 22px;
  font-weight: 700;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font);
  display: block;
}
@keyframes saved-flash {
  0% {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
  }
  70% {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
  }
  100% {
    border-color: var(--color-border);
    box-shadow: none;
  }
}

.field-saved {
  animation: saved-flash 1.2s ease forwards;
}

.session-modal-att-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.modal-top {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.modal-top-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 20px 16px;
}

.modal-top-title-block {
  flex: 1;
  min-width: 0;
}

.modal-top-att {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.modal-top-att .session-modal-att-input {
  width: 72px;
  text-align: right;
}

.modal-top-people {
  display: flex;
  border-top: 1px solid var(--color-border);
  background: var(--color-raised);
}

.modal-top-people .modal-person-field {
  flex: 1;
  padding: 12px 20px;
  border-right: 1px solid var(--color-border);
}

.modal-top-people .modal-person-field:last-child {
  border-right: none;
}

.modal-notes-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-raised);
}

.modal-notes-panel > * {
  padding: 12px 20px;
  border-right: 1px solid var(--color-border);
}

.modal-notes-panel > *:last-child {
  border-right: none;
}

.modal-notes-panel .session-modal-notes-input {
  min-height: 60px;
  resize: none;
  background: var(--color-raised);
  border-color: var(--color-border);
}

.modal-person-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.modal-person-label {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.modal-person-value {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
}

.modal-person-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.3;
  cursor: pointer;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 1px;
  transition:
    border-color 0.12s,
    color 0.12s;
}

.modal-person-text:hover {
  border-bottom-color: var(--color-text-muted);
  color: var(--color-primary);
}

.modal-person-text:empty::before {
  content: "—";
  color: var(--color-text-faint);
  font-weight: 400;
}

.modal-person-input {
  flex: 1;
  font-size: 14px;
  font-family: var(--font);
  padding: 3px 7px;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.session-modal-notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.session-modal-notes-input {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  resize: vertical;
  line-height: 1.5;
}

.session-modal-notes-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ── Soft-deleted session cards ── */
.ts-card--deleted {
  opacity: 0.45;
  filter: grayscale(0.4);
}

.ts-card--deleted .ts-card-title {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

/* ── Undo button in info message ── */
.info-message .undo-btn {
  background: none;
  border: 1px solid currentColor;
  color: inherit;
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 8px;
  font-family: var(--font);
  font-weight: 600;
}

/* ── Change log modal ── */
.changelog-panel {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 560px;
  max-width: 95vw;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
}

.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  flex-shrink: 0;
}

.changelog-content {
  overflow-y: auto;
  flex: 1;
}

.changelog-entry {
  padding: 10px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}

.changelog-entry:last-child {
  border-bottom: none;
}

.changelog-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.changelog-time {
  color: var(--color-text-muted);
}

.changelog-mode {
  color: var(--color-text-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.changelog-location {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.changelog-field-row {
  color: var(--color-text-muted);
}

.changelog-field-name {
  font-style: italic;
  margin-right: 6px;
}

.changelog-empty {
  color: var(--color-text-faint);
}
