.week-calendar {
  min-width: 0;
}
.calendar-instructions,
.calendar-feedback {
  font-size: 12px;
  color: #705782;
  margin: 4px 0;
}
.week-calendar > .quiet {
  font-size: 11px;
  margin: 6px 0;
}
.week-scroll {
  overflow: auto;
  border: 1px solid #dfd2eb;
  border-radius: 12px;
  background: white;
  overscroll-behavior: contain;
}
.week-grid {
  min-width: 700px;
}
.week-head,
.week-body {
  display: grid;
  grid-template-columns: 44px repeat(7, minmax(0, 1fr));
}
.week-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f6effb;
  border-bottom: 1px solid #dfd2eb;
}
.week-heading {
  padding: 8px 2px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  border-left: 1px solid #e6dced;
}
.week-heading small {
  display: none;
}
.week-heading.today {
  background: #eaddf8;
  color: #744ca0;
}
.week-corner {
  font-size: 9px;
  display: grid;
  place-items: center;
  background: #f6effb;
}
.week-day,
.week-hours {
  position: relative;
}
.week-day {
  border-left: 1px solid #e9e0ef;
}
.week-hours {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fffdfd;
}
.week-hours time {
  position: absolute;
  left: 0;
  right: 0;
  font-size: 10px;
  color: #8c769d;
  text-align: center;
}
.week-day > time {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #eee6f4;
  font-size: 0;
  pointer-events: none;
}
.week-block {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  background: #eee2fb;
  border: 1px solid #bca1d9;
  border-left: 3px solid #9b78bd;
  border-radius: 5px;
  padding: 2px 4px;
  color: #53366d;
  z-index: 1;
  user-select: none;
}
.week-block strong {
  display: block;
  flex-shrink: 0;
  font-size: 11px;
  line-height: 13px;
  overflow-wrap: anywhere;
}
.week-block small {
  display: none;
}
.block-time {
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
  font-size: 9px;
  line-height: 13px;
  white-space: nowrap;
}
.week-block.fixed {
  background: #f0edf3;
  border-color: #d6cddd;
  color: #786887;
  cursor: default;
}
.week-block.completed {
  opacity: 0.5;
}
.week-block.conflict {
  border: 2px solid #cf8972;
  background: #fff0e8;
}
.week-block.dragging {
  opacity: 0.5;
  outline: 2px dashed #865ab0;
}
.week-block[data-movable] {
  cursor: grab;
}
.week-block [data-drag-handle] {
  touch-action: none;
  cursor: grab;
  min-width: 16px;
  text-align: center;
  font-size: 14px;
  line-height: 13px;
}
.week-day.drop-day {
  background-color: #ece4fb;
}
.calendar-feedback {
  min-height: 20px;
  margin: 8px 0;
}
.week-plan-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
}
.week-plan-footer p {
  margin: 0;
  font-size: 12px;
  color: #8e7d9a;
}
.app-dialog.calendar-dialog {
  max-width: 1280px;
  width: calc(100% - 28px);
}
.calendar-dialog .week-scroll {
  max-height: 72vh;
}
.phone-preview .week-grid {
  min-width: 1050px;
}
.phone-preview .week-scroll {
  max-height: 70vh;
}
.drag-time {
  position: fixed;
  z-index: 100;
  background: #69468b;
  color: white;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
  pointer-events: none;
  box-shadow: 0 5px 20px #39244730;
}
@media (max-width: 760px) {
  .week-grid {
    min-width: 1050px;
  }
  .week-scroll {
    max-height: 70vh;
  }
  .week-plan-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .week-plan .section-heading h1 {
    font-size: 28px;
  }
}

.week-plan .section-heading h1 {
  font-size: 32px;
  margin-bottom: 8px;
}
.week-plan .section-heading p {
  margin-bottom: 10px;
}
.week-plan {
  padding: 20px;
}
.week-plan .pill-row {
  margin: 8px 0;
}
.calendar-gap { position:absolute; left:3px; right:3px; border:1px dashed #b5a0d2; border-radius:6px; background:rgba(240,232,250,.35); color:#64478e; font-size:11px; overflow:hidden; padding:0 3px; cursor:pointer; }
.calendar-gap:hover,.calendar-gap:focus-visible { background:#e6d8f5; outline:2px solid #7954ad; }
.calendar-gap span { font-size:10px; }
