/* Card stories: teaser inside the lore modal + full-screen reading sheet above it. */
.st-teaser { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 10px; text-align: left; }
.st-lbl { font-size: 12px; letter-spacing: .08em; color: var(--lamp); }
.st-teaser q { font-family: 'Noto Serif SC', 'Songti SC', Georgia, serif; font-size: 16px; line-height: 1.6; quotes: '「' '」'; }
:lang(en) .st-teaser q { quotes: '“' '”'; }
.st-open { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 12px; padding: 12px; background: var(--lamp); color: #2a1300; font-family: var(--display); font-size: 18px; }
.st-open small { font-family: var(--body); font-size: 12px; opacity: .75; }
.st-more { justify-self: center; color: var(--lamp); text-decoration: underline; font-size: 14px; padding: 6px; }
.st-open svg { width: 20px; height: 20px; }
.st-dot { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--blood); }

.st-sheet { position: absolute; inset: 0; z-index: 55; background: var(--ink); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  transform: translateY(100%); transition: transform .38s cubic-bezier(.2,.8,.2,1); user-select: text; -webkit-user-select: text; }
.st-sheet.open { transform: none; }
.st-bar { position: sticky; top: 0; z-index: 3; height: 3px; }
.st-bar i { display: block; height: 100%; width: 0; background: var(--lamp); }
.st-x { position: absolute; z-index: 4; top: max(10px, env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(15,13,28,.7); font-size: 20px; line-height: 1; }
.st-head { position: relative; height: 230px; background: center 25% / cover; }
.st-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,13,28,.35) 0%, rgba(15,13,28,0) 35%, var(--ink) 100%); }
.st-body { position: relative; z-index: 1; margin-top: -40px; padding: 0 max(20px, env(safe-area-inset-right, 0px)) calc(48px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
.st-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--paper-dim); }
.st-chip { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--ink-2); }
.st-chip.t { color: var(--teal); }
.st-body h1 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 10px 0 2px; text-wrap: balance; }
.st-sub { color: var(--paper-dim); font-size: 13px; margin: 0 0 18px; }
.st-p { font-family: 'Noto Serif SC', 'Songti SC', Georgia, serif; font-size: 17px; line-height: 1.95; margin: 0 0 1em; }
.st-p.short { font-size: 19px; color: #fff; }
.st-body:lang(en) .st-p { line-height: 1.7; }
.st-body:lang(en) .st-sting { line-height: 1.6; }
.st-sting { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-family: 'Noto Serif SC', 'Songti SC', Georgia, serif; font-weight: 700; font-size: 18px; line-height: 1.85; color: var(--lamp); }
.st-src { margin-top: 30px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 13px; line-height: 1.7; color: var(--paper-dim); }
.st-src h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: .1em; color: var(--teal); }
.st-src ul { margin: 8px 0 0; padding-left: 1.2em; }
.st-nav { margin-top: 18px; display: flex; gap: 10px; }
.st-nav button { flex: 1; border-radius: 12px; padding: 12px 8px; font-size: 15px; }
.st-back { border: 1px solid var(--line); background: transparent; color: var(--paper-dim); }
.st-next { border: 0; background: var(--lamp); color: #2a1300; font-family: var(--display); }
@media (prefers-reduced-motion: reduce) { .st-sheet { transition: none; } }

/* Pixel skin: the story button is secondary to the card's 「▶ 使用示例」, so it's an outline, not a second gold slab. */
.modal .st-open { border: 3px solid var(--lamp); border-radius: 0; background: transparent; color: var(--lamp); font-family: var(--pixel); font-weight: 400; font-size: 16px; padding: 9px 12px; }
.modal .st-open small { font-family: var(--pixel); }
.modal .st-open:active { background: rgba(255,155,69,.12); }
.modal .st-dot { top: 4px; right: 4px; border-radius: 0; }

/* Readable long-form text under the pixel skin: the skin turns font smoothing off and the serif fallback
   (Songti on iPhone) has hairline strokes, so 一 and 「」 vanished. Use the phone's own sans for Chinese,
   normal smoothing, and pin the sheet to the screen width so nothing can pan sideways. */
.st-sheet { left: 0; right: 0; width: 100%; max-width: 100%; overflow-x: hidden; touch-action: pan-y; box-sizing: border-box;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-smooth: auto; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.st-sheet *, .st-teaser { letter-spacing: normal; white-space: normal; }
.st-body { width: 100%; max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.st-p, .st-sting, .st-teaser q, .st-src { font-family: 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Noto Sans CJK SC', 'Microsoft YaHei', system-ui, sans-serif; font-weight: 400; }
.st-sting { font-weight: 700; }
.st-p.short { font-weight: 600; }
.st-body:lang(en) .st-p, .st-body:lang(en) .st-sting, :lang(en) .st-teaser q { font-family: Georgia, 'Times New Roman', serif; }
.st-teaser { -webkit-font-smoothing: antialiased; }
.st-teaser q { font-size: 15px; }

/* v4 story forms: append to the end of stories.css (keeps the live font/width fixes above untouched). */
.st-sec { margin: 1.4em 0 .5em; font-size: 15px; font-weight: 700; letter-spacing: .06em; color: var(--lamp); }
.st-body > .st-sec:first-of-type { margin-top: .4em; }
/* letter / record: a document on paper */
.st-body.f-letter .st-p { background: rgba(239,228,200,.06); border-left: 2px solid rgba(239,228,200,.35); padding: 6px 12px; margin-bottom: .7em; }
.st-body.f-letter .st-sec { color: var(--paper-dim); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
/* list: big numbered headings */
.st-body.f-list .st-sec { font-size: 22px; letter-spacing: 0; margin: 1.1em 0 .3em; }
/* monologue: a voice, set off with a rule */
.st-body.f-monologue .st-p { border-left: 2px solid var(--lamp); padding-left: 14px; }
/* verse: short centered lines */
.st-body.f-verse .st-p { text-align: center; margin: 0 0 .35em; }
.st-body.f-verse .st-sec { text-align: center; }
/* dialogue: tighter lines */
.st-body.f-dialogue .st-p { margin-bottom: .55em; }
.st-body.f-verse .st-p.short { font-size: inherit; color: inherit; }
