/* A small, complete card: each action opens a focused next step. */
.next-time.modal {
  top: var(--next-time-top, 0px);
  bottom: var(--next-time-bottom, 0px);
  width: min(420px, calc(100% - 24px));
  max-width: 420px;
  max-height: min(var(--next-time-height, calc(100dvh - 24px)), 600px);
  padding: 22px;
  overflow: hidden;
  border: 1px solid #d4d9b6;
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 85% 0, #ffebc180, transparent 60%), #f8f5eb;
  box-shadow:
    0 24px 90px #29342036,
    inset 0 1px 0 #fffdf5;
}
.next-time-header {
  position: relative;
  text-align: center;
}
.next-time-art {
  height: 88px;
  width: 116px;
  object-fit: contain;
  display: block;
  margin: -10px auto 0;
}
.next-time-spark {
  position: absolute;
  color: #b7964e;
  font-size: 20px;
  top: 22px;
  left: calc(50% - 78px);
  transform: rotate(-12deg);
}
.next-time-spark:last-of-type {
  left: auto;
  right: calc(50% - 78px);
  top: 47px;
  font-size: 13px;
  transform: rotate(14deg);
}
.next-time.modal h2 {
  font-size: 27px;
  line-height: 1.15;
  margin: 3px 0 6px;
}
.next-time.modal .next-time-intro {
  color: #777e63;
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 17px;
}
.next-time-actions {
  display: grid;
  gap: 9px;
}
.next-time-action {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 12px;
  border-radius: 17px;
  text-align: left;
  color: #414d2d;
  background: #eef0dd;
  border: 1px solid #dce1c6;
}
#next-time-notifications {
  background: #fbefd8;
  border-color: #eddfbd;
}
.next-time-action:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px #58644212;
}
.next-time-action:focus-visible {
  outline: 3px solid #85965c;
  outline-offset: 2px;
}
.next-time-action:disabled {
  opacity: 0.67;
  cursor: default;
}
.next-time-action.complete {
  opacity: 0.8;
}
.next-time-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 12px;
  background: #ffffff69;
  font-size: 22px;
}
.next-time-copy {
  min-width: 0;
}
.next-time-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}
.next-time-copy small {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: #7b806a;
  margin-top: 4px;
}
.next-time-mark {
  color: #87925e;
  font-size: 19px;
  text-align: center;
}
.next-time-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}
.next-time-footer button {
  min-height: 40px;
}
.next-time-footer .text-button {
  text-decoration: none;
  color: #7e846e;
}
.next-time-footer .soft-button {
  border-radius: 13px;
}
.next-time-detail h3 {
  font-size: 19px;
  margin: 7px 0 13px;
}
.next-time-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 13px;
}
.next-time-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  line-height: 1.5;
}
.next-time-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  height: 27px;
  width: 27px;
  border-radius: 50%;
  background: #e7eccf;
  color: #64733d;
  font-size: 12px;
  font-weight: 650;
}
.next-time.modal .next-time-detail-note {
  font-size: 11px;
  color: #7c826c;
  line-height: 1.5;
  margin: 15px 0 5px;
}
.next-time-back {
  min-height: 40px;
  background: transparent;
  padding: 7px 0 0;
  font-size: 12px;
  color: #626f43;
}
/* These classes follow the visual viewport, including an on-screen keyboard. */
.next-time.modal.compact {
  padding: 17px;
  border-radius: 25px;
}
.next-time.compact .next-time-art {
  height: 65px;
  width: 88px;
  margin-top: -7px;
}
.next-time.compact .next-time-spark {
  top: 12px;
}
.next-time.compact .next-time-spark:last-of-type {
  top: 32px;
}
.next-time.modal.compact h2 {
  font-size: 24px;
}
.next-time.modal.compact .next-time-intro {
  margin-bottom: 12px;
}
.next-time.compact .next-time-action {
  min-height: 60px;
  padding: 9px 11px;
}
.next-time.compact .next-time-actions {
  gap: 7px;
}
.next-time.compact .next-time-footer {
  margin-top: 10px;
}
.next-time.modal.short {
  padding: 12px 17px;
}
.next-time.short .next-time-art,
.next-time.short .next-time-spark {
  display: none;
}
.next-time.modal.short h2 {
  font-size: 21px;
  margin: 0 22px 3px;
}
.next-time.modal.short .next-time-intro {
  margin-bottom: 9px;
  font-size: 11px;
}
.next-time.short .next-time-action {
  min-height: 51px;
  padding: 7px 10px;
}
.next-time.short .next-time-copy small {
  margin-top: 2px;
  font-size: 10px;
}
.next-time.short .next-time-copy strong {
  font-size: 13px;
}
.next-time.short .next-time-actions {
  gap: 6px;
}
.next-time.short .next-time-footer {
  margin-top: 6px;
}
.next-time.short .next-time-footer button {
  min-height: 35px;
}
.next-time.short .next-time-steps {
  gap: 9px;
}
.next-time.short .next-time-steps li {
  font-size: 12px;
}
.next-time.short .next-time-detail h3 {
  font-size: 17px;
  margin: 3px 0 9px;
}
.next-time.modal.short .next-time-detail-note {
  margin-top: 10px;
}
.next-time.short.showing-detail .next-time-intro {
  display: none;
}
.next-time.short.showing-detail .next-time-detail h3 {
  margin-top: 12px;
}
.next-time.showing-detail .next-time-footer {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .next-time-action:not(:disabled):hover {
    transform: none;
  }
}

.next-time-email-form {
  padding: 12px;
  border: 1px solid #e8d9cb;
  border-radius: 17px;
  background: #f2e9df;
}
.next-time-email-form label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  margin: 0 0 8px;
}
.next-time-email-controls {
  display: flex;
  gap: 7px;
}
.next-time-email-controls input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px;
  border: 1px solid #d7d7bd;
  border-radius: 10px;
  background: #fffdf7;
  font-size: 16px;
}
.next-time-email-controls button {
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #dde4bd;
  color: #414d2d;
  font-size: 12px;
  font-weight: 650;
}
.next-time.modal #next-time-email-note {
  font-size: 11px;
  line-height: 1.4;
  color: #73775f;
  margin: 7px 0 0;
}
.next-time.modal .next-time-saved {
  margin: 0;
  padding: 8px 3px;
  color: #626f43;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.next-time.compact .next-time-art {
  height: 48px;
  width: 66px;
}
.next-time.compact .next-time-email-form {
  padding: 10px;
}
.next-time.short .next-time-email-form {
  padding: 8px 10px;
}
.next-time.short .next-time-email-form label {
  font-size: 13px;
  margin-bottom: 5px;
}
.next-time.modal.short #next-time-email-note {
  font-size: 10px;
  margin-top: 5px;
}
.next-time.modal.short .next-time-intro {
  display: none;
}
.next-time.modal.short h2 {
  margin-bottom: 8px;
}

/* Keep email and dismissal reachable while a small phone keyboard is open. */
.next-time.entering-email .next-time-action {
  display: none;
}
