/* A cloth-bound pocket notebook carried through the harbor scenes. */
.journal-page .book-next-appointment {
  display:flex; align-items:center; gap:.6rem; width:100%; min-height:48px;
  border:0; border-inline-start:4px solid #bf854a; border-radius:0;
  padding:.65rem .75rem; margin:.8rem 0; background:#eee4ca; color:#284647;
  text-align:start; font:inherit;
}
.book-next-appointment .game-icon {width:1.2rem;height:1.2rem;flex:none}
.book-next-appointment time {font-weight:600;font-variant-numeric:tabular-nums}
.book-next-appointment strong {min-width:0;overflow-wrap:anywhere}
.book-next-appointment span:last-child {margin-inline-start:auto}
.journal-page .finance-grid .balance-item span {display:flex;gap:.4rem;align-items:center}
.balance-item .game-icon {width:1.05rem;height:1.05rem}
.journal-page .balance-item progress {width:100%;height:5px;display:block;appearance:none;border:0;border-radius:0;background:#dfd7bf;margin-top:.5rem;color:#397263}
.balance-item progress::-webkit-progress-bar {background:#dfd7bf}
.balance-item progress::-webkit-progress-value {background:#397263}
.balance-item progress::-moz-progress-bar {background:#397263}
.balance-item:nth-child(3) progress::-webkit-progress-value {background:#9f6148}
.balance-item:nth-child(3) progress::-moz-progress-bar {background:#9f6148}
.scene-game.journal-page {
  --book-ink: #193b40;
  --book-sub: #526765;
  --book-paper: #fff9ed;
  --book-rule: #d6cbb2;
  --book-cloth: #275155;
  --muted: #485d59;
  --green: #296645;
  --blue: #235e59;
  max-width: 800px;
  color: var(--book-ink);
}
.scene-game.journal-page .life-detail {
  position: relative;
  overflow-wrap: anywhere;
  width: 100%;
  max-width: none;
  min-height: min(550px, 72svh);
  padding: 18px clamp(23px, 5vw, 62px) 40px clamp(35px, 7vw, 78px);
  color: var(--book-ink);
  background: linear-gradient(90deg, #e7dcc0 0, #f8f1df 6px, var(--book-paper) 25px);
  border: 1px solid #b1a686;
  border-left: 14px solid var(--book-cloth);
  border-radius: 5px 13px 13px 5px;
  box-shadow: 2px 3px 0 #d8ccaf, 4px 5px 0 #506265, 0 14px 35px #03181d55;
}
.journal-page .life-detail::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -7px;
  border-left: 1px dashed #b1bea785;
  pointer-events: none;
}
.journal-page .life-detail > .scene-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 0 10px 0 0;
  color: #385d5d;
}
.journal-page :is(button,summary,a):focus-visible,
.scene-review :is(button,summary):focus-visible { outline: 3px solid #917016; outline-offset: 3px; }
.journal-page :is(button,details,summary,input,select) { max-width: 100%; }
.journal-page form [hidden] { display: none; }
.opportunity-view .case-status { display: block; margin-bottom: 5px; color: #365c51; font-size: 13px; font-weight: 600; }
.journal-page .fieldbook-cover, .journal-page .book-page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0 20px;
  border-bottom: 2px solid var(--book-ink);
}
.journal-page .fieldbook-cover { justify-content: space-between; gap: 12px; }
.journal-page .fieldbook-cover h1, .journal-page .book-page-head h1 {
  margin: 0;
  color: var(--book-ink);
  font: 750 clamp(30px, 4.6vw, 43px)/1.3 var(--harbor-serif);
  letter-spacing: .04em;
}
.journal-page .book-locality, .journal-page .book-page-head p, .journal-page .fieldbook-cover time {
  margin: 6px 0 0;
  color: var(--book-sub);
  font-size: 13px;
  line-height: 1.65;
}
.journal-page .book-locality { display: flex; align-items: center; gap: 4px; margin: 0 0 5px; }
.journal-page .book-locality .game-icon { width: 14px; height: 14px; }
.journal-page .fieldbook-cover time { display: block; font-variant-numeric: tabular-nums; }
.journal-page .harbor-print {
  width: clamp(94px, 23vw, 162px);
  flex: none;
  aspect-ratio: 1.66;
  margin: 4px 4px 6px 0;
  border: 5px solid #fffdf4;
  background: #d0d9c5 url('/assets/backgrounds/harbor-town.png') 50% 57%/cover;
  box-shadow: 0 0 0 1px #d1c9b1, 1px 3px 5px #273d3320;
  transform: rotate(3deg);
}
.journal-page .book-leaf-icon, .journal-page .avatar, .journal-page .book-index-icon {
  display: inline-grid; place-items: center;
  flex: none; width: 42px; height: 42px;
  border: 1px solid #aebfb4; border-radius: 50%;
  background: #e0e9dd; color: var(--book-cloth); box-shadow: none;
}
.journal-page .book-leaf-icon .game-icon { width: 23px; height: 23px; }
.journal-page .book-index-icon { width: 34px; height: 34px; border: 0; border-radius: 7px; }
.journal-page .notebook-pages {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  column-gap: 28px; row-gap: 0; border: 0; margin: 7px 0 18px;
}
.journal-page .notebook-pages button, .journal-page .person-select {
  display: flex; align-items: center; gap: 13px;
  min-height: 63px; padding: 9px 3px;
  border: 0; border-bottom: 1px solid var(--book-rule); border-radius: 0; 
  background: transparent; color: var(--book-ink); box-shadow: none; text-align: left;
}
.journal-page .notebook-pages button:hover, .journal-page .person-select:hover { background: #ecebda; }
.journal-page .notebook-pages .book-index-icon { margin: 0; color: var(--book-cloth); }
.journal-page .notebook-pages .game-icon { width: 18px; height: 18px; color: inherit; }
.journal-page .notebook-pages .page-turn, .journal-page .person-arrow { margin-left: auto; padding-right: 5px; color: #54726f; font-size: 24px; font-weight: 400; }
.journal-page .notebook-pages strong { font-size: 16px; font-weight: 650; }
.journal-page .save-options, .journal-page .plan-section, .journal-page .debt-book, .journal-page .life-followups { border-color: var(--book-rule); }
.journal-page details > summary { min-height: 44px; cursor: pointer; }
.journal-page :is(.save-options,.plan-section,.life-followups,.debt-book) > summary { padding: 14px 0; color: var(--book-ink); font-size: 14px; font-weight: 650; }
.journal-page .management-actions { gap: 6px 20px; }
.journal-page :is(.scene-link,.row-actions > button,.secondary,.chronicle-page-turn button,.chronicle-latest,.chronicle-dates button) { min-height: 44px; }
.journal-page :is(.scene-link, .text-button, .chronicle-causes button, .chronicle-page-turn button) { color: #275c60; }
.journal-page .section-content, .journal-page .chronicle-prose p { color: #3d5250; }
.journal-page .secondary { border-color: #abbbb0; background: #f2f2e6; color: var(--book-ink); box-shadow: none; }
.journal-page .secondary:hover { background: #e0e8dc; }
.journal-page .people-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 23px; margin: 0 0 16px; }
.journal-page .person-select { width: 100%; }
.journal-page .person-select small { display: block; color: var(--book-sub); font-size: 12px; line-height: 1.6; }
.journal-page .person-select strong { color: var(--book-ink); font-size: 16px; }
.journal-page .avatar { background: var(--book-cloth); color: #ffdfa3; border: 0; font: 650 19px/1 var(--harbor-serif); }
.journal-page .social-actions { margin: 12px 0; gap: 8px; }
.journal-page .contact-back { display: block; margin: 0 0 7px; }
.journal-page .timeline article, .journal-page .ledger > div, .journal-page .asset-list > div { border-color: var(--book-rule); }
.journal-page .timeline time, .journal-page .chronicle-time, .journal-page .chronicle-meta { color: #596c63; }
.journal-page .book-agenda { list-style: none; margin: 0 0 18px; padding: 0; }
.journal-page .book-agenda li { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--book-rule); }
.journal-page .book-agenda time { color: #526b66; font-size: 13px; }
.journal-page .book-empty { margin: 18px 0; color: var(--book-sub); }
.journal-page .compact-form { max-width: 520px; }
.journal-page .compact-form :is(input:not([type=checkbox]),select,textarea) { border: 1px solid #adb9aa; background: #fffdf4; color: var(--book-ink); min-width: 0; min-height: 44px; font-size: 16px; }
.journal-page .compact-form .secondary { justify-self: start; }
.journal-page .status-page .body-meters { gap: 24px; margin: 24px 0; }
.journal-page .status-page .meter > div, .journal-page .status-page .meter b { color: var(--book-ink); }
.journal-page .status-page .meter .game-icon { vertical-align: middle; margin-right: 3px; }
.journal-page .status-page .pocket-balance { color: var(--book-ink); align-items: center; padding: 16px 0; border-color: var(--book-rule); }
.journal-page .pocket-balance strong { margin-left: auto; max-width:100%; }
.journal-page .status-page .meter small {color:var(--muted);}
.journal-page :is(.goal-row,.project-row,.ledger > div,.asset-list > div) { flex-wrap:wrap; }
.journal-page :is(.ledger,.asset-list) b { margin-inline-start:auto; white-space:normal; }
.journal-page :is(.social-actions,.form-pair) { grid-template-columns:repeat(auto-fit,minmax(min(100%,8em),1fr)); }
.journal-page .social-actions > *, .journal-page .book-page-head > div { min-width:0; }
.journal-page .finance-total { display: grid; gap: 3px; padding: 18px 0 13px; border-radius: 0; background: transparent; }
.journal-page .finance-total strong, .journal-page .pocket-balance strong { color: var(--book-ink); font: 650 clamp(25px,4vw,36px)/1.25 "Bahnschrift","Segoe UI",sans-serif; font-variant-numeric: tabular-nums; }
.journal-page .finance-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; }
.journal-page .finance-grid > div { min-width: 0; padding: 8px 0; background: transparent; border: 0; border-top: 1px solid var(--book-rule); border-radius: 0; }
.journal-page .finance-grid b { overflow-wrap: anywhere; color: var(--book-ink); font-size: clamp(14px,3vw,18px); }
.journal-page .finance-grid span, .journal-page .finance-total span, .journal-page .bill-note { color: var(--book-sub); }
.journal-page .bill-note { border: 0; padding: 10px 0; margin: 0 0 12px; font-size: 13px; line-height: 1.8; }
.journal-page .money-page h2, .journal-page .directory-page h2, .journal-page .plans-view h2 { margin: 20px 0 8px; color: var(--book-ink); font: 700 18px/1.5 var(--harbor-serif); }
.journal-page .chronicle-full { padding: 0; }
.journal-page .chronicle-heading { flex-wrap:wrap; margin: 18px 0; gap: 12px; align-items: center; }
.journal-page .chronicle-heading h2 { margin: 0; color: var(--book-ink); font: 700 23px/1.45 var(--harbor-serif); }
.journal-page .chronicle-item::after { background: var(--book-cloth); box-shadow: 0 0 0 4px var(--book-paper); }
.journal-page .chronicle-item::before { border-color: var(--book-rule); }
.journal-page .chronicle-entry h3 { color: var(--book-ink); }
.journal-page .chronicle-entry p { font-size: 14px; line-height: 1.8; }
.journal-page .chronicle-navigation { min-width:0; max-width:100%; flex-wrap:wrap; }
.journal-page .chronicle-dates { min-width:0; max-width:100%; }
.journal-page .chronicle-dates > div { position:static; width:min(12rem,100%); max-height:min(280px,38svh); overflow-y:auto; background:var(--book-paper); }
.journal-page .chronicle-latest, .journal-page .chronicle-dates > summary { white-space:normal; overflow-wrap:anywhere; }
.journal-page .chronicle-dates > summary { display: flex; align-items: center; list-style: none; padding: 0 8px; color: #275c60; }
.journal-page .chronicle-dates > summary::after { content: "⌄"; margin-left: 5px; }
.journal-page .chronicle-navigation, .journal-page .chronicle-page-turn { align-items: center; }
.scene-game .scene-review .review-terms {
  display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap;
  margin: 13px 0; padding: 11px 13px; border: 0; border-inline-start: 3px solid #bd9150;
  background: #efe8d6; color: #2e4847; font-size: 14px;
}
.scene-game .scene-review .review-terms span { display: inline-flex; align-items: center; gap: 4px; }
.scene-game .scene-review .review-buttons { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; }
.scene-game .scene-review .review-buttons button { min-height: 47px; }
@media (max-width: 640px) {
  .scene-game.journal-page { width: calc(100% - 22px); }
  .scene-game.journal-page .life-detail { padding: 6px 16px 23px 21px; border-left-width: 9px; min-height: 0; }
  .journal-page .life-detail > .scene-back { margin-bottom: 2px; }
  .journal-page .fieldbook-cover, .journal-page .book-page-head { padding-bottom: 14px; gap: 11px; }
  .journal-page .fieldbook-cover h1, .journal-page .book-page-head h1 { font-size: 28px; }
  .journal-page .notebook-pages, .journal-page .people-list { grid-template-columns: 1fr; gap: 0; }
  .journal-page .notebook-pages button, .journal-page .person-select { min-height: 52px; }
  .journal-page .book-index-icon { width: 30px; height: 30px; }
  .journal-page .status-page .body-meters { grid-template-columns: 1fr; gap: 13px; margin: 18px 0; }
}
@media (max-width: 355px) {
  .journal-page .finance-grid { grid-template-columns: 1fr 1fr; }
  .journal-page .compact-form .form-pair { grid-template-columns: 1fr; }
  .scene-game .scene-review .review-buttons { grid-template-columns: 1fr; }
}
