:root {
  color-scheme: light;
  --ink: #173e43;
  --muted: #627375;
  --paper: #f6f2ea;
  --card: #fffcf5;
  --teal: #153e43;
  --red: #a34d38;
  --line: #ddd4c4;
  --gold: #b59051;
  --reading-size: 22px;
  --option-size: 16px;
  --shadow: 0 16px 48px #173e4310;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang HK", "PingFang TC", "Microsoft JhengHei", sans-serif; line-height: 1.65; -webkit-text-size-adjust: 100%; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 0 10%, #deccb632, transparent 50%), radial-gradient(ellipse at 100% 80%, #bacdc422, transparent 50%); z-index: -1; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, summary, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: var(--teal); text-underline-offset: 4px; }
button, input, textarea, select { border-radius: 12px; }
button { min-height: 48px; }
:focus-visible { outline: 3px solid #b58236; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, .line-text, blockquote { font-family: "Songti TC", "Noto Serif TC", "PMingLiU", serif; }
h1, h2 { font-weight: 700; line-height: 1.3; letter-spacing: -.025em; }
h2 { font-size: clamp(28px, 3vw, 37px); margin-bottom: 14px; }
h3 { font-size: 18px; line-height: 1.5; margin-bottom: 12px; }
p { margin-bottom: 16px; overflow-wrap: anywhere; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 100; padding: 10px 18px; background: var(--card); }
.skip-link:focus { top: 10px; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; align-items: center; gap: 28px; padding: max(10px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) 10px max(28px, env(safe-area-inset-left)); background: #153e43f7; color: #fffcf5; border-bottom: 1px solid #ffffff15; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0; border: 0; background: none; font-size: 17px; font-weight: 650; letter-spacing: .08em; white-space: nowrap; }
.seal, .small-seal { display: grid; place-items: center; font-family: "Songti TC", serif; flex-shrink: 0; }
.seal { width: 37px; height: 37px; border: 1px solid #d7bc7d; border-radius: 9px; color: #e7c993; font-size: 25px; }
.journey { display: flex; align-items: center; gap: 14px; flex: 1; max-width: 470px; margin: 0 auto; }
.progress { flex: 1; height: 4px; border-radius: 8px; background: #ffffff23; overflow: hidden; }
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: #e4c185; transition: width .4s ease; }
.progress-label { font-size: 12px; letter-spacing: .08em; white-space: nowrap; color: #e3dfd1; min-width: 48px; }
.top-actions { display: flex; gap: 8px; }
.topbtn { min-width: 66px; padding: 7px 13px; background: #ffffff08; border: 1px solid #ffffff26; border-radius: 12px; font-size: 14px; }
.count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 6px; border-radius: 50%; background: #ffffff12; font-size: 11px; }
main { max-width: 1220px; margin: auto; padding: 28px max(28px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left)); }
main:focus, h1:focus, h2:focus { outline: none; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--red); font-size: 12px; font-weight: 650; letter-spacing: .13em; line-height: 1.7; }
.mini-rule { width: 26px; height: 1px; background: var(--red); }
.eyebrow-divider { color: #b9ad99; margin: 0 3px; }
.muted, .fine { color: var(--muted); }
.fine { font-size: 12px; line-height: 1.7; }
.lead { color: var(--muted); font-size: 20px; line-height: 1.7; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 20px; min-height: 54px; padding: 12px 23px; font-size: 16px; font-weight: 600; line-height: 1.5; border: 1px solid transparent; transition: background .18s ease, transform .18s ease; }
.primary { background: var(--red); color: #fffaf3; box-shadow: 0 5px 16px #a34d3820; }
.secondary { background: #fffcf2; border-color: var(--line); }
.primary:active, .secondary:active { transform: scale(.98); }
.primary:disabled { opacity: .6; }
.text-button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; border: 0; background: transparent; padding: 8px 12px; font-size: 14px; color: var(--muted); }
.text-button:disabled { opacity: .3; }
.danger { color: var(--red); }
.btnrow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.cover { display: grid; grid-template-columns: .84fr 1.16fr; gap: clamp(30px, 5vw, 70px); align-items: center; min-height: min(640px, calc(100svh - 162px)); }
.cover-copy { padding: 10px 0 8px; }
.cover h1 { margin: 15px 0 0; font-size: clamp(60px, 6.2vw, 82px); line-height: 1.05; letter-spacing: .02em; }
.cover h1 span { color: var(--red); }
.subtitle { display: inline-block; margin: 12px 0 26px; padding-left: 3px; color: #8d7353; font-family: "Songti TC", serif; font-size: 22px; letter-spacing: .26em; }
.cover .lead { font-size: 26px; line-height: 1.5; color: var(--ink); margin-bottom: 14px; }
.cover-description { max-width: 385px; font-size: 15px; color: var(--muted); line-height: 1.85; }
.field { margin-top: 25px; }
.field label { display: flex; align-items: center; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.field label span { color: var(--muted); font-size: 11px; }
input[type="text"], input:not([type]), textarea, select { width: 100%; min-height: 52px; background: #fffdf8; border: 1px solid var(--line); padding: 12px 14px; color: var(--ink); font-size: 16px; }
input::placeholder, textarea::placeholder { color: #8d8e85; }
.cover-actions { display: flex; gap: 12px; margin-top: 14px; }
.cover-actions .primary { min-width: 178px; justify-content: space-between; }
.cover-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 22px; color: #807c6e; font-size: 11px; }
.cover-meta i { height: 3px; width: 3px; border-radius: 50%; background: #bdb09a; }
.cover-art { position: relative; height: 470px; overflow: hidden; border-radius: 24px 24px 72px 24px; background: #d8c6aa; box-shadow: 0 22px 60px #173e4320; }
.scene-image { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.cover-art .scene-image { object-position: 48% 50%; }
.cover-art::after, .ending-art::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, #122c32dd); pointer-events: none; }
.art-tag { position: absolute; top: 20px; left: 20px; padding: 6px 10px; border: 1px solid #fff5; border-radius: 8px; color: #fff9e9; background: #12353ac4; font-size: 11px; letter-spacing: .1em; }
.cover-quote { position: absolute; bottom: 28px; left: 30px; right: 24px; z-index: 1; color: #fffaeb; font-family: "Songti TC", serif; font-size: 27px; line-height: 1.65; letter-spacing: .03em; text-shadow: 0 2px 12px #0003; }
.cover-footnote { display: flex; gap: 14px; align-items: center; margin-top: 22px; padding-left: 8px; }
.small-seal { width: 36px; height: 39px; border: 1px solid #b08a64; color: #9b6648; border-radius: 5px; font-size: 23px; }
.cover-footnote p { margin: 0; font-size: 12px; line-height: 1.75; color: var(--muted); }
.cover-footnote b { font-weight: 500; color: var(--ink); }
.story-notice { display: flex; align-items: baseline; gap: 10px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 14px; color: var(--muted); }
.story-notice span { color: var(--gold); }
.story-notice p { margin: 0; font-size: 11px; }
.chapter-head { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 23px; }
.chapter-head h2 { margin: 5px 0 0; font-size: clamp(26px, 2.9vw, 34px); }
.chapter-trail { display: flex; gap: 18px; align-items: center; flex-shrink: 0; }
.trail-stop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #918c80; font-size: 10px; }
.trail-stop > i { position: relative; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: #d1c5b3; }
.trail-stop:not(:last-child)::after { content: ""; position: absolute; top: 4px; left: 50%; height: 1px; width: calc(100% + 18px); background: #d9cebc; }
.trail-stop.complete > i { background: var(--teal); }
.trail-stop.current > i { background: var(--red); outline: 4px solid #a34d3813; }
.trail-stop.current { color: var(--red); }
.story-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); overflow: clip; }
.scene-wrap { min-width: 0; display: flex; flex-direction: column; background: #ece6da; }
.scene-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #ddcebb; }
.scene-art::after { content: ""; position: absolute; inset: 65% 0 0; background: linear-gradient(transparent, #10343be3); pointer-events: none; }
.scene-caption { position: absolute; z-index: 1; left: 23px; right: 23px; bottom: 22px; color: #fdf7e7; }
.scene-caption > span { display: block; font-size: 12px; letter-spacing: .14em; opacity: .85; }
.scene-caption b { display: block; font-family: "Songti TC", serif; font-size: 24px; font-weight: 500; letter-spacing: .05em; }
.scene-note { padding: 24px 26px 14px; }
.scene-note .eyebrow { color: #8b6c4e; font-size: 11px; }
.scene-note p { margin: 10px 0 0; font-size: 16px; line-height: 1.8; }
.scene-disclaimer { margin: auto 26px 19px; color: #7d8177; font-size: 10px; }
.dialogue-shell { min-width: 0; display: flex; flex-direction: column; min-height: 490px; border-left: 1px solid var(--line); }
.dialogue-header { padding: 21px 28px; border-bottom: 1px solid #e7dfd055; }
.speaker { display: flex; align-items: center; gap: 10px; min-height: 30px; flex-wrap: wrap; }
.speaker-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--red); }
.speaker b { font-size: 16px; font-weight: 650; }
.speaker-context { color: #909083; font-size: 11px; margin-left: auto; }
.dialogue-content { padding: 27px 28px 20px; flex: 1; }
.line-progress { display: flex; gap: 6px; margin-bottom: 27px; }
.line-progress i { width: 17px; height: 3px; border-radius: 3px; background: #e1d8c8; }
.line-progress i.read { background: #aabcb5; }
.line-text { margin: 0; font-size: var(--reading-size); line-height: 1.9; letter-spacing: .025em; }
.dialogue-hint { margin: 34px 0 0; font-size: 11px; color: #93958a; }
.dialogue-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 18px 28px 24px; background: var(--card); border-top: 1px solid #e6dfd065; z-index: 2; }
.dialogue-actions .primary { min-width: 158px; }
.dialogue-actions .previous { margin-right: auto; padding-left: 0; }
.action-note { margin: 0; width: 100%; text-align: center; color: var(--muted); font-size: 11px; }
.choice-prompt { font-size: 21px; font-family: "Songti TC", serif; margin-bottom: 22px; }
.choices, .final-options { display: grid; gap: 11px; }
.choice { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 70px; padding: 16px; border: 1px solid #d9d0bf; border-radius: 14px; background: #fffdfa; text-align: left; font-size: var(--option-size); line-height: 1.65; transition: border-color .18s, background .18s, transform .18s; }
.choice:active { transform: scale(.987); background: #f2eadb; }
.choice-number { width: 27px; height: 30px; border: 1px solid #daceb8; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; color: #8a775a; font-size: 12px; }
.choice-arrow { margin-left: auto; color: #aa9c85; font-size: 17px; }
.choice.selected { border-color: #71918b; background: #edf2eb; }
.choice:disabled:not(.selected) { opacity: .6; }
.choice small { display: block; margin-top: 5px; color: #57746e; font-size: 11px; }
.selected-response { border-left: 2px solid #bda17b; padding-left: 14px; margin-bottom: 24px; }
.selected-response > span { color: #977e5d; font-size: 11px; }
.selected-response p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.response-text { font-size: calc(var(--reading-size) - 1px); }
.fact-label { display: inline-flex; gap: 7px; color: #78816d; font-size: 11px; letter-spacing: .06em; margin-bottom: 10px; }
.history-text { font-size: 16px; line-height: 1.9; }
.history-insight { background: #eff1e9; border-radius: 12px; padding: 15px 17px; }
.history-insight b { color: #617965; font-size: 12px; font-weight: 600; }
.history-insight p { margin: 6px 0 0; font-size: 13px; line-height: 1.8; }
.journal-unlock { display: flex; gap: 12px; align-items: center; margin-top: 20px; }
.journal-unlock small { color: #a08a69; font-size: 10px; }
.journal-unlock p { margin: 3px 0 0; font-family: "Songti TC", serif; font-size: 14px; }
.ending-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; align-items: start; }
.ending-art { position: relative; height: 440px; overflow: hidden; border-radius: 22px; }
.ending-reflection { padding: 25px 20px; }
.ending-reflection p { margin: 12px 0 8px; font-family: "Songti TC", serif; font-size: 19px; line-height: 1.9; }
.ending-reflection > span { color: var(--muted); font-size: 12px; }
.ending-card { padding: 12px 0; }
.ending-card h2 { margin: 12px 0; }
.memory { margin: 20px 0 23px; display: grid; gap: 6px; }
.memory > div { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.memory > div > span { flex-shrink: 0; color: #b09468; font-family: "Songti TC", serif; }
.memory p { margin: 0; font-size: 13px; }
.value-steps { display: flex; align-items: center; gap: 16px; margin: 22px 0; }
.value-steps > span { display: block; color: var(--muted); font-size: 11px; }
.value-steps b { display: block; font-family: "Songti TC", serif; font-size: 20px; font-weight: 500; color: var(--ink); }
.value-steps i { font-style: normal; color: #b39973; }
.mission-stage, .mission-complete { max-width: 860px; margin: 6px auto; padding: 35px 40px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.mission-breadcrumb { display: flex; align-items: center; gap: 22px; padding: 18px 0 24px; }
.mission-breadcrumb > span { display: flex; gap: 7px; align-items: center; color: #a3a092; font-size: 13px; }
.mission-breadcrumb i { width: 23px; height: 23px; border: 1px solid #d9d2c3; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10px; }
.mission-breadcrumb .active { color: var(--ink); }
.mission-breadcrumb .active i { border-color: #78948b; background: #e7eee7; }
.scenario-grid, .commit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 25px 0; }
.scenario-card, .commit-card { min-width: 0; padding: 21px; text-align: left; border: 1px solid var(--line); background: #fffef9; border-radius: 16px; }
.scenario-icon { display: block; font-size: 29px; margin-bottom: 12px; }
.scenario-card b { display: block; font-size: 17px; }
.scenario-card p { font-size: 13px; line-height: 1.8; color: var(--muted); margin: 9px 0 14px; }
.scenario-cta { display: flex; justify-content: space-between; font-size: 11px; color: #a07f51; }
.principle { background: #f3eedf; border-left: 2px solid #b59763; border-radius: 0 10px 10px 0; padding: 13px 17px; font-size: 14px; line-height: 1.8; }
.scenario-focus { display: flex; gap: 16px; align-items: center; background: #f3eee3; padding: 17px 20px; border-radius: 15px; margin: 21px 0; }
.scenario-focus > span { font-size: 32px; flex-shrink: 0; }
.scenario-focus p { font-size: 14px; color: var(--muted); margin: 5px 0 0; }
.final-options { margin-top: 16px; }
.final-options .choice { min-height: 66px; }
.feedback-card { padding: 23px; background: #edf1e8; border-radius: 16px; margin-top: 22px; }
.feedback-card > b { font-size: 15px; line-height: 1.8; }
.student-reply { margin: 15px 0; font-family: "Songti TC", serif; font-size: 19px; }
.need-card { padding: 14px 17px; background: #fffdfa; border-radius: 10px; margin: 16px 0; }
.need-card > span { font-size: 11px; color: #71846e; }
.need-card p { margin: 5px 0 0; font-size: 14px; }
.feedback-card .primary { margin-top: 6px; }
.feedback-card .principle { margin-top: 16px; }
.value-timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 28px 0; }
.value-timeline > div { padding: 15px 10px; border-left: 1px solid var(--line); }
.value-timeline b { display: block; color: var(--red); font-size: 20px; }
.value-timeline span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.bridge-card { display: grid; grid-template-columns: 1fr auto 1fr; gap: 25px; align-items: center; padding: 26px; background: var(--teal); color: #fff7e5; border-radius: 17px; margin: 24px 0; }
.bridge-card strong { display: block; font-family: "Songti TC", serif; font-size: 34px; font-weight: 500; }
.bridge-card p { margin: 8px 0 0; font-size: 13px; color: #d7e0d5; }
.bridge-card > span { color: #d5b379; }
.commit-card { display: flex; gap: 16px; align-items: flex-start; min-height: 105px; font-size: 15px; }
.commit-card > span { font-size: 25px; }
.commit-card b { font-weight: 500; }
.custom-action { margin-top: 22px; display: grid; gap: 10px; }
.custom-action label { font-size: 13px; }
.custom-action .primary { justify-self: start; }
.mission-complete { text-align: center; max-width: 710px; padding: 42px; }
.mission-seal { width: 77px; height: 77px; margin: 0 auto 22px; border: 3px double var(--red); color: var(--red); display: grid; place-items: center; border-radius: 50%; font-family: "Songti TC", serif; font-size: 29px; transform: rotate(-5deg); }
.mission-complete .eyebrow { justify-content: center; }
.mission-complete h2 { margin: 16px 0 25px; overflow-wrap: anywhere; }
.mission-complete h2 > span { display: block; font-size: 24px; font-weight: 400; margin-top: 7px; }
.mission-card-lines { display: grid; gap: 10px; text-align: left; }
.mission-card-lines > div { padding: 17px 20px; background: #f2eee3; border-radius: 12px; }
.mission-card-lines b { color: #9b7650; font-size: 12px; letter-spacing: .1em; }
.mission-card-lines p { margin: 5px 0 0; font-size: 15px; }
.mission-card-lines .my-action { background: #e8eee4; }
.mission-card-lines .my-action b { color: #567665; }
blockquote { margin: 25px 0; font-size: 21px; line-height: 1.9; }
.final-message { color: var(--muted); font-size: 15px; }
.card-actions { justify-content: center; margin: 25px 0 16px; }
.dialog-open { overflow: hidden; }
.dialog { padding: 0; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: var(--card); width: min(690px, calc(100% - 36px)); max-height: calc(100svh - 60px); box-shadow: 0 24px 80px #102f3350; overscroll-behavior: contain; }
.dialog::backdrop { background: #102f3377; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 23px 28px 20px; position: sticky; top: 0; z-index: 2; background: var(--card); border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 29px; margin: 5px 0 0; }
.close-dialog { min-width: 62px; border: 1px solid var(--line); padding: 8px 13px; background: transparent; font-size: 13px; }
.dialog-body { padding: 8px 28px 27px; }
.settings-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.settings-section > h3 { margin-bottom: 10px; }
.settings-section .muted { font-size: 13px; margin-bottom: 16px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; cursor: pointer; padding: 14px 0; min-height: 65px; }
.setting-row b { display: block; font-size: 15px; font-weight: 500; }
.setting-row small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.setting-row input { appearance: none; -webkit-appearance: none; position: relative; width: 48px; height: 29px; flex-shrink: 0; border: 0; border-radius: 18px; background: #c3c4b8; cursor: pointer; transition: background .2s; }
.setting-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: white; box-shadow: 0 1px 4px #0002; transition: transform .2s; }
.setting-row input:checked { background: #3f796d; }
.setting-row input:checked::after { transform: translateX(19px); }
.share-layout { display: flex; align-items: center; gap: 25px; }
.qr-frame { background: #fff; border: 1px solid #e6e0d3; border-radius: 15px; overflow: hidden; flex-shrink: 0; }
#shareQR { display: block; width: 206px; height: 206px; image-rendering: pixelated; }
.share-info { min-width: 0; }
.share-info > b { font-size: 14px; }
.site-link { display: block; overflow-wrap: anywhere; font-size: 12px; margin: 10px 0 17px; }
.share-info .secondary { font-size: 13px; padding: 10px 15px; min-height: 48px; }
.share-info .fine { margin: 12px 0 0; }
.reset-confirm { margin-top: 18px; padding: 16px; background: #f6e9dd; border-radius: 14px; }
.reset-confirm p { font-size: 14px; }
.reset-confirm .primary, .reset-confirm .secondary { font-size: 13px; }
.teacher-notes { margin-top: 14px; }
summary { cursor: pointer; min-height: 48px; padding: 13px 0; font-size: 13px; touch-action: manipulation; }
.teacher-notes summary { color: #90846e; }
.teacher-content { font-size: 13px; color: var(--muted); line-height: 1.85; }
ul { padding-left: 20px; }
li + li { margin-top: 10px; }
.journal-empty { text-align: center; padding: 55px 20px; }
.journal-empty .small-seal { margin: 0 auto 20px; }
.journal-pages { display: grid; gap: 16px; margin-top: 18px; }
.journal-pages article { border: 1px solid var(--line); padding: 22px; border-radius: 16px; background: #fffdf8; }
.journal-pages h3 { margin: 10px 0 12px; }
.journal-pages p { font-size: 14px; }
.journal-pages details { border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 50; bottom: max(25px, env(safe-area-inset-bottom)); left: 50%; max-width: calc(100% - 40px); padding: 13px 21px; border-radius: 15px; background: var(--teal); color: var(--card); box-shadow: 0 7px 20px #102f3322; font-size: 14px; opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Reflection shares the dialogue rhythm without grading the learner. */
.reflection-title { font-family: "Songti TC", serif; font-size: 21px; line-height: 1.7; }
.value-pill { display: inline-block; padding: 5px 10px; border: 1px solid #b9c9b7; background: #eaf0e5; color: #55735f; border-radius: 8px; font-size: 11px; margin-bottom: 16px; }
.reflection-note { margin-top: 18px; padding: 15px 17px; border-left: 2px solid #b59867; border-radius: 0 10px 10px 0; background: #f2eddf; font-size: 14px; scroll-margin-bottom: 110px; scroll-margin-top: 100px; }
.reflection-note p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.reflection-actions { display: flex; width: 100%; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.value-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.value-tags > span { font-size: 12px; padding: 6px 10px; background: #e9eee2; border-radius: 8px; color: #5f755c; }
.journal-choice { padding: 12px 14px; background: #f2eddf; border-radius: 10px; font-size: 13px; margin: 12px 0; }
.journal-choice small { display: block; color: #9c805d; margin-bottom: 5px; }
.plan-form { display: grid; gap: 20px; margin-top: 24px; }
.plan-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.plan-form label small { font-weight: 400; color: var(--muted); font-size: 11px; margin-left: 9px; }
.plan-form textarea { min-height: 94px; resize: vertical; }
.plan-form .primary { justify-self: start; }
.large-text { --reading-size: 26px; --option-size: 19px; }
.large-text .history-text, .large-text .scene-note p, .large-text .mission-card-lines p { font-size: 19px; }
.large-text .history-insight p, .large-text .reflection-note { font-size: 16px; }
@media (hover: hover) and (pointer: fine) {
  .primary:hover { background: #8e402e; }
  .secondary:hover { background: #f0e8d9; }
  .choice:not(:disabled):hover, .scenario-card:hover, .commit-card:hover { border-color: #a38c63; background: #f9f4e9; }
  .topbtn:hover { background: #ffffff18; }
}
@media (max-width: 1050px) {
  .chapter-trail { gap: 12px; }
  .trail-stop > span { display: none; }
  .trail-stop:not(:last-child)::after { width: 20px; }
  .cover { gap: 32px; }
  .cover-art { height: 435px; }
  .cover h1 { font-size: 66px; }
  .dialogue-header { padding: 18px 23px; }
  .dialogue-content { padding: 23px; }
  .dialogue-actions { padding: 16px 23px 21px; }
}
@media (max-width: 900px) {
  main { padding: 26px 25px max(35px, env(safe-area-inset-bottom)); }
  .cover { grid-template-columns: 1fr 1.05fr; gap: 28px; min-height: auto; padding: 20px 0; }
  .cover h1 { font-size: 56px; }
  .cover-art { height: 480px; }
  .cover .lead { font-size: 23px; }
  .cover-description { font-size: 14px; }
  .cover-quote { left: 22px; font-size: 23px; }
  .cover-meta { gap: 8px; font-size: 10px; }
  .story-stage { grid-template-columns: 1fr; }
  .scene-wrap { position: relative; display: block; }
  .scene-art { aspect-ratio: auto; height: clamp(245px, 30svh, 370px); }
  .scene-art .scene-image { object-position: 50% 46%; }
  .scene-note { position: static; max-width: none; padding: 16px 26px 8px; background: transparent; }
  .scene-note .eyebrow { font-size: 10px; color: #8b6c4e; }
  .scene-note p { font-size: 15px; line-height: 1.75; margin-top: 5px; }
  .scene-disclaimer { position: static; margin: 0 26px 14px; color: #7d8177; font-size: 9px; }
  .dialogue-shell { border-left: 0; min-height: 350px; }
  .dialogue-content { padding: 22px 28px; }
  .dialogue-header { padding: 15px 28px; }
  .line-progress { margin-bottom: 19px; }
  .dialogue-hint { margin-top: 23px; }
  .dialogue-actions { padding: 17px 28px 23px; }
  .choices { grid-template-columns: 1fr; }
  .ending-grid { gap: 26px; }
  .ending-art { height: 365px; }
}
@media (max-width: 650px) {
  .topbar { min-height: 66px; gap: 13px; padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
  .brand { gap: 8px; font-size: 14px; letter-spacing: .03em; }
  .seal { width: 31px; height: 33px; font-size: 23px; }
  .journey { gap: 0; }
  .progress-label { display: none; }
  .top-actions { gap: 6px; }
  .topbtn { min-width: 49px; padding: 8px 10px; font-size: 12px; }
  .count { display: none; }
  main { padding: 21px 16px max(30px, env(safe-area-inset-bottom)); }
  .cover { grid-template-columns: 1fr; gap: 24px; padding: 0; }
  .cover-visual { grid-row: 1; }
  .cover-art { height: auto; aspect-ratio: 16 / 10; border-radius: 18px 18px 42px 18px; }
  .cover-art .scene-image { object-position: center; }
  .cover-quote { left: 21px; bottom: 19px; font-size: 20px; }
  .art-tag { top: 14px; left: 14px; font-size: 10px; }
  .cover-footnote { display: none; }
  .cover h1 { font-size: 62px; }
  .cover-copy { padding: 0 5px; }
  .subtitle { margin-bottom: 19px; }
  .cover .lead br { display: none; }
  .cover .lead { font-size: 22px; }
  .cover-description { max-width: none; }
  .cover-actions > button { flex: 1; }
  .cover-meta { font-size: 11px; margin-top: 20px; }
  .story-notice { margin-top: 22px; }
  .chapter-head { gap: 14px; margin-bottom: 18px; }
  .chapter-head h2 { font-size: 25px; }
  .chapter-head .eyebrow { font-size: 11px; }
  .chapter-trail { display: none; }
  .story-stage { border-radius: 18px; }
  .scene-art { height: 230px; }
  .scene-caption { left: 18px; bottom: 17px; }
  .scene-caption b { font-size: 21px; }
  .scene-note { padding: 14px 20px 8px; }
  .scene-note p { font-size: 14px; }
  .scene-disclaimer { margin: 0 20px 14px; }
  .scene-disclaimer { font-size: 8px; }
  .dialogue-shell { min-height: 345px; }
  .dialogue-header { padding: 16px 20px; }
  .dialogue-content { padding: 20px; }
  .dialogue-actions { padding: 15px 20px 21px; }
  .line-text { font-size: calc(var(--reading-size) - 2px); }
  .speaker-context { font-size: 10px; }
  .choice { padding: 14px 12px; gap: 10px; font-size: var(--option-size); }
  .choice-arrow { display: none; }
  .ending-grid { grid-template-columns: 1fr; }
  .ending-art { height: 330px; }
  .ending-reflection { padding: 20px 8px 0; }
  .ending-card { padding: 4px 8px; }
  .ending-card > .primary { width: 100%; }
  .mission-stage, .mission-complete { padding: 25px 21px; border-radius: 18px; margin: 0; }
  .mission-stage .lead { font-size: 16px; }
  .mission-breadcrumb { gap: 16px; }
  .scenario-grid, .commit-grid { grid-template-columns: 1fr; gap: 11px; }
  .scenario-card { padding: 18px; }
  .scenario-icon { float: left; margin-right: 13px; font-size: 24px; }
  .scenario-card p { margin-top: 8px; }
  .feedback-card { padding: 18px; }
  .scenario-focus { padding: 14px; gap: 12px; }
  .scenario-focus > span { font-size: 25px; }
  .value-timeline { grid-template-columns: 1fr 1fr; }
  .bridge-card { gap: 12px; padding: 22px 18px; }
  .bridge-card strong { font-size: 29px; }
  .bridge-card p { font-size: 12px; }
  .dialog { width: calc(100% - 22px); max-height: calc(100svh - 32px); border-radius: 19px; }
  .dialog-heading { padding: 20px; }
  .dialog-body { padding: 3px 20px 23px; }
  .share-layout { flex-direction: column; gap: 18px; align-items: flex-start; }
  .qr-frame { align-self: center; }
  #shareQR { width: 240px; height: 240px; }
  .share-info { text-align: center; width: 100%; }
  .toast { text-align: center; width: max-content; font-size: 13px; }
  .card-actions { flex-direction: column; align-items: stretch; }
  .reflection-actions > .primary { margin-left: auto; }
}
@media (max-width: 360px) {
  .brand > span:last-child { display: none; }
  .cover h1 { font-size: 55px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
