:root {
  --reminder-ink: #173d3a;
  --reminder-muted: #55706d;
  --reminder-border: #cfe3df;
  --reminder-paper: #ffffff;
  --reminder-mint: #e8f8f2;
  --reminder-green: #087f68;
  --reminder-line: #06c755;
  --reminder-gentle: #e9f7ed;
  --reminder-normal: #eaf3ff;
  --reminder-firm: #fff0e5;
  --reminder-shadow: 0 18px 48px rgba(26, 73, 67, 0.12);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reminder-page {
  background:
    radial-gradient(circle at 12% 0%, rgba(113, 220, 185, 0.22), transparent 32rem),
    #f6fbfa;
  color: var(--reminder-ink);
}

.reminder-container {
  width: min(100% - 28px, 1080px);
  margin-inline: auto;
}

.reminder-hero {
  padding: 28px 0 18px;
}

.reminder-hero-card {
  display: grid;
  gap: 24px;
  padding: 26px 22px;
  overflow: hidden;
  border: 1px solid var(--reminder-border);
  border-radius: 28px;
  background: linear-gradient(145deg, #fff 0%, #effbf6 100%);
  box-shadow: var(--reminder-shadow);
}

.reminder-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 9vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.reminder-lead {
  margin: 0;
  color: var(--reminder-muted);
  font-size: 1.05rem;
  font-weight: 700;
}

.flow-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  border-radius: 22px;
  background: #173d3a;
  color: #fff;
  font-weight: 800;
}

.flow-visual span:not(.flow-arrow) {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.flow-visual b {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #7de0be;
  color: #123c37;
  font-size: 1.1rem;
}

.flow-arrow {
  color: #7de0be;
  font-size: 1.25rem;
}

.reminder-tool {
  padding: 18px 0 36px;
}

#reminder-form {
  display: grid;
  gap: 18px;
}

.choice-section {
  min-width: 0;
  margin: 0;
  padding: 20px 16px;
  border: 1px solid var(--reminder-border);
  border-radius: 24px;
  background: var(--reminder-paper);
  box-shadow: 0 8px 24px rgba(26, 73, 67, 0.07);
}

.choice-section legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  color: var(--reminder-ink);
  font-size: 1.15rem;
  font-weight: 900;
}

.choice-section legend span:last-child {
  display: grid;
}

.choice-section legend small,
.results-heading small,
.collection-app-copy small,
.next-calculation-link small {
  color: var(--reminder-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.step-number {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--reminder-green);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.tone-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  display: grid;
  min-height: 92px;
  place-items: center;
  gap: 7px;
  padding: 12px 8px;
  cursor: pointer;
  border: 2px solid #dbe9e7;
  border-radius: 18px;
  background: #fbfefd;
  color: var(--reminder-ink);
  font-weight: 900;
  text-align: center;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.choice-card.compact {
  min-height: 82px;
}

.choice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-card:has(input:checked) {
  border-color: var(--reminder-green);
  background: var(--reminder-mint);
  box-shadow: 0 0 0 3px rgba(8, 127, 104, 0.12);
  transform: translateY(-2px);
}

.choice-card:has(input:focus-visible) {
  outline: 3px solid #095fd1;
  outline-offset: 3px;
}

.choice-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(23, 61, 58, 0.09);
  font-size: 1.45rem;
}

.tone-gentle:has(input:checked) {
  border-color: #4c9a63;
  background: var(--reminder-gentle);
}

.tone-normal:has(input:checked) {
  border-color: #3977bd;
  background: var(--reminder-normal);
}

.tone-firm:has(input:checked) {
  border-color: #c56c2b;
  background: var(--reminder-firm);
}

.optional-grid {
  display: grid;
  gap: 12px;
}

.amount-card,
.receipt-card-mini {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--reminder-border);
  border-radius: 20px;
  background: #fff;
}

.amount-card > span:nth-child(2),
.receipt-card-mini > span:nth-child(2),
.receipt-card-mini label {
  display: grid;
}

.amount-card small,
.receipt-card-mini small {
  color: var(--reminder-muted);
  font-size: 0.72rem;
}

.optional-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: var(--reminder-mint);
  color: var(--reminder-green);
  font-size: 1.35rem;
  font-weight: 900;
}

.amount-input-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
}

.amount-input-wrap input {
  width: min(36vw, 150px);
  min-height: 48px;
  padding: 8px 10px;
  border: 2px solid var(--reminder-border);
  border-radius: 13px;
  background: #f9fcfb;
  color: var(--reminder-ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: right;
}

.amount-input-wrap input:focus-visible,
.receipt-card-mini input:focus-visible,
.receipt-card-mini a:focus-visible {
  outline: 3px solid #095fd1;
  outline-offset: 3px;
}

.receipt-card-mini input[type="checkbox"] {
  width: 28px;
  height: 28px;
  accent-color: var(--reminder-green);
}

.receipt-card-mini a {
  grid-column: 3;
  color: var(--reminder-green);
  font-weight: 900;
}

.receipt-card-mini.is-muted {
  color: var(--reminder-muted);
  background: #f5f8f7;
}

.receipt-card-mini.is-warning {
  border-color: #edc799;
  background: #fff8ee;
}

.privacy-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  color: var(--reminder-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.reminder-error {
  margin: 0;
  padding: 12px 14px;
  border: 2px solid #c93f3f;
  border-radius: 14px;
  background: #fff2f2;
  color: #8d2020;
  font-weight: 800;
}

.generate-button {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border: 0;
  border-radius: 19px;
  background: linear-gradient(135deg, #087f68, #0aa987);
  box-shadow: 0 12px 28px rgba(8, 127, 104, 0.25);
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
}

.generate-button:focus-visible,
.share-reminder-button:focus-visible,
.copy-reminder-button:focus-visible,
.next-calculation-link:focus-visible {
  outline: 3px solid #095fd1;
  outline-offset: 4px;
}

.reminder-results {
  scroll-margin-top: 12px;
  padding: 44px 0;
  border-block: 1px solid var(--reminder-border);
  background: #edf8f5;
}

.results-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.results-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 6vw, 2.2rem);
}

.tone-results {
  display: grid;
  gap: 16px;
}

.tone-result {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 2px solid transparent;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 73, 67, 0.09);
}

.tone-result.is-preferred {
  border-color: var(--reminder-green);
  box-shadow: 0 14px 34px rgba(8, 127, 104, 0.18);
}

.tone-result-gentle {
  background: linear-gradient(145deg, #fff, var(--reminder-gentle));
}

.tone-result-normal {
  background: linear-gradient(145deg, #fff, var(--reminder-normal));
}

.tone-result-firm {
  background: linear-gradient(145deg, #fff, var(--reminder-firm));
}

.tone-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tone-result-head h3 {
  margin: 0;
  font-size: 1.3rem;
}

.tone-result-head small {
  color: var(--reminder-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.tone-result-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: #fff;
  font-size: 1.5rem;
}

.preferred-badge {
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--reminder-green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.tone-result pre {
  min-height: 190px;
  margin: 0;
  padding: 16px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 1px solid rgba(23, 61, 58, 0.12);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.86);
  color: #203d3a;
  font: inherit;
  font-size: 0.94rem;
  line-height: 1.75;
}

.result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.share-reminder-button,
.copy-reminder-button {
  min-height: 54px;
  cursor: pointer;
  border-radius: 15px;
  font: inherit;
  font-weight: 900;
}

.share-reminder-button {
  border: 0;
  background: var(--reminder-line);
  color: #082d1d;
}

.copy-reminder-button {
  padding-inline: 18px;
  border: 2px solid var(--reminder-border);
  background: #fff;
  color: var(--reminder-ink);
}

.reminder-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: var(--reminder-green);
  font-weight: 800;
  text-align: center;
}

.loop-actions {
  margin-top: 24px;
}

.next-calculation-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px 18px;
  border-radius: 20px;
  background: #173d3a;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.next-calculation-link span:nth-child(2) {
  display: grid;
}

.next-calculation-link small {
  color: #a9d8ce;
}

.collection-app-card {
  display: grid;
  gap: 18px;
  margin-top: 16px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 73, 67, 0.08);
}

.collection-app-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.collection-app-copy h2,
.collection-app-copy p {
  margin: 0;
}

.collection-app-copy h2 {
  font-size: 1.3rem;
}

.collection-app-copy p {
  margin-top: 5px;
  color: var(--reminder-muted);
  font-size: 0.88rem;
}

.collection-app-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 17px;
  background: var(--reminder-mint);
  font-size: 1.5rem;
}

.collection-app-card .store-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.collection-app-card .store-button {
  min-height: 50px;
  justify-content: center;
}

.reminder-faq {
  background: #fff;
}

@media (min-width: 720px) {
  .reminder-hero {
    padding-top: 46px;
  }

  .reminder-hero-card {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    align-items: center;
    padding: 44px;
  }

  .choice-section {
    padding: 24px;
  }

  .choice-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .choice-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .optional-grid {
    grid-template-columns: 1fr 1fr;
  }

  .generate-button {
    width: min(100%, 560px);
    margin-inline: auto;
  }

  .tone-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .tone-result {
    grid-template-rows: auto 1fr auto;
  }

  .collection-app-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (hover: hover) {
  .choice-card:hover {
    border-color: #77b7aa;
    transform: translateY(-2px);
  }

  .generate-button:hover,
  .next-calculation-link:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
  }

  .share-reminder-button:hover {
    filter: brightness(0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
