.ed-form,
.ed-repeat-details {
  display: grid;
  gap: 14px;
}
.ed-more-reminders {
  display: grid;
  justify-items: start;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
#ed-additional-times {
  width: 100%;
}
.birthday-alerts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px 14px;
  border: 1px solid var(--line, #d6e3f5);
  border-radius: 10px;
  padding: 10px 12px 12px;
  margin: 0;
}
.birthday-alerts legend { font-weight: 600; padding: 0 4px; }
.birthday-alerts label { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.ed-reminder-row {
  display: grid;
  grid-template-columns: minmax(45px, 0.65fr) minmax(65px, 1fr) auto;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
}
.ed-reminder-row :is(input, select) {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 7px;
  padding: 7px;
  min-height: 40px;
}
.ed-reminder-row .secondary {
  margin: 0;
  padding-inline: 8px;
}
.ed-form [hidden],
#sheet-body [hidden] {
  display: none !important;
}
.ed-check {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
}
.ed-check input,
.ed-dayset input {
  accent-color: var(--accent);
}
.ed-swatches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ed-swatches button.ed-swatch {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  color: #fff;
  text-shadow: 0 0 2px #222;
  font-size: 18px;
}
.ed-swatch[aria-pressed='true'] {
  outline: 2px solid currentColor;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--accent);
}
.ed-custom-color {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ed-custom-color input[type='color'] {
  display: block;
  width: 38px;
  min-height: 36px;
  height: 36px;
  padding: 2px;
  cursor: pointer;
}
.ed-repeat-details {
  margin-top: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.ed-repeat-details > :nth-child(n + 3) {
  grid-column: 1/-1;
}
#ed-interval-unit {
  align-self: end;
  padding-bottom: 10px;
}
.ed-dayset {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  border: 0;
  padding: 0;
  min-width: 0;
  margin: 0;
}
.ed-dayset legend {
  padding: 0;
  margin-bottom: 7px;
}
.ed-dayset label {
  position: relative;
  display: inline-flex;
}
.ed-dayset input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ed-dayset span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.ed-dayset input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.ed-dayset input:focus-visible + span {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.ed-tally {
  font-size: 0.875rem;
  color: var(--muted);
}
.ed-candidate {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px;
}
.ed-candidate + .ed-candidate {
  border-top: 1px solid var(--line);
}
.ed-candidate .secondary {
  flex-shrink: 0;
}
.form-details {
  padding: 4px 0;
  border-block: 1px solid var(--line);
}
.form-details + .form-details {
  border-top: 0;
  margin-top: -14px;
}
.form-details > summary {
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.form-details > div {
  padding: 4px 0 12px;
}
.form-details > div > .secondary {
  justify-self: start;
}
.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-surface);
  color: var(--danger);
  font-size: 14px;
  line-height: 1.45;
}
.form-error:empty {
  padding: 0;
}
#ed-birthday {
  justify-self: start;
  min-height: 44px;
}
.event-facts > :not(.sheet-actions) {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.event-facts > h3 {
  font-size: 18px;
  letter-spacing: -0.3px;
}
.event-notes {
  white-space: pre-wrap;
}
.waiting {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 0;
}
.spinner {
  width: 22px;
  height: 22px;
  flex: none;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 3s;
  }
}
.ed-form .ed-check,
.ed-form legend {
  color: var(--ink);
  font-size: 14px;
}
.ed-check input {
  width: 19px;
  height: 19px;
  margin: 0;
}
.ed-dayset span {
  width: 36px;
  height: 36px;
  font-size: 14px;
  font-weight: 550;
}
.ed-form .ed-swatch {
  transition: transform 0.12s;
}
.ed-form .ed-swatch:active {
  transform: scale(0.94);
}
.ed-result-title {
  font-size: 16px;
  letter-spacing: -0.2px;
}
@media (max-width: 395px) {
  .ed-candidate {
    flex-wrap: wrap;
    padding-bottom: 10px;
  }
  .ed-candidate .secondary {
    margin-left: auto;
    min-height: 40px;
  }
}
.ed-route-link { color: var(--accent); font-weight: 600; text-underline-offset: .2em; }
@media (max-width: 740px) {
  .form-details > summary { padding-block: 13px; min-height: 44px; }
  .ed-check { min-height: 44px; }
  .ed-route-link { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; }
  .birthday-alerts label { min-height: 44px; }
}
