/* Mill Ridge Pool — styles.css */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Serif+Display&display=swap');

:root {
  --navy:        #1b2428;
  --navy-80:     rgba(27,36,40,0.8);
  --blue:        #0092cb;
  --blue-dark:   #0078a8;
  --blue-light:  #e0f4fc;
  --sky:         #82cef4;
  --orange:      #cb3900;
  --orange-bg:   #fff5f0;
  --green:       #16a34a;
  --green-bg:    #f0fdf4;
  --green-border:#bbf7d0;
  --white:       #ffffff;
  --gray-50:     #f8f9fa;
  --gray-100:    #f1f3f5;
  --gray-200:    #e2e8ed;
  --gray-400:    #9ba8b0;
  --gray-600:    #4b5563;
  --page-bg:     #f0f4f7;
  --font-serif:  'DM Serif Display', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, -apple-system, sans-serif;
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.13);
  --tap:         52px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--navy);
  line-height: 1.5;
  min-height: 100vh;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ─── LANDING PAGE ──────────────────────────────────────────────────────── */

body[data-page="landing"] { background: var(--white); }

.landing-header {
  background: var(--navy);
  padding: 2.25rem 1.5rem 2.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.landing-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: var(--white);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.landing-header__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 0.85rem;
  opacity: 0.85;
}

.landing-header__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 3rem);
  color: var(--white);
  margin: 0 0 0.4rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.landing-header__subtitle {
  font-size: 1rem;
  color: var(--sky);
  margin: 0;
  opacity: 0.85;
}

.landing-main {
  max-width: 540px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.landing-hero {
  text-align: center;
  padding: 0 0 2rem;
}

.landing-hero__heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  color: var(--navy);
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.landing-hero__text {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.65;
  max-width: 34rem;
  margin: 0 auto;
}

/* Steps */
.landing-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0 0 2rem;
  padding: 1.1rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  position: relative;
}

.landing-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 25%;
  right: 25%;
  height: 1px;
  background: var(--gray-200);
  z-index: 0;
}

.landing-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.landing-step__num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--gray-50);
}

.landing-step__label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-600);
  line-height: 1.3;
  max-width: 80px;
}

/* Form card */
.landing-form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.landing-form-card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0 0 1.35rem;
  color: var(--navy);
}

.landing-form { display: flex; flex-direction: column; gap: 1rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn--landing-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(0,146,203,0.35);
}

.btn--landing-submit:hover {
  background: var(--blue-dark);
  box-shadow: 0 6px 20px rgba(0,146,203,0.4);
  transform: translateY(-1px);
}
.btn--landing-submit:active { transform: scale(0.99); box-shadow: none; }
.btn--landing-submit:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.landing-success {
  background: var(--green-bg);
  border: 2px solid var(--green-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  text-align: center;
}

.landing-success__icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.landing-success__message { font-size: 1.2rem; font-weight: 600; color: var(--navy); margin: 0 0 0.5rem; }
.landing-success__hint { font-size: 0.95rem; color: var(--gray-600); margin: 0; }

.landing-footer {
  max-width: 540px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  text-align: center;
}

.landing-footer__note { font-size: 0.9rem; color: var(--gray-400); margin: 0 0 0.5rem; }
.landing-footer__link-wrap { margin: 0; }
.landing-footer__link { font-size: 0.9rem; color: var(--blue); text-decoration: none; font-weight: 500; }
.landing-footer__link:hover { text-decoration: underline; }

/* ─── SHARED FORMS ──────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 0.3rem; }

.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field-input {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--navy);
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  min-height: var(--tap);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}

.field-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,146,203,0.12);
}

.field-input.field-error-input { border-color: var(--orange); border-width: 2px; }
.field-input--lg { min-height: 54px; font-size: 1rem; }

.field-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
}

.field-error { font-size: 0.8rem; color: var(--orange); font-weight: 600; margin: 0; }
.field-textarea { resize: vertical; min-height: 88px; line-height: 1.5; }

.field--check { flex-direction: row; align-items: center; gap: 0.65rem; min-height: var(--tap); }
.field--check-lg input { width: 1.25rem; height: 1.25rem; flex-shrink: 0; accent-color: var(--blue); }
.field--check-lg span { font-size: 1rem; }
.optional { font-weight: 400; color: var(--gray-400); font-size: 0.85em; }

/* ─── BUTTONS ───────────────────────────────────────────────────────────── */

.btn {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  min-height: var(--tap);
  padding: 0 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  transition: background 0.12s, border-color 0.12s, transform 0.08s, box-shadow 0.12s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.btn--primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn--primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn--secondary { background: var(--white); color: var(--navy); border-color: var(--gray-200); box-shadow: var(--shadow-sm); }
.btn--secondary:hover { background: var(--gray-50); }

.btn--ghost { background: transparent; color: var(--gray-600); border-color: var(--gray-200); }
.btn--ghost:hover { background: var(--gray-100); }

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

.btn--block { width: 100%; }

.link-button {
  background: none; border: none; padding: 0;
  font: inherit; font-size: 0.9rem;
  color: var(--blue); cursor: pointer;
  text-decoration: underline;
  min-height: var(--tap);
  display: inline-flex; align-items: center;
}

.form-hint { margin: -0.1rem 0 0.35rem; font-size: 0.85rem; color: var(--gray-600); }
.modal-footer-link { text-align: center; margin: 0.85rem 0 0; }

/* ─── BANNERS ───────────────────────────────────────────────────────────── */

.banner {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.banner--error { background: var(--orange-bg); color: var(--orange); border: 1.5px solid var(--orange); }

.banner--signup {
  background: var(--blue-light);
  border: 1.5px solid var(--sky);
  text-align: center;
}
.banner--signup a { color: var(--navy); font-weight: 700; text-decoration: none; }
.banner--signup a:hover { text-decoration: underline; }

.banner--load-error { background: var(--orange-bg); color: var(--orange); border: 1.5px solid var(--orange); text-align: center; }

.banner--pool-closed {
  background: #fffbeb;
  color: #92400e;
  border: 1.5px solid #fcd34d;
  text-align: center;
  font-size: 0.95rem;
}

/* ─── CALENDAR PAGE ─────────────────────────────────────────────────────── */

.page { max-width: 1280px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.page--calendar { max-width: 1440px; }

/* Site header */
.cal-site-header {
  background: var(--navy);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.landing-header__logo {
  margin-bottom: 1rem;
}

.landing-logo {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  mix-blend-mode: screen;
}

.cal-header-logo {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  vertical-align: middle;
  mix-blend-mode: screen;
}

.cal-site-header__brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cal-site-header__greeting {
  font-size: 0.85rem;
  color: var(--sky);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Admin banner */
.admin-top-banner[hidden] { display: none !important; }

.admin-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: #fef9ed;
  border-bottom: 2px solid #f59e0b;
}

.admin-top-banner__text { margin: 0; font-weight: 600; font-size: 0.88rem; color: #92400e; }

/* Page header */
.calendar-page-header {
  padding: 1.25rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1rem;
}

.calendar-greeting { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 0.15rem; }

.calendar-page-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 0;
  line-height: 1.1;
}

/* Pool tabs */
.pool-tabs {
  display: inline-flex;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.pool-tab {
  min-height: 38px;
  padding: 0 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: calc(var(--radius) - 1px);
  background: transparent;
  color: var(--gray-600);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.pool-tab--active {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.pool-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Month toolbar */
.month-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.6rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.month-label {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.15rem;
  margin: 0;
  text-align: center;
  flex: 1;
  color: var(--navy);
}

.week-nav-btn {
  min-height: 36px;
  min-width: 36px;
  padding: 0;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--navy);
  font-family: var(--font-sans);
  transition: background 0.12s, border-color 0.12s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.week-nav-btn:hover { background: var(--gray-50); border-color: var(--gray-400); }
.week-nav-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Loading — hidden always */
.calendar-loading { display: none !important; }

/* ─── MONTH CALENDAR GRID ───────────────────────────────────────────────── */

.month-cal {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.month-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--gray-50);
  border-bottom: 1.5px solid var(--gray-200);
}

.month-dow {
  padding: 0.55rem 0.25rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray-400);
  border-right: 1px solid var(--gray-200);
}
.month-dow:last-child { border-right: none; }

.month-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--gray-200);
}
.month-week:last-child { border-bottom: none; }

.month-day {
  min-height: 120px;
  border-right: 1px solid var(--gray-200);
  padding: 0.4rem 0.35rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}
.month-day:last-child { border-right: none; }

.month-day--today { background: #fafeff; }

.month-day--today .month-day-num {
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  box-shadow: 0 0 0 3px rgba(0,146,203,0.15);
}

.month-day--pad { background: var(--gray-50); min-height: 80px; }

.month-day-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  align-self: flex-start;
}

.month-chips { display: flex; flex-direction: column; gap: 2px; flex: 1; }

/* Drag drop */
.chip-slot { min-height: 22px; }
.chip-slot--drop.chip-slot--drag-over {
  outline: 2px dashed var(--blue);
  outline-offset: 2px;
  background: var(--blue-light);
  border-radius: var(--radius-sm);
}

/* Chips */
.month-chip {
  display: block;
  width: 100%;
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  padding: 0.22rem 0.2rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: default;
  position: relative;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

/* Past slots — very muted, just a line */
.month-chip--past {
  background: transparent;
  color: var(--gray-200);
  border-color: var(--gray-200);
  font-size: 0.62rem;
}

.month-chip--locked {
  background: var(--gray-100);
  color: var(--gray-400);
  border-color: var(--gray-200);
  font-size: 0.65rem;
  cursor: not-allowed;
  opacity: 0.55;
}

/* Open slots — inviting blue */
.month-chip--open {
  background: var(--blue-light);
  color: var(--blue-dark);
  border-color: var(--sky);
  cursor: pointer;
  min-height: 24px;
  transition: background 0.12s, transform 0.08s;
}
.month-chip--open:hover {
  background: #c5eaf8;
  border-color: var(--blue);
  transform: scale(1.02);
}

.month-chip--taken { background: var(--navy); color: var(--white); border-color: var(--navy); }

.month-chip--mine {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.month-chip--done { background: var(--navy); color: var(--white); border-color: var(--navy); }

.month-chip__dot {
  position: absolute;
  top: 2px; right: 3px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #4ade80;
}

.month-chip--dragging { opacity: 0.45; }

.month-chip__mine-btn,
.month-chip__cancel {
  font: inherit; font-size: 0.65rem; font-weight: 700;
  border: none; background: transparent; color: inherit;
  cursor: pointer; padding: 0.1rem;
  min-height: 24px;
}
.month-chip__cancel { color: rgba(255,255,255,0.7); text-decoration: underline; font-weight: 400; }

/* ─── MODALS ────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(27,36,40,0.55);
  z-index: 1000;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.modal-backdrop[hidden] { display: none !important; }

.modal-backdrop--center:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in 150ms ease-out;
}

.modal-backdrop--sheet:not([hidden]) {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade-in 150ms ease-out;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem 1.35rem 1.75rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  animation: modal-pop 200ms cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes modal-pop {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal--sheet {
  max-width: 560px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: 0;
  max-height: 92vh;
  animation: sheet-up 250ms cubic-bezier(0.32,0.72,0,1);
}

.modal--sheet::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
  color: var(--navy);
}

.modal-meta {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.modal-meta::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

.modal-form { display: flex; flex-direction: column; gap: 0.85rem; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .modal-backdrop--sheet:not([hidden]) { padding-bottom: 5vh; }
  .modal--sheet { border-radius: var(--radius-lg); }
  .modal--sheet::before { display: none; }
}

/* ─── ADMIN ─────────────────────────────────────────────────────────────── */

.admin-panel {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.admin-details__summary {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.35rem 0;
  color: var(--navy);
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

.admin-filter { display: flex; flex-direction: column; gap: 0.25rem; }
.admin-filter__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gray-400); }
.admin-filter .field-input { min-height: 38px; font-size: 0.88rem; }

.admin-broadcast {
  margin-bottom: 1.5rem;
  padding: 1.1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
}

.admin-broadcast__title { font-family: var(--font-serif); font-size: 1rem; margin: 0 0 0.35rem; color: var(--navy); }
.admin-broadcast__hint { font-size: 0.82rem; color: var(--gray-600); margin: 0 0 0.75rem; }
.admin-broadcast .field { margin-bottom: 0.65rem; }
.admin-broadcast__progress { margin: 0.65rem 0 0; font-size: 0.88rem; color: var(--navy); font-weight: 500; }

.admin-table-wrap { overflow-x: auto; margin-top: 0.5rem; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th, .admin-table td { border: 1px solid var(--gray-200); padding: 0.5rem 0.65rem; text-align: left; vertical-align: middle; }
.admin-table th { background: var(--gray-50); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gray-400); white-space: nowrap; }

.admin-remove {
  min-height: 32px; padding: 0 0.65rem; font-size: 0.8rem;
  background: var(--white); border: 1.5px solid #fecaca; color: #dc2626;
  border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-sans); font-weight: 600; white-space: nowrap;
}
.admin-remove:hover { background: #fef2f2; }

/* Returning user bar */
.returning-bar {
  background: var(--white);
  border: 1.5px solid var(--blue-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.returning-bar__text {
  font-size: 0.95rem;
  color: var(--navy);
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.returning-bar__form {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.returning-bar__input {
  flex: 1;
  min-width: 200px;
  min-height: 44px;
}

.returning-bar__error {
  font-size: 0.85rem;
  color: var(--orange);
  font-weight: 600;
  margin: 0.5rem 0 0;
}

/* Site footer */

.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.site-footer--calendar { border-top: none; padding-top: 0.5rem; }

.footer-link {
  color: var(--gray-400); text-decoration: none; font-size: 0.82rem;
  min-height: var(--tap); display: inline-flex; align-items: center;
  transition: color 0.12s;
}
.footer-link:hover { color: var(--navy); }

/* ─── CANCEL FLOW ───────────────────────────────────────────────────────── */

.cancel-flow-overlay:not([hidden]) {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: rgba(27,36,40,0.6);
  backdrop-filter: blur(3px);
}

.cancel-flow-panel {
  max-width: 24rem; width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem 1.5rem;
}

.cancel-flow-title { font-family: var(--font-serif); font-size: 1.35rem; margin: 0 0 0.85rem; font-weight: 400; }
.cancel-flow-question { font-size: 1rem; margin: 0 0 1.35rem; line-height: 1.55; color: var(--gray-600); }
.cancel-flow-done p { margin: 0 0 1rem; font-size: 1rem; color: var(--gray-600); }
.cancel-flow-back { display: block; text-align: center; text-decoration: none; }
body.cancel-flow-active { overflow: hidden; }

/* ─── MOBILE ────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  /* Landing */
  .landing-header { padding: 1.75rem 1.25rem 2.5rem; }
  .landing-main { padding: 1.5rem 1rem 3rem; }
  .form-row { grid-template-columns: 1fr; gap: 1rem; }
  .landing-form-card { padding: 1.35rem 1.1rem 1.5rem; border-radius: var(--radius); }
  .landing-steps { gap: 0; }
  .landing-step__label { font-size: 0.72rem; max-width: 70px; }

  /* Calendar header */
  .cal-site-header { padding: 0.75rem 1rem; }
  .cal-site-header__greeting { display: none; }
  .page { padding: 0.85rem 0.75rem 3rem; }

  .calendar-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 1rem 0 0.85rem;
  }

  .pool-tabs { width: 100%; }
  .pool-tab { flex: 1; font-size: 0.85rem; }

  .month-toolbar { padding: 0.5rem 0.65rem; margin-bottom: 0.65rem; }
  .month-label { font-size: 1rem; }

  /* Calendar grid — mobile list view */
  .month-dow-row { display: none; }

  .month-week {
    display: flex;
    flex-direction: column;
  }

  .month-day {
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.65rem 0.75rem;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }

  .month-day--pad { display: none; }

  .month-day--today { border-left: 3px solid var(--blue); }

  .month-day-num {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.15rem;
  }

  .month-day--today .month-day-num {
    background: var(--blue);
    color: var(--white);
    border-radius: 50%;
    width: 32px; height: 32px;
    font-size: 0.85rem;
    box-shadow: 0 0 0 3px rgba(0,146,203,0.15);
  }

  .month-chips {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
    gap: 4px;
  }

  .chip-slot {
    flex: 0 0 auto;
    min-width: 52px;
    min-height: var(--tap);
  }

  .month-chip {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
    min-height: var(--tap);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .month-chip--open { min-height: var(--tap); }
  .month-chip__mine-btn, .month-chip__cancel { min-height: var(--tap); font-size: 0.75rem; }

  /* Modals full screen on mobile */
  .modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.25rem 1.1rem 2rem;
  }

  .modal-backdrop--center:not([hidden]) {
    align-items: flex-end;
    padding: 0;
  }

  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }

  /* Admin */
  .admin-filters { flex-direction: column; }
  .admin-filter { width: 100%; }
  .admin-table { font-size: 0.78rem; }
}

@media (max-width: 380px) {
  .landing-form-card { padding: 1.1rem 0.9rem; }
  .chip-slot { min-width: 46px; }
  .month-chip { font-size: 0.7rem; padding: 0.35rem 0.4rem; }
}
