.planner-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}

.planner-page-heading {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.planner-page-heading h1 {
  margin: 0;
}

.planner-page-heading .planner-desktop-navigation {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-left: auto;
}

.planner-page-heading .planner-navigation {
  flex-wrap: nowrap;
  align-items: stretch;
  margin: 0;
}

.planner-view-settings {
  position: relative;
  display: flex;
}

.planner-view-settings-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 2.4rem;
  min-width: 2.4rem;
  padding: 0.35rem;
}

.planner-view-settings-toggle[aria-expanded="true"] {
  border-color: #9ca3af;
  background: #e5e7eb;
}

.planner-view-settings-icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.planner-view-settings-panel {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.5rem);
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(9rem, 1fr));
  gap: 0.75rem;
  box-sizing: border-box;
  width: min(34rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 16px 32px rgb(15 23 42 / 18%);
}

.planner-view-settings-panel[hidden] {
  display: none;
}

.planner-view-settings-title {
  grid-column: 1 / -1;
  color: #1f2937;
  font-size: 0.95rem;
}

.planner-view-settings-panel .planner-control {
  min-width: 0;
}

.planner-shell--mobile {
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(20rem, 1fr);
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.planner-shell--mobile-planner-expanded {
  grid-template-rows: auto auto auto minmax(20rem, 1fr);
  margin-right: -1.5rem;
  max-width: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 1.5rem;
  width: calc(100% + 1.5rem);
}

.planner-shell--mobile .planner-scheduler {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.workspace > .planner-mobile-summary-bar--draft {
  margin-right: -1.5rem;
  margin-left: -1.5rem;
  max-width: none;
  width: calc(100% + 3rem);
}

.planner-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
}

.planner-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.planner-shell .planner-navigation {
  margin-bottom: 0;
}

.planner-toolbar,
.planner-advanced-controls {
  display: contents;
}

.planner-create-reservation-mobile-icon,
.planner-mobile-filters-toggle,
.planner-mobile-filters-backdrop,
.planner-mobile-filters-header {
  display: none;
}

.planner-navigation-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.planner-control {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 9rem;
}

.planner-control[hidden] {
  display: none !important;
}

.planner-create-reservation-control[hidden] {
  display: none !important;
}

.planner-control label {
  color: #4b5563;
  font-size: 0.85rem;
}

.planner-control input,
.planner-control select,
.planner-control button {
  min-height: 2.1rem;
}

.planner-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.1rem;
  cursor: pointer;
}

.planner-mode-switch input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  min-height: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.planner-mode-switch-track {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  box-sizing: border-box;
  width: 2.75rem;
  height: 1.5rem;
  padding: 0.1875rem;
  border: 1px solid #9ca3af;
  border-radius: 9999px;
  background: #e5e7eb;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.planner-mode-switch-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 25%);
  transition: transform 150ms ease;
}

.planner-mode-switch input:checked + .planner-mode-switch-track {
  border-color: var(--fb-accent);
  background: var(--fb-accent);
}

.planner-mode-switch input:checked + .planner-mode-switch-track .planner-mode-switch-thumb {
  transform: translateX(1.25rem);
}

.planner-mode-switch input:focus-visible + .planner-mode-switch-track {
  outline: 2px solid var(--fb-accent);
  outline-offset: 2px;
}

.planner-mode-switch-label {
  color: #374151;
  font-size: 0.875rem;
}

.planner-scheduler {
  box-sizing: border-box;
  min-height: 0;
  height: 100%;
  border: 1px solid #d1d5db;
  background: #fff;
}

.planner-mobile-summary-bar {
  display: none;
  align-items: center;
  box-sizing: border-box;
  flex-shrink: 0;
  gap: 0.75rem;
  min-height: 3rem;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: var(--fb-accent-soft-hover);
  color: var(--fb-accent-deep);
  cursor: pointer;
  font: inherit;
  line-height: 1.25;
  opacity: 0;
  padding: 0.65rem 0.85rem;
  text-align: left;
  transform: translateY(0.25rem);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.planner-mobile-summary-bar:hover,
.planner-mobile-summary-bar:focus-visible {
  background: var(--fb-accent-border);
}

.planner-mobile-summary-bar:focus-visible {
  outline: 2px solid var(--fb-accent);
  outline-offset: -2px;
}

.planner-mobile-summary-bar--planner {
  border-bottom: 2px solid var(--fb-accent);
}

.planner-mobile-summary-bar--draft {
  border-top: 2px solid var(--fb-accent);
}

.planner-mobile-summary-chevron {
  box-sizing: border-box;
  width: 0.65rem;
  height: 0.65rem;
  flex: 0 0 0.65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.planner-mobile-summary-chevron--down {
  transform: translateY(-0.15rem) rotate(45deg);
}

.planner-mobile-summary-chevron--up {
  transform: translateY(0.15rem) rotate(225deg);
}

.planner-mobile-summary-bar[hidden] {
  display: none !important;
}

.workspace > .planner-mobile-summary-bar--draft:not([hidden]),
.right-panel.right-panel--mobile-draft-active .planner-mobile-summary-bar--planner:not([hidden]) {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.planner-mobile-summary-id,
.planner-mobile-summary-primary,
.planner-mobile-summary-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-mobile-summary-id,
.planner-mobile-summary-value {
  flex: 0 0 auto;
  font-weight: 600;
}

.planner-mobile-summary-primary {
  flex: 1 1 auto;
}

.planner-draft-actions {
  box-sizing: border-box;
  flex-direction: row;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--fb-accent-border-strong);
  background: var(--fb-accent-soft);
  box-shadow: 0 -4px 12px rgb(17 94 89 / 12%);
}

.planner-draft-actions .toolbar-btn {
  flex: 1 1 0;
  min-width: 0;
}

#planner-draft-create-proposal {
  flex-basis: 100%;
  border-color: var(--fb-accent-border-strong);
  background: var(--fb-accent);
  color: #ffffff;
  font-weight: 600;
}

#planner-draft-create-proposal:hover:not(:disabled),
#planner-draft-create-proposal:focus-visible {
  background: var(--fb-accent-strong);
}

#planner-draft-commit {
  border-color: var(--fb-action);
  background: var(--fb-action);
  color: #ffffff;
  font-weight: 600;
}

#planner-draft-commit:hover:not(:disabled),
#planner-draft-commit:focus-visible {
  background: var(--fb-action-hover);
}

#planner-draft-discard {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
  font-weight: 600;
}

#planner-draft-discard:hover:not(:disabled),
#planner-draft-discard:focus-visible {
  border-color: #fca5a5;
  background: #ffe4e6;
}

.planner-draft-status-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--fb-accent-border-strong);
  border-radius: 0.4rem;
  background: #f8fafc;
}

.planner-draft-cutoff-panel {
  display: grid;
  gap: 0.75rem;
}

.planner-draft-cutoff-panel[hidden] {
  display: none !important;
}

.planner-draft-cutoff-hint {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.35;
}

.right-panel:not(.right-panel--mobile-draft-expanded) .planner-draft-scrollarea {
  padding-bottom: 0;
}

.right-panel:not(.right-panel--mobile-draft-expanded) .planner-draft-scrollarea .planner-draft-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: auto -1rem 0;
}

@media (prefers-reduced-motion: reduce) {
  .planner-mode-switch-track,
  .planner-mode-switch-thumb {
    transition: none;
  }

  .planner-mobile-summary-bar {
    transition: none;
    transform: none;
  }
}

@media (max-width: 760px) {
  body:has(.planner-shell--mobile.planner-mobile-filters-open) {
    overflow: hidden;
  }

  .planner-shell--mobile .planner-toolbar {
    position: relative;
    display: grid;
    gap: 0.5rem;
    min-width: 0;
  }

  .planner-shell--mobile .planner-navigation {
    display: grid;
    grid-template-columns: 2.5rem 2.75rem minmax(4.5rem, 1fr) 2.75rem 2.5rem;
    align-items: stretch;
    gap: 0.25rem;
    margin: 0;
    padding-right: 3.15rem;
  }

  .planner-shell--mobile.planner-shell--mobile-draft-active .planner-navigation {
    padding-right: 0;
  }

  .planner-shell--mobile .planner-navigation .toolbar-btn {
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.35rem 0.35rem;
  }

  .planner-shell--mobile .planner-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: stretch;
    gap: 0.45rem;
    min-width: 0;
  }

  .planner-shell--mobile .planner-control {
    min-width: 0;
  }

  .planner-shell--mobile .planner-controls > .planner-control--location {
    order: 1;
  }

  .planner-shell--mobile .planner-controls > .planner-control--mode {
    order: 2;
    align-self: end;
  }

  .planner-shell--mobile .planner-mobile-filters-toggle {
    order: 3;
    align-self: end;
  }

  .planner-shell--mobile .planner-advanced-controls {
    order: 4;
  }

  .planner-shell--mobile .planner-create-reservation-control {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    min-width: 0;
  }

  .planner-shell--mobile .planner-create-reservation-control > label,
  .planner-shell--mobile .planner-control--mode > label:first-child {
    display: none;
  }

  .planner-shell--mobile .planner-control input,
  .planner-shell--mobile .planner-control select,
  .planner-shell--mobile .planner-control button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
  }

  .planner-shell--mobile .planner-mode-switch {
    box-sizing: border-box;
    justify-content: center;
    gap: 0.4rem;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background: #fff;
  }

  .planner-shell--mobile .planner-mode-switch-label {
    min-width: 0;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .planner-shell--mobile .planner-mode-switch-track {
    width: 2.4rem;
    height: 1.35rem;
    padding: 0.15rem;
  }

  .planner-shell--mobile .planner-mode-switch-thumb {
    width: 0.95rem;
    height: 0.95rem;
  }

  .planner-shell--mobile .planner-mode-switch input:checked + .planner-mode-switch-track .planner-mode-switch-thumb {
    transform: translateX(1.05rem);
  }

  .planner-shell--mobile .planner-mobile-filters-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.35rem 0.55rem;
  }

  .planner-shell--mobile .planner-mobile-filters-icon {
    position: relative;
    display: inline-block;
    width: 1rem;
    height: 0.75rem;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .planner-shell--mobile .planner-mobile-filters-icon::after {
    position: absolute;
    top: 0.25rem;
    left: 0.2rem;
    width: 0.6rem;
    border-top: 2px solid currentColor;
    content: "";
  }

  .planner-shell--mobile .planner-create-reservation-control .toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-color: var(--fb-action);
    background: var(--fb-action);
    color: #fff;
  }

  .planner-shell--mobile .planner-create-reservation-control .toolbar-btn:hover:not(:disabled),
  .planner-shell--mobile .planner-create-reservation-control .toolbar-btn:focus-visible {
    background: var(--fb-action-hover);
  }

  .planner-shell--mobile .planner-create-reservation-desktop-text {
    display: none;
  }

  .planner-shell--mobile .planner-create-reservation-mobile-icon {
    display: inline;
    font-size: 1.65rem;
    font-weight: 500;
    line-height: 1;
  }

  .planner-shell--mobile .planner-mobile-filters-backdrop {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: block;
    visibility: hidden;
    border: 0;
    background: rgb(15 23 42 / 45%);
    cursor: default;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease-out, visibility 0s linear 160ms;
  }

  .planner-shell--mobile .planner-advanced-controls {
    position: fixed;
    z-index: 1101;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    max-height: min(75vh, 28rem);
    padding: 0.9rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    border-radius: 0.8rem 0.8rem 0 0;
    background: #fff;
    box-shadow: 0 -8px 30px rgb(15 23 42 / 24%);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(1rem);
    transition: opacity 160ms ease-out, transform 160ms ease-out, visibility 0s linear 160ms;
  }

  .planner-shell--mobile .planner-mobile-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #1f2937;
  }

  .planner-shell--mobile .planner-mobile-filters-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .planner-shell--mobile .planner-mobile-filters-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.35rem 0.75rem;
  }

  .planner-shell--mobile .planner-mobile-filters-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    font-size: 1.3rem;
    line-height: 1;
  }

  .planner-shell--mobile .planner-advanced-controls > .planner-control {
    min-width: 0;
  }

  .planner-shell--mobile.planner-mobile-filters-open .planner-mobile-filters-backdrop,
  .planner-shell--mobile.planner-mobile-filters-open .planner-advanced-controls {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .right-panel--mobile-draft-expanded .planner-draft-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
    justify-items: stretch;
    border-bottom: 0;
  }

  .right-panel--mobile-draft-expanded .planner-draft-title-stack {
    display: grid;
    grid-template-columns: minmax(0, auto) auto;
    align-items: center;
    gap: 0.25rem 0.5rem;
  }

  .right-panel--mobile-draft-expanded .planner-draft-title-row {
    min-width: 0;
  }

  .right-panel--mobile-draft-expanded .planner-selected-guest-row {
    grid-column: 1 / -1;
  }

  .right-panel--mobile-draft-expanded .planner-draft-status-badge {
    justify-self: center;
    margin-left: 0;
  }

  .right-panel--mobile-draft-expanded .planner-draft-cost-summary {
    min-width: 0;
    margin: 0 0 0 auto;
    padding: 0;
    border-bottom: 0;
    background: transparent;
  }

  .right-panel--mobile-draft-expanded .planner-draft-cost-primary,
  .right-panel--mobile-draft-expanded .planner-draft-cost-secondary {
    justify-content: flex-end;
    gap: 0.35rem;
    white-space: nowrap;
  }

  .right-panel--mobile-draft-expanded .planner-draft-cost-primary {
    font-size: 0.78rem;
  }

  .right-panel--mobile-draft-expanded .planner-draft-cost-primary .planner-draft-cost-label {
    display: none;
  }

  .right-panel--mobile-draft-expanded .planner-draft-cost-primary .planner-draft-cost-value {
    font-size: 1rem;
  }

  .right-panel--mobile-draft-expanded .planner-draft-cost-secondary {
    margin-top: 0.2rem;
    padding-top: 0.2rem;
    border-top: 0;
    font-size: 0.7rem;
  }

  @media (prefers-reduced-motion: reduce) {
    .planner-shell--mobile .planner-mobile-filters-backdrop,
    .planner-shell--mobile .planner-advanced-controls {
      transition: none;
      transform: none;
    }
  }
}

.planner-cell-available {
  background-color: #fbfcfd;
}

.planner-cell-partial {
  background-color: #fdf8ef;
}

.planner-cell-unavailable {
  background-color: #f7f7f8;
  color: #9ca3af;
}

.planner-cell-buffer {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(107, 114, 128, 0.16) 0,
    rgba(107, 114, 128, 0.16) 4px,
    transparent 4px,
    transparent 8px
  );
}

.planner-cell-closed-period {
  box-shadow: inset 0 -3px 0 rgba(220, 38, 38, 0.32);
  background-image:
    linear-gradient(rgba(254, 226, 226, 0.42), rgba(254, 226, 226, 0.42)),
    repeating-linear-gradient(
      135deg,
      rgba(220, 38, 38, 0.16) 0,
      rgba(220, 38, 38, 0.16) 4px,
      transparent 4px,
      transparent 8px
    );
}

#planner-daypilot-scheduler [class$="_crosshair_horizontal"] {
  display: none !important;
}

.planner-event-current {
  background: var(--fb-accent);
  border-color: var(--fb-accent-strong);
  color: #fff;
}

.planner-event-external {
  background: #7c3aed;
  border-color: #6d28d9;
  color: #fff;
}

.planner-event-draft {
  background: #047857;
  border-color: #065f46;
  color: #fff;
}

.planner-event-selected {
  background: #fbbf24 !important;
  border-color: #ea580c !important;
  color: #431407 !important;
  box-shadow: inset 0 0 0 2px #ea580c;
}

.planner-event-reservation-highlight {
  background: #fef3c7 !important;
  border-color: #facc15 !important;
  color: #111827 !important;
}

.planner-event-selected.planner-event-reservation-highlight {
  background: #fbbf24 !important;
  border-color: #ea580c !important;
  color: #431407 !important;
}

.planner-event-cutoff-overdue {
  outline: 2px solid #dc2626;
  outline-offset: -2px;
}

.planner-event-cutoff-approaching {
  outline: 2px solid #f59e0b;
  outline-offset: -2px;
}

.planner-draft-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.planner-draft-occupancy-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem;
}

.planner-draft-occupancy-heading {
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
}

.planner-draft-occupancy-fields {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planner-draft-occupancy-field {
  color: #4b5563;
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  gap: 0.25rem;
}

.planner-draft-occupancy-input {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  width: 100%;
}

.planner-draft-availability-warnings {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 0.35rem;
  color: #78350f;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem;
}

.planner-draft-availability-warnings-heading {
  font-size: 0.84rem;
  font-weight: 700;
}

.planner-draft-availability-warnings-text {
  color: #92400e;
  font-size: 0.78rem;
  line-height: 1.3;
}

.planner-draft-availability-warning-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding-left: 1rem;
  font-size: 0.78rem;
  line-height: 1.3;
}

.planner-draft-item {
  border: 1px solid #d1d5db;
  border-radius: 0.35rem;
  padding: 0;
  color: #1f2937;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow: hidden;
}

.planner-onetime-add {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--fb-accent-border-strong);
  border-radius: 0.4rem;
  background: var(--fb-accent-soft);
}

.planner-onetime-add[hidden] {
  display: none !important;
}

.planner-onetime-add #planner-onetime-add-button {
  border-color: var(--fb-action);
  background: var(--fb-action);
  color: #ffffff;
  font-weight: 600;
}

.planner-onetime-add #planner-onetime-add-button:hover:not(:disabled),
.planner-onetime-add #planner-onetime-add-button:focus-visible {
  background: var(--fb-action-hover);
}

.planner-draft-item.is-selected {
  border-color: #f59e0b;
  background: #fef3c7;
  box-shadow: 0 0 0 1px rgb(245 158 11 / 18%);
}

.planner-draft-item-summary {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  text-align: left;
  font: inherit;
}

.planner-draft-item-summary:hover {
  background: rgb(15 23 42 / 4%);
}

.planner-draft-item-summary:focus-visible {
  outline: 2px solid var(--fb-accent);
  outline-offset: -2px;
}

.planner-draft-item-summary-main {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.planner-draft-item-summary-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: max-content;
}

.planner-draft-item-summary-details {
  color: #374151;
  font-size: 0.78rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-draft-item.is-selected .planner-draft-item-summary {
  align-items: flex-start;
}

.planner-draft-item.is-selected .planner-draft-item-title,
.planner-draft-item.is-selected .planner-draft-item-period,
.planner-draft-item.is-selected .planner-draft-item-summary-details {
  overflow-wrap: anywhere;
  white-space: normal;
}

.planner-draft-item.is-selected .planner-draft-item-summary-details {
  overflow: visible;
  text-overflow: clip;
}

.planner-draft-item-summary-warning {
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.planner-draft-item-summary-marker {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background: #fff;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.planner-draft-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 0.6rem 0.6rem;
}

.planner-draft-item-text {
  min-width: 0;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 auto;
}

.planner-draft-upsales {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.planner-draft-upsale-item {
  margin: 0.15rem 0;
}

.planner-draft-upsale-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.planner-draft-custom-properties {
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.2rem;
  padding-top: 0.45rem;
}

.planner-draft-custom-properties-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.6rem;
}

.planner-draft-custom-properties-item .planner-draft-custom-properties {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.planner-draft-custom-properties-historical {
  border-top: 1px solid #e5e7eb !important;
  padding-top: 0.5rem !important;
}

.planner-draft-custom-properties-heading {
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
}

.planner-draft-custom-property {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.planner-draft-custom-property-name {
  color: #4b5563;
  font-size: 0.8rem;
}

.planner-draft-custom-property-required,
.planner-draft-custom-property-error {
  color: #b91c1c;
}

.planner-draft-custom-property-description {
  color: #6b7280;
  font-size: 0.76rem;
  line-height: 1.35;
}

.planner-draft-custom-property-error {
  font-size: 0.78rem;
  line-height: 1.35;
}

.planner-draft-custom-property-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
}

.planner-draft-custom-property-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
}

.planner-draft-custom-property-input {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  padding: 0.25rem 0.35rem;
  width: 100%;
}

.planner-draft-item-title {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
  line-height: 1.25;
}

.planner-draft-item-period {
  color: #4b5563;
  font-size: 0.85rem;
  line-height: 1.35;
}

.planner-draft-item-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(3.75rem, 0.42fr);
  align-items: end;
  gap: 0.4rem;
  min-width: 0;
}

.planner-draft-item-interval-controls {
  display: contents;
}

.planner-draft-item-interval-field,
.planner-draft-item-quantity-field {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  color: #4b5563;
  font-size: 0.75rem;
}

.planner-draft-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.planner-draft-item-price {
  min-width: 0;
  color: #047857;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.planner-draft-item-errors {
  margin: -0.2rem 0 0;
  padding: 0 0.6rem 0 1.7rem;
  color: #b91c1c;
  font-size: 0.8rem;
}

.planner-draft-item-quantity {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: 0.25rem 0.35rem;
}

.planner-draft-item-date {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: 0.25rem 0.35rem;
}

.planner-draft-item-datetime {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: 0.25rem 0.35rem;
}

.planner-draft-item-remove {
  margin-left: auto;
  flex: 0 0 auto;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background: #fff;
  color: #b91c1c;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.25rem 0.45rem;
}

.planner-draft-item-remove:hover {
  background: #fee2e2;
  border-color: #fecaca;
}

.planner-draft-cost-summary {
  margin: 0;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--fb-accent-border);
  background: var(--fb-accent-soft);
  flex-shrink: 0;
}

.planner-draft-cost-primary,
.planner-draft-cost-secondary {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.planner-draft-cost-primary {
  color: #111827;
  font-size: 1rem;
  font-weight: 700;
}

.planner-draft-cost-primary .planner-draft-cost-value {
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.planner-draft-cost-secondary {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--fb-accent-soft-hover);
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 500;
}

.planner-draft-cost-secondary .planner-draft-cost-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
