/* The Logbook — deep-sea field, off-white land, one vermilion mark for your pin and route */
body[data-theme="logbook"] { --sea: var(--field); --land: #E9E9E2; }
.lb-intro, .lb-end { padding-top: 22px; }
.lb-by { font: 600 12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: -6px 0 14px; }
.lb-ink { font-size: 18px; max-width: 60ch; }
.lb-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; list-style: none; padding: 0; margin: 4px 0 20px; }
.lb-legend li { display: flex; align-items: center; gap: 6px; }
.lb-legend .stamp { font-size: 13px; padding: 3px 7px 3px 5px; gap: 6px; }
.lb-legend .stamp::before { width: 30px; height: 9px; }
.lb-legend b { font: 800 14px var(--font); font-stretch: 70%; color: var(--muted); }

/* pin map */
.lb-map { position: relative; margin: 0 calc(var(--gutter) * -1) 12px; background: var(--field); aspect-ratio: 600 / 360; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
@media (max-width: 480px) { .lb-map { aspect-ratio: 1 / .82; } }
.lb-map svg { width: 100%; height: 100%; cursor: crosshair; }
.lb-sphere { fill: var(--sea); }
.lb-grat { fill: none; stroke: var(--paper); stroke-width: .5; opacity: .18; vector-effect: non-scaling-stroke; }
.lb-c { fill: var(--land); stroke: var(--field); stroke-width: .7; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill .2s var(--ease-out); }
.lb-c:hover { fill: #FFFFFF; }
.lb-c.on { fill: var(--field-2); }
.lb-c.ok { fill: #F5C518; }
.lb-c.no { fill: #5E5E59; }
.lb-x { fill: #9DB3BA; stroke: var(--field); stroke-width: .5; vector-effect: non-scaling-stroke; }
.lb-pin { pointer-events: none; }
.lb-pin:not([hidden]) { animation: punch .45s var(--ease-back) both; transform-box: fill-box; transform-origin: 50% 100%; }
.lb-sel { position: absolute; right: 8px; top: 8px; padding: 7px 10px; background: var(--ground); color: var(--paper); font: 750 13px var(--font); letter-spacing: .04em; text-transform: uppercase; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-zoom { position: absolute; left: 8px; bottom: 8px; display: grid; gap: 4px; }
.lb-zoom button { width: 44px; height: 44px; border: 0; background: var(--ground); color: var(--paper); font: 700 24px/1 var(--font); cursor: pointer; }
.lb-zoom button:hover { background: var(--ground-3); }

/* search */
.lb-search { position: relative; margin: 0 0 6px; }
.lb-search input { width: 100%; min-height: 52px; padding: 8px 14px; border: 1.5px solid var(--line-strong); border-radius: 0; background: var(--ground-2); color: var(--paper); font: 600 17px var(--font); }
.lb-search input::placeholder { color: #8C8C85; }
.lb-search input:focus { outline: none; border-color: var(--field-2); }
.lb-sug { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; list-style: none; margin: 0; padding: 0; background: var(--ground-2); border: 1.5px solid var(--line-strong); border-top: 0; }
.lb-sug button { display: block; width: 100%; text-align: left; min-height: 44px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--paper); font: 600 16px var(--font); cursor: pointer; }
.lb-sug button:hover, .lb-sug button:focus-visible { background: var(--ground-3); }

/* voyage chart */
.lb-voyage { background: var(--sea); }
.lb-sea { fill: var(--sea); }
.lb-land { fill: var(--land); opacity: .9; }
.lb-stop { fill: var(--field); stroke: var(--paper); stroke-width: 2.5; }
.lb-voyage .j-reg.reached .lb-stop { fill: var(--field-2); stroke: var(--field-2); }
.lb-voyage .j-seg { stroke: var(--field-2); stroke-width: 4.5; }
.lb-voyage .j-route { stroke: var(--ink); stroke-width: 1.5; opacity: .5; }
.lb-voyage .j-label { font-size: 13px; fill: var(--ink); opacity: 1; paint-order: stroke; stroke: var(--land); stroke-width: 4px; }
