/* LifeCraft life story: Chronicle, Hall of Deeds, Book of Your Year, interview chips, era tints, print. */
.story-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.chip-pick { border: 1px solid #8a7044; background: rgba(255,248,236,0.5); color: #2a2116; border-radius: 99px; padding: 8px 12px; font: 520 13px Outfit, sans-serif; cursor: pointer; min-height: 36px; }
.chip-pick.on { background: #2a2116; color: #f6e7b2; border-color: #2a2116; }
.story-modal .story-list, .story .story-list { text-align: left; margin: 8px 0; padding-left: 18px; line-height: 1.5; }
.story-modal .field input { width: 100%; }
.story-json { width: 100%; min-height: 120px; font: 12px ui-monospace, monospace; background: rgba(0,0,0,0.25); color: inherit; border: 1px solid var(--line, #5a4a30); border-radius: 6px; padding: 8px; box-sizing: border-box; }
.story-modal .story-json { background: rgba(255,248,236,0.6); color: #2a2116; }
.story-aside { margin-top: 10px; }
.story-card { margin-top: 12px; }
.story h2 { margin-bottom: 6px; }
.story-chapters, .story-pages { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 10px; }
.story-chapter, .story-page { border: 1px solid rgba(138,112,68,0.7); border-radius: 8px; padding: 12px; background: rgba(128,100,60,0.12); color: inherit; }
.story-chapter.done { border-color: var(--gold); }
.story-chapter.aside { opacity: 0.75; }
.story-chapter h3, .story-page h3 { margin: 4px 0 6px; font-family: Cinzel, serif; font-size: 16px; color: inherit; }
.story-page p { margin: 0 0 8px; line-height: 1.5; color: inherit; font-size: 14px; }
.story-page.chapter { border-color: var(--gold); }
.story-page.quiet { border-style: dashed; }
.story-steps { display: flex; gap: 6px; margin: 6px 0; }
.story-steps i { flex: 1; height: 6px; border-radius: 3px; background: rgba(201,162,74,0.18); }
.story-steps i.done { background: var(--gold); }
.story-steps i.now { background: linear-gradient(90deg, var(--gold), rgba(201,162,74,0.3)); }
.story-dev { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; padding: 8px; border: 1px dashed #b04; border-radius: 6px; }
.story-dev b { color: #f68; font-size: 11px; letter-spacing: 0.12em; }
.story-log ul { max-height: 240px; overflow: auto; font-size: 13px; padding-left: 18px; }
.toggle-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; cursor: pointer; }
.toggle-row input { width: 20px; height: 20px; }
.file-btn { display: inline-flex; align-items: center; cursor: pointer; }
.story .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hall-room { margin: 14px 0; }
.hall-room h3 { font-family: Cinzel, serif; color: var(--gold-deep, #8a6420); border-bottom: 1px solid var(--line, #4a3c28); padding-bottom: 4px; }
.relics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.relic { display: grid; justify-items: center; gap: 4px; padding: 14px 8px; border: 1px solid var(--gold-deep, #8a6420); border-radius: 10px; background: radial-gradient(circle at 50% 30%, #3a2a14, #120c08); color: #f6e7c8; cursor: pointer; text-align: center; height: auto; }
.relic-ico { font-size: 34px; color: var(--gold-hi, #f6e7b2); text-shadow: 0 0 14px rgba(246,231,178,0.6); }
.relic small { color: #b9a782; font-size: 11px; }
.book-lede { font-family: Cinzel, serif; font-size: 16px; color: inherit; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.book-grid h3, .book-pages h4 { font-family: Cinzel, serif; color: var(--gold-deep, #8a6420); margin: 8px 0 4px; }
.book-grid ul { padding-left: 18px; margin: 0; }
.book-pages article { border-top: 1px solid var(--line, #4a3c28); padding: 8px 0; }
.book-pages p { margin: 0; line-height: 1.55; }
/* Long story panels: the stretched torn mask would eat the top of a very tall scroll, so use plain parchment. */
.panel.story-long { -webkit-mask-image: none !important; mask-image: none !important; background: linear-gradient(180deg, rgba(247,237,216,0.97), rgba(232,214,184,0.95)), url("assets/tatter-fiber.png") center / cover !important; padding: 28px 22px !important; border-radius: 4px !important; }
.panel.story-long::before, .panel.story-long::after { display: none !important; }
/* Era tints: light, never a mood judgement */
body.era-ember .main::after, body.era-road .main::after, body.era-dusk .main::after, body.era-dawn .main::after, body.era-iron .main::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2; mix-blend-mode: soft-light; }
body.era-ember .main::after { background: rgba(214,110,40,0.16); }
body.era-road .main::after { background: rgba(150,130,80,0.16); }
body.era-dusk .main::after { background: rgba(110,70,150,0.16); }
body.era-dawn .main::after { background: rgba(255,200,150,0.16); }
body.era-iron .main::after { background: rgba(110,130,150,0.16); }
@media (max-width: 600px) {
  .story-chapters, .story-pages { grid-template-columns: 1fr; }
  .story-modal { padding: 64px 34px 52px; }
}
@media print {
  body * { visibility: hidden !important; }
  .book, .book * { visibility: visible !important; }
  .book { position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; color: #111 !important; padding: 24px; }
  .book h2, .book h3, .book h4, .book .book-lede, .book .eyebrow { color: #3a2a10 !important; }
  .book .no-print { display: none !important; }
  .book::before, .book::after { display: none !important; }
}
