.share-story-page { background: #fffefa; }

.share-story-hero {
  padding: 4.5rem 0;
  color: #fff;
  background: radial-gradient(circle at 88% 9%, rgba(229, 178, 169, .52), transparent 24%), var(--color-foreground);
}

.share-story-hero-grid { display: grid; gap: 2rem; }
.share-story-hero h1 {
  max-width: 51rem;
  margin: 0;
  font: 700 clamp(2.75rem, 12vw, 5.4rem)/1.01 var(--font-heading);
  letter-spacing: -.055em;
}

.share-story-hero h1 em { color: var(--color-warm); font-style: normal; }
.share-story-deck { max-width: 43rem; margin: 1.4rem 0 0; color: rgba(255, 255, 255, .76); }

.share-story-steps {
  display: grid;
  gap: .55rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.share-story-steps li {
  display: flex;
  align-items: center;
  gap: .65rem;
  font: 700 .76rem/1.4 var(--font-heading);
}

.share-story-steps span {
  min-width: 2rem;
  color: var(--color-warm);
  font-size: .66rem;
  letter-spacing: .08em;
}

.share-story-invite {
  display: grid;
  gap: .65rem;
  align-items: center;
  max-width: 44rem;
  margin: 0 auto;
  padding: .9rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-foreground);
  background: #fff;
}

.share-story-invite .eyebrow { color: var(--color-primary-strong); }
.share-story-invite strong { display: block; font: 700 .84rem/1.35 var(--font-heading); }
.share-story-invite div > p:last-child { margin: .3rem 0 0; color: var(--color-muted-foreground); font-size: .68rem; }
.share-story-invite button,
.share-story-review-heading button {
  min-height: 2.75rem;
  padding: .65rem .9rem;
  border: 1px solid #9ebcb5;
  border-radius: var(--radius-sm);
  color: var(--color-primary-strong);
  background: transparent;
  font: 700 .74rem/1.3 var(--font-heading);
}

.share-story-invite button:hover { border-color: var(--color-primary-strong); background: #edf8f4; }
.share-story-link-status { min-height: 1.1rem; margin: 0; color: var(--color-primary-strong); font: 700 .7rem/1.5 var(--font-heading); }
.share-story-link-status:empty { display: none; }
.share-story-share-link { padding: 1.25rem 0 2rem; background: #fffefa; }

.share-story-workspace {
  scroll-margin-top: calc(var(--header-height) + 1rem);
  padding: 4.5rem 0;
  background: radial-gradient(circle at 96% 6%, rgba(229, 178, 169, .24), transparent 25%), linear-gradient(145deg, #edf7f3, #fffefa);
}

.share-story-workspace-grid { display: grid; gap: 1.25rem; }
.share-story-form-heading h2 {
  margin: 0;
  font: 700 clamp(1.65rem, 6vw, 2.4rem)/1.12 var(--font-heading);
  letter-spacing: -.03em;
}

.share-story-form-heading h2 em { color: #c9796f; font-style: normal; }
.share-story-form-heading > p:not(.eyebrow) { max-width: 38rem; margin: .85rem 0 0; color: var(--color-muted-foreground); }
.share-story-safety-note { margin-top: 1.1rem; padding: 1rem; border: 1px solid #e5c58f; border-radius: var(--radius-md); background: #fff8e9; }
.share-story-safety-note strong { font: 700 .84rem/1.35 var(--font-heading); }
.share-story-safety-note p { margin: .4rem 0 0; color: #62533d; font-size: .75rem; line-height: 1.65; }

.share-story-form {
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.share-story-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.share-story-field-grid { display: grid; gap: 1rem; }
.share-story-field { display: grid; gap: .45rem; min-width: 0; }
.share-story-field > span:first-child,
.share-story-photo-field > div:first-child > span {
  color: var(--color-foreground);
  font: 700 .8rem/1.4 var(--font-heading);
}

.share-story-field > span:first-child small,
.share-story-photo-field > div:first-child > span small {
  margin-left: .25rem;
  color: var(--color-muted-foreground);
  font: 500 .65rem/1.4 var(--font-body);
}

.share-story-field input,
.share-story-field select,
.share-story-field textarea {
  width: 100%;
  min-height: 3.25rem;
  margin: 0;
  padding: .75rem .85rem;
  border: 1px solid #a9bcb8;
  border-radius: var(--radius-sm);
  color: var(--color-foreground);
  background: #fff;
  font: 400 1rem/1.5 var(--font-body);
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.share-story-field textarea { min-height: 13rem; resize: vertical; }
.share-story-field input::placeholder,
.share-story-field textarea::placeholder { color: #71817f; opacity: 1; }
.share-story-field input:focus,
.share-story-field select:focus,
.share-story-field textarea:focus,
.share-story-photo-picker:focus-within {
  border-color: var(--color-primary-strong);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(20, 112, 103, .16);
}

.share-story-field [aria-invalid="true"],
.share-story-photo-field[data-invalid="true"] .share-story-photo-picker { border-color: #b42318; }
.share-story-help { display: flex; justify-content: space-between; gap: .75rem; color: var(--color-muted-foreground); font-size: .7rem; line-height: 1.5; }
.share-story-help small:last-child { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.share-story-inline-error { min-height: 1rem; color: #9f241d; font-size: .7rem; line-height: 1.4; }

.share-story-choice-group,
.share-story-story-section {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid #cbd9d5;
  border-radius: var(--radius-md);
  background: #fbfdfc;
}

.share-story-choice-group > legend,
.share-story-story-section > legend {
  padding: 0 .35rem;
  color: var(--color-foreground);
  font: 700 .84rem/1.4 var(--font-heading);
}

.share-story-choice-group > legend small {
  margin-left: .25rem;
  color: var(--color-muted-foreground);
  font: 500 .65rem/1.4 var(--font-body);
}

.share-story-choice-list,
.share-story-mode-options {
  display: grid;
  gap: .65rem;
}

.share-story-choice,
.share-story-mode-choice {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: .7rem;
  align-items: start;
  min-height: 3.5rem;
  padding: .8rem;
  border: 1px solid #b8cbc6;
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.share-story-choice:hover,
.share-story-mode-choice:hover { border-color: var(--color-primary-strong); background: #f6fbf9; }
.share-story-choice:has(input:checked),
.share-story-mode-choice:has(input:checked) { border-color: var(--color-primary-strong); background: #edf8f4; box-shadow: 0 0 0 1px var(--color-primary-strong); }
.share-story-choice input,
.share-story-mode-choice input { width: 1.2rem; height: 1.2rem; margin: .12rem 0 0; accent-color: var(--color-primary-strong); }
.share-story-choice strong,
.share-story-mode-choice strong { display: block; font: 700 .76rem/1.4 var(--font-heading); }
.share-story-choice small,
.share-story-mode-choice small { display: block; margin-top: .2rem; color: var(--color-muted-foreground); font-size: .67rem; line-height: 1.45; }
.share-story-conditional-field { margin-top: .75rem; }
.share-story-conditional-field[hidden] { display: none; }
.share-story-conditional-fields { display: grid; gap: .8rem; margin-top: .8rem; }
.share-story-conditional-fields[hidden] { display: none; }

.share-story-story-section { display: grid; gap: 1rem; background: #fff; }
.share-story-choice-group[aria-invalid="true"],
.share-story-story-section[aria-invalid="true"] { border-color: #b42318; }
.share-story-choice-group:focus,
.share-story-story-section:focus { outline: 0; box-shadow: 0 0 0 3px rgba(180, 35, 24, .13); }
.share-story-section-intro { margin: -.2rem 0 0; color: var(--color-muted-foreground); font-size: .74rem; line-height: 1.6; }
.share-story-guided-grid { display: grid; gap: 1rem; }
.share-story-guided-grid .share-story-field textarea { min-height: 8rem; }
[data-free-story] .share-story-field textarea { min-height: 13rem; }
[data-guided-story][hidden],
[data-free-story][hidden] { display: none; }

.share-story-errors {
  padding: 1rem;
  border: 1px solid #d9877f;
  border-left: 4px solid #b42318;
  border-radius: var(--radius-sm);
  background: #fff5f4;
}

.share-story-errors[hidden] { display: none; }
.share-story-errors h3 { margin: 0; font: 700 1rem/1.35 var(--font-heading); }
.share-story-errors ul { margin: .65rem 0 0; padding-left: 1.25rem; color: #7a1c16; font-size: .78rem; }
.share-story-errors a { color: inherit; text-decoration: underline; text-underline-offset: .15rem; }

.share-story-photo-field {
  display: grid;
  gap: .75rem;
  min-width: 0;
  padding-top: .25rem;
}

.share-story-photo-field > div:first-child p { margin: .3rem 0 0; color: var(--color-muted-foreground); font-size: .72rem; }
.share-story-photo-picker {
  position: relative;
  min-height: 9rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .2rem;
  padding: 1rem;
  border: 1px dashed #7da9a2;
  border-radius: var(--radius-md);
  background: #f4faf8;
  text-align: center;
  cursor: pointer;
}

.share-story-photo-picker > span { color: var(--color-primary-strong); font: 400 2rem/1 var(--font-heading); }
.share-story-photo-picker strong { font: 700 .82rem/1.4 var(--font-heading); }
.share-story-photo-picker small { color: var(--color-muted-foreground); font-size: .68rem; }
.share-story-photo-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.share-story-photo-status { min-height: 1.25rem; margin: 0; color: var(--color-primary-strong); font: 700 .7rem/1.5 var(--font-heading); }

.share-story-photo-preview,
.share-story-review-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.share-story-photo-preview[hidden],
.share-story-review-photos[hidden] { display: none; }
.share-story-photo-item { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: var(--radius-sm); background: #edf2f0; }
.share-story-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.share-story-photo-item button {
  position: absolute;
  top: .45rem;
  right: .45rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .4rem;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 42, 39, .82);
  font: 700 .68rem/1 var(--font-heading);
}

.share-story-photo-item span { position: absolute; inset: auto .45rem .45rem; padding: .25rem .4rem; border-radius: .25rem; color: #fff; background: rgba(15, 42, 39, .75); font-size: .58rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-story-consent { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: .75rem; align-items: start; padding: 1rem; border-radius: var(--radius-sm); background: #f3f7f5; color: #344f4c; font-size: .78rem; line-height: 1.6; cursor: pointer; }
.share-story-consent input { width: 1.25rem; height: 1.25rem; margin: .16rem 0 0; accent-color: var(--color-primary-strong); }
.share-story-consent--public { border: 1px solid #afd4ca; background: #eff8f5; }
.share-story-consent strong { color: var(--color-foreground); font-family: var(--font-heading); }
.share-story-consent-help { margin: -.45rem 0 0; color: var(--color-muted-foreground); font-size: .7rem; line-height: 1.55; }

.share-story-preview-button,
.share-story-send-actions button {
  min-height: 3.25rem;
  padding: .75rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--color-primary-strong);
  font: 700 .82rem/1.3 var(--font-heading);
  transition: background var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

.share-story-preview-button:hover,
.share-story-send-actions button:hover { background: var(--color-foreground); box-shadow: var(--shadow-sm); }
.share-story-preview-button:active,
.share-story-send-actions button:active { transform: translateY(1px); }
.share-story-preview-button:disabled { cursor: wait; opacity: .72; transform: none; }
.share-story-form[aria-busy="true"] { position: relative; }
.share-story-form[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, .18);
  pointer-events: none;
}

.share-story-review {
  grid-column: 1 / -1;
  min-width: 0;
  scroll-margin-top: calc(var(--header-height) + 1rem);
  display: grid;
  gap: 1rem;
  margin-top: .75rem;
  padding: 1.15rem;
  border: 1px solid #b8d7ce;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.share-story-review[hidden] { display: none; }
.share-story-review-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.share-story-review h2 { margin: 0; font: 700 clamp(1.6rem, 6vw, 2.35rem)/1.08 var(--font-heading); letter-spacing: -.035em; }
.share-story-review-heading button { flex: 0 0 auto; min-height: 2.75rem; border-color: var(--color-border); color: var(--color-primary-strong); }
.share-story-review-heading button:hover { background: #f3f7f5; }
.share-story-review pre { width: 100%; max-width: 100%; max-height: 24rem; overflow: auto; margin: 0; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #f8fbfa; color: #274744; font: 400 .82rem/1.7 var(--font-body); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.share-story-review-photos .share-story-photo-item span,
.share-story-review-photos .share-story-photo-item button { display: none; }
.share-story-send-actions { display: grid; gap: .65rem; max-width: 30rem; }
.share-story-send-help { margin: 0; color: var(--color-muted-foreground); font-size: .72rem; line-height: 1.6; }
.share-story-send-status { min-height: 1.5rem; margin: 0; color: var(--color-primary-strong); font: 700 .75rem/1.5 var(--font-heading); }

.share-story-success {
  grid-column: 1 / -1;
  scroll-margin-top: calc(var(--header-height) + 1rem);
  display: grid;
  justify-items: center;
  gap: .75rem;
  max-width: 46rem;
  margin: 1rem auto 0;
  padding: clamp(1.5rem, 6vw, 3rem);
  border: 1px solid #9bc9be;
  border-radius: var(--radius-lg);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.share-story-success[hidden] { display: none; }
.share-story-success-icon { width: 4rem; height: 4rem; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--color-primary-strong); font: 700 1.7rem/1 var(--font-heading); }
.share-story-success h2 { max-width: 36rem; margin: 0; font: 700 clamp(1.65rem, 6vw, 2.5rem)/1.12 var(--font-heading); letter-spacing: -.035em; }
.share-story-success > p:not(.eyebrow) { max-width: 38rem; margin: 0; color: var(--color-muted-foreground); }
.share-story-reference { padding: .65rem .85rem; border-radius: var(--radius-sm); background: #eef6f3; font-size: .74rem; }
.share-story-reference strong { color: var(--color-foreground); font-family: var(--font-heading); letter-spacing: .025em; }
.share-story-success button { min-height: 3rem; padding: .7rem 1rem; border: 1px solid #9ebcb5; border-radius: var(--radius-sm); color: var(--color-primary-strong); background: #fff; font: 700 .78rem/1.3 var(--font-heading); }

.share-story-trust { padding: 3.5rem 0; background: var(--color-foreground); color: #fff; }
.share-story-trust-grid { display: grid; gap: 1.5rem; }
.share-story-trust-grid > div { padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .2); }
.share-story-trust-grid span { color: var(--color-warm); font: 700 .66rem/1.4 var(--font-heading); letter-spacing: .08em; }
.share-story-trust-grid strong { display: block; margin-top: .35rem; font: 700 1rem/1.35 var(--font-heading); }
.share-story-trust-grid p { margin: .45rem 0 0; color: rgba(255, 255, 255, .66); font-size: .74rem; }

@media (min-width: 48rem) {
  .share-story-hero { padding: 6rem 0; }
  .share-story-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .share-story-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .share-story-workspace { padding: 6rem 0; }
  .share-story-workspace-grid { grid-template-columns: minmax(17rem, .7fr) minmax(0, 1.3fr); align-items: start; gap: 3rem; }
  .share-story-form-heading { position: sticky; top: calc(var(--header-height) + 1.5rem); }
  .share-story-form { padding: 1.75rem; }
  .share-story-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-story-journey-options,
  .share-story-identity-options,
  .share-story-conditional-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-story-mode-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-story-guided-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-story-photo-preview,
  .share-story-review-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .share-story-send-actions { grid-template-columns: minmax(0, 1fr); }
  .share-story-trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .share-story-invite { grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1rem; }
  .share-story-invite button { grid-column: 2; grid-row: 1; }
  .share-story-link-status { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .share-story-preview-button,
  .share-story-send-actions button { transition: none; }
}

@media print {
  .site-header,
  .mobile-actions,
  .share-story-invite,
  .share-story-form,
  .share-story-send-actions { display: none !important; }
}
