:root {
  --bg: #f4f7f2;
  --bg-accent: #dde7d8;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: #ffffff;
  --text: #163024;
  --text-soft: #5a7164;
  --primary: #1e7a53;
  --primary-dark: #12553a;
  --primary-soft: #d7f0e4;
  --danger: #bc3a3a;
  --border: rgba(22, 48, 36, 0.1);
  --shadow: 0 24px 60px rgba(30, 57, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(158, 210, 184, 0.8), transparent 34%),
    radial-gradient(circle at bottom right, rgba(221, 231, 216, 0.9), transparent 28%),
    linear-gradient(135deg, var(--bg), #eef4ec 45%, #f8fbf7);
}

body.app-loading .app-shell {
  visibility: hidden;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  min-height: 100vh;
}

body.app-authenticated .app-shell {
  grid-template-columns: 1fr;
}

body.app-authenticated .hero-panel {
  display: none;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 48px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.35), transparent 20%),
    linear-gradient(160deg, #19533b, #1d7b53 52%, #56b488);
  color: #f8fff9;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -100px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(10px);
}

.hero-panel__content {
  position: relative;
  z-index: 1;
  max-width: 360px;
}

.hero-panel h1 {
  margin: 12px 0 16px;
  font-size: clamp(2rem, 3vw, 3.6rem);
  line-height: 1.02;
}

.hero-panel p {
  margin: 0;
  color: rgba(248, 255, 249, 0.8);
  line-height: 1.6;
}

.feature-list {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}

.feature-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.feature-card .material-symbols-rounded {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
}

.feature-card h2,
.card-header h2,
.card-header h3 {
  margin: 0;
}

.feature-card p,
.card-header p,
.topbar p {
  margin-top: 8px;
}

.workspace {
  padding: 36px;
  min-width: 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.glass-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(244, 247, 242, 0.72);
  backdrop-filter: blur(8px);
}

.boot-splash__card {
  width: min(460px, 100%);
  padding: 28px;
  text-align: center;
}

.boot-splash__card h2 {
  margin: 12px 0 8px;
}

.boot-splash__card p {
  margin: 0;
  color: var(--text-soft);
}

body:not(.app-loading) .boot-splash {
  display: none;
}

.auth-card {
  max-width: 580px;
  margin: 4vh auto 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 24px 28px;
  margin-bottom: 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  gap: 24px;
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(340px, 420px) 1fr;
  gap: 24px;
}

.planner-grid > .glass-card {
  padding: 30px 30px 28px;
}

.dashboard-grid > .glass-card {
  padding: 28px;
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow {
  background: rgba(255, 255, 255, 0.16);
}

.badge {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.stack-md {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.stack-sm {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field span,
.weekday-picker__label,
.choice-group legend {
  font-size: 0.95rem;
  font-weight: 700;
}

.field input,
.field-select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(22, 48, 36, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus,
.field-select:focus {
  border-color: rgba(30, 122, 83, 0.7);
  box-shadow: 0 0 0 5px rgba(30, 122, 83, 0.12);
  transform: translateY(-1px);
}

.field input:required,
.field-select:required {
  border-color: rgba(30, 122, 83, 0.18);
}

.tabbar {
  display: inline-flex;
  gap: 8px;
  padding: 10px;
  margin-bottom: 24px;
}

.tabbar__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: none;
  border-radius: 14px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
}

.planner-status-banner {
  margin: 14px 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  background: rgba(22, 48, 36, 0.06);
  color: var(--text);
}

.planner-status-banner--success {
  background: rgba(30, 122, 83, 0.12);
  color: var(--primary-dark);
}

.planner-status-banner--error {
  background: rgba(188, 58, 58, 0.12);
  color: #8f2020;
}

.tabbar__button.active {
  color: #f8fff9;
  background: linear-gradient(135deg, var(--primary), #2d976a);
  box-shadow: 0 12px 24px rgba(30, 122, 83, 0.24);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.choice-group {
  margin: 0;
  padding: 0;
  border: none;
  display: grid;
  gap: 10px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
}

.weekday-picker {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(215, 240, 228, 0.55);
}

.weekday-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.weekday-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.event-status-box--success {
  background: rgba(215, 240, 228, 0.7);
  color: var(--primary-dark);
}

.event-status-box--error {
  background: rgba(188, 58, 58, 0.14);
  color: #8f2020;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #f8fff9;
  background: linear-gradient(135deg, var(--primary), #2d976a);
  box-shadow: 0 12px 24px rgba(30, 122, 83, 0.24);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(22, 48, 36, 0.08);
}

.btn-secondary.active {
  color: #f8fff9;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, var(--danger), #d45555);
}

.demo-alert {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(215, 240, 228, 0.7);
  color: var(--primary-dark);
}

#eventStatusBox {
  position: sticky;
  top: 16px;
  z-index: 20;
  margin-top: 16px;
}

.demo-alert p {
  margin: 6px 0 0;
}

.demo-alert a {
  color: var(--primary-dark);
  font-weight: 800;
}

.demo-alert .material-symbols-rounded {
  font-size: 28px;
}

.planner-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.planner-toolbar h3,
.planner-list-header h3 {
  margin: 8px 0 0;
}

.planner-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.color-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.color-option {
  width: 100%;
  min-height: 44px;
  border: 2px solid rgba(22, 48, 36, 0.08);
  border-radius: 14px;
  background: var(--option-color);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.color-option.active {
  transform: translateY(-1px);
  border-color: rgba(22, 48, 36, 0.42);
  box-shadow:
    0 10px 18px rgba(22, 48, 36, 0.12),
    inset 0 0 0 3px rgba(255, 255, 255, 0.92);
}

.planner-week-label {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-weight: 700;
}

.planner-status-banner {
  margin: 8px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(215, 240, 228, 0.88);
  color: var(--primary-dark);
  font-weight: 700;
}

.week-calendar {
  border: 1px solid rgba(22, 48, 36, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.week-calendar__header {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  margin-left: 84px;
  border-bottom: 1px solid rgba(22, 48, 36, 0.14);
}

.week-header-cell {
  display: grid;
  gap: 2px;
  padding: 14px 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-soft);
  border-left: 1px solid rgba(22, 48, 36, 0.1);
}

.week-header-cell:first-child {
  border-left: none;
}

.week-header-cell--active {
  background: rgba(215, 240, 228, 0.92);
}

.week-header-cell--today {
  box-shadow: inset 0 -3px 0 rgba(30, 122, 83, 0.9);
}

.week-header-cell strong {
  color: var(--text);
}

.week-calendar__body {
  display: grid;
  grid-template-columns: 84px 1fr;
  min-height: 1082px;
}

.week-calendar__body--compact {
  display: block;
  min-height: auto;
}

.week-calendar__body--year {
  padding: 18px;
}

.time-column {
  display: grid;
  grid-template-rows: repeat(15, 72px);
  background: rgba(244, 247, 242, 0.65);
}

.time-slot {
  padding: 10px 10px 0 16px;
  border-top: 1px solid rgba(22, 48, 36, 0.12);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
}

.week-calendar--month .calendar-grid {
  gap: 0;
}

.week-calendar--year .calendar-grid {
  gap: 16px;
}

.calendar-day-column {
  position: relative;
  min-height: 1080px;
  border-left: 1px solid rgba(22, 48, 36, 0.12);
  background:
    linear-gradient(to bottom, rgba(22, 48, 36, 0.11) 1px, transparent 1px);
  background-size: 100% 72px;
}

.calendar-day-column--drop {
  background-color: rgba(215, 240, 228, 0.45);
}

.calendar-hour-slot {
  height: 72px;
  border-top: 1px solid rgba(22, 48, 36, 0.04);
}

.week-calendar__header--compact {
  margin-left: 0;
  border-bottom: 1px solid rgba(22, 48, 36, 0.12);
}

.week-header-cell--compact {
  min-height: 48px;
  place-items: center;
  padding: 12px 8px;
}

.calendar-event-block {
  position: absolute;
  left: 8px;
  right: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 10px 12px;
  border: none;
  border-radius: 18px;
  color: #fff;
  text-align: left;
  background: var(--event-accent, #1f7a53);
  box-shadow: 0 16px 24px rgba(22, 48, 36, 0.16);
  cursor: pointer;
}

.calendar-event-block--highlight {
  outline: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 32px rgba(22, 48, 36, 0.24);
}

.calendar-event-block--selected {
  outline: 3px solid rgba(22, 48, 36, 0.28);
  box-shadow: 0 18px 32px rgba(22, 48, 36, 0.22);
}

.calendar-event-block__time {
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-event-block__title {
  font-size: 0.95rem;
  line-height: 1.2;
}

.calendar-event-block__location {
  font-size: 0.82rem;
  opacity: 0.92;
}

.month-day-cell {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 152px;
  padding: 12px;
  border-left: 1px solid rgba(22, 48, 36, 0.12);
  border-top: 1px solid rgba(22, 48, 36, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.month-day-cell--outside {
  background: rgba(244, 247, 242, 0.72);
}

.month-day-cell--selected {
  background: rgba(215, 240, 228, 0.56);
}

.month-day-cell--today {
  background: rgba(30, 122, 83, 0.12);
}

.month-day-cell--today .month-day-cell__date {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #f8fff9;
  box-shadow: 0 10px 18px rgba(30, 122, 83, 0.18);
}

.month-day-cell__date {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(22, 48, 36, 0.06);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.month-day-cell__more,
.year-month-card__more,
.year-month-card__empty {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.calendar-event-chip {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 12px;
  color: #fff;
  background: var(--event-accent, #1f7a53);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(22, 48, 36, 0.12);
}

.calendar-event-chip span {
  font-size: 0.76rem;
  font-weight: 700;
  opacity: 0.92;
}

.calendar-event-chip strong {
  font-size: 0.85rem;
  line-height: 1.25;
}

.year-month-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(22, 48, 36, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.year-month-card__title {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.event-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.event-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(22, 48, 36, 0.08);
  background: rgba(255, 255, 255, 0.8);
}

.event-card--highlight {
  border-color: rgba(30, 122, 83, 0.36);
  box-shadow: 0 14px 28px rgba(30, 122, 83, 0.12);
}

.event-card--selected {
  border-color: rgba(22, 48, 36, 0.18);
  box-shadow: 0 12px 24px rgba(22, 48, 36, 0.08);
}

.event-card__header,
.event-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.event-card__category {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--event-accent, #1f7a53);
  font-size: 0.78rem;
  font-weight: 800;
}

.event-card__duration {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.event-card__title {
  margin: 0;
  font-size: 1.05rem;
}

.event-card__meta,
.event-card__detail {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.reminder-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.reminder-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(22, 48, 36, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
}

.reminder-card__title-row,
.reminder-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.reminder-title {
  margin: 0;
  font-size: 1.1rem;
}

.reminder-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.reminder-meta,
.reminder-delivery,
.empty-state {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.empty-state {
  padding: 24px;
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.74);
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(22, 48, 36, 0.92);
  color: #f8fff9;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.focus-notice {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 2000;
  max-width: min(680px, calc(100vw - 32px));
  padding: 16px 20px;
  border-radius: 18px;
  transform: translateX(-50%);
  box-shadow: 0 20px 40px rgba(22, 48, 36, 0.18);
  font-weight: 800;
  background: rgba(22, 48, 36, 0.94);
  color: #f8fff9;
}

.focus-notice--success {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.focus-notice--error {
  background: linear-gradient(135deg, #8f2020, #c84747);
}

@media (max-width: 1080px) {
  .app-shell,
  .dashboard-grid,
  .planner-grid {
    grid-template-columns: 1fr;
  }

  .planner-grid > .glass-card {
    padding: 24px 22px;
  }

  .hero-panel {
    min-height: 360px;
  }

  .planner-toolbar {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .hero-panel,
  .workspace {
    padding: 22px;
  }

  .auth-card,
  .dashboard-grid > .glass-card,
  .topbar {
    padding: 20px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .week-calendar {
    overflow-x: auto;
  }

  .week-calendar__header,
  .calendar-grid {
    min-width: 770px;
  }

  .week-calendar--month .calendar-grid,
  .week-calendar--year .calendar-grid {
    min-width: 0;
  }

  .week-calendar--year .calendar-grid {
    grid-template-columns: 1fr !important;
  }
}

body.modal-open {
  overflow: hidden;
}

.topbar {
  align-items: center;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  flex-direction: column;
  align-items: stretch;
}

.topbar__content {
  min-width: 0;
}

.topbar__title {
  margin: 0;
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1.05;
}

.topbar .btn {
  width: 100%;
}

.planner-grid {
  grid-template-columns: 1fr;
  gap: 16px;
  min-width: 0;
}

.planner-grid > .glass-card {
  padding: 18px 16px 20px;
  min-width: 0;
}

.planner-toolbar {
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}

.planner-toolbar__intro p {
  margin-bottom: 0;
}

.planner-toolbar__actions {
  width: 100%;
  display: grid;
  gap: 10px;
  min-width: 0;
  justify-items: stretch;
}

.planner-toolbar__actions .btn {
  min-height: 44px;
  white-space: nowrap;
}

.planner-add-button {
  width: 100%;
  order: -1;
}

.planner-toolbar__scroller {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.planner-toolbar__scroller::-webkit-scrollbar {
  display: none;
}

.planner-toolbar__group {
  display: inline-flex;
  gap: 8px;
  min-width: max-content;
  padding-bottom: 2px;
}

.planner-status-banner {
  margin: 0 0 14px;
}

.planner-week-label {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.week-calendar {
  width: 100%;
  max-width: 100%;
  border-radius: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.week-calendar__header {
  min-width: 700px;
}

.calendar-grid {
  min-width: 700px;
}

.week-calendar--month .calendar-grid,
.week-calendar--year .calendar-grid {
  min-width: 0;
}

.week-calendar__body {
  min-width: 784px;
}

.planner-board {
  min-width: 0;
  overflow: hidden;
}

.time-column {
  position: sticky;
  left: 0;
  z-index: 4;
  box-shadow: 8px 0 16px rgba(22, 48, 36, 0.06);
}

.week-header-cell,
.calendar-day-column {
  min-width: 116px;
}

.week-header-cell {
  padding: 12px 8px;
}

.calendar-event-block {
  left: 6px;
  right: 6px;
  padding: 8px 8px 10px;
  border-radius: 16px;
}

.calendar-event-block__title {
  font-size: 0.88rem;
}

.calendar-event-block__location {
  font-size: 0.76rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: end center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.42);
  backdrop-filter: blur(4px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: min(92vh, 960px);
  overflow: auto;
  border-radius: 24px 24px 0 0;
  padding: 20px 16px 24px;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.modal__header h3 {
  margin: 8px 0 0;
}

.modal__close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(22, 48, 36, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  cursor: pointer;
}

.modal__actions .btn {
  flex: 1 1 180px;
}

#eventStatusBox {
  position: static;
  margin: 0 0 16px;
}

.color-picker {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.color-option {
  min-height: 40px;
}

.toast {
  right: 12px;
  left: 12px;
  bottom: 12px;
  max-width: none;
}

@media (min-width: 721px) {
  .workspace {
    padding: 28px;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    padding: 22px 24px;
    margin-bottom: 20px;
  }

  .topbar .btn {
    width: auto;
  }

  .planner-grid > .glass-card {
    padding: 24px;
  }

  .planner-toolbar__actions {
    justify-items: end;
  }

  .planner-add-button {
    width: auto;
    order: 0;
  }

  .planner-toolbar__scroller {
    width: auto;
    overflow: visible;
  }

  .planner-toolbar__group {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .modal {
    place-items: center;
    padding: 24px;
  }

  .modal__dialog {
    border-radius: 28px;
    padding: 24px;
  }

  .week-calendar {
    overflow: hidden;
    scroll-snap-type: none;
  }

  .week-calendar__header,
  .calendar-grid,
  .week-calendar__body {
    min-width: 0;
  }

  .time-column {
    position: static;
    box-shadow: none;
  }
}
