:root { color-scheme: light; font-family: Georgia, 'Times New Roman', serif; color: #263c34; background: #f5f2e9; }
* { box-sizing: border-box; }
body { margin: 0; }
header, main, footer { width: min(900px, 100%); margin-inline: auto; padding-inline: 16px; }
header { padding-block: 64px 40px; }
.eyebrow { font: 11px/1.5 system-ui, sans-serif; letter-spacing: .18em; color: #8c6c45; margin: 0 0 18px; }
h1 { font-weight: normal; font-size: clamp(42px, 7vw, 70px); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 20px; }
.introduction { font-size: 19px; line-height: 1.6; margin: 0 0 12px; }
.note { font: 13px/1.7 system-ui, sans-serif; color: #6e746c; max-width: 630px; margin: 0; }
.log-page { border-top: 1px solid #d7d7ca; padding-top: 24px; margin-bottom: 64px; scroll-margin-top: 24px; }
h2 { font: 12px/1.5 system-ui, sans-serif; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: #6e746c; margin: 0 0 18px; }
.photograph { display: block; outline-offset: 6px; }
.photograph img { display: block; width: 100%; height: auto; background: #eae5d8; }
.transcription { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 18px; line-height: 1.8; margin: 26px auto 0; max-width: 760px; color: #303d35; }
.blank-page { font: italic 16px/1.7 Georgia, serif; color: #74796d; margin: 0; }
footer { border-top: 1px solid #d7d7ca; padding-block: 30px 44px; font: 12px/1.6 system-ui, sans-serif; color: #74796d; }
@media (max-width: 600px) { header { padding-top: 38px; padding-bottom: 30px; }.introduction { font-size: 17px; }.transcription { font-size: 17px; line-height: 1.75; margin-top: 22px; }.log-page { margin-bottom: 42px; } }
@media print { header { padding-top: 0; }.log-page { break-before: page; }img { max-height: 80vh; object-fit: contain; } }

/* A small reading aid, rather than another application interface. */
.page-tools { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; width: min(900px, 100%); margin: 0 auto 26px; padding: 12px 16px; background: #f5f2e9; border-block: 1px solid #d7d7ca; font: 13px/1.4 system-ui, sans-serif; }
.page-tools select { min-height: 40px; max-width: 165px; padding: 6px 10px; border: 1px solid #bfc5b8; border-radius: 4px; color: #263c34; background: #faf8f1; font: inherit; }
.page-total { margin-left: auto; color: #6e746c; font-size: 12px; }
.log-page { scroll-margin-top: 85px; }
.transcription { max-width: 660px; white-space: normal; }
.passage { white-space: pre-wrap; margin: 0 0 1.4em; }
.passage:last-child { margin-bottom: 0; }
.uncertain { color: inherit; background: #e9ddbd; border-radius: 2px; padding: .05em .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.back-to-top { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); right: 18px; z-index: 3; padding: 12px 15px; border: 1px solid #c7ccbf; border-radius: 24px; background: #f5f2e9f5; color: #263c34; font: 13px/1.4 system-ui, sans-serif; text-decoration: none; box-shadow: 0 2px 12px #0000000d; }
.viewer-open { overflow: hidden; }
#photo-viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #19251f; color: #f7f5ed; overflow: hidden; }
#photo-viewer::backdrop { background: #19251f; }
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: max(12px, env(safe-area-inset-top)) 16px 8px; font-family: system-ui, sans-serif; }
.viewer-toolbar h2 { color: #f7f5ed; margin: 0; white-space: nowrap; }
.viewer-toolbar button { min-height: 44px; min-width: 44px; border: 1px solid #f7f5ed40; border-radius: 4px; background: transparent; color: inherit; font: 14px system-ui, sans-serif; cursor: pointer; }
.viewer-toolbar button:disabled { opacity: .35; cursor: default; }
.viewer-toolbar button:focus-visible, #viewer-viewport:focus-visible { outline: 2px solid #edc683; outline-offset: 3px; }
.viewer-controls { display: flex; align-items: center; gap: 6px; }
#zoom-level { width: 48px; text-align: center; font: 12px system-ui, sans-serif; }
#viewer-close { padding-inline: 14px; }
.viewer-hint { margin: 0; padding: 0 16px 12px; color: #c3cabe; font: 12px/1.5 system-ui, sans-serif; }
#viewer-viewport { position: relative; width: 100%; height: calc(100dvh - 102px); overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
#viewer-image { display: block; height: auto; margin: 16px auto; max-width: none; }
#viewer-viewport.zoomed { cursor: grab; }
#viewer-viewport.dragging { cursor: grabbing; }
@media (max-width: 480px) { .page-tools { gap: 8px; }.page-total { font-size: 11px; }.viewer-toolbar { gap: 8px; flex-wrap: wrap; }.viewer-toolbar h2 { flex: 1; }.viewer-controls { order: 3; width: 100%; justify-content: center; }.viewer-hint { font-size: 11px; }#viewer-viewport { height: calc(100dvh - 154px); }.back-to-top { bottom: 12px; right: 12px; } }
@media print { .page-tools, .back-to-top, #photo-viewer { display: none !important; }.uncertain { background: transparent; text-decoration: underline dotted; } }
.viewer-page-navigation { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 2px 16px 10px; font: 13px system-ui, sans-serif; }
.viewer-page-navigation button { min-height: 44px; min-width: 108px; padding: 8px 14px; border: 1px solid #f7f5ed40; border-radius: 4px; background: transparent; color: #f7f5ed; font: inherit; cursor: pointer; }
.viewer-page-navigation button:disabled { opacity: .35; cursor: default; }
.viewer-page-navigation button:focus-visible { outline: 2px solid #edc683; outline-offset: 3px; }
#viewer-position { min-width: 64px; text-align: center; color: #c3cabe; }
#viewer-viewport { height: calc(100dvh - 158px); }
@media (max-width: 480px) { #viewer-viewport { height: calc(100dvh - 210px); }.viewer-page-navigation { gap: 12px; } }
#photo-viewer[open] { display: flex; flex-direction: column; }
.viewer-toolbar, .viewer-page-navigation, .viewer-hint { flex-shrink: 0; }
#photo-viewer #viewer-viewport { flex: 1; min-height: 0; height: auto; }
.page-context { scroll-margin-top: 90px; max-width: 760px; margin: 34px auto 0; border-top: 1px solid #d7d7ca; padding-top: 22px; }
.page-context h3 { margin: 0 0 20px; font: normal 25px/1.3 Georgia, serif; }
.page-context h4 { margin: 0 0 10px; font: normal 20px/1.4 Georgia, serif; }
.page-context h5 { margin: 16px 0 8px; font: 500 13px/1.5 system-ui, sans-serif; }
.context-note { font: 12px/1.7 system-ui, sans-serif; color: #70766a; }
.context-note a { color: #426258; text-underline-offset: 3px; }
.dated-context { scroll-margin-top: 90px; padding-block: 22px; border-top: 1px solid #dedfd3; margin-top: 22px; }
.date-basis { margin: 0; }.weather-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 18px 0 12px; font-family: system-ui, sans-serif; }
.weather-facts dt { color: #70766a; font-size: 11px; margin-bottom: 6px; }.weather-facts dd { margin: 0; font-size: 15px; line-height: 1.5; }
.weekly-songs { border-top: 1px solid #dedfd3; margin-top: 20px; padding-top: 16px; }.weekly-songs summary { cursor: pointer; color: #426258; font: 13px/1.7 system-ui, sans-serif; }.weekly-songs ol { margin: 16px 0; padding-left: 26px; columns: 2; column-gap: 32px; }.weekly-songs li { padding: 0 0 12px 5px; break-inside: avoid; font-size: 15px; line-height: 1.5; }.song-artist { display: block; color: #70766a; font: 12px/1.5 system-ui,sans-serif; }.weekly-songs li::marker { color: #8c6c45; font: 12px system-ui,sans-serif; }
@media(max-width:600px){.weather-facts {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}.weekly-songs ol {columns:1;}.page-context h3 {font-size:23px;}}
@media print {.weekly-songs>*,.weekly-songs:not([open])>* {display:block;}}

/* Keep the original and its reading together on wide screens. */
.historical-weather { margin-top: 14px; font-family: system-ui, sans-serif; }
.historical-weather summary { cursor: pointer; color: #426258; font: 13px/1.7 system-ui, sans-serif; }
.historical-weather[open] { padding-bottom: 8px; }
.historical-weather summary:focus-visible,.weekly-songs summary:focus-visible { outline: 2px solid #8c6c45; outline-offset: 4px; }
.dated-context { padding-block: 16px; margin-top: 16px; }
.weekly-songs { border-top: 0; margin-top: 8px; padding-top: 0; }
@media(min-width:1100px){
 main { width: min(1440px,100%); padding-inline: 32px; }
 .page-tools { width: min(1440px,100%); padding-inline:32px; }
 .log-page { display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,1fr); column-gap:44px; align-items:start; }
 .log-page>h2 { grid-column:1/-1; }
 .log-page>.photograph { grid-column:1; grid-row:2/span 2; position:sticky; top:90px; }
 .photograph img { max-height:calc(100vh - 125px); object-fit:contain; }
 .log-page>.transcription { grid-column:2; grid-row:2; width:100%; margin:0; font-size:18px; }
 .log-page>.page-context { grid-column:2; grid-row:3; width:100%; }
 .weather-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px){
 .page-tools { gap:8px; }
 .page-tools label { font-size:12px; }
 .page-tools select { max-width:135px; min-width:0; padding-inline:7px; }
 .page-total { display:none; }
}
@media print { .historical-weather>* { display:block; } }

/* Each transcription and its historical context form one reading unit. */
.log-entry { border:0; border-top:1px solid #d7d7ca; margin-top:30px; padding:26px 0 0; }
.log-entry:first-child { border-top:0; margin-top:0; padding-top:0; }
.entry-heading { width:auto; padding:0; margin:0 0 18px; }
.entry-heading h3 { margin:0 0 4px; font:normal 24px/1.35 Georgia,serif; letter-spacing:-.015em; }
.entry-home-port { display:inline-block; margin:0 0 6px; color:#8c6c45; font:12px/1.5 system-ui,sans-serif; }
.entry-heading .date-basis { font-size:11px; }
.entry-text .passage:last-child { margin-bottom:0; }
.entry-context { margin:18px 0 0; padding:10px 14px; border-left:2px solid #c4ccb9; background:#e9ece240; }
.entry-context .historical-weather { margin-top:0; }
.entry-context .weekly-songs { margin-top:6px; }
.entry-context summary { font-size:12px; }
.transcription[id] { scroll-margin-top:90px; }
@media print { .entry-context {background:none;} }

.hawaiian-name { margin: -2px 0 28px; color: #426258; font: italic 26px/1.4 Georgia, serif; }
.journey { margin: 0 0 22px; color: #6e746c; font: 14px/1.7 system-ui, sans-serif; }
@media(max-width:600px){.hawaiian-name {font-size:23px;margin-bottom:22px;}.journey {font-size:13px;}}


/* One original drawing fills the opening banner; the title rests over the paper. */
body>header { width:100%; padding:0; margin:0; }
.journal-banner { position:relative; isolation:isolate; width:100%; height:clamp(280px,32vw,480px); overflow:hidden; background:#dddcd0; }
.banner-art { position:absolute; inset:0; width:100%; height:100%; mix-blend-mode:multiply; }
.banner-title { position:relative; z-index:1; display:flex; flex-direction:column; justify-content:center; width:100%; height:100%; padding:36px max(24px,calc((100vw - 1120px)/2)); background:linear-gradient(90deg,#f5f2e9ee 0%,#f5f2e9c4 30%,#f5f2e91a 75%); }
.banner-title .eyebrow { margin-bottom:16px; }
.banner-title h1 { font-size:clamp(48px,7.5vw,104px); margin-bottom:12px; }
.banner-title .hawaiian-name { margin:0; font-size:clamp(24px,3vw,36px); }
.opening-story { width:min(900px,100%); margin:auto; padding:28px 16px 30px; }
.opening-story .journey { margin-bottom:16px; }
@media(max-width:600px){
 .journal-banner {height:300px;}
 .banner-art {width:100%;left:0;}
 .banner-title {padding:28px 20px;background:linear-gradient(90deg,#f5f2e9db,#f5f2e970 70%,#f5f2e92b);}
 .banner-title .eyebrow {font-size:10px;letter-spacing:.14em;}
 .opening-story {padding-block:24px;}
}

.entry-clarification {font:14px/1.7 system-ui,sans-serif;color:#526354;padding:10px 14px;border-left:2px solid #b8c4aa;background:#e9ece240;}
