/* ---------- Brand: change the color and typeface here ---------- */
:root {
  --brand: #0d7c66;        /* gulf green */
  --brand-dark: #0a5e4e;
  --brand-soft: #e3f3ef;
  --brand-text: #0d7c66;   /* brand as text (lighter in dark mode) */
  --brand-ink: #0a5e4e;    /* text on --brand-soft */
  --ink: #1d1d1f;
  --ink-2: #3c4043;
  --on-ink: #fff;          /* text on --ink backgrounds */
  --muted: #5f6368;
  --line: #e6e6e6;
  --line-strong: #c8c8c8;
  --line-hover: #9a9a9a;
  --bg: #fff;
  --surface: #fff;
  --surface-2: #f6f6f6;
  --hover: #f2f2f2;
  --hover-2: #e6e6e6;
  --skel: #eee;
  --skel-2: #f6f6f6;
  --map-bg: #e8e8e8;
  --pin-seen-bg: #ececec;
  --pin-seen-ink: #575757;
  --disabled: #9e9e9e;
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

/* ---------- Dark mode ----------
   Enabled with the "dark" class on <html>. Set by the theme selector:
   Automatic (follows your system), Light or Dark. */
html.dark {
    --brand-dark: #0a6654;
    --brand-soft: #143c34;
    --brand-text: #5fd3b3;
    --brand-ink: #8ce6cc;
    --ink: #f2f2f4;
    --ink-2: #c9c9ce;
    --on-ink: #141416;
    --muted: #a3a3aa;
    --line: #34343a;
    --line-strong: #4a4a52;
    --line-hover: #75757d;
    --bg: #121214;
    --surface: #1c1c1f;
    --surface-2: #26262a;
    --hover: #2c2c31;
    --hover-2: #36363c;
    --skel: #26262a;
    --skel-2: #303036;
    --map-bg: #262626;
    --pin-seen-bg: #3a3a40;
    --pin-seen-ink: #c4c4ca;
    --disabled: #6a6a72;
  color-scheme: dark;
}
html.dark .price-pin, html.dark .cluster, html.dark .map-btn, html.dark #searchhere,
html.dark #autosearch, html.dark #loading { box-shadow: 0 2px 8px rgba(0,0,0,.6); }
html.dark .m-backdrop { background: rgba(0,0,0,.65); }
/* The error red must be lighter on a dark background */
html.dark .field .msg, html.dark .m-error { color: #ff8a80; }
html.dark .field.err input, html.dark .field.err textarea { border-color: #ff8a80; box-shadow: none; }
html.dark #status.error { border-left-color: #ff8a80; }
/* Smooth transition only while the theme changes */
html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color .25s, color .25s, border-color .25s, fill .25s !important;
}
body { background: var(--bg); }
#q::placeholder, .field input::placeholder { color: var(--muted); opacity: 1; }
/* Leaflet controls with the theme colors */
.leaflet-bar a, .leaflet-bar a:hover { background: var(--surface); color: var(--ink); border-color: var(--line); }
.leaflet-bar a:hover { background: var(--hover); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--brand-text); }

* { box-sizing: border-box; margin: 0; }
body { font-family: var(--font); height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, select { font-family: inherit; }

/* ---------- Header ---------- */
header { padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo svg { width: 30px; height: 30px; }
.logo b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--brand-text); }
.logo small { font-size: 12px; color: var(--muted); font-weight: 500; border-left: 1px solid var(--line); padding-left: 8px; }
#locate {
  margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
#saved { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: #c2185b; font-size: 17px; text-decoration: none; background: var(--surface); }
html.dark #saved { color: #ff8fb1; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#saved:hover { border-color: var(--line-hover); }
.save-search { margin-left: auto; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.save-search:hover { border-color: var(--line-hover); }
.save-search.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
#listbar { flex-wrap: wrap; gap: 8px; }
.report-opts { display: grid; gap: 8px; }
.report-opts label { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.report-opts input { accent-color: var(--brand); }
#publish { order: 0; display: flex; align-items: center; gap: 6px; margin-left: 0; padding: 7px 14px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
#publish:hover { background: var(--brand-dark); }
#publish span { font-size: 16px; line-height: 1; }
#publish + #locate { margin-left: 0; }
@media (max-width: 800px) { #publish b { display: none; } #publish { width: 38px; height: 38px; padding: 0; justify-content: center; } }
#locate:hover { border-color: var(--line-hover); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
#locate:disabled { opacity: .5; cursor: wait; }

/* Theme selector */
#theme { position: relative; }
#theme-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
#theme-btn:hover { border-color: var(--line-hover); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
#theme-btn svg, #theme-menu .ti svg { width: 18px; height: 18px; }
#theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 2100; min-width: 220px; padding: 6px;
  background: var(--surface); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.22); display: none;
}
#theme.open #theme-menu { display: grid; gap: 2px; animation: drop .15s ease-out; }
#theme-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: none; border-radius: 10px;
  background: none; color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; min-height: 44px;
}
#theme-menu button:hover, #theme-menu button:focus-visible { background: var(--hover); outline: none; }
#theme-menu small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 1px; }
#theme-menu .ti { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
#theme-menu button[aria-checked="true"] { color: var(--brand-ink); background: var(--brand-soft); }
#theme-menu button[aria-checked="true"] .ti { background: var(--brand); color: #fff; }
#theme-menu button[aria-checked="true"]::after { content: '✓'; margin-left: auto; font-weight: 700; }

/* Search with autocomplete */
#searchbox { position: relative; flex: 1; max-width: 440px; margin-left: 8px; }
#searchbox > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
#q {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink); padding: 9px 34px 9px 36px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface-2); outline: none; transition: background .15s, border-color .15s, box-shadow .15s;
}
#q::-webkit-search-cancel-button { display: none; }
#q:focus { background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
#q-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: none; border-radius: 50%; background: var(--hover-2); color: var(--muted); font-size: 11px; cursor: pointer; display: none; }
#searchbox.has-text #q-clear { display: block; }
#suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 2000; list-style: none; padding: 6px; margin: 0;
  background: var(--surface); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); display: none; max-height: 60vh; overflow-y: auto;
}
#searchbox.open #suggest { display: block; animation: drop .15s ease-out; }
#suggest li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
#suggest li.on, #suggest li:hover { background: var(--hover); }
#suggest .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--hover); display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
#suggest .main { font-size: 14px; font-weight: 500; }
#suggest .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
#suggest .hint { padding: 10px 12px; font-size: 13px; color: var(--muted); cursor: default; }
#suggest .hint:hover { background: none; }
#suggest .head { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; cursor: default; }
#suggest .head:hover { background: none; }
#suggest mark { background: none; color: inherit; font-weight: 700; }

/* "More filters" button */
#f-more {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .15s;
}
#f-more:hover { border-color: var(--line-hover); }
#f-more svg { width: 15px; height: 15px; }
#f-more.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
#f-more-n:not(:empty) { background: var(--ink); color: var(--on-ink); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }

/* "More filters" panel (inside the modal) */
.seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { flex: 1; padding: 10px 0; border: none; border-right: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--ink); color: var(--on-ink); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; }
.opt:hover { border-color: var(--line-hover); }
.opt.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand); }
.m-foot.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-foot.split .btn { width: auto; flex: 1; }
.m-foot.split .link { flex-shrink: 0; }

/* Searched place */
.place-pin { width: 18px; height: 18px; border-radius: 50% 50% 50% 0; background: var(--ink); border: 3px solid #fff; transform: translate(-50%, -100%) rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.35); position: absolute; }
#locate svg { width: 14px; height: 14px; color: #1a73e8; }

/* ---------- Filters ---------- */
#filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 16px; border-bottom: 1px solid var(--line); }
#filters select, #sort {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s;
}
#filters select:hover, .chips button:hover { border-color: var(--line-hover); }
#filters select.on { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.chips { display: flex; gap: 6px; }
.chips button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; }
.chips button.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.link { background: none; border: none; color: var(--ink); text-decoration: underline; font-size: 13px; font-weight: 500; cursor: pointer; padding: 4px; }

/* ---------- Layout ---------- */
main { flex: 1; display: flex; min-height: 0; }
main { position: relative; }
#side { width: 440px; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
#listbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 0; }
#count { color: var(--muted); font-size: 13px; font-weight: 500; }
#list { flex: 1; overflow-y: auto; padding: 12px 16px 24px; display: grid; gap: 18px; align-content: start; grid-auto-rows: max-content; }
#mapwrap { flex: 1; position: relative; }
#map { position: absolute; inset: 0; background: var(--map-bg); }

#loading {
  position: absolute; top: 12px; left: 50%; transform: translate(-50%, -8px); z-index: 1000;
  background: var(--surface); color: var(--ink); padding: 8px 14px 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  box-shadow: 0 2px 10px rgba(0,0,0,.15); display: flex; align-items: center; gap: 8px;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
#loading.show { opacity: 1; transform: translate(-50%, 0); }

/* "Search this area" + automatic search toggle */
#searchhere {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1000; display: none; align-items: center; gap: 8px;
  background: var(--surface); color: var(--ink); border: none; border-radius: 999px; padding: 10px 16px; font-size: 14px; font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,.2); cursor: pointer; transition: transform .1s, box-shadow .15s; white-space: nowrap;
}
#searchhere.show { display: flex; animation: drop .25s ease-out; }
#searchhere:hover { box-shadow: 0 4px 16px rgba(0,0,0,.25); }
#searchhere:active { transform: translateX(-50%) scale(.97); }
#searchhere svg { width: 16px; height: 16px; color: var(--brand-text); }
@keyframes drop { from { opacity: 0; margin-top: -8px; } }
#autosearch {
  position: absolute; top: 12px; right: 12px; z-index: 1000; display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); padding: 8px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.15); font-size: 13px; font-weight: 500; user-select: none;
}
#autosearch input { accent-color: var(--brand); width: 15px; height: 15px; margin: 0; cursor: pointer; }

/* Active filter chips */
#active { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 16px 0; }
#active:empty { display: none; }
.achip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 5px 5px 12px; border: none; border-radius: 999px; cursor: pointer;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 600; animation: pop .2s ease-out;
}
.achip span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(13,124,102,.15); font-size: 10px; transition: background .15s, color .15s; }
.achip:hover span { background: var(--brand); color: #fff; }

/* ---------- Detail ---------- */
#detail {
  position: absolute; top: 0; bottom: 0; left: 0; width: 440px; z-index: 1050; background: var(--surface); display: flex; flex-direction: column;
  border-right: 1px solid var(--line); box-shadow: 6px 0 24px rgba(0,0,0,.08);
  transform: translateX(-100%); visibility: hidden; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility .3s;
}
/* Visible at once when it opens: what is hidden cannot take the focus */
body.show-detail #detail { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.d-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.d-back { border: none; background: none; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; padding: 8px 10px; border-radius: 8px; display: flex; gap: 6px; align-items: center; }
.d-back:hover, .d-icon:hover { background: var(--hover); }
.d-icon { border: none; background: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.d-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; }
.d-icon.on svg { fill: #e0245e; stroke: #e0245e; }
.d-scroll { flex: 1; overflow-y: auto; }
#detail .photos { border-radius: 0; aspect-ratio: 4 / 3; }
#detail .nav { opacity: 1; }
.counter { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 6px; }
.d-body { padding: 16px 20px 28px; }
.d-price { font-size: 26px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.d-price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.d-price s { font-size: 15px; font-weight: 500; color: var(--muted); }
.d-addr { font-size: 16px; margin-top: 4px; }
.d-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.d-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.d-badges .badge { box-shadow: none; border: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.fact { border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.fact b { display: block; font-size: 17px; }
.fact small { color: var(--muted); font-size: 12px; }
.d-body h3 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
.d-body p { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.amen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; font-size: 14px; list-style: none; padding: 0; }
.amen li { display: flex; gap: 8px; }
.amen li::before { content: '✓'; color: var(--brand); font-weight: 700; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--hover); }
.d-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.d-cta .price { font-size: 17px; }
.d-cta .btn { margin: 0; padding: 12px 22px; }

/* Navigation between properties and notices in the detail */
.d-actions { display: flex; align-items: center; gap: 2px; }
.d-pager { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 500; color: var(--muted); margin-right: 4px; }
.d-icon.sm { width: 32px; height: 32px; font-size: 22px; line-height: 1; color: var(--ink); }
.d-icon:disabled { opacity: .3; cursor: default; background: none; }
.d-scroll { animation: fadein .25s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.d-note {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink);
  font-size: 13px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.d-note .link { color: var(--brand-ink); flex-shrink: 0; }
.d-cta-btns { display: flex; gap: 8px; }
.badge.visit { background: #eef3ff; color: #1f4fbf; }

/* ---------- Modal: schedule visit / contact ---------- */
.modal { position: fixed; inset: 0; z-index: 2500; display: none; }
.modal.show { display: block; }
.m-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fadein .2s; }
.m-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px));
  max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: modalIn .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } }
.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 20px 4px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.m-head h2 { font-size: 19px; letter-spacing: -.01em; }
.m-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.m-x { border: none; background: var(--hover); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.m-x:hover { background: var(--hover-2); }
.m-body { padding: 4px 20px 0; }
.m-body h4 { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto; width: 60px; padding: 8px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  cursor: pointer; text-align: center; font-size: 12px; color: var(--muted); text-transform: capitalize; transition: all .15s;
}
.day b { display: block; font-size: 19px; color: var(--ink); margin: 1px 0; }
.day:hover { border-color: var(--line-hover); }
.day.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); box-shadow: 0 0 0 1px var(--brand); }
.day.on b { color: var(--brand-ink); }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { padding: 10px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; }
.slot:hover:not(:disabled) { border-color: var(--line-hover); }
.slot:disabled { color: var(--disabled); text-decoration: line-through; cursor: not-allowed; background: var(--surface-2); }
.slot.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.field { display: grid; gap: 4px; margin-top: 12px; }
.field label { font-size: 13px; font-weight: 500; }
.field input, .field textarea {
  font: inherit; font-size: 15px; color: var(--ink); padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  outline: none; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.field input:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field.err input, .field.err textarea { border-color: #b3261e; box-shadow: 0 0 0 3px #fbe9e7; }
.field .msg { font-size: 12px; color: #b3261e; display: none; }
.field.err .msg { display: block; }
.m-error { color: #b3261e; font-size: 12px; margin-top: 6px; display: none; }
.m-error.show { display: block; }
.m-foot { padding: 20px 0; position: sticky; bottom: 0; background: var(--surface); }
.m-foot .btn { width: 100%; margin: 0; padding: 14px; font-size: 15px; }
.m-fine { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; }
.m-done { padding: 32px 24px 24px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.m-done h2 { font-size: 21px; }
.m-done p { font-size: 14px; color: var(--ink-2); }
.check { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 30px; font-weight: 700; display: grid; place-items: center; animation: popIn .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes popIn { from { transform: scale(0); } }
.m-summary { background: var(--surface-2); border-radius: 12px; padding: 12px 16px; text-align: left; font-size: 14px; line-height: 1.9; width: 100%; }
.m-summary::first-letter { text-transform: uppercase; }
.m-done .btn { width: 100%; margin: 0; padding: 13px; }
@keyframes sheetIn { from { transform: translateY(100%); } }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 3000; opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--on-ink); padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.spinner { width: 14px; height: 14px; border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Notice ---------- */
#status {
  display: none; position: absolute; left: 12px; right: 12px; bottom: 28px; z-index: 1000;
  background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18); max-width: 520px; margin: 0 auto;
}
#status.show { display: flex; gap: 10px; align-items: flex-start; animation: rise .25s ease-out; }
#status span { flex: 1; }
#status .x { border: none; background: none; font-size: 16px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
#status.error { border-left: 4px solid #b3261e; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
