.postbook { padding: 2px 0 6px; color: #293d37; }
.postbook-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 6px 0 12px; }
.postbook-heading h3,.journey-partners h4 { margin: 0; color: #29483a; font: 750 clamp(1.15rem, 3vw, 1.55rem)/1.25 Georgia,"Noto Serif TC","PMingLiU",serif; }
.postbook-heading p { margin: 5px 0 0; color: #525c4e; font-size: .84rem; line-height: 1.5; }
.postbook-tally { flex: none; padding: 6px 9px; color: #6e4c2d; border: 1px solid #9a865f; border-radius: 3px; font-size: .75rem; white-space: nowrap; }
.postbook-tally b { font-size: 1rem; }
.route-stamps { display: grid; gap: 11px; }
.route-stamp { display: grid; grid-template-columns: clamp(90px, 23vw, 158px) minmax(0,1fr); align-items: center; gap: clamp(10px,2vw,20px); padding: clamp(9px,1.8vw,15px); background: linear-gradient(105deg,#f7ebd1,#e8d9b6); color: #283e36; border: 1px solid #af9b70; border-radius: 3px 9px 3px 8px; }
.route-print {
  position: relative; display: block; width: 100%; aspect-ratio: 1;
  padding: 7px; box-sizing: border-box; background: #fff4cf;
  -webkit-mask: radial-gradient(circle at 3px 3px,transparent 2px,#000 2.6px) -3px -3px / 8px 8px round;
  mask: linear-gradient(#000 0 0) center/calc(100% - 7px) calc(100% - 7px) no-repeat, radial-gradient(circle at 3px 3px,transparent 2px,#000 2.6px) -3px -3px / 8px 8px round;
}
.route-print img { display: block; width: 100%; height: 100%; object-fit: cover; }
.route-print-empty { display: grid; place-items: center; background: repeating-linear-gradient(135deg,#dacfb4 0 2px,#e6dbc2 2px 8px); }
.route-print-empty i, .route-seal { font-family: "Noto Serif TC","PMingLiU",serif; text-align: center; }
.route-print-empty i { padding: 5px 6px; border: 1px solid #a89878; color: #7c725d; font-size: .8rem; line-height: 1.1; transform: rotate(-6deg); font-style: normal; }
.route-seal { position: absolute; right: 7px; bottom: 9px; padding: 4px; background: #973e2ff0; color: #ffefbd; border: 2px double #ffe8ae; font-size: .74rem; line-height: 1; transform: rotate(-6deg); }
.route-stamp-copy { min-width: 0; }
.route-locale { color: #5f644f; font: 650 .74rem/1.3 system-ui,sans-serif; }
.route-stamp h4 { margin: 3px 0 5px; color: #2b483b; font: 750 clamp(1.05rem, 3.9vw, 1.42rem)/1.22 Georgia,"Noto Serif TC","PMingLiU",serif; }
.route-stamp p, .journey-partners p { margin: 0; font-size: .83rem; line-height: 1.58; }
.route-stamp p { color: #34473b; }
.postbook .route-share { padding: 5px 0; min-height: 44px; width: auto; background: transparent; color: #6d3828; border: none; font-size: .78rem; text-align: left; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; }
.route-share-text:not([hidden]) { display: block; width: 100%; box-sizing: border-box; min-height: 70px; background: #fffae9; color: #273f32; }
.route-stamp.is-sealed { background: #e0dac8; }
.journey-partners { margin-top: 19px; padding: 14px 0 0; border-top: 1px solid #859280; }
.journey-partners > p { margin: 5px 0 11px; color: #4e5e51; }
.journey-partner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #61715e; }
.journey-partner strong { color: #304b40; }
.journey-partner p { margin: 3px 0 0; color: #4b5950; }
.journey-partner a { display: inline-flex; align-items: center; gap: 3px; min-height: 44px; color: #674524; font-size: .85rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.postbook :is(button,a,textarea):focus-visible { outline: 3px solid #b97a3e; outline-offset: 2px; }
@media (max-width:365px) { .postbook-heading { align-items: flex-start; } .route-stamp { grid-template-columns: 76px minmax(0,1fr); gap: 8px; } }

.route-print-empty img { grid-area: 1/1; filter: grayscale(1) sepia(.4); opacity: .31; }
.route-print-empty i { z-index: 1; grid-area: 1/1; color: #6c5940; background: #efe4cc; }

.journey-partners summary { min-height: 46px; align-content: center; cursor: pointer; color: #29483a; font-weight: 750; }
.journey-partners summary small { margin-inline-start: .5em; color: #536459; font-size: .78em; }
.journey-partners summary:focus-visible { outline: 2px solid #28634f; outline-offset: 3px; }
/* Each island keeps its two in-game memories and optional real-world visit together. */
#game .postbook-heading { margin-bottom: 5px; }
#game .postbook-progress { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; margin:8px 0 13px; color:#485c4c; font-size:.8rem; }
.postbook-progress b { margin-inline-start:4px; color:#235547; font-variant-numeric:tabular-nums; }
.post-letters { display:grid; gap:8px; }
#game .post-letter {
  min-width:0; scroll-margin-top:4px; border:1px solid #b39a6d; border-radius:6px 11px 6px 7px;
  background:#f7efdd; box-shadow:0 2px 0 #b3a18444; overflow:clip;
}
#game .post-letter > summary {
  display:grid; grid-template-columns:44px 1fr auto 13px; align-items:center; gap:8px;
  list-style:none; padding:6px 9px; min-height:52px; cursor:pointer; color:#355143; line-height:1.2;
}
.post-letter > summary::-webkit-details-marker,.partner-backup > summary::-webkit-details-marker {display:none}
#game .post-letter > summary img { width:43px; height:43px; display:block; object-fit:cover; border-radius:3px; }
#game .post-letter > summary small {display:block;color:#6f644e; font:650 .7rem/1.3 system-ui,sans-serif; }
#game .post-letter > summary strong {display:block; font:750 1.07rem/1.5 Georgia,"Noto Serif TC",serif; letter-spacing:.02em; }
#game .post-letter > summary .letter-count { font:700 .75rem/1.4 system-ui,sans-serif; color:#5d674e; white-space:nowrap; }
#game .post-letter > summary i {font:700 1rem system-ui,sans-serif; color:#426357; text-align:center;}
#game .post-letter[open] > summary {color:#fff5d9; background:#29564a;}
#game .post-letter[open] > summary :is(small,.letter-count,i) {color:#eee2b8}
#game .post-letter[open] > summary i {transform:rotate(180deg)}
#game .post-letter summary:focus-visible {outline:3px solid #bd7731;outline-offset:-3px}
.letter-fold {padding:7px 10px 10px;}
.keepsake-actions {display:flex; flex-wrap:wrap; align-items:center; column-gap:14px;}
#game .letter-fold .route-stamp,#game .garden-letter-keepsake {
  display:grid; grid-template-columns:clamp(64px,20vw,100px) minmax(0,1fr); align-items:start; gap:10px;
  padding:10px 0; margin:0; min-width:0; border:0; border-radius:0; background:transparent; box-shadow:none;
}
#game .garden-letter-keepsake > img {width:100%; height:auto; aspect-ratio:1; border-radius:6px; display:block; object-fit:cover;}
#game .garden-letter-keepsake h4 {margin:2px 0 4px;color:#2d4b3d;font:750 1.08rem/1.35 Georgia,"Noto Serif TC",serif}
#game .garden-letter-keepsake p,#game .garden-letter-locked p {margin:0;color:#334b40;font-size:.86rem;line-height:1.5}
#game .letter-fold > :is(.garden-letter-keepsake,.garden-letter-locked,.route-stamp) + :is(.garden-letter-keepsake,.garden-letter-locked,.route-stamp) {border-top:1px dashed #bdac89}
#game .postbook button.route-share {display:inline-flex; justify-content:flex-start; align-items:center; gap:4px; min-height:44px; padding:3px 2px; font:700 .82rem/1.4 system-ui,sans-serif; color:#704222; background:transparent!important; border:0!important; box-shadow:none; text-decoration:underline}
#game .garden-letter-locked {display:flex;align-items:center;gap:8px;padding:8px 0 10px}
#game .garden-letter-locked div {flex:1}
#game .garden-letter-locked span {font-weight:750;color:#4c5d4d;font-size:.79rem}
#game .garden-letter-locked button {min-height:44px;white-space:nowrap; padding:5px 8px; color:#31513e; background:#e9efdf!important; border:1px solid #9aab87!important;border-radius:7px;font-size:.82rem}
#game .journey-partners {margin:4px 0 0;padding:0 9px;border:1px solid #b2b393;border-left:3px solid #709474;border-radius:4px 8px 4px 6px;background:#e9ecda}
#game .journey-partners > summary {min-height:46px; cursor:pointer; font:720 .9rem/1.5 system-ui,sans-serif;color:#345345}
#game .journey-partners > summary small {font:600 .72rem/1.3 system-ui,sans-serif; color:#546452;white-space:nowrap}
#game .journey-partner {display:block;padding:0 1px 6px;border:0}
#game .journey-partner .partner-disclosure {margin:8px 0;color:#485a4d;font-size:.79rem}
#game .journey-partner a.partner-visit {display:inline-flex;align-items:center;justify-content:space-between;gap:8px;box-sizing:border-box;min-height:44px;padding:7px 12px;background:#2c5746;color:#fffae4;border-radius:5px;text-decoration:none}
#game .journey-partner .partner-catalog {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:3px 7px;
  width:fit-content;
  max-width:100%;
  min-height:44px;
  margin-top:4px;
  color:#245341;
  font:650 .9rem/1.45 system-ui,sans-serif;
  text-underline-offset:.18em;
}
#game .partner-catalog small {color:#475b4e;font:500 .76rem/1.45 system-ui,sans-serif}
#game .partner-catalog:focus-visible {outline:2px solid #28634f;outline-offset:2px}
#game .partner-backup summary {cursor:pointer; display:inline-flex;align-items:center;min-height:44px;font:.76rem/1.35 system-ui,sans-serif;color:#4b5e50;text-decoration:underline}
#game .partner-backup a {display:flex; min-height:44px; align-items:center; width:max-content; max-width:100%}
.postbook-sr {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(min-width:720px) {
  #game .letter-fold {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px;padding:12px 16px}
  #game .letter-fold > .journey-partners {grid-column:1/-1;grid-row:2}
  #game .letter-fold > :is(.garden-letter-keepsake,.garden-letter-locked,.route-stamp) + :is(.garden-letter-keepsake,.garden-letter-locked,.route-stamp) {border-top:0}
}
/* Keep the four journal tabs legible over a long open letter on a phone. */
#game .menu-journal .menu-body:has(>.postbook) > .section-tabs {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:3px;
  position:sticky;top:0;margin:0 0 8px;padding:3px 0 5px;background:#f5ecd8!important;
  border-bottom:1px solid #bfac86;overflow:visible;
}
#game .menu-journal .menu-body:has(>.postbook) > .section-tabs button {
  min-width:0;min-height:44px;height:auto;white-space:normal;padding:4px 2px!important;
  font:670 clamp(.74rem,3.4vw,.91rem)/1.25 system-ui,sans-serif!important;
}
#game :is(.post-letter,.garden-letter-keepsake) {scroll-margin-block-start:57px}
