:root {
  color: #263447;
  background: #f8f8ff;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.75;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, textarea { font: inherit; }
#experienceCard[hidden], #landingScreen[hidden], #questionScreen[hidden], #result[hidden] { display: none; }

.page-shell { width: min(100% - 32px, 720px); min-height: 100dvh; margin: 0 auto; padding: 28px 0 48px; }
.experience-card { position: relative; isolation: isolate; overflow: hidden; min-height: calc(100dvh - 76px); border: 1px solid #e7e1ef; border-radius: 24px; background: linear-gradient(145deg, #fff 0%, #fff 58%, #fbf6ff 100%); box-shadow: 0 14px 38px rgba(66, 44, 96, .12); }
.landing-screen { position: relative; display: grid; min-height: inherit; place-items: center; padding: clamp(34px, 7vw, 58px); text-align: center; }
.landing-screen > *:not(.landing-light) { position: relative; z-index: 1; }
.landing-light { position: absolute; z-index: 0; border-radius: 999px; filter: blur(2px); opacity: .58; }
.landing-light-one { width: 190px; height: 190px; top: -90px; right: -50px; background: #ead9ff; }
.landing-light-two { width: 132px; height: 132px; bottom: -70px; left: -44px; background: #ffe0e8; }
.landing-screen h1 { margin: 0 auto 18px; max-width: 570px; font-size: clamp(1.7rem, 6vw, 2.5rem); }
.landing-screen > p { max-width: 555px; margin: 0 auto; color: #4f5868; }
.landing-guidance { display: grid; gap: 4px; max-width: 530px; margin: 28px auto; padding: 18px 20px; border-radius: 14px; background: rgba(246, 239, 250, .76); color: #4e3c62; font-size: .96rem; font-weight: 700; }
.landing-guidance p { margin: 0; }
.start-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: min(100%, 260px); font-size: 1rem; }
.question-screen { padding: clamp(22px, 5vw, 36px); }
h1, h2 { color: #2d2440; line-height: 1.35; }
h1 { margin: 0 0 10px; font-size: clamp(2rem, 7vw, 2.9rem); }
h2 { margin: 0 0 14px; font-size: clamp(1.25rem, 5vw, 1.65rem); }
.guide { margin: 0 0 10px; }
.privacy-note { color: #5b6473; font-size: .9rem; }
.result { background: #fff; border: 1px solid #e7e1ef; border-radius: 18px; box-shadow: 0 10px 30px rgba(66, 44, 96, .08); padding: clamp(22px, 5vw, 36px); }
.progress-row { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-bottom: 28px; }
.progress-row p { margin: 0; color: #7959a5; font-size: .86rem; font-weight: 700; }
.progress-track { height: 7px; overflow: hidden; border-radius: 10px; background: #ece8f1; }
.progress-bar { height: 100%; width: 33.333%; border-radius: inherit; background: linear-gradient(90deg, #8f70b8, #d6849c); transition: width .2s ease; }
textarea { width: 100%; min-height: 8.2em; resize: vertical; border: 1px solid #cfc5dc; border-radius: 12px; padding: 13px; color: #263447; background: #fff; outline: none; }
textarea:focus { border-color: #84a2d4; box-shadow: 0 0 0 3px rgba(132, 162, 212, .2); }
.actions, .result-actions { display: flex; gap: 12px; margin-top: 24px; }
.actions { justify-content: flex-end; }
.button { min-height: 46px; border: 0; border-radius: 999px; padding: 10px 22px; color: #fff; background: #84a2d4; font-weight: 700; cursor: pointer; }
.button:hover { background: #6d89bd; }
.button-secondary { color: #5c77a6; background: #eaf0fb; }
.button-secondary:hover { background: #dde7f7; }
.text-button { border: 0; padding: 8px; color: #6b5680; background: transparent; text-decoration: underline; cursor: pointer; }
.result { margin-top: 0; }
.result h1 { margin-bottom: 14px; font-size: clamp(1.35rem, 5vw, 1.8rem); }
.result-lead { margin: 0 0 16px; color: #4f5868; }
#promptOutput { height: min(46vh, 26em); min-height: 0; margin-top: 0; background: #fbfaff; }
.copy-icon { width: 1.15em; height: 1.15em; margin-right: 7px; vertical-align: -.19em; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.copy-message { min-height: 1.75em; margin: 12px 0 0; color: #4f7c5d; font-size: .9rem; font-weight: 700; }
.community-panel { margin-top: 30px; padding-top: 24px; border-top: 1px solid #e7e1ef; color: #4f5868; font-size: .93rem; }
.community-panel h2 { margin: 0 0 8px; font-size: 1.22rem; }
.community-panel p { margin: 0; }
.community-panel a { color: #5479b8; font-weight: 700; }
.community-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px !important; }
.support-copy { margin-top: 20px !important; }
.support-link { display: inline-block; margin-top: 8px; }
.stories-preview { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 24px; padding: 15px 16px; border-radius: 12px; background: #f3f6fc; }
.stories-preview h3 { margin: 0; color: #2d2440; font-size: 1rem; }
.stories-preview p { font-size: .88rem; }
.coming-soon { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #e7edf8; color: #5479b8; font-size: .74rem; font-weight: 700; }
.stories-link { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; min-height: 38px; padding: 7px 13px; border-radius: 999px; background: #84a2d4; color: #fff !important; font-size: .82rem; font-weight: 700; text-decoration: none; }
.stories-link:hover { background: #6d89bd; }
.privacy-note { margin: 22px 4px 0; }

@media (max-width: 480px) {
  .page-shell { width: min(100% - 24px, 720px); padding-top: 22px; }
  .experience-card { min-height: calc(100dvh - 70px); border-radius: 18px; }
  .landing-screen { padding: 34px 22px; }
  .question-screen, .result { padding: 20px; }
  .result { border-radius: 15px; }
  .actions { justify-content: flex-end; }
  .actions .button { flex: 1; }
  .result-actions { align-items: flex-start; flex-direction: column; }
  .stories-link { margin-left: 0; }
}
