/* The journal: parchment for the story, ink for the sheet.
   Mechanical values and their rendering remain in the existing sheet and turn modules. */
:root {
  --header: 4.5rem;
  --ground: #17231f;
  --paper: #1c2b25;
  --raised: #26372f;
  --edge: #34463c;
  --edge-strong: #526457;
  --ink: #eee9db;
  --ink-dim: #c4c6b5;
  --dim: #a5b0a2;
  --ember: #dfba82;
  --ember-dim: #ad8958;
  --system: #c1d4c9;
  --system-dim: #a0bbac;
  --system-tint: #20352e;
  --system-rule: #536d5d;
  --name: #d3c69d;
  --name-dim: #a99569;
  --folio: #f1eddf;
  --folio-ink: #273d32;
  --folio-dim: #636957;
  --folio-edge: #d3cdb9;
  --panel: 23rem;
  --measure: 650px;
}
body { background: var(--ground); }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
header { padding: 0 2rem; gap: 1.5rem; }
header .mark { gap: .7rem; font-size: .9rem; letter-spacing: .18em; color: #eee9db; }
.brand-seal { color: var(--ember); flex-shrink: 0; }
header .where { font-family: var(--serif); font-size: 1.05rem; }
header .turnno { font-size: .7rem; color: var(--ember); border-left: 1px solid var(--edge-strong); padding-left: 1.3rem; }
header nav { gap: 1.5rem; }
header nav a, header nav button.link { min-height: 44px; display: inline-flex; align-items: center; font-size: .85rem; }
.eyebrow { font: 600 .68rem/1.5 var(--sans); text-transform: uppercase; letter-spacing: .19em; }

/* Landing layout and illustration. */
#start { background: var(--folio); color: var(--folio-ink); }
#start a:focus-visible, #start button:focus-visible,
#creation .card:has(input:focus-visible) { outline: 2px solid #49673d; outline-offset: 3px; }
#start > div { max-width: 1184px; padding: 0 3rem; }
.masthead { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2rem; padding: 3.6rem 0 2rem; }
.masthead .thesis { color: var(--folio-ink); font: 400 clamp(3rem, 4.6vw, 4.5rem)/1.03 var(--serif); letter-spacing: -.045em; max-width: none; text-wrap: balance; }
.masthead .pitch { display: block; font: 1.08rem/1.7 var(--sans); color: #58624f; max-width: 25rem; margin: 1.5rem 0 1.9rem; }
.explore { display: inline-flex; align-items: center; justify-content: space-between; gap: 2.5rem; min-height: 52px; padding: .85rem 1.3rem; background: #294b3a; color: #fff5df; font: 600 .85rem/1.4 var(--sans); text-decoration: none; border: 1px solid #294b3a; border-radius: 3px; }
.explore:hover { background: #385d48; }
.explore span { font-size: 1.35rem; font-weight: 400; }
.frontispiece { margin: 0; align-self: center; }
.frontispiece img { width: 100%; height: auto; display: block; }
#start h2 { color: #666c59; font-size: .7rem; letter-spacing: .16em; margin-bottom: 1rem; }
#start .group { margin-top: 2.8rem; }
#start #continue { margin-top: 1.25rem; }
.resume { background: #e6e2d3; border: 1px solid #c9c7b2; border-left: 3px solid #a1814e; padding: 1.25rem 1.5rem; border-radius: 3px; gap: 1.2rem; }
.resume:hover { background: #e2decc; border-color: #978b6c; }
.resume .title { color: var(--folio-ink); font-size: 1.5rem; }
.resume .hero, .resume .when { color: var(--folio-dim); }
.resume .standing { color: #4c654f; font-size: .72rem; }
.resume .said { color: #785c36; font-size: .85rem; padding: 0; margin-bottom: 0; border: 0; background: transparent; }
.resume .said::before { content: none; }
.resume .cframe { border-radius: 2px; border-color: #b6b39d; background: #d1d1be; flex-basis: 3.9rem; width: 3.9rem; }
.resume span.cface { color: #52614e; font: 2rem/1 var(--serif); }
.resume .go { border-color: #89957d; color: #314e38; border-radius: 2px; padding: .9rem 1.2rem; }
#catalogue { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.5rem; scroll-margin-top: 1.5rem; }
#catalogue .card { position: relative; border: 1px solid #c8c9b5; border-top: 3px solid #73816a; border-radius: 3px; padding: 1.8rem; background: #ebe8da; gap: 1rem; min-height: 218px; align-content: start; }
#catalogue .card::after { content: '↗'; position: absolute; top: 1.55rem; right: 1.5rem; color: #697859; font: 1.35rem var(--sans); }
#catalogue .card:hover { background: #e2e2cf; border-color: #819274; }
#catalogue .card .title { color: var(--folio-ink); font-size: 1.7rem; letter-spacing: -.025em; padding-right: 1.5rem; }
#catalogue .card .under { color: #5d6654; font: .93rem/1.7 var(--sans); }
#catalogue .card .tags { margin-top: .4rem; gap: .65rem; }
#catalogue .card .tag { color: #6d7058; font: .6rem/1 var(--sans); border: none; padding: 0; }
#catalogue .card .tag + .tag::before { content: '·'; margin-right: .65rem; }
.runlist a { border-color: var(--folio-edge); padding: 1rem 0; }
.runlist a:hover { background: #e9e5d6; }
.runlist .title { color: #304735; font-size: 1.1rem; }
.runlist .hero, .runlist .when, .runlist .unplayed .title { color: #60694f; }
.runlist .at { color: #456348; }
.runlist .at.unplayed { color: #67694f; border-color: #babca6; }
.landing-foot { margin: 3rem 0 0; padding: 1.8rem 0; border-top: 1px solid var(--folio-edge); display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: #6b705b; font: .7rem/1.6 var(--sans); }
.landing-foot > span:first-child { font-weight: 700; letter-spacing: .2em; }

/* The chronicle reads as a book. The present turn has its own quiet marker. */
#column { background: var(--folio); color: var(--folio-ink); min-height: calc(100dvh - var(--header)); }
.chapter-head { max-width: calc(var(--measure) + 3rem); padding: 2.9rem 1.5rem 1.7rem; margin: 0 auto; border-bottom: 1px solid var(--folio-edge); }
.chapter-head .eyebrow { color: #7e704e; }
.chapter-head h1 { font: 400 clamp(2rem, 3vw, 2.9rem)/1.16 var(--serif); letter-spacing: -.035em; margin: .8rem 0 .55rem; }
.chapter-head p { font: italic 1rem/1.5 var(--serif); color: #70765e; margin: 0; }
#story { padding-top: 2rem; }
.turn { margin-bottom: 2.8rem; }
.turn-heading { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--folio-edge); padding-top: 1.15rem; margin-bottom: 1.3rem; color: #6e725d; font: 600 .62rem/1.3 var(--sans); letter-spacing: .17em; text-transform: uppercase; }
.turn:first-child .turn-heading { border-top: 0; padding-top: 0; }
.current-turn { display: none; color: #55694b; }
.turn:last-child .current-turn { display: inline; }
.current-turn::before { content: '•'; color: #9b7844; margin-right: .7rem; }
.prose { font-size: 1.12rem; line-height: 1.85; }
.prose p { margin-bottom: 1.1em; }
.prose a { color: #4d674c; text-decoration-color: #b2b79d; }
.prose a:hover { color: #263e29; background: #e1e1cb; }
.prose:hover { background: transparent; }
.said:not(.carried):hover { background: #dfd8c4; }
.prose a[data-ent] { color: #486341; border-bottom-color: #a9b297; }
.prose a[data-ent]:hover, .prose a[data-ent]:focus-visible { color: #273f29; border-color: #6a8256; }
.said { color: #74542f; font-style: normal; font-size: .92rem; line-height: 1.65; padding: .85rem 1rem; border-left: 2px solid #b59361; background: #e7e2d2; margin-bottom: 1.6rem; }
.said::before { content: none; }
.said.carried { color: #6c715c; }
.sys { border-radius: 2px; padding: 1rem 1.2rem; background: #e1e7d9; border-color: #8a9f7d; color: #29432e; }
.sys .sys-head, .sys .sys-head .stat, .sys .why, .sys .declined, .sys .op, .sys .d .k { color: #4e6447; }
.sys .d .n { background: #f1f2e6; color: #29432e; border-color: #829a74; }
.sys .pass { color: #355e3c; }
.sys .fail { color: #963e34; }
.sys .tag, .sys-head .need, .sys .d label { color: #526947; }
.sys-head .need b, .sys .d.mod .n { color: #29432e; }
.sys.ok .verdict { color: #355e3c; background: #cfdcc5; }
.sys.miss .verdict { color: #963e34; background: #ead8c7; }
.sys.crit .verdict { color: #765116; background: #e6d6ac; }
.sys .d.die.nat20 .n { color: #765116; border-color: #a58141; }
.sys .d.die.nat1 .n { color: #963e34; border-color: #b97364; }
.speaker .sname { color: #606d51; }
.speaker .sface { border-color: #aeb599; background: #d9ddc7; }
#composer { background: var(--ground); border-top: 1px solid #5d6a52; }
#composer > .in { max-width: calc(var(--measure) + 3rem); padding: 1.15rem 1.5rem .5rem; }
#action { background: #21342b; border: 1px solid #63755f; border-radius: 3px; color: var(--ink); min-height: 52px; padding: .85rem 1rem; }
#action::placeholder { color: #b3bdac; }
#action:focus { outline: 2px solid #b5a173; outline-offset: 2px; }
#go { background: #d8bd87; color: #21392b; border: 1px solid #d8bd87; border-radius: 3px; min-height: 52px; min-width: 80px; font-size: .8rem; }
#go:hover:not(:disabled) { background: #ecd3a1; }
.verbs { gap: .35rem; }
.verbs button { min-height: 44px; padding: .65rem .55rem; font-size: .78rem; color: #bac4b4; }
.verbs button:disabled { color: #849180; }

/* The sheet stays in ink: a permanent companion beside the page. */
#panel { background: var(--ground); border-left: 1px solid #465442; }
#panelhead { padding: 1.6rem 1.5rem 1.3rem; }
#identity { gap: 1.1rem; }
#identity .face { width: 86px; flex-basis: 86px; border-radius: 2px; border-color: #7d805e; }
#noface { display: grid; place-items: center; color: #c5b280; font: 3rem/1 var(--serif); background: #273c2e; }
#thumbnone { display: grid; place-items: center; font: 1.4rem/1 var(--serif); color: #cfb989; }
#who { font-size: 1.45rem; line-height: 1.15; letter-spacing: -.025em; }
#level { font-size: .7rem; color: var(--ember); margin: .45rem 0 .8rem; }
.meter .label { font-size: .75rem; }
.rail { height: 4px; border-radius: 0; background: #3a4a3b; }
.rail > span { background: #a4b28a; border-radius: 0; }
.rail.xp > span { background: #c1a36c; }
.tabs { padding: 0 1.1rem; gap: .9rem; }
.tabs button { font-size: .7rem; min-height: 48px; letter-spacing: .12em; }
#panes { padding: 1.35rem 1.5rem 2rem; }
aside h2 { font-size: .66rem; letter-spacing: .16em; color: #b7bea8; margin-top: 1.8rem; }
aside h2:first-child { margin-top: 0; }
aside dl { font-size: .85rem; line-height: 1.8; }
#stats dt { font-family: var(--sans); text-transform: capitalize; }
#stats dd { font-size: .95rem; }
#stats dd.mod { font-size: .75rem; }
#items dt { font-family: var(--sans); }
.platewrap { border-radius: 2px; overflow: hidden; }
.platewrap #plate, #noplate { max-height: 180px; object-fit: cover; }
#noplate { font-style: italic; background: var(--paper); color: #aab59d; }
.entity .name { font-size: 1.1rem; }
.entity .facts { font-size: .8rem; line-height: 1.6; }
.entity .facts dt { color: #afbaa4; }
.entity .facts dd { color: #d0d3bc; }
.entity .facts button { line-height: 1.6; }
.entity .facts .look { font-style: normal; }
.entity { padding-bottom: 1.4rem; margin-bottom: 1.4rem; }
.portrait-acts button, .gal-acts button { min-height: 36px; padding: .45rem .65rem; }
.entity input { min-height: 36px; }
.entity .facts dd.edge { color: #b4c4ad; }
.entity .thumb { border-radius: 2px; }
#namecard { border-color: #718065; }
button.primary { background: #d8bd87; color: #24382c; border-color: #d8bd87; }

/* Creation inherits the front door; choice data is untouched. */
#creation { max-width: 850px; margin: 0 auto; padding: 3rem 0; }
#creation h1 { color: var(--folio-ink); font-size: 2.7rem; }
#creation .lede { color: var(--folio-dim); font-size: 1.1rem; }
#creation legend, #creation .heroname label, #creation .why { color: #5d694f; }
#creation .card { border: 1px solid #b8bfaa; background: #e8e6d6; border-radius: 3px; }
#creation .card .title { color: #29452e; font-size: 1.25rem; }
#creation .card .under, #creation .card .kit { color: #5a654b; }
#creation .card .grants { color: #3d5d3e; border-color: #abb99a; }
#creation .card:has(input:checked) { border-color: #426548; background: #dce3cd; box-shadow: inset 0 0 0 1px #426548; }
#creation input[type=radio] { accent-color: #416441; }
#heroname { background: #faf6e9; color: #29452e; border-color: #a4b08f; border-radius: 3px; }
#creation .back { color: #5c684e; }
#creation .primary { background: #294b3a; border-color: #294b3a; color: #fff5df; padding: 1rem 2rem; }
#start .problem { color: #9c3a2d; }

@media (max-width: 60rem) {
  :root { --header: 3.75rem; }
  header { padding: 0 1.1rem; gap: .9rem; }
  header .mark { font-size: .7rem; letter-spacing: .14em; gap: .5rem; }
  .brand-seal { width: 23px; height: 27px; }
  header .where { font: .85rem var(--serif); }
  header .turnno { border: 0; padding: 0; font-size: .62rem; }
  .chapter-head { padding-top: 2rem; }
  #story { padding-bottom: 1.2rem; }
  #composer > .in { padding: 0 1.15rem .2rem; }
  #bar { background: var(--ground); }
  #bar .bname { font-size: .9rem; color: var(--ink); }
  #panel { border-radius: 8px 8px 0 0; }
  #panelhead { padding-top: 1.3rem; }
  #panel > nav { min-height: 48px; }
  #start > div { padding: 0 1.5rem; }
  .masthead { padding-top: 2.5rem; gap: .5rem; }
  .masthead .thesis { font-size: 3.2rem; }
  .masthead .pitch { font-size: .95rem; }
  #catalogue .card { padding: 1.5rem; }
  #catalogue .card .title { font-size: 1.5rem; }
  #catalogue .card .under { font: .9rem/1.7 var(--sans); }
  #creation h1 { font-size: 2.2rem; }
}
@media (max-width: 600px) {
  header .where { font-size: .75rem; }
  header .mark { font-size: .66rem; }
  .masthead { grid-template-columns: 1fr; padding: 2.5rem 0 .6rem; }
  .masthead .thesis { font-size: 3.15rem; }
  .masthead .pitch { max-width: 24rem; margin-top: 1.2rem; }
  .frontispiece { max-width: 290px; margin: .3rem auto 0; }
  #start #continue { margin-top: 2rem; }
  .resume { flex-wrap: wrap; padding: 1rem; gap: .8rem; }
  .resume .cframe { flex-basis: 3rem; width: 3rem; }
  .resume .top { display: grid; gap: .35rem; }
  .resume .title { font-size: 1.2rem; }
  .resume .standing { font-size: .62rem; }
  .resume .go { width: 100%; text-align: center; padding: .85rem; }
  #catalogue { grid-template-columns: 1fr; }
  #catalogue .card { min-height: auto; padding: 1.4rem; }
  .runlist a { flex-wrap: wrap; gap: .35rem .6rem; }
  .runlist .title { width: 100%; min-width: 0; font-size: 1.05rem; }
  .runlist .hero { flex: 1; font-size: .75rem; }
  .runlist .when { font-size: .6rem; width: auto; }
  .landing-foot { flex-wrap: wrap; padding-bottom: 2rem; }
  .chapter-head { padding: 1.8rem 1.15rem 1.4rem; }
  .chapter-head h1 { font-size: 2rem; }
  .prose { font-size: 1.06rem; line-height: 1.8; }
  .said { font-size: .85rem; padding: .75rem .85rem; }
  .turn-heading { font-size: .58rem; }
  #go { min-width: 62px; }
  .verbs { gap: .15rem; }
  .verbs button { font-size: .72rem; padding: .6rem .45rem; }
  #creation { padding: 2rem 0; }
  #creation h1 { font-size: 1.85rem; }
}
