/* ==========================================================================
   Overlays — modals, side panels, dropdown menus, formatting toolbar
   ========================================================================== */

.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  /* live: the sidebar overlays the 300-level header (sidebar z-index 700). */
  z-index: 700;
  display: flex;
  animation: overlay-in 0.2s ease;
}
.overlay--center {
  align-items: center;
  justify-content: center;
}
.overlay--right {
  justify-content: flex-end;
}
.overlay--left {
  justify-content: flex-start;
}
.overlay--transparent {
  background: transparent;
}

/* Re-renders inside an already-open panel must not replay the entrance
   animations (that made every preference click flash/slide the sidebar). */
.overlay.is-settled,
.overlay.is-settled .sidebar,
.overlay.is-settled .modal,
.overlay.is-settled .dropdown-menu {
  animation: none;
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
}

/* ---- Modal ---- */
.modal {
  background: var(--panel-bg);
  border-radius: 0.4444rem;
  box-shadow: var(--shadow-menu);
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 3rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: panel-in 0.2s ease;
}

/* Live Someday-list sharing. */
.share-list-overlay { z-index: 900; padding: 1rem; box-sizing: border-box; }
.share-list-modal { width: min(32rem, 100%); border-radius: 1rem; }
.share-list-modal .modal__header { align-items: flex-start; }
.share-list-kicker { margin: 0 0 .25rem; color: #765c96; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.share-list-close { margin-inline-start: auto; border: 0; background: none; color: inherit; font: inherit; font-size: 1.4rem; cursor: pointer; }
.share-list-description { margin: 0 0 1.35rem; color: var(--text-secondary, #675f6d); line-height: 1.55; }
.share-list-label { display: block; margin-bottom: .5rem; font-weight: 700; }
.share-list-label span { color: var(--text-secondary, #675f6d); font-weight: 400; }
.share-list-modal textarea, .share-list-link input { box-sizing: border-box; width: 100%; min-height: 2.75rem; padding: .7rem .8rem; border: 1px solid #bcb5c2; border-radius: .55rem; background: var(--panel-bg, #fff); color: inherit; font: inherit; }
.share-list-modal textarea { resize: vertical; }
.share-list-status { min-height: 1.5rem; margin: .65rem 0 0; color: var(--text-secondary, #675f6d); font-size: .85rem; }
.share-list-status.is-error { color: #a8373e; }
.share-list-link { margin-top: 1.5rem; }
.share-list-link[hidden], .share-list-actions button[hidden] { display: none; }
.share-list-link-row { display: flex; gap: .5rem; }
.share-list-link input { flex: 1; min-width: 0; }
.share-list-link-row button, .share-list-actions button { padding: .6rem .9rem; border: 1px solid #171717; border-radius: .55rem; background: #171717; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.share-list-link p { margin: .55rem 0 0; color: var(--text-secondary, #675f6d); font-size: .8rem; }
.share-list-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.share-list-actions [data-action="revoke"] { margin-inline-end: auto; border-color: transparent; background: transparent; color: #a8373e; }
.share-list-modal button:disabled, .share-list-modal textarea:disabled { opacity: .55; cursor: wait; }
@media (max-width: 34rem) { .share-list-link-row { flex-direction: column; } .share-list-link-row button { align-self: flex-start; } }

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1111rem 1.3333rem 0.6667rem;
}

.modal__title {
  font-family: var(--ff-condensed);
  font-size: 1.1111rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em; /* live .dropdown-menu__header */
}

.modal__body {
  padding: 0.5556rem 1.3333rem 1.3333rem;
  overflow-y: auto;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5556rem;
  padding: 0.6667rem 1.3333rem 1.1111rem;
  border-top: 1px solid var(--line-soft);
}

.modal__section + .modal__section {
  border-top: 1px solid var(--line-soft);
  margin-top: 1.1111rem;
  padding-top: 1.1111rem;
}

.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8333rem;
}
.field:last-child {
  margin-bottom: 0;
}
.field__label {
  font-size: var(--fs-s);
}
.field__hint {
  display: block;
  color: var(--text-muted);
  font-size: var(--fs-xxs);
  margin-top: 0.1111rem;
}

.field-col {
  display: block;
  margin-bottom: 1.1111rem;
}
.field-col:last-child {
  margin-bottom: 0;
}
.field-col > .field__label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.4444rem;
}

.text-input,
.select-input {
  /* live .edit-title__input — transparent field with a #c9c9c9 border */
  background: transparent;
  border: 1px solid #c9c9c9;
  border-radius: 5px;
  padding: 0.5556rem;
  font-size: 0.7778rem; /* live: .7778rem */
  color: var(--text);
  outline: none;
}

/* Preferences — flat, organised sections (no shadows or decorative gradients). */
.pref-heading {
  margin-bottom: 1.3333rem;
}
.pref-heading .sidebar__title {
  margin: 0;
}
.pref-heading__caption {
  margin-top: 0.2222rem;
  color: #868686;
  font-size: 0.6111rem;
  line-height: 1.4;
}
.pref-section {
  padding: 0.8889rem;
  border: 1px solid #2d2e32;
  border-radius: 0.5556rem;
  background: #202124;
}
.pref-section__head {
  display: flex;
  align-items: flex-start;
  gap: 0.5556rem;
  margin-bottom: 0.7778rem;
}
.pref-section__index {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 1.3333rem;
  height: 1.3333rem;
  padding: 0 0.2778rem;
  border: 1px solid color-mix(in srgb, var(--accent-highlight) 30%, #2d2e32);
  border-radius: 0.3333rem;
  background: #26272a;
  color: var(--accent-highlight);
  font-family: var(--ff-mono);
  font-size: 0.5556rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.pref-section__heading {
  min-width: 0;
}
.pref-section__title {
  color: #f2f2f2;
  font-size: 0.7778rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pref-section__caption {
  margin-top: 0.1667rem;
  color: #868686;
  font-size: 0.6111rem;
  line-height: 1.35;
}
.pref-section__body > * {
  padding-top: 0.7222rem;
  padding-bottom: 0.7222rem;
}
.pref-section__body > *:first-child {
  padding-top: 0;
}
.pref-section__body > *:last-child {
  padding-bottom: 0;
}
.pref-section__body > * + * {
  border-top: 1px solid #2d2e32;
}
.pref-accent {
  display: flex;
  flex-direction: column;
  gap: 0.5556rem;
}
.pref-accent__label {
  font-size: var(--fs-s);
}
.pref-accent .colorpicker {
  margin-bottom: 0;
}
.pref-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4444rem 0.2778rem;
  justify-content: space-between;
}
.pref-row > span {
  flex: 0 0 auto;
  font-size: var(--fs-s);
  white-space: nowrap;
}
.pref-row > .ui-segmented-control {
  margin-inline-start: auto;
}
.pref-row--stacked {
  flex-direction: column;
  align-items: flex-start;
}
.pref-row--stacked > .ui-segmented-control {
  margin-inline-start: 0;
}
/* The custom-colour affordance is a flat control, not a gradient wheel. */
.pref-section .colorpicker__preset--custom .colorpicker__rainbow {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #4a4b50;
  background: #2c2c2c;
}
.pref-section .colorpicker__preset--custom .colorpicker__rainbow::after {
  content: "+";
  color: #c7c7c7;
  font-family: var(--ff-sans);
  font-size: 0.8889rem;
  font-weight: 400;
  line-height: 1;
}

/* Misho prayer settings in Preferences */
.prayer-prefs {
  position: relative;
}
.prayer-prefs--embedded {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.prayer-prefs .colorpicker {
  margin-bottom: 0;
}
.prayer-prefs [hidden] {
  display: none !important;
}
.prayer-prefs__location {
  display: flex;
  align-items: center;
  gap: 0.5556rem;
  margin-bottom: 0.7778rem;
  padding: 0.5rem 0.5556rem;
  border: 1px solid #2d2e32;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.14);
}
.prayer-prefs__location-mark {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.5556rem;
  height: 1.5556rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-highlight) 12%, transparent);
  color: var(--accent-highlight);
}
.prayer-prefs__location-mark .ui-icon {
  width: 0.7778rem;
  height: 0.7778rem;
}
.prayer-prefs__location-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1111rem;
}
.prayer-prefs__city {
  overflow: hidden;
  color: #f2f2f2;
  font-size: 0.7222rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prayer-prefs__coords-summary {
  color: #868686;
  font-size: 0.6111rem;
  font-variant-numeric: tabular-nums;
}
.prayer-city {
  display: flex;
  flex-direction: column;
  gap: 0.2778rem;
}
.prayer-prefs .prayer-city-search {
  width: 100%;
  height: 2rem;
  padding: 0.3333rem 0.5rem;
  border-color: #3a3b40;
  border-radius: 0.3333rem;
  background: rgba(0, 0, 0, 0.18);
  color: #f2f2f2;
  font-size: 0.6667rem;
  transition:
    border-color 0.15s ease-in-out,
    background-color 0.15s ease-in-out;
}
.prayer-prefs .prayer-city-search::placeholder {
  color: #707070;
}
.prayer-prefs .prayer-city-search:hover {
  border-color: #4a4b50;
}
.prayer-prefs .prayer-city-search:focus {
  border-color: color-mix(in srgb, var(--accent-highlight) 60%, #3a3b40);
  outline: none;
}
.prayer-city-status {
  margin: 0;
  color: #868686;
  font-size: 0.6111rem;
}
.prayer-city-results {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 9rem;
  overflow-y: auto;
  padding: 0.2222rem;
  border: 1px solid #2d2e32;
  border-radius: 0.3333rem;
  background: #16171a;
}
.prayer-city-result {
  width: 100%;
  padding: 0.3333rem 0.4444rem;
  border-radius: 0.2222rem;
  background: transparent;
  color: #b8b8b8;
  font-size: 0.6111rem;
  line-height: 1.3;
  text-align: start;
}
.prayer-city-result:hover,
.prayer-city-result:focus-visible {
  background: #26272a;
  color: #ffffff;
}
.prayer-prefs__coords {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5556rem;
  margin-bottom: 0.6667rem;
}
.prayer-prefs__field {
  display: flex;
  flex-direction: column;
  gap: 0.2778rem;
  min-width: 0;
  margin-bottom: 0.6667rem;
}
.prayer-prefs__coords .prayer-prefs__field {
  margin-bottom: 0;
}
.prayer-prefs__label {
  color: #9a9a9a;
  font-size: 0.6111rem;
  letter-spacing: 0.02em;
}
.prayer-prefs .prayer-coord {
  width: 100%;
  min-width: 0;
  height: 2rem;
  padding: 0.3333rem 0.5rem;
  border-color: #3a3b40;
  border-radius: 0.3333rem;
  background: rgba(0, 0, 0, 0.18);
  color: #f2f2f2;
  font-size: 0.6667rem;
  font-variant-numeric: tabular-nums;
  text-align: start;
  transition:
    border-color 0.15s ease-in-out,
    background-color 0.15s ease-in-out;
}
.prayer-prefs .prayer-coord:hover {
  border-color: #4a4b50;
}
.prayer-prefs .prayer-coord:focus {
  border-color: color-mix(in srgb, var(--accent-highlight) 60%, #3a3b40);
  outline: none;
}
.prayer-select {
  position: relative;
}
.prayer-prefs .prayer-method {
  width: 100%;
  max-width: none;
  height: 2rem;
  padding: 0.3333rem 1.6667rem 0.3333rem 0.5rem;
  appearance: none;
  -webkit-appearance: none;
  border-color: #3a3b40;
  border-radius: 0.3333rem;
  background: rgba(0, 0, 0, 0.18);
  color: #f2f2f2;
  font-size: 0.6667rem;
  transition:
    border-color 0.15s ease-in-out,
    background-color 0.15s ease-in-out;
}
.prayer-prefs .prayer-method:hover {
  border-color: #4a4b50;
}
.prayer-prefs .prayer-method:focus {
  border-color: color-mix(in srgb, var(--accent-highlight) 60%, #3a3b40);
  outline: none;
}
.prayer-prefs .prayer-method option {
  background: #1c1d20;
  color: #f2f2f2;
}
.prayer-select__chevron {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  display: flex;
  color: #9a9a9a;
  pointer-events: none;
  transform: translateY(-50%);
}
.prayer-prefs__actions {
  display: flex;
  flex-direction: column;
  gap: 0.4444rem;
  margin-top: 0.1111rem;
}
.prayer-prefs .prayer-location-btn {
  width: 100%;
  min-height: 2rem;
  padding: 0.3333rem 0.6667rem;
  gap: 0.3889rem;
  border: 1px solid color-mix(in srgb, var(--accent-highlight) 32%, transparent);
  border-radius: 0.3333rem;
  background: color-mix(in srgb, var(--accent-highlight) 7%, transparent);
  color: var(--accent-highlight);
  font-size: 0.6667rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out,
    color 0.15s ease-in-out,
    transform 0.1s ease-in-out;
}
.prayer-prefs .prayer-location-btn .ui-icon {
  width: 0.7222rem;
  height: 0.7222rem;
}
.prayer-prefs .prayer-location-btn:hover {
  border-color: color-mix(in srgb, var(--accent-highlight) 55%, transparent);
  background: color-mix(in srgb, var(--accent-highlight) 14%, transparent);
  color: color-mix(in srgb, var(--accent-highlight) 82%, #ffffff);
}
.prayer-prefs .prayer-location-btn:active {
  transform: translateY(1px);
}
.prayer-prefs .prayer-save-btn {
  width: 100%;
  min-height: 2rem;
  padding: 0.3333rem 0.6667rem;
  border: 1px solid #3a3b40;
  border-radius: 0.3333rem;
  background: transparent;
  color: #b8b8b8;
  font-size: 0.6667rem;
  font-weight: 600;
  transition:
    background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out,
    color 0.15s ease-in-out;
}
.prayer-prefs .prayer-save-btn:hover {
  border-color: #4a4b50;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}
.prayer-prefs__status {
  margin: 0.4444rem 0 0;
  color: #b8b8b8;
  font-size: 0.6111rem;
  line-height: 1.3;
}
.prayer-prefs__divider {
  margin: 0.7778rem 0;
  border-top: 1px solid #2d2e32;
}
.prayer-prefs__reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6667rem;
}
.prayer-prefs__reminder-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1111rem;
}
.prayer-prefs__reminder-title {
  color: #f2f2f2;
  font-size: 0.7222rem;
  font-weight: 600;
}
.prayer-prefs__reminder-caption {
  color: #868686;
  font-size: 0.6111rem;
  line-height: 1.3;
}
.prayer-prefs__minutes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5556rem;
  margin-top: 0.6667rem;
}
.prayer-prefs__minutes-control {
  display: flex;
  align-items: center;
  gap: 0.2778rem;
}
.prayer-prefs .prayer-reminder-minutes {
  width: 3.3333rem;
  height: 1.7778rem;
  padding: 0.2222rem 0.3333rem;
  border-color: #3a3b40;
  border-radius: 0.3333rem;
  background: rgba(0, 0, 0, 0.18);
  color: #f2f2f2;
  font-size: 0.6667rem;
  font-variant-numeric: tabular-nums;
  text-align: end;
}
.prayer-prefs .prayer-reminder-minutes:hover {
  border-color: #4a4b50;
}
.prayer-prefs .prayer-reminder-minutes:focus {
  border-color: color-mix(in srgb, var(--accent-highlight) 60%, #3a3b40);
  outline: none;
}
.prayer-prefs__minutes-suffix {
  color: #868686;
  font-size: 0.6111rem;
}
.text-input:focus,
.select-input:focus {
  /* live keeps the same border and shows no ring on modal text inputs */
  border-color: #c9c9c9;
  outline: none;
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.4444rem;
  height: 1.3333rem;
  flex: 0 0 auto;
  cursor: pointer;
}
.toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.toggle__track {
  width: 100%;
  height: 100%;
  border-radius: 99em;
  background: #2c2c2c;
  position: relative;
  transition: background 0.25s ease;
}
.toggle__track::after {
  content: "";
  position: absolute;
  top: 0.1111rem;
  left: 0.1111rem;
  width: 1.1111rem;
  height: 1.1111rem;
  border-radius: 50%;
  background: #868686;
  transition:
    left 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    background 0.25s ease;
}
.toggle input:checked + .toggle__track {
  background: #fbfbfb;
}
.toggle input:checked + .toggle__track::after {
  left: 50%;
  background: #2c2c2c;
}
html[theme="dark"] .toggle__track {
  background: #484848;
}
html[theme="dark"] .toggle input:checked + .toggle__track {
  background: #e5e5e5;
}
html[theme="dark"] .toggle input:checked + .toggle__track::after {
  background: #131313;
}

/* Color swatches */
.swatches {
  display: flex;
  gap: 0.4444rem;
  flex-wrap: wrap;
}
.swatch {
  width: 1.7778rem;
  height: 1.7778rem;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
}
.swatch[aria-pressed="true"] {
  border-color: var(--text);
}
.swatch__check {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.swatch[aria-pressed="true"] .swatch__check {
  display: flex;
}

/* Segmented choice group */
.choice-group {
  display: inline-flex;
  gap: 0.3333rem;
}
.choice-group .ui-button {
  height: 1.8889rem;
  padding: 0 0.6667rem;
}

/* ---- Recurring to-dos sidebar (live's .sidebar + .sidebar__main--narrow) ----
   The empty state is live's tutorial: title, dark create button, how-to video
   and a two-column table. All values are live's, read from app.css. */
.sidebar.sidebar--recurring {
  position: relative;
  width: 31.6667rem; /* live .sidebar--overlay */
  max-width: calc(100vw - 1.1111rem);
  background: var(--panel-bg);
}
.sidebar--recurring .sidebar__main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* live .sidebar__main (48 / gutter / 100) + .sidebar__main--narrow */
  padding: 2.6667rem clamp(1.1111rem, 7.4074vw, 4.4444rem) 5.5556rem clamp(2.7778rem, 7.4074vw, 4.4444rem);
}
.sidebar--recurring .sidebar__title {
  font-family: var(--ff-sans);
  font-size: 0.8889rem; /* live .sidebar__title */
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  margin: 0 0 2.2222rem;
}
.sidebar__title--recurring {
  margin-inline-start: 0.5556rem;
}
.sidebar__text > * + * {
  margin-top: 1.1111rem;
}
.sidebar__text > * + .ui-button {
  margin-top: 0.6667rem;
}
.sidebar__list,
.sidebar__table {
  color: #868686;
  font-style: italic;
}
.sidebar__table th {
  font-weight: 400;
  text-align: start;
}
.sidebar__table td,
.sidebar__table th {
  padding: 0 2.2222rem 0 0;
  vertical-align: top;
}
.sidebar__media {
  background-color: #f2f2f2;
  padding: 1.3889rem 2.7778rem;
  margin: 0; /* live resets the UA figure margin */
}
.sidebar__video {
  display: block;
  height: auto;
  width: 100%;
}
.sidebar__create {
  position: absolute;
  bottom: 1.3889rem;
  right: 1.3889rem;
  width: 3.3333rem;
  height: 3.3333rem;
  border-radius: 50%;
  z-index: 1;
}
.sidebar__create .ui-icon {
  transform: scale(1.33);
}

/* Still replica of the how-to video (used offline). */
.recurring-howto {
  background: #fff;
  padding: 1.6667rem 2.2222rem 0.8333rem;
}
.recurring-howto__header {
  margin-bottom: 0.8333rem;
}
.recurring-howto__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5556rem;
  border-bottom: 1px solid #f2f2f2;
  padding: 0.5556rem 0 0.8333rem;
}
.recurring-howto__text {
  flex: 1 1 auto;
  font-size: 0.7778rem;
}
.recurring-howto__actions {
  display: flex;
  gap: 0.3333rem;
  flex: 0 0 auto;
}
.recurring-howto__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3333rem;
  height: 1.3333rem;
  border-radius: 0.2222rem;
  background: #f2f2f2;
  color: #707070;
}
.recurring-howto__action .ui-icon {
  width: 0.8889rem;
  height: 0.8889rem;
}

/* ---- Side panel ---- */
.sidebar {
  background: var(--panel-bg);
  /* Live's generic sidebar is as wide as its container (283px); the details and
     recurring panels are .sidebar--overlay (570px) and set their own width. */
  width: auto;
  max-width: calc(100vw - 1.1111rem);
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: sidebar-in 0.25s ease;
}
.sidebar--left {
  animation-name: sidebar-in-left;
}
.sidebar--settings { width: min(460px, 100vw); max-width: 100vw; background: var(--panel-bg); }
.settings-panel__bar { height: 50px; flex: none; padding: 0 18px 0 26px; border-top: 3px solid var(--accent-highlight); border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; color: var(--app-color); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.settings-panel__close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 5px; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--app-color); }
.settings-panel__close:hover, .settings-panel__close:focus-visible { background: var(--line-soft); outline: 2px solid var(--accent-highlight); outline-offset: -2px; }
.settings-panel__frame { width: 100%; flex: 1; min-height: 0; border: 0; background: var(--panel-bg); }
@keyframes sidebar-in {
  from {
    transform: translateX(100%);
  }
}
@keyframes sidebar-in-left {
  from {
    transform: translateX(-100%);
  }
}
.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3333rem 1.5556rem 0.8333rem;
  border-bottom: 1px solid var(--line-soft);
}
.sidebar__title {
  font-family: var(--ff-condensed);
  font-size: 1.1111rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em; /* live .dropdown-menu__header */
}
.sidebar__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.1111rem 1.5556rem 2rem;
}
.sidebar__footer {
  flex: 0 0 auto;
  padding: 0.8333rem 1.5556rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5556rem;
}

/* ---- Dropdown menu (live's .dropdown-menu) ---- */
.dropdown-menu {
  position: fixed;
  z-index: 900;
  animation: overlay-in 0.12s ease;
}
.dropdown-menu__modal {
  position: relative;
}
.dropdown-menu__body {
  background: var(--dropdown-menu-background);
  border-bottom: 4px solid var(--accent);
  border-radius: 5px;
  box-shadow: var(--dropdown-menu-shadow);
  color: var(--dropdown-menu-text-color);
  overflow: hidden;
  padding: var(--dropdown-menu-y-gap) 0 var(--dropdown-menu-y-inner-gap);
  min-width: 11rem;
}
.dropdown-menu__header {
  color: var(--dropdown-menu-title-color);
  font-size: 0.6667rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0 var(--dropdown-menu-x-gap) 0.3333rem;
  text-transform: uppercase;
}
.dropdown-menu__note {
  color: var(--dropdown-menu-note-color);
  font-size: 0.6667rem;
  padding: 0.5556rem var(--dropdown-menu-x-gap) 0;
}
.dropdown-menu__list {
  font-size: var(--fs-s);
}
.dropdown-menu__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
  background-color: var(--dropdown-menu-background);
  color: var(--dropdown-menu-text-color);
  fill: var(--dropdown-menu-text-color);
  font-size: 0.7778rem;
  line-height: 1.5;
  padding: var(--dropdown-menu-y-inner-gap) var(--dropdown-menu-x-gap) var(--dropdown-menu-y-inner-gap)
    calc(var(--dropdown-menu-x-gap) + 1.3333rem);
  text-align: start;
  white-space: nowrap;
  transition: none;
}
.dropdown-menu__action--no-icon {
  padding-inline-start: var(--dropdown-menu-x-gap);
}
.dropdown-menu__action:hover {
  background: var(--dropdown-menu-hover-background);
}
.dropdown-menu__action[disabled] {
  opacity: 0.25;
  pointer-events: none;
}
.dropdown-menu__action--danger {
  color: #e5484d;
}
.dropdown-menu__action--is-active {
  background-color: var(--btn-active-bg);
  color: var(--btn-active-color);
}
.dropdown-menu__action .ui-icon {
  position: absolute;
  left: var(--dropdown-menu-x-gap);
  top: 50%;
  transform: translateY(-50%);
}
.dropdown-menu__divider {
  height: 1px;
  background: var(--dropdown-menu-section-border-color);
  margin: var(--dropdown-menu-y-inner-gap) 0;
}
.dropdown-menu__section {
  border-bottom: 1px solid var(--dropdown-menu-section-border-color);
  color: var(--dropdown-menu-text-color);
  font-size: var(--fs-s);
  line-height: 1.5;
  margin: 0 0 var(--dropdown-menu-y-gap);
  padding: 0 var(--dropdown-menu-x-gap) var(--dropdown-menu-y-gap);
  width: 12.2222rem;
}
.dropdown-menu__cta {
  background-color: var(--dropdown-menu-cta-background);
  color: var(--dropdown-menu-cta-color);
  font-size: 0.7778rem;
  margin-bottom: var(--dropdown-menu-y-gap);
  padding: 0.6667rem;
  text-align: center;
}

/* live's .dropdown-table — the "Recently deleted" list */
.dropdown-table {
  border-collapse: collapse;
  font-size: 0.6667rem;
  margin: 1.3889rem var(--dropdown-menu-x-gap) 0;
  width: calc(100% - var(--dropdown-menu-x-gap) * 2);
}
.dropdown-table__item td {
  padding-bottom: 0.8333rem;
  padding-top: 0.8333rem;
}
.dropdown-table__item + .dropdown-table__item td {
  border-top: 1px solid var(--dropdown-menu-hover-background);
}
.dropdown-table__text {
  width: 12.6667rem;
}
.dropdown-table__container {
  color: var(--dropdown-menu-note-color);
  padding-inline-start: 1.6667rem;
  padding-inline-end: 1.6667rem;
  white-space: nowrap;
}
.dropdown-table__action {
  width: 0.0556rem;
}
.dropdown-table .ui-button {
  --btn-color: #707070;
  font-size: 10px;
  font-weight: 700;
  height: auto;
  min-height: 0;
  padding: 3px 6px;
  text-transform: uppercase;
}
.dropdown-table .ui-button:hover {
  --btn-hover-bg: var(--dropdown-menu-hover-background);
  color: var(--dropdown-menu-text-color);
}

/* ---- Color picker menu ---- */
.color-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3333rem;
  padding: 0.5556rem;
  max-width: 10rem;
}
.color-menu__swatch {
  width: 1.3333rem;
  height: 1.3333rem;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}
.color-menu__swatch:hover {
  border-color: var(--line-strong);
}
.color-menu__none {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--text-dim);
  font-size: 0.7rem;
}

/* ---- Recurring rows ---- */
.recurring-row {
  display: flex;
  align-items: center;
  gap: 0.5556rem;
  padding: 0.4444rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-s);
}
.recurring-row__text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recurring-row__freq {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.recurring-weekdays {
  display: flex;
  gap: 0.3333rem;
  flex-wrap: wrap;
}
.recurring-weekdays label {
  display: inline-flex;
  align-items: center;
  gap: 0.2222rem;
  font-size: var(--fs-xs);
  cursor: pointer;
}

/* ---- Formatting toolbar ---- */
.formatting-bar {
  position: absolute;
  z-index: 500;
  display: flex;
  gap: 0.1667rem;
  background: var(--panel-bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-menu);
  padding: 0.2222rem;
}
.formatting-bar__btn {
  width: 1.7778rem;
  height: 1.7778rem;
  border-radius: var(--radius-s);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.formatting-bar__btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.formatting-bar__btn .ui-icon {
  width: 0.8889rem;
  height: 0.8889rem;
}

/* ---- Note editor rows ---- */
.note-editor {
  min-height: 8rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-s);
  padding: 0.6667rem 0.7778rem;
  font-size: var(--fs-s);
  line-height: 1.5;
  outline: none;
  white-space: pre-wrap;
}
.note-editor:focus {
  border-color: var(--accent);
}

/* ---- Details sidebar (live's .sidebar--overlay / .sidebar__main) ---- */
.sidebar--details {
  /* Live's narrow gutter: 20px on phones, 80px once there is room
     (.sidebar__main--narrow clamps to 7.4074vw). */
  --details-gutter: clamp(1.1111rem, 7.4074vw, 4.4444rem);
  position: relative;
  width: 31.6667rem; /* live .sidebar--overlay */
  max-width: calc(100vw - 1.1111rem);
  background: var(--panel-bg);
}
.sidebar--details .sidebar__main {
  flex: 1 1 auto;
  min-height: 0;
  /* live: .sidebar--right .sidebar__main — a grid, so the title and date stay
     put and only the notes scroll (overflow hidden on the main). */
  display: grid;
  grid-template-rows: min-content auto;
  overflow: hidden;
  /* live: .sidebar__main--narrow + .sidebar--right (48 / gutter / 17) */
  padding: 2.6667rem var(--details-gutter) 0.9444rem;
}
.sidebar--details .sidebar__footer {
  flex-wrap: wrap;
  padding: 0.5556rem 1.1111rem 1.1111rem; /* live .sidebar__footer */
  border-top: 0;
  color: var(--text-muted);
}
.sidebar__close {
  position: absolute;
  right: 1.1111rem;
  top: 0.7778rem;
  z-index: 5;
}

/* Header: complete checkbox + title, with the date pinned to the toolbar row
   below (live keeps .todo-details-ref absolute inside .details-header). */
.details-header {
  position: relative;
}
.todo__checkbox-wrapper--details {
  position: absolute;
  left: -1.6667rem; /* live: -30px, sitting in the gutter */
  top: 0;
  bottom: 0;
  width: 1.6667rem;
  padding-top: 0.4444rem; /* live: 8px */
  font-size: 0.7778rem; /* live box is 18px */
  justify-content: flex-start;
}
.todo__checkbox--details {
  opacity: 1; /* always visible in the panel */
}
.sidebar__heading--tight {
  margin: 0 0 0.8889rem;
  padding: 0;
  border: 0;
}
.details-title {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  font-family: var(--ff-sans);
  font-size: 1.2222rem; /* live .sidebar__heading */
  font-weight: 400;
  line-height: 1.7778rem;
  color: var(--text);
  padding: 0;
  margin: 0;
}
.details-title:focus,
.details-title:focus-visible {
  /* Live's heading is a plain div, so opening the panel shows no ring. The
     clone focuses a real <input> here, which would otherwise paint a focus
     box on every open — so the title keeps no outline. */
  outline: none;
}
.todo-details-ref {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 2;
  height: 2.3333rem; /* the notes toolbar row */
  display: flex;
  align-items: center;
  color: var(--text-muted); /* live: #707070 */
  font-size: 0.6667rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  pointer-events: none;
}

.sidebar__section {
  margin-bottom: 2.7778rem;
}
.sidebar__section--notes {
  margin-bottom: 0.5556rem;
}
.sidebar__sub-heading {
  display: block;
  color: #868686; /* live .sidebar__sub-heading */
  font-size: 0.6667rem;
  margin-bottom: 1.1111rem;
}

/* The toolbar row is full-bleed (edge-to-edge hairlines + app background) with
   its buttons and the note text inset by the gutter, like live. */
.sidebar--details .rteditor {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: 2.3333rem auto;
  margin: 0 calc(-1 * var(--details-gutter));
}
/* live: the wrapper is full-bleed and carries the gutter, so the toolbar itself
   is content-width (410px) with its hairlines inset — not edge-to-edge. */
.sidebar--details .formatting--rteditor {
  padding: 0 var(--details-gutter);
}
.sidebar--details .formatting--fixed .formatting__toolbar {
  padding: 0.4444rem 0;
}
.sidebar--details .rteditor__content {
  flex: 1 1 auto;
  min-height: 0;
}
.sidebar--details .rteditor__editable {
  padding: 2.7778rem var(--details-gutter) 0;
}

/* ---- Calendar popover ---- */
.calendar-popover {
  background: var(--panel-bg);
  border: 1px solid var(--menu-border);
  border-radius: 0.4444rem;
  box-shadow: var(--shadow-menu);
  padding: 0.8333rem;
  width: 17rem;
}
.calendar-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6667rem;
}
.calendar-popover__month {
  font-family: var(--ff-condensed);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: normal; /* live .DayPicker-Caption */
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.1667rem;
}
.calendar-grid__dow {
  font-size: var(--fs-xxs);
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
  text-transform: uppercase;
}
.calendar-grid__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-s);
  font-size: var(--fs-xs);
}
.calendar-grid__day:hover {
  background: var(--surface-hover);
}
.calendar-grid__day--today {
  background: var(--accent);
  color: #fff;
}
.calendar-grid__day--other {
  color: var(--text-dim);
}
.calendar-grid__day--selected {
  outline: 1px solid var(--accent);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 3.3333rem;
  transform: translateX(-50%) translateY(1rem);
  background: #1b1c20;
  color: #fff;
  border-radius: var(--radius-s);
  padding: 0.5556rem 0.8333rem;
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  gap: 0.8333rem;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 600;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast__action {
  color: var(--accent-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em; /* live .toast-dialog__button */
  font-size: var(--fs-xxs);
}

/* ---- Celebration ---- */
.celebration {
  position: fixed;
  pointer-events: none;
  z-index: 700;
  transform: translate(-50%, -50%);
}

/* ==========================================================================
   Formatting toolbar (selection popover + fixed editor bar)
   ========================================================================== */

.formatting {
  height: 100%;
  z-index: 950;
}
.formatting--rteditor {
  height: auto;
}
.formatting--floating {
  position: fixed;
  height: auto;
  pointer-events: none;
}
.formatting--floating .formatting__toolbar {
  pointer-events: auto;
}

.formatting__toolbar {
  display: flex;
  align-items: center;
  gap: 0.3333rem;
  background-color: var(--formatting-background);
  border: 1px solid var(--formatting-border);
  border-radius: 0.2222rem;
  box-shadow: 0 0.2222rem 0.3333rem rgba(0, 0, 0, 0.1);
  color: var(--formatting-text-color);
  font-size: 0.7778rem;
  padding: 0.2222rem;
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(1px);
  animation: formatting-in 0.12s ease;
}
@keyframes formatting-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.formatting__toolbar--read {
  gap: 0.1111rem;
  max-width: 22.2222rem;
}

.formatting__toolbar .ui-button {
  background-color: transparent;
  flex-shrink: 0;
  height: 1.3333rem;
  min-height: 0;
  min-width: 0;
  padding: 0;
  width: 1.3333rem;
  border-radius: var(--radius-s); /* 4px, live's .ui-button radius */
  color: var(--formatting-text-color);
}
.formatting__toolbar .ui-button:hover {
  background-color: var(--formatting-hover-background);
}
.formatting__toolbar .ui-icon {
  width: 0.8889rem;
  height: 0.8889rem;
}

.formatting__action--format-italic.ui-button {
  margin-inline-start: -0.2222rem;
  width: 1.1111rem;
}
.formatting__action--format-italic .ui-icon {
  margin-inline-start: -0.0556rem;
}
.formatting__action--format-link .ui-icon {
  height: 0.8889rem;
  width: 0.8889rem;
}

.formatting__action--is-active,
.formatting__action--is-active:hover,
.ui-button--has-highlight,
.ui-button--has-highlight:hover {
  background-color: var(--formatting-active-background) !important;
  color: var(--formatting-active-text-color) !important;
}

.formatting__sep {
  width: 1px;
  align-self: stretch;
  margin: 0.1111rem 0.1111rem;
  background: var(--formatting-border);
}

.formatting__input {
  background: var(--app-bg);
  border: 1px solid var(--todo-border-color);
  border-radius: 0.1667rem;
  color: var(--app-color);
  font-size: 0.7778rem;
  padding: 0.2222rem 0.4444rem;
  outline: none;
}
.formatting__input:focus,
.formatting__input:focus-visible {
  outline: 2px solid var(--focus-outline); /* live --focus-outline-color */
}

/* Fixed variant used inside the details sidebar */
.formatting--fixed {
  gap: 0.5556rem;
  transform: none;
  z-index: 0;
}
html[theme="light"] .formatting--fixed {
  --ui-button-color: #707070;
}
.formatting--fixed .formatting__toolbar {
  background: var(--app-bg);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0.4444rem 0;
  position: relative;
  transform: none;
  animation: none;
}

/* ==========================================================================
   Rich text notes editor
   ========================================================================== */

.rteditor {
  --todo-bdrs: 0.2778rem;
  display: grid;
  grid-template-rows: min-content auto;
  margin: 0 -1.1111rem;
  overflow: hidden;
  height: 100%;
}

.rteditor__content {
  height: 100%;
  overflow: auto;
  scroll-padding-top: 2.7778rem;
}
.rteditor__content::after {
  content: "";
  display: block;
  height: 2.7778rem;
}

.rteditor__editable {
  padding: 2.7778rem 1.1111rem 0;
  outline: none;
  min-height: 12rem;
  font-size: var(--fs-s);
  line-height: 1.5;
}
.rteditor__editable > * + * {
  margin-top: 1.1667rem;
}
.rteditor__editable:empty::before {
  content: attr(data-placeholder);
  color: #a4a4a4; /* live .rteditor__placeholder */
}

.rteditor__bold {
  font-weight: 700;
}
.rteditor__italic {
  font-style: italic;
}

.rteditor__editable h2 {
  font-family: var(--ff-condensed);
  font-size: 1.2222rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rteditor__editable h3 {
  font-size: 1rem;
  font-weight: 600;
}

.rteditor__editable a {
  color: inherit;
  text-decoration: underline;
  transition: none;
}
.rteditor__editable a:hover,
.rteditor__editable a:focus {
  color: var(--accent-highlight); /* live --custom-color-highlight */
}

/* live's inline link URL field (no prompt) */
.rteditor__link-editor {
  position: fixed;
  z-index: 950;
  background: var(--panel-bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-menu);
  padding: 0.2222rem;
}
.rteditor__link-editor .formatting__input {
  font-size: 0.7778rem;
  padding: 0.2222rem 0.4444rem;
  width: 14rem;
}

.rteditor__list {
  list-style: initial;
  padding: 0;
}
.rteditor__list ol,
.rteditor__list ul {
  margin-inline-start: 1.7142857em;
}
.rteditor__list--ordered {
  list-style-type: decimal;
}
.rteditor__list > * + *,
.rteditor__checklist > * + * {
  margin-top: 0.3333rem;
}

.rteditor__checklist {
  list-style: none;
}
.rteditor__checklist > li {
  cursor: pointer;
  margin-inline-start: -1.7142857em;
  max-width: calc(100% + 1.71429em);
  padding-inline-start: 1.7142857em;
  position: relative;
  width: max-content;
}
.rteditor__checklist > li:focus-visible {
  outline: none;
}
.rteditor__checklist > li > span {
  cursor: text;
}

.rteditor__listitem--checked:before,
.rteditor__listitem--unchecked:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1428571em;
  width: 1.2857143em;
  height: 1.2857143em;
  border-radius: var(--todo-bdrs);
  background-color: var(--custom-color, #707070);
  cursor: pointer;
  display: block;
}
.rteditor__listitem--unchecked:before {
  background-color: var(--todo-check-off);
}
.rteditor__listitem--checked:before {
  background-color: transparent;
}

.rteditor__listitem--checked:after,
.rteditor__listitem--unchecked:after {
  content: "";
  position: absolute;
  left: 0.0714286em;
  top: 0.2142857em;
  width: 1.1428571em;
  height: 1.1428571em;
  background-color: #fff;
  -webkit-mask: var(--checkmark-mask) no-repeat 50% 50%;
  mask: var(--checkmark-mask) no-repeat 50% 50%;
  -webkit-mask-size: 1.1428571em 1.1428571em;
  mask-size: 1.1428571em 1.1428571em;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  z-index: 1;
}
.rteditor__listitem--checked:after {
  background-color: var(--todo-check-done);
  opacity: 1;
}

.rteditor__listitem--checked > a,
.rteditor__listitem--checked > em,
.rteditor__listitem--checked > span,
.rteditor__listitem--checked > strong {
  color: var(--todo-text-done);
  opacity: 0.2;
  text-decoration: line-through;
}
.rteditor__listitem--checked > a {
  border-bottom: 1px solid;
  border-bottom-color: inherit;
}

@media (pointer: fine) {
  .rteditor__listitem--unchecked:hover:before {
    background-color: var(--accent);
  }
  .rteditor__listitem--unchecked:hover:after {
    background-color: #fff;
    opacity: 1;
  }
  .rteditor__listitem--unchecked:has(> span:hover):after {
    opacity: 0;
  }
  .rteditor__listitem--checked:hover:before {
    background-color: var(--todo-line);
  }
}

.rteditor__checklist > li:has(ul:only-child, ol:only-child):before,
.rteditor__checklist > li:has(ul:only-child, ol:only-child):after {
  content: none;
}

.rteditor__media {
  position: relative;
}
.rteditor__media--selected::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--app-color);
  opacity: 0.25;
  z-index: 1;
}
.rteditor__image {
  margin: 2.7778rem 0;
  max-width: 100% !important;
  width: auto !important;
}
.rteditor__editable > :first-child .rteditor__image {
  margin-top: 0;
}


/* Planner transfers keep file actions large enough for touch and keyboard use. */
.modal--transfer { width: min(42rem, calc(100vw - 2rem)); }
.modal--transfer .modal__body { display: grid; gap: 1rem; }
.modal--transfer .modal__body p { margin: 0; line-height: 1.5; }
.modal--transfer .modal__body h3 { margin: .25rem 0 0; }
.modal--transfer .btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.modal--transfer button, .modal--transfer input::file-selector-button { min-height: 44px; padding: .5rem .75rem; }
.modal--transfer input { max-width: 100%; }

.collaboration-body { display: grid; gap: 16px; }
.collaboration-body label { display: grid; gap: 8px; }
.collaboration-body input:not([type=checkbox]), .collaboration-body textarea { width: 100%; padding: 10px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; font: inherit; }
.collaboration-card { display: grid; gap: 12px; padding-block: 16px; border-block-start: 1px solid var(--border-color, #bbb); overflow-wrap: anywhere; }
.collaboration-card h3, .collaboration-card p { margin: 0; white-space: pre-wrap; }
.collaboration-member { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.collaboration-overlay button { min-height: 44px; }
.collaboration-overlay .modal { padding: 24px; gap: 16px; box-sizing: border-box; background: var(--panel-bg, #fff); }
.collaboration-overlay h2 { margin: 0; overflow-wrap: anywhere; }
.collaboration-overlay [role=status]:empty { display: none; }
.collaboration-body { min-height: 0; overflow-y: auto; padding-inline-end: 4px; }
.collaboration-overlay button { border: 1px solid var(--border-color, #bbb); border-radius: 8px; padding: 8px 12px; }
.collaboration-overlay button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.recurrence-preview__dates { display:flex; flex-wrap:wrap; gap:6px 16px; margin:0; padding:0; list-style:none; }
.recurrence-preview__dates li { white-space:nowrap; }

.repeat-history { display:grid; gap:.6rem; margin-block:1rem; }
.repeat-history__month { display:flex; align-items:center; justify-content:space-between; }
.repeat-history__grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; text-align:center; }
.repeat-history button { color:inherit; border:1px solid currentColor; border-radius:7px; min-height:34px; }
.repeat-history button[aria-pressed="true"] { background:#287049; color:white; }
.repeat-history button:disabled { opacity:.35; border-color:transparent; }
.repeat-history__month button { width:40px; min-height:40px; border-color:transparent; font-size:1.35rem; }
.repeat-history__grid button { border-color:color-mix(in srgb,currentColor 18%,transparent); font-variant-numeric:tabular-nums; }
.repeat-history__grid button:focus-visible { outline:2px solid currentColor; outline-offset:1px; }
.recurring-row button.recurring-row__text { color:inherit; font:inherit; text-align:start; cursor:pointer; }

.recurring-row:has(.cadence-strip) { flex-wrap:wrap; }
.cadence-strip { flex:1 0 100%; display:flex; flex-wrap:wrap; gap:3px; }
.cadence-strip .cadence-cell { font-size:.69rem; padding:.15rem .3rem; background:var(--line-soft); border-radius:4px; }
.cadence-grid--monthly, .cadence-grid--yearly { grid-template-columns:repeat(3,minmax(0,1fr)); }
.cadence-grid button { min-height:44px; }
.year-chart { display:grid; gap:1px; }
.year-chart i { background:var(--line-soft); border-radius:2px; }
.year-chart i.missed { background-color:#bc8648; }
.year-chart i.done { background-color:#398958; }
.year-chart.weekly { grid-template-columns:repeat(52,minmax(0,1fr)); height:18px; }
.year-chart.weekly i { background-image:linear-gradient(to top,#398958 var(--done),transparent var(--done)); }
.year-chart.daily { grid-auto-flow:column; grid-template-rows:repeat(7,4px); }
