:root{color-scheme:light;--ink:#223e39;--accent:#bb5639;--paper:#faf8f2;--line:#d8d7c9;--soft:#686f62;--white:#fffdf7;--serif:"Noto Serif SC","Songti SC",SimSun,serif;--sans:"DM Sans","Microsoft YaHei",system-ui,sans-serif;--mono:"IBM Plex Mono",Consolas,monospace}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.6 var(--sans)}[hidden]{display:none!important}button,input,textarea,select{font:inherit;color:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.55}a{color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #d58d46;outline-offset:3px}button{border:0;border-radius:0;background:transparent}input,select,textarea{border-radius:5px}input,select,textarea{background:#fffefa;border:1px solid #c5c9ba;padding:9px 11px;width:100%}textarea{resize:vertical}label{display:block;font-weight:600;margin-bottom:5px}.bar{border-bottom:1px solid var(--line);background:var(--paper)}.bar-inner,main{width:min(1120px,calc(100% - 64px));margin:auto}.bar-inner{min-height:76px;display:flex;align-items:center;gap:42px}.brand{display:flex;gap:11px;align-items:center;text-decoration:none;font-family:var(--serif);font-size:20px;letter-spacing:.05em}.stamp{border-radius:5px;background:var(--accent);color:#fff8e7;width:34px;height:34px;display:grid;place-items:center;outline:1px solid #f4c9a5;outline-offset:-4px;font-size:19px}.bar nav{display:flex;align-self:stretch;gap:24px}.nav-link{border-radius:0;padding:0 3px;color:var(--soft);border-bottom:2px solid transparent}.nav-link.active{color:var(--ink);font-weight:700;border-color:var(--accent)}.action{background:var(--ink);color:#fffdf4;padding:9px 18px;font-weight:600;box-shadow:0 1px 2px #173e3217}.action:hover{background:#33554c}.add{margin-left:auto}.intro{padding:37px 0 24px;display:flex;justify-content:space-between;align-items:flex-end;gap:16px}.eyebrow{font:600 11px/1.5 var(--mono);letter-spacing:.16em;color:var(--accent)}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:var(--serif)}h1{font-size:clamp(34px,4.25vw,52px);line-height:1.24;letter-spacing:.035em;margin:5px 0 7px}h2{font-size:23px;line-height:1.4}.intro p,.hint,.muted{color:var(--soft)}.shelf-tools,.dlg-foot,.modes,.days{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.quiet,.day-button{padding:7px 12px;background:var(--white);text-decoration:none;font-size:14px}.group:hover{border-color:#8fa093}.sheet{border:1px solid #c6ccbc;border-radius:12px;overflow:hidden;background:var(--white);box-shadow:0 5px 15px #21332308}.sheet-head,.dlg-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.sheet-head{padding:16px 23px;border-bottom:1px solid var(--line)}.chapter{display:flex;align-items:baseline;gap:11px}.chapter h2{font-size:20px}.chapter .eyebrow{white-space:nowrap}.modes{gap:3px;background:#eeeee3;border-radius:6px;padding:3px}.mode{color:#5b695f;padding:5px 10px;font-size:13px}.mode.active,.day-button.active{background:var(--ink);color:#fffdf4}.entries{padding:27px 0 50px}.days{margin:15px 0 16px}.day-button{font-size:13px}.event{border-top:1px solid var(--line);padding:15px 4px;display:grid;grid-template-columns:90px minmax(0,1fr) auto;column-gap:16px;align-items:baseline}.event.is-selected{box-shadow:inset 3px 0 #af5639;padding-left:13px}.time{font:600 14px/1.7 var(--mono);color:var(--accent)}.record-main{text-align:left;padding:0;overflow-wrap:anywhere}.record-main strong{display:block;font:600 18px/1.6 var(--serif)}.metadata{font-size:13px;color:var(--soft);margin-top:3px;display:block}.details{grid-column:2/-1;white-space:pre-line;color:#3e5147;font-size:14px;padding-top:5px}.details summary{cursor:pointer}.section-placeholder{padding:28px 10px;color:var(--soft);border-top:1px solid var(--line)}#index-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));align-items:start;gap:14px;margin:6px 0 40px}.group{border:1px solid var(--line);background:var(--white);padding:18px;border-radius:8px}.group h2{margin-bottom:7px}.group .group-link{display:block;width:100%;border-top:1px solid var(--line);padding:10px 0;text-align:left}.group-link:hover,.record-main:hover{color:var(--accent)}dialog{width:min(650px,calc(100% - 24px));max-height:88vh;background:var(--paper);border:1px solid var(--line);color:var(--ink);border-radius:12px;padding:22px 25px;box-shadow:0 24px 95px #1d302733}dialog::backdrop{background:#172d25a6}.dlg-head{margin:0 0 20px}.close{width:35px;height:35px;font-size:23px}.hint,.error{font-size:13px;margin:7px 0 10px}.error{color:#943a25;white-space:pre-line}.error:empty{display:none}.dlg-foot{justify-content:space-between;margin-top:15px}.draft{border:1px solid var(--line);border-radius:7px;padding:12px 14px 15px;margin:12px 0;min-width:0}.draft legend{padding:0 5px;font-weight:600}.fields{display:grid;grid-template-columns:1fr 1fr;gap:9px 12px}.fields label{font-size:13px;font-weight:500;margin:0}.fields input,.fields textarea,.fields select{margin-top:3px}.wide{grid-column:1/-1}.source{margin-top:10px;font-size:13px;color:var(--soft);overflow-wrap:anywhere;white-space:pre-wrap}.source summary{cursor:pointer}#notice:not([hidden]){margin-top:12px;padding:8px 12px;background:#e9efdd;border-left:3px solid #588569}.skip{margin-top:9px;color:var(--accent);text-decoration:underline}.state{color:#905333}.meta-break{white-space:pre-line;overflow-wrap:anywhere}
@media(max-width:700px){.bar-inner,main{width:calc(100% - 30px)}.bar-inner{min-height:64px;gap:19px}.bar nav{gap:10px}.stamp{width:29px;height:29px}.brand{font-size:17px;gap:6px}.add{padding:7px 10px}.intro{padding:24px 0 17px;align-items:flex-start;flex-wrap:wrap}.intro h1{font-size:35px}.shelf-tools{gap:6px}.sheet-head{align-items:flex-start;padding:12px;flex-wrap:wrap}.mode{padding:5px 8px}.event{grid-template-columns:58px minmax(0,1fr) auto;gap:8px}.details{grid-column:1/-1}.event.is-selected{padding-left:8px}.fields{gap:8px}.chapter{gap:8px}dialog{padding:17px}.record-main strong{font-size:16px}}
@media(max-width:400px){.bar-inner{gap:11px}.brand strong{display:none}.intro .quiet{padding:5px 9px}.event .quiet{padding:4px 7px}}
.share-entries{margin:10px 0 14px;padding:3px 14px 6px;max-height:38vh;overflow:auto;border:1px solid var(--line);border-radius:6px}
.share-entries legend{padding:0 5px}
.share-row,.share-option{display:flex;align-items:center;gap:11px;font-weight:normal}
.share-row{padding:8px 0;margin:0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.share-row:last-child{border:0}
.share-row input,.share-option input{width:19px;height:19px;flex:none;accent-color:var(--ink)}
.share-tools{display:flex;gap:6px}
.album-group .quiet{margin-top:12px}
@media(max-width:480px){.bar-inner{gap:10px}.bar-inner .brand strong{display:none}.bar nav{gap:8px}.bar .add{white-space:nowrap}}

:root {
  --ink: #222827;
  --paper: #fff;
  --white: #fff;
  --line: #e7e9e7;
  --soft: #616966;
  --accent: #526d67;
  --serif: var(--sans);
  --button-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.25' filter='url(%23grain)'/%3E%3C/svg%3E");
}
.bar-inner, main {max-width: 960px}
.bar-inner {min-height: 66px}
.brand {font-size: 17px}
.stamp {background: var(--ink);outline: none;border-radius: 50%;font-size: 15px}
.intro {padding-top: 32px}
h1 {font-size: clamp(30px, 4.2vw, 44px);letter-spacing: -.02em}
.action, .sheet, dialog {box-shadow: none}
.action, .mode.active, .day-button.active, .jj-journey .jj-action {
  background-color: var(--ink);
  background-image: var(--button-grain);
  background-blend-mode: soft-light;
  color: white;
}
.action:hover, .jj-journey .jj-action:hover {background-color: #394641}
.quiet, .day-button:not(.active), .mode:not(.active) {background-image: var(--button-grain);background-blend-mode: soft-light}
.modes {background: #f2f3f1}
.sheet {border-color: var(--line)}
.sheet-head {padding: 14px 20px}
.event.is-selected {box-shadow: none;background: #f5f6f4;border-radius: 8px}
.group {border-color: var(--line)}
@media(max-width:700px) {
  .sheet-head {padding: 11px 12px}
  .intro {padding-top: 22px}
}

/* White reading column and text navigation inspired by INLAND. */
:root {
  color-scheme: dark;
  --paper: #101b20;
  --white: #17252b;
  --ink: #f0eeea;
  --soft: #c2cacc;
  --line: #bacacf3b;
  --accent: #f0ae82;
  --deep-sea: #0b171d;
  --mist: #14242c;
  --shore: #293d43;
  --sea: #20373f;
  --island: #4b6166;
  --route: #8da9ae;
  --warm: #eb9d72;
  --sun: #e4a178;
  --control: #2a3a40;
  --control-hover: #3c4c50;
  --background-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.69' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.58' filter='url(%23grain)'/%3E%3C/svg%3E");
}
main {width: min(660px, calc(100% - 40px))}
.bar-inner {width: calc(100% - 48px); max-width: none; min-height: 49px; gap: 22px}
.brand {white-space: nowrap; font-size: 15px; font-weight: 500; letter-spacing: 0}
.bar nav {margin-left: auto; gap: 19px}
.nav-link, .mode {
  color: var(--soft);
  background: none;
  font-weight: 400;
  border: 0;
  border-radius: 0;
  padding: 0;
  transition: color 140ms ease;
}
.nav-link.active, .mode.active {
  color: var(--ink);
  background: none;
  font-weight: 600;
}
.nav-link:hover, .mode:hover, .quiet:hover {color: var(--accent)}
.nav-link.active {text-decoration: underline; text-underline-offset: .42em}
.nav-icon-link {
  position: relative;
  display: grid;
  place-items: center;
  min-inline-size: 44px;
  min-block-size: 44px;
}
.nav-icon-link svg {
  inline-size: 22px;
  block-size: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon-link.active::after {
  content: "";
  position: absolute;
  inset-block-end: 5px;
  inset-inline: calc(50% - 9px);
  block-size: 2px;
  background: currentColor;
}
.nav-icon-name {
  position: absolute;
  z-index: 2;
  inset-block-start: calc(100% + 2px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
}
.nav-icon-link:focus-visible .nav-icon-name {visibility: visible}
@media (hover: hover) and (pointer: fine) {
  .nav-icon-link:hover .nav-icon-name {visibility: visible}
}
.header-actions {display: flex; align-items: center; gap: 8px; flex: none}
.add {padding: 4px 10px; font-size: 13px}
.more {position: relative; z-index: 4}
.more > summary {
  list-style: none; cursor: pointer; padding: 1px 8px; font-size: 20px;
  letter-spacing: .08em;
}
.more > summary:focus-visible {outline: 3px solid #d58d46; outline-offset: 3px}
.more > summary::-webkit-details-marker {display: none}
.more > summary:hover, .more[open] > summary {background: #f5f6f7}
.more-items {
  position: absolute; top: calc(100% + 5px); right: 0; width: max-content;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px;
  box-shadow: 0 4px 16px #2631420c;
}
.more-items button {display: block; width: 100%; padding: 8px 12px; text-align: left}
.more-items button:hover:not(:disabled) {background: #f3f5f5}
.intro {display: block; padding: 29px 0 39px; text-align: center}
h1 {font-size: clamp(30px, 5vw, 40px); font-weight: 750; margin: 0 0 8px; text-wrap: balance; color: var(--ink)}
.intro {container-type: inline-size}
.headline-row.is-people {
  --people-title-size: clamp(30px, 5vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  margin-block-end: 8px;
}
.headline-row.is-people h1 {grid-column: 2; grid-row: 1; margin-block: 0; font-size: var(--people-title-size)}
.people-perspective {
  grid-row: 1;
  min-block-size: 44px;
  padding: 0;
  color: var(--soft);
  color: color-mix(in srgb, var(--soft) 82%, var(--paper));
  font-size: calc(var(--people-title-size) * .75);
  font-weight: 700;
  line-height: 1.24;
  white-space: nowrap;
}
.people-perspective-first {grid-column: 1; justify-self: end}
.people-perspective-last {grid-column: 3; justify-self: start}
.people-perspective:hover {color: var(--accent); text-decoration: underline; text-underline-offset: .2em}
@media (max-width: 360px) {
  .headline-row.is-people {column-gap: 4px}
}
.wordmark {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: clamp(42px, 15cqw, 100px);
  line-height: 1.04;
  font-weight: 750;
  letter-spacing: 0;
  white-space: nowrap;
}
.wordmark-dot {color: var(--warm)}
.action {
  background-color: var(--control);
  color: var(--ink);
}
.action:hover {background-color: var(--control-hover)}
.nav-link.active, .mode.active {text-decoration-color: var(--warm)}
.intro p {font-size: 14px}
.journey-top {display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 10px}
.chapter {min-width: 0}
.chapter h2, .chapter select {font-size: 15px; font-weight: 600}
.chapter select {border: 0; border-radius: 0; background: #fff; max-width: 100%; padding: 4px 1.4em 4px 0}
#days {
  -webkit-appearance: none;
  appearance: none;
  min-inline-size: 80px;
  block-size: 30px;
  color: var(--accent);
  background: transparent;
  border: 0;
  outline: 0;
  box-shadow: none;
  text-decoration: none;
}
#days option {background-color: transparent}
#days:focus-visible {color: var(--ink); font-weight: 800}
.modes {background: none; gap: 16px; padding: 0; flex-wrap: nowrap; flex-shrink: 0}
.mode {padding: 5px 0}
.mode.active {text-decoration: underline; text-underline-offset: .4em}
.mode:not(.active) {background-image: none}
.entries {padding: 16px 0 52px}
#event-list {scroll-margin-block-start: 16px}
.undated-shortcut {
  position: fixed;
  z-index: 3;
  inset-inline-end: max(20px, env(safe-area-inset-right));
  inset-block-end: max(32px, env(safe-area-inset-bottom));
  display: grid;
  justify-items: center;
  padding: 4px 6px;
  color: #f0f1f1;
}
.kiwi-bird {width: 56px; fill: currentColor; overflow: visible}
.kiwi-bird path {opacity: .56}
.undated-shortcut:hover .kiwi-bird path {opacity: .76}
.undated-shortcut[data-return] .kiwi-bird path {opacity: 1}
.kiwi-label {fill: var(--deep-sea); font-size: 17px; font-weight: 700}
.kiwi-foot {transform-box: fill-box; transform-origin: center top}
.undated-shortcut.is-walking .kiwi-bird {animation: kiwi-walk .72s ease-in-out}
.undated-shortcut.is-walking .kiwi-foot {animation: kiwi-step .24s ease-in-out 3}
.undated-shortcut.is-walking .kiwi-foot-back {animation-direction: reverse}
@keyframes kiwi-walk {
  0%, 100% {transform: translate(0)}
  22% {transform: translate(-5px, -2px)}
  52% {transform: translate(-13px, 0)}
  72% {transform: translate(-19px, -2px)}
}
@keyframes kiwi-step {
  0%, 100% {transform: rotate(-17deg)}
  50% {transform: rotate(17deg) translateY(-1px)}
}
.event:has(> .chapter-background) {position: relative; isolation: isolate}
.chapter-background {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  color: #edf1f129;
  font-size: clamp(42px, 10vw, 72px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
  line-height: 1;
  text-align: end;
}
.event, .event.is-selected {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  padding: 13px 0 15px; row-gap: 4px; border: 0; background: none; border-radius: 0;
}
.record-main strong, .group-link strong {
  display: block; font-size: clamp(19px, 3vw, 22px); font-weight: 750; line-height: 1.4; color: var(--ink);
}
.record-main[aria-current="step"] strong {color: var(--accent)}
.metadata {font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--soft)}
.details {grid-column: 1 / -1; padding-top: 4px; font-size: 14px; font-weight: 400; line-height: 1.7; color: var(--soft)}
.details:has(> .entry-author) {position: relative; isolation: isolate; min-block-size: 27px}
.details > .entry-author {
  position: absolute;
  z-index: -1;
  inset: auto 6px 3px auto;
  max-inline-size: calc(100% - 12px);
  margin-block-start: 0;
  text-align: end;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #edf1f13e;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  pointer-events: none;
  user-select: none;
}
.event:has(> .entry-photos:not([hidden])) {
  --entry-photo-width: clamp(98px, 26vw, 176px);
  --entry-photo-gap: clamp(8px, 2.3vw, 16px);
  grid-template-columns: minmax(0, 1fr) auto var(--entry-photo-width);
  grid-template-rows: auto 1fr;
  column-gap: var(--entry-photo-gap);
  align-items: start;
}
.event:has(> .entry-photos:not([hidden])) > .details {grid-area: 2 / 1 / 3 / 3}
.event:has(> .entry-photos:not([hidden])) > .chapter-background {
  inset-inline-end: calc(var(--entry-photo-width) + var(--entry-photo-gap));
}
.event > .entry-photos {
  grid-area: 1 / 3 / 3 / 4;
  display: block;
  margin: 0;
}
.entry-photos > .jp-tile {display: block}
.event > .entry-photos-multi {
  position: relative;
  align-self: stretch;
  min-block-size: 0;
}
.entry-photos-rail {
  position: absolute;
  /* Align with the visible title lettering, not the line box's extra leading. */
  inset: clamp(5px, .75vw, 6px) 0 0;
}
.entry-photos-window {block-size: 100%; overflow: hidden; overflow: clip}
.entry-photos-sequence {position: relative; display: grid; gap: 8px}
.entry-photos-sequence > .jp-tile:focus-visible {outline-offset: -4px}
.entry-photos-multi[data-folded] .entry-photos-window {
  mask-image: linear-gradient(#000 calc(100% - 36px), transparent);
}
@media (max-width: 520px) {
  .event:has(> .entry-photos-multi:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
  }
  .event:has(> .entry-photos-multi:not([hidden])) > .chapter-background {inset-inline-end: 0}
  .event > .entry-photos-multi {grid-area: 3 / 1 / 4 / 3; margin-block-start: 8px}
  .entry-photos-multi .entry-photos-rail {position: static; block-size: auto}
  .entry-photos-multi .entry-photos-window {block-size: auto; overflow: visible; mask-image: none}
  .entry-photos-multi .entry-photos-sequence {grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px}
}

.quiet, .quiet:hover {border: 0; background: none; padding: 3px 0}
.group {border: 0; border-radius: 0; padding: 0 0 14px}
.group h2 {font-size: 16px; margin-bottom: 8px}
.group .group-link {border: 0; padding: 9px 0}
.author-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
}
.author-filter {padding: 5px 0; min-block-size: 36px; color: var(--soft); font-size: 13px}
.author-filter[aria-pressed="true"] {color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: .27em}
.author-summary, .author-notes .author-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 5px 12px;
}
/* Extend only the author results gutter, keeping the reading column anchored. */
.author-notes {align-self: stretch; margin-inline-end: -4px}
@media (min-width: 700px) {
  .author-notes {margin-inline-end: clamp(-76px, calc(116.667px - 16.667vw), -4px)}
}
.author-summary {margin-block-end: -1px}
.author-summary h2 {
  margin: 0;
  color: var(--soft);
  color: color-mix(in srgb, var(--soft) 62%, var(--paper));
  font-size: clamp(34px, 7vw, 50px);
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.author-notes .author-work {inline-size: 100%; margin-inline: 0; padding: 4px 0 7px}
.author-summary + .author-work {padding-block-start: 0}
.author-work-text {min-inline-size: 0; overflow-wrap: anywhere}
.author-work-info, .author-totals {
  color: var(--soft);
  justify-self: end;
  text-align: end;
  font-size: 12px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.author-work-info {display: grid; justify-items: end; gap: 1px}
.author-published {white-space: nowrap}
@media (max-width: 390px) {
  .author-summary, .author-notes .author-work {column-gap: 8px}
  .author-work-info, .author-totals {font-size: 11px}
}
#index-list {display: flex; flex-direction: column; gap: 22px}
.section-placeholder {border: 0; padding: 14px 0}
.draft {border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 8px}
.entry-modes {display: flex; gap: 20px; margin-bottom: 14px}
#material label[for="material-author"] {margin-top: 10px}
#material .dlg-foot {justify-content: flex-end}
.inbox-item {border-top: 1px solid var(--line); padding: 12px 0}
.inbox-item p {white-space: pre-wrap; overflow-wrap: anywhere}
.submission-link {align-self: center; color: var(--accent); text-decoration: none}
.submission-link:hover {text-decoration: underline}
#submission-form label:not(:first-child) {margin-top: 12px}
@media(max-width:520px) {
  main {width: calc(100% - 32px)}
  .bar-inner {width: calc(100% - 32px); min-height: 46px; gap: 0 12px; flex-wrap: wrap}
  .bar-inner:has(.header-actions) nav {order: 2; width: 100%; margin: 0; gap: 22px; min-height: 37px}
  .header-actions {margin-left: auto; min-height: 43px}
  .intro {padding: 23px 0 30px}
  .entries {padding-top: 12px}
  .event, .event.is-selected {padding: 12px 0}
}

/* Keep the shore legible beneath a dark, grainy wash. */
body {
  min-height: 100vh;
  isolation: isolate;
  background: var(--deep-sea);
}
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  z-index: -2;
  inset: -6px;
  background: url("./coast-background.png") center 52% / cover no-repeat;
  filter: blur(2.5px) saturate(.88);
}
body::after {
  z-index: -1;
  background:
    var(--background-grain) 0 0 / 144px 144px repeat,
    linear-gradient(180deg, #111a2082, #101b2061 45%, #0a1619a8 72%, #0a1418d8);
  background-blend-mode: soft-light, normal;
}
/* Keep the navigation on the same backdrop in both themes. */
.bar {
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}
.chapter select {background: transparent}
.group {background: transparent}
.more-items {background: var(--white); border-color: var(--line)}
.more > summary:hover, .more[open] > summary,
.more-items button:hover:not(:disabled) {background: var(--control)}
dialog {background: var(--white)}
dialog::backdrop {background: #081116bf}
input, select, textarea {background: #101e24; border-color: var(--line)}
input[type="file"] {border: 0; border-radius: 0}
input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 0;
  background: var(--control);
  color: var(--ink);
  padding: 4px 8px;
  margin-inline-end: 8px;
  font: inherit;
  cursor: pointer;
}
input[type="file"]:not(:disabled)::file-selector-button:hover {background: var(--control-hover)}
.error, .state {color: #f3b293}
#notice:not([hidden]) {background: #172c30; border-left-color: var(--route)}
@media (max-width: 520px) {
  body::before {background-position: 60% 50%}
}

.bar-inner {gap: 16px}
.theme-toggle {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  margin-inline-end: -10px;
  color: var(--ink);
}
.theme-toggle svg {inline-size: 20px; block-size: 20px; fill: currentColor}
.theme-toggle .theme-moon, [data-theme="day"] .theme-toggle .theme-sun {display: none}
[data-theme="day"] .theme-toggle .theme-moon {display: block}
.theme-toggle:hover {color: var(--accent)}
@media (max-width: 520px) {
  .bar-inner {gap: 0 10px}
  .bar .theme-toggle {margin-inline-start: auto; margin-inline-end: -8px}
  .bar .bar-inner nav {
    order: 2;
    width: 100%;
    min-height: 37px;
    margin-inline-start: 0;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2px 8px;
  }
}

:root[data-theme="day"] {
  color-scheme: light;
  --paper: #fff;
  --white: #fff;
  --deep-sea: #fff;
  --ink: #202524;
  --soft: #424a47;
  --line: #858e89;
  --accent: #00727b;
  --mist: #f2f4f3;
  --map-paper: #fff;
  --sea: #e5ebe8;
  --shore: #d4ded8;
  --island: #788b81;
  --route: #4b6258;
  --warm: #465e52;
  --sun: #a8b5a9;
  --control: #e2e7e4;
  --control-hover: #ced7d2;
  --day-edge-size: max(100%, 600px) auto;
}
[data-theme="day"] body {
  --day-tail-gap: clamp(36px, 6vw, 64px);
  --day-wave-height: clamp(310px, 52vh, 570px);
  position: relative;
  padding-block-end: calc(var(--day-tail-gap) + var(--day-wave-height));
  background: #fff;
}
[data-theme="day"] body::before,
[data-theme="day"] body::after {
  position: absolute;
  inset: auto 0;
  filter: blur(1.5px) saturate(.92);
  background-image: var(--background-grain), url("./coast-day.webp?v=paper-white-photo");
  background-size: 144px 144px, var(--day-edge-size);
  background-repeat: repeat, no-repeat;
  background-blend-mode: soft-light, normal;
}
[data-theme="day"] body::before {
  top: 0;
  height: clamp(155px, 26vh, 285px);
  background-position: center, right top;
  mask-image: linear-gradient(to bottom, #000 0%, #000 10%, #0009 43%, transparent 94%);
  opacity: .52;
}
[data-theme="day"] body::after {
  bottom: 0;
  height: var(--day-wave-height);
  background-position: center, center bottom;
  mask-image: linear-gradient(to top, #000 0%, #000 35%, #000b 58%, transparent 100%);
  opacity: .88;
}
[data-theme="day"] :is(.jj-map,.jj-explore) .jj-stage {background: #fff}
[data-theme="day"] :is(.jj-map,.jj-explore) .jj-scenery {opacity: .60}
[data-theme="day"] :is(.nav-link,.mode).active {
  color: var(--accent);
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}
[data-theme="day"] .jj-node-title {
  background: #fff;
  outline: 1px solid var(--line);
}
[data-theme="day"] .jj-node[aria-current="step"] .jj-node-title {
  color: #fff;
  background: var(--accent);
  outline-color: var(--accent);
}
[data-theme="day"] .jj-node[data-status="confirmed"][aria-current="step"] .jj-node-dot {
  background: var(--accent);
  border-color: #fff;
  box-shadow: 0 0 0 1px var(--accent);
}
[data-theme="day"] input, [data-theme="day"] select, [data-theme="day"] textarea {background: #fff}
[data-theme="day"] .chapter select {background: transparent}
[data-theme="day"] .chapter-background {color: #e1e6e3}
[data-theme="day"] .details > .entry-author {color: #65706a4d}
[data-theme="day"] .undated-shortcut {color: #53635b}
[data-theme="day"] .kiwi-bird path {opacity: .92}
[data-theme="day"] .jp-viewer::backdrop,
[data-theme="day"] dialog::backdrop {background: #181c1bc7}
[data-theme="day"] :is(.error,.state,.jp-alert) {color: #732d20}
[data-theme="day"] #notice:not([hidden]) {background: var(--mist)}
[data-theme="day"] :is(a,button,select):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Site notes belong outside the travel diary. */
.site-history-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 14px;
  width: 100%;
  padding: 13px 0;
  text-align: start;
  border-block: 1px solid var(--line);
}
.site-history-entry strong {font-size: 18px}
.site-history-entry > span {color: var(--accent)}
.site-history-entry small {color: var(--soft); font-size: 14px}
.site-history-entry:hover strong {text-decoration: underline; text-underline-offset: .2em}
.site-history {padding-block-end: 36px}
.history-back {margin-block-end: 15px; color: var(--accent)}
.history-intro {color: var(--soft); font-size: 14px}
.site-history ol {padding: 0; margin: 12px 0 0; list-style: none}
.site-history li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px 16px;
  padding: 17px 0;
  border-block-start: 1px solid var(--line);
}
.site-history time {font-family: var(--mono); color: var(--soft); font-size: 12px}
.site-history time span {display: block}
.site-history h2 {font: 700 17px/1.45 var(--sans); margin-block-end: 5px}
.site-history li p {color: var(--soft); font-size: 14px; line-height: 1.7}
@media (max-width: 520px) {
  .site-history li {grid-template-columns: minmax(0, 1fr); gap: 4px}
  .site-history time span {display: inline; margin-inline-start: .45em}
}
