body {
  background:
    radial-gradient(circle at 12% 6%, rgba(14, 165, 233, .28), transparent 26rem),
    radial-gradient(circle at 78% 14%, rgba(168, 85, 247, .24), transparent 24rem),
    linear-gradient(135deg, #09111f 0%, #111827 52%, #10201d 100%);
  color: #e5edf7;
  min-height: 100vh;
}

.container {
  max-width: 1320px;
}

.navbar {
  background: rgba(9, 17, 31, .82) !important;
  border-color: rgba(148, 163, 184, .18) !important;
  backdrop-filter: blur(14px);
}

.navbar-brand {
  color: #f8fafc !important;
}

.text-secondary,
.small.text-secondary {
  color: #aab6c7 !important;
}

section {
  background: rgba(15, 23, 42, .76);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 1.15rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  padding: 1.25rem;
}

.form-control {
  background: rgba(15, 23, 42, .82);
  border-color: rgba(148, 163, 184, .28);
  color: #f8fafc;
}

.form-control:focus {
  background: rgba(15, 23, 42, .95);
  border-color: #38bdf8;
  box-shadow: 0 0 0 .25rem rgba(56, 189, 248, .18);
  color: #f8fafc;
}

.alert {
  background: rgba(30, 41, 59, .95);
  border-color: rgba(148, 163, 184, .22);
  color: #e5edf7;
}

.calendar-shell {
  background: linear-gradient(135deg, rgba(14, 165, 233, .18), rgba(168, 85, 247, .16), rgba(34, 197, 94, .12));
  border: 1px solid rgba(125, 211, 252, .22);
  border-radius: 1.15rem;
  padding: 1rem;
}

.calendar-widget {
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 45px rgba(0, 0, 0, .24);
  overflow: hidden;
  padding: .75rem;
}

.quick-picker {
  background: rgba(15, 23, 42, .7);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 1rem;
  display: grid;
  gap: .85rem;
  margin-bottom: .85rem;
  padding: .85rem;
}

.quick-picker-label {
  color: #93a4bb;
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: .42rem;
  text-transform: uppercase;
}

.quick-picker-options {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.quick-picker-pill {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 999px;
  color: #dbe7f5;
  cursor: pointer;
  display: inline-flex;
  font-size: .9rem;
  font-weight: 800;
  justify-content: center;
  min-height: 2.35rem;
  padding: .42rem .8rem;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.quick-picker-pill:hover {
  border-color: rgba(56, 189, 248, .7);
  transform: translateY(-1px);
}

.btn-check:checked + .quick-picker-pill {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #04111f;
}

.btn-check:checked + .quick-picker-pill.status-yes {
  background: #22c55e;
  border-color: #22c55e;
  color: #042f1a;
}

.btn-check:checked + .quick-picker-pill.status-no {
  background: #94a3b8;
  border-color: #94a3b8;
  color: #0f172a;
}

.quick-picker-feedback {
  background: rgba(56, 189, 248, .1);
  border: 1px solid rgba(56, 189, 248, .18);
  border-radius: .85rem;
  color: #bae6fd;
  font-size: .86rem;
  font-weight: 700;
  padding: .65rem .75rem;
}

.quick-picker-feedback.is-updated {
  background: rgba(34, 197, 94, .18);
  border-color: rgba(34, 197, 94, .32);
  color: #bbf7d0;
}

.fc {
  --fc-border-color: rgba(148, 163, 184, .18);
  --fc-button-active-bg-color: #38bdf8;
  --fc-button-active-border-color: #38bdf8;
  --fc-button-bg-color: rgba(15, 23, 42, .82);
  --fc-button-border-color: rgba(148, 163, 184, .24);
  --fc-button-text-color: #e5edf7;
  --fc-event-bg-color: #06b6d4;
  --fc-event-border-color: #06b6d4;
  --fc-event-text-color: #082f49;
  color: #dbe7f5;
  font-size: .9rem;
}

.fc .fc-toolbar-title {
  color: #f8fafc;
  font-size: 1.2rem;
  font-weight: 800;
}

.fc .fc-button {
  border-radius: 999px;
  box-shadow: none;
  font-weight: 700;
  padding: .35rem .75rem;
}

.fc .fc-daygrid-day {
  background: rgba(15, 23, 42, .55);
  cursor: pointer;
}

.fc .fc-day-today {
  background: rgba(245, 158, 11, .18) !important;
}

.fc .fc-daygrid-day-number {
  color: #f8fafc;
  font-weight: 800;
  padding: .45rem;
}

.fc .fc-col-header-cell-cushion {
  color: #93a4bb;
  font-size: .78rem;
  text-decoration: none;
  text-transform: uppercase;
}

.fc .fc-event {
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  padding: .12rem .35rem;
}

.fc .fc-event::before {
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: .48rem;
  margin-right: .25rem;
  width: .48rem;
}

.fc .tone-good {
  background: #22c55e;
  border-color: #22c55e;
  color: #042f1a;
}

.fc .tone-good::before {
  background: #dcfce7;
}

.fc .tone-mixed {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #2b1700;
}

.fc .tone-mixed::before {
  background: #fef3c7;
}

.fc .tone-partial {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #f5f3ff;
}

.fc .tone-partial::before {
  background: #ddd6fe;
}

.fc .tone-hard {
  background: #64748b;
  border-color: #64748b;
  color: #f8fafc;
}

.fc .tone-hard::before {
  background: #cbd5e1;
}

.fc .tone-open {
  background: rgba(148, 163, 184, .22);
  border-color: rgba(148, 163, 184, .22);
  color: #cbd5e1;
}

.fc .tone-open::before {
  background: #94a3b8;
}

.fc .day-good {
  background: linear-gradient(180deg, rgba(34, 197, 94, .18), rgba(15, 23, 42, .48));
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .36);
}

.fc .day-mixed {
  background: linear-gradient(180deg, rgba(245, 158, 11, .16), rgba(15, 23, 42, .48));
}

.fc .day-partial {
  background: linear-gradient(180deg, rgba(139, 92, 246, .18), rgba(15, 23, 42, .48));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .32);
}

.fc .day-hard {
  background: linear-gradient(180deg, rgba(100, 116, 139, .18), rgba(15, 23, 42, .52));
}

.calendar-panel-list {
  margin-top: 1rem;
}

.calendar-sheet-close {
  display: none;
}

.calendar-day-panel {
  display: none;
}

.calendar-day-panel.is-active {
  display: block;
}

.calendar-panel-heading {
  align-items: center;
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.calendar-panel-sticky {
  background: rgba(15, 23, 42, .92);
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: .95rem;
  margin-bottom: .85rem;
  padding: .75rem;
  position: sticky;
  top: .5rem;
  z-index: 3;
}

.day-summary {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: .9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .75rem;
}

.day-summary span {
  background: rgba(15, 23, 42, .45);
  border-radius: 999px;
  color: #dbe7f5;
  font-size: .84rem;
  padding: .28rem .55rem;
}

.calendar-panel-actions {
  display: grid;
  gap: .6rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: .75rem;
}

.calendar-panel-actions .btn {
  min-height: 2.75rem;
}

.day-tone {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: .82rem;
  font-weight: 900;
  gap: .35rem;
  padding: .35rem .6rem;
}

.day-tone::before {
  border-radius: 999px;
  content: "";
  height: .55rem;
  width: .55rem;
}

.day-tone.tone-good {
  background: rgba(34, 197, 94, .18);
  color: #bbf7d0;
}

.day-tone.tone-good::before {
  background: #22c55e;
}

.day-tone.tone-mixed {
  background: rgba(245, 158, 11, .18);
  color: #fde68a;
}

.day-tone.tone-mixed::before {
  background: #f59e0b;
}

.day-tone.tone-partial {
  background: rgba(139, 92, 246, .2);
  color: #ddd6fe;
}

.day-tone.tone-partial::before {
  background: #8b5cf6;
}

.day-tone.tone-hard {
  background: rgba(148, 163, 184, .16);
  color: #cbd5e1;
}

.day-tone.tone-hard::before,
.day-tone.tone-open::before {
  background: #94a3b8;
}

.day-tone.tone-open {
  background: rgba(148, 163, 184, .12);
  color: #cbd5e1;
}

.calendar-day-slots {
  display: grid;
  gap: .75rem;
}

.time-slot-card {
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: .95rem;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .18);
  padding: 1rem;
}

.schedule-shell {
  background: linear-gradient(135deg, rgba(14, 165, 233, .18), rgba(34, 197, 94, .12));
  border: 1px solid rgba(125, 211, 252, .22);
  border-radius: 1.15rem;
  padding: 1rem;
}

.schedule-board {
  display: grid;
  gap: .85rem;
  grid-auto-columns: minmax(17rem, 1fr);
  grid-auto-flow: column;
  overflow-x: auto;
  padding-bottom: .35rem;
}

.schedule-day {
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 1rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
  display: grid;
  gap: .75rem;
  min-width: 0;
  padding: .85rem;
}

.schedule-day-header {
  align-items: flex-start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.schedule-date {
  color: #f8fafc;
  font-weight: 900;
}

.schedule-best {
  color: #93a4bb;
  font-size: .82rem;
  margin-top: .15rem;
}

.schedule-slots {
  display: grid;
  gap: .65rem;
}

.schedule-slot {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: .9rem;
  display: grid;
  gap: .65rem;
  grid-template-columns: 4.9rem minmax(0, 1fr);
  min-height: 5.4rem;
  padding: .65rem;
}

.schedule-slot.is-full-day {
  border-color: rgba(56, 189, 248, .28);
}

.schedule-time {
  align-items: center;
  color: #bae6fd;
  display: flex;
  font-size: .78rem;
  font-weight: 900;
}

.schedule-slot-main {
  display: grid;
  gap: .5rem;
  min-width: 0;
}

.schedule-slot-title {
  color: #f8fafc;
  font-weight: 800;
}

.schedule-actions {
  display: grid;
  gap: .45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.schedule-choice {
  align-items: center;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: .75rem;
  color: #dbe7f5;
  cursor: pointer;
  display: inline-flex;
  font-size: .86rem;
  font-weight: 800;
  justify-content: center;
  min-height: 2.45rem;
  padding: .4rem .45rem;
  text-align: center;
}

.btn-check:checked + .schedule-choice-yes {
  background: #22c55e;
  border-color: #22c55e;
  color: #042f1a;
}

.btn-check:checked + .schedule-choice-no {
  background: #94a3b8;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-outline-secondary {
  --bs-btn-color: #cbd5e1;
  --bs-btn-border-color: rgba(148, 163, 184, .34);
  --bs-btn-hover-bg: rgba(56, 189, 248, .16);
  --bs-btn-hover-border-color: #38bdf8;
  --bs-btn-hover-color: #f8fafc;
  --bs-btn-active-bg: #38bdf8;
  --bs-btn-active-border-color: #38bdf8;
  --bs-btn-active-color: #082f49;
}

.btn-group .btn {
  min-height: 2.75rem;
}

.empty-state {
  background: rgba(15, 23, 42, .68);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: .9rem;
  color: #aab6c7;
  padding: 1rem;
}

.result-grid {
  display: grid;
  gap: .85rem;
}

.result-card {
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 1rem;
  display: grid;
  gap: .75rem;
  padding: 1rem;
}

.result-card.is-best {
  border-color: rgba(34, 197, 94, .65);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .12), 0 18px 40px rgba(34, 197, 94, .12);
}

.result-date {
  color: #93a4bb;
  font-size: .85rem;
  font-weight: 700;
}

.result-title {
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 800;
}

.result-score {
  align-items: center;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  border-radius: 999px;
  color: #04111f;
  display: inline-flex;
  font-weight: 900;
  height: 2.2rem;
  justify-content: center;
  width: 2.2rem;
}

.result-stats,
.result-people {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.result-stats span,
.status-pill {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 999px;
  color: #dbe7f5;
  font-size: .82rem;
  padding: .28rem .55rem;
}

.status-yes {
  background: rgba(34, 197, 94, .18);
  color: #bbf7d0;
}

.status-no {
  background: rgba(148, 163, 184, .16);
  color: #cbd5e1;
}

.app-version {
  color: #718096;
  font-size: .78rem;
  padding: 0 1rem 1rem;
  text-align: center;
}

.mobile-save-bar {
  display: none;
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: 6.75rem;
  }

  .container {
    padding-left: .85rem;
    padding-right: .85rem;
  }

  section {
    border-radius: 1rem;
    padding: 1rem;
  }

  .calendar-widget {
    border-radius: .95rem;
    padding: .5rem;
  }

  .quick-picker {
    gap: .75rem;
    padding: .75rem;
  }

  .quick-picker-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-picker-pill {
    border-radius: .85rem;
    font-size: .86rem;
    min-height: 2.65rem;
    padding: .38rem .45rem;
    text-align: center;
  }

  .fc {
    font-size: .82rem;
  }

  .fc .fc-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: .65rem;
  }

  .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
  }

  .fc .fc-toolbar-title {
    font-size: 1rem;
  }

  .fc .fc-daygrid-day-frame {
    min-height: 5.2rem;
  }

  [data-calendar-view="week"] .fc .fc-daygrid-day-frame {
    min-height: 8rem;
  }

  .fc .fc-daygrid-day-number {
    min-height: 2.75rem;
    min-width: 2.75rem;
  }

  .fc .fc-event {
    font-size: 0;
    justify-content: center;
    margin: .1rem auto;
    min-height: .9rem;
    padding: .15rem;
    width: .9rem;
  }

  .fc .fc-event::before {
    height: .55rem;
    margin-right: 0;
    width: .55rem;
  }

  .calendar-panel-list {
    background: rgba(15, 23, 42, .96);
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 1.35rem 1.35rem 0 0;
    bottom: 0;
    box-shadow: 0 -24px 70px rgba(0, 0, 0, .45);
    left: 0;
    margin-top: 0;
    max-height: 72vh;
    opacity: 0;
    overflow: auto;
    padding: 1rem;
    pointer-events: none;
    position: fixed;
    right: 0;
    transform: translateY(100%);
    transition: transform .22s ease, opacity .22s ease;
    z-index: 1050;
  }

  .calendar-shell.is-sheet-open .calendar-panel-list {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .calendar-panel-list::before {
    background: rgba(203, 213, 225, .36);
    border-radius: 999px;
    content: "";
    display: block;
    height: .28rem;
    margin: 0 auto .85rem;
    width: 3.2rem;
  }

  .calendar-sheet-close {
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    color: #e5edf7;
    display: inline-flex;
    height: 2.75rem;
    justify-content: center;
    position: absolute;
    right: 1rem;
    top: .8rem;
    width: 2.75rem;
  }

  .calendar-panel-heading {
    padding-right: 3.25rem;
  }

  .calendar-panel-sticky {
    border-radius: 1rem;
    top: 0;
  }

  .calendar-day-slots {
    gap: .9rem;
  }

  .schedule-shell {
    padding: .75rem;
  }

  .schedule-board {
    display: grid;
    gap: 1rem;
    grid-auto-flow: row;
    overflow: visible;
  }

  .schedule-day {
    padding: .75rem;
  }

  .schedule-day-header {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-slot {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .schedule-time {
    min-height: auto;
  }

  .calendar-panel-actions {
    grid-template-columns: 1fr;
  }

  .time-slot-card {
    padding: 1rem;
  }

  .time-slot-card .btn-group {
    display: grid;
    gap: .45rem;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .time-slot-card .btn {
    border-radius: .85rem !important;
    text-align: center;
    width: 100%;
  }

  .mobile-save-bar {
    align-items: center;
    background: rgba(9, 17, 31, .96);
    border: 1px solid rgba(125, 211, 252, .22);
    border-radius: 1rem 1rem 0 0;
    bottom: 0;
    box-shadow: 0 -18px 48px rgba(0, 0, 0, .42);
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    left: 0;
    padding: .85rem;
    position: fixed;
    right: 0;
    z-index: 1040;
  }

  .mobile-save-bar.is-dirty {
    border-color: rgba(34, 197, 94, .45);
    box-shadow: 0 -18px 52px rgba(34, 197, 94, .16), 0 -18px 48px rgba(0, 0, 0, .42);
  }

  .mobile-save-status {
    display: grid;
    gap: .1rem;
    min-width: 0;
  }

  .mobile-save-status span {
    color: #f8fafc;
    font-size: .9rem;
    font-weight: 900;
  }

  .mobile-save-status small {
    color: #93a4bb;
    font-size: .78rem;
    font-weight: 700;
  }

  .mobile-save-bar.is-dirty .mobile-save-status small {
    color: #bbf7d0;
  }

  .mobile-save-bar .btn {
    min-height: 2.85rem;
    padding-left: .9rem;
    padding-right: .9rem;
  }
}
