:root {
  --bg: #f2f6fc;
  --surface: #ffffff;
  --text: #0e1a2b;
  --muted: #4f6078;
  --border: #d2deec;
  --accent: #0a63e0;
  --chrome: #07142a;
  --chrome-text: #e8f2ff;
  --chrome-link: #7fd0ff;
  --accent-text: #ffffff;
  --ok-bg: #e6f4ea;  --ok-text: #1d5b2c;
  --err-bg: #fdecea; --err-text: #8a1c14;
  --warn-bg: #fff4d6; --warn-text: #6b4b00;
  --radius: 10px;
  --band-top: #d3e5fb;
  --band-bottom: #f2f6fc;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1829; --surface: #13243b; --text: #edf4fd; --muted: #a8bad3;
    --border: #243c5e; --accent: #38b6ff; --accent-text: #ffffff;
    --ok-bg: #16311f; --ok-text: #a8e0b5; --err-bg: #3a1714; --err-text: #f4b3ab;
    --warn-bg: #362a0b; --warn-text: #f2d48a;
    --band-top: #103a70; --band-bottom: #0b1829;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100svh; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* App pages share the homepage's sea-toned fade at the top */
body:not(.landing-page) { background:
  linear-gradient(180deg, var(--band-top) 0, color-mix(in srgb, var(--band-top) 45%, var(--bg)) 220px, var(--bg) 480px)
  no-repeat, var(--bg); }
/* Header: always the logo's navy, so the white-and-blue wordmark reads in both themes */
header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--chrome); color: var(--chrome-text);
  border-bottom: 1px solid color-mix(in srgb, #38b6ff 22%, var(--chrome));
}
header.top a, header.top button.link { color: var(--chrome-link); }
header.top a.brand { display: inline-flex; align-items: center; text-decoration: none; }
header.top a.brand img { height: 22px; width: auto; display: block; }
@media (max-width: 420px) { header.top a.brand img { height: 18px; } }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; }
h2 { font-size: 1.15rem; margin: 24px 0 8px; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
}
.card.removed { opacity: 0.65; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.list { list-style: none; margin: 0; padding: 0; }
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--accent); }
.badge {
  display: inline-block; font-size: 0.75rem; padding: 1px 8px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
}
.badge.verified { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; }
form { display: grid; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
label { display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); }
input, select, textarea, button {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%;
}
textarea { min-height: 80px; }
input:disabled, select:disabled, textarea:disabled { opacity: 0.6; cursor: not-allowed; }
button, .button {
  background: linear-gradient(135deg, var(--brand-from, var(--accent)), var(--brand-to, var(--accent)));
  color: #ffffff; border: none; font-weight: 600;
  cursor: pointer; width: auto; padding: 10px 16px; border-radius: 8px; text-decoration: none;
  display: inline-block;
}
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 500; }
details.card > summary { cursor: pointer; font-weight: 600; }
details.card[open] > summary { margin-bottom: 12px; }
.notice { padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; }
.notice.ok { background: var(--ok-bg); color: var(--ok-text); }
.notice.error { background: var(--err-bg); color: var(--err-text); }
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: 2rem; line-height: 1.2; }

/* Search-or-add field */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 4px 0; list-style: none; max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.15);
}
.combo-list li { padding: 8px 12px; cursor: pointer; color: var(--text); }
.combo-list li.active, .combo-list li:hover { background: var(--bg); }
input.combo-picked { border-color: var(--accent); }

/* Boat layout: one card per engine position */
h3.group-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; }
li > h3.group-title { margin: 16px 0 8px; }
.slot + .slot { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.slot.empty { color: var(--muted); }

/* App pages share the homepage's sea-toned fade at the top */
body:not(.landing-page) { background:
  linear-gradient(180deg, var(--band-top) 0, color-mix(in srgb, var(--band-top) 45%, var(--bg)) 220px, var(--bg) 480px)
  no-repeat, var(--bg); }
header.top { flex-wrap: wrap; }
header.top > :first-child { margin-right: auto; }

/* Landing page */
.landing { max-width: 960px; padding-bottom: 32px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button.big { padding: 14px 22px; font-size: 1.05rem; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.button.ghost { background: rgb(255 255 255 / 0.12); color: #fff; border: 1px solid rgb(255 255 255 / 0.6);
  backdrop-filter: blur(4px); }
.button.ghost:hover { background: rgb(255 255 255 / 0.22); }

/* Full-bleed photo sections: the photo covers the section; text sits on a dark fade */
/* <picture> wrappers must not take up layout space; the img is positioned itself */
.hero-photo picture, .photo-band picture, .auth-photo picture { display: contents; }
.photo-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-photo, .photo-band { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.hero-photo::after, .photo-band::after { content: ""; position: absolute; inset: 0; z-index: -1; }


.hero-photo { min-height: clamp(460px, 62vh, 640px); display: flex; align-items: center; }
/* Desktop photo is pre-cropped to the water; keep the boat level with the text */
.hero-photo .photo-bg { object-position: 62% 60%; }
/* Desktop: text on the left over open water, boat visible bottom-right */
.hero-photo::after { background:
  linear-gradient(90deg, rgb(8 24 38 / 0.6) 0%, rgb(8 24 38 / 0.35) 38%, rgb(8 24 38 / 0) 68%); }
.hero-content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 48px 32px; text-align: left; }
.hero-content > * { max-width: 560px; }
.hero-content h1 { font-size: clamp(2rem, 4.8vw, 3.4rem); line-height: 1.1; margin: 0 0 16px;
  text-shadow: 0 2px 20px rgb(0 0 0 / 0.3); }
.hero-content .lead { font-size: clamp(1rem, 2vw, 1.2rem); margin: 0 0 28px; color: rgb(255 255 255 / 0.93); }
.hero-content .cta-row { justify-content: flex-start; max-width: none; }
/* Phones: text on top, boat right underneath. The hero is only as tall as the
   text plus room for the boat, and the photo is anchored to its bottom edge. */
@media (max-width: 720px) {
  .hero-photo { align-items: flex-start; min-height: 0; }
  .hero-photo .photo-bg { object-position: 68% 100%; }
  .hero-photo::after { background: linear-gradient(180deg, rgb(8 24 38 / 0.85) 0%,
    rgb(8 24 38 / 0.65) 55%, rgb(8 24 38 / 0) 75%); }
  .hero-content { padding: 32px 20px 230px; text-align: center; }
  .hero-content > * { margin-left: auto; margin-right: auto; }
  .hero-content .cta-row { justify-content: center; }
}

/* Band under the hero: continues the water with a wave edge and a sea-toned fade */
/* The sea-toned fade runs from the wave to about the middle of the lookup card */
.sea-fade { background: linear-gradient(180deg, var(--band-top) 0,
  color-mix(in srgb, var(--band-top) 55%, var(--band-bottom)) 280px, var(--band-bottom) 620px); }
.features-band { position: relative; padding: 16px 16px 40px; }
.features-band .wave { position: absolute; left: 0; top: -47px; width: 100%; height: 48px; display: block; }
.features-band .wave path { fill: var(--band-top); }
@media (max-width: 720px) { .features-band .wave { height: 26px; top: -25px; } }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 960px; margin: 0 auto; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.feature { box-shadow: 0 10px 30px rgb(0 0 0 / 0.10); padding: 20px; }
.feature h2 { margin: 12px 0 8px; }
.feature p { margin: 0; color: var(--muted); }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.landing > section:first-child { margin-top: 8px; }
.lookup { padding: 20px; }
.lookup h2 { margin-top: 0; }
.how { margin: 32px 0 48px; }
.steps { padding-left: 1.2rem; display: grid; gap: 10px; }

.photo-band { padding: 96px 16px; }
.photo-band::after { background: linear-gradient(90deg, rgb(10 36 56 / 0.72) 0%, rgb(10 36 56 / 0.4) 60%, rgb(10 36 56 / 0.15) 100%); }
.band-content { max-width: 960px; margin: 0 auto; }
.band-content h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.2; max-width: 20ch; margin: 0 0 12px; }
.band-content p { max-width: 52ch; color: rgb(255 255 255 / 0.9); margin: 0 0 24px; }

.site-footer { text-align: center; padding: 24px 16px 40px; font-size: 0.9rem; }
.site-footer a { color: inherit; }

/* Sign-in page: photo backdrop with the card on top */
body.auth-page { background: var(--bg); }
main.auth-photo { max-width: none; margin: 0; }
.auth-photo { position: relative; isolation: isolate; overflow: hidden; min-height: calc(100svh - 57px);
  display: grid; align-items: center; justify-items: start; padding: 32px max(16px, calc((100% - 1200px) / 2 + 32px)); }
.auth-photo .photo-bg { object-position: 70% 50%; }
.auth-photo::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(8 24 38 / 0.5) 0%, rgb(8 24 38 / 0.2) 45%, rgb(8 24 38 / 0) 70%); }
.auth-card { width: 100%; max-width: 420px; padding: 24px; box-shadow: 0 20px 50px rgb(0 0 0 / 0.25); }
.auth-card h1 { margin-top: 0; }
@media (max-width: 720px) {
  /* Phones: the photo becomes a banner (the whole boat fits), card overlaps its bottom */
  .auth-photo { display: block; min-height: 0; padding: 0 16px 32px; overflow: visible; }
  .auth-photo::after { display: none; }
  .auth-photo .photo-bg { position: static; display: block; width: calc(100% + 32px); height: 250px;
    margin: 0 -16px -48px; object-position: 72% 50%; }
  .auth-card { position: relative; margin: 0 auto; }
}

/* Extra header links (Shop portal, Admin) */
nav.top-links { display: flex; gap: 14px; margin-right: auto; margin-left: 12px; font-size: 0.95rem; }
nav.top-links a { text-decoration: none; }
header.top > :first-child { margin-right: 0; }
header.top > nav.top-links + * { margin-left: auto; }
.badge.pending { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; }
.stack { display: grid; gap: 8px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form label { flex: 1 1 200px; }
.banner { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 12px; }
.banner.warn { background: var(--warn-bg); color: var(--warn-text); }
.banner.info { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }

/* Tabs (shop lookup) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -4px 0 14px; }
.tab { background: none; color: var(--muted); border-radius: 8px 8px 0 0; padding: 10px 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.lookup-card { padding: 18px 20px; margin-top: 8px; }

/* History report */
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.report-head h1 { margin: 2px 0 4px; }
.eyebrow { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; display: grid; gap: 2px; }
.tile-num { font-size: 1.35rem; font-weight: 700; }
.tile-label { font-size: 0.85rem; color: var(--muted); }
.table-wrap { overflow-x: auto; padding: 8px 12px; }
table.readings { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.readings th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.readings td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.readings tr:last-child td { border-bottom: none; }
table.readings tr.flag td { background: var(--warn-bg); color: var(--warn-text); }
.report-foot { font-size: 0.85rem; margin-top: 24px; }
@media print {
  header.top, .no-print, #flash { display: none !important; }
  body { background: #fff !important; color: #000; }
  .card, .tile { box-shadow: none; break-inside: avoid; }
}
.teaser { border-style: dashed; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Shop sign-up */
main.signup { max-width: 1080px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; padding-top: 32px; }
@media (max-width: 820px) { main.signup { grid-template-columns: 1fr; gap: 8px; padding-top: 16px; } }
.signup-pitch h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.15; margin: 4px 0 16px; }
.pitch-list { padding-left: 1.1rem; display: grid; gap: 10px; margin: 0 0 16px; }
.signup-form { padding: 22px; box-shadow: 0 10px 30px rgb(0 0 0 / 0.08); }
.grid3 { display: grid; grid-template-columns: 2fr 0.8fr 1.2fr; gap: 10px; }
@media (max-width: 480px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > :first-child { grid-column: 1 / -1; } }
header.top a.nav-shops { margin-left: auto; margin-right: 14px; }

/* Shop logos */
.shop-logo { border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--border); flex: none; vertical-align: middle; }
.shop-logo.initials { display: inline-grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--accent); font-weight: 700; font-size: 0.8rem; }
.with-logo { display: inline-flex; align-items: center; gap: 10px; }
h1.with-logo { display: flex; margin: 8px 0; }

/* Service visit lines */
.lines { display: grid; gap: 8px; }
.line { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: end; padding: 10px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.line-part { grid-template-columns: auto 1fr 1.2fr 0.45fr minmax(130px, 0.8fr) auto; }
.line-labor, .line-other { grid-template-columns: auto 1fr minmax(140px, 0.6fr) auto; }
@media (max-width: 640px) { .line, .line-part, .line-labor, .line-other { grid-template-columns: 1fr 1fr; } .line-main { grid-column: 1 / -1; } }
.line-kind { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); align-self: center; }
.remove-line { align-self: center; }
.line-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.line-buttons button { padding: 8px 12px; }
.needs-review { outline: 2px solid var(--warn-text); outline-offset: 1px; }
.file-button { cursor: pointer; }
.visit-lines { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.visit-lines .line-kind { display: inline-block; min-width: 4.5rem; }
.visit-lines code { font-size: 0.85em; }

/* Photos */
.boat-hero { display: flex; gap: 16px; align-items: center; margin: 8px 0 4px; }
.boat-photo { width: 120px; height: 90px; border-radius: 10px; object-fit: cover; flex: none;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--muted); font-size: 0.8rem; text-align: center; overflow: hidden; }
.boat-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 480px) { .boat-photo { width: 88px; height: 66px; } }
.boat-thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; border: 1px solid var(--border); }
.thumb-row, a.card.thumb-row { display: flex; gap: 12px; align-items: center; }
.visit-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.visit-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* Invoice/receipt "scanning" animation */
.scan-wrap { display: flex; gap: 18px; align-items: center; padding: 14px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid var(--border); }
.scan-page { position: relative; width: 116px; height: 150px; flex: none; border-radius: 6px; overflow: hidden;
  background: #fff; box-shadow: 0 6px 18px rgb(0 0 0 / 0.18); }
.scan-page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.scan-lines { position: absolute; inset: 14px 10px; display: grid; align-content: start; gap: 8px; }
.scan-lines span { display: block; height: 5px; border-radius: 3px; width: var(--w);
  background: #c9d6df; transform-origin: left; animation: scan-line 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.3s); }
.scan-page.has-photo .scan-lines span { background: rgb(255 255 255 / 0.5); }
@keyframes scan-line {
  0%, 8% { background: #c9d6df; transform: scaleX(0.35); opacity: 0.6; }
  18%, 70% { background: var(--accent); transform: scaleX(1); opacity: 1; }
  100% { background: #c9d6df; transform: scaleX(1); opacity: 0.6; }
}
.scan-beam { position: absolute; left: -10%; right: -10%; height: 26px; top: -26px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent) 60%, var(--accent) 88%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 70%, transparent);
  animation: scan-beam 2.7s cubic-bezier(.45,.05,.55,.95) infinite; }
@keyframes scan-beam { 0% { top: -26px; } 100% { top: 150px; } }
.scan-text { display: grid; gap: 4px; }
.scan-step { font-size: 1rem; }
@media (prefers-reduced-motion: reduce) {
  .scan-beam { animation: none; top: 45%; }
  .scan-lines span { animation: none; background: var(--accent); }
}

/* My boats: card grid with per-card menus */
.boat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.boat-card { position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: visible; }
.boat-card-link { display: flex; flex-direction: column; color: inherit; text-decoration: none; border-radius: var(--radius); }
.boat-card-link:hover { box-shadow: 0 0 0 2px var(--accent); }
.boat-card-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boat-card-photo { aspect-ratio: 16 / 10; max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
  display: grid; place-items: center; font-size: 2.4rem; color: var(--muted);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--accent) 6%, var(--surface))); }
.boat-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.boat-card-body { display: grid; gap: 2px; padding: 12px 14px 14px; }
.boat-card-body .small { font-size: 0.85rem; }
.boat-card-body .badge { justify-self: start; margin-top: 6px; }
.card-menu { position: absolute; top: 8px; right: 8px; }
.menu-button { width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 1.3rem; line-height: 1;
  background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text); border: 1px solid var(--border);
  backdrop-filter: blur(4px); }
.menu { position: absolute; right: 0; top: 42px; z-index: 20; min-width: 200px; padding: 6px; display: grid;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / 0.18); }
.menu button { background: none; color: var(--text); text-align: left; font-weight: 500; padding: 9px 10px; border-radius: 6px; width: 100%; }
.menu button:hover, .menu button:focus-visible { background: var(--bg); outline: none; }
.menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.danger-text { color: var(--err-text) !important; }
.add-tile { min-height: 200px; display: grid; place-content: center; gap: 6px; text-align: center; cursor: pointer;
  background: transparent; color: var(--accent); border: 2px dashed var(--border); font: inherit; }
.add-tile:hover { border-color: var(--accent); }
.add-plus { font-size: 2rem; line-height: 1; }
dialog.sheet { border: 1px solid var(--border); border-radius: 14px; padding: 20px; max-width: min(520px, calc(100% - 32px));
  background: var(--surface); color: var(--text); }
dialog.sheet::backdrop { background: rgb(8 24 38 / 0.5); }
dialog.sheet form { display: grid; gap: 12px; }
button.danger { background: var(--err-text); color: #fff; }

/* Wide overlay (Add a boat) */
dialog.sheet.wide { width: min(640px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  overflow-y: auto; padding: 0; }
dialog.sheet.wide form { padding: 0 20px 20px; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px 12px; background: var(--surface); border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.sheet-head h2 { margin: 0; }
.icon-close { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: transparent; color: var(--text);
  border: 1px solid var(--border); font-size: 1rem; }
.boat-grid:has(> .add-tile:only-child) .add-tile { min-height: 260px; }

/* Header actions as buttons (pills on the navy bar) */
header.top a:not(.brand), header.top button.link, nav.top-links a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  color: var(--chrome-text); background: rgb(255 255 255 / 0.06);
  border: 1px solid color-mix(in srgb, #38b6ff 45%, transparent);
  transition: background 0.15s, border-color 0.15s;
}
header.top a:not(.brand):hover, header.top button.link:hover, nav.top-links a:hover {
  background: rgb(56 182 255 / 0.16); border-color: #38b6ff;
}
header.top a:not(.brand):focus-visible, header.top button.link:focus-visible {
  outline: 2px solid #38b6ff; outline-offset: 2px;
}
/* The main action: Sign in */
header.top a[href^="/login"] {
  background: linear-gradient(135deg, var(--brand-from, #0a7cf0), var(--brand-to, #0a47d0));
  border-color: transparent; color: #fff;
}
header.top a[href^="/login"]:hover { filter: brightness(1.1); border-color: transparent; }
nav.top-links { gap: 8px; }
header.top { gap: 8px; }
header.top a.nav-shops { margin-right: 0; }
@media (max-width: 480px) {
  header.top a:not(.brand), header.top button.link, nav.top-links a { padding: 6px 11px; font-size: 0.85rem; }
}

/* Email code entry */
.code-entry { display: grid; gap: 8px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.code-entry label { color: var(--text); font-weight: 600; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; font-size: 1.5rem; letter-spacing: 0.25em; text-align: center;
  font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; padding: 10px; }
.code-entry .small { font-size: 0.85rem; margin: 0; }
