/* Fedidive logbook. Mobile first: one column and a tab bar. From 720 px a rail, a list and the dive side by side;
   from 1280 px a third pane (who sees this dive). Every width is used: no centred column with empty sides. */

:root {
  --bg: #f4f6f9; --panel: #ffffff; --raised: #f9fafc; --text: #18212c; --muted: #5d6a7a; --line: #dfe4eb;
  --accent: #0b6bcb; --accent-ink: #ffffff; --accent-soft: #e5effa; --ok: #1c7a46; --ok-soft: #e4f4ea;
  --warn: #9a5a00; --warn-soft: #fbf0e1; --danger: #b42318; --danger-soft: #fdecea;
  --radius: 12px; --gap: 16px; --rail: 84px;
  --paper: #fffdf8; --paper-line: #ece6d8; --ink: #2a3f8f;
  --sticky-yellow: #fff3a8; --sticky-pink: #ffd6e3; --sticky-blue: #d5ecff; --sticky-green: #d8f5d0; --sticky-ink: #2b2a20;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141a; --panel: #161d26; --raised: #1b2330; --text: #e6ebf1; --muted: #9aa7b7; --line: #283342;
    --accent: #5aa8f2; --accent-ink: #0b1220; --accent-soft: #1b2c3e; --ok: #5cc98d; --ok-soft: #173225;
    --warn: #f0aa5c; --warn-soft: #2e2416; --danger: #f2817a; --danger-soft: #34191a;
    --paper: #1d2430; --paper-line: #2a3342; --ink: #9fb4ff;
    --sticky-yellow: #4a4420; --sticky-pink: #4a2633; --sticky-blue: #1f3a52; --sticky-green: #24402a; --sticky-ink: #f1eee0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
h1 { font-size: 1.35rem; line-height: 1.25; margin: 0; }
h2 { font-size: 1.02rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h3 { font-size: .9rem; margin: 10px 0 4px; color: var(--muted); }
p { margin: 0 0 10px; }
.sub, .hint { color: var(--muted); font-size: .88rem; }
.hint { margin: 4px 0 8px; }
.icon { flex: none; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loading { display: grid; place-items: center; height: 100dvh; color: var(--muted); }

/* ---- layout ---- */
.app { display: grid; height: 100dvh; grid-template-columns: 100%; grid-template-rows: 1fr auto; grid-template-areas: "main" "rail"; }
.rail { grid-area: rail; display: flex; justify-content: space-around; background: var(--panel); border-top: 1px solid var(--line); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); z-index: 2; }
.rail .brand { display: none; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; min-width: 64px; color: var(--muted); text-decoration: none; font-size: .75rem; border-radius: 10px; }
.nav-item[aria-current] { color: var(--accent); }
/* "Shoalog", small, at the foot of the rail on a wide screen; on a phone, at the foot of Settings */
.rail .made-with { display: none; }
.pane { grid-area: main; min-width: 0; overflow-y: auto; background: var(--panel); padding: 0 var(--gap) 32px; }
/* on a phone: the list, or the open item */
.app.has-detail .pane.list { display: none; }
.app:not(.has-detail) .pane.detail { display: none; }

@media (min-width: 720px) {
  .app { grid-template-rows: 100%; grid-template-columns: var(--rail) minmax(300px, 34%) 1fr; grid-template-areas: "rail list detail"; }
  .app.single { grid-template-columns: var(--rail) 1fr; grid-template-areas: "rail main"; }
  .rail { flex-direction: column; justify-content: flex-start; align-items: center; gap: 4px; border-top: 0; border-right: 1px solid var(--line); padding: 14px 0; }
  .rail .brand { display: block; margin-bottom: 14px; }
  .nav-item { width: 72px; padding: 8px 4px; }
  .nav-item[aria-current] { background: var(--accent-soft); }
  .rail .made-with { display: block; margin-top: auto; padding: 6px 4px; font-size: .68rem; line-height: 1.25; text-align: center; color: var(--muted); text-decoration: none; }
  .rail .made-with span { display: block; font-weight: 600; letter-spacing: .02em; }
  .rail .made-with:hover, .rail .made-with[aria-current] { color: var(--accent); }
  .pane.list { grid-area: list; border-right: 1px solid var(--line); display: block !important; }
  .pane.detail { grid-area: detail; display: block !important; background: var(--bg); padding: 0 28px 40px; }
  .pane.full { grid-area: main; background: var(--bg); padding: 0 28px 40px; }
  .back { display: none !important; }
}
@media (min-width: 1280px) {
  /* the dive's page needs room: a narrower list */
  .app.section-dives { grid-template-columns: var(--rail) minmax(280px, 22%) 1fr; }
}
@media (min-width: 1900px) {
  /* while editing, the form takes the third pane's place too */
  .app.section-dives.editing { grid-template-columns: var(--rail) minmax(320px, 22%) 1fr; grid-template-areas: "rail list detail"; }
}

/* ---- pane header, search ---- */
.pane-head { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; margin: 0 calc(-1 * var(--gap)); padding: 14px var(--gap) 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .pane-head { padding-block: 8px 6px; } .pane-head h1 { font-size: 1.15rem; } }
.pane-head .title { flex: 1; min-width: 0; }
.pane-head h1 { flex: 1; overflow-wrap: anywhere; }
.pane-head .title h1 { flex: none; }
@media (min-width: 720px) { .pane.detail .pane-head, .pane.full .pane-head { background: var(--bg); margin-inline: -28px; padding-inline: 28px; } }
.pane-head .title .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 2px 0 0; }
.search { margin: 12px 0 6px; }
.search input { width: 100%; }
.lede { color: var(--muted); max-width: 70ch; }

/* ---- controls ---- */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
input, select, textarea { font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-height: 44px; width: 100%; }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.button { display: inline-flex; align-items: center; gap: 6px; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button:disabled { opacity: .5; cursor: default; } /* it must look like it does nothing */
.button.danger { color: var(--danger); border-color: var(--danger); }
.button.file { position: relative; overflow: hidden; }
.button.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; flex: none; }
.icon-button:hover { background: var(--accent-soft); color: var(--accent); }
.link { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 4px; }
.label-wide { display: none; }
@media (min-width: 480px) { .label-wide { display: inline; } }
/* the dives list beside a page: a narrow column, its header buttons without words */
.pane.list { container: list / inline-size; }
@container list (max-width: 380px) { .label-wide { display: none; } }
/* a narrow list pane (280 px beside a dive): its head's four buttons fit, closer together; the title gives way first */
@container list (max-width: 320px) {
  .pane-head { gap: 4px; }
  .pane-head .icon-button { width: 36px; }
  .pane-head h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
.pane-head h1 { white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1 1 200px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 6px 12px; min-height: 36px; font: inherit; font-size: .88rem; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge.aud-private { background: var(--raised); color: var(--muted); border: 1px solid var(--line); }
.badge.aud-public { background: var(--warn-soft); color: var(--warn); }
/* who sees this: a button that opens a short list of groups to tick */
.audience { position: relative; display: inline-block; }
.audience summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); color: var(--text); cursor: pointer; font-size: .9rem; white-space: nowrap; }
.audience summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.audience[open] summary { border-color: var(--accent); }
.audience-menu { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 230px; margin: 0; padding: 8px; display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .14); }
.audience-menu .check { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.audience-menu .check:hover { background: var(--raised); }
.audience-menu .check.everyone { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.audience-menu input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.audience-menu input:disabled + span { color: var(--muted); }
.audience-menu .hint { margin: 4px 8px 2px; }
.audience-menu legend { float: left; width: 100%; padding: 4px 8px 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.audience summary .seen-by { color: var(--muted); font-size: .8rem; }
.audience summary strong { font-weight: 600; }
.switch { display: flex; gap: 10px; align-items: flex-start; }
.switch input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: none; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); padding: 10px 16px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); z-index: 5; }
.toast.update { display: flex; gap: 12px; align-items: center; background: var(--panel); color: var(--text); border-color: var(--line); box-shadow: 0 6px 24px rgb(0 0 0 / .18); white-space: nowrap; }

/* ---- empty and placeholder ---- */
.empty { padding: 32px 4px; max-width: 44ch; }
.placeholder { display: grid; place-items: center; align-content: center; gap: 12px; height: 100%; color: var(--muted); text-align: center; }

/* ---- dive list ---- */
.dive-list, .people-list, .plain { list-style: none; margin: 8px 0 0; padding: 0; }
/* under the list's sticky head (less tall on a phone) */
.dive-list { --under-head: 70px; }
@media (max-width: 600px) { .dive-list { --under-head: 58px; } }
.dive-list .month { position: sticky; top: var(--under-head); z-index: 2; padding: 14px 4px 6px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--panel); }
.dive-row, .person-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 10px; color: inherit; text-decoration: none; min-height: 60px; }
.dive-row:hover, .person-row:hover { background: var(--raised); }
.dive-row.selected, .person-row.selected { background: var(--accent-soft); }
.dive-row .n { width: 3.2em; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .88rem; flex: none; }
.dive-row .main, .person-row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dive-row .site, .person-row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dive-row .figures { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--muted); flex: none; }
.dive-row .figures span:first-child { color: var(--text); font-weight: 600; }
.dive-row .with { white-space: nowrap; }
.dive-row { -webkit-touch-callout: none; }
button.dive-row { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.dive-row.in-trip { margin-left: 8px; border-left: 2px solid var(--line); border-radius: 0 10px 10px 0; }
.dive-list.picking .dive-row { gap: 8px; }
.dive-row.picked { background: var(--accent-soft); }
.dive-row .pick { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border: 1.5px solid var(--muted); border-radius: 5px; color: var(--accent-ink); }
.dive-row.picked .pick { background: var(--accent); border-color: var(--accent); }
.icon-button.on { background: var(--accent-soft); color: var(--accent); }

/* a trip: one row, its dives under it when open */
.dive-list .trip { margin-top: 6px; }
.dive-list .trip > ol { list-style: none; margin: 0; padding: 0; }
/* thousands of dives: the browser lays out and paints only the rows near the screen (the rest keep their last size) */
.dive-list > li:not(.month, .none), .dive-list .trip > ol > li { content-visibility: auto; contain-intrinsic-size: auto 72px; }
.trip-head { position: sticky; top: var(--under-head); scroll-margin-top: var(--under-head); z-index: 2; display: flex; align-items: center; gap: 4px; padding: 2px 0; background: var(--panel); border-bottom: 1px solid var(--line); -webkit-touch-callout: none; }
.trip-head.has-current .trip-toggle { background: var(--accent-soft); }
.trip-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 6px; min-height: 52px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.trip-toggle:hover { background: var(--raised); }
.trip-toggle .main { display: flex; flex-direction: column; min-width: 0; }
.trip-toggle .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-head .chev { display: inline-flex; color: var(--muted); transform: rotate(-90deg); transition: transform .15s; }
.trip-head .chev.open { transform: none; }
.trip-head .trip-name { flex: 1; margin: 6px 0; }
.trip-of { color: var(--muted); }
.trip-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: .9rem; }
.trip-hint span { flex: 1 1 160px; }

/* picking several dives: what to do with them, at the bottom of the list */
.pick-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px calc(-1 * var(--gap)) -32px; padding: 10px var(--gap); background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgb(0 0 0 / .06); }
.pick-head { display: flex; align-items: center; gap: 8px; flex-basis: 100%; }
.pick-bar .count { font-weight: 700; margin-right: auto; }

/* a menu at the point of a right-click or long press */
.point-menu { position: fixed; z-index: 3000; min-width: 200px; max-width: min(320px, 90vw); max-height: 70vh; overflow: auto; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); }
.point-menu-head { margin: 4px 8px 6px; font-size: .8rem; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item { display: block; width: 100%; padding: 10px; min-height: 40px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--accent-soft); }
.menu-item.danger { color: var(--danger); }

/* suggested trips */
.trip-review { width: min(560px, 96vw); }
.trip-review[open] { display: flex; flex-direction: column; }
.trip-proposals { list-style: none; margin: 0; padding: 0; }
.trip-proposals li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trip-proposals li.off .what { opacity: .5; }
.trip-proposals input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin-top: 8px; flex: none; }
.trip-proposals .what { flex: 1; min-width: 0; display: grid; gap: 4px; }
.trip-proposals .trip-name { min-height: 38px; padding: 6px 8px; }
.none { padding: 16px 4px; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex: none; }
.person-row .name { display: flex; gap: 8px; align-items: center; }

/* ---- dive detail ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin: 4px 0 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; }
.stat .value { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.pane.list .block { border: 0; padding: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--raised); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.event-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 20px; }
.event-people ul { list-style: none; margin: 0; padding: 0; }
.event-people li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.event-people .who { font-weight: 600; margin-right: auto; }
.role, .team { font-size: .78rem; color: var(--muted); }
.status { font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.status.confirmed { background: var(--ok-soft); color: var(--ok); }
.status.invited { background: var(--warn-soft); color: var(--warn); }
.status.declined { background: var(--raised); color: var(--muted); }

/* ---- seen as ---- */
.view-as { display: flex; align-items: center; gap: 8px; }
.view-as > span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.view-as select { width: auto; min-width: 9em; }
.viewing-as .view-as select { border-color: var(--accent); background: var(--accent-soft); }
.view-as-what { flex: 1 1 12em; color: var(--muted); font-size: 14px; }
.view-as-none { padding: 14px 16px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); }
.view-as-none p { margin: 0 0 6px; }
.preview .item-tools, .preview .item-body .icon-button.small, .preview .item-body .button.small, .preview .profile-source .button { display: none !important; }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 1000px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-2 { grid-column: span 2; } }
@media (min-width: 1700px) { .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .span-2 { grid-column: span 3; } }
fieldset { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 12px 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field .label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.field .value { padding: 9px 0; }
.wide, fieldset > .hint { grid-column: 1 / -1; }
.presets { display: flex; gap: 6px; }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: 10px; }
.fellows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fellows li { display: grid; grid-template-columns: 1fr 44px; grid-template-areas: "name x" "role role" "group team"; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.fellows li > input[aria-label="Name"] { grid-area: name; }
.fellows li > select { grid-area: role; }
.fellows li > button { grid-area: x; }
@media (min-width: 720px) {
  .fellows li { grid-template-columns: 2fr 1fr 2fr 80px 44px; grid-template-areas: "name role group team x"; border: 0; padding: 0; background: none; }
}
.site-picker .row input { flex: 1 1 200px; }
.choices { list-style: none; margin: 6px 0 0; padding: 0; max-height: 300px; overflow-y: auto; }
.choices button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px; min-height: 44px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; cursor: pointer; flex-wrap: wrap; }
.choices button:hover { background: var(--accent-soft); }
.site-chosen { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.site-chosen > span { flex: 1; }

/* ---- profile, settings, people ---- */
.profile-grid, .settings-grid { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 1100px) { .profile-grid, .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1700px) { .profile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.profile-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.profile-row > .field { flex: 1 1 220px; }
.profile-row .audience { padding-bottom: 2px; }
.certs { list-style: none; margin: 0 0 12px; padding: 0; }
.certs li { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cert-main { flex: 1 1 200px; display: flex; flex-direction: column; }
.cert-share { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.share-item { display: flex; flex-direction: column; gap: 2px; }
.share-item .sub { font-size: .75rem; }
.cert-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.cert-form .row { grid-column: 1 / -1; }
.certs li > .cert-form { flex: 1 1 100%; } /* a card being edited: the form takes its whole row */
.preview-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.preview-list dt { color: var(--muted); }
.preview-list dd { margin: 0; }
.preview-list dd.hidden { color: var(--muted); font-style: italic; }
.person-detail .row .field { max-width: 360px; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.danger h2 { color: var(--danger); }

/* ---- a dive's page: items on paper ---- */
.dive-page { margin: 4px 0 18px; }
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.template-pick { display: flex; align-items: center; gap: 8px; }
.template-pick span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.template-pick select { width: auto; }
.page-tools .arranging { margin-left: auto; font-size: .8rem; }
.page-add { margin-top: 12px; }
.add-menu { position: relative; }
.add-menu summary { list-style: none; }
.add-menu ul { position: absolute; z-index: 2000; top: calc(100% + 4px); left: 0; width: min(320px, 86vw); margin: 0; padding: 6px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .16); }
.add-list li button { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 8px; min-height: 44px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; }
.add-list li button:hover, .add-list li button:focus-visible { background: var(--raised); }
.add-list li button > span { display: flex; flex-direction: column; }
.add-list .sub { font-size: .8rem; color: var(--muted); }

.paper { position: relative; isolation: isolate; width: 100%; box-sizing: content-box; container-type: inline-size; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 10px rgb(0 0 0 / .08); background-image: linear-gradient(transparent calc(var(--ruled, 28px) - 1px), var(--paper-line) 0); background-size: 100% var(--ruled, 28px); touch-action: none; }
.paper .item { position: absolute; font-size: clamp(11px, 1.15cqw, 16px); transform-origin: center; }
.paper-medium .item { font-size: clamp(11px, 2cqw, 16px); }
.paper .item input, .paper .item select, .paper .item textarea { min-height: 2.2em; padding: .35em .5em; font-size: 1em; border-radius: 6px; }

/* an item's paper (background, border, shadow) is a layer under it, so fading it (--fade) leaves its controls and menus solid */
.item { --item-bg: var(--panel); --item-line: var(--line); --item-shadow: 0 1px 4px rgb(0 0 0 / .08); position: relative; isolation: isolate; container-type: inline-size; display: flex; flex-direction: column; color: var(--text); border: 1px solid transparent; border-radius: 10px; }
.item::before { content: ""; position: absolute; inset: -1px; z-index: -1; border: 1px solid var(--item-line); border-radius: inherit; background: var(--item-bg); box-shadow: var(--item-shadow); opacity: var(--fade, 1); pointer-events: none; }
.item > .item-body, .item-bar > .item-title { opacity: var(--fade, 1); }
.item.style-plain { --item-bg: transparent; --item-line: transparent; --item-shadow: none; }
.item.style-sticky { --item-bg: var(--sticky, var(--sticky-yellow)); --item-line: transparent; --item-shadow: 0 1px 2px rgb(0 0 0 / .12), 0 8px 18px rgb(0 0 0 / .2); border-radius: 2px; color: var(--sticky-ink); }
.colour-yellow { --sticky: var(--sticky-yellow); }
.colour-pink { --sticky: var(--sticky-pink); }
.colour-blue { --sticky: var(--sticky-blue); }
.colour-green { --sticky: var(--sticky-green); }
.item.selected { outline: 2px solid var(--accent); outline-offset: 3px; }
.item.marked { outline: 2px dashed var(--accent); outline-offset: 3px; }
.paper .band { position: absolute; z-index: 6000; border: 1px dashed var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); pointer-events: none; }
/* the tools for several selected items: a small menu at the mouse, a moment after they are selected */
.arrange-menu { position: absolute; z-index: 3000; display: flex; align-items: center; gap: 2px; padding: 3px 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); animation: arrange-in .12s ease-out; }
.arrange-menu .hint { min-width: 1.6em; margin: 0 2px 0 4px; font-variant-numeric: tabular-nums; text-align: center; }
.arrange-menu .icon-button:disabled { opacity: .35; }
@keyframes arrange-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .arrange-menu { animation: none; } }
.item-bar { display: flex; align-items: center; gap: 4px; padding: .25em .4em; min-height: 2.6em; }
.item-title { flex: 1; min-width: 0; font-weight: 700; font-size: .92em; overflow-wrap: anywhere; line-height: 1.25; }
.item-body { padding: 0 .7em .7em; min-width: 0; }
.item .audience summary { min-height: 2.2em; padding: .2em .5em; font-size: .78em; background: transparent; }
.item .item-tools .audience summary .seen-by { display: none; }
.icon-button.small { width: 2em; height: 2em; min-height: 0; border-radius: 6px; color: inherit; }
.button.small { min-height: 2.2em; padding: .2em .7em; font-size: .9em; }
.handle { position: absolute; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent); background: var(--panel); color: var(--accent); cursor: pointer; touch-action: none; padding: 0; }
.handle.turn { top: -13px; left: -13px; cursor: grab; }
.handle.width { right: -13px; top: calc(50% - 13px); cursor: ew-resize; }
.handle.size { right: -13px; bottom: -13px; cursor: nwse-resize; }

.item-menu { position: relative; }
.item-menu summary { list-style: none; display: inline-grid; place-items: center; cursor: pointer; }
.item-menu-body { position: absolute; z-index: 30; right: 0; top: calc(100% + 4px); width: 250px; display: grid; gap: 10px; padding: 10px; font-size: 14px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .16); }
.item-menu-body fieldset { display: block; padding: 0; border: 0; background: none; }
.item-menu-body legend { padding: 0 0 4px; font-size: .8rem; color: var(--muted); }
.field-inline { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; font-size: .85rem; }
.field-inline span { grid-column: 1 / -1; color: var(--muted); font-weight: 600; }
.field-inline input[type="range"] { min-height: 0; padding: 0; border: 0; background: none; accent-color: var(--accent); }
.field-inline select { grid-column: 1 / -1; min-height: 36px; padding: 6px 8px; }
.field-inline input:not([type="range"]) { grid-column: 1 / -1; min-height: 36px; padding: 6px 8px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; background: var(--panel); }
.swatch.style-sticky { background: var(--sticky); }
.swatch.style-plain { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--line) 4px 5px); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; }
.segmented button { flex: 1; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: var(--text); font: inherit; font-size: .82rem; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }


/* item contents */
.note-text { font: inherit; border: 0; background: transparent; resize: none; min-height: 5em; padding: 0; color: inherit; line-height: 1.4; }
.note-text:focus-visible { outline: 1px dashed currentColor; outline-offset: 2px; }
.dive-number { font-size: clamp(1.4em, 42cqw, 7em); font-weight: 800; line-height: 1; text-align: center; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--accent); }
.item .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5em; margin: 0; }
.item .stat { padding: .4em .6em; }
.item .stat .value { font-size: 1.1em; }
.item .event-people { grid-template-columns: 1fr; }
.gear { display: grid; gap: .5em; }
.cyl { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5em, 1fr)); gap: .4em; padding: .5em; background: var(--raised); position: relative; }
.cyl legend { font-size: .85em; }
.cyl > button { position: absolute; top: .2em; right: .2em; }
.stars { display: flex; gap: 2px; }
.stars button { border: 0; background: none; font-size: 1.6em; line-height: 1; padding: 0 .05em; cursor: pointer; color: var(--line); }
.stars button.on { color: #e3a008; }
.species { --row: var(--ruled, 2.2em); }
.sightings li.sighting { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name many tools" "note note note"; align-items: center; column-gap: 6px; padding: 0; }
@container (min-width: 440px) { .sightings li.sighting { grid-template-columns: minmax(8em, 1fr) auto minmax(0, 1.4fr) auto; grid-template-areas: "name many note tools"; } }
.sighting .sp-name { grid-area: name; min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.sighting .sci, .sp-choices .sci { color: var(--muted); font-size: .88em; }
.sighting .worms { display: inline-flex; vertical-align: middle; margin-left: 4px; color: var(--muted); }
.sighting .sp-many { grid-area: many; }
.species select.sp-many { width: auto; field-sizing: content; min-height: 0; height: calc(var(--row) - 4px); padding: 0 8px; border-radius: 999px; font-size: .85em; color: var(--muted); appearance: none; text-align: center; cursor: pointer; }
.species select.sp-many.set { color: var(--text); background: var(--accent-soft); border-color: transparent; font-weight: 600; }
.species input.sp-many { width: 4.5em; }
.sighting .sp-note { grid-area: note; }
.sighting .sp-tools { grid-area: tools; display: flex; }
.species input.sp-many, .sp-add input { min-height: 0; height: var(--row); padding: 0 6px; border-radius: 6px; }
.species textarea.sp-note { min-height: var(--row); height: auto; field-sizing: content; resize: none; overflow: hidden; padding: calc((var(--row) - 1lh) / 2) 6px; border-radius: 6px; line-height: 1.35; }
.paper .species textarea.sp-note { line-height: var(--row); padding-block: 0; }
.sighting .rank { color: var(--muted); font-size: .8em; }
.sp-add { position: relative; margin-top: 2px; }
.sp-choices { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 2px); min-width: 240px; max-height: 300px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .16); font-size: 14px; color: var(--text); }
.sp-choices button { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; width: 100%; padding: 8px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sp-choices button:hover, .sp-choices button.on { background: var(--accent-soft); }
.sp-choices .sub { margin-left: auto; }
.sp-state { padding: 8px; color: var(--muted); }
.link-item { display: grid; gap: .4em; overflow-wrap: anywhere; }
.stamp-ink { display: grid; place-items: center; aspect-ratio: 1; border: .3em double var(--ink); border-radius: 50%; color: var(--ink); mix-blend-mode: multiply; }
.stamp-ink input { width: 90%; border: 0; background: transparent; text-align: center; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: inherit; font-size: 1.1em; }
@media (prefers-color-scheme: dark) { .stamp-ink { mix-blend-mode: screen; } }

/* phones: one under the other */
.page-column { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.page-column .item { font-size: 15px; }

/* the item's own width decides how much its "Seen by" says, so the title keeps its room */



/* quiet by default: an item's controls show on hover (mouse), when selected, or after a long press (touch) */
.item .item-tools, .item .item-body .icon-button.small, .item .item-body .button.small { opacity: 0; pointer-events: none; transition: opacity .15s; }
.item.chrome .item-tools, .item.chrome .item-body .icon-button.small, .item.chrome .item-body .button.small,
.item:focus-within .item-tools, .item:focus-within .item-body .icon-button.small, .item:focus-within .item-body .button.small { opacity: 1; pointer-events: auto; }
@media (hover: hover) {
  .item:hover .item-tools, .item:hover .item-body .icon-button.small, .item:hover .item-body .button.small { opacity: 1; pointer-events: auto; }
}
.item:not(.chrome):not(:focus-within) .item-body input, .item:not(.chrome):not(:focus-within) .item-body textarea { border-color: transparent; background: transparent; }
@media (hover: hover) { .item:hover .item-body input { border-color: var(--line); } }
.item .item-body input::placeholder { opacity: .6; }

/* the profile: the planner's plot, a sketch until there is a recording */
.dive-plot svg.chart { min-height: 0; border-radius: 6px; }
.dive-plot.sketch { opacity: .75; }
.profile-source { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: .4em 0 0; font-size: .82em; color: var(--muted); }
.button.cta { min-height: 2.4em; padding: .3em .9em; font-size: .9em; border-color: var(--accent); color: var(--accent); }
.add-list li button:disabled { opacity: .5; cursor: default; }
.segmented button:disabled { opacity: .4; cursor: default; }

/* a modal dialog: the profile editor, the dive computer download */
dialog.modal { width: min(900px, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); }
dialog.modal::backdrop { background: rgb(0 0 0 / .35); }
dialog.modal > header, dialog.modal > footer { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
dialog.modal > header h2 { flex: 1; margin: 0; font-size: 1.1rem; }
dialog.modal > footer { justify-content: flex-end; border-top: 1px solid var(--line); }
.profile-editor > header .segmented { flex: none; width: 220px; }
.profile-editor > :not(header):not(footer) { margin-inline: 16px; }

/* the dive computer download */
dialog.computer-dialog { width: min(640px, 96vw); }
dialog.computer-dialog[open] { display: flex; flex-direction: column; }
@media (max-width: 600px) { dialog.computer-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; } }
.computer-dialog > header { border-bottom: 1px solid var(--line); }
.computer-dialog > header h2 { min-width: 0; }
.computer-dialog > footer { justify-content: flex-start; }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 16px; }
.modal-body h3 { margin: 16px 0 6px; font-size: 1rem; }
.modal-body h4 { margin: 12px 0 4px; font-size: .92rem; }
.dc-way { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dc-steps { margin: 4px 0 10px; padding-left: 1.3em; font-size: .92rem; }
.dc-steps li + li { margin-top: 2px; }
.dc-why { margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--raised); font-size: .92rem; overflow-wrap: anywhere; }
.dc-why p { margin: 0 0 6px; }
.dc-why code { font-size: .85em; overflow-wrap: anywhere; }
.dc-why .link { padding: 0 4px; font-size: .9em; }
.dc-brands { margin-top: 10px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dc-models, .dc-found, .dc-reach { list-style: none; margin: 6px 0 0; padding: 0; }
.dc-models li, .dc-found li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dc-models .name, .dc-found .name { flex: 1 1 180px; }
.dc-models .ways, .dc-found .ways { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-reach li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 6px 0; }
.dc-reach li.ok { color: var(--text); }
.dc-reach li.no span { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.dc-reach li.ok svg { color: var(--accent); }
.way { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; cursor: default; }
.way.ok { border-color: var(--accent); color: var(--accent); }
.way.no { color: var(--muted); text-decoration: line-through; }
.dc-only-new { margin-top: 12px; }
.dc-status .dc-hint { flex-basis: 100%; font-size: .9rem; }
.dc-which section:first-child h3 { margin-top: 8px; }
.dc-which h3 .sub { font-weight: normal; }
.dc-ble-buttons { align-items: center; }
/* the computer's dive list: tick which to download; the buttons stay in sight under a long list */
.dc-choose-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.dc-choose-head h3 { flex: 1 1 auto; margin-right: 8px; }
.dc-list { list-style: none; margin: 4px 0 8px; padding: 0; }
.dc-list li { border-bottom: 1px solid var(--line); }
.computer-dialog .dc-list .check { display: flex; align-items: center; gap: 10px; padding: 8px 4px; min-height: 44px; cursor: pointer; font-variant-numeric: tabular-nums; }
.dc-list .num { min-width: 3.5ch; color: var(--muted); }
.dc-list .when { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-list .num, .dc-list .depth, .dc-list .dur, .dc-list .badge { flex: none; }
.dc-list .depth, .dc-list .dur { min-width: 6ch; text-align: right; }
.dc-list .dur { color: var(--muted); }
.dc-list li.mark-here { color: var(--muted); }
.dc-list li.mark-here .check { cursor: default; }
.dc-list .badge.here { background: var(--ok-soft); color: var(--ok); }
.dc-choose-go { position: sticky; bottom: -16px; margin: 8px -16px -16px; padding: 10px 16px 16px; background: var(--panel); border-top: 1px solid var(--line); }
.dc-switches { list-style: none; margin: 6px 0 10px; padding: 0; font-size: .9rem; }
.dc-switches > li { padding: 8px 10px; border-radius: 10px; }
.dc-switches > li + li { margin-top: 4px; }
.dc-switches > li.here { background: var(--accent-soft); }
.dc-switches ul { list-style: none; margin: 4px 0 0; padding: 0; }
.dc-switches code { font-size: .85em; overflow-wrap: anywhere; }
.dc-switches .link { padding: 0 4px; font-size: .9em; }
.dc-switches .hint { display: block; margin: 2px 0 0; }
/* a download going on with its dialog hidden: a card above the page, a tap on Show brings the dialog back */
.dc-card { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 28px rgb(0 0 0 / .18); }
.dc-card > svg { color: var(--accent); }
.dc-card.busy > svg { animation: dc-pulse 1.6s ease-in-out infinite; }
.dc-card .text { font-size: .9rem; overflow-wrap: anywhere; }
.dc-card .actions { display: flex; align-items: center; gap: 4px; }
.dc-card progress { grid-column: 1 / -1; width: 100%; height: 6px; }
.dc-card.done { border-color: var(--ok); }
.dc-card.done > svg { color: var(--ok); }
.dc-card.error { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.dc-card.error > svg { color: var(--danger); }
@media (min-width: 720px) { .dc-card { left: auto; right: 20px; bottom: 20px; width: 420px; } }
/* the dive computer button in sight (the dives list): the button itself shows the download, no card */
.app.section-dives:not(.has-detail) .dc-card { display: none; }
@media (min-width: 720px) { .app.section-dives .dc-card { display: none; } }
/* the dive computer button: a button, its icon big; a running download shows on it */
.dc-button { position: relative; overflow: hidden; gap: 4px; min-width: 44px; padding-inline: 9px; }
.dc-button .dc-short { font-variant-numeric: tabular-nums; min-width: 2.4em; text-align: left; font-size: .9rem; }
.dc-button.busy { border-color: var(--accent); color: var(--accent); }
.dc-button.busy svg { animation: dc-pulse 1.6s ease-in-out infinite; }
.dc-button.done { border-color: var(--ok); color: var(--ok); }
.dc-button.error { border-color: var(--danger); color: var(--danger); }
.dc-button progress { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 4px; border: 0; appearance: none; background: transparent; }
.dc-button progress::-webkit-progress-bar { background: transparent; }
.dc-button progress::-webkit-progress-value { background: var(--accent); }
.dc-button progress::-moz-progress-bar { background: var(--accent); }
@keyframes dc-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dc-card.busy > svg, .dc-button.busy svg { animation: none; } }
.point-table table { border-collapse: collapse; width: 100%; max-width: 420px; }
.point-table th { text-align: left; font-size: .8rem; color: var(--muted); padding: 4px; }
.point-table td { padding: 2px 4px; }
.point-table input { min-height: 36px; padding: 4px 8px; }
.profile-editor .figures { margin-top: 8px; }
.profile-editor .preview { margin-top: 6px; }
.profile-editor .preview svg.chart { height: min(34vh, 300px); }
.smooth-toggle { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .9rem; }
.smooth-toggle input { width: 18px; height: 18px; min-height: 0; }

/* an item's fields (its Edit): on the page when selected, and in the edit form */
.edit-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(8em, 1fr)); gap: .5em .7em; }
.edit-fields .wide { grid-column: 1 / -1; }
.gear-edit { display: grid; gap: .6em; }
.cyl-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5em, 1fr)); gap: .5em; padding-bottom: .6em; border-bottom: 1px solid var(--line); }
.cyl-row .presets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.item .field .label { font-size: .8em; }
.item .field .hint { font-size: .75em; }
.people-edit { display: grid; gap: .6em; }
.lines li { padding: .15em 0; border: 0; }
.lines-inline { margin: 0; line-height: 1.5; }

/* on paper, everything that runs in lines uses the paper's ruling: bars, list rows, note lines */
.paper .item { border-width: 0; }
.paper .item-bar { min-height: var(--ruled); padding-top: 0; padding-bottom: 0; }

.paper .item-body { padding-bottom: 0; min-height: var(--ruled); }
.paper .item .plain li, .paper .item .lines li, .paper .event-people li { min-height: var(--ruled); line-height: calc(var(--ruled) - 1px); padding: 0; border-bottom: 1px solid transparent; }
.paper .item .species li { padding: 0; line-height: 1.25; }
.paper .item:has(.sp-choices) { z-index: 5000 !important; }
.paper .note-text { line-height: var(--ruled); padding: 0; min-height: calc(var(--ruled) * 4); background: transparent; }
.paper .lines-inline { line-height: var(--ruled); }
.paper .item .stars button { line-height: var(--ruled); height: var(--ruled); }
.save-template .pop { position: absolute; z-index: 2000; top: calc(100% + 4px); left: 0; width: min(320px, 86vw); display: grid; gap: 10px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .16); }
.save-template .check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.save-template .check input { width: 18px; height: 18px; min-height: 0; }
.computer-dialog .check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.computer-dialog .check input { width: 18px; height: 18px; min-height: 0; }
.computer-dialog .model-pick { margin-top: 6px; }
.dc-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--raised); }
/* always in sight while the dialog scrolls: what a tap started shows at once */
.computer-dialog .dc-status { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -6px 14px var(--panel); }
.dc-status.error { background: var(--danger-soft); color: var(--danger); }
.dc-status progress { flex: 1 1 160px; }
.dc-about { flex: 1; }
.dc-about summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.save-template .segmented button { min-height: 38px; }
.danger-link { color: var(--danger); justify-self: start; }

/* an item's controls: a small toolbar on its top edge, outside the item, so the title is never cut */
.item-tools { position: absolute; z-index: 5; right: 0; bottom: 100%; display: flex; align-items: center; gap: 2px; padding: 2px 2px 3px; font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--text); }
.item-tools .item-tools .icon-button.small { width: 28px; height: 28px; }
.item-tools .audience summary { min-height: 28px; height: 28px; padding: 0 8px; font-size: 12px; }
.page-column .item-tools { position: static; order: 2; align-self: flex-end; border: 0; background: none; padding: 0; }
.page-column .item { flex-direction: column; }
.page-column .item-tools { margin: .2em .2em -2em 0; }


/* an item at the top of the paper has its toolbar under it, not above the paper's edge */
.item.tools-below > .item-tools { bottom: auto; top: 100%; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; }

.item-bar > .icon { flex: none; opacity: .7; }

/* an item's open menu, or the toolbar being used, shows above the other items without changing the stacking */
.paper .item:has(details[open]), .paper .item:has(.item-tools:hover) { z-index: 5000 !important; }

/* the edit form: each item a section with its icon, title and "Seen by", then its fields */
.form-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.form-item > header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form-item > header h2 { margin: 0; font-size: 1rem; flex: 1; }
.form-item > header .sub { font-size: .78rem; color: var(--muted); }
.form-item .note-text { min-height: 6em; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--panel); }
.add-row { display: flex; align-items: center; gap: 12px; }

.empty-item { margin: 0; color: var(--muted); }
.who-list li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.outing { margin: 0 0 .3em; font-weight: 600; }
.fellows.simple li { grid-template-columns: 2fr 1fr 44px; grid-template-areas: "name role x"; border: 0; padding: 0; background: none; }
.fellows.groups li { display: grid; grid-template-columns: 1.2fr 2fr 1fr; gap: 6px; align-items: center; border: 0; padding: 0; background: none; }
.fellows.groups .who { font-weight: 600; }

/* the drawing item */
.drawing { display: block; width: 100%; height: auto; }
.drawing.canvas { background: var(--paper); border: 1px dashed var(--line); border-radius: 6px; touch-action: none; cursor: crosshair; }
.style-sticky .drawing.canvas, .style-plain .drawing.canvas { background: transparent; }
.drawing-edit { display: grid; gap: .4em; }
.draw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.draw-tools button { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); cursor: pointer; font-size: 12px; }
.draw-tools button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.draw-tools button:disabled { opacity: .4; cursor: default; }
.draw-tools .colour { width: 24px; min-width: 24px; height: 24px; border-radius: 50%; }
.draw-tools .dot { display: block; border-radius: 50%; background: currentColor; }
.draw-tools .sep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }

/* the title bar moves the item */
.paper .item-bar { cursor: grab; user-select: none; touch-action: none; }
.paper .item-bar:active { cursor: grabbing; }
.paper .item-bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 6px; }

/* the full plot in an item: the toolbar on top (the item is narrower than the planner's card) */
.full-plot .plot-row { flex-direction: column; align-items: stretch; gap: 2px; position: relative; }
.full-plot .plotbar { flex-direction: row; flex: none; width: auto; padding: 0 16px 0 0; overflow-x: auto; }
.full-plot .plotbar .pg { flex-direction: row; }
.full-plot .plotbar .psep { width: 1px; height: auto; margin: 6px 3px; align-self: stretch; }
.full-plot .pb { width: 28px; height: 28px; }
.full-plot { position: relative; }
.item .full-plot .plotbar { opacity: 0; transition: opacity .15s; }
.item.chrome .full-plot .plotbar, .item:hover .full-plot .plotbar, .item:focus-within .full-plot .plotbar, .form-item .full-plot .plotbar { opacity: 1; }

.pop-head { display: flex; align-items: center; justify-content: space-between; }
.save-template .saved { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-weight: 600; display: flex; gap: 6px; align-items: center; }

/* the Add menu: grouped; where the paper was right-clicked, a floating copy */
.add-list .group { padding: 8px 8px 2px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dive-page { position: relative; }
.add-here { position: absolute; z-index: 3000; width: min(320px, 86vw); max-height: 70vh; overflow: auto; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); }
.add-here ul { list-style: none; margin: 0; padding: 0; }

/* the profile's own button stays visible: it is how a hand-made profile is edited */
.item .item-body .profile-source .button { opacity: 1; pointer-events: auto; }

/* the dive site */
.site-where { margin: 0 0 .4em; color: var(--muted); font-size: .9em; }
.site-map { height: clamp(160px, 60cqw, 360px); border-radius: 8px; border: 1px solid var(--line); z-index: 0; }
.site-map-wrap { display: grid; gap: .3em; }
.all-sites { justify-self: start; font-size: .85em; }
.leaflet-container { font: inherit; }

/* the planner's editor in the profile dialog */
.planner-pad { display: grid; gap: 6px; }
.pad-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pad-tools .hint { margin-left: 4px; font-size: .85rem; }
.pad-graph { position: relative; touch-action: none; }
.pad-graph svg.chart { min-height: 0; border-radius: 8px; }
.flip { display: inline-flex; transform: scaleX(-1); }

/* ---- sync with a node ---- */
.sync-warn { padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: .9rem; }
.block .check { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-size: .92rem; }
.block .check input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; }
.block .check.ask { width: fit-content; outline: 2px solid var(--warn); outline-offset: 4px; border-radius: 6px; }
.block .sync-h { margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.sync-ask { color: var(--warn); margin-top: 0; }
.sync-who { margin-bottom: 2px; word-break: break-all; }
.sync-status.error, .sync-status.offline { color: var(--warn); }
.sync-leave { padding: 8px 10px; border-radius: 10px; background: var(--danger-soft); }
.sync-leave span { flex: 1 1 200px; }
.link.danger { color: var(--danger); }
.sync-delete { padding: 4px 0; } /* in line with the text above */
.sync-id code { font-size: .85em; }
.sync-link, .sync-recovery { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
.sync-link p { margin: 0 0 6px; }
.link-code { font-size: 1.25rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.recovery-code { display: block; margin: 6px 0 8px; font-size: 1rem; letter-spacing: .04em; word-break: break-all; user-select: all; }

/* ---- signing a dive together (ui/sign.tsx) ---- */
dialog.modal.sign-dialog { width: min(560px, 96vw); }
.sign-code { display: grid; justify-items: center; gap: 8px; margin: 8px 0 14px; }
.sign-code figcaption { color: var(--muted); text-align: center; font-size: .92rem; }
.qr { width: min(320px, 78vw); aspect-ratio: 1; }
.qr svg { display: block; width: 100%; height: 100%; }
.identity-link { margin: 8px 0; }
.identity-link .form-error { margin-top: 8px; }
.signed-badge { border: 0; cursor: pointer; font: inherit; background: var(--ok-soft); color: var(--ok); }
.signed-mark { color: var(--ok); white-space: nowrap; }
.signed-mark svg, .signed-badge svg { vertical-align: -2px; }
.sign-when { display: block; color: var(--muted); font-size: .82rem; }
.sign-print { margin: 10px 0 2px; }
.sign-print code { font-size: 1rem; letter-spacing: .04em; }
.steps { margin: 0 0 12px; padding-left: 1.3em; color: var(--muted); font-size: .92rem; }
.steps li + li { margin-top: 4px; }
.sign-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 8px 0; }
.sign-summary dt { color: var(--muted); font-size: .9rem; }
.sign-summary dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sign-people li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 2px 0; }
.sign-people .signed { display: inline-flex; align-items: center; gap: 2px; color: var(--ok); font-size: .88rem; }
.sign-people .status { color: var(--warn); font-size: .88rem; }
.sign-why { color: var(--muted); }
.sign-said { font-weight: 600; }
.sign-page .block { max-width: 560px; margin-top: 14px; }
.sign-as { display: grid; gap: 2px; margin: 14px 0 6px; padding: 0; border: 0; }
.sign-as legend { margin-bottom: 4px; padding: 0; font-weight: 600; }
.block .sign-as .check { margin: 4px 0; }
.sign-dive { margin: 10px 0 16px; }
.sign-dive select { max-width: 100%; }
.sign-done { display: grid; justify-items: center; gap: 12px; }
.scanner { display: grid; gap: 10px; }
.scanner video { width: 100%; max-height: 60vh; border-radius: 10px; background: #000; object-fit: cover; }
.scanner-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* choosing a node (node-setup.tsx): a lookup, then the node in its own words */
.lookup { align-items: flex-start; }
.lookup > .field { flex: 1 1 220px; }
.lookup > .button, .lookup > .lookup-actions { margin-top: 22px; } /* level with the input, below its label */
.lookup-actions { display: flex; gap: 8px; } /* Look up and Scan stay together when the row wraps */
@media (max-width: 420px) { .lookup > .lookup-actions { margin-top: 0; } } /* on a phone they wrap under the field */
.node-card { display: grid; gap: 8px; margin: 10px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.node-card > * { margin: 0; }
.node-head { display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.node-says { margin: 0; padding: 8px 10px; border-left: 3px solid var(--line); background: var(--panel); border-radius: 0 8px 8px 0; font-size: .92rem; }
.node-says .sub { display: block; font-size: .8rem; }
.sites-now { align-items: center; justify-content: space-between; }
.sites-now p { margin: 0; overflow-wrap: anywhere; }
.suggestion .link { padding: 0; }

/* ---- about ---- */
.made-with-line { margin: 4px 0 0; }
.about .lead { max-width: 60ch; margin: 10px 0 14px; }
.about .block ul { margin: 0; padding-left: 1.1em; }
.about .block li + li { margin-top: 6px; }
.about-copy { margin: 4px 0 0; }
.dc-help { margin: 0 0 6px; font-size: .9rem; }

/* ---- passkeys (sync-settings.tsx) ---- */
.passkey-list { list-style: none; margin: 6px 0 10px; padding: 0; }
.passkey-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.passkey-list li:last-child { border-bottom: 1px solid var(--line); }
.about-version { margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.stale { display: block; margin: 4px 0 0; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: .88rem; }
.scan-what { margin: 0 0 10px; }

/* ---- settings, in groups (settings.tsx): a group's title, then its blocks; a block's own title is its h3 ---- */
.settings-here { margin: 12px 0 4px; }
.settings-group { margin: 22px 0 6px; }
.settings-group > h2 { font-size: 1.2rem; margin: 0 0 2px; }
.settings-group > .group-intro { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.settings-group .block > h3:first-child { font-size: 1.02rem; margin: 0 0 10px; color: var(--text); }
.settings-group .danger > h3:first-child { color: var(--danger); }

/* Leaflet 1.9.4 (BSD-2-Clause) */
/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(images/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(images/marker-icon.png);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}

/* fonts (src/fonts.ts) */
.font-system .item-body{font-family:system-ui, -apple-system, "Segoe UI", sans-serif}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2");}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2");}
.font-atkinson .item-body{font-family:"Atkinson Hyperlegible", system-ui, sans-serif}
@font-face{font-family:"Lora";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/lora-latin-400-normal.woff2) format("woff2");}
@font-face{font-family:"Lora";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/lora-latin-700-normal.woff2) format("woff2");}
.font-lora .item-body{font-family:Lora, Georgia, serif}
@font-face{font-family:"Patrick Hand";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/patrick-hand-latin-400-normal.woff2) format("woff2");size-adjust:108%;}
.font-patrick-hand .item-body{font-family:"Patrick Hand", cursive}
@font-face{font-family:"Kalam";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/kalam-latin-400-normal.woff2) format("woff2");}
@font-face{font-family:"Kalam";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/kalam-latin-700-normal.woff2) format("woff2");}
.font-kalam .item-body{font-family:Kalam, cursive}
@font-face{font-family:"Caveat";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/caveat-latin-400-normal.woff2) format("woff2");size-adjust:125%;}
@font-face{font-family:"Caveat";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/caveat-latin-700-normal.woff2) format("woff2");size-adjust:125%;}
.font-caveat .item-body{font-family:Caveat, cursive}
@font-face{font-family:"Indie Flower";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/indie-flower-latin-400-normal.woff2) format("woff2");size-adjust:105%;}
.font-indie-flower .item-body{font-family:"Indie Flower", cursive}
.style-sticky:not([class*=" font-"]) .item-body{font-family:"Patrick Hand", cursive}
