[hidden] { display: none !important; }
img { max-width: 100%; }
/* Layout: one-column phone app shell (max 560px), fixed action bar at the bottom, views swap in place. */
:root {
  color-scheme: dark;
  --bg: #0B0C10;
  --surface: #15171D;
  --surface-2: #1E2129;
  --border: #2A2E38;
  --fg: #F4F5F7;
  --dim: #9BA1AE;
  --faint: #5F6573;
  --accent: #FF7A2F;
  --accent-soft: rgba(255,122,47,.16);
  --teal: #2ED3B7;
  --teal-soft: rgba(46,211,183,.14);
  --danger: #FF5470;
  --on-accent: #0B0C10;
  --white: #FFFFFF;
  --scrim: rgba(0,0,0,.62);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 30px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--fg); }
body { font-family: var(--body); font-size: 15px; line-height: 1.45; min-height: 100%; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: var(--fg); }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; flex: none; }

.app { max-width: 560px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 12px 140px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); display: flex; align-items: center; gap: 8px; min-height: 56px; margin: 0 -4px 4px; }
.topbar h1 { font-family: var(--display); font-weight: 800; font-size: 18px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.brand { font-family: var(--display); font-weight: 900; font-size: 36px; letter-spacing: -1.2px; line-height: 1; margin: 0; }
.brand span { color: var(--accent); }
.sub { color: var(--dim); font-size: 13px; font-weight: 500; margin-top: 4px; }
.h-title { font-family: var(--display); font-weight: 900; font-size: 32px; letter-spacing: -1px; line-height: 1.05; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.section { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.3px; margin: 0; }
.label { color: var(--dim); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .9px; }
.muted { color: var(--dim); font-size: 13px; }
.faint { color: var(--faint); font-size: 12px; }

/* Buttons */
.btn { height: 50px; border-radius: var(--r-md); padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; transition: transform .1s, opacity .1s; width: 100%; }
.btn:active { transform: scale(.98); opacity: .85; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.secondary { background: var(--surface-2); border: 1px solid var(--border); }
.btn.ghost { color: var(--fg); }
.btn.danger { background: rgba(255,84,112,.12); color: var(--danger); }
.btn.big { height: 60px; border-radius: var(--r-lg); font-size: 17px; }
.btn.auto { width: auto; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-btn.plain { background: transparent; }
.icon-btn:active { opacity: .7; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; margin: 0 -16px; padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--dim); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--fg); border-color: var(--fg); color: var(--on-accent); }

.search { height: 48px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--faint); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 15px; }
.search input::placeholder { color: var(--faint); }

/* Hero carousel */
.carousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.hero { flex: none; width: 78%; max-width: 380px; aspect-ratio: 1 / 1.05; border-radius: var(--r-xl); overflow: hidden; position: relative; background: var(--surface); border: 1px solid var(--border); scroll-snap-align: start; text-align: left; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .shade { position: absolute; inset: auto 0 0 0; height: 60%; background: linear-gradient(transparent, rgba(0,0,0,.86)); }
.hero .top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; }
.hero .bottom { position: absolute; left: 18px; right: 18px; bottom: 18px; }
.hero .name { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.5px; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero .meta { color: rgba(255,255,255,.75); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.pill { height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(11,12,16,.72); color: var(--white); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; }
.tag-demo { background: var(--teal); color: var(--on-accent); }

/* Project rows */
.prow { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--r-md); background: var(--surface); width: 100%; text-align: left; }
.prow:active { background: var(--surface-2); }
.thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.prow .t { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .a { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metas { display: flex; gap: 12px; margin-top: 3px; color: var(--dim); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metas span { display: inline-flex; align-items: center; gap: 4px; }

/* Avatars */
.avs { display: flex; }
.av { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg); display: grid; place-items: center; color: var(--on-accent); font-weight: 800; font-size: 11px; margin-left: -8px; }
.av:first-child { margin-left: 0; }

/* Fixed bottom bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--bg); border-top: 1px solid var(--border); padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.bar.fade { border-top: 0; background: linear-gradient(transparent, var(--bg) 40%); padding-top: 36px; }
.bar-inner { max-width: 528px; margin: 0 auto; display: flex; gap: 10px; flex-direction: column; }
.bar-inner.split { flex-direction: row; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.input { height: 54px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); padding: 0 14px; font-size: 16px; outline: none; width: 100%; }
.input::placeholder, textarea::placeholder { color: var(--faint); }
.input:focus, textarea:focus { border-color: var(--accent); }
textarea.notes { width: 100%; min-height: 96px; resize: vertical; background: transparent; border: 0; outline: none; font-size: 16px; line-height: 1.45; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft); font-weight: 600; font-size: 14px; }
.hint.teal { background: var(--teal-soft); }
.hint svg { margin-top: 1px; }
.gps { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--teal-soft); border: 1px solid rgba(46,211,183,.3); }
.gps .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--teal); flex: none; }
.gps .ic.ok { background: var(--teal); color: var(--on-accent); }
.mono { font-family: var(--mono); font-size: 12px; }

/* Pinned image */
.pimg { position: relative; width: 100%; max-width: 100%; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); touch-action: manipulation; }
.pimg > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.pimg.placing { cursor: crosshair; }
.pimg.placing::after { content: ""; position: absolute; inset: 0; border: 3px dashed var(--accent); border-radius: var(--r-lg); pointer-events: none; }
.pimg.placing .pin { pointer-events: none; }
.pin { position: absolute; width: 0; height: 0; }
.pin .dot { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--white); display: grid; place-items: center; color: var(--on-accent); font-weight: 900; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.5); font-family: var(--display); }
.pin .pulse { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; animation: pulse 1.8s ease-out infinite; pointer-events: none; }
.pin .cnt { position: absolute; top: -9px; right: -11px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px; background: var(--bg); border: 1.5px solid var(--white); color: var(--white); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.pin .lbl { position: absolute; top: 20px; left: 0; transform: translateX(-50%); max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(11,12,16,.8); color: var(--white); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; pointer-events: none; }
.pin.dim { opacity: .35; }
.pin.hl .dot { transform: scale(1.2); }
.pin.ghost .dot { background: var(--white); color: var(--on-accent); opacity: .9; }
@keyframes pulse { from { transform: scale(1); opacity: .55; } to { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pin .pulse { animation: none; opacity: 0; } }

.pinrow { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--surface); width: 100%; text-align: left; }
.pinrow:active { background: var(--surface-2); }
.pnum { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--on-accent); font-weight: 900; font-size: 12px; flex: none; font-family: var(--display); }
.pdot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--white); flex: none; }
.pinrow .t { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinrow .mini { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; }

.crumbs { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.crumbs::-webkit-scrollbar { display: none; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-weight: 600; font-size: 13px; padding: 4px 2px; max-width: 170px; }
.crumb span { overflow: hidden; text-overflow: ellipsis; }
.crumb.cur { color: var(--fg); }
.crumbs .sep { color: var(--faint); }

.stats { display: flex; gap: 10px; }
.stat { background: var(--surface); border-radius: var(--r-md); padding: 10px 16px; min-width: 80px; }
.stat b { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat small { color: var(--dim); font-size: 12px; }
.team { flex: 1; background: var(--surface); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; min-height: 60px; }

.thumbs { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.rthumb { flex: none; width: 72px; height: 96px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; position: relative; background: var(--surface); }
.rthumb.on { border-color: var(--accent); }
.rthumb img { width: 100%; height: 100%; object-fit: cover; }
.rthumb .b { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; display: grid; place-items: center; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; position: relative; background: var(--surface); text-align: left; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .info { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tile .note { background: rgba(11,12,16,.82); color: var(--white); font-size: 12px; padding: 6px; border-radius: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; }

.note-box { background: var(--surface); padding: 12px 14px; border-radius: var(--r-md); border-left: 3px solid var(--accent); white-space: pre-wrap; overflow-wrap: anywhere; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 16px; }
.empty .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 6px; }
.empty b { font-size: 17px; }
.empty p { margin: 0; color: var(--dim); font-size: 14px; max-width: 32ch; }
.dashed { border: 1px dashed var(--border); border-radius: var(--r-lg); background: var(--surface); }

.roles { display: flex; gap: 8px; }
.role { flex: 1; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--border); color: var(--dim); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.role.on { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
.member { display: flex; align-items: center; gap: 12px; background: var(--surface); padding: 12px; border-radius: var(--r-md); }
.member .av { width: 38px; height: 38px; font-size: 14px; margin: 0; }
pre.report { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--dim); max-height: 260px; overflow: auto; }

/* Modal sheet */
.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 20px max(20px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 10px; animation: up .22s ease-out; }
.sheet h2 { font-family: var(--display); font-size: 22px; font-weight: 800; margin: 0; }
.sheet .input { background: var(--bg); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; background: var(--fg); color: var(--on-accent); font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 20px; box-shadow: 0 6px 24px rgba(0,0,0,.4); max-width: calc(100% - 32px); }
.busy { position: fixed; inset: 0; z-index: 65; background: var(--scrim); display: grid; place-items: center; color: var(--white); font-weight: 700; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Standalone page base ---------- */
html, body { margin: 0; }
:root { padding-top: env(safe-area-inset-top, 0px); }
html.cam-open, html.cam-open body { overflow: hidden; }
.spin.sm { width: 16px; height: 16px; border-width: 2px; margin: 0; display: inline-block; vertical-align: -3px; }

/* ---------- Address form ---------- */
.search-wrap { position: relative; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 8; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.sugg-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.sugg-item:active, .sugg-item:hover { background: var(--surface); }
.sugg-item b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg-item small { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg-item em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 10px; flex: none; }
.sugg-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--teal); flex: none; }
.sugg-msg { padding: 14px; color: var(--dim); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.sugg-attr { padding: 6px 14px; font-size: 10px; color: var(--faint); text-align: right; }
.addr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; }
.addr-grid.second { grid-template-columns: 110px minmax(0, 1fr); }
.input.need { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nr-hint { margin: -4px 0 0; color: var(--accent); font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; }

/* ---------- Map preview ---------- */
.map { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.map .tiles { position: absolute; width: 768px; height: 768px; }
.map .tiles img { position: absolute; width: 256px; height: 256px; max-width: none; filter: saturate(.85) brightness(.92); }
.map-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); color: var(--accent); filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.map-pin svg { fill: var(--accent); stroke: var(--white); }
.map-open { position: absolute; right: 8px; top: 8px; background: rgba(11,12,16,.82); color: var(--white); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 14px; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.map-attr { position: absolute; right: 6px; bottom: 4px; font-size: 10px; color: #333; background: rgba(255,255,255,.75); padding: 0 4px; border-radius: 3px; }

/* ---------- Live camera ---------- */
.cam { position: fixed; inset: 0; z-index: 50; background: #000; color: var(--white); display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none; }
.cam-view { position: absolute; inset: 0; overflow: hidden; }
.cam-view video { width: 100%; height: 100%; object-fit: cover; transform-origin: center; }
.cam-grid i, .cam-grid b { position: absolute; background: rgba(255,255,255,.35); pointer-events: none; }
.cam-grid i { top: 0; bottom: 0; width: 1px; } .cam-grid b { left: 0; right: 0; height: 1px; }
.cam-grid { position: absolute; inset: 0; pointer-events: none; }
.shot-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.shot-flash.go { animation: shot .3s ease-out; }
@keyframes shot { from { opacity: .9; } to { opacity: 0; } }
.count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 120px; font-weight: 900; text-shadow: 0 4px 30px rgba(0,0,0,.6); pointer-events: none; }
.focus-ring { position: absolute; width: 74px; height: 74px; margin: -37px 0 0 -37px; border: 2px solid #FFC83D; border-radius: 8px; pointer-events: none; animation: focus .9s ease-out forwards; }
@keyframes focus { 0% { transform: scale(1.4); opacity: 1; } 40% { transform: scale(1); } 100% { opacity: 0; } }
.cam-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); display: flex; justify-content: space-between; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.cbtn { width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.45); color: var(--white); display: grid; place-items: center; }
.cbtn.on { background: var(--accent); color: var(--on-accent); }
.cbtn.big { width: 54px; height: 54px; background: rgba(255,255,255,.16); }
.cam-ctx { position: absolute; top: calc(64px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); max-width: 82%; background: rgba(0,0,0,.55); border-radius: 15px; height: 30px; padding: 0 12px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.cam-ctx span:last-child { overflow: hidden; text-overflow: ellipsis; }
.cam-chip-info { position: absolute; top: calc(100px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); background: rgba(255,200,61,.9); color: #000; font-size: 12px; font-weight: 700; border-radius: 12px; padding: 3px 10px; white-space: nowrap; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; align-items: center; gap: 12px; background: linear-gradient(transparent, rgba(0,0,0,.7) 35%); }
.lens-row, .zoom-row { display: flex; gap: 6px; background: rgba(0,0,0,.45); padding: 4px; border-radius: 22px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lens { min-width: 46px; height: 34px; padding: 0 10px; border-radius: 17px; font-weight: 700; font-size: 13px; color: var(--white); }
.lens.on { background: var(--accent); color: var(--on-accent); }
.zbtn { min-width: 40px; height: 40px; border-radius: 50%; font-weight: 800; font-size: 12px; color: var(--white); background: rgba(255,255,255,.08); padding: 0 6px; font-variant-numeric: tabular-nums; }
.zbtn.on { background: rgba(255,200,61,.95); color: #000; transform: scale(1.08); }
.zs-row, .ev-row { display: flex; align-items: center; gap: 10px; width: min(100%, 360px); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.zs-row input, .ev-row input { flex: 1; accent-color: #FFC83D; }
#zLbl { min-width: 38px; color: #FFC83D; }
.shutter-row { display: flex; align-items: center; justify-content: space-between; width: min(100%, 360px); }
.shutter { width: 80px; height: 80px; border-radius: 50%; border: 5px solid var(--white); display: grid; place-items: center; }
.shutter span { width: 60px; height: 60px; border-radius: 50%; background: var(--white); transition: transform .1s; }
.shutter:active span { transform: scale(.88); }
.shutter.shooting span { background: var(--accent); transform: scale(.7); }
.shutter:disabled { opacity: .35; }
.cam-links { display: flex; gap: 10px; font-size: 12px; color: rgba(255,255,255,.7); }
.cam-links button { display: inline-flex; gap: 5px; align-items: center; color: rgba(255,255,255,.85); font-weight: 600; }
.cam-err { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center; background: var(--bg); }
.cam-err .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.cam-err p { margin: 0 0 8px; color: var(--dim); max-width: 34ch; }
.cam-err .btn { max-width: 320px; }

/* ---------- Login & account ---------- */
.splash { min-height: 70vh; display: grid; place-items: center; }
.auth { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; max-width: 420px; margin: 0 auto; }
.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 8px; }
.auth-brand .logo svg { display: block; filter: drop-shadow(0 8px 24px rgba(255,122,47,.25)); }
.auth-brand p { margin: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { height: 40px; border-radius: 10px; font-weight: 700; color: var(--dim); }
.seg button.on { background: var(--surface-2); color: var(--fg); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pw { position: relative; display: block; }
.pw .input { padding-right: 48px; }
.pw .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; color: var(--dim); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--dim); line-height: 1.4; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.inline-link, .link-btn { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.link-btn { align-self: center; font-size: 14px; padding: 6px; text-decoration: none; }
.form-err { background: rgba(255,84,112,.12); color: var(--danger); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; font-weight: 600; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.oauth { justify-content: center; gap: 10px; }
.legal-links { text-align: center; margin: 4px 0 0; }
.legal-links .inline-link { color: var(--dim); font-weight: 500; }
textarea.input.area { height: auto; min-height: 64px; padding: 12px 14px; resize: vertical; line-height: 1.4; }

.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 12px; background: var(--surface); color: var(--dim); }
.sync.ok { color: var(--teal); }
.sync.saving svg { animation: spin 1.2s linear infinite; }
.sync.off, .sync.err { color: var(--accent); background: var(--accent-soft); }
.sync.demo { color: var(--dim); }
.status { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 700; }
.status.s-done { background: var(--teal); color: var(--on-accent); }
.status.s-active { background: var(--accent-soft); color: var(--accent); }
.status.sm { height: 18px; padding: 0 7px; font-size: 10px; }
.desc { margin: 0; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }
.fav-on { color: #FFC83D; }
.fav-on svg { fill: #FFC83D; }
.avatar-btn { padding: 0; overflow: hidden; background: transparent; }
.avatar-img { border-radius: 50%; object-fit: cover; display: block; }
.profile-head { display: flex; align-items: center; gap: 16px; }
.avatar-big { position: relative; border-radius: 50%; }
.cam-badge { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--bg); display: grid; place-items: center; color: var(--fg); }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 40px; font-weight: 600; }
.toggle input { width: 46px; height: 26px; appearance: none; -webkit-appearance: none; background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; position: relative; cursor: pointer; transition: background .15s; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--dim); transition: transform .15s, background .15s; }
.toggle input:checked { background: var(--accent); border-color: var(--accent); }
.toggle input:checked::after { transform: translateX(20px); background: var(--white); }
.list-btn { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 44px; font-weight: 600; text-align: left; border-bottom: 1px solid var(--border); }
.list-btn:last-child { border-bottom: 0; }
.list-btn span { color: var(--faint); }
.legal h2 { font-family: var(--display); font-size: 17px; margin: 8px 0 0; }
.legal p { margin: 0; color: var(--dim); line-height: 1.55; max-width: 65ch; }
@media (prefers-reduced-motion: reduce) { .sync.saving svg { animation: none; } }
.bar.fade { pointer-events: none; }
.bar.fade .bar-inner { pointer-events: auto; }
.metas { flex-wrap: wrap; row-gap: 4px; }
.cam-dyn { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }

/* Home: list / tile switch and tile grid */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.seg button { width: 34px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--dim); }
.seg button.on { background: var(--surface-2); color: var(--fg); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ptile { display: flex; flex-direction: column; gap: 3px; padding: 6px 6px 10px; border-radius: var(--r-md); background: var(--surface); text-align: left; min-width: 0; }
.ptile:active { background: var(--surface-2); }
.ptile .img { position: relative; aspect-ratio: 4 / 3; border-radius: calc(var(--r-md) - 4px); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); margin-bottom: 5px; }
.ptile .img img { width: 100%; height: 100%; object-fit: cover; }
.ptile .img .status { position: absolute; left: 6px; bottom: 6px; }
.ptile .img .fav { position: absolute; right: 6px; top: 6px; color: #FFC83D; background: rgba(0,0,0,.45); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; }
.ptile .t { font-weight: 700; font-size: 14.5px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile .a { color: var(--dim); font-size: 12px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile .metas { display: flex; gap: 10px; color: var(--faint); font-size: 11.5px; padding: 2px 4px 0; }
.ptile .metas span { display: inline-flex; align-items: center; gap: 3px; }

/* Camera: thumbnail of the last photo */
.cam-last { width: 54px; height: 54px; display: grid; place-items: center; }
.cam-thumb { width: 50px; height: 50px; border-radius: 12px; overflow: hidden; border: 2px solid rgba(255,255,255,.85); background: rgba(255,255,255,.16); }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* New project: step indicator */
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.steps li { flex: 1; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--faint); padding-top: 8px; border-top: 3px solid var(--border); min-width: 0; white-space: nowrap; }
.steps li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--surface-2); color: var(--dim); flex: none; }
.steps li.cur { color: var(--fg); border-top-color: var(--accent); }
.steps li.cur span { background: var(--accent); color: var(--on-accent); }
.steps li.done { color: var(--dim); border-top-color: var(--teal); }
.steps li.done span { background: var(--teal); color: #08110F; }

/* Voice messages on pins */
.voice { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.voice audio { width: 100%; height: 40px; }
.btn.rec { background: var(--danger); color: var(--white); font-variant-numeric: tabular-nums; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--white); }
@media (prefers-reduced-motion: no-preference) { .rec-dot { animation: recPulse 1.2s ease-in-out infinite; } }
@keyframes recPulse { 50% { opacity: .25; } }
