:root {
  --bg: #F5F3EE; --card: #fff; --ink: #1C1B19; --muted: #5F5B53; --line: #E4E0D7; --line2: #ECE8DF;
  --accent: #C2410C; --accent-dark: #9A3412; --green: #15803D; --blue: #1D4ED8; --purple: #7E22CE;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 15px; }
body { padding-bottom: calc(84px + var(--safe-b)); }
a { color: var(--accent); }
h1, h2 { font-family: 'Space Grotesk', sans-serif; margin: 0; letter-spacing: -0.3px; }
h1 { font-size: 30px; } h2 { font-size: 20px; }
button, input, textarea, select { font: inherit; color: inherit; }
.page { padding: calc(20px + var(--safe-t)) 16px 24px; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; height: 44px; }
.search input { border: 0; outline: 0; flex: 1; background: transparent; font-size: 16px; }
.search svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); font-size: 14px; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.tabs { display: flex; gap: 16px; font-size: 14px; color: var(--muted); }
.tabs button { background: none; border: 0; padding: 4px 0; color: inherit; cursor: pointer; }
.tabs button.on { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); }
.card { background: var(--card); border: 1px solid var(--line2); border-radius: 16px; }
.item { display: flex; gap: 12px; padding: 12px; text-decoration: none; color: inherit; }
.thumb { width: 84px; height: 84px; border-radius: 12px; background: #E7E3D9 center/cover no-repeat; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.thumb svg { width: 28px; height: 28px; stroke: #A8A296; fill: none; stroke-width: 1.6; }
.item .body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.item .name { font-size: 16px; font-weight: 600; }
.kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.kind.resto { color: var(--accent); } .kind.lieu { color: var(--blue); } .kind.recette { color: var(--purple); }
.tag { font-size: 12px; background: var(--bg); border-radius: 6px; padding: 2px 8px; }
.tag.edit { background: var(--card); border: 1px solid var(--line); padding: 6px 10px; font-size: 13px; border-radius: 8px; cursor: pointer; }
.tag.edit.add { border-style: dashed; color: var(--muted); background: var(--bg); }
.flag { font-size: 11px; font-weight: 600; color: #92400E; background: #FEF3C7; border-radius: 6px; padding: 2px 6px; }
.btn { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); cursor: pointer; padding: 0 14px; }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.big { height: 52px; font-size: 16px; width: 100%; }
.btn.danger { color: #B91C1C; }
.btn:disabled { opacity: .5; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg { display: flex; background: #EAE6DC; border-radius: 12px; padding: 4px; }
.seg button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; }
.info { display: flex; flex-direction: column; }
.info > * { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #F0EDE6; font-size: 14px; align-items: flex-start; }
.info > *:last-child { border-bottom: 0; }
.info svg { width: 20px; height: 20px; stroke: var(--muted); fill: none; stroke-width: 2; flex-shrink: 0; }
input.field, textarea.field, select.field { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); font-size: 16px; }
textarea.field { min-height: 80px; resize: vertical; }
.hero { height: 240px; background: #E7E3D9 center/cover no-repeat; position: relative; margin: calc(-20px - var(--safe-t)) -16px 0; }
.back { position: absolute; left: 16px; top: calc(14px + var(--safe-t)); width: 40px; height: 40px; border-radius: 20px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.back svg, .icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.avatar { width: 28px; height: 28px; border-radius: 14px; color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--ink); }
.avatar.u1 { background: var(--accent); }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; padding: 2px; cursor: pointer; font-size: 26px; line-height: 1; color: #CFCABF; }
.stars button.on, .stars span.on { color: var(--accent); }
.stars span { color: #CFCABF; font-size: 15px; }
.pill-green { font-size: 13px; font-weight: 600; background: #DCFCE7; color: var(--green); border-radius: 8px; padding: 4px 10px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.list { display: flex; flex-direction: column; gap: 12px; }
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(76px + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; z-index: 1000; }
#tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); text-decoration: none; min-width: 56px; }
#tabbar a.on { color: var(--accent); font-weight: 600; }
#tabbar svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#tabbar a.plus { width: 52px; min-width: 52px; height: 52px; border-radius: 26px; background: var(--accent); color: #fff; justify-content: center; }
#tabbar a.plus svg { width: 26px; height: 26px; stroke-width: 2.5; }
#map { position: fixed; inset: 0 0 calc(76px + var(--safe-b)) 0; z-index: 1; }
.map-top { position: fixed; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.map-top .chip { box-shadow: 0 1px 4px rgba(0,0,0,.15); border: 0; }
.sheet { position: fixed; left: 0; right: 0; bottom: calc(76px + var(--safe-b)); z-index: 600; background: #fff; border-radius: 20px 20px 0 0; padding: 14px 16px 16px; box-shadow: 0 -4px 16px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 10px; }
.pin { width: 26px; height: 26px; border-radius: 13px 13px 13px 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.pin.resto { background: var(--accent); } .pin.lieu { background: var(--blue); } .pin.teste, .pin.adore { background: var(--green); }
.me-dot { width: 16px; height: 16px; border-radius: 8px; background: #2563EB; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.2); }
#toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 2000; max-width: 90vw; }
#toast.show { opacity: 1; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #F0EDE6; }
.check-row:last-child { border-bottom: 0; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
.result { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #F0EDE6; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.result:last-child { border-bottom: 0; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--bg); border-radius: 8px; padding: 8px 10px; word-break: break-all; }
ol.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 24px; max-width: 420px; margin: 0 auto; }
