:root {
  --ink: #342d28;
  --muted: #887c73;
  --paper: #fffaf3;
  --cream: #fff1df;
  --green: #f47b20;
  --green-dark: #d95f0d;
  --peach: #ffad66;
  --line: rgba(74, 60, 51, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 20% 10%, #fff8ec, transparent 34%), #f2d3b4; }
button, textarea { font: inherit; }
button { cursor: pointer; }
.prototype-shell { min-height: 100vh; display: grid; grid-template-columns: 390px minmax(260px, 360px); gap: 56px; align-items: center; justify-content: center; padding: 42px; }
.phone { width: 390px; height: 844px; position: relative; overflow: hidden; border: 9px solid #332820; border-radius: 48px; background: linear-gradient(165deg, #fff5e8 0%, var(--cream) 58%, #ffe6ca 100%); box-shadow: 0 30px 80px rgba(124, 67, 25, .24); }
.status-bar { height: 31px; display: flex; align-items: center; justify-content: space-between; padding: 6px 22px 0; font-size: 12px; font-weight: 650; }
.status-icons { font-size: 9px; letter-spacing: 2px; }
.mini-header { height: 48px; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 14px; }
.mini-title { font-size: 15px; font-weight: 650; }
.icon-button, .more-button { position: absolute; border: 0; color: var(--ink); background: rgba(255,255,255,.62); }
.back-button { left: 14px; width: 32px; height: 32px; border-radius: 50%; font-size: 27px; line-height: 24px; opacity: 0; pointer-events: none; }
.more-button { right: 14px; height: 30px; border-radius: 17px; padding: 0 10px; font-size: 11px; letter-spacing: 1px; }
.screen { position: absolute; inset: 79px 0 0; display: none; flex-direction: column; }
.screen.active { display: flex; animation: fade-in .28s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } }
.content { flex: 1; padding: 33px 24px 10px; overflow-y: auto; }
.center-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 35px 90px; }
.brand-mark { width: 86px; height: 86px; display: grid; place-items: center; position: relative; border-radius: 30px 30px 42px 30px; background: linear-gradient(145deg, #ff922e, var(--green)); color: #fffaf2; transform: rotate(-3deg); box-shadow: 0 12px 24px rgba(244,123,32,.24); }
.brand-mark span { font: 700 37px/1 serif; }
.brand-mark i { position: absolute; right: -7px; bottom: 4px; color: #d94f2b; font-style: normal; font-size: 24px; transform: rotate(12deg); }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 13px; font-weight: 650; letter-spacing: .08em; }
h1 { margin: 17px 0 16px; font-family: "Songti SC", serif; font-size: 37px; line-height: 1.26; letter-spacing: .03em; }
h2 { margin: 0; font-family: "Songti SC", serif; font-size: 30px; line-height: 1.3; letter-spacing: .02em; }
.intro, .subhead { color: var(--muted); font-size: 14px; line-height: 1.8; }
.bottom-action { padding: 14px 24px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--cream) 22%); }
.primary-button, .secondary-button { width: 100%; min-height: 52px; border-radius: 16px; border: 0; font-weight: 650; }
.primary-button { background: linear-gradient(135deg, #ff8c2a, var(--green)); color: white; box-shadow: 0 8px 18px rgba(244,123,32,.25); }
.primary-button:active { background: var(--green-dark); transform: translateY(1px); }
.secondary-button { margin-top: 9px; background: transparent; border: 1px solid rgba(66,108,90,.35); color: var(--green); }
.text-button { display: block; margin: 10px auto 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.legal { margin: 11px 0 0; text-align: center; color: #aaa096; font-size: 11px; }
.role-content { padding-top: 32px; }
#result-summary { white-space: pre-line; }
.subhead { margin: 8px 0 18px; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role-card { min-height: 72px; padding: 10px 11px; display: grid; grid-template-columns: 37px 1fr; grid-template-rows: 1fr 1fr; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.68); color: var(--ink); }
.role-card.selected { border-color: var(--green); background: #fff1df; box-shadow: inset 0 0 0 1px var(--green); }
.role-emoji { grid-row: 1 / 3; font-size: 25px; }
.role-card strong { font-size: 16px; align-self: end; }
.role-card small { color: var(--muted); align-self: start; margin-top: 2px; }
.input-content { padding-top: 33px; }
.hello-row { display: flex; justify-content: space-between; align-items: flex-start; }
.sun-doodle { color: #d59b58; font-size: 34px; }
.input-card { display: block; position: relative; margin-top: 27px; padding: 17px 17px 10px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: 0 9px 28px rgba(66, 54, 45, .05); }
.input-card > span { display: block; margin-bottom: 5px; font-size: 12px; color: var(--green); font-weight: 650; }
textarea { width: 100%; min-height: 135px; padding: 8px 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.6; }
textarea::placeholder { color: #b2aaa2; }
.input-card > small { display: block; text-align: right; color: #aaa096; font-size: 11px; }
.example-block { margin-top: 22px; }
.example-block p { color: var(--muted); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button, .followup-options button { border: 1px solid var(--line); background: rgba(255,255,255,.7); color: #665c55; border-radius: 20px; padding: 9px 13px; font-size: 12px; }
.privacy-note { margin-top: 26px; color: #9a9087; font-size: 11px; line-height: 1.6; }
.privacy-note span { color: var(--peach); }
.conversation-content { padding-top: 50px; }
.assistant-bubble { margin-top: 28px; padding: 18px; border-radius: 5px 20px 20px 20px; background: white; line-height: 1.65; box-shadow: 0 8px 24px rgba(70,60,50,.06); }
.followup-options { display: grid; gap: 9px; margin-top: 17px; }
.followup-options button { text-align: left; border-radius: 14px; padding: 13px 15px; }
.followup-options button.selected { color: white; background: var(--green); }
.input-card.compact { margin-top: 15px; }
.input-card.compact textarea { min-height: 70px; }
.loading-stage { padding-bottom: 40px; }
.thinking-mark { display: flex; gap: 8px; margin-bottom: 28px; }
.thinking-mark span { width: 13px; height: 13px; border-radius: 50%; background: var(--green); animation: bounce 1s infinite ease-in-out; }
.thinking-mark span:nth-child(2) { animation-delay: .14s; background: var(--peach); }
.thinking-mark span:nth-child(3) { animation-delay: .28s; }
@keyframes bounce { 50% { transform: translateY(-10px); } }
.loading-stage p { color: var(--muted); }
.result-content { padding-top: 18px; }
.result-content h2 { font-size: 24px; }
.version-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; padding: 4px; border-radius: 16px; background: rgba(244,123,32,.11); }
.version-tabs button { padding: 8px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 650; }
.version-tabs button small { display: block; margin-top: 2px; font-size: 10px; font-weight: 400; }
.version-tabs button.active { background: #fffaf4; color: var(--green-dark); box-shadow: 0 4px 12px rgba(129, 72, 30, .10); }
.encouragement-card { position: relative; min-height: 265px; margin-top: 21px; padding: 47px 27px 22px; display: flex; flex-direction: column; background: #fffaf2; border: 1px solid rgba(190,105,40,.13); border-radius: 5px; box-shadow: 0 15px 30px rgba(136,75,31,.12); transform: rotate(-.5deg); }
.tape { position: absolute; top: -10px; left: 50%; width: 82px; height: 27px; transform: translateX(-50%) rotate(2deg); background: rgba(255,163,82,.32); }
.quote-mark { position: absolute; top: 21px; left: 25px; color: var(--peach); font: 38px/1 Georgia, serif; }
.encouragement-card p { margin: 13px 0 20px; white-space: pre-line; font-family: "Kaiti SC", "Songti SC", serif; font-size: 19px; line-height: 1.85; }
.encouragement-card footer { margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; color: var(--muted); font: 13px "Kaiti SC", serif; }
.encouragement-card footer i { color: #d98570; font-style: normal; }
.generation-note { margin: 16px 0 0; color: #a49a91; text-align: center; font-size: 10px; }
.result-actions { padding-top: 7px; }
.result-actions .primary-button { min-height: 48px; }
.result-actions .secondary-button { min-height: 43px; }
.toast { position: absolute; z-index: 20; left: 50%; top: 88px; transform: translate(-50%, -10px); padding: 9px 14px; border-radius: 20px; background: rgba(47,43,39,.9); color: white; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.prototype-notes { color: #5f574f; }
.note-kicker { color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.prototype-notes h2 { color: var(--ink); font-size: 29px; }
.prototype-notes ol { padding-left: 20px; line-height: 1.8; font-size: 14px; }
.prototype-notes li { padding-left: 5px; margin-bottom: 8px; }
.reset-demo { margin-top: 14px; padding: 11px 16px; border: 1px solid rgba(66,108,90,.35); border-radius: 12px; background: transparent; color: var(--green); }
@media (max-width: 820px) {
  .prototype-shell { display: block; min-height: 100vh; padding: 0; background: var(--cream); }
  .phone { width: 100%; max-width: 430px; height: 100vh; min-height: 700px; margin: auto; border: 0; border-radius: 0; box-shadow: none; }
  .prototype-notes { display: none; }
}
