@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/cormorant.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/cormorant-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Handbook Song";
  src: url("assets/song.woff2?lang=zh-TW") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Handbook Sans TC";
  src: url("assets/body-tc.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --paper: #faf6ed;
  --paper-alt: #f1eade;
  --ink: #2f2524;
  --soft: #695c54;
  --line: #d9cdbb;
  --wine: #752b3a;
  --cover: #351b23;
  --rose: #f2b9ac;
  --serif: "Cormorant Garamond", "Handbook Song", "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  --body: "DM Sans", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Handbook Sans TC", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.8 var(--body); }
main { overflow: clip; }
html { scroll-padding-top: 80px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid #b25451; outline-offset: 4px; }
::selection { color: #fff8ee; background: #7a3945; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
.wrap { width: min(1192px, 89%); margin-inline: auto; }
.skip { position: fixed; z-index: 10; padding: 10px; background: white; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.mast { position: sticky; inset-block-start: 0; z-index: 5; background: #faf6ed; border-bottom: 1px solid #cdbdb1; }
.mast-inner, .main-nav, .brand, .cover-actions, .section-heading, .cover-facts, .footer { display: flex; align-items: center; }
.mast-inner { justify-content: space-between; min-height: 66px; gap: 24px; }
.brand { gap: 9px; flex: none; }
.brand-name { font: 700 35px/.95 var(--serif); letter-spacing: -.07em; padding-right: 4px; }
.brand-sub { margin-left: 4px; border-left: 1px solid #cdbeb3; padding: 1px 0 0 13px; font-size: 12px; letter-spacing: .1em; color: var(--soft); }
.mark { width: 18px; height: 21px; background: var(--wine); display: block; position: relative; border-radius: 7px 1px 6px 1px; transform: skew(-7deg); }
.mark::before, .mark::after { content: ""; position: absolute; width: 8px; height: 1.5px; background: var(--paper); left: 5px; top: 8px; transform: rotate(-20deg); }
.mark::after { top: 12px; }
.main-nav { gap: clamp(15px, 2.6vw, 37px); font-size: 13px; font-weight: 600; }
.main-nav a { white-space: nowrap; padding: 9px 0; }
.main-nav .nav-template { border: 1px solid #bdaba0; border-radius: 3px; padding: 5px 13px; }
.main-nav a:hover, .ink-link:hover { color: var(--wine); text-decoration: underline; text-underline-offset: 4px; }
.cover { background: radial-gradient(ellipse at 9% 118%, #6a3039 0%, #43222b 45%, #2d1921 94%); color: #fff4e4; }
.cover-grid { display: grid; grid-template-columns: .98fr 1.02fr; align-items: center; gap: clamp(24px, 5.5vw, 84px); padding-block: clamp(40px, 4.6vw, 70px); }
.cover-copy { min-width: 0; }
.overline { display: flex; align-items: center; gap: 11px; font: 600 13px/1.5 var(--body); color: var(--wine); letter-spacing: .09em; }
.overline i { display: inline-block; width: 27px; height: 1px; background: currentColor; }
.overline.light { color: #ebc2ae; }
.cover h1 { font: 500 clamp(69px, 8.55vw, 125px)/1.04 var(--serif); letter-spacing: -.068em; white-space: nowrap; margin: 12px 0 16px -4px; }
.cover h1 em { color: #f3c8b4; font-weight: 500; }
.cover-hook { font: 600 clamp(18px, 1.68vw, 25px)/1.72 var(--serif); }
.cover-note { font-size: 13px; color: #d9bcb1; letter-spacing: .04em; margin-top: 12px; }
.cover-actions { gap: 25px; margin-top: 30px; }
.btn { min-height: 43px; display: inline-flex; gap: 19px; align-items: center; justify-content: center; padding: 8px 18px; border-radius: 3px; font-size: 14px; font-weight: 650; }
.ivory { background: #faeedc; color: #48202a; }
.ivory:hover { background: white; }
.cover-link { font-size: 14px; font-weight: 600; border-bottom: 1px solid #95676b; }
.cover-link span { margin-left: 7px; }
.film { padding: 0 6px; background: #20151b; box-shadow: 4px 9px 30px #1a0c154d; transform: rotate(1deg); }
.perfs { height: 18px; position: relative; }
.perfs::before { content: ""; display: block; position: absolute; inset: 6px 2px; background: repeating-linear-gradient(90deg, #9b7270 0 10px, transparent 10px 24px); opacity: .65; }
.frames { display: grid; grid-template-columns: 1fr 1.45fr 1fr; gap: 4px; }
.frame { position: relative; overflow: hidden; height: clamp(252px, 24vw, 352px); background: #33292a; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame.grant img { object-position: 50% 28%; }
.frame.nora img { object-position: 50% 23%; }
.frame.sienna img { object-position: 53% 32%; }
.frame::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, #201219c4); }
.frame span { position: absolute; z-index: 1; bottom: 9px; left: 10px; color: #fff6e7; font: italic 500 clamp(15px, 1.6vw, 23px)/1 var(--serif); }
.cover-foot { border-top: 1px solid #ffffff24; }
.cover-facts { min-height: 48px; gap: clamp(18px, 5vw, 84px); }
.cover-facts span { font-size: 11px; color: #dfc1b7; letter-spacing: .05em; }
.cover-facts b { margin-left: 7px; font-size: 12px; color: #ffefdd; font-weight: 500; }
.paper-section, .cast-section, .template-section { padding-block: clamp(46px, 5.3vw, 80px); }
.section-heading { justify-content: space-between; gap: 15px; flex-wrap: wrap; margin-bottom: 25px; }
h2 { font: 600 clamp(29px, 3.4vw, 46px)/1.28 var(--serif); letter-spacing: -.04em; }
.section-heading h2::after { content: ""; display: block; width: 37px; height: 2px; margin-top: 13px; background: var(--wine); }
.ink-link { font-size: 13px; color: var(--wine); font-weight: 650; padding-block: 6px; }
.ink-link span { margin-left: 6px; }
.reading-grid { display: grid; grid-template-columns: minmax(195px,.65fr) minmax(0,1.85fr); gap: clamp(32px,5.3vw,77px); align-items: start; }
.side-note { padding: 5px 0; }
.side-note h3, .route-body h4 { color: var(--wine); font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.side-note p, .section-intro { color: var(--soft); font-size: 15px; }
.side-note p + h3 { margin-top: 20px; }
.side-note p { margin-top: 6px; }
.side-note .note-line { font-size: 13px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.scene, .ledger { border-top: 1px solid var(--line); }
.scene:last-of-type, .ledger { border-bottom: 1px solid var(--line); }
.scene summary { display: grid; grid-template-columns: 101px 1fr 24px; align-items: center; gap: 13px; padding-block: 20px; }
.scene summary:hover strong, .actor summary:hover strong, .ledger summary:hover { color: var(--wine); }
.scene-time { font: 650 12px/1.5 ui-monospace, monospace; font-variant-numeric: tabular-nums; color: var(--wine); letter-spacing: -.02em; }
.scene-key small, .actor small { display: block; color: var(--soft); font-size: 12px; line-height: 1.55; }
.scene-key strong { display: block; font: 600 clamp(18px, 1.55vw, 22px)/1.55 var(--serif); }
.toggle { display: inline-grid; width: 23px; height: 23px; place-items: center; position: relative; flex-shrink: 0; color: var(--wine); border-radius: 50%; border: 1px solid #cdb8ac; }
.toggle::before, .toggle::after { content: ""; width: 9px; height: 1px; position: absolute; background: currentColor; }
.toggle::after { transform: rotate(90deg); }
details[open] > summary .toggle::after { transform: none; }
.scene-body { padding: 0 0 26px 114px; font-size: 15px; }
.shot { color: var(--soft); }
.dialogue { margin: 16px 0; background: #f2ecdf; border-left: 2px solid #a66864; padding: 17px 20px; }
.line + .line { margin-top: 12px; }
.line small { display: block; color: var(--wine); font-size: 12px; font-weight: 650; }
.line p { margin-top: 2px; }
.scene-links { display: flex; flex-wrap: wrap; gap: 5px 18px; margin-top: 15px; }
.scene-links a { font-size: 13px; font-weight: 650; color: var(--wine); border-bottom: 1px solid #c8a499; }
.outcomes dt { font-size: 12px; color: var(--wine); font-weight: 700; margin: 12px 0 2px; }
.cast-section { border-block: 1px solid var(--line); background: var(--paper-alt); }
.section-intro { max-width: 67ch; margin: -4px 0 23px; }
.cast-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 12px; }
.actor { background: var(--paper); border: 1px solid var(--line); }
.actor summary { display: grid; grid-template-columns: 66px 1fr 22px; align-items: center; gap: 13px; padding: 9px 13px 9px 9px; min-height: 100px; }
.actor img { height: 81px; width: 66px; object-fit: cover; object-position: 50% 23%; }
.actor strong { display: block; margin-top: 4px; font: 650 clamp(19px, 1.75vw, 26px)/1 var(--serif); letter-spacing: -.025em; }
.actor .outcomes { padding: 0 16px 17px; font-size: 14px; }
.ledger { margin-top: 21px; }
.ledger summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; font-weight: 650; font-size: 15px; }
.ledger dl { display: grid; }
.ledger dl > div { display: grid; grid-template-columns: minmax(160px,.55fr) 2fr; padding: 10px 4px; border-top: 1px solid var(--line); gap: 22px; }
.ledger dt { color: var(--wine); font-weight: 600; font-size: 14px; }
.ledger dd, .rule-copy { font-size: 14px; }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 16px; background: var(--paper-alt); border-left: 3px solid #a26862; padding: 12px 17px; font-size: 14px; }
.flow b { font-weight: 400; color: #826f61; }
.flow strong { color: var(--wine); }
.branch-grid { margin-top: 22px; display: grid; grid-template-columns: minmax(185px,.72fr) minmax(0,1.8fr); gap: clamp(20px,4vw,53px); align-items: start; }
.branch-map h3 { font-size: 13px; font-weight: 650; color: var(--soft); margin-bottom: 5px; }
.branch-group + .branch-group { margin-top: 15px; }
.branch-group > div { margin-left: 3px; border-left: 1px solid #ccb5a6; padding-left: 10px; }
.branch-group a { display: flex; align-items: center; gap: 10px; border-radius: 2px; padding: 8px; min-height: 38px; font-size: 14px; position: relative; }
.branch-group a::before { content: ""; position: absolute; top: 50%; left: -10px; width: 7px; border-top: 1px solid #ccb5a6; }
.code { font: 600 12px/1.5 ui-monospace,monospace; min-width: 29px; color: var(--wine); }
.branch-group a:hover { background: #f1e7d9; }
.branch-group a[aria-current="true"] { color: #fff4e6; background: var(--wine); }
.branch-group a[aria-current="true"] .code { color: #ffe3c9; }
.route-arrow { margin-left: auto; }
.route-card { border: 1px solid var(--line); background: #fffcf5; }
.route-card:focus { outline: none; }
.route-card + .route-card { margin-top: 20px; }
.route-card[hidden] { display: none; }
.route-reader.enhanced .route-card { margin-top: 0; }
.route-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px clamp(18px,2.5vw,36px); border-bottom: 1px solid var(--line); background: #f4ecdf; }
.route-head img { height: 102px; width: 76px; object-fit: cover; object-position: 50% 26%; }
.route-head h3 { font: 600 clamp(24px,2.7vw,37px)/1.45 var(--serif); margin-top: 7px; }
.original { color: var(--soft); font: 500 italic 21px/1.2 var(--serif); }
.route-body { padding: 21px clamp(17px,2.5vw,36px) 24px; font-size: 15px; }
.route-body h4 { font-size: 13px; margin-bottom: 4px; }
.route-body p + h4, .steps + h4 { margin-top: 17px; }
.steps { padding-left: 1.5em; margin: 4px 0; }
.steps li { padding-left: 3px; margin: 6px 0; }
.steps li::marker { color: var(--wine); font-weight: 600; }
.final-shot { padding-left: 14px; border-left: 2px solid #bd8680; }
.other-path { padding-top: 13px; margin-top: 17px; border-top: 1px solid var(--line); color: var(--soft); font-size: 14px; }
.rule-copy { padding: 0 4px 16px; }
.rule-copy p + p { margin-top: 9px; }
.priority { color: var(--wine); font-family: ui-monospace,monospace; }
.template-section { background: #3b2028; color: #fff2e1; }
.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px,7vw,110px); }
.kit-copy > p { margin-block: 15px 22px; max-width: 33em; color: #ead0c3; font-size: 15px; }
.kit-caption { color: #dfc1b2; display: block; font-size: 12px; margin-top: 10px; }
.kit-list a { display: flex; align-items: center; gap: 15px; justify-content: space-between; border-top: 1px solid #86656a; padding: 13px 1px; }
.kit-list a:last-child { border-bottom: 1px solid #86656a; }
.kit-list strong { display: block; font-weight: 600; font-size: 16px; }
.kit-list small { display: block; margin-top: 3px; color: #dfc6b8; font-size: 13px; }
.kit-list b { font-size: 20px; font-weight: 400; }
.kit-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.footer { padding-block: 20px; justify-content: space-between; gap: 20px; }
.footer p { color: var(--soft); font-size: 12px; }
.footer a { flex-shrink: 0; }
@media (max-width: 950px) {
  .cast-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .scene summary { grid-template-columns: 89px 1fr 24px; }
  .scene-body { padding-left: 0; }
}
@media (max-width: 730px) {
  html { scroll-padding-top: 101px; }
  .wrap { width: 90%; }
  .mast-inner { display: block; padding-top: 10px; }
  .brand { width: fit-content; }
  .brand-name { font-size: 28px; }
  .mark { height: 18px; width: 16px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 5px; padding: 5px 0; font-size: 12px; }
  .main-nav a { padding: 4px 0; }
  .main-nav .nav-template { padding: 1px 7px; }
  .cover-grid { grid-template-columns: 1fr; gap: 24px; padding-block: 30px 23px; }
  .cover h1 { font-size: clamp(62px,13vw,87px); margin: 6px 0 8px; }
  .cover-hook { line-height: 1.55; }
  .cover-note { margin-top: 6px; }
  .cover-actions { margin-top: 17px; }
  .film { transform: rotate(.65deg); }
  .frame { height: clamp(155px,44vw,250px); }
  .frame.grant img { object-position: 50% 32%; }
  .frame.nora img { object-position: 50% 13%; }
  .frame.sienna img { object-position: 50% 29%; }
  .frame span { font-size: 17px; }
  .perfs { height: 13px; }
  .perfs::before { inset-block: 4px; }
  .cover-facts { flex-wrap: wrap; column-gap: 20px; row-gap: 1px; padding-block: 9px; }
  .reading-grid, .template-grid { grid-template-columns: 1fr; gap: 19px; }
  .side-note { font-size: 14px; }
  .side-note p + h3 { margin-top: 11px; }
  .side-note .note-line { border-top: 0; margin-top: 10px; padding-top: 0; }
  .branch-grid { grid-template-columns: 1fr; gap: 17px; }
  .branch-group { display: grid; grid-template-columns: 6.6em 1fr; gap: 5px; align-items: start; }
  .branch-group + .branch-group { margin-top: 9px; }
  .branch-group h3 { margin-top: 8px; }
  .branch-group > div { display: flex; flex-wrap: wrap; gap: 5px; border-left: 1px solid var(--line); }
  .branch-group a { padding: 4px 9px; border: 1px solid var(--line); gap: 5px; min-height: 34px; font-size: 13px; }
  .branch-group a::before, .route-arrow { display: none; }
  .code { min-width: auto; font-size: 11px; }
  .flow { font-size: 12px; gap: 5px 9px; padding-inline: 10px; }
  .ledger dl > div { display: block; }
  .footer { flex-wrap: wrap; gap: 3px; }
}
@media (max-width: 500px) {
  .paper-section, .cast-section, .template-section { padding-block: 36px; }
  .section-heading { margin-bottom: 16px; }
  .cast-grid { grid-template-columns: 1fr; gap: 8px; }
  .actor summary { min-height: auto; grid-template-columns: 57px 1fr 22px; padding: 6px 13px 6px 6px; }
  .actor img { height: 65px; width: 55px; }
  .actor strong { font-size: 23px; }
  .scene summary { grid-template-columns: 1fr 24px; align-items: center; gap: 0 8px; padding-block: 13px; }
  .scene-time { grid-column: 1; grid-row: 1; }
  .scene-key { grid-column: 1; grid-row: 2; }
  .scene-key small { margin-top: 2px; }
  .scene summary .toggle { grid-column: 2; grid-row: 1 / span 2; }
  .scene-body { font-size: 15px; }
  .dialogue { padding: 13px 15px; }
  .branch-group { grid-template-columns: 1fr; }
  .branch-group > div { margin: 0; padding-left: 0; border-left: none; }
}
@media print {
  html { scroll-padding: 0; }
  .mast, .cover-actions, .film, .toggle, .ink-link, .branch-map, .template-section { display: none; }
  .wrap { width: 100%; }
  .paper-section, .cast-section { padding: 22px 0; }
  .cover, .cast-section { background: white; color: black; }
  .cover-copy *, .cover-facts *, .overline.light { color: black; }
  .cover-grid, .reading-grid, .branch-grid { display: block; }
  .cover-grid { padding: 15px 0; }
  .cover-facts { border-bottom: 1px solid gray; }
  .side-note, .flow { margin: 0 0 10px; }
  .cover h1 { font-size: 58px; }
  .route-card[hidden] { display: block; }
  .scene-body { padding-left: 0; }
}
