:root {
  --cream: #f4f0ea;
  --cream-light: #fbf8f4;
  --plum: #82445f;
  --plum-deep: #633247;
  --rose: #9e7b7e;
  --rose-soft: #d8c1bd;
  --charcoal: #3a3e41;
  --line: rgba(130, 68, 95, 0.22);
  --shadow: 0 28px 80px rgba(99, 50, 71, 0.14);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--cream); }
body { margin: 0; min-width: 320px; color: var(--charcoal); background: var(--cream); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 4px; }

.intro-view { position: relative; min-height: 100svh; padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 72px) clamp(38px, 6vw, 78px); display: grid; grid-template-columns: minmax(230px, .72fr) minmax(420px, 1.28fr); grid-template-rows: auto 1fr auto; column-gap: clamp(50px, 8vw, 130px); overflow: hidden; isolation: isolate; }
.intro-view::before { content: ""; position: absolute; z-index: -1; width: min(70vw, 940px); aspect-ratio: 1; right: -20%; bottom: -50%; border-radius: 50%; border: 1px solid var(--line); box-shadow: 0 0 0 70px rgba(158,123,126,.035), 0 0 0 140px rgba(158,123,126,.025); }
.intro-rule { position: absolute; top: 0; left: clamp(20px, 5vw, 72px); width: 1px; height: 18vh; background: var(--plum); opacity: .45; }
.intro-kicker { grid-column: 1 / -1; margin: 0 0 clamp(38px, 6vh, 76px); color: var(--plum); font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; text-align: right; }
.collaboration-intro { align-self: center; display: grid; gap: clamp(28px, 4vh, 44px); }
.partner-reveal { width: 100%; max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: minmax(110px, .72fr) minmax(0, 1.28fr); align-items: center; gap: 6px clamp(10px, 2vw, 24px); }
.partner-logo { min-width: 0; min-height: 150px; display: grid; place-items: center; opacity: 0; animation: partnerIn 1.1s cubic-bezier(.2,.75,.2,1) forwards; }
.partner-logo a { width: 100%; max-width: 100%; display: grid; place-items: center; }
.partner-logo img { position: static; width: 100%; height: auto; max-height: 150px; object-fit: contain; }
.partner-logo--egfr { animation-delay: .15s; }
.partner-logo--oncogene { animation-delay: .6s; }
.partner-logo--ylci { animation-delay: 1.05s; }
.partner-logo--egfr img { max-width: 155px; }
.partner-logo--oncogene a { width: min(260px, 100%); justify-self: center; }
.partner-logo--oncogene img { width: 100%; max-width: 260px; max-height: none; }
.partner-logo--ylci { grid-column: 1 / -1; }
.partner-logo--ylci a { width: min(340px, 100%); aspect-ratio: 1; margin: -95px auto; }
.partner-logo--ylci img { width: 100%; max-width: none; max-height: none; }
.collaboration-intro h1 { max-width: 540px; margin: 0 auto; color: var(--plum); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.1vw, 3.65rem); font-weight: 400; letter-spacing: -.035em; line-height: 1.05; opacity: 0; transform: translateY(14px); animation: campaignIn .9s 1.5s cubic-bezier(.2,.75,.2,1) forwards; }
.campaign-reveal { align-self: center; max-width: 800px; }
.campaign-logo-reveal { opacity: 0; transform: translateY(16px); animation: campaignIn 1.05s 2.35s cubic-bezier(.2,.75,.2,1) forwards; }
.campaign-action { opacity: 0; transform: translateY(14px); animation: campaignIn .9s 3.3s cubic-bezier(.2,.75,.2,1) forwards; }
.campaign-logo { width: min(100%, 620px); max-height: 230px; object-fit: contain; object-position: left center; margin-bottom: clamp(28px, 4vw, 48px); }
.campaign-copy { max-width: 650px; padding-top: 28px; border-top: 1px solid var(--line); }
.tool-intro h2 { margin: 0; color: var(--plum); font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.035em; line-height: 1.03; }
.campaign-copy p { margin: 4px 0 0; max-width: 650px; color: rgba(58,62,65,.78); font-size: clamp(.98rem, 1.35vw, 1.14rem); }
.campaign-copy .campaign-tagline { margin-top: 14px; color: var(--plum); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.08rem, 1.55vw, 1.3rem); }
.campaign-copy .campaign-credit { margin-top: 22px; color: var(--plum); font-size: .72rem; font-weight: 750; letter-spacing: .06em; line-height: 1.6; text-transform: uppercase; }
.campaign-trailer { width: min(100%, 650px); margin-top: 28px; aspect-ratio: 16 / 9; overflow: hidden; background: #1f1820; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(93,55,76,.12); }
.campaign-trailer iframe { display: block; width: 100%; height: 100%; border: 0; }
.primary-button, .download-button { min-height: 56px; border: 0; background: var(--plum); color: white; font-weight: 750; cursor: pointer; transition: transform 180ms ease, background 180ms ease, color 180ms ease; }
.participation-options { margin-top: 30px; }
.participation-label { margin: 0 0 10px; color: var(--plum); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.option-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 650px; }
.primary-button { margin: 0; padding: 16px 19px; display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; text-align: left; }
.button-copy { display: grid; gap: 4px; }
.button-copy strong { font: inherit; }
.button-copy small { font-size: .72rem; font-weight: 600; line-height: 1.35; opacity: .72; }
.primary-button--outline { border: 1px solid var(--plum); color: var(--plum); background: transparent; }
.primary-button--submission { grid-column: 1 / -1; border: 1px solid var(--plum); color: var(--plum); background: rgba(158,123,126,.1); text-decoration: none; }
.submission-note { grid-column: 1 / -1; margin: -2px 0 0; color: rgba(58,62,65,.58); font-size: .68rem; text-align: center; }
.primary-button--outline:hover { color: white; }
.primary-button:hover, .download-button:hover { color: white; background: var(--plum-deep); transform: translateY(-2px); }
.privacy-line { margin: 10px 0 0; color: rgba(58,62,65,.6); font-size: .72rem; }
.memorial-callout { max-width: 650px; margin-top: 24px; padding: 20px 22px; border: 1px solid var(--line); border-left: 4px solid var(--plum); background: rgba(251,248,244,.62); text-align: left; }
.memorial-callout h2 { margin: 0 0 8px; color: var(--plum); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 400; line-height: 1.15; }
.memorial-callout p { margin: 0; color: rgba(58,62,65,.78); font-size: .82rem; line-height: 1.65; }
.memorial-callout a { color: var(--plum); font-weight: 750; text-underline-offset: 3px; overflow-wrap: anywhere; }
.intro-socials { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.intro-socials > span { color: var(--rose); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.intro-socials div { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 15px; }
.intro-socials a, .sharing-note a { color: var(--plum); font-size: .74rem; font-weight: 750; text-underline-offset: 3px; overflow-wrap: anywhere; }
@keyframes partnerIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes campaignIn { to { opacity: 1; transform: none; } }

.tool-view { min-height: 100vh; background: var(--cream-light); }
.story-view { min-height: 100vh; background: var(--cream-light); }
.tool-header { min-height: 90px; padding: 18px clamp(20px, 5vw, 70px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); background: var(--cream); }
.tool-header img { width: 230px; max-height: 58px; object-fit: contain; }
.back-button { justify-self: start; padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--plum); cursor: pointer; font-size: .78rem; font-weight: 750; }
.header-meta { justify-self: end; color: var(--rose); font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.tool-intro { max-width: 1120px; margin: 0 auto; padding: clamp(60px, 8vw, 110px) clamp(20px, 5vw, 64px) 50px; }
.eyebrow { margin: 0 0 16px; color: var(--rose); font-size: .7rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.tool-intro h2 { font-size: clamp(3rem, 6vw, 5.8rem); }
.tool-intro > p:not(.eyebrow) { max-width: 600px; color: rgba(58,62,65,.7); }
.editor-steps { max-width: 680px; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; border: 1px solid var(--line); }
.editor-steps li { min-height: 56px; padding: 12px 14px; display: flex; align-items: center; gap: 9px; color: rgba(58,62,65,.7); font-size: .72rem; font-weight: 750; border-right: 1px solid var(--line); }
.editor-steps li:last-child { border-right: 0; }
.editor-steps span, .preview-heading h3 span, .save-panel h3 span { width: 24px; height: 24px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--plum); font-family: Inter, sans-serif; font-size: .64rem; font-weight: 800; }
.creator-grid { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px) clamp(80px, 10vw, 140px); display: grid; grid-template-columns: minmax(330px, .86fr) minmax(0, 1.14fr); gap: clamp(38px, 6vw, 76px); align-items: start; }
.canvas-column { position: relative; min-width: 0; }
.preview-heading { margin-bottom: 18px; }
.preview-heading h3, .save-panel h3 { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--plum); font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 400; }
.preview-heading p { margin: 8px 0 0; color: rgba(58,62,65,.68); font-size: .8rem; }
.canvas-wrap { position: relative; width: 100%; aspect-ratio: 1; background-color: #fff; background-image: linear-gradient(45deg, #e8e4df 25%, transparent 25%), linear-gradient(-45deg, #e8e4df 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e8e4df 75%), linear-gradient(-45deg, transparent 75%, #e8e4df 75%); background-size: 40px 40px; background-position: 0 0, 0 20px, 20px -20px, -20px 0; box-shadow: var(--shadow); touch-action: none; cursor: grab; overflow: hidden; }
.canvas-wrap.dragging { cursor: grabbing; }
canvas { display: block; width: 100%; max-width: 100%; height: 100%; }
.canvas-empty-state { position: absolute; z-index: 1; inset: 40% 20% auto; display: grid; gap: 5px; padding: 16px 18px; color: var(--plum); background: rgba(251,248,244,.9); border: 1px solid var(--line); text-align: center; pointer-events: none; backdrop-filter: blur(7px); }
.canvas-empty-state strong { font-family: Georgia, serif; font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 400; }
.canvas-empty-state span { color: rgba(58,62,65,.7); font-size: .72rem; }
.canvas-wrap.has-photo { background: var(--rose-soft); }
.canvas-wrap.has-photo .canvas-empty-state { display: none; }
.drag-hint { margin: 14px 0 0; text-align: center; color: rgba(58,62,65,.58); font-size: .78rem; }
.controls { display: grid; border-top: 1px solid var(--line); }
fieldset { margin: 0; padding: 24px 0; border: 0; border-bottom: 1px solid var(--line); }
legend { width: 100%; padding: 0; margin: 0 0 18px; color: var(--plum); font-family: Georgia, serif; font-size: 1.45rem; }
legend span { margin-right: 10px; color: var(--rose); font-family: Inter, sans-serif; font-size: .62rem; font-weight: 800; letter-spacing: .12em; vertical-align: middle; }
.frame-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.frame-option { position: relative; min-width: 0; min-height: 132px; display: grid; grid-template-rows: auto 1fr; justify-items: center; align-content: start; gap: 8px; padding: 10px 6px 9px; background: rgba(255,255,255,.48); border: 1px solid var(--line); cursor: pointer; text-align: center; transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.frame-option.selected { background: white; border: 2px solid var(--plum); box-shadow: 0 0 0 2px rgba(130,68,95,.1); }
.frame-option.selected::after { content: "✓"; position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--plum); font-size: .66rem; font-weight: 900; }
.frame-option:focus-within { outline: 3px solid var(--rose); outline-offset: 2px; }
.frame-option input { position: absolute; opacity: 0; pointer-events: none; }
.frame-swatch { width: min(78px, 100%); height: auto; aspect-ratio: 1; background: linear-gradient(135deg, var(--cream) 0 42%, var(--rose) 42% 58%, var(--plum) 58%); border: 1px solid rgba(93,55,76,.12); border-radius: 50%; }
.frame-swatch--original { background: center / contain no-repeat url("assets/campaign/frames/more-than-a-diagnosis-original.png"), #eee9e4; }
.frame-swatch--inverse { background: center / contain no-repeat url("assets/campaign/frames/more-than-a-diagnosis-inverse.png"), #eee9e4; }
.frame-swatch--every-story { background: center / contain no-repeat url("assets/campaign/frames/every-story-deserves-to-be-heard.png"), #eee9e4; }
.frame-swatch--more-compassion { background: center / contain no-repeat url("assets/campaign/frames/less-judgment-more-compassion.png"), #eee9e4; }
.frame-option span:last-child { min-width: 0; display: grid; gap: 2px; }
.frame-option strong { font-size: .72rem; line-height: 1.15; overflow-wrap: anywhere; }
.frame-option small { color: rgba(58,62,65,.62); font-size: .62rem; line-height: 1.2; overflow-wrap: anywhere; }
#photoInput { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload-button, .download-button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; font-weight: 800; font-size: .86rem; }
.upload-button { color: var(--plum); background: transparent; border: 1px solid var(--plum); }
.upload-button:hover { background: rgba(158,123,126,.1); }
.privacy-note, .download-note { margin: 9px 0 0; color: rgba(58,62,65,.62); font-size: .7rem; text-align: center; }
.slider-row { margin-top: 24px; display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; font-size: .78rem; font-weight: 700; }
.mobile-zoom-row { display: none; }
input[type="range"] { width: 100%; accent-color: var(--plum); cursor: pointer; }
.text-button { margin-top: 12px; padding: 0; border: 0; border-bottom: 1px solid currentColor; color: rgba(58,62,65,.68); background: transparent; cursor: pointer; font-size: .72rem; }
.download-button { border: 1px solid var(--plum); }
.adjust-controls { margin-top: 16px; padding: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.58); }
.adjust-controls .slider-row { margin-top: 0; }
.save-panel { margin-top: 22px; padding: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.58); }
.save-panel .download-button { margin-top: 18px; }
.save-status { min-height: 1.4em; margin: 10px 0 0; color: var(--plum); font-size: .74rem; font-weight: 700; text-align: center; }
.save-result { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.save-result p { margin: 0 0 12px; color: rgba(58,62,65,.72); font-size: .76rem; }
.save-result a { min-height: 44px; padding: 10px 14px; display: flex; align-items: center; justify-content: center; color: var(--plum); border: 1px solid var(--plum); font-size: .78rem; font-weight: 800; text-decoration: none; }
.save-result img { width: 100%; margin-top: 14px; border: 1px solid var(--line); background: white; }
.tool-help { margin: 20px 0 0; color: rgba(58,62,65,.68); font-size: .76rem; text-align: center; }
.tool-help a { color: var(--plum); font-weight: 750; text-underline-offset: 3px; }
.story-content { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: clamp(64px, 9vw, 120px) 0 clamp(80px, 10vw, 130px); }
.story-content h2 { margin: 0; color: var(--plum); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 6vw, 5.3rem); font-weight: 400; letter-spacing: -.035em; line-height: 1.02; }
.story-lead { max-width: 610px; margin: 24px 0 0; color: rgba(58,62,65,.72); font-size: clamp(1rem, 1.5vw, 1.16rem); }
.story-steps { margin: 48px 0 34px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.story-steps li { display: grid; grid-template-columns: 46px 1fr; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.story-steps li > span { padding-top: 3px; color: var(--rose); font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.story-steps strong { color: var(--plum); font-family: Georgia, serif; font-size: 1.28rem; font-weight: 400; }
.story-steps p { margin: 5px 0 0; color: rgba(58,62,65,.68); font-size: .88rem; }
.canva-button { width: 100%; min-height: 58px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--plum); color: white; background: var(--plum); font-weight: 800; text-decoration: none; transition: transform 180ms ease, background 180ms ease; }
.canva-button:hover { background: var(--plum-deep); transform: translateY(-2px); }
.sharing-note { margin-top: 28px; padding: 20px; border-left: 3px solid var(--rose); background: rgba(158,123,126,.08); }
.sharing-note strong { color: var(--plum); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.sharing-note p { margin: 6px 0 0; color: rgba(58,62,65,.72); font-size: .84rem; overflow-wrap: anywhere; }
.sharing-note a { font-size: inherit; }
.tool-footer { padding: clamp(52px, 7vw, 90px) clamp(20px, 5vw, 70px); text-align: center; color: white; background: var(--plum); }
.tool-footer > p { margin: 0 0 24px; color: var(--rose-soft); font-size: .7rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.tool-footer > div { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1000px; margin: 0 auto; }
.partner-footer-item { padding: 10px 24px; display: grid; place-items: center; gap: 8px; border-right: 1px solid rgba(255,255,255,.25); }
.partner-footer-item:last-child { border-right: 0; }
.partner-site { color: white; font-family: Georgia, serif; font-size: clamp(1rem, 2vw, 1.45rem); text-decoration-thickness: 1px; text-underline-offset: 5px; }
.partner-instagram { color: var(--rose-soft); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; text-underline-offset: 4px; }

@media (max-width: 880px) {
  .intro-view { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; }
  .intro-kicker { margin-bottom: 28px; }
  .partner-reveal { width: min(82vw, 480px); margin-bottom: 42px; }
  .collaboration-intro { margin-bottom: 62px; text-align: center; }
  .collaboration-intro h1 { max-width: 680px; }
  .campaign-reveal { max-width: 680px; margin: 0 auto; text-align: center; }
  .campaign-logo { margin-left: auto; margin-right: auto; object-position: center; }
  .campaign-copy { text-align: left; }
  .creator-grid { grid-template-columns: minmax(0, 1fr); }
  .creator-grid > * { min-width: 0; }
  .controls { max-width: 620px; width: 100%; margin: 0 auto; }
  .canvas-column { max-width: 620px; width: 100%; margin: 0 auto; }
}
@media (max-width: 600px) {
  .intro-view { padding-top: 24px; }
  .intro-kicker { text-align: left; padding-left: 20px; }
  .partner-reveal { width: min(82vw, 330px); grid-template-columns: 1fr; gap: 18px; }
  .partner-logo { min-height: 92px; }
  .partner-logo img { max-height: 112px; }
  .partner-logo--egfr img { max-width: 170px; }
  .partner-logo--oncogene a { width: min(260px, 100%); }
  .partner-logo--oncogene img { width: 100%; max-width: 260px; max-height: none; }
  .partner-logo--ylci { grid-column: auto; }
  .partner-logo--ylci a { width: 400px; height: 400px; margin: -125px; }
  .partner-logo--ylci img { max-height: none; }
  .campaign-logo { width: 96%; margin-bottom: 28px; }
  .collaboration-intro h1 { font-size: clamp(2.15rem, 10vw, 3.15rem); text-align: left; }
  .campaign-copy p { font-size: .95rem; }
  .option-buttons { grid-template-columns: 1fr; }
  .primary-button { width: 100%; }
  .memorial-callout { padding: 18px; }
  .tool-intro { padding-bottom: 36px; }
  .editor-steps { grid-template-columns: repeat(2, 1fr); }
  .editor-steps li:nth-child(2) { border-right: 0; }
  .editor-steps li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .drag-hint { margin-top: 10px; }
  .preview-heading h3, .save-panel h3 { font-size: 1.3rem; }
  .save-panel { padding: 18px; }
  .tool-header { grid-template-columns: 1fr auto; min-height: 76px; }
  .tool-header img { grid-column: 2; width: 145px; }
  .header-meta { display: none; }
  .tool-footer > div { grid-template-columns: 1fr; }
  .partner-footer-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.25); }
  .partner-footer-item:last-child { border-bottom: 0; }
}
@media (max-width: 360px) {
  .tool-header { gap: 10px; padding: 14px 18px; }
  .tool-header img { width: 130px; }
  .back-button { font-size: .68rem; white-space: nowrap; }
  .canvas-empty-state { inset: 30% 20% auto; padding: 10px 12px; }
  .canvas-empty-state strong { font-size: .95rem; }
  .frame-options { gap: 7px; }
  .frame-option { min-height: 118px; padding-left: 4px; padding-right: 4px; }
  .frame-swatch { width: min(66px, 100%); }
  .frame-option strong { font-size: .66rem; }
  .frame-option small { font-size: .57rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
