:root {
  color-scheme: light;
  --bg: #f2f3f5;
  --surface: #fffefd;
  --surface-2: #eef0f2;
  --surface-3: #f8f7f4;
  --line: #d8d5ce;
  --line-strong: #bfb8ad;
  --text: #202529;
  --muted: #67706f;
  --accent: #496b5d;
  --accent-dark: #304d43;
  --blue: #344f6b;
  --amber: #a36f33;
  --danger: #96384c;
  --shadow: 0 18px 42px rgba(30, 36, 38, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Aptos", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
}

.brand-mark span {
  display: block;
  border-radius: 3px;
  background: var(--surface-2);
}

.brand-mark span:nth-child(1) {
  background: var(--accent);
}

.brand-mark span:nth-child(2) {
  background: var(--blue);
}

.brand-mark span:nth-child(3) {
  background: var(--amber);
}

.brand-mark span:nth-child(4) {
  background: #ded8ce;
}

.brand h1,
.brand p,
.section-head h2,
.section-head p,
.panel-title h2 {
  margin: 0;
}

.brand h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.1;
}

.brand p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tab {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 650;
}

.tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(32, 37, 41, 0.14);
}

.guide-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent-dark);
  font-weight: 700;
}

.guide-button:hover,
.guide-button.is-active {
  border-color: var(--accent);
  background: #f7faf8;
}

.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  min-height: 0;
}

.sidebar {
  background: #fbfbfa;
  border-right: 1px solid var(--line);
  overflow: auto;
}

.tool-panel {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.people-panel {
  padding-bottom: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#searchStatus {
  text-align: right;
  line-height: 1.3;
}

.panel-title.inline {
  margin-bottom: 10px;
}

.panel-title h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #3d4544;
}

.panel-title span {
  color: var(--muted);
  font-size: 0.82rem;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field span {
  color: var(--muted);
  font-size: 0.78rem;
}

.field input,
.field select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}

.field input:focus,
.field select:focus,
textarea:focus {
  outline: 2px solid rgba(73, 107, 93, 0.2);
  border-color: var(--accent);
}

.field input:disabled,
.field select:disabled {
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  cursor: not-allowed;
}

.field input.has-error {
  border-color: #b64057;
}

.field-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.day-field {
  margin-top: 12px;
}

.lesson-note {
  margin: -6px 0 12px;
}

.date-range-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-range-inputs input {
  min-width: 0;
  flex: 1;
}

.date-range-sep {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
}

.day-toggles {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.day-chip {
  position: relative;
  display: block;
  cursor: pointer;
}

.day-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.field .day-chip span {
  display: block;
  min-height: 30px;
  padding: 6px 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
}

.field .day-chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.field .day-chip input:focus-visible + span {
  outline: 2px solid rgba(73, 107, 93, 0.35);
  outline-offset: 1px;
}

.day-chip input:disabled + span {
  cursor: not-allowed;
}

.event-dates-label {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 650;
}

.event-dates-label[hidden] {
  display: none;
}

.small-button,
.secondary-button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--accent-dark);
  white-space: nowrap;
  font-size: 0.8rem;
}

.small-button:hover,
.secondary-button:hover {
  border-color: var(--accent);
  background: #f7faf8;
}

.secondary-button {
  flex: 1;
  padding: 0 10px;
  font-size: 0.82rem;
}

.secondary-button.danger {
  color: var(--danger);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.person-list {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.person-button {
  width: 100%;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.person-button:hover,
.person-button.is-active {
  background: var(--surface);
  border-color: var(--line);
}

.person-button.is-active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.person-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.person-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.person-copy strong,
.assignment-row strong,
.best-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-copy strong {
  font-size: 0.9rem;
}

.person-copy small,
.assignment-row small,
.best-copy small {
  color: var(--muted);
  font-size: 0.77rem;
}

.editor {
  padding-top: 2px;
}

textarea {
  min-height: 110px;
  margin-top: 10px;
  resize: vertical;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.78rem;
}

textarea.has-error {
  border-color: var(--danger);
  outline: 2px solid rgba(182, 64, 87, 0.16);
}

.main-area {
  min-width: 0;
  padding: 22px;
  overflow: auto;
}

.guide-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(300px, 1.4fr) auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.guide-panel[hidden] {
  display: none;
}

.guide-panel h2 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.2;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-3);
}

.guide-steps strong,
.guide-steps span {
  display: block;
}

.guide-steps strong {
  margin-bottom: 4px;
  font-size: 0.84rem;
}

.guide-steps span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.guide-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dismiss-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}

.dismiss-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.mode-panel {
  display: none;
}

.mode-panel.is-active {
  display: block;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-head h2 {
  margin-top: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.12;
}

.section-note {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.score-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.score-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #3f4747;
  font-size: 0.8rem;
}

.split-layout,
.schedule-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(270px, 360px);
  gap: 18px;
  align-items: start;
}

.calendar-panel,
.results-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.calendar-panel {
  overflow: auto;
}

.results-panel {
  padding: 16px;
}

.availability-grid,
.schedule-grid {
  --day-count: 5;
  display: grid;
  grid-template-columns: 78px repeat(var(--day-count), minmax(96px, 1fr));
  min-width: 660px;
  background: var(--line);
  gap: 1px;
}

.availability-grid {
  user-select: none;
}

.grid-corner,
.day-header,
.time-label,
.availability-cell,
.schedule-cell {
  background: var(--surface);
}

.grid-corner,
.day-header {
  min-height: 38px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.grid-corner {
  left: 0;
  z-index: 6;
}

.day-header {
  display: grid;
  place-items: center;
  color: #343c3c;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.time-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.76rem;
  position: sticky;
  left: 0;
  z-index: 4;
}

/* Compact zone row (8b): groups the reference-zone control with its single S5
   caption caption, matching the Meeting Duration field's structure. The .field
   inside keeps the shared field layout; the group just tightens the caption gap. */
.zone-row {
  display: grid;
  gap: 2px;
}

.zone-row .field {
  margin-bottom: 4px;
}

.zone-row .field-note {
  margin-top: 0;
}

.tz-disclosure {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.tz-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.tz-change {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.tz-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.tz-picker input {
  min-height: 32px;
  max-width: 240px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 4px 8px;
}

.tz-picker input.has-error {
  border-color: #b64057;
}

.tz-caveat {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.tz-caveat[hidden] {
  display: none;
}

.availability-cell {
  min-width: 0;
  min-height: 34px;
  border: 0;
  color: rgba(32, 37, 41, 0.62);
  background: rgba(73, 107, 93, var(--heat-alpha));
  font-size: 0.75rem;
}

.availability-cell:hover {
  outline: 2px solid rgba(52, 79, 107, 0.3);
  outline-offset: -2px;
}

.availability-cell.is-selected {
  color: #ffffff;
  background: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent-dark);
  font-weight: 700;
}

/* A viewer-grid bucket with no reference-window cell (spillover hole). Inert. */
.availability-cell.is-empty {
  background: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.03),
    rgba(0, 0, 0, 0.03) 4px,
    transparent 4px,
    transparent 8px
  );
  pointer-events: none;
}

/* A cell that maps outside the reference window (S6 out-of-window = not paintable). */
.availability-cell.is-unpaintable {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(32, 37, 41, 0.3);
  cursor: not-allowed;
}

.schedule-grid {
  position: relative;
}

.schedule-grid .day-header,
.schedule-grid .grid-corner {
  min-height: 40px;
}

.schedule-cell {
  min-height: 40px;
}

.schedule-assignment {
  z-index: 2;
  min-width: 0;
  margin: 3px;
  padding: 7px 9px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #fbfaf7;
  box-shadow: 0 7px 16px rgba(32, 37, 41, 0.12);
  overflow: hidden;
}

.schedule-assignment strong,
.schedule-assignment span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-assignment strong {
  font-size: 0.82rem;
  line-height: 1.1;
}

.schedule-assignment span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.best-zone-note {
  margin: -4px 0 8px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.best-list,
.assignment-list {
  display: grid;
  gap: 8px;
}

.best-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 64px 36px;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.best-row:last-child {
  border-bottom: 0;
}

.rank {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: #414948;
  font-size: 0.78rem;
  font-weight: 700;
}

.best-copy,
.assignment-row > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.fit-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.fit-meter span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.fit-count {
  color: #3d4544;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.assignment-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.assignment-row:last-child {
  border-bottom: 0;
}

.assignment-row .student-local {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: italic;
}

.assignment-row.is-missed {
  opacity: 0.68;
}

.assignment-row.is-missed .person-dot {
  background: var(--danger);
}

.empty-state {
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    overflow: visible;
  }

  .tool-panel {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .tool-panel:last-child {
    border-right: 0;
  }

  .split-layout,
  .schedule-layout {
    grid-template-columns: 1fr;
  }

  .guide-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .guide-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dismiss-button {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .mode-tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
  }

  .guide-button {
    width: 100%;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .tool-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main-area {
    padding: 16px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .guide-panel {
    padding: 16px;
  }

  .guide-steps {
    grid-template-columns: 1fr;
  }

  .score-strip {
    justify-content: flex-start;
  }

  .availability-grid,
  .schedule-grid {
    grid-template-columns: 72px repeat(var(--day-count), minmax(86px, 1fr));
    min-width: 560px;
  }

  .best-row {
    grid-template-columns: 28px minmax(0, 1fr) 36px;
  }

  .fit-meter {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
   Share-link (online) modes. Local mode never carries these body classes, so
   none of the online-only blocks show there. Panels are hidden, never removed:
   app.js attaches listeners to every element.
   --------------------------------------------------------------------------- */
.net-banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid rgba(150, 56, 76, 0.35);
  border-radius: 8px;
  background: #fbeef0;
  color: var(--danger);
  font-size: 0.9rem;
  line-height: 1.4;
}

.net-banner[hidden],
.share-notice[hidden] {
  display: none;
}

.share-notice {
  max-width: 560px;
  margin: 40px auto;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.share-notice h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.share-notice p {
  margin: 0;
  color: var(--muted);
}

.student-panel,
.student-actions {
  display: none;
}

.field-error {
  margin: -6px 0 10px;
  color: var(--danger);
  font-size: 0.82rem;
}

.field-error[hidden] {
  display: none;
}

.primary-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent-dark);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

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

.link-row input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text);
  padding: 6px 8px;
  font-size: 0.82rem;
}

/* Student mode: one person's grid, nothing else of the organizer UI. */
body.is-student .sidebar,
body.is-student .mode-tabs,
body.is-student .guide-button,
body.is-student .guide-panel,
body.is-student .section-head,
body.is-student .results-panel,
body.is-student #schedulerPanel,
body.is-student #eventDatesLabel {
  display: none !important;
}

body.is-student .workspace,
body.is-student .split-layout {
  grid-template-columns: minmax(0, 1fr);
}

body.is-student .student-panel {
  display: block;
  max-width: 760px;
  margin-bottom: 14px;
}

body.is-student .student-panel h2 {
  margin: 2px 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
}

.student-dates,
.student-zone {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.student-name {
  max-width: 360px;
  margin-top: 12px;
}

body.is-student .student-actions {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-top: 16px;
}

.student-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.student-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.student-saved {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 8px;
}

.student-saved[hidden] {
  display: none;
}

.student-saved p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.student-summary {
  color: var(--muted);
}

/* Online modes: hold the planner until the event has loaded; hide it entirely
   when the link is invalid. */
body.share-loading .mode-panel,
body.share-invalid .mode-panel,
body.share-invalid .student-panel,
body.share-invalid .sidebar {
  visibility: hidden;
}

body.share-invalid .mode-panel,
body.share-invalid .student-panel,
body.share-invalid .sidebar {
  display: none !important;
}

body.share-invalid .workspace {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 760px) {
  body.is-student .availability-grid {
    grid-template-columns: 58px repeat(var(--day-count), minmax(46px, 1fr));
    min-width: 0;
  }

  body.is-student .time-label {
    padding: 0 6px;
    font-size: 0.7rem;
  }

  body.is-student .day-header {
    font-size: 0.68rem;
    text-align: center;
  }
}

/* Teacher-online: the shared event's links and status in the Data panel. */
.share-online {
  display: none;
}

body.is-teacher-online .share-online {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

body.is-online #loadSampleBtn,
body.is-online #guideLoadSampleBtn,
body.is-online #importBtn {
  display: none;
}

.share-event-title {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.share-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.share-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.share-warning {
  margin: 0 0 6px;
  padding: 8px 10px;
  border-left: 3px solid var(--amber);
  background: #fbf3e8;
  color: #6b4a22;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Local mode: "Create share link" (hidden once the page is an online event). */
.share-local {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

body.is-online .share-local {
  display: none;
}

.share-local .field-note {
  margin: 0;
}

.share-created {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.share-created[hidden] {
  display: none;
}

/* Phone drag painting: a finger stroke on the cells paints instead of scrolling.
   Applied to the cells only, so the time-label column and day headers still
   scroll the page on a phone. */
.availability-cell {
  touch-action: none;
}
