:root {
  color-scheme: light;
  --ink: #2d3250;
  --ink-soft: #424769;
  --muted: #7077a1;
  --peach: #f6b17a;
  --peach-light: #fff1e5;
  --paper: #fcfaf8;
  --white: #fff;
  --line: rgba(45, 50, 80, .12);
  --shadow: 0 24px 70px rgba(45, 50, 80, .11);
  --shadow-soft: 0 12px 35px rgba(45, 50, 80, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 93% 4%, rgba(246, 177, 122, .16), transparent 24rem),
    linear-gradient(180deg, #fdfbf9 0%, #f8f6f5 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(246, 177, 122, .55);
  outline-offset: 3px;
}
svg { display: block; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
}
.ambient-one {
  top: 18rem;
  left: -10rem;
  width: 20rem;
  height: 20rem;
  background: rgba(112, 119, 161, .08);
}
.ambient-two {
  right: -7rem;
  bottom: 7rem;
  width: 16rem;
  height: 16rem;
  background: rgba(246, 177, 122, .1);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 92px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-size: 21px;
  font-weight: 780;
  letter-spacing: -.04em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--white);
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 0 7px 16px rgba(45, 50, 80, .22);
}
.brand-mark svg {
  width: 23px;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-actions, .hero, .hero-stats, .calendar-heading, .section-heading,
.agenda-tools, .week-controls, .next-card-top, .drawer-heading, .drawer-actions {
  display: flex;
  align-items: center;
}
.topbar-actions { gap: 22px; }
.today-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.button {
  display: inline-flex;
  min-height: 46px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  color: var(--ink);
  border: 0;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 760;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.button-primary {
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(45, 50, 80, .2);
}
.button-primary:hover {
  background: var(--ink-soft);
  box-shadow: 0 13px 28px rgba(45, 50, 80, .25);
}
.button-quiet { background: #f1f0f3; }

.app-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 62px 0 36px;
}
.hero {
  justify-content: space-between;
  padding: 0 4px 46px;
}
.eyebrow, .section-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
}
.hero h1 {
  max-width: 700px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6.3vw, 78px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .96;
}
.hero h1 em {
  color: var(--peach);
  font-weight: 500;
}
.hero-copy {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.hero-stats {
  flex-shrink: 0;
  gap: 30px;
  padding: 19px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .62);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.hero-stats div { display: grid; gap: 2px; }
.hero-stats div + div {
  padding-left: 30px;
  border-left: 1px solid var(--line);
}
.hero-stats span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 700;
}
.hero-stats small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.calendar-card, .agenda-panel, .next-card, .tip-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}
.calendar-card {
  padding: 27px 30px 20px;
  overflow: hidden;
  border-radius: 28px;
}
.calendar-heading, .section-heading, .next-card-top, .drawer-heading, .drawer-actions {
  justify-content: space-between;
}
.calendar-heading h2, .section-heading h2, .drawer-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -.035em;
}
.week-controls { gap: 7px; }
.icon-button, .text-button {
  display: grid;
  height: 36px;
  place-items: center;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
}
.icon-button { width: 36px; padding: 0; }
.icon-button:hover, .text-button:hover {
  color: var(--white);
  background: var(--ink-soft);
}
.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.text-button {
  padding: 0 13px;
  font-size: 11px;
  font-weight: 750;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(80px, 1fr));
  gap: 9px;
  margin-top: 21px;
}
.day-button {
  display: grid;
  min-height: 96px;
  place-items: center;
  padding: 12px 8px;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 17px;
  background: transparent;
  transition: 180ms ease;
}
.day-button:hover {
  border-color: var(--line);
  background: var(--paper);
}
.day-button.selected {
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 12px 25px rgba(45, 50, 80, .22);
}
.day-button .weekday {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.day-button .day-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
}
.day-button .event-dots {
  display: flex;
  height: 6px;
  gap: 3px;
  align-items: center;
}
.event-dots i {
  width: 4px;
  height: 4px;
  border-radius: 99px;
  background: var(--peach);
}
.day-button:not(.selected) .event-dots i:nth-child(even) { background: var(--muted); }

.schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: 24px;
}
.agenda-panel {
  min-height: 460px;
  padding: 29px 30px 20px;
  border-radius: 28px;
}
.agenda-tools { gap: 9px; }
.search-box {
  display: flex;
  width: 140px;
  height: 38px;
  gap: 7px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.search-box:focus-within {
  border-color: var(--muted);
  box-shadow: 0 0 0 3px rgba(112, 119, 161, .12);
}
.search-box svg {
  width: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
}
.search-box input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}
.agenda-tools select {
  height: 38px;
  padding: 0 31px 0 12px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: var(--paper);
  font-size: 11px;
  font-weight: 700;
}
.agenda-list { margin-top: 22px; }
.agenda-item {
  display: grid;
  grid-template-columns: 93px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 90px;
  padding: 12px 9px 12px 0;
  border-top: 1px solid var(--line);
  animation: item-in 260ms ease both;
}
@keyframes item-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
.agenda-item:first-child { border-top: 0; }
.agenda-time {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.agenda-time span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.event-details {
  position: relative;
  padding-left: 18px;
}
.event-details::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 4px;
  border-radius: 99px;
  background: var(--event-color, var(--muted));
  content: "";
}
.event-details h3 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 780;
  letter-spacing: -.015em;
}
.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}
.category-tag {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-weight: 750;
}
.category-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 99px;
}
.category-dot.focus { background: var(--ink-soft); }
.category-dot.meeting { background: var(--peach); }
.category-dot.personal { background: var(--muted); }
.category-dot.wellness { background: #95a38d; }
.item-actions {
  display: flex;
  gap: 5px;
  opacity: 0;
  transform: translateX(5px);
  transition: 160ms ease;
}
.agenda-item:hover .item-actions, .agenda-item:focus-within .item-actions {
  opacity: 1;
  transform: translateX(0);
}
.item-action {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  border: 0;
  border-radius: 10px;
  background: transparent;
}
.item-action:hover { color: var(--ink); background: #f0eff2; }
.item-action.delete:hover { color: #a84f4f; background: #fff0ef; }
.item-action svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state {
  display: grid;
  min-height: 310px;
  place-items: center;
  text-align: center;
}
.empty-state > div { max-width: 285px; }
.empty-illustration {
  position: relative;
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  place-items: center;
  color: var(--ink-soft);
  border-radius: 25px;
  background: var(--peach-light);
}
.empty-illustration::after {
  position: absolute;
  right: -3px;
  bottom: 0;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--peach);
  content: "+";
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}
.empty-illustration svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.empty-state h3 {
  margin: 0 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}
.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.next-card, .tip-card { border-radius: 18px; }
.next-card {
  padding: 24px;
  color: var(--white);
  border: 0;
  background:
    radial-gradient(circle at 95% 0%, rgba(246, 177, 122, .18), transparent 11rem),
    var(--ink);
  box-shadow: 0 20px 50px rgba(45, 50, 80, .2);
}
.next-card .section-kicker {
  color: rgba(255, 255, 255, .57);
  margin: 0;
}
.live-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
}
.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--peach);
  box-shadow: 0 0 0 4px rgba(246, 177, 122, .12);
}
.next-event { margin-top: 26px; }
.next-event .countdown {
  color: var(--peach);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 33px;
  font-weight: 650;
  letter-spacing: -.04em;
}
.next-event h3 { margin: 10px 0 9px; font-size: 16px; }
.next-event p, .nothing-next {
  margin: 0;
  color: rgba(255, 255, 255, .65);
  font-size: 11px;
  line-height: 1.6;
}
.nothing-next { padding: 27px 0 8px; }
.tip-card {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 21px;
  box-shadow: var(--shadow-soft);
}
.tip-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink);
  border-radius: 12px;
  background: var(--peach-light);
}
.tip-icon svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.tip-card strong { display: block; margin: 2px 0 5px; font-size: 11px; }
.tip-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 12px 4px 38px;
  color: var(--muted);
  font-size: 10px;
}
footer p { margin: 0; }
footer a {
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
}
footer a:hover { color: var(--peach); }

.drawer-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  opacity: 0;
  background: rgba(25, 29, 48, .42);
  backdrop-filter: blur(5px);
  transition: opacity 230ms ease;
}
.drawer-backdrop.visible { opacity: 1; }
.schedule-drawer {
  position: fixed;
  z-index: 21;
  top: 0;
  right: 0;
  width: min(470px, 100%);
  height: 100dvh;
  overflow-y: auto;
  padding: 38px 38px 30px;
  visibility: hidden;
  background: var(--white);
  box-shadow: -25px 0 80px rgba(45, 50, 80, .18);
  transform: translateX(102%);
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1), visibility 260ms;
}
.schedule-drawer.open {
  visibility: visible;
  transform: translateX(0);
}
.close-button { width: 40px; height: 40px; }
#schedule-form { margin-top: 34px; }
.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.full-field + .full-field, .time-fields + .full-field, .full-field + .time-fields { margin-top: 22px; }
.field label {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}
.field label span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}
.field input:not([type="radio"]) {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--paper);
  transition: 160ms ease;
}
.field input:not([type="radio"]):focus {
  border-color: var(--muted);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(112, 119, 161, .1);
}
.field input.invalid { border-color: #c66b67; background: #fff8f7; }
.field-error {
  min-height: 0;
  margin-top: 5px;
  color: #a84f4f;
  font-size: 9px;
}
.field-error:empty { display: none; }
.time-fields {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.time-arrow { margin-top: 18px; color: var(--muted); }
.category-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.category-options label { margin: 0; }
.category-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.category-options span {
  display: flex;
  height: 43px;
  gap: 8px;
  align-items: center;
  margin: 0 !important;
  padding: 0 12px;
  color: var(--muted) !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font-size: 10px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
.category-options input:checked + span {
  color: var(--ink) !important;
  border-color: var(--ink-soft);
  background: rgba(112, 119, 161, .08);
  box-shadow: inset 0 0 0 1px var(--ink-soft);
}
.category-options input:focus-visible + span { outline: 3px solid rgba(246, 177, 122, .55); }
.form-message {
  min-height: 18px;
  margin-top: 15px;
  color: #a84f4f;
  font-size: 10px;
}
.drawer-actions {
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.drawer-actions .button { flex: 1; }

.toast {
  position: fixed;
  z-index: 30;
  right: 26px;
  bottom: 26px;
  padding: 14px 18px;
  visibility: hidden;
  opacity: 0;
  color: var(--white);
  border-radius: 13px;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 700;
  transform: translateY(12px);
  transition: 200ms ease;
}
.toast.visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .schedule-layout { grid-template-columns: 1fr; }
  .side-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-stats { display: none; }
}

@media (max-width: 760px) {
  .topbar, .app-shell, footer { width: min(100% - 28px, 1180px); }
  .topbar { min-height: 76px; }
  .today-label { display: none; }
  .add-schedule-button {
    width: 43px;
    min-height: 43px;
    padding: 0;
    font-size: 0;
  }
  .app-shell { padding-top: 42px; }
  .hero { padding-bottom: 35px; }
  .hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .hero-copy {
    max-width: 280px;
    font-size: 13px;
    line-height: 1.5;
  }
  .calendar-card, .agenda-panel {
    padding: 22px 18px 16px;
    border-radius: 22px;
  }
  .calendar-heading h2, .section-heading h2 { font-size: 20px; }
  .week-strip {
    grid-template-columns: repeat(7, minmax(58px, 1fr));
    margin-right: -18px;
    padding-right: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .day-button { min-height: 86px; }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  .agenda-tools { width: 100%; }
  .search-box { width: 100%; }
  .agenda-item {
    grid-template-columns: 70px 1fr auto;
    gap: 10px;
  }
  .item-actions {
    flex-direction: column;
    opacity: 1;
    transform: none;
  }
  .side-panel { grid-template-columns: 1fr; }
  footer { gap: 8px; flex-direction: column; }
  .schedule-drawer { padding: 28px 22px 24px; }
}

@media (max-width: 460px) {
  .week-controls .text-button { display: none; }
  .agenda-time { font-size: 14px; }
  .event-details { padding-left: 13px; }
  .event-details h3 { font-size: 13px; }
  .category-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
