:root {
  --share-ink: #201d1a;
  --share-muted: #746c64;
  --share-paper: #f7f2eb;
  --share-card: #fffdf9;
  --share-line: rgba(48, 40, 33, 0.13);
  --share-accent: #a84d37;
  --share-accent-soft: #f3ddd4;
}

html, body { margin: 0; }

.share-page {
  min-height: 100vh;
  color: var(--share-ink);
  background:
    radial-gradient(circle at 88% 4%, rgba(215, 177, 154, 0.25), transparent 29rem),
    var(--share-paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.share-page *, .share-page *::before, .share-page *::after { box-sizing: border-box; }
.share-page img { display: block; max-width: 100%; }
.share-page a { color: inherit; }

.share-nav {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--share-line);
}

.share-wordmark {
  text-decoration: none;
  color: var(--share-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.share-nav-note { color: var(--share-muted); font-size: 13px; }

.share-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 64px;
  align-items: center;
}

.share-render-panel { min-width: 0; }

.share-render-frame {
  position: relative;
  overflow: hidden;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(46, 37, 31, 0.1);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 32px 80px rgba(62, 42, 30, 0.16);
}

.share-render {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 24px;
  background: #e9e2d9;
}

.share-consent-badge {
  position: absolute;
  left: 28px;
  bottom: 28px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  color: #fff;
  background: rgba(27, 24, 21, 0.7);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.share-story { max-width: 480px; }

.share-eyebrow {
  margin: 0 0 12px;
  color: var(--share-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.share-story h1, .share-unavailable h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5.2vw, 70px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.share-description {
  margin: 24px 0;
  color: var(--share-muted);
  font-size: 17px;
  line-height: 1.65;
}

.share-creator { display: flex; align-items: center; gap: 12px; margin: 28px 0; }
.share-creator-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--share-accent);
  font-family: Georgia, serif;
  font-size: 20px;
}
.share-creator div { display: grid; gap: 3px; }
.share-creator strong { font-size: 14px; }
.share-creator span { color: var(--share-muted); font-size: 12px; }

.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.share-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease;
}
.share-button:hover { transform: translateY(-1px); }
.share-button:focus-visible { outline: 3px solid rgba(168, 77, 55, 0.25); outline-offset: 3px; }
.share-button-primary { color: #fff !important; background: var(--share-accent); }
.share-button-secondary { border-color: var(--share-line); background: rgba(255, 255, 255, 0.62); }
.share-button-dark { color: #fff !important; background: var(--share-ink); }
.share-action-note { margin: 12px 0 0; color: var(--share-muted); font-size: 11px; }

.share-items-section { grid-column: 1 / -1; margin-top: 42px; }
.share-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.share-section-heading h2, .share-creator-card h2 { margin: 0; font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.share-section-heading > span { color: var(--share-muted); font-size: 12px; }
.share-item-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.share-item { min-width: 0; padding: 10px 10px 16px; border: 1px solid var(--share-line); border-radius: 20px; background: var(--share-card); }
.share-item-image-wrap { position: relative; overflow: hidden; border-radius: 14px; background: #eee8e0; }
.share-item-image { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.share-source { position: absolute; left: 8px; bottom: 8px; padding: 6px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.share-source-creator_edit { color: #843f2e; background: rgba(250, 225, 214, 0.94); }
.share-source-owned { color: #3d4a40; background: rgba(229, 238, 229, 0.94); }
.share-item > p { margin: 12px 4px 4px; color: var(--share-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.share-item h3 { margin: 0 4px; font-size: 14px; line-height: 1.35; }

.share-creator-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 18px;
  padding: 32px;
  border-radius: 26px;
  color: #fff;
  background: var(--share-ink);
}
.share-creator-card .share-eyebrow { color: #e6a88e; }
.share-creator-card p:not(.share-eyebrow) { max-width: 570px; margin: 10px 0 0; color: rgba(255, 255, 255, 0.67); font-size: 12px; line-height: 1.5; }
.share-creator-card .share-button-dark { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.1); }

.share-privacy-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  color: var(--share-muted);
  font-size: 11px;
  line-height: 1.5;
}
.share-privacy-note strong { color: var(--share-ink); }
.share-privacy-note a { margin-left: auto; }

.share-unavailable {
  min-height: calc(100vh - 210px);
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.share-unavailable p:not(.share-eyebrow) { max-width: 520px; margin: 24px 0; color: var(--share-muted); font-size: 16px; line-height: 1.6; }

.share-page .legal-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--share-line);
  color: var(--share-muted);
  font-size: 11px;
}
.share-page .legal-footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.share-page .legal-footer-links a { text-decoration: none; }
.share-page .legal-footer-links a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .share-nav { width: min(100% - 28px, 1120px); min-height: 64px; }
  .share-nav-note { display: none; }
  .share-shell { width: min(100% - 28px, 1120px); padding: 28px 0 52px; grid-template-columns: 1fr; gap: 28px; }
  .share-render-frame { max-width: 480px; padding: 8px; border-radius: 25px; }
  .share-render { border-radius: 19px; }
  .share-consent-badge { left: 20px; bottom: 20px; }
  .share-story { max-width: none; }
  .share-story h1 { font-size: clamp(39px, 12vw, 58px); }
  .share-items-section { margin-top: 24px; }
  .share-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .share-creator-card { align-items: flex-start; flex-direction: column; padding: 24px; }
  .share-privacy-note { align-items: flex-start; flex-wrap: wrap; }
  .share-privacy-note a { width: 100%; margin-left: 0; margin-top: 4px; }
  .share-page .legal-footer { width: min(100% - 28px, 1120px); align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .share-button { transition: none; }
}
