/* Mapa vivo. One map behind everything; every screen lives in the sheet (phone) or panel (desktop). */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --hair: color-mix(in srgb, var(--fog) 55%, white);
  --quiet: var(--leaf);
  --panel: 400px;
  --tabs-h: 60px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gut: 16px;
}

* { box-sizing: border-box; margin: 0; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  background: var(--green);
  overscroll-behavior: none;
}

body {
  font: 400 16px/1.42 'Archivo', system-ui, sans-serif;
  color: var(--ink);
  background: var(--green);
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, select { font-size: 16px; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
a { color: inherit; touch-action: manipulation; }
img { display: block; }
svg { display: block; }
ul { list-style: none; padding: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.tabs :focus-visible, .stories :focus-visible, .brand-tag:focus-visible, [data-theme="palm"] .sheet-head :focus-visible, .biz :focus-visible { outline-color: #fff; }

/* ---------- Stage: the green field and the country ---------- */
.stage { position: fixed; inset: 0; overflow: hidden; touch-action: none; background: var(--green); }
.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.dept { fill: var(--palm); stroke: var(--grass); stroke-width: .75px; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill 160ms ease, opacity 200ms var(--ease-out); cursor: pointer; }
.dept.is-on { fill: var(--palm); stroke: var(--paper); stroke-width: 1.25px; }
#inset.is-on .inset-frame { stroke-dasharray: none; stroke-width: 2px; }
#world.has-sel .dept:not(.is-on) { opacity: .55; }
.inset-frame { fill: transparent; stroke: var(--ink); stroke-width: 1px; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; cursor: pointer; }
.inset-dot { fill: var(--palm); pointer-events: none; }
.inset-hit { fill: transparent; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .dept:hover { fill: var(--leaf); }
}

.geo, .pins { position: absolute; inset: 0; pointer-events: none; }
.geo-label { position: absolute; left: 0; top: 0; font-style: italic; font-size: 14px; font-stretch: 88%; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity 200ms var(--ease-out); will-change: transform; }
.geo-label.on { opacity: .82; }
.geo-label.sm { font-size: 12.5px; }

/* Pins: anchor at the town, tapered stem, head floats above and fans out when crowded */
.pin { position: absolute; left: 0; top: 0; width: 0; height: 0; text-decoration: none; color: var(--ink); will-change: transform; transition: opacity 180ms var(--ease-out); }
.pin-wrap { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.pin[data-state="hidden"] { pointer-events: none; opacity: 0; }
.pin-dot { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--ink); }
.pin-stem { position: absolute; left: -4px; top: 0; width: 8px; height: 1px; background: #fff; clip-path: polygon(50% 0, 100% 100%, 0 100%); transform-origin: 50% 0; }
.pin-head { position: absolute; left: -42px; top: -42px; width: 84px; height: 84px; pointer-events: auto; will-change: transform; cursor: pointer; }
.pin[data-state="small"] .pin-head, .pin[data-state="hidden"] .pin-head { pointer-events: none; }
.pin[data-state="small"] .pin-stem { opacity: 0; }
.pin-head::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.pin-face { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: var(--paper); border: 5px solid #fff; box-shadow: 0 6px 16px rgb(10 20 5 / .38); }
.pin--negocio .pin-face { border-radius: 24%; }
.pin--destacado .pin-face { border-color: var(--orange); border-width: 7px; }
.pin-badge { position: absolute; right: -4px; top: -4px; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--ink); opacity: 0; transform: scale(.6); transition: opacity 160ms var(--ease-out), transform 200ms var(--ease-out); }
.pin-badge svg.i { width: 20px; height: 20px; fill: var(--ink); stroke: var(--ink); }
.pin.is-fav .pin-badge { opacity: 1; transform: none; }
.pin-label { position: absolute; left: 0; top: 0; padding: 3px 9px; background: var(--paper); border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgb(10 20 5 / .3); opacity: 0; transition: opacity 160ms var(--ease-out); }
.pin.show-label .pin-label { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .pin:hover .pin-label, .pin:focus-visible .pin-label { opacity: 1; }
  .pin:hover { z-index: 40 !important; }
}
.pin:focus-visible { outline: 0; }
.pin:focus-visible .pin-face { outline: 4px solid var(--ink); outline-offset: 2px; }

/* Town and saved-place pins share the machine, not the face */
.pin--town .pin-face, .pin--place .pin-face { background: var(--paper); display: grid; place-items: center; color: var(--ink); }
.pin--town .pin-face svg, .pin--place .pin-face svg { width: 40px; height: 40px; }
.pin--town.is-done .pin-face { background: var(--green); }
.pin-ring { position: absolute; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.pin-ring circle { fill: none; stroke: var(--green); stroke-width: 9; stroke-linecap: round; }
.pin-ring circle[stroke-dasharray^="0 "], .ring circle[stroke-dasharray^="0 "] { opacity: 0; }

.me { position: absolute; z-index: 35; left: 0; top: 0; width: 0; height: 0; will-change: transform; display: none; }
.me.on { display: block; }
.me i { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-shadow: 0 0 0 2px #fff; }
.me b { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: #fff; opacity: 0; }

/* ---------- Brand tag and hero ---------- */
.brand-tag { position: fixed; z-index: 3; left: var(--gut); top: calc(var(--safe-t) + 10px); display: flex; align-items: center; min-height: 44px; padding: 0 12px; background: var(--palm); border-radius: 12px; }
.brand-tag img { height: 22px; width: auto; }

.hero { position: fixed; z-index: 2; left: var(--gut); right: var(--gut); top: calc(var(--safe-t) + 62px); pointer-events: none; transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-out), visibility 0s; }
body:not([data-route="home"]) .hero { opacity: 0; transform: translateY(-10px); visibility: hidden; transition: opacity 160ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms; }
.hero h1 { font-size: min(16vw, 7.7svh); line-height: .9; font-weight: 800; font-stretch: 62%; letter-spacing: -.006em; color: var(--ink); }
.hero h1 span { display: block; width: fit-content; }
.hero p { margin-top: 10px; max-width: 34ch; font-size: min(17px, 2.1svh); line-height: 1.26; font-weight: 500; color: var(--ink); }

/* ---------- Sheet ---------- */
.sheet {
  position: fixed; z-index: 5; left: 0; right: 0; top: 0;
  height: 100dvh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 30px rgb(10 20 5 / .22);
  will-change: transform;
}
.sheet::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 200px; background: var(--paper); pointer-events: none; }
.grip { flex: none; height: 22px; width: 100%; display: flex; justify-content: center; padding-top: 8px; touch-action: none; position: relative; z-index: 1; }
.grip::after { content: ''; position: absolute; left: 50%; top: -10px; width: 120px; height: 44px; transform: translateX(-50%); }
.grip span { width: 38px; height: 5px; border-radius: 5px; background: var(--fog); }
.sheet-head { flex: none; padding: 0 var(--gut) 12px; touch-action: none; position: relative; }
.sheet-body { flex: 1 1 auto; min-height: 0; padding: 0 var(--gut) calc(24px + var(--safe-b)); overflow: hidden; overscroll-behavior: contain; touch-action: none; background: var(--paper); }
.sheet[data-detent="full"] .sheet-body { overflow-y: auto; touch-action: pan-y; }
.sheet[data-theme="palm"] { background: var(--palm); color: #fff; }
.sheet[data-theme="palm"] .grip span { background: var(--grass); }
.sheet[data-theme="palm"] .sheet-body { color: var(--ink); }
.sheet[data-theme="palm"] .sheet-head { padding-bottom: 14px; }
.panel-logo { display: none; }

/* Bar: back, screen name */
.bar { display: flex; align-items: center; gap: 6px; min-height: 48px; margin-left: -6px; }
.bar-t { min-width: 0; flex: 1; }
#screenName:focus { outline: 0; }
.bar-t h2 { font-size: 24px; line-height: 1.05; font-weight: 750; font-stretch: 75%; letter-spacing: -.002em; }
.bar-s { font-size: 14px; color: var(--quiet); }
[data-theme="palm"] .bar-s { color: var(--fog); }
.ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; transition: transform 140ms var(--ease-out), background-color 140ms ease; }
.ico svg { width: 24px; height: 24px; }
.ico:active { transform: scale(.92); background: var(--mist); }
[data-theme="palm"] .sheet-head .ico:active { background: var(--leaf); }
svg.i { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Three ways in */
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; margin-top: -11px; width: 22px; height: 22px; pointer-events: none; }
.search input { width: 100%; height: 50px; padding: 0 14px 0 46px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--paper); font-size: 16px; font-weight: 500; appearance: none; }
.search input::placeholder { color: var(--quiet); opacity: 1; font-weight: 400; }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.way { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 10px; border-radius: 14px; font-weight: 700; font-size: 16px; font-stretch: 92%; text-decoration: none; transition: transform 140ms var(--ease-out); }
.way svg { width: 21px; height: 21px; flex: none; }
.way:active { transform: scale(.97); }
.way--p { background: var(--green); color: var(--ink); }
.way--n { background: var(--palm); color: #fff; }

@media (max-width: 380px) {
  .way { font-size: 15px; font-stretch: 82%; gap: 5px; padding: 0 6px; white-space: nowrap; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 14px; font-weight: 650; text-decoration: none; text-align: center; transition: transform 140ms var(--ease-out), background-color 140ms ease; }
.btn svg { width: 21px; height: 21px; flex: none; }
.btn:active { transform: scale(.97); }
.btn--green { background: var(--green); color: var(--ink); }
.btn--dark { background: var(--palm); color: #fff; }
.btn--line { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--soft { background: var(--mist); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.linkish { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: 3px; text-decoration: underline; }
.linkish svg { width: 18px; height: 18px; margin-right: 6px; }

/* Sections inside the sheet */
.sec { margin-top: 24px; }
.sec:first-child { margin-top: 4px; }
.sec > h3 { font-size: 19px; font-weight: 700; font-stretch: 80%; line-height: 1.1; margin-bottom: 8px; }
.sec > p { color: var(--quiet); margin-bottom: 10px; max-width: 60ch; }
.note { margin-top: 28px; font-size: 13px; color: var(--quiet); }

/* Directory rows */
.list { display: block; }
.row { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--hair); background: var(--paper); position: relative; }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; transition: opacity 120ms ease; }
.row-main:active { opacity: .6; }
.fc { display: block; position: relative; overflow: hidden; background: var(--mist); }
.row-img { width: 58px; height: 58px; flex: none; object-fit: cover; background: var(--mist); }
.row--productor .row-img { border-radius: 50%; }
.row--negocio .row-img { border-radius: 14px; }
.row-t { min-width: 0; }
.row-t strong { display: flex; flex-wrap: wrap; align-items: center; gap: 1px 6px; font-size: 17px; line-height: 1.15; font-weight: 700; font-stretch: 88%; }
.row-t strong svg { display: inline-block; width: 16px; height: 16px; margin-left: -2px; color: var(--leaf); stroke-width: 2.4; }
.row-t > span { display: block; font-size: 14px; line-height: 1.25; color: var(--quiet); }
.row-t .kind { font-size: 13px; font-weight: 600; color: var(--ink); }
.row-km { font-weight: 650; color: var(--ink); }
.row--top::before { content: ''; position: absolute; left: calc(var(--gut) * -1); top: 8px; bottom: 8px; width: 5px; border-radius: 0 5px 5px 0; background: var(--orange); }
.row--top .row-img, .row-img--top { box-shadow: 0 0 0 3px var(--orange); }
.tag-top { display: inline-block; padding: 0 7px; white-space: nowrap; border-radius: 6px; background: var(--orange); color: var(--ink); font-size: 12.5px; font-weight: 650; font-stretch: 92%; vertical-align: 1px; line-height: 1.5; }
.fav svg { transition: fill 120ms ease; }
.fav[aria-pressed="true"] svg { fill: var(--ink); }
.empty { padding: 18px 0 8px; }
.empty strong { display: block; font-size: 18px; font-stretch: 85%; font-weight: 700; margin-bottom: 4px; }
.empty p { color: var(--quiet); margin-bottom: 12px; max-width: 42ch; }

/* Stories strip */
.strip { display: flex; gap: 12px; margin: 0 calc(var(--gut) * -1); padding: 2px var(--gut) 4px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x pan-y; }
.strip::-webkit-scrollbar { display: none; }
.strip a { flex: none; width: 76px; text-decoration: none; text-align: center; font-size: 13px; line-height: 1.2; transition: transform 140ms var(--ease-out); }
.strip a:active { transform: scale(.96); }
.st-face { width: 68px; height: 68px; margin: 0 auto 5px; border-radius: 50%; }
.strip a { padding: 5px 0 0; }
.st-face, .strip img { box-shadow: 0 0 0 2.5px var(--paper), 0 0 0 5px var(--green); }
.strip img { width: 68px; height: 68px; margin: 0 auto 5px; border-radius: 50%; object-fit: cover; }

/* Chips and filters */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 8px; padding: 3px; border-radius: 13px; background: var(--mist); }
.seg button { min-height: 44px; border-radius: 10px; font-weight: 650; font-size: 15.5px; font-stretch: 92%; transition: transform 140ms var(--ease-out); }
.seg button:active { transform: scale(.97); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chips { display: flex; gap: 6px; margin: 8px calc(var(--gut) * -1) 0; padding: 0 var(--gut) 2px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x pan-y; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--fog); font-size: 15px; font-weight: 500; white-space: nowrap; text-decoration: none; background: var(--paper); transition: transform 140ms var(--ease-out); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip svg { width: 18px; height: 18px; margin-right: 6px; }
.chips--wrap { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding: 0; }

.near { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.near .btn { flex: 1; }
.resline { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: 4px; font-weight: 650; }

/* Profile: person */
.who { position: relative; padding-right: 112px; min-height: 66px; margin-top: 2px; }
.who h3 { font-size: 40px; line-height: .94; font-weight: 800; font-stretch: 66%; }
.who .tag-top { margin-left: 6px; }
.who p { margin-top: 5px; font-size: 15px; line-height: 1.25; color: var(--quiet); }
.who-face { position: absolute !important; right: var(--gut); top: -52px; width: 116px; height: 116px; border-radius: 50%; border: 5px solid var(--paper); box-shadow: 0 6px 18px rgb(10 20 5 / .3); z-index: 2; background: var(--mist); }
.is-top { box-shadow: 0 0 0 4px var(--orange), 0 6px 18px rgb(10 20 5 / .3); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; }
.badge svg { width: 16px; height: 16px; stroke-width: 2.4; }
.contact { display: grid; grid-template-columns: 1fr 1fr 48px; gap: 8px; margin-top: 2px; }
.contact .ico { width: 48px; height: 48px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.prods { display: flex; flex-wrap: wrap; gap: 6px; }
.prods li { padding: 5px 11px; border-radius: 9px; background: var(--mist); font-size: 15px; font-weight: 500; }
.gallery { display: flex; gap: 8px; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut); overflow-x: auto; scrollbar-width: none; touch-action: pan-x pan-y; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 150px; height: 190px; object-fit: cover; border-radius: 12px; background: var(--mist); }
.portrait { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; background: var(--mist); }

/* Link + QR */
.share { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; }
.qr { width: 112px; height: 112px; background: #fff; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--hair); }
.qr svg { width: 100%; height: 100%; }
.share-t { min-width: 0; }
.url { display: block; font-size: 14px; word-break: break-all; line-height: 1.25; margin-bottom: 8px; font-weight: 500; }
.share .btn { width: 100%; }
.place-line { display: flex; gap: 10px; align-items: flex-start; }
.place-line svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.place-line + .place-line { margin-top: 8px; }
.loc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* Profile: place. Different shape on purpose: dark head, wide photo, hours first */
.biz h3 { font-size: 34px; line-height: .98; font-weight: 800; font-stretch: 72%; color: #fff; }
.biz p { margin-top: 5px; font-size: 15px; line-height: 1.25; color: var(--fog); }
.biz .tag-top { margin: 6px 0 0; }
.biz-cover { display: block; width: calc(100% + var(--gut) * 2); max-width: none; margin: 0 calc(var(--gut) * -1); aspect-ratio: 16/9; object-fit: cover; background: var(--mist); }
.hours { margin: 0 calc(var(--gut) * -1) 14px; padding: 12px var(--gut); background: var(--mist); display: grid; gap: 8px; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }

/* Plans */
.plan { padding: 14px 0; border-top: 1px solid var(--hair); }
.plan h4 { font-size: 21px; font-weight: 750; font-stretch: 78%; line-height: 1.1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.plan h4 { margin-bottom: 8px; }
.plan h4 + .plan-price { margin-top: -6px; }
.plan-price { display: block; margin: 2px 0 8px; font-weight: 600; color: var(--quiet); }
.plan ul { margin-bottom: 12px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.3; margin-bottom: 5px; }
.plan li svg { width: 17px; height: 17px; flex: none; margin-top: 2px; stroke-width: 2.4; }
.plan--top { margin: 0 calc(var(--gut) * -1); padding: 16px var(--gut); background: color-mix(in srgb, var(--orange) 15%, white); border-top: 0; }
.plan-demo { margin-bottom: 12px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange) 45%, white); }
.now { display: inline-flex; padding: 1px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; font-stretch: 100%; }

/* Forms and sign-up */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; margin-bottom: 4px; font-weight: 600; font-size: 15px; }
.field input { width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 13px; background: var(--paper); appearance: none; }
.field input[aria-invalid="true"] { border-color: #B3261E; box-shadow: inset 0 0 0 1px #B3261E; }
.err { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: #B3261E; }
.role { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--hair); text-align: left; text-decoration: none; transition: opacity 120ms ease; }
.role:active { opacity: .6; }
.role-i { width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--green); }
.role-i svg { width: 27px; height: 27px; }
.role:nth-child(2) .role-i { background: var(--palm); color: #fff; border-radius: 14px; }
.role:nth-child(3) .role-i { background: var(--mist); }
.role strong { display: block; font-size: 20px; font-weight: 750; font-stretch: 80%; line-height: 1.15; }
.role span span { display: block; font-size: 14.5px; line-height: 1.25; color: var(--quiet); }
.gp-label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--mist); font-size: 14px; font-weight: 600; }
.gp-label svg { width: 16px; height: 16px; }
.gp-result { display: block; width: 100%; padding: 12px 0; border-bottom: 1px solid var(--hair); text-align: left; text-decoration: none; }
.gp-result strong { display: block; font-size: 17px; font-weight: 700; font-stretch: 88%; }
.gp-result span { display: block; font-size: 14px; color: var(--quiet); }
.match { padding: 14px; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--ink); margin: 10px 0 12px; }
.match strong { display: block; font-size: 24px; font-weight: 800; font-stretch: 72%; line-height: 1.05; margin-bottom: 4px; }
.match span { display: block; font-size: 15px; line-height: 1.3; }
.merge-into { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 14.5px; line-height: 1.25; }
.merge-f { width: 46px; height: 46px; flex: none; border-radius: 50%; }
.stack { display: grid; gap: 8px; }
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--green); display: grid; place-items: center; margin-bottom: 10px; }
.done-mark svg { width: 30px; height: 30px; stroke-width: 2.6; }
.sec > .done-t { color: var(--ink); max-width: none; font-size: 32px; font-weight: 800; font-stretch: 68%; line-height: 1; margin-bottom: 6px; }

/* Downloads */
.town { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.town-i { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--mist); }
.town-i svg.i { width: 20px; height: 20px; }
.town.is-done .town-i { background: var(--green); }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; }
.town-t { flex: 1; min-width: 0; }
.town-t strong { display: block; font-size: 17px; font-weight: 700; font-stretch: 88%; line-height: 1.2; }
.town-t span { display: block; font-size: 14px; color: var(--quiet); }
.town .btn { min-height: 44px; padding: 0 12px; font-size: 15px; flex: none; }

/* Account */
.acct-plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acct-plan strong { font-size: 19px; font-stretch: 85%; }
.upload { display: block; }
.upload input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mine { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.mine img { width: 48px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.mine div { flex: 1; min-width: 0; font-size: 15px; line-height: 1.25; }
.saved-place { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--hair); }
.saved-place a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 56px; text-decoration: none; font-weight: 600; }
.saved-place a svg { width: 22px; height: 22px; flex: none; }

/* ---------- Tabs ---------- */
.tabs { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: var(--safe-b); background: var(--palm); color: var(--fog); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabs-h); font-size: 12px; font-weight: 550; text-decoration: none; transition: transform 140ms var(--ease-out); min-width: 0; }
.tab svg { width: 24px; height: 24px; }
.tab:active { transform: scale(.94); }
.tab[aria-current="page"] { color: #fff; font-weight: 700; }
.tab[aria-current="page"] svg { color: var(--green); stroke-width: 2.3; }

/* ---------- Zoom controls ---------- */
.zoomctl { position: fixed; z-index: 3; right: var(--gut); top: calc(var(--safe-t) + 10px); display: grid; gap: 1px; border-radius: 12px; overflow: hidden; background: var(--hair); box-shadow: 0 2px 10px rgb(10 20 5 / .25); }
.zoomctl[hidden] { display: none; }
.zoomctl .ico { border-radius: 0; background: var(--paper); }

/* ---------- Stories viewer ---------- */
.stories { position: fixed; z-index: 10; inset: 0; background: var(--palm); color: #fff; display: flex; flex-direction: column; will-change: transform; touch-action: none; }
.stories[hidden] { display: none; }
.st-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgb(14 22 10 / .72), rgb(14 22 10 / 0) 26%, rgb(14 22 10 / 0) 46%, rgb(14 22 10 / .86) 78%); }
.st-top, .st-bottom { position: relative; z-index: 2; }
.st-top { padding: calc(var(--safe-t) + 8px) 10px 0; }
.st-bars { display: flex; gap: 4px; margin: 0 2px 6px; }
.st-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .35); overflow: hidden; display: block; }
.st-bars i b { display: block; width: 100%; height: 100%; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }
.st-head { display: flex; align-items: center; gap: 4px; }
.st-head h2 { font-size: 22px; font-weight: 750; font-stretch: 78%; flex: 1; }
.st-head .ico:active { background: rgb(255 255 255 / .2); }
.st-tap { position: absolute; z-index: 1; top: 90px; bottom: 170px; width: 42%; background: none; }
.st-tap--prev { left: 0; }
.st-tap--next { right: 0; width: 58%; }
.st-bottom { margin-top: auto; padding: 12px var(--gut) calc(var(--safe-b) + 14px); }
.st-who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; text-decoration: none; }
.st-who-f { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; flex: none; }
.st-who strong { display: block; font-size: 17px; font-weight: 700; line-height: 1.15; }
.st-who span { display: block; font-size: 14px; color: #E6EBE4; }
.st-text { font-size: 25px; line-height: 1.12; font-weight: 700; font-stretch: 82%; margin-bottom: 12px; max-width: 26ch; }
.st-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-actions .btn--line { box-shadow: inset 0 0 0 1.5px #fff; color: #fff; }
.st-mini { position: absolute; z-index: 2; right: 14px; bottom: calc(var(--safe-b) + 150px); width: 62px; pointer-events: none; }
.st-mini path { fill: rgb(255 255 255 / .42); }
.st-mini circle { fill: var(--green); stroke: #fff; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 20; left: 50%; top: calc(var(--safe-t) + 12px); max-width: min(92vw, 420px); width: max-content; padding: 11px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; line-height: 1.25; box-shadow: 0 8px 26px rgb(0 0 0 / .32); transform: translate(-50%, -16px); opacity: 0; pointer-events: none; transition: transform 220ms var(--ease-out), opacity 180ms var(--ease-out); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 640px) and (max-width: 1099px) {
  .hero h1 { font-size: min(10.4vw, 7.7svh); }
  .hero p { max-width: 26ch; font-size: 18px; }
}

/* ---------- Desktop: the same sheet becomes a side panel ---------- */
@media (min-width: 1100px) {
  :root { --gut: 20px; }
  .sheet { left: 16px; right: auto; top: 16px; width: var(--panel); height: calc(100dvh - 32px); border-radius: 20px; transform: none !important; overflow: hidden; box-shadow: 0 14px 44px rgb(10 20 5 / .3); }
  .sheet::after { display: none; }
  .grip { display: none; }
  .panel-logo { display: block; padding-top: 16px; margin-bottom: 10px; }
  .panel-logo img { height: 25px; width: auto; }
  .sheet-head { padding-top: 0; }
  .sheet-body { overflow-y: auto; touch-action: pan-y; padding-bottom: calc(var(--tabs-h) + 24px); scrollbar-width: thin; scrollbar-color: var(--fog) transparent; }
  .brand-tag { display: none; }
  .tabs { left: 16px; right: auto; bottom: 16px; width: var(--panel); border-radius: 0 0 20px 20px; }
  .who-face { top: 8px; width: 100px; height: 100px; }
  .who { padding-right: 112px; min-height: 104px; }
  .hero { left: calc(16px + var(--panel) + 44px); right: auto; top: 34px; width: min(56vw, 700px); }
  .hero h1 { font-size: min(6.7vw, 11.8vh, 132px); }
  .hero p { margin-top: 18px; font-size: clamp(18px, 1.5vw, 24px); max-width: 26ch; line-height: 1.24; }
  .zoomctl { top: 16px; }
  .stories { inset: 16px auto 16px 16px; width: var(--panel); border-radius: 20px; overflow: hidden; }
  .toast { left: calc(16px + var(--panel) / 2); top: 28px; }
  .st-mini { display: none; }
}

@media (hover: hover) and (pointer: fine) {
  .row-main:hover strong, .gp-result:hover strong, .role:hover strong { text-decoration: underline; text-underline-offset: 3px; }
  .btn--soft:hover { background: var(--hair); }
  .chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
  .chip.on:hover, .chip[aria-pressed="true"]:hover { box-shadow: none; }
  .ico:hover { background: var(--mist); }
  [data-theme="palm"] .sheet-head .ico:hover { background: var(--leaf); }
  .st-head .ico:hover { background: rgb(255 255 255 / .16); }
  .tab:hover { color: #fff; }
  .strip a:hover { text-decoration: underline; text-underline-offset: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero, body:not([data-route="home"]) .hero { transition: opacity 120ms linear, visibility 0s; transform: none; }
  .toast { transition: opacity 120ms linear; transform: translate(-50%, 0); }
  .btn:active, .way:active, .ico:active, .tab:active, .chip:active, .seg button:active, .strip a:active { transform: none; }
  .pin-badge { transition: opacity 120ms linear; transform: none; }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .sheet { box-shadow: 0 0 0 2px var(--ink); }
}
