:root {
  --cream: #F1EEE9;
  --cream-deep: #DBD4C9;
  --ink: #000000;
  --muted: #6E6A64;
  --rule: #D4D2CF;
  --bg: #FFFFFF;
  --green: #4F6F45;
  --amber: #96671A;
  --red: #A6472F;
  --card: #F1EEE9;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:hover { color: var(--muted); }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.brand img { width: 56px; height: auto; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.eyebrow {
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.h-serif {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  margin: 0;
}
.meta { color: var(--muted); font-size: 13px; }

.nav-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.nav-people a, .nav-people button {
  appearance: none;
  border: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.16em;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
}
.nav-people a:hover, .nav-people button:hover { background: var(--cream-deep); }
.nav-people a.is-active, .nav-people button.is-active {
  background: var(--ink);
  color: #fff;
}
.nav-people a.team-link {
  background: transparent;
  border: 1px solid var(--rule);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch {
  width: 10px; height: 10px;
  display: inline-block;
  border-radius: 1px;
}
.swatch.shoot { background: var(--green); }
.swatch.office { background: var(--amber); }
.swatch.off { background: var(--muted); }
.swatch.travel { background: var(--red); }
.swatch.other { background: var(--cream-deep); }

.week-block { margin: 0 0 36px; }
.week-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
}
.week-head h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: 26px;
  margin: 0;
}

.team-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
}
.team-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 720px;
  background: #fff;
}
.team-table th, .team-table td {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid #eee;
  vertical-align: top;
  padding: 8px;
  text-align: left;
}
.team-table th {
  background: var(--cream);
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  position: sticky;
  top: 0;
  z-index: 1;
}
.team-table th.person-col,
.team-table td.person-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
  min-width: 110px;
  max-width: 130px;
  font-weight: 500;
  border-right: 1px solid var(--rule);
}
.team-table th.person-col { background: var(--cream); z-index: 3; }
.team-table td.person-col a {
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 13px;
}
.day-cell { min-width: 108px; max-width: 140px; }
.day-cell .kind {
  display: inline-block;
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: 0.14em;
  padding: 2px 5px;
  margin-bottom: 4px;
}
.kind.shoot { background: #E6EDE3; color: var(--green); }
.kind.office { background: #F3E9D4; color: var(--amber); }
.kind.off { background: #ECEAE7; color: var(--muted); }
.kind.travel { background: #F3E2DD; color: var(--red); }
.kind.other { background: var(--cream-deep); color: var(--ink); }
.day-cell .title {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.day-cell .time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.day-cell.empty { background: #fafafa; color: var(--muted); font-size: 11px; }
.day-cell.today { outline: 2px solid var(--ink); outline-offset: -2px; }

.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.card {
  background: var(--card);
  padding: 14px 14px 16px;
  min-height: 120px;
}
.card.today { box-shadow: inset 0 0 0 2px var(--ink); }
.card .dow {
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.card .date {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: 22px;
  margin: 2px 0 10px;
}
.card .title { font-weight: 500; font-size: 14px; line-height: 1.4; white-space: pre-line; }
.card .time { color: var(--muted); font-size: 12px; margin-top: 6px; }
.card.empty .title { color: var(--muted); font-weight: 300; }

.back {
  display: inline-block;
  margin-bottom: 18px;
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--muted);
}
.back:hover { color: var(--ink); }

.status {
  padding: 40px 0;
  color: var(--muted);
  font-style: italic;
}
.error { color: var(--red); }

footer.site-foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  .wrap { padding: 20px 14px 48px; }
  .person-grid { grid-template-columns: 1fr 1fr; }
  .brand img { width: 48px; }
}

.auth { max-width: 440px; margin: 6vh auto 0; }
.auth .h-serif { margin: 10px 0 6px; }
.lede { color: var(--muted); margin: 0 0 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.field label {
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.field input {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--rule);
  background: #fff;
  padding: 12px;
  width: 100%;
}
.btn, .text-btn { font: inherit; cursor: pointer; }
.btn {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 12px 14px;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.banner { padding: 12px 14px; margin: 0 0 16px; background: #F3E2DD; color: var(--red); }
.banner.good { background: #E6EDE3; color: var(--green); }
.text-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin-left: 6px;
  color: var(--muted);
  text-decoration: underline;
}
.switch-auth {
  margin: 16px 0 0;
  font-size: 13px;
}
.switch-auth button { margin-left: 6px; }
.admin-panel { background: var(--cream); padding: 14px; margin: 0 0 22px; }
.admin-panel summary { cursor: pointer; }
.admin-label {
  margin: 0 0 8px;
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
}
.admin-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-row select {
  font: inherit;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 10px 8px;
}
.admin-note, .email-meta { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.email-frame {
  width: 100%;
  height: 740px;
  border: 1px solid var(--rule);
  background: #fff;
  margin-top: 12px;
}

/* Clickable shifts */
.day-cell.has-shift,
.card.has-shift {
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.day-cell.has-shift:hover {
  background: #F8F5F0;
}
.day-cell.has-shift:focus-visible,
.card.has-shift:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.card.has-shift:hover {
  box-shadow: inset 0 0 0 1px var(--cream-deep);
}
.day-cell.is-open,
.card.is-open {
  box-shadow: inset 0 0 0 2px var(--ink);
}

/* Slide-over event panel */
.drawer-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.drawer-root.is-open {
  pointer-events: auto;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.drawer-root.is-open .drawer-backdrop {
  opacity: 1;
}
.shift-drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100vw);
  background: #fff;
  border-left: 1px solid var(--rule);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.08);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer-root.is-open .shift-drawer {
  transform: translateX(0);
}
.drawer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
}
.drawer-top .eyebrow {
  margin-bottom: 6px;
}
.drawer-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  cursor: pointer;
  padding: 6px 0 6px 10px;
  flex-shrink: 0;
}
.drawer-close:hover { color: var(--ink); }
.drawer-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}
.drawer-kind {
  display: inline-block;
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 5px 9px;
  margin-bottom: 14px;
}
.drawer-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: 32px;
  line-height: 1.15;
  margin: 0 0 8px;
}
.drawer-time {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 22px;
}
.drawer-section {
  margin: 0 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.drawer-section h3 {
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 10px;
}
.drawer-dl {
  margin: 0;
}
.drawer-dl dt {
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 3px;
}
.drawer-dl dd {
  margin: 0 0 12px;
  font-weight: 500;
  font-size: 14px;
  white-space: pre-line;
}
.drawer-crew {
  list-style: none;
  margin: 0;
  padding: 0;
}
.drawer-crew li {
  margin: 0 0 8px;
}
.drawer-crew a {
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid rgba(0,0,0,.2);
}
.drawer-crew a:hover { border-bottom-color: var(--ink); }
.drawer-raw {
  background: var(--cream);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--ink);
}
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.drawer-actions a {
  display: inline-block;
  font-family: "Archivo", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
}
.drawer-actions a.secondary {
  background: var(--cream);
  color: var(--ink);
}
.drawer-actions a:hover { opacity: 0.88; }
body.drawer-open { overflow: hidden; }

@media (max-width: 480px) {
  .shift-drawer { width: 100vw; }
}
