/* Shared by every page: colours, type, buttons, the top bar and person menu, the sign-in, checkout and Buy credits
   pop-ups, and the footer. Plan: docs/plan-restructure.md */
/* Layout: a photo-led landing page (hero, examples, steps, trip band) that opens into the two-column studio */
:root {
  --bg: #F3F8F8; --sand: #F2EBDD; --surface: #FFFFFF; --sunk: #EAF2F2; --fg: #0A2A3B; --muted: #476270; --line: #D2E1E2;
  --accent: #07778C; --accent-fg: #FFFFFF; --deep: #062636; --brand2: #0E8A82;
  --warn: #9A4A12; --warn-bg: #FFF3C4; --warn-fg: #5C4300; --warn-line: #E2C25C;
  --vote: #C2410C; --vote-bg: #FFE4D6; --gold: #B7791F; --gold-fg: #FFFFFF; --ok: #1E8A4C; --coral: #D94848;
  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --script: 'Caveat', 'Bradley Hand', cursive;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #04141F; --sand: #0A2230; --surface: #0B1F2D; --sunk: #08192A; --fg: #E3F0F2; --muted: #93ABB4; --line: #1D3747;
  --accent: #5ED3DD; --accent-fg: #04212A; --deep: #021019; --brand2: #4FD6CB; --warn: #FFDE85; --warn-bg: #3A300C; --warn-fg: #FFDE85; --warn-line: #7D6623; --vote: #FFB38A; --vote-bg: #3A1E10; --gold: #F5C04E; --gold-fg: #2A1E00; --ok: #4ADE80; --coral: #FF6B6B; color-scheme: dark }
}
:root[data-theme="dark"] {
  --bg: #04141F; --sand: #0A2230; --surface: #0B1F2D; --sunk: #08192A; --fg: #E3F0F2; --muted: #93ABB4; --line: #1D3747;
  --accent: #5ED3DD; --accent-fg: #04212A; --deep: #021019; --brand2: #4FD6CB; --warn: #FFDE85; --warn-bg: #3A300C; --warn-fg: #FFDE85; --warn-line: #7D6623; --vote: #FFB38A; --vote-bg: #3A1E10; --gold: #F5C04E; --gold-fg: #2A1E00; --ok: #4ADE80; --coral: #FF6B6B; color-scheme: dark }
* { box-sizing: border-box }
html { scroll-padding-top: 72px }
[hidden] { display: none !important }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.5; padding: 0; margin: 0 }
.inner { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
/* top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--bg) }
.topbar .inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px }
/* the three products (Dive log, Editor, Photo Fix) in the top bar of every page but the home page; a row of their own on phones */
.prodnav { display: flex; gap: 4px; flex: 1; justify-content: flex-end }
.prodnav a { position: relative; padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap }
.prodnav a:hover { color: var(--fg); background: var(--sunk) }
.prodnav a[aria-current] { color: var(--fg) }
.prodnav a[aria-current]::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent) }
.topbar a.btnlink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap }
.topbar a.btnlink.primary { background: var(--accent); color: var(--accent-fg) }
.topbar a.brand { text-decoration: none }
@media (max-width: 760px) {
  .topbar.withprods .inner { flex-wrap: wrap; row-gap: 0; min-height: 56px }
  .topbar.withprods .prodnav { order: 3; flex: 1 0 100%; justify-content: stretch; gap: 0; margin: 0 -4px }
  .topbar.withprods .prodnav a { flex: 1; text-align: center; padding: 10px 4px 12px; font-size: 14px; border-radius: 0 }
  .topbar.withprods .prodnav a:hover { background: none }
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 17px; letter-spacing: .02em; text-transform: uppercase; color: var(--fg); text-decoration: none; background: none; border: 0; padding: 0; min-height: 44px }
.brand svg { width: 34px; height: 34px; flex: none }
.brand b { font-weight: inherit; color: var(--brand2) }
.navlinks { display: flex; gap: 6px; align-items: center }
.navlinks a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: 14px; padding: 10px 10px; border-radius: 8px }
.navlinks a:hover { background: var(--sunk) }
@media (max-width: 640px) {
  .navlinks a.hide-sm { display: none }
}
@keyframes draw { to { stroke-dashoffset: 0 } }
html.deep #home { display: none }
.plans { margin-top: 32px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px }
@media (max-width: 1100px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)) }
}
@media (max-width: 760px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
@media (max-width: 560px) {
  .plans { grid-template-columns: minmax(0, 1fr) }
}
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 8px }
.plan .badge { position: absolute; top: -12px; left: 18px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-fg) }
.plan.best { border: 2px solid var(--gold) }
.plan.best .badge { background: var(--gold); color: var(--gold-fg) }
.plan.best .plan-price { color: var(--gold) }
@media (max-width: 960px) {
  .plans { row-gap: 26px }
}
.plan.hl { border: 2px solid var(--accent) }
.plan-name { font-family: var(--display); font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: 20px }
.plan-price { font-family: var(--display); font-size: 34px; line-height: 1.1; font-weight: 800; color: var(--fg); margin-top: 4px }
.plan-price small { font: 500 14px var(--body); color: var(--muted) }
.plan-per { font-size: 14px; color: var(--muted); margin-top: -4px }
.plan ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 6px }
.rcpt small.intrip { margin-left: 6px; font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--gold) }
/* a receipt: grey label on the left, bold value on the right (the cart, payment done, waiting) */
.rcpt { border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); padding: 4px 12px }
.rcpt > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; font-size: 15px }
.rcpt > div + div { border-top: 1px solid var(--line) }
.rcpt > div > span:first-child { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rcpt b { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap }
.rcpt .head { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: 0 }
.rcpt .head + div { border-top: 0 }
.rcpt .minus { color: var(--coral, #ff6b6b) }
.rcpt .plus { color: var(--ok) }
.rcpt .sum { border-top-color: var(--muted) !important }
.rcpt .sum > span:first-child { color: var(--fg); font-weight: 700 }
.rcpt .bal { padding-bottom: 9px }
.rcpt .bal + .head { border-top: 1px solid var(--line); padding-top: 9px }
.rcpt .after > span:first-child { color: var(--fg); font-weight: 700 }
.rcpt .after b { color: var(--accent) }
.rcpt .short b { color: var(--warn) }
.codialog { max-width: min(360px, calc(100vw - 32px)); width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--fg); padding: 24px }
.codialog::backdrop { background: rgba(2,14,24,.55) }
.codialog h2 { margin: 0 0 12px; font: 700 17px/1.25 var(--body); display: flex; align-items: center; gap: 10px }
.iconbtn { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; min-height: 0; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg); font: 600 13px var(--body); text-decoration: none }
.iconbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.iconbtn:hover { background: var(--sunk) }
/* phones: each file of a download on its own row with Save (fileSheet) */
.fsheet { border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); padding: 2px 12px; max-height: min(52vh, 420px); overflow-y: auto }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0 }
.frow + .frow { border-top: 1px solid var(--line) }
.frow .ft { min-width: 0; display: flex; flex-direction: column; gap: 2px }
.frow .ft b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.frow .ft small { color: var(--muted); font-size: 12px }
.frow .iconbtn { align-self: center; flex: none; background: transparent; cursor: pointer }
.frow .iconbtn.done { color: var(--ok); border-color: var(--ok) }
.frow .fshare { margin-left: auto; padding: 6px 9px }
.frow .fshare svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.frow .fshare + .iconbtn { margin-left: -4px }
/* the files pop-up: Share and Save all with their icons, Done grey until the saving is over */
.dlbtns { flex-wrap: wrap }
.dlbtns .ibtn { display: inline-flex; align-items: center; gap: 7px }
.dlbtns .ibtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.dlbtns button.primary:disabled { background: var(--sunk); color: var(--muted); border-color: var(--line); opacity: 1 }
.fline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; font-size: 13.5px; color: var(--muted) }
.fline .comark { width: 20px; height: 20px; flex: none }
.fline .iconbtn { align-self: auto; background: transparent; cursor: pointer }
.codialog form { margin-top: 14px }
/* sign-in, checkout and the account page */
.cobody { display: flex; flex-direction: column; gap: 10px }
.cobody p { margin: 0 }
.comark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center }
.comark svg { width: 15px; height: 15px; stroke-width: 3; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round }
.comark.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok) }
.comark.wait { border: 3px solid var(--line); border-top-color: var(--accent); animation: cospin 1s linear infinite; width: 20px; height: 20px; box-sizing: border-box }
@keyframes cospin { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) {
  .comark.wait { animation: none }
}
.cosum { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); font-weight: 600 }
.cosum span:last-child { color: var(--muted); margin-left: auto }
.codone { display: flex; align-items: center; gap: 14px; margin: 4px 0 2px }
.cobig { font: 900 30px/1.1 var(--display); font-stretch: 125%; color: var(--accent) }
.cobody input { font: 600 17px var(--body); color: var(--fg); background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 48px; width: 100%; box-sizing: border-box }
.cobody input.code { font-family: var(--mono); letter-spacing: .4em; text-align: center; font-size: 22px }
.cobody .err { color: var(--warn); font-size: 14px }
.cobody .err:empty { display: none }
.acctbtn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border-color: transparent; font-size: 14px; padding: 10px }
.acctbtn[hidden], .acctwrap[hidden] { display: none }
.acctwrap { position: relative; display: inline-flex; align-items: center; gap: 8px }
.acctbtn.me { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; border: 1px solid var(--line); background: var(--sunk) }
.acctbtn.me[aria-expanded="true"], .acctbtn.me:hover { border-color: var(--accent) }
.acctbtn img.pfp { display: none }
.acctbtn.me.pic { overflow: hidden; background: #06202f }
.acctbtn.me.pic img.pfp { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50% }
.acctbtn.me.pic svg { display: none }
.acctmenu .avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover }
.acctcount { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font: 700 12px/20px var(--body); text-align: center }
.acctcount[hidden] { display: none }
.acctmenu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 290px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0; overflow: hidden; box-shadow: 0 18px 44px rgba(0,0,0,.45); text-align: left }
.acctmenu[hidden] { display: none }
.acctmenu .mhead { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px }
.acctmenu .avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--brand2), #0e8a82); color: #04212A; font: 800 18px/40px var(--display); text-align: center }
.acctmenu .mhead > div { min-width: 0 }
.acctmenu .mtitle { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.acctmenu .who { color: var(--muted); font-size: 13px }
.acctmenu .mbal { margin: 4px 12px 12px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--sunk); border: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px }
.acctmenu .mtotal { display: flex; align-items: baseline; gap: 8px }
.acctmenu .mtotal b { font: 700 20px/1 var(--body); color: var(--fg) }
.acctmenu .mtotal span { color: var(--muted); font-size: 14px }
.acctmenu .mbal .mbuy { margin: 0 0 0 auto; width: auto; padding: 4px 12px; min-height: 0; font-size: 13px; font-weight: 600; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--accent) }
.acctmenu .mbal .mbuy:hover { border-color: var(--accent) }
.acctmenu .mkinds { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px }
.acctmenu .mkinds li { display: flex; align-items: center; gap: 10px; font-size: 14px }
.acctmenu .mkinds i { width: 10px; height: 10px; border-radius: 50%; background: #9fb3c8 }
.acctmenu .k-pack i { background: var(--accent) }
.acctmenu .k-trip i { background: var(--gold) }
.acctmenu .mkinds b { margin-left: auto; font-variant-numeric: tabular-nums }
.acctmenu .mkinds li.zero { color: var(--muted) }
.acctmenu .mkinds li.zero i { opacity: .45 }
.acctmenu .mfoot { border-top: 1px solid var(--line); padding: 6px 0 }
.acctmenu .mrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 18px; min-height: 0; border: 0; border-radius: 0; background: none; color: var(--fg); font-weight: 600; text-align: left }
.acctmenu .mrow:hover, .acctmenu .mrow:focus-visible { background: var(--sunk) }
.acctmenu .mrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.acctmenu .mrow.quiet { color: var(--muted) }
.acctmenu .mrow[aria-current] { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent) }
.perdive:empty { display: none }
.buyfoot { justify-content: space-between; align-items: center }
.buyfoot .linkbtn { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); text-decoration: underline; font-weight: 600 }
.buyfoot .linkbtn[hidden] + button { margin-left: auto }
/* Become a member has only Close under its card: centred under it (owner, 22 Nov 2026) */
/* (it has three children, two hidden, so the three-button grid of .codialog .dlbtns would apply without the weight here) */
.codialog.buydlg.solo .dlbtns.buyfoot { display: flex; justify-content: center }
.codialog.buydlg.solo .dlbtns.buyfoot > button { margin: 0 auto; grid-column: auto }
.planbtn { margin-top: auto; align-self: stretch }
.planbtn[hidden] { display: none }
.plan.hl .planbtn { background: var(--accent); color: var(--accent-fg); border-color: var(--accent) }
.plan.best .planbtn { background: var(--gold); color: var(--gold-fg); border-color: var(--gold) }
.plan .packsize { font: 600 15px var(--body); color: var(--fg); background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-height: 42px }
.plan .perdive { color: var(--muted); font-size: 13px }
.plan .fits { color: var(--ok); font-size: 13px; font-weight: 600 }
.buydlg { max-width: min(880px, calc(100vw - 32px)); width: 100% }
.buydlg .err { color: var(--warn); font-size: 14px; margin: 10px 0 0 }
.buydlg .err:empty { display: none }
.buyplans { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); margin-top: 22px }
@media (max-width: 860px) and (min-width: 721px) {
  .buyplans { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
.buyplans .plan-price { font-size: 22px; font-family: var(--display); font-weight: 800; color: var(--fg) }
.buyplans .plan.best .plan-price { color: var(--gold) }
@media (max-width: 720px) {
  .buyplans { grid-template-columns: 1fr; gap: 16px; margin-top: 18px }
  .buyplans .plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 14px }
  .buyplans .plan > :not(.badge):not(.planbtn) { grid-column: 1 }
  .buyplans .plan .planbtn { grid-column: 2; grid-row: 1 / span 4; margin: 0; align-self: center; padding: 10px 14px; min-height: 0 }
  .buyplans .plan ul { display: none }
  .buyplans .plan-name { font-size: 16px }
  .buyplans .plan-price { font-size: 18px }
}
/* membership: its own dialog (one card) and its own band on the home page, apart from the credit packs */
.buydlg.narrow { max-width: min(420px, calc(100vw - 32px)) }
.buydlg.narrow .buyplans { grid-template-columns: 1fr }
.buydlg.narrow .plan ul:empty { display: none }
.buydlg.narrow .plan-name { font-size: 18px }
.buyplans .buyor { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; font: 900 22px var(--display); font-stretch: 125%; text-transform: uppercase; color: var(--muted); margin: 4px 0 -4px }
.buyplans .buyor::before, .buyplans .buyor::after { content: ""; flex: 1; height: 1px; background: var(--line) }
.buydlg:not(.solo) .buyplans .plan.member { grid-column: 1 / -1 }
@media (min-width: 721px) {
  .buydlg:not(.solo) .plan.member ul { flex-direction: row; flex-wrap: wrap; gap: 4px 24px }
  .buydlg:not(.solo) .plan.member .planbtn { align-self: flex-start; min-width: 240px }
}
.plan.member { border: 2px solid var(--accent); text-align: left }
.plan.member .planbtn { background: var(--accent); color: var(--accent-fg); border-color: var(--accent) }
.plan.member .mtop { display: flex; align-items: center; justify-content: flex-start; gap: 8px 16px; flex-wrap: wrap }
.plan.member .mcancel { text-align: center; font-size: 13px; color: var(--muted); margin-top: 2px }
.mseg { display: inline-flex; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 3px }
.mseg button { min-height: 0; padding: 5px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600 }
.mseg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg) }
@media (max-width: 720px) {
  .buyplans .plan.member { display: flex; flex-direction: column; gap: 6px; text-align: left }
  .buyplans .plan.member ul { display: block; margin: 0 }
  .buyplans .plan.member .planbtn { align-self: stretch; padding: 12px }
}
.mmem { flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted) }
.mstate { display: inline-block; margin-left: 10px; padding: 2px 9px; border-radius: 999px; font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; vertical-align: 1px; color: #04210f; background: var(--ok, #4ADE80) }
.mstate.ending { background: var(--warn); color: #2a1300 }
.mmem b { color: var(--fg); font-weight: 600 }
.mmem.on { flex-direction: column; align-items: stretch; gap: 6px }
.mmem .mmtop { display: flex; align-items: center; justify-content: space-between; gap: 10px }
.mmem .abar { height: 6px }
.mmem button { min-height: 0; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 13px; text-decoration: underline }
.cobtnrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px }
.acctbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round }
.navlinks .primary { white-space: nowrap }
@media (max-width: 400px) {
  .navlinks .primary { padding-inline: 10px; font-size: 13px }
  .navlinks { gap: 2px }
}
@media (max-width: 640px) {
  .acctbtn span { display: none }
  .acctbtn { padding: 10px 6px }
}
.newsopt { display: flex; align-items: center; gap: 10px; margin: 12px 0 2px; font-size: 14px; color: var(--muted); cursor: pointer }
.abar { width: 100%; height: 8px; border-radius: 999px; background: var(--sunk); overflow: hidden }
.abar i { display: block; height: 100%; border-radius: inherit; background: var(--accent) }
.cobody .dcall { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer }
.cobody .dcall[hidden] { display: none }
.cobody .dcall input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--accent) }
html.galopen { overflow: hidden }
button.mtrip { cursor: pointer }
button.mtrip:hover b { color: var(--k, var(--accent)) }
/* the country box: a text box with the select's arrow, and its list */
input.cinput { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238aa3b5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 9px center !important; background-size: 14px !important; padding-right: 30px !important; text-overflow: ellipsis; cursor: pointer }
input.cinput:focus { cursor: text }
input.cinput:disabled { cursor: not-allowed }
.buynote, .codialog .hint.buynote { margin: 20px 0 0 }
.codialog .err:not(:empty), .codialog .errmsg:not(:empty) { margin-top: 14px }
.codialog .dlbtns, .codialog .cobtns { margin-top: 20px }
.buynote a { color: var(--accent); font-weight: 600 }
.dlbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px }
/* three or more buttons in a pop-up: the others side by side in equal halves, the main one across under them
   (owner, 20 Nov 2026: wrapped, two sat on one line and the third alone under them) */
.codialog .dlbtns:has(> :nth-child(3)) { display: grid; grid-template-columns: 1fr 1fr }
.codialog .dlbtns:has(> :nth-child(3)) > * { justify-content: center; min-width: 0 }
.codialog .dlbtns:has(> :nth-child(3)) > .primary { grid-column: 1 / -1; order: 1 }button.locked { border-style: dashed }
.sitefoot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 22px; padding: 20px 16px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px }
.sitefoot a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center }
.sitefoot a:hover { color: var(--fg) }
body.in-app .sitefoot { display: none }
@media (max-width: 820px) {
  html { scroll-padding-top: calc(var(--stick, 125px) + 8px) }
  body.in-app .wrap { padding-bottom: 104px }
}
/* the dive switcher repeats the Your dives list, so it only shows on the other tabs */
body[data-tab="dives"] .divebar, body[data-tab="download"] .divebar, body[data-tab="tripvideo"] .divebar, body[data-tab="tripcards"] .divebar { display: none !important }
/* in the editor on wide screens, no footer, so the end of the page doesn't push the sticky preview up */
@media (min-width: 821px) {
  body.in-app .wrap { padding-bottom: 16px }
}
button, .filebtn { font: 600 14px/1 var(--body); border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 12px 14px; min-height: 44px; cursor: pointer }
button:hover, .filebtn:hover { border-color: var(--accent) }
button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); border-radius: 999px }
button:disabled { opacity: .5; cursor: default }
button:focus-visible, input:focus-visible, select:focus-visible, .filebtn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px }
.linkbtn { align-self: flex-start; background: none; border: 0; padding: 6px 0; min-height: 36px; color: var(--accent); font-weight: 600 }
.hint { margin: 0; font-size: 13px; color: var(--muted) }
.hint.warn { color: var(--warn) }
select.iswarn { border-color: var(--warn) !important; box-shadow: 0 0 0 1px var(--warn) }
.ferr { font: 500 13px var(--body); text-transform: none; letter-spacing: 0 }
/* every error reads the same: warning colour with a round "!" in front */
.ferr, .err, .errmsg { color: var(--warn); display: flex; align-items: flex-start; gap: 6px; line-height: 1.4 }
.ferr::before, .err::before, .errmsg::before { content: ''; flex: none; width: 1.1em; height: 1.1em; margin-top: .1em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18zm-1 4.5h2v6H9zm0 7.5h2v2H9z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18zm-1 4.5h2v6H9zm0 7.5h2v2H9z'/%3E%3C/svg%3E") center / contain no-repeat }
.err:empty, .errmsg:empty { display: none }
.filebtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; align-self: flex-start }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer }
@media (max-width: 820px) {
  body.sheet-open { overflow: hidden }
  body.sheet-open #toPreview { display: none !important }
}
/* Buy credits on a computer: everything on one screen, no scroll bar (owner, 19 Nov 2026) */
@media (min-width: 721px) {
  .buydlg:not(.narrow):not(.solo) { max-width: min(980px, calc(100vw - 32px)) }
  .buydlg .buyplans { margin-top: 14px; gap: 14px }
  .buydlg .buyplans .plan { padding: 16px 18px; gap: 4px }
  .buydlg .buyplans .plan ul { margin: 4px 0 10px; padding-left: 18px; font-size: 14px; line-height: 1.4 }
  .buydlg .buyplans .plan-name { font-size: 18px }
  .buydlg .buyplans .buyor { margin: 0 }
  .buydlg:not(.solo) .plan.member { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 28px }
  .buydlg:not(.solo) .plan.member .mtop { grid-column: 1 / -1 }
  .buydlg:not(.solo) .plan.member .plan-price { grid-column: 1; grid-row: 2 }
  .buydlg:not(.solo) .plan.member ul { grid-column: 2; grid-row: 2 / 4; margin: 0 }
  .buydlg:not(.solo) .plan.member .planbtn { grid-column: 3; grid-row: 2; margin: 0; min-width: 200px }
  .buydlg:not(.solo) .plan.member .mcancel { grid-column: 3; grid-row: 3; text-align: center }
}
@media (max-width: 900px) and (min-width: 721px) {
  .buydlg:not(.solo) .plan.member { grid-template-columns: auto auto }
  .buydlg:not(.solo) .plan.member ul { grid-column: 1 / -1; grid-row: 4 }
  .buydlg:not(.solo) .plan.member .planbtn, .buydlg:not(.solo) .plan.member .mcancel { grid-column: 2 }
}
/* the note sits on the buttons' row, and short screens get tighter cards (owner, 19 Nov 2026: a laptop at 125% still scrolled) */
.buyfoot { flex-wrap: wrap; margin-top: 16px }
.buyfoot .buynote, .codialog .buyfoot .hint.buynote { margin: 0 auto 0 0; flex: 1 1 260px }
@media (min-width: 721px) and (max-height: 800px) {
  .buydlg { padding: 18px 22px }
  .buydlg .buyplans { margin-top: 10px; gap: 12px }
  .buydlg .buyplans .plan { padding: 12px 16px }
  .buydlg .buyplans .plan ul { margin: 2px 0 8px; font-size: 13px; line-height: 1.35 }
  .buydlg .buyplans .plan ul li + li { margin-top: 2px }
  .buydlg .buyplans .plan-price { font-size: 20px }
  .buydlg .buyplans .planbtn { min-height: 40px; padding-block: 8px }
  .buydlg .buyplans .buyor { font-size: 18px }
}

/* Phones: no double-tap zoom on controls (tapping a switch twice zoomed the page), and text boxes at 16 px so an iPhone
   doesn't zoom in when one is focused and stay zoomed (it does for anything smaller) */
a, button, label, input, select, summary, [role="button"] { touch-action: manipulation }
@media (pointer: coarse) {
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: max(16px, 1em) !important }
}
