:root {
  --hutto: #2E5E3A;
  --hutto-dark: #234a2d;
  --hutto-light: #EAF3DE;
  --ink: #1f2622;
  --muted: #5f6b63;
  --line: #e3e6e1;
  --bg: #f4f6f2;
  --rouge: #E58B8B;
  --jaune: #E8B445;
  --bleu: #3B82C4;
  --violet: #7F77DD;
  --vert: #2E5E3A;
  --oc: #8BBF5A;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

/* ---------- Connexion ---------- */
#login {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--hutto);
}
#login .card {
  background: #fff; width: 340px; max-width: 90vw;
  border-radius: 14px; padding: 28px 26px;
}
#login h1 { font-size: 19px; font-weight: 600; margin: 0 0 2px; color: var(--hutto); }
#login p.sub { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
#login label { display: block; font-size: 12.5px; color: var(--muted); margin: 12px 0 5px; }
#login input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; font-size: 14px;
}
#login input:focus { outline: none; border-color: var(--hutto); }
#login button {
  width: 100%; height: 42px; margin-top: 20px;
  background: var(--hutto); color: #fff; border: none; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; cursor: pointer;
}
#login button:hover { background: var(--hutto-dark); }
#login .link { display: inline-block; margin-top: 14px; font-size: 12.5px; color: var(--hutto); cursor: pointer; background: none; border: none; width: auto; height: auto; padding: 0; }
#login .err { color: #b3261e; font-size: 12.5px; margin-top: 12px; min-height: 16px; }

/* ---------- App ---------- */
#app { display: none; flex-direction: column; height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--hutto); color: var(--hutto-light); flex: none;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 8px; background: var(--hutto-light);
  color: var(--hutto); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.brand b { font-weight: 600; font-size: 15.5px; }
.brand small { display: block; font-size: 11.5px; opacity: .82; margin-top: -1px; }
.brand-logo { height: 30px; background: #fff; border-radius: 8px; padding: 4px 9px; display: block; }
.brand-sub { font-size: 12.5px; opacity: .9; }
.userchip { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.userchip .av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--hutto-light);
  color: var(--hutto); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.userchip a, .userchip button {
  color: var(--hutto-light); background: none; border: none; cursor: pointer;
  font-size: 13px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none;
}
#map { flex: 1; width: 100%; }

/* ---------- Repères Leaflet ---------- */
.bivpin { position: relative; }
.bivpin .pinwrap { display: block; transform-origin: bottom center; }
.bivpin .pin {
  width: 22px; height: 22px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center;
}
.bivpin .pin::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.85); transform: rotate(45deg); }
.bivpin.big .pin { width: 27px; height: 27px; }
.bivpin .halo {
  position: absolute; left: 11px; bottom: 0; width: 30px; height: 30px; border-radius: 50%;
  transform: translate(-50%, 40%); border: 2px solid var(--vert);
  animation: halo 1.8s ease-out infinite; pointer-events: none;
}
@keyframes halo { 0% { transform: translate(-50%,40%) scale(.5); opacity: .55; } 100% { transform: translate(-50%,40%) scale(1.7); opacity: 0; } }
@keyframes swsoft { 0%,100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
@keyframes swstrong { 0%,100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
.bivpin.soft .pinwrap { animation: swsoft 2.6s ease-in-out infinite; }
.bivpin.strong .pinwrap { animation: swstrong 1.15s ease-in-out infinite; }
.bivpin .pincrown { position: absolute; left: 11px; top: -13px; transform: translateX(-50%); font-size: 13px; line-height: 1; pointer-events: none; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.bivpin.big .pincrown { top: -15px; font-size: 15px; }
.bivpin .pincam { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 1px solid rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; box-shadow: 0 1px 2px rgba(0,0,0,.3); pointer-events: none; }
.bivpin.big .pincam { left: -9px; top: -9px; }
/* Photo pro : bleu = prise cette année, orange = année antérieure (cf. photoProClass). */
.bivpin .pincam.cur { background: var(--bleu); border-color: rgba(0,0,0,.3); }
.bivpin .pincam.old { background: #E8862B; border-color: rgba(0,0,0,.3); }
.bivpin .pinphone { position: absolute; left: 11px; top: 18px; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 1px solid rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; box-shadow: 0 1px 2px rgba(0,0,0,.3); pointer-events: none; }
.bivpin.big .pinphone { top: 22px; }

.campicon {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 14px; border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.18);
}
.cl-wrap { background: transparent !important; }
.cl { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.18); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.camplogo { width: 34px; height: 34px; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; }
.camplogo img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; display: block; }

/* ---------- Recherche & géolocalisation ---------- */
.searchbox { position: relative; }
.searchbar { display: flex; flex-direction: column; gap: 6px; }
.sq-btn { width: 34px; height: 34px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.2); font-size: 16px; line-height: 1; cursor: pointer; color: var(--hutto); display: flex; align-items: center; justify-content: center; }
.sq-btn:hover { background: var(--hutto-light); }
.sq-btn.on { background: var(--hutto); border-color: var(--hutto); } /* vue satellite active */
#locateBtn.loading { opacity: .45; }
.searchpanel { position: absolute; left: 42px; top: 0; width: 280px; max-width: 72vw; display: none; }
.searchpanel.open { display: block; }
.searchpanel input { width: 100%; height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.2); }
.searchpanel input:focus { outline: none; border-color: var(--hutto); }
.searchres { margin-top: 6px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.2); max-height: 320px; overflow-y: auto; }
.searchres:empty { display: none; }
.sres-item { display: flex; align-items: center; gap: 9px; padding: 8px 11px; cursor: pointer; border-bottom: 1px solid var(--line); }
.sres-item:last-child { border-bottom: none; }
.sres-item:hover { background: var(--hutto-light); }
.sres-ico { font-size: 14px; flex: none; }
.sres-txt { display: flex; flex-direction: column; min-width: 0; }
.sres-txt b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sres-txt small { font-size: 11.5px; color: var(--muted); }
.me-dot { background: #2b7bd6; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px rgba(43,123,214,.45); }
.search-pin { font-size: 26px; line-height: 1; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.toilet-pin { font-size: 14px; line-height: 22px; text-align: center; background: #fff; border-radius: 6px; border: 1px solid rgba(0,0,0,.25); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toilet-btn { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 800; background: #fff; border: 1px solid var(--hutto); border-radius: 20px; padding: 7px 16px; font-size: 12.5px; font-weight: 600; color: var(--hutto); box-shadow: 0 1px 5px rgba(0,0,0,.25); cursor: pointer; white-space: nowrap; }
.toilet-btn:hover:not(:disabled) { background: var(--hutto-light); }
.toilet-btn.hint { color: var(--muted); border-color: var(--line); font-weight: 500; cursor: default; }
.toilet-btn:disabled { opacity: .85; }

/* ---------- Légende ---------- */
.legend { background: #fff; padding: 10px 11px; border-radius: 11px; box-shadow: 0 1px 5px rgba(0,0,0,.18); font-size: 12.5px; line-height: 1.5; }
.legend h4 { margin: 0 0 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.legend-toggle { background: none; border: none; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 0; }
.legend-toggle .chev { font-size: 10px; transition: transform .15s; }
.legend-collapsed .legend-toggle .chev { transform: rotate(-90deg); }
/* Défile si la légende dépasse la hauteur de l'écran (sinon, sur mobile, les dernières lignes
   — « Mon exploration », Planning — sortaient sous le bord et étaient inaccessibles). */
.legend-body { margin-top: 7px; max-height: 72vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.legend-body.collapsed { display: none; }
.legend label { display: flex; align-items: center; gap: 8px; padding: 3px 2px; cursor: pointer; }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.legend hr { border: none; border-top: 1px solid var(--line); margin: 7px 0; }
.legend .mine-row { font-weight: 600; color: var(--hutto); }
.legend .mine-ico { color: var(--hutto); font-style: normal; width: 12px; text-align: center; flex: none; }
/* Nombre de points par ligne, collé au nom (compense le gap:8px du label flex). */
.legend .cnt { margin-left: -4px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }

/* ---------- Popups ---------- */
.leaflet-popup-content { margin: 0; width: 380px !important; }
.leaflet-popup-content-wrapper { border-radius: 12px; padding: 0; overflow: hidden; }
@media (max-width: 540px) {
  .leaflet-popup-content { width: 86vw !important; }
}
.bp .ph { height: 92px; background: #eef0ec; display: flex; align-items: center; justify-content: center; color: #9aa39b; font-size: 24px; position: relative; background-size: cover; background-position: center; }
.bp .badge { position: absolute; top: 8px; left: 8px; font-size: 10.5px; padding: 3px 8px; border-radius: 20px; font-weight: 600; }
.bp .mineflag { position: absolute; top: 8px; right: 8px; font-size: 10.5px; padding: 3px 8px; border-radius: 20px; background: var(--hutto-light); color: #27500A; font-weight: 600; }
.bp .body { padding: 13px 15px 15px; max-height: 62vh; overflow: auto; }
.bp .ttl { font-size: 15.5px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 6px; color: var(--ink); }
.bp .crown { font-size: 14px; }
.bp .subloc { font-size: 12px; color: var(--muted); margin-top: 3px; }
.bp .kv { display: flex; gap: 10px; font-size: 12.5px; padding: 3px 0; line-height: 1.5; }
.bp .kv .k { color: var(--muted); flex: none; width: 96px; }
.bp .kv span:last-child { word-break: break-word; }

/* Pastilles métadonnées */
.bp .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.bp .pill { display: inline-flex; align-items: baseline; gap: 5px; background: var(--hutto-light); color: #234a2d; font-size: 12px; padding: 4px 10px; border-radius: 20px; }
.bp .pill .pl { font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: #4f7a59; font-weight: 600; }
.bp .pill.photo { background: #e6f1fb; color: #0c447c; }
.bp .pill.photo .pl { color: #185fa5; }

/* Blocs titrés (descriptions) */
.bp .block { margin-top: 12px; }
.bp .block .bh { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--hutto); font-weight: 600; margin-bottom: 3px; }
.bp .block .bt { font-size: 12.5px; color: var(--ink); line-height: 1.55; white-space: pre-line; }

/* Carte contact propriétaire */
.bp .scard { margin-top: 13px; background: var(--hutto-light); border-radius: 10px; padding: 9px 12px; }
.bp .scard .bh { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: #27500A; font-weight: 600; margin-bottom: 5px; }
.bp .kvl { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 2px 0; }
.bp .kvl .kk { color: #4f7a59; }
.bp .kvl .vv { color: var(--ink); font-weight: 500; text-align: right; word-break: break-word; }
.bp .kvl a { color: #185FA5; text-decoration: none; }
.bp .seeon { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.bp .seeon .lbl { font-size: 11px; color: var(--muted); width: 100%; }
.bp .seeon a { font-size: 12.5px; color: var(--bleu); text-decoration: none; }
.bp .seeon a::after { content: " ↗"; opacity: .55; }
.bp .lock { margin-top: 9px; padding: 8px 9px; border-radius: 8px; background: #f3f4f1; font-size: 11.5px; color: var(--muted); }
.bp .sect { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.bp .sect .sh { font-size: 10.5px; color: #27500A; background: var(--hutto-light); display: inline-block; padding: 2px 7px; border-radius: 5px; margin-bottom: 6px; font-weight: 600; }
.bp .act { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.bp .act button { width: 100%; padding: 9px; border-radius: 8px; border: none; background: var(--hutto); color: #fff; font-size: 12.5px; cursor: pointer; font-weight: 600; }
.bp .act button:hover { background: var(--hutto-dark); }
.bp .act-explo { margin-top: 8px; }
.bp .act-explo .btn-explo { background: #6a4fb0; }
.bp .act-explo .btn-explo:hover { background: #583f96; }
.bp .act-explo .btn-explo2 { background: #fff; color: #6a4fb0; border: 1px solid #6a4fb0; }
.bp .act-explo .btn-explo2:hover { background: #f3effa; }
.explo-num { background: #6a4fb0; color: #fff; font-size: 11px; font-weight: 600; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.explo-date { font-size: 10px; font-weight: 600; color: #4a3a7a; background: rgba(255,255,255,.9); border: 1px solid rgba(106,79,176,.35); border-radius: 5px; padding: 1px 5px; white-space: nowrap; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.18); line-height: 1.3; }
.explo-info { font-size: 9px; color: #333; background: rgba(255,255,255,.88); border: 1px solid rgba(0,0,0,.12); border-radius: 5px; padding: 1px 5px; text-align: center; line-height: 1.25; max-width: 168px; white-space: normal; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.bp .act .links { display: flex; gap: 14px; margin-top: 2px; }
.bp .act .links a { font-size: 11.5px; color: var(--bleu); text-decoration: none; }

/* ---------- Modales formulaires ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 2000; background: rgba(20,30,22,.5); display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 16px 12px; box-sizing: border-box; }
.modal { background: #fff; width: 560px; max-width: 100%; border-radius: 14px; overflow: hidden; box-sizing: border-box; }
.modal header { background: var(--hutto); color: #fff; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; }
.modal header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal header .x { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.modal .content { padding: 18px; max-height: 70vh; overflow: auto; }
.modal .content label { display: block; font-size: 12.5px; color: var(--muted); margin: 14px 0 5px; font-weight: 500; }
.modal .content input[type=text], .modal .content input[type=email], .modal .content input[type=date], .modal .content select, .modal .content textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; font-family: inherit;
}
.modal .content textarea { min-height: 78px; resize: vertical; }
.modal .content input:focus, .modal .content textarea:focus, .modal .content select:focus { outline: none; border-color: var(--hutto); }
.modal .chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.modal .chips label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 20px; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.modal .chips input { accent-color: var(--hutto); }
.modal .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.modal footer { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.modal footer .alt { font-size: 12px; color: var(--muted); margin-right: auto; }
.modal footer button { padding: 10px 18px; border-radius: 9px; border: none; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.modal footer .cancel { background: #eef0ec; color: var(--ink); }
.modal footer .submit { background: var(--hutto); color: #fff; }
.modal .msg { font-size: 12.5px; margin-top: 10px; min-height: 16px; }
.modal .msg.err { color: #b3261e; }
.modal .msg.ok { color: var(--hutto); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Bouton Planning (légende) + planning d'exploration ---------- */
.plan-btn { display: block; width: 100%; margin-top: 6px; padding: 6px; border: 1px solid #6a4fb0; background: #fff; color: #6a4fb0; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.plan-btn:hover { background: #f3effa; }
/* Bouton + panneau du Mode Suivi Réservations */
.resa-btn { display: block; width: 100%; margin-top: 6px; padding: 7px; border: 1px solid #b30000; background: #fff; color: #b30000; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.resa-btn:hover, .resa-btn.on { background: #b30000; color: #fff; }
.resa-panel { position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 1000; width: min(440px, 92vw); background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.25); padding: 12px 14px; box-sizing: border-box; }
.resa-panel .resa-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 8px; }
.resa-panel .resa-head button { background: none; border: none; font-size: 15px; cursor: pointer; color: var(--muted); line-height: 1; }
.resa-panel input[type=range] { width: 100%; accent-color: #b30000; margin: 0; }
.resa-panel .resa-week { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }
.resa-panel .resa-read { font-size: 13px; text-align: center; margin-top: 2px; }
.resa-panel .resa-scale { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 10.5px; color: var(--muted); }
.resa-panel .resa-scale .grad { flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(to right, #f4f4f4, #ffe0d2, #e05a2a, #960000); }
/* Libellé permanent au centre d'une région (nuitées + %) en mode réservations */
.resa-lbl.leaflet-tooltip { background: rgba(255,255,255,.72); border: none; box-shadow: none; padding: 0 4px; border-radius: 5px; color: #1f2622; font-weight: 700; font-size: 12px; line-height: 1.05; text-align: center; white-space: nowrap; }
.resa-lbl.leaflet-tooltip::before { display: none; } /* pas de flèche */
.resa-lbl .pct { display: block; font-weight: 600; font-size: 10px; color: #8a2b12; }
.plan-row { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; }
.plan-l1 { display: flex; align-items: center; gap: 8px; }
.plan-num { background: #6a4fb0; color: #fff; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600; flex: none; }
.plan-name { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.plan-l1 .pl-rm { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: #b3261e; margin: 0; flex: none; }
.plan-l1 .pl-rm input { accent-color: #b3261e; }
.plan-l1 .pl-msg { font-size: 11px; white-space: nowrap; flex: none; }
.plan-l1 .pl-send { padding: 5px 12px; border-radius: 7px; border: none; background: #6a4fb0; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; flex: none; }
.plan-l1 .pl-send:hover { background: #583f96; }
.plan-l2 { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.plan-l2 input { height: 30px !important; padding: 0 8px !important; width: auto !important; margin: 0 !important; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; font-family: inherit; }
.plan-l2 .pl-date { width: 122px !important; flex: none; }
.plan-l2 .pl-time { width: 76px !important; flex: none; }
.plan-l2 .pl-info { flex: 1 !important; min-width: 60px; }

/* Bandeau d'invitation a installer l'application (PWA, cf. js/pwa.js) */
.pwa-invite {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9000;
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .16);
  padding: 12px 14px; font-size: 13.5px; color: var(--ink);
}
.pwa-invite span { flex: 1; min-width: 180px; line-height: 1.45; }
.pwa-invite .pwa-go {
  background: var(--hutto); color: #fff; border: none; border-radius: 9px;
  padding: 9px 16px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.pwa-invite .pwa-x {
  background: none; border: none; color: var(--muted);
  font-size: 20px; line-height: 1; padding: 0 2px; cursor: pointer;
}
@supports (padding: env(safe-area-inset-bottom)) {
  .pwa-invite { bottom: calc(12px + env(safe-area-inset-bottom)); }
}
