/*
 * HouseTag shared-address page. Values are the Details page's own
 * (HouseTagDetailView.swift, HouseTagTheme.swift, HTParcelOutline.swift):
 * a fixed light shell around one dark credential, the parcel in plot mint,
 * the entrance in amber.
 */
:root {
  color-scheme: light;
  --sheet-top: #e6e7e8;          /* sheetTop 0.90 0.905 0.91 */
  --sheet-bottom: #d6d7d9;       /* sheetBottom 0.84 0.845 0.85 */
  --ink: #09131b;                /* DetailLightShell.primary */
  --ink-2: #333f4a;              /* DetailLightShell.secondary */
  --ink-3: #56626c;
  --card-top: #0f1d1a;           /* identity glass 0.060 0.115 0.100 */
  --card-bottom: #060b0b;        /*                 0.025 0.045 0.043 */
  --brand-mint: #80f7d9;         /* DetailLightShell.brandMint */
  --plot: #4ae8bc;               /* HouseTagTheme.plotOutline */
  --amber: #ffb02e;              /* HouseTagTheme.entranceMarker */
  --canvas: #062c1d;             /* HouseTagTheme.canvas */
  --selected-ink: #04422f;       /* DetailLightShell.selectedInk */
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #f7f8f8;
  --line: rgba(9, 19, 27, .10);
  --radius-card: 22px;
  --radius-surface: 20px;
  --radius-control: 16px;
  --shadow-card: 0 8px 22px rgba(0, 0, 0, .12);
  --shadow-surface: 0 4px 14px rgba(0, 0, 0, .06);
  --font: "Avenir Next", "Avenir", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  --dock-height: 64px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sheet-top), var(--sheet-bottom)) fixed;
  color: var(--ink);
  font-family: var(--font); font-size: 1rem; line-height: 1.45;
}
button, input { font: inherit; }
a { color: var(--selected-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--selected-ink); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 50; padding: 10px 14px;
  background: #fff; color: var(--ink); border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 12px; }
svg { display: block; }

/* ---------------------------------------------------------------- Top bar */
.topbar { position: relative; z-index: 5; }
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 6px var(--gutter);
  padding-top: max(6px, env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand-mark {
  width: 22px; height: 24px; flex: none; background: var(--selected-ink);
  -webkit-mask: url("/assets/housetag-mark.png") center / contain no-repeat;
  mask: url("/assets/housetag-mark.png") center / contain no-repeat;
}
.brand-word { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.topbar-title { font-weight: 500; font-size: .875rem; color: var(--ink-3); }

/* ---------------------------------------------------------------- Layout */
main { flex: 1; width: 100%; outline: none; }
.address-layout {
  max-width: 1240px; margin: 0 auto;
  padding: 4px var(--gutter) 28px;
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "card" "map" "info" "disclaimer" "intro";
  padding-bottom: 16px;
}
.address-column { display: contents; }
.identity-card { grid-area: card; }
.map-column { grid-area: map; min-width: 0; }
.info-panel { grid-area: info; }
.disclaimer { grid-area: disclaimer; }
.intro { grid-area: intro; }

/* Phones: Navigate, Share and QR code stay on screen the whole time.
   position: fixed (not sticky) pins the dock to the visible viewport, so it
   sits above Safari's toolbar as that grows and shrinks, and above the
   home indicator via the safe-area inset. */
.action-dock {
  grid-area: dock;
  position: fixed; z-index: 40;
  left: max(var(--gutter), env(safe-area-inset-left)); right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto;
}

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .address-layout {
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas: "card map" "dock map" "info map" "disclaimer map" "intro map";
    column-gap: 28px; padding-top: 8px; padding-bottom: 40px;
  }
  /* Desktop: a compact group under the card, in the page. */
  .action-dock { position: static; max-width: none; width: 100%; margin: 0; }
  .map-column { position: sticky; top: 20px; align-self: start; }
  .map-frame { height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 540px; max-height: 900px; }
}

/* ---------------------------------------------------------- Identity card */
.identity-card {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-card);
  padding: 12px 18px 12px;
  background: linear-gradient(135deg, var(--card-top), var(--card-bottom));
  box-shadow: var(--shadow-card);
  color: #fff;
}
.identity-card::after {
  /* The glass edge: brighter at the top-left and bottom-right corners. */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 0.9px;
  background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.14) 38%, rgba(255,255,255,.07) 68%, rgba(255,255,255,.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.identity-watermark {
  position: absolute; right: -18px; bottom: -22px; width: 150px; height: 125px; z-index: -1;
}
.identity-watermark path { fill: rgba(128, 247, 217, .045); stroke: rgba(128, 247, 217, .16); stroke-width: 1.4; stroke-linejoin: round; }
.identity-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; }
.issuer { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-mint); }
.issuer-mark {
  width: 16px; height: 17.5px; background: var(--brand-mint);
  -webkit-mask: url("/assets/housetag-mark.png") center / contain no-repeat;
  mask: url("/assets/housetag-mark.png") center / contain no-repeat;
}
.issuer-word { font-size: .6875rem; font-weight: 600; letter-spacing: .14em; }
.type-pill {
  font-size: .6875rem; font-weight: 600; letter-spacing: .02em;
  color: var(--brand-mint); padding: 0 9px; min-height: 25px; display: inline-flex; align-items: center;
  border-radius: 999px; background: rgba(128, 247, 217, .10); border: .8px solid rgba(128, 247, 217, .34);
  white-space: nowrap;
}
.identity-code {
  margin: 6px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--font); font-weight: 600; font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.05;
  letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.verified-seal { width: .5em; height: .5em; flex: none; }
.verified-seal path:first-child { fill: var(--brand-mint); }
.identity-address {
  margin: 4px 0 0; color: rgba(255, 255, 255, .9);
  font-size: 1.0625rem; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere;
}
.identity-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; }
.global-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.global-id-label { font-size: .5625rem; font-weight: 500; letter-spacing: .15em; color: rgba(255, 255, 255, .72); }
.global-id-value {
  font-family: var(--mono); font-size: .8125rem; font-weight: 500; letter-spacing: .03em;
  color: rgba(255, 255, 255, .92); overflow-wrap: anywhere;
}
.icon-button {
  flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff;
}
.icon-button:hover { background: rgba(255, 255, 255, .14); }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }

/* ------------------------------------------------------------ Action dock */
.action-dock {
  display: flex; align-items: center; min-height: var(--dock-height);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  border: .7px solid rgba(255, 255, 255, .7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14), inset 0 0 0 .7px rgba(9, 19, 27, .06);
}
.dock-button {
  flex: 1; min-width: 0; min-height: var(--dock-height); padding: 8px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: transparent; cursor: pointer; color: var(--ink-2);
  font-size: .75rem; font-weight: 500; border-radius: var(--radius-control);
}
.dock-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dock-primary { color: var(--selected-ink); font-weight: 600; }
.dock-primary svg { fill: var(--selected-ink); stroke: none; }
.dock-button:hover { background: rgba(9, 19, 27, .04); }
.dock-button[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.dock-divider { width: 1px; height: 34px; background: rgba(9, 19, 27, .09); flex: none; }

/* ------------------------------------------------------------------- Map */
.map-frame {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 24px; background: #c9cdcf;
  height: clamp(300px, 62vw, 460px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}
.map { position: absolute; inset: 0; background: #b7bdbf; }
.map:focus-visible { outline-offset: -4px; }
.map-tools {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 500;
  display: flex; justify-content: space-between; gap: 8px; pointer-events: none;
}
.map-tools > * { pointer-events: auto; }
.map-mode {
  display: inline-flex; padding: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}
.map-mode-button {
  min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink-2); font-size: .8125rem; font-weight: 600;
}
.map-mode-button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.map-tool {
  width: 44px; height: 44px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}
.map-tool svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-tool-group { display: flex; gap: 8px; }
.map-tool[aria-pressed="true"] { background: var(--ink); color: #fff; }
/* Zoom: the same glass as the tools above, stacked in the bottom-right
   corner, clear of Apple's logo and legal link (bottom-left). */
.map-zoom {
  position: absolute; right: 12px; bottom: 12px; z-index: 500;
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}
.map-zoom-button {
  width: 44px; height: 44px; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--ink); background: transparent;
}
.map-zoom-button + .map-zoom-button { border-top: 1px solid rgba(9, 19, 27, .1); }
.map-zoom-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.map-zoom-button:hover { background: rgba(9, 19, 27, .05); }
.map-zoom-button:disabled { opacity: .35; cursor: default; }
.map-zoom-button:focus-visible { outline-offset: -3px; border-radius: 14px; }
/* "Use two fingers to move the map" and its desktop equivalent. */
.map-hint {
  position: absolute; inset: 0; z-index: 450; display: grid; place-items: center; padding: 24px;
  background: rgba(6, 11, 11, .45); color: #fff; text-align: center;
  font-size: 1rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.map-hint.show { opacity: 1; }
.map-notice {
  position: absolute; left: 12px; right: 12px; top: 64px; z-index: 500;
  padding: 10px 12px; border-radius: 12px; font-size: .8125rem; font-weight: 500;
  background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
}
.map-legend {
  display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 6px 0;
  color: var(--ink-2); font-size: .8125rem; font-weight: 500;
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 14px; height: 10px; border-radius: 3px; }
.legend-boundary { border: 2px solid #1fbf93; background: rgba(74, 232, 188, .28); }
.legend-entrance { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(6, 11, 11, .45); margin: 0 2px; }

/* MapKit. On phones the browser keeps one-finger pans so the page scrolls
   past the map; two-finger gestures still reach MapKit. This overrides the
   touch-action MapKit sets on its own elements. */
.map.touch-first, .map.touch-first * { touch-action: pan-x pan-y !important; }
/* The entrance: a point, not a badge. Amber against the mint outline, a
   white ring and a soft dark halo so it reads on any imagery. */
.entrance-point span {
  display: block; width: 16px; height: 16px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2.5px #fff, 0 0 0 4px rgba(6, 11, 11, .45), 0 2px 6px rgba(0, 0, 0, .35);
}

/* ------------------------------------------------------------- Info panel */
.info-panel {
  border-radius: var(--radius-surface); background: var(--surface);
  border: .7px solid rgba(9, 19, 27, .07); box-shadow: var(--shadow-surface);
  padding: 2px 16px 12px;
}
.info-list { margin: 0; }
/* Label beside value while there's room, value below it when the text is
   enlarged or the screen is narrow: the break is measured in rem, so it moves
   with the user's text size, not the screen width. */
.info-row { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 2px; padding: 9px 0; }
.info-row dt { flex: 0 0 7.2rem; }
.info-row dd { flex: 1 1 12rem; min-width: 0; }
.info-row + .info-row { border-top: 1px solid var(--line); }
.info-row dt { color: var(--ink-3); font-size: .875rem; }
.info-row dd { margin: 0; font-size: .9375rem; font-weight: 500; overflow-wrap: anywhere; }
/* Three equal buttons in one row, icon above label; they only wrap when the
   text is enlarged (the minimum is in rem, so it grows with text size). */
.info-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.75rem, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.text-button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 56px; padding: 6px 6px; border-radius: 12px; cursor: pointer; text-align: center; line-height: 1.15;
  border: 1px solid rgba(9, 19, 27, .12); background: rgba(255, 255, 255, .7); color: var(--ink);
  font-size: .8125rem; font-weight: 600;
}
.text-button:hover { background: #fff; }
.text-button svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------- Introducing HouseTag */
.intro {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-surface);
  background: rgba(128, 247, 217, .16); border: .7px solid rgba(4, 66, 47, .10);
}
.intro-mark {
  width: 26px; height: 28px; flex: none; margin-top: 2px; background: var(--selected-ink);
  -webkit-mask: url("/assets/housetag-mark.png") center / contain no-repeat;
  mask: url("/assets/housetag-mark.png") center / contain no-repeat;
}
.intro p { margin: 0; }
.intro-title { font-weight: 700; font-size: .9375rem; color: var(--ink); }
.intro-text { color: var(--ink-2); font-size: .8125rem; margin-top: 2px !important; }
.intro-link { display: inline-block; margin-top: 4px; font-size: .8125rem; font-weight: 600; color: var(--selected-ink); text-decoration: none; }
.intro-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------- Disclaimer */
.disclaimer {
  display: flex; gap: 10px; padding: 2px 6px; color: var(--ink-2);
  font-size: .8125rem; line-height: 1.45;
}
.disclaimer svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.disclaimer p { margin: 0; }
.disclaimer-lead { font-weight: 700; color: var(--ink); }

/* ------------------------------------------------------- Loading/messages */
.state { max-width: 1240px; margin: 0 auto; padding: 4px var(--gutter) 32px; }
.state-loading { display: grid; gap: 16px; }
.skeleton { border-radius: 22px; background: rgba(255, 255, 255, .55); position: relative; overflow: hidden; }
.skeleton-card { height: 190px; background: linear-gradient(135deg, var(--card-top), var(--card-bottom)); opacity: .9; }
.skeleton-map { height: 320px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
@media (min-width: 900px) {
  .state-loading { grid-template-columns: minmax(360px, 420px) minmax(0, 1fr); }
  .skeleton-map { height: 560px; }
}
.state-message { display: grid; place-items: center; padding-top: 6vh; }
.message-card {
  width: 100%; max-width: 460px; text-align: center; padding: 34px 26px 30px;
  border-radius: var(--radius-card); color: #fff;
  background: linear-gradient(135deg, var(--card-top), var(--card-bottom)); box-shadow: var(--shadow-card);
}
.message-mark {
  display: block; width: 40px; height: 44px; margin: 0 auto 14px; background: var(--brand-mint);
  -webkit-mask: url("/assets/housetag-mark.png") center / contain no-repeat;
  mask: url("/assets/housetag-mark.png") center / contain no-repeat;
}
.message-eyebrow { margin: 0 0 6px; font-size: .6875rem; font-weight: 600; letter-spacing: .14em; color: var(--brand-mint); text-transform: uppercase; }
.message-title { margin: 0 0 8px; font-size: 1.625rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.message-body { margin: 0 auto; color: rgba(255, 255, 255, .82); max-width: 360px; overflow-wrap: anywhere; }
.pill-button {
  margin-top: 20px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--brand-mint); color: var(--canvas); font-weight: 700;
}

/* --------------------------------------------------------------- Landing */
.landing { max-width: 640px; margin: 0 auto; padding: 4px var(--gutter) 40px; display: grid; gap: 16px; }
.landing-hero {
  border-radius: var(--radius-card); padding: 26px 22px 22px; color: #fff;
  background: linear-gradient(135deg, var(--card-top), var(--card-bottom)); box-shadow: var(--shadow-card);
}
.landing-mark {
  display: block; width: 34px; height: 37px; margin-bottom: 12px; background: var(--brand-mint);
  -webkit-mask: url("/assets/housetag-mark.png") center / contain no-repeat;
  mask: url("/assets/housetag-mark.png") center / contain no-repeat;
}
.landing-eyebrow { margin: 0 0 6px; font-size: .6875rem; font-weight: 600; letter-spacing: .14em; color: var(--brand-mint); }
.landing-title { margin: 0; font-size: clamp(1.75rem, 7vw, 2.4rem); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; }
.landing-lead { margin: 10px 0 0; color: rgba(255, 255, 255, .86); font-size: 1rem; line-height: 1.45; }
.landing-lookup { margin-top: 20px; }
.landing-lookup-label { display: block; font-size: .8125rem; font-weight: 600; color: rgba(255, 255, 255, .8); margin-bottom: 8px; }
.landing-lookup-row { display: flex; gap: 8px; }
.landing-lookup input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 0;
  background: rgba(255, 255, 255, .94); color: var(--ink); font-family: inherit; font-size: 1rem; font-weight: 600;
}
.landing-lookup .pill-button { margin-top: 0; min-height: 48px; }
.landing-steps { list-style: none; margin: 0; padding: 4px 16px; border-radius: var(--radius-surface); background: var(--surface); border: .7px solid rgba(9, 19, 27, .07); box-shadow: var(--shadow-surface); }
.landing-steps li { display: flex; gap: 12px; padding: 12px 0; }
.landing-steps li + li { border-top: 1px solid var(--line); }
.step-number {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--canvas); color: var(--brand-mint); font-size: .8125rem; font-weight: 700;
}
.landing-steps p { margin: 0; }
.step-title { font-weight: 700; font-size: .9375rem; }
.step-text { color: var(--ink-2); font-size: .875rem; margin-top: 2px !important; }
.landing-app { padding: 14px 16px; border-radius: var(--radius-surface); background: rgba(128, 247, 217, .16); border: .7px solid rgba(4, 66, 47, .10); }
.landing-app p { margin: 0; }
.landing-app-title { font-weight: 700; font-size: .9375rem; }
.landing-app-text { color: var(--ink-2); font-size: .875rem; margin-top: 2px !important; }
.landing-note { margin: 0; text-align: center; color: var(--ink-3); font-size: .8125rem; }

/* ---------------------------------------------------------------- Sheets */
.sheet {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 24px; color: var(--ink);
  background: var(--surface-solid); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  overflow: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(6, 11, 11, .45); }
.sheet-body { padding: 22px 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.sheet-title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.sheet-text { margin: 0; color: var(--ink-2); font-size: .9375rem; overflow-wrap: anywhere; }
.sheet-actions { display: grid; gap: 8px; }
.sheet-option {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 16px;
  border-radius: 14px; background: #fff; border: 1px solid rgba(9, 19, 27, .12);
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.sheet-option:hover { border-color: rgba(9, 19, 27, .3); }
.sheet-option-primary, .sheet-option.recommended { background: var(--ink); color: #fff; border-color: var(--ink); }
.sheet-close {
  min-height: 48px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-2);
  font-weight: 600; cursor: pointer;
}
.qr-frame { background: #fff; border-radius: 18px; padding: 14px; display: grid; place-items: center; }
.qr-frame canvas { width: min(100%, 300px); height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.qr-caption { margin: 0; text-align: center; font-family: var(--mono); font-size: .75rem; color: var(--ink-3); overflow-wrap: anywhere; }

/* ----------------------------------------------------------------- Toast */
.toast {
  position: fixed; left: 50%; z-index: 60; bottom: calc(var(--dock-height) + 28px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: .875rem; font-weight: 600; transition: opacity .18s, transform .18s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- Footer */
.site-footer {
  max-width: 1240px; width: 100%; margin: 0 auto; padding: 14px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; gap: 12px; color: var(--ink-3); font-size: .8125rem;
}
.site-footer a { color: var(--ink-3); }
/* Phones: the page ends with exactly the room the fixed dock needs, so the
   last line scrolls clear of it and nothing more. */
@media (max-width: 899px) {
  body:has(#state-address:not([hidden])) .site-footer {
    padding-bottom: calc(var(--dock-height) + 20px + max(12px, env(safe-area-inset-bottom)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
  .map-hint { transition: none; }
  .toast { transition: none; }
}
