/* swcp.app: brand tokens and shared components (see requirements/10-user-interface/01-layout.md). */
:root {
    --forest: #1d3b2f;
    --gorse: #dc960f;
    --paper: #efeadb;
    --sand: #e1dbc4;
    --rule: #cec6aa;
    --muted: #56635a;
    --warning: #8a5200;
    --highlight: #f2db9c;
    /* On paper: secondary text. */
    --ink-soft: #34463c;
    /* On forest: body text, and quieter text (captions, the footer). */
    --on-dark: #dbe2d6;
    --on-dark-muted: #c9d3c4;
    /* The footer, a shade darker than forest. */
    --forest-deep: #16302a;
    /* A panel on forest. */
    --forest-well: #2b4a3d;
    /* A partly walked bar in a path strip (the home page's and the overview's). */
    --gorse-light: #efcd7e;
    /* Long text being written (the diary box) and a picked card. */
    --pale: #f8f5ea;
    /* The dashes round an empty photo box. */
    --dash: #8b8468;
    --radius: 14px;
    --heading: 'Barlow Condensed', system-ui, sans-serif;
    --body: Barlow, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--forest); font-family: var(--body); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--warning); text-underline-offset: 3px; }
a:hover { color: var(--forest); }
::selection { background: var(--highlight); }
input, select, textarea, button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--heading); text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; }
h2 { font-size: 30px; font-weight: 700; }
/* An app page's title. */
.app-body h1 { font-size: clamp(48px, 6vw, 80px); line-height: 1; letter-spacing: -.02em; margin-bottom: 32px; }
.app-body.admin h1 { font-size: clamp(36px, 5vw, 56px); overflow-wrap: anywhere; }
/* A small label or eyebrow above a figure or a field. */
.label, .stat .label, .odds dt, .preview dt, .admin-facts dt { font-family: var(--heading); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* The content: at most 1240 px wide, with a gutter that grows with the window. */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.narrow { max-width: 480px; margin: 0 auto; padding: 40px 16px 64px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--forest); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--forest); text-decoration: none; font-family: var(--heading); font-weight: 800; font-size: 26px; }
.logo-mark { flex: none; }
/* The logo on forest: a paper wordmark. */
.on-dark .logo { color: var(--paper); }
/* The public pages' dark header and footer. The home page is wider, and
   its forest hero carries straight on from the header. */
.public-header { background: var(--forest); color: var(--paper); border-bottom: 4px solid var(--gorse); }
.public-header .wrap { gap: 12px 20px; min-height: 0; padding-top: 14px; padding-bottom: 14px; justify-content: flex-start; }
.public-header .logo { margin-right: auto; }
.public-link { color: var(--paper); font-size: 15px; padding: 8px 0; }
.on-dark a.public-link:hover, .public-footer a:hover { color: var(--gorse); }
.public-footer { background: var(--forest-deep); color: var(--on-dark-muted); font-size: 14px; margin-top: 64px; }
.public-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding-top: 28px; padding-bottom: 28px; }
.public-footer .logo { gap: 8px; font-size: 20px; }
.public-footer .logo-mark { width: 32px; height: 16px; }
.public-footer p { margin: 0; flex: 1 1 320px; line-height: 1.5; }
.public-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.public-footer a { color: var(--paper); }
/* The dark footer reaches the bottom of the window on a short page. */
body:has(> .public-footer) { display: flex; flex-direction: column; min-height: 100vh; }
body:has(> .public-footer) > main { flex: 1 0 auto; }
body:has(.home) .public-header { border-bottom: 0; }
body:has(.home) .public-footer { margin-top: 0; }
.on-dark a:focus-visible, .home-dark a:focus-visible { outline: 3px solid var(--gorse); outline-offset: 3px; border-radius: 4px; }
.on-dark a.pill:focus-visible, .home-dark a.pill:focus-visible { outline-color: var(--paper); border-radius: 999px; }
/* A gorse pill: the public pages' main action. */
.pill { display: inline-flex; align-items: center; justify-content: center; background: var(--gorse); color: var(--forest); text-decoration: none; border-radius: 999px; padding: 10px 20px; font-size: 15px; font-weight: 600; line-height: 1.2; }
.pill:hover { background: var(--paper); color: var(--forest); }
.pill-large { padding: 15px 28px; font-size: 17px; }
.site-footer { border-top: 1px solid var(--rule); margin-top: 64px; padding: 24px 0 40px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 16px; }
/* On a phone, the header's and footer's text links can be tapped anywhere
   in 44 × 44 px around them, without moving anything; where the links
   wrap (the admin header), the rows are far enough apart that those areas
   don't overlap. */
@media (max-width: 700px) {
    .site-footer nav a { display: inline-block; padding: 11px 4px; margin: -11px -4px; }
    .public-link, .public-footer nav a { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
    .public-footer nav { row-gap: 24px; }
    .pill { min-height: 44px; }
}

/* Buttons: pills in Barlow, in sentence case. A main action is forest, a
   secondary one outlined, and Log a walk gorse. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 22px; border: 1px solid var(--forest); border-radius: 999px; background: transparent; color: var(--forest); font-family: var(--body); font-weight: 500; font-size: 15px; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--forest); color: var(--paper); }
.button:focus-visible, .chip:focus-visible, .chip:has(input:focus-visible) { outline: 3px solid var(--gorse); outline-offset: 2px; }
.button-primary, .button-dark { background: var(--forest); color: var(--paper); }
.button-primary:hover, .button-dark:hover { background: var(--gorse); border-color: var(--gorse); color: var(--forest); }
.button-gorse { background: var(--gorse); border-color: var(--gorse); color: var(--forest); font-weight: 600; }
.button-gorse:hover { background: #c98608; border-color: #c98608; color: var(--forest); }
.on-dark .button-gorse:hover { background: var(--paper); border-color: var(--paper); }

/* Panels, forms and messages */
/* A sand panel: a note or a summary that stands out from the page. */
.panel { background: var(--sand); padding: 18px 20px; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
/* The pages are open: each section has a forest rule under its heading,
   and pairs of sections sit side by side where there's room. */
.section { margin: 0 0 56px; }
.section > h2 { padding-bottom: 10px; border-bottom: 1px solid var(--forest); margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 0 48px; align-items: start; }
.grid-2 > .section { min-width: 0; }
.admin .section { margin-top: 40px; }
.muted { color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--forest); }
/* Fields: a small label above a line to write on; lists and long text in a
   white box. */
.field { margin-bottom: 22px; }
.field label, fieldset.field legend { display: block; margin-bottom: 6px; padding: 0; font-family: var(--heading); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input { width: 100%; padding: 8px 0; border: 0; border-bottom: 1.5px solid var(--forest); border-radius: 0; background: transparent; font-size: 18px; }
.field input:focus { outline: none; border-bottom-color: var(--gorse); box-shadow: 0 1.5px 0 var(--gorse); }
.field select, .field textarea, .field input[type=date] { width: 100%; min-height: 44px; padding: 10px; border: 1px solid var(--forest); border-radius: 0; background: #fff; font-size: 15px; }
.field textarea { background: var(--pale); }
.field input[type=date] { max-width: 220px; }
.field select:focus, .field textarea:focus, .field input[type=date]:focus { outline: 2px solid var(--gorse); outline-offset: 0; box-shadow: none; }
.field input[type=file] { min-height: 44px; padding: 8px 0; border: 0; font-size: 15px; }
.field .help { margin-top: 6px; font-size: 13px; color: var(--muted); }
.field ul { list-style: none; margin: 6px 0 0; padding: 0; color: var(--warning); font-size: 14px; font-weight: 500; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }
.message { border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; }
.message-notice { background: #dfe8d6; }
.message-warning, .message-error { background: #f6e3bd; color: var(--warning); }
/* A banner under the header, on sand. */
.banner { background: var(--sand); color: var(--forest); border-bottom: 1px solid var(--rule); }
.banner .wrap { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.links { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; }

/* App shell (see requirements/10-user-interface/02-app-shell.md): the app's and the
   admin pages' header is sticky forest with a 4 px gorse rule, the logo's
   dark variant and underlined tabs. */
html:has(.shell-header) { scroll-padding-top: 80px; }
.shell-header { position: sticky; top: 0; z-index: 20; background: var(--forest); color: var(--paper); border-bottom: 4px solid var(--gorse); }
.shell-header .wrap { gap: 0 clamp(14px, 3vw, 32px); min-height: 60px; }
.shell-header .logo { gap: 8px; }
.logo-suffix { font-family: var(--heading); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 0 28px; margin-right: auto; }
.tabs a { display: block; min-width: 44px; text-align: center; padding: 19px 0 17px; border-bottom: 2px solid transparent; font-family: var(--heading); font-weight: 600; font-size: 17px; line-height: 22px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--paper); }
.tabs a[aria-current="page"] { border-bottom-color: var(--gorse); }
.on-dark .tabs a:hover { color: var(--gorse); }
.units-toggle { display: flex; }
.units-toggle button { display: flex; align-items: center; border: 0; background: none; padding: 0; cursor: pointer; }
.units-track { display: inline-flex; border: 1px solid var(--paper); border-radius: 999px; overflow: hidden; font-family: var(--heading); font-weight: 600; font-size: 12px; line-height: 1.2; }
.units-track span { padding: 5px 10px; }
.units-track .on { background: var(--paper); color: var(--forest); }
.units-toggle button:hover span:not(.on) { color: var(--gorse); }
.shell-header .log-walk { min-height: 40px; padding: 0 20px; }
.account-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-family: var(--heading); font-weight: 600; font-size: 14px; }
.on-dark .account-nav a { color: var(--on-dark-muted); }
.account-name { color: var(--paper); }
.on-dark .account-nav a[aria-current="page"], .on-dark .account-nav a:hover { color: var(--gorse); }
.on-dark button:focus-visible { outline: 3px solid var(--gorse); outline-offset: 3px; }
.app-body { padding-top: clamp(24px, 5vw, 44px); }

/* On a phone the app's header is compact (the logo, the units, Admin and
   Settings), and its tabs and "Log a walk" move to a bar fixed at the
   bottom; Sign out is on the Settings page. */
.tab-bar { display: none; }
@media (max-width: 719.98px) {
    .app-header .tabs, .app-header .log-walk, .app-header .sign-out, .app-header .account-name { display: none; }
    .shell-header .wrap { gap: 0 16px; min-height: 56px; }
    .app-header .units-toggle { margin-left: auto; }
    .units-toggle button { min-height: 44px; }
    .account-nav a { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
    .admin-header { position: static; }
    .admin-header .wrap { padding-top: 8px; padding-bottom: 8px; }
    .admin-header .account-nav { padding: 6px 0 8px; }
    .admin-header .tabs { gap: 0 20px; }
    .admin-header .tabs a { padding: 12px 0 10px; }

    .tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--forest); border-top: 4px solid var(--gorse); }
    .tab-bar a { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-family: var(--heading); font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; color: var(--paper); }
    .tab-bar a::after { content: ''; width: 22px; height: 3px; border-radius: 2px; }
    .tab-bar a[aria-current="page"] { color: var(--gorse); }
    .tab-bar a[aria-current="page"]::after { background: var(--gorse); }
    .tab-bar a:focus-visible { outline: 3px solid var(--gorse); outline-offset: -3px; border-radius: 8px; }
    .tab-bar .tab-bar-log { justify-self: center; flex-direction: row; gap: 4px; min-height: 46px; padding: 0 18px; border-radius: 999px; background: var(--gorse); color: var(--forest); font-weight: 800; font-size: 17px; letter-spacing: .04em; }
    .tab-bar .tab-bar-log::after { content: none; }
    .tab-bar .tab-bar-log:focus-visible { outline-color: var(--paper); border-radius: 999px; }
    /* Room for the bar at the bottom of the page. */
    body:has(> .tab-bar) { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
    /* While typing, the keyboard needs the room more than the bar does. */
    body:has(:is(input:not([type=checkbox], [type=radio], [type=file], [type=hidden]), textarea, select):focus) .tab-bar { display: none; }
}

/* Chips: pills to pick from, with no tick boxes showing. A picked one is
   forest with a tick, so it isn't shown by colour alone; the tick box is
   still there for keyboards and screen readers. */
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; margin: 0 6px 6px 0; padding: 6px 13px; border: 1px solid var(--forest); border-radius: 999px; background: transparent; color: var(--forest); font-family: var(--body); font-weight: 400; font-size: 14px; line-height: 1.2; letter-spacing: normal; text-transform: none; text-decoration: none; cursor: pointer; }
.chip:hover { background: var(--sand); color: var(--forest); }
.chip input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.chip:has(input:checked), .chip.on, .chip.on:hover { background: var(--forest); color: var(--paper); }
.chip:has(input:checked)::before { content: '\2713' / ''; }
.field label.chip { display: inline-flex; margin: 0 6px 6px 0; padding: 6px 13px; color: var(--forest); font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: normal; text-transform: none; }
.field label.chip:has(input:checked) { color: var(--paper); }
.field .chip input { width: 1px; }
/* Lately: ruled rows, the date beside the walk. */
.walk-list { list-style: none; padding: 0; margin: -16px 0 0; }
.walk-list li { border-bottom: 1px solid var(--rule); }
.walk-list a { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 16px; padding: 16px 0; color: var(--forest); text-decoration: none; }
.walk-list a:hover { background: var(--sand); }
.walk-list .walk-date { grid-row: span 2; padding-top: 4px; letter-spacing: 0; }
.walk-list strong { font-family: var(--heading); font-weight: 700; font-size: 21px; line-height: 1.2; }
.walk-list .muted { grid-column: 2; font-size: 14px; }
.walk-date { font-family: var(--heading); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Stats */
.bar { display: block; height: 10px; background: var(--rule); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gorse); }
.walked-bar { position: relative; }
/* Each walked stretch at its place, at least 2px wide and never past Poole. */
.walked-bar span { position: absolute; top: 0; left: min(var(--left), calc(100% - 2px)); width: var(--width); min-width: 2px; }
/* Ruled rows: by area, walked with, year by year. */
.rows, .years { list-style: none; padding: 0; margin: -16px 0 0; }
.years { margin: 0; }
.rows li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.years li { padding: 12px 0; border-top: 1px solid var(--rule); }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: baseline; }
.rows .name { font-size: 15px; font-weight: 500; }
.rows .figures { font-family: var(--heading); font-weight: 600; font-size: 13px; color: var(--muted); }
.rows .bar { grid-column: 1 / -1; height: 4px; border-radius: 0; background: var(--sand); }

/* Stats (phase 2): a ruled headline of four cells (two by two on a
   phone), the sections in two columns, compact year by year, walked with
   on forest bars, and odds and ends as a ruled grid. */
.headline { margin-bottom: 64px; }
.headline-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--forest); border-bottom: 1px solid var(--forest); }
.stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 24px; border-left: 1px solid var(--rule); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat strong { font-family: var(--heading); font-weight: 700; font-size: clamp(40px, 5vw, 56px); line-height: 1; white-space: nowrap; }
.stat strong small { font-size: .5em; }
.stat strong.italic { font-style: italic; }
.stat .sub { color: var(--muted); font-size: 14px; line-height: 1.4; }
.headline .walked-bar { margin-top: 20px; height: 8px; border-radius: 0; background: var(--sand); }
@media (max-width: 719.98px) {
    .headline-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat { padding: 16px; }
    .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
.stats-grid { column-gap: 56px; }
.stats-grid > .section { margin-bottom: 64px; }
.years li { display: grid; grid-template-columns: 40px minmax(0, 1fr) 64px; gap: 10px; align-items: center; }
.years .year { font-family: var(--heading); font-weight: 600; font-size: 13px; }
.years .figures { display: flex; flex-direction: column; text-align: right; font-family: var(--heading); font-weight: 600; font-size: 12px; line-height: 1.3; }
.years .figures span + span { color: var(--muted); }
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.month { height: 26px; display: flex; align-items: center; justify-content: center; font-family: var(--heading); font-weight: 600; font-size: 10px; border: 1px solid var(--rule); }
.month.light { background: var(--highlight); }
.month.full { background: var(--gorse); }
.year-finish { margin: 0 0 16px; font-family: var(--heading); font-weight: 700; font-size: 20px; line-height: 1.2; }
.year-caption { margin: 12px 0 0; font-family: var(--heading); font-weight: 600; font-size: 12px; line-height: 1.4; color: var(--muted); }
.walked-with li { grid-template-columns: minmax(0, 1fr) auto auto; }
.walked-with .name { font-family: var(--heading); font-weight: 700; font-size: 20px; line-height: 1.2; }
.walked-with .walks { font-size: 13px; color: var(--muted); }
.walked-with .figures { color: var(--forest); text-align: right; }
.walked-with .bar { background: none; }
.walked-with .bar span { background: var(--forest); }
.odds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: -16px 0 0; }
.odds > div { display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 20px 0; border-bottom: 1px solid var(--rule); }
.odds dd { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.odds dd strong { font-family: var(--heading); font-weight: 700; font-size: 22px; line-height: 1.2; }
.odds dd span { font-size: 14px; color: var(--muted); }

/* Overview (phase 2): see requirements/10-user-interface/04-overview.md and the
   design's ?view=overview. The strip and the map are shared with the public
   logbook. */
/* The public logbook's headline. */
.app-body .overview-headline h1 { font-size: clamp(52px, 7vw, 96px); line-height: .95; letter-spacing: -.02em; margin-bottom: 22px; }
/* The hero: greeting, headline and sentence, with the photo beside them
   (under them on a phone). */
.overview-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 48px; align-items: end; margin-bottom: 64px; }
.overview-hero-text { display: flex; flex-direction: column; gap: 22px; }
.overview-hero-text > p { margin: 0; }
.overview-greeting { font-family: var(--heading); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.app-body .overview-hero h1 { margin: 0; font-size: clamp(52px, 7vw, 96px); line-height: .95; letter-spacing: -.02em; }
.overview-hero h1 em { display: block; color: var(--muted); }
.lede { max-width: 34em; font-size: 21px; line-height: 1.45; text-wrap: pretty; }
.overview-hero .hero { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hero-frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); border: 1px solid var(--forest); }
.hero-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.overview-hero .hero figcaption { margin: 0; font-family: var(--heading); font-weight: 600; font-size: 12px; color: var(--muted); }
.overview-hero .hero-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: auto; padding: 16px; border-radius: 0; border: 1px solid var(--forest); outline: 1px dashed var(--dash); outline-offset: -10px; font-size: 13px; text-align: center; color: var(--muted); }
/* A section's heading with something on the right: help text, a button or
   a link. Lately's has the forest rule under it. */
.ov-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 14px; }
.ov-head h2 { margin: 0; }
.ov-head.ruled { margin-bottom: 0; padding-bottom: 10px; border-bottom: 1px solid var(--forest); }
.ov-head > a:not(.button) { font-size: 14px; }
.ov-head .button { align-self: center; min-height: 38px; padding: 0 16px; font-size: 14px; }
/* The path, unrolled. */
.strip { margin-bottom: 64px; container-type: inline-size; }
.strip-help, .strip-ends { margin: 0; font-family: var(--heading); font-weight: 600; font-size: 12px; }
.strip-help { color: var(--muted); }
.strip-ends { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.strip-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; margin-bottom: 14px; border-bottom: 1px solid var(--forest); }
.strip-bar { flex: 1 1 0; background: var(--rule); }
.strip-bar.walked { background: var(--gorse); }
.strip-bar.partly { background: var(--gorse-light); }
.strip .walked-bar { height: 10px; border-radius: 0; background: var(--sand); }
/* Each marker: a pin (yellow once reached), a line down to its row, and its
   name, which runs right from the line, or left for the last three. */
.strip-markers { position: relative; height: 80px; margin: 14px 0; padding: 0; list-style: none; }
.strip-marker { --tick: 6px; position: absolute; top: 0; padding-top: calc(9px + var(--tick)); transform: translateX(-5px); white-space: nowrap; font-family: var(--heading); font-weight: 600; font-size: 11px; line-height: 1.2; }
.strip-marker.row-1 { --tick: 24px; }
.strip-marker.row-2 { --tick: 42px; }
.strip-marker::before { content: ''; position: absolute; top: 0; left: 0; box-sizing: border-box; width: 9px; height: 9px; border: 1.5px solid var(--forest); border-radius: 50%; background: var(--paper); }
.strip-marker.reached::before { background: var(--gorse); }
.strip-marker::after { content: ''; position: absolute; top: 9px; left: 4px; width: 1px; height: calc(var(--tick) - 2px); background: var(--forest); }
.strip-marker.name-on-left { transform: translateX(calc(-100% + 5px)); text-align: right; }
.strip-marker.name-on-left::before { left: auto; right: 0; }
.strip-marker.name-on-left::after { left: auto; right: 4px; }
/* Each region boxed under its stretch, its name over the percentage. A
   name wraps rather than being cut short, and a box is never narrower than
   its longest word (flex items keep their content's minimum width), so a
   narrow one like Exmoor borrows a few pixels from its neighbours. */
.strip-regions { display: flex; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.strip-region { box-sizing: border-box; padding: 10px 6px 0; border-left: 1px solid var(--rule); font-size: 13px; font-weight: 500; line-height: 1.25; }
.strip-region strong { display: block; margin-top: 3px; font-family: var(--heading); font-weight: 600; font-size: 11px; color: var(--muted); }
@container (max-width: 820px) {
    .strip-region { padding: 8px 3px 0; font-family: var(--heading); font-weight: 600; font-size: 12px; }
}
@media (max-width: 700px) {
    .strip-markers, .strip-regions { display: none; }
    .strip-bars { gap: 1px; }
}
/* The map, with its key over the bottom left corner. */
.overview-lower { row-gap: 56px; }
.overview-lower > .section { margin-bottom: 0; }
.map-frame { position: relative; }
.map-frame .map { height: 520px; }
.route-key { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: grid; gap: 2px; margin: 0; padding: 8px 10px; list-style: none; background: var(--paper); border: 1px solid var(--forest); border-radius: 6px; font-family: var(--heading); font-weight: 600; font-size: 13px; line-height: 1.4; }
.route-key i { display: inline-block; width: 18px; margin-right: 8px; vertical-align: middle; }
.route-key .key-walked { border-top: 4px solid var(--gorse); }
.route-key .key-to-walk { border-top: 2px dashed var(--forest); }
.map-caption { margin: 12px 0 0; font-family: var(--heading); font-weight: 600; font-size: 11px; color: var(--muted); }
@media (max-width: 700px) {
    .map-frame .map { height: 380px; }
    .ov-head .button { min-height: 44px; }
    /* "The full diary" can be tapped anywhere in 44 px around it. */
    .ov-head > a:not(.button) { display: inline-block; padding: 12px 0; margin: -12px 0; }
}
/* Lately: the date in sentence case beside the walk. */
.walk-list { margin: 0; }
.walk-list .walk-date { text-transform: none; letter-spacing: 0; }
.lately-empty { margin: 16px 0 0; }
.map { height: 420px; border: 1px solid var(--forest); background: var(--sand); }
/* A map stays under the sticky header and the tab bar as the page scrolls. */
.map, .map-picker { isolation: isolate; }

/* Diary (phase 2): the title, intro and filters over a forest rule; each
   entry a date column (one line on a phone) beside the walk. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { margin: 0; }
.diary-head { display: flex; flex-direction: column; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--forest); }
.app-body .diary-head h1 { margin: 0; }
.diary-head .intro { margin: 0; max-width: 36em; font-size: 20px; line-height: 1.45; color: var(--ink-soft); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.year-chips .chip { min-height: 0; padding: 6px 12px; font-family: var(--heading); font-weight: 600; font-size: 13px; }
.order-switch { display: inline-flex; border: 1px solid var(--forest); }
.order-switch a { display: inline-flex; align-items: center; padding: 6px 12px; font-family: var(--heading); font-weight: 600; font-size: 13px; line-height: 1.2; color: var(--forest); text-decoration: none; }
.order-switch a:hover { background: var(--sand); color: var(--forest); }
.order-switch a.on { background: var(--forest); color: var(--paper); }
.order-switch a:focus-visible { outline: 3px solid var(--gorse); outline-offset: 2px; }
.entry { display: grid; grid-template-columns: minmax(96px, 170px) minmax(0, 1fr); gap: clamp(14px, 4vw, 56px); padding: clamp(28px, 5vw, 44px) 0; border-bottom: 1px solid var(--rule); }
.entry-date { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-family: var(--heading); font-weight: 600; font-size: 13px; line-height: 1.2; }
.entry-date .weekday { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.entry-date .day { font-weight: 700; font-size: 56px; line-height: 1.1; }
.entry-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 680px; }
.entry-body > * { margin: 0; }
.entry h2 { margin: 0; font-weight: 800; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; text-wrap: balance; }
.entry .meta { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--heading); font-weight: 600; font-size: 13px; color: var(--muted); }
.entry .meta .new-miles { color: var(--warning); }
.diary-text { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.diary-text p { margin: 0; font-size: 18px; line-height: 1.6; text-wrap: pretty; }
.quick-note { padding-left: 16px; border-left: 1px solid var(--forest); font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.add-photos { display: flex; align-items: center; justify-content: center; max-width: 560px; min-height: 96px; margin-top: 6px; padding: 16px; border: 1.5px dashed var(--dash); border-radius: 8px; color: var(--ink-soft); font-size: 15px; text-align: center; text-decoration: none; }
.add-photos:hover { background: var(--sand); color: var(--forest); }
.entry-photos { display: flex; flex-direction: column; gap: 8px; max-width: 560px; margin-top: 6px; }
.entry-photo { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: var(--sand); }
.thumbnails { display: flex; flex-wrap: wrap; gap: 6px; }
.thumbnails button { width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; }
.thumbnails button[aria-pressed="true"] { border-color: var(--gorse); }
.thumbnails button:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
.thumbnails img { display: block; width: 100%; height: 100%; object-fit: cover; }
.edit-entry { font-size: 14px; line-height: 22px; }
/* An empty diary or stats page, and a year with no walks. */
.empty-note { padding: 40px 0 8px; }
.app-body h1 + .empty-note { border-top: 1px solid var(--forest); }
.empty-note p { margin: 0 0 20px; font-family: var(--heading); font-weight: 700; font-style: italic; font-size: 22px; line-height: 1.3; color: var(--muted); }
@media (max-width: 719.98px) {
    .entry { grid-template-columns: minmax(0, 1fr); }
    .entry-date { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
    .entry-date .day { font-size: 30px; }
    .year-chips .chip, .order-switch a { min-height: 44px; }
}

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.photo-tile { margin: 0; background: var(--sand); border-radius: 10px; overflow: hidden; }
.photo-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-tile .processing { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; color: var(--muted); }
.photo-tile figcaption { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; font-size: 14px; }
.badge { font-family: var(--heading); font-weight: 700; text-transform: uppercase; color: var(--warning); }
.link-button { background: none; border: 0; padding: 0; color: var(--warning); cursor: pointer; text-decoration: underline; }

/* Settings (phase 2): a 720 px ruled column. Who can see your logbook is two
   cards, units a segmented control; both, and emails, save as soon as they
   change (autosave_controller.js), so their Save buttons only show without
   JavaScript. */
.settings, .settings-footer { max-width: 720px; }
.settings.section { margin-bottom: 52px; }
.settings form > p { margin: 0; }
.settings-help { margin: 10px 0 0; font-size: 14px; }
.settings-hint { margin: 14px 0 0; font-size: 14px; color: var(--warning); }
.field label .optional { text-transform: none; letter-spacing: 0; }
/* The username, with swcp.app/ written in the field before it. */
.field-prefixed { display: flex; align-items: center; border-bottom: 1.5px solid var(--forest); }
.field-prefixed .prefix { flex: none; padding: 8px 0; font-size: 18px; color: var(--muted); }
.field .field-prefixed input { flex: 1; min-width: 0; min-height: 44px; border-bottom: 0; }
.field .field-prefixed input:focus { box-shadow: none; }
.field-prefixed:focus-within { border-bottom-color: var(--gorse); box-shadow: 0 1.5px 0 var(--gorse); }
.choice { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; }
fieldset.visibility-cards, fieldset.segmented { min-width: 0; margin: 0; padding: 0; }
fieldset.visibility-cards { border: 0; }
.visibility-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.visibility-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 2px solid var(--rule); border-radius: 12px; cursor: pointer; }
.visibility-card:hover { border-color: var(--muted); }
.visibility-card:has(input:checked) { border-color: var(--forest); background: #f8f5ea; }
.visibility-card:has(input:disabled) { opacity: .55; cursor: not-allowed; border-color: var(--rule); }
.visibility-card input { appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; border: 2px solid var(--forest); border-radius: 50%; background: transparent; cursor: inherit; }
.visibility-card input:checked { background: var(--forest); box-shadow: inset 0 0 0 3px #f8f5ea; }
.visibility-card input:focus-visible { outline: 3px solid var(--gorse); outline-offset: 2px; }
.visibility-text { display: flex; flex-direction: column; gap: 4px; }
.visibility-title { font-family: var(--heading); font-weight: 800; font-size: 22px; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase; }
.visibility-desc { font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
/* Units: one pill split in two, the chosen half forest. */
.segmented { display: inline-flex; border: 1px solid var(--forest); border-radius: 999px; overflow: hidden; }
.segmented label { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; font-size: 14px; cursor: pointer; }
.segmented label + label { border-left: 1px solid var(--forest); }
.segmented label:hover { background: var(--sand); }
.segmented input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--forest); color: var(--paper); }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--gorse); outline-offset: -3px; border-radius: 999px; }
.photos-used { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.photos-used p { margin: 0; }
.photos-used p:first-child { font-family: var(--heading); font-weight: 700; font-size: 20px; color: var(--muted); }
.photos-used strong { font-size: 28px; color: var(--forest); }
.photos-used .muted { font-size: 14px; }
.photos-bar { height: 8px; border-radius: 4px; background: var(--sand); }
/* Saving straight away: the Save buttons are for when there's no
   JavaScript; "Saved" shows for a moment. */
.autosave-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; }
.settings.section { position: relative; }
.autosave-ready .autosave-actions { height: 0; margin: 0; }
.autosave-ready .autosave-actions:has([data-state="not-saved"]) { height: auto; margin-top: 12px; }
/* "Saved" shows at the end of the section's heading. */
.autosave-ready .autosave-status[data-state="saved"] { position: absolute; top: 8px; right: 0; padding-left: 12px; background: var(--paper); }
.autosave-ready .autosave-button { display: none; }
.autosave-status { margin: 0; font-size: 14px; font-weight: 500; }
.autosave-status[data-state="saved"] { color: var(--forest); }
.autosave-status[data-state="saved"]::before { content: '\2713\00a0' / ''; }
.autosave-status[data-state="not-saved"] { color: var(--warning); }
.settings-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule); }
.resend-confirmation { margin-top: 14px; }
@media (max-width: 719.98px) { .segmented label { min-height: 44px; } }

/* On a phone, everything to tap is at least 44 × 44 px: chips and choices
   are taller, and a link on its own (not in a sentence) can be tapped
   anywhere in 44 px around it, without moving anything. */
@media (max-width: 719.98px) {
    .chip, .logo { min-height: 44px; }
    main p > a:only-child:not(.button), .form-actions > a:not(.button), .settings-footer > a:not(.button) { display: inline-block; padding: 11px 0; margin: -11px 0; }
    .links { gap: 0; }
    .links a { padding: 10px 0; }
    .leaflet-touch.leaflet-container .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; }
    .admin-table td a { display: inline-block; padding: 12px 0; }
    .contents li a { display: inline-block; padding: 10px 0; }
}

/* Home (see requirements/10-user-interface/03-home-page.md): a forest hero, editorial
   sections with the owner's photos and live illustrations, a sand band, a
   forest close. */
.home-wrap { max-width: 1240px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.home-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 5vw, 72px); align-items: center; }
.home-dark { background: var(--forest); color: var(--paper); }
.home-eyebrow { margin: 0; font-family: var(--heading); font-weight: 600; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--warning); }
.home-dark .home-eyebrow { color: var(--gorse); }
.home h2 { margin: 0; font-weight: 800; font-size: clamp(40px, 5vw, 64px); line-height: .92; letter-spacing: 0; }
.home h3 { margin: 0; }
.home-intro { margin: 0; max-width: 30em; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--on-dark); text-wrap: pretty; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0; }
.home-link { color: var(--paper); font-size: 16px; padding: 10px 4px; }
.home-dark a.home-link:hover { color: var(--gorse); }

.home-hero { border-bottom: 6px solid var(--gorse); }
.home-hero .home-split { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 96px); gap: clamp(32px, 5vw, 64px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.home-hero-text { display: flex; flex-direction: column; gap: 26px; }
.home-hero-text .message { margin: 0; }
.home-hero h1 { margin: 0; font-size: clamp(56px, 8.4vw, 116px); line-height: .88; letter-spacing: -.01em; }
.home-hero-figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.home-hero-photo { aspect-ratio: 4 / 5; max-height: 620px; border-radius: var(--radius); background: var(--forest-well); }
.home-hero-figure figcaption { font-family: var(--heading); font-weight: 600; font-size: 14px; letter-spacing: .04em; color: var(--on-dark-muted); }

/* The owner's photos: each fills its box, cropped to fit. */
.home-photo { position: relative; display: block; overflow: hidden; }
.home-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

.home-facts { margin-top: clamp(56px, 8vw, 104px); }
.home-facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); border-top: 2px solid var(--forest); }
.home-fact { margin: 0; padding: 24px 24px 24px 0; display: flex; flex-direction: column; gap: 8px; }
.home-fact strong { font-family: var(--heading); font-weight: 800; font-size: 64px; line-height: .9; }
.home-fact span { font-size: 16px; line-height: 1.45; color: var(--ink-soft); }

.home-feature { padding-top: clamp(56px, 8vw, 104px); }
.home-feature-text { display: flex; flex-direction: column; gap: 18px; max-width: 480px; }
.home-feature-text p:not(.home-eyebrow) { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }
.home-feature-flip .home-feature-text { order: 2; }
.home-feature-flip > :last-child { order: 1; }

/* 01: a phone logging a walk on the map. */
.home-phone { justify-self: center; width: 330px; max-width: 100%; border: 9px solid #111; border-radius: 46px; overflow: hidden; background: var(--paper); box-shadow: 0 30px 60px -30px rgba(29, 59, 47, .5); font-size: 12px; line-height: 1.35; }
.phone-head { display: flex; justify-content: space-between; align-items: baseline; padding: 22px 16px 10px; border-bottom: 1px solid var(--forest); }
.phone-title { font-family: var(--heading); font-weight: 700; font-size: 22px; }
.phone-close, .phone-start-over, .phone-cancel { text-decoration: underline; text-underline-offset: 2px; }
.phone-close { font-size: 11px; }
.phone-body { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.phone-map { position: relative; height: 300px; border: 1px solid var(--forest); border-radius: 8px; overflow: hidden; }
.phone-map svg { display: block; width: 100%; height: 100%; }
.phone-chip { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 6px; background: var(--forest); color: var(--paper); border-radius: 999px; padding: 4px 10px 4px 4px; font-family: var(--heading); font-weight: 600; font-size: 11px; }
.phone-tick { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--gorse); color: var(--forest); font-size: 11px; }
.phone-zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; border: 1px solid rgba(0, 0, 0, .3); border-radius: 3px; background: #fff; font-size: 15px; line-height: 22px; text-align: center; }
.phone-zoom span { width: 24px; }
.phone-zoom span + span { border-top: 1px solid #ccc; }
.phone-picks { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 8px; font-size: 13px; }
.phone-pin { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--forest); color: var(--gorse); font-family: var(--heading); font-weight: 800; font-size: 11px; }
.phone-swap { border: 1px solid var(--forest); border-radius: 999px; padding: 4px 12px; font-size: 11px; }
.phone-start-over { color: var(--warning); font-size: 11px; justify-self: end; }
.phone-help { margin: 0; font-size: 10px; color: var(--muted); }
.phone-summary { display: flex; flex-direction: column; gap: 2px; background: var(--sand); padding: 12px; font-size: 10px; color: var(--muted); }
.phone-summary strong { font-family: var(--heading); font-weight: 700; font-size: 17px; color: var(--forest); }
.phone-foot { display: flex; align-items: center; gap: 12px; padding: 10px 14px 18px; border-top: 1px solid var(--forest); }
.phone-save { background: var(--forest); color: var(--paper); border-radius: 999px; padding: 8px 18px; font-weight: 500; }

/* Close-up maps, drawn from the route's line. */
.sketch-sea { fill: #c4d4d1; }
.sketch-land { fill: #ebe6d3; stroke: #b8c6b6; stroke-width: 1; }
.sketch-sea-label { fill: #4f7363; font-style: italic; font-size: 13px; }
.sketch-route { fill: none; stroke: var(--forest); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.sketch-walk-edge { fill: none; stroke: var(--forest); stroke-width: 8; stroke-linejoin: round; stroke-linecap: round; }
.sketch-walk { fill: none; stroke: var(--gorse); stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; }
.sketch-pin circle, .sketch-place circle { fill: var(--forest); stroke: var(--paper); stroke-width: 2; }
.sketch-pin text { fill: var(--gorse); font-family: var(--heading); font-weight: 800; font-size: 12px; }
.sketch-place text { fill: var(--forest); font-family: var(--heading); font-weight: 700; font-size: 22px; paint-order: stroke; stroke: #ebe6d3; stroke-width: 4px; }

/* 02: a diary entry. */
.home-diary { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.home-diary-photo { aspect-ratio: 3 / 2; border-radius: var(--radius); background: var(--sand); }
.home-entry { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; padding: 20px 0; border-top: 1px solid var(--rule); }
.home-entry-date { margin: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.2; font-family: var(--heading); font-weight: 600; font-size: 13px; }
.home-entry-date span:first-child { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.home-entry-date strong { font-weight: 700; font-size: 48px; line-height: 1.05; }
.home-entry-text { display: flex; flex-direction: column; gap: 8px; }
.home .home-entry h3 { font-weight: 700; font-size: 26px; line-height: 1.05; text-transform: none; letter-spacing: 0; }
.home-entry-meta { margin: 0; font-family: var(--heading); font-weight: 600; font-size: 13px; color: var(--muted); }
.home-entry-text p:last-child { margin: 0; font-size: 16px; line-height: 1.55; text-wrap: pretty; }

/* 03: the example walker's numbers, on a sand band. */
.home-band { margin-top: clamp(56px, 8vw, 104px); background: var(--sand); }
.home-band > .home-wrap { display: flex; flex-direction: column; gap: 36px; padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 7vw, 88px); }
.home-band-head { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.home-band-intro { margin: -12px 0 0; max-width: 40em; font-size: 18px; line-height: 1.55; color: var(--ink-soft); }
.home-band-foot { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.home-card { background: var(--paper); border-radius: var(--radius); padding: clamp(18px, 3vw, 32px); box-shadow: 0 24px 50px -32px rgba(29, 59, 47, .55); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-card-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 24px; }
.home-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.home-card-head > div { display: flex; flex-direction: column; gap: 6px; }
.home-card-label { margin: 0; font-family: var(--heading); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--warning); }
.home .home-card h3 { font-weight: 800; font-size: 28px; line-height: 1; }
.home-card-aside { font-family: var(--heading); font-weight: 600; font-size: 14px; color: var(--muted); }
.home-card-note { margin: 0; max-width: 46em; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.home-strip-ends { margin: 0; display: flex; justify-content: space-between; gap: 12px; font-family: var(--heading); font-weight: 600; font-size: 13px; }
.home-strip-bars { display: flex; align-items: flex-end; gap: 2px; height: clamp(90px, 14vw, 150px); border-bottom: 1px solid var(--forest); }
.home-strip-bar { flex: 1 1 0; background: var(--rule); }
.home-strip-bar.walked { background: var(--gorse); }
.home-strip-bar.partly { background: var(--gorse-light); }
.home-strip-walked, .home-share-bar { position: relative; display: block; height: 10px; background: var(--sand); border-radius: 5px; overflow: hidden; }
.home-strip-walked span, .home-share-bar span { position: absolute; top: 0; bottom: 0; min-width: 2px; background: var(--gorse); }
.home-strip-regions { display: flex; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.home-strip-regions li { flex: none; min-width: 0; padding: 8px 5px 0; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
.home-strip-region { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-strip-walked-percent { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--heading); font-weight: 600; font-size: 12px; color: var(--muted); }
.home-years, .home-companions { margin: 0; padding: 0; list-style: none; }
.home-years li { display: grid; grid-template-columns: 40px minmax(0, 1fr) 58px; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--rule); }
.home-year, .home-year-miles { font-family: var(--heading); font-weight: 600; font-size: 14px; }
.home-year-miles { font-size: 13px; text-align: right; }
.home-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.home-month { height: 26px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule); border-radius: 3px; font-family: var(--heading); font-weight: 600; font-size: 11px; }
.home-month.light { background: var(--highlight); }
.home-month.full { background: var(--gorse); }
.home-companions li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--rule); }
.home-companion { font-family: var(--heading); font-weight: 700; font-size: 20px; }
.home-companion-walks { font-size: 13px; color: var(--muted); }
.home-companion-miles { min-width: 56px; text-align: right; font-family: var(--heading); font-weight: 600; font-size: 13px; }
.home-companion-bar { grid-column: 1 / -1; position: relative; height: 5px; background: var(--sand); border-radius: 3px; overflow: hidden; }
.home-companion-bar span { position: absolute; top: 0; bottom: 0; left: 0; background: var(--forest); }

/* 04: a share card. */
.home-share-card { justify-self: center; width: 100%; max-width: 600px; aspect-ratio: 1200 / 630; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--paper); border: 1px solid var(--forest); border-radius: 12px; overflow: hidden; box-shadow: 8px 8px 0 var(--forest); }
.home-share-photo { background: var(--sand); border-right: 1px solid var(--forest); }
.home-share-text { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; padding: clamp(14px, 2.6vw, 24px); }
.home-share-top { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--heading); font-weight: 600; font-size: clamp(9px, 1.1vw, 11px); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.home-share-top .logo-mark { width: clamp(26px, 4vw, 40px); height: auto; }
.home-share-figures { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: clamp(12px, 1.4vw, 15px); line-height: 1.3; }
.home-share-figures strong { font-family: var(--heading); font-weight: 700; font-size: clamp(26px, 4vw, 46px); line-height: .95; }
.home-share-figures strong span { color: var(--muted); }
.home-share-foot { display: flex; flex-direction: column; gap: 5px; }
.home-share-bar { height: 6px; border-radius: 3px; }
.home-share-address { padding-top: 4px; border-top: 1px solid var(--rule); font-family: var(--heading); font-weight: 800; font-size: clamp(10px, 1.2vw, 13px); letter-spacing: .04em; }

/* The regions: a photo of each, named on a shade at the bottom. */
.home-regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.home-region { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--sand); }
.home-region .home-photo { position: absolute; inset: 0; }
.home-region figcaption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 72px clamp(16px, 2.4vw, 24px) clamp(16px, 2.4vw, 22px); background: linear-gradient(to top, rgba(22, 48, 42, .9), rgba(22, 48, 42, .55) 55%, rgba(22, 48, 42, 0)); color: var(--paper); }
.home-region p { margin: 0; }
.home-region strong { font-family: var(--heading); font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1; }
.home-region-place { font-family: var(--heading); font-weight: 600; font-size: 14px; letter-spacing: .04em; color: var(--on-dark-muted); }

.home-closing { border-top: 6px solid var(--gorse); }
.home-closing .home-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }
.home .home-closing h2 { font-size: clamp(52px, 8vw, 112px); line-height: .88; max-width: 12ch; }
.home-closing .home-intro { max-width: 32em; font-size: 19px; }

@media (max-width: 720px) {
    .home-strip-bars { gap: 1px; }
}

/* Privacy (phase 2), and the terms, which look the same: the list of
   sections in a sticky column on the left (first, in two columns, on a
   phone), ruled headings, the short version on forest, what we keep as a
   ruled table, and deleting your account in an outlined box. */
.legal-layout { max-width: 1100px; display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 64px); align-items: flex-start; padding-top: clamp(36px, 6vw, 72px); padding-bottom: 32px; }
.legal-layout .contents { flex: 1 1 180px; max-width: 220px; }
.contents .label { margin: 0 0 6px; font-size: 13px; }
.contents ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.contents li a { display: inline-block; padding: 3px 0; font-size: 15px; }
.legal { flex: 999 1 420px; min-width: 0; max-width: 680px; display: flex; flex-direction: column; gap: 44px; }
.legal section, .legal-title { display: flex; flex-direction: column; gap: 14px; }
.legal h1 { margin: 0; font-size: clamp(48px, 7vw, 84px); line-height: .92; }
.legal-title p { margin: 0; font-size: 15px; }
.legal h2 { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--forest); font-weight: 800; font-size: 30px; }
.legal p, .legal ul, .legal ol { margin: 0; font-size: 17px; line-height: 1.6; }
.legal ul, .legal ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.55; }
.legal-short { padding: 24px; border-radius: var(--radius); background: var(--forest); color: var(--paper); }
.legal .legal-short { gap: 10px; }
.legal-short h2 { padding: 0 0 4px; border: 0; font-size: 28px; color: var(--gorse); }
.legal-short p { line-height: 1.5; }
.legal-table { margin: 0; display: flex; flex-direction: column; }
.legal-table > div { display: grid; grid-template-columns: minmax(100px, 180px) minmax(0, 1fr); gap: 12px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.legal-table dt { font-weight: 600; }
.legal-table dd { margin: 0; line-height: 1.55; }
.legal-box { padding: 24px; border: 2px solid var(--forest); border-radius: var(--radius); }
.legal-box h2 { padding: 0; border: 0; }
@media (min-width: 720px) {
    .legal-layout .contents { position: sticky; top: 24px; }
}
@media (max-width: 719.98px) {
    .legal-layout .contents { flex-basis: 100%; max-width: none; }
    .contents ul { display: block; columns: 2; column-gap: 16px; }
    .contents li { break-inside: avoid; }
    .legal-table > div { grid-template-columns: 104px minmax(0, 1fr); }
    .contents li a { padding: 11px 0; }
}

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.admin-table th, .admin-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.admin-search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.admin-search input, .admin-search select, .moderate input[type=text] { min-height: 44px; padding: 0 12px; border: 1px solid var(--forest); border-radius: 0; background: #fff; font-size: 15px; }
.admin-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.admin-facts dd { margin: 0; }
.moderate { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.moderate label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.admin-walk { border-top: 1px solid var(--rule); padding: 8px 0; }
.map-key { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; padding: 0; margin: 8px 0 16px; font-size: 15px; }
.key-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.key-dot.settlement { background: #1d3b2f; }
.key-dot.water-crossing { background: #2f6f9f; }
.key-dot.trail-end { background: #b0413e; }
.key-dot.ferry { border: 3px solid var(--gorse); }
.admin-table td.waypoint-name { white-space: normal; min-width: 14em; }
.waypoint-name code { font-size: 13px; color: var(--muted); word-break: break-all; }

/* Share (phase 2): the stats page's Share your progress, in two columns
   (the words and buttons, then the card with a forest offset shadow) that
   stack on a phone; and the share buttons, on the public logbook too. */
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-buttons .button { padding: 0 15px; font-size: 14px; }
.share-buttons .button[hidden] { display: none; }
.share-layout { margin-top: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px; align-items: start; }
.share-copy { display: flex; flex-direction: column; gap: 14px; max-width: 360px; }
.share-copy h2, .share-copy p { margin: 0; }
.share-intro { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.share-public { display: flex; flex-direction: column; gap: 10px; }
.share-address { align-self: flex-start; font-family: var(--heading); font-weight: 600; font-size: 15px; color: var(--muted); }
.share-private { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; background: var(--sand); border-radius: 10px; font-size: 14px; line-height: 1.45; }
.share-save { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.share-save p { font-size: 13px; color: var(--muted); }
.card-preview { display: block; justify-self: end; width: 100%; max-width: 720px; height: auto; border: 1px solid var(--forest); box-shadow: 6px 6px 0 var(--forest); }
/* On a phone the address and the settings link can be tapped anywhere in
   44 px around them, and the card leaves room for its shadow. */
@media (max-width: 700px) {
    .share-layout { margin-top: 56px; }
    .share-address, .share-private a { display: inline-block; padding: 12px 0; margin: -12px 0; }
    .card-preview { justify-self: start; width: calc(100% - 6px); }
}

/* Sign in (phase 2): signing in and up, and the account emails' pages, are a
   split screen with no site header: the owner's photo on the left (on top on
   a phone), and the page under the brand line, with the facts line and a
   small footer at the bottom. */
.auth { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.auth-photo { position: relative; margin: 0; height: 280px; background: var(--sand); border-bottom: 1px solid var(--forest); }
.auth-photo .home-photo { position: absolute; inset: 0; }
.auth-photo figcaption { position: absolute; right: 0; bottom: 0; max-width: 100%; padding: 10px 14px; background: var(--paper); border-top: 1px solid var(--forest); border-left: 1px solid var(--forest); font-family: var(--heading); font-weight: 600; font-size: 12px; line-height: 1.3; }
.auth-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-width: 0; padding: clamp(28px, 6vw, 48px) clamp(20px, 5vw, 72px); }
.auth-brand { display: flex; align-items: baseline; gap: 6px 14px; }
.auth-brand .logo { flex: none; font-size: 34px; line-height: 1; letter-spacing: -.01em; }
.auth-brand .logo-mark { width: 52px; height: 26px; align-self: center; }
.auth-tagline { font-family: var(--heading); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.auth-main { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 24px; }
.auth-main > * { margin: 0; }
.auth-main h1 { font-size: clamp(40px, 4.4vw, 58px); line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
.auth-main > p { color: var(--ink-soft); }
.auth-main .auth-intro { font-size: 20px; line-height: 1.45; text-wrap: pretty; }
.auth-main form:not(.form-actions) { display: flex; flex-direction: column; }
.auth-main .field { margin-bottom: 20px; }
.auth-main .form-actions { margin-top: 8px; }
.auth-main .message { margin: 0; }
.auth-error { margin: -4px 0 16px; font-size: 14px; color: var(--warning); }
.auth-consent { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.auth-more { font-size: 15px; }
.auth-footer { display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.auth-footer p { margin: 0; }
.auth-footer .auth-facts { font-family: var(--heading); font-weight: 600; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.auth-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
@media (min-width: 880px) {
    .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .auth-photo { height: auto; min-height: 100vh; border-bottom: 0; border-right: 1px solid var(--forest); }
}
@media (max-width: 719.98px) {
    .auth-footer nav { gap: 0 16px; }
    .auth-footer nav a { display: inline-block; padding: 13px 8px; margin: 0 -8px; }
    .auth-more a { display: inline-block; padding: 11px 0; margin: -11px 0; }
}

/* The public header on a phone: one row, a little smaller. */
@media (max-width: 480px) {
    .public-header .wrap { gap: 8px 12px; }
    .public-header .logo { gap: 6px; font-size: 22px; }
    .public-header .logo-mark { width: 32px; height: 18px; }
    .public-header .public-link { font-size: 14px; }
    .public-header .pill { padding: 8px 12px; font-size: 14px; white-space: nowrap; }
}

/* Log a walk (phase 2): logging or editing a walk (see
   requirements/10-user-interface/05-walk-form.md). The form is a page of its own;
   on a computer, with JavaScript, it opens in a 560 px panel over the
   page, with that page dimmed behind. Either way it has a head (title and
   Close), a body that scrolls and a foot (Save walk, Cancel, Delete) that
   stays in view. On a phone the page fills the screen, with no site header
   or tab bar. */
.walk-panel { --panel-gutter: clamp(16px, 4vw, 28px); background: var(--paper); }
.walk-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px var(--panel-gutter); border-bottom: 1px solid var(--forest); }
.app-body .walk-panel-head h1, .walk-panel-head h1 { margin: 0; font-family: var(--heading); font-weight: 700; font-size: 28px; line-height: 1.15; letter-spacing: 0; text-transform: none; }
.walk-panel-head h1:focus { outline: none; }
.walk-panel-head h1:focus-visible { outline: 3px solid var(--gorse); outline-offset: 2px; }
.walk-panel-close, .walk-panel-foot a { color: var(--forest); font-size: 14px; }
.walk-panel-body { display: flex; flex-direction: column; gap: 24px; padding: 20px var(--panel-gutter) 32px; }
.walk-panel-body > *, .walk-panel-body .field { margin: 0; }
.walk-panel-foot { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px 16px; padding: 14px var(--panel-gutter) calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--forest); background: var(--paper); }
.walk-panel-foot .button { padding: 0 22px; }
.walk-panel-foot .walk-delete { margin-left: auto; font-size: 14px; color: var(--warning); text-underline-offset: 3px; }
.walk-panel .help { margin: 0; font-size: 13px; color: var(--muted); }
.walk-panel .field .help { margin-top: 8px; }

/* Logging a walk before confirming the email address: a short note instead. */
.confirm-first, .narrow-page { max-width: 560px; }

/* The page: a column like the panel, ruled at the sides on a computer. */
main .walk-panel { max-width: 560px; margin: 0 auto; }
@media (min-width: 720px) {
    main .walk-panel { border: 1px solid var(--forest); border-bottom: 0; }
}
@media (max-width: 719.98px) {
    body:has(> main .walk-panel) > .app-header, body:has(> main .walk-panel) > .tab-bar, body:has(> main .walk-panel) > .site-footer { display: none; }
    body:has(> main .walk-panel) { padding-bottom: 0; }
    body:has(> main .walk-panel) .app-body { padding: 0; }
    body:has(> main .walk-panel) .app-body > .message { margin: 12px 16px; }
    main .walk-panel { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
    main .walk-panel-form { flex: 1; display: flex; flex-direction: column; }
    main .walk-panel-body { flex: 1; }
    .walk-panel-close, .walk-panel-foot a, .walk-panel-foot .walk-delete { display: inline-block; min-width: 44px; padding: 12px 8px; margin: -12px -8px; text-align: center; }
    .add-companion input { min-height: 44px; }
}

/* The panel: a modal dialog on the right, sliding in. */
.walk-dialog { position: fixed; inset: 0; width: min(560px, 100%); max-width: 100%; height: 100%; max-height: 100%; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--forest); background: var(--paper); color: var(--forest); overflow: hidden; }
.walk-dialog[open] { display: flex; flex-direction: column; }
.walk-dialog::backdrop { background: rgba(29, 59, 47, .4); }
html:has(.walk-dialog[open]) { overflow: hidden; }
.walk-dialog .walk-panel, .walk-dialog .walk-panel-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.walk-dialog .walk-panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
@media (prefers-reduced-motion: no-preference) {
    .walk-dialog[open] { animation: walk-panel-in .24s ease-out; }
    .walk-dialog[open]::backdrop { animation: walk-scrim-in .24s ease-out; }
}
@keyframes walk-panel-in { from { transform: translateX(100%); } }
@keyframes walk-scrim-in { from { opacity: 0; } }

/* On the map / From a list: tabs, the chosen one underlined in gorse. */
.pick-mode { display: flex; gap: 28px; border-bottom: 1px solid var(--rule); }
.pick-mode[hidden] { display: none; }
.pick-mode button { min-height: 44px; margin-bottom: -1px; padding: 10px 0 8px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-family: var(--heading); font-weight: 600; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.pick-mode button:hover { color: var(--forest); }
.pick-mode button[aria-pressed="true"] { color: var(--forest); border-bottom-color: var(--gorse); }
.pick-mode button:focus-visible { outline: 3px solid var(--gorse); outline-offset: 2px; }

/* From a list: the start and finish side by side, a round swap between. */
.route-pickers { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0 10px; align-items: start; }
.route-pickers[hidden] { display: none; }
.route-pickers .field { min-width: 0; }
.route-pickers select { padding: 10px 8px; }
.route-pickers .swap { width: 44px; height: 44px; margin-top: 22px; padding: 0; border: 1px solid var(--forest); border-radius: 50%; background: transparent; font-family: var(--heading); font-weight: 600; font-size: 18px; cursor: pointer; }
.route-pickers .swap:hover { background: var(--forest); color: var(--paper); }
.route-pickers .swap:focus-visible { outline: 3px solid var(--gorse); outline-offset: 2px; }

/* On the map: the next step on the map, then the places picked. */
.map-picker { display: flex; flex-direction: column; gap: 12px; }
.map-picker[hidden] { display: none; }
.map-picker-frame { position: relative; isolation: isolate; height: 340px; border: 1px solid var(--forest); border-radius: 12px; overflow: hidden; background: var(--sand); }
.walk-map { width: 100%; height: 100%; background: var(--sand); }
.map-step { position: absolute; z-index: 800; top: 10px; left: 10px; max-width: calc(100% - 66px); display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px 7px 7px; border-radius: 999px; background: var(--forest); color: var(--paper); font-family: var(--heading); font-weight: 600; font-size: 16px; line-height: 1.2; letter-spacing: .02em; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); pointer-events: none; }
.map-step-number { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gorse); color: var(--forest); font-weight: 800; }
.map-picks { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; }
.map-pick { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; font-size: 16px; }
.map-pick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--forest); color: var(--gorse); font-family: var(--heading); font-weight: 800; font-size: 14px; }
.button-small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.map-picks .button-small, .map-picks .start-over { justify-self: end; }
.start-over { font-size: 13px; color: var(--warning); text-underline-offset: 3px; }
/* The pins on the map: drawn 28 px across in a 44 px box. */
.map-pin { display: flex; align-items: center; justify-content: center; }
.map-pin span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 2px solid var(--paper); border-radius: 50%; background: var(--forest); color: var(--gorse); font: 800 15px/1 var(--heading); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }

/* The summary: one sentence on sand, once the start and finish are picked. */
.walk-summary { padding: 14px 16px; background: var(--sand); }
.walk-summary:has(> .muted) { padding: 0; background: none; font-size: 14px; }
.walk-summary p { margin: 0; }
.preview { display: flex; flex-direction: column; gap: 4px; }
.preview-summary { font-family: var(--heading); font-weight: 700; font-size: 22px; line-height: 1.2; }
.preview-detail { font-size: 13px; color: var(--muted); }
.preview .note { font-size: 13px; color: var(--warning); }

/* Who came with you: chips, then a line to add someone and an Add pill. */
fieldset.companions { min-width: 0; border: 0; padding: 0; }
.companions .chips:not(:empty) { margin-bottom: 8px; }
.add-companion { display: flex; align-items: flex-end; gap: 6px; }
.add-companion input { flex: 1; min-width: 0; font-size: 15px; }
.add-companion .chip { margin: 0; }
.companions .help { margin-top: 8px; }

/* Photos: the counts beside the label, square tiles, and a dashed tile to
   add more. */
.field-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.photo-count { font-size: 13px; color: var(--muted); }
.walk-panel .photo-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 0 0 10px; }
.walk-panel .photo-tile { position: relative; aspect-ratio: 1; border: 3px solid transparent; border-radius: 9px; background: var(--sand); }
.walk-panel .photo-tile.is-highlight { border-color: var(--gorse); }
.walk-panel .photo-tile img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.walk-panel .photo-tile .processing { height: 100%; aspect-ratio: auto; padding: 6px; font-size: 13px; text-align: center; overflow-wrap: anywhere; }
/* The badge, or the button to make a photo the highlight (a strip 44 px
   tall along the bottom, so it's easy to tap). */
.walk-panel .badge, .make-highlight span { padding: 4px 8px; border-radius: 999px; background: var(--gorse); color: var(--forest); font-family: var(--heading); font-weight: 700; font-size: 12px; line-height: 1.2; letter-spacing: .03em; text-transform: uppercase; }
.walk-panel .badge { position: absolute; left: 4px; bottom: 4px; }
.make-highlight { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; height: 44px; padding: 4px; border: 0; background: none; cursor: pointer; }
.make-highlight span { background: rgba(239, 234, 219, .92); }
.make-highlight:hover span { background: var(--paper); }
.make-highlight:focus-visible, .photo-remove:focus-visible { outline: 3px solid var(--gorse); outline-offset: -3px; }
.photo-remove { position: absolute; top: 0; right: 0; display: flex; align-items: flex-start; justify-content: flex-end; width: 44px; height: 44px; padding: 4px; border: 0; background: none; cursor: pointer; }
.photo-remove span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(29, 59, 47, .85); color: var(--paper); font-size: 16px; line-height: 1; }
.photo-remove:hover span { background: var(--forest); }
.photos-field .add-photos-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; grid-column: 1 / -1; margin: 0; padding: 12px; border: 1.5px dashed var(--dash); border-radius: 9px; color: var(--ink-soft); font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: normal; text-transform: none; text-align: center; cursor: pointer; }
.add-photos-tile:hover { background: var(--sand); }
.add-photos-tile:focus-within { outline: 3px solid var(--gorse); outline-offset: 2px; }
.add-photos-plus { font-family: var(--heading); font-weight: 800; font-size: 28px; line-height: 1; }
.add-photos-tile input[type=file] { max-width: 100%; }
/* With JavaScript, the tile is square and the browser's chooser hidden. */
.photos-field.photo-picker-on .add-photos-tile { position: relative; grid-column: auto; aspect-ratio: 1; padding: 6px; }
.photo-picker-on .add-photos-tile input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* The diary on lined paper: a line every 30 px. */
.diary-field textarea { padding: 6px 12px; background: var(--pale) repeating-linear-gradient(transparent 0 29px, #dcd5bd 29px 30px); background-attachment: local; font-family: var(--body); font-size: 19px; line-height: 30px; resize: vertical; }

@media (max-width: 719.98px) {
    .map-picker-frame { height: 46vh; min-height: 280px; }
    .button-small, .start-over { min-height: 44px; }
}
