[hidden] { display: none !important; }
:root {
  --ink: #1b2430; --muted: #687385; --bg: #f6f3ee; --card: #fff;
  --brand: #1f3a5f; --accent: #e8743b; --ok: #2e7d4f; --err: #b3261e;
  --line: #e4ded4; --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--brand); }
.top { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 1000; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.pin { width: 16px; height: 16px; background: var(--accent); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: inline-block; }
.badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
main { max-width: 560px; margin: 0 auto; padding: 16px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; }
h1 { font-size: 24px; margin: 8px 0 4px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 14px 0; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
label.inline { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.inline input { margin-top: 4px; width: auto; }
input, textarea, select { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
textarea { min-height: 70px; resize: vertical; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 13px 16px;
  background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; min-height: 48px;
}
button.full, .btn.full { width: 100%; }
button.ghost, .btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
button.accent { background: var(--accent); }
button.danger { background: transparent; color: var(--err); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1 1 0; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { flex: 1; border-radius: 0; background: #fff; color: var(--ink); font-weight: 600; min-height: 44px; }
.seg button.on { background: var(--brand); color: #fff; }
.map { height: 260px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-top: 10px; background: #e9e5dc; }
.map.tall { height: 320px; }
.map p { padding: 20px; }
.msg { padding: 10px 12px; border-radius: 10px; margin: 10px 0; font-size: 15px; }
.msg.err { background: #fdecea; color: var(--err); }
.msg.ok { background: #e8f5ec; color: var(--ok); }
.msg.info { background: #eef3f9; color: var(--brand); }
.preview img, .preview video, .media img, .media video { width: 100%; border-radius: 12px; display: block; background: #000; }
.preview audio, .media audio { width: 100%; }
.media iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; }
.item { display: flex; gap: 12px; align-items: center; }
.item .ico { font-size: 26px; width: 40px; text-align: center; }
.item .t { font-weight: 700; }
.item .meta { font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.actions > * { flex: 1 1 auto; min-height: 42px; padding: 9px 12px; font-size: 14px; }
.dist { font-size: 34px; font-weight: 800; text-align: center; margin: 6px 0 0; }
.dist.near { color: var(--ok); }
.linkbox { font-family: ui-monospace, monospace; font-size: 14px; word-break: break-all; background: #f3f0ea; padding: 10px; border-radius: 10px; }
.range-out { font-weight: 700; color: var(--brand); }
.hero { text-align: center; padding: 24px 8px 8px; }
.hero .pin { width: 44px; height: 44px; margin-bottom: 14px; }
form button[type=submit] { margin-top: 16px; }
.homebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.homebar button { flex: 0 0 auto; min-height: 44px; width: 48px; padding: 0; font-size: 20px; }
.map.home { height: 58vh; min-height: 320px; }
.tico { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-weight: 800; font-size: 15px; line-height: 1; vertical-align: middle; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.tico.sm { width: 20px; height: 20px; font-size: 11px; margin-right: 5px; box-shadow: none; }
.tico.pin { width: 34px; height: 34px; font-size: 16px; border: 2px solid #fff; cursor: pointer; }
.tico.mine { outline: 3px solid var(--ink); outline-offset: 0; }
.tico.locked { opacity: .9; }
h1 .tico { width: 34px; height: 34px; font-size: 17px; margin-right: 4px; position: relative; top: -2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin: 10px 2px; }
.legend > span { display: inline-flex; align-items: center; }
.textbody { font-size: 18px; line-height: 1.55; white-space: normal; padding: 6px 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips.cloud { margin: 4px 0 12px; }
button.chip, .chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
button.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip .n { margin-left: 6px; font-weight: 400; opacity: .65; font-size: 12px; }
.chip.static { min-height: 0; padding: 3px 10px; font-size: 13px; font-weight: 600; color: var(--brand); background: #eef3f9; border-color: transparent; cursor: default; }
.chips.types button.chip { padding-left: 6px; font-size: 13px; }
.chips.types button.chip.on { background: #1b2430; border-color: #1b2430; }
.faqbtn { margin-left: auto; color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; border: 1.5px solid rgba(255,255,255,.7);
  border-radius: 999px; padding: 6px 14px; }
details.faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin: 10px 0; }
details.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; position: relative; padding-right: 40px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; position: absolute; right: 16px; top: 10px; font-size: 22px; color: var(--muted); }
details.faq[open] summary::after { content: '–'; }
details.faq > div { padding: 0 16px 14px; }
details.faq ol, details.faq ul { padding-left: 20px; margin: 6px 0; }
details.faq li { margin: 6px 0; }
#faqtabs { margin: 12px 0; }
.textbody a, .hint a { word-break: break-all; color: var(--brand); font-weight: 600; }
.linkcard { display: block; text-decoration: none; color: var(--ink); background: #f3f0ea; border-radius: 12px; padding: 14px; margin-top: 10px; }
.linkcard .dom { display: block; font-weight: 800; font-size: 17px; }
.linkcard .u { display: block; font-size: 13px; color: var(--muted); word-break: break-all; margin-top: 4px; }
.inboxbtn { margin-left: auto; position: relative; font-size: 22px; text-decoration: none; padding: 4px 6px; }
.inboxbtn + .faqbtn { margin-left: 8px; }
.pill { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; text-align: center; }
.inboxbtn .pill { position: absolute; top: -4px; right: -8px; }
.avatar { border-radius: 50%; object-fit: cover; display: inline-block; vertical-align: middle; background: #ddd; flex: 0 0 auto; }
.avatar.ph { display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-weight: 800; }
.me .avatar { border: 2px solid var(--line); }
.authorline { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.authorline a { color: var(--brand); text-decoration: none; }
.authorline .small-btn { margin-left: auto; min-height: 38px; padding: 6px 12px; font-size: 14px; }
.profile h1 { margin-top: 12px; }
.profile .bio { font-size: 16px; color: var(--ink); }
.contacts { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.contacts .btn { justify-content: flex-start; word-break: break-all; }
a.card.item { text-decoration: none; color: var(--ink); }
.pinrow .chips { margin: 4px 0 0; }
.conv .meta { font-size: 14px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 6px 2px; }
.bubble { max-width: 82%; padding: 10px 12px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--line); align-self: flex-start; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: #dfe8f3; border-color: #dfe8f3; border-radius: 16px 16px 4px 16px; }
.bubble .when { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; text-align: right; }
.bubble a { word-break: break-all; }
.mybtn { margin-left: auto; color: #fff; text-decoration: none; font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px;
  border: 1.5px solid rgba(255,255,255,.7); border-radius: 999px; padding: 5px 12px; }
.mybtn + .inboxbtn { margin-left: 6px; }
@media (max-width: 370px) { .mybtn span { display: none; } }
details.quickadd { margin: 6px 0 4px; }
details.quickadd summary { cursor: pointer; color: var(--brand); font-weight: 700; font-size: 14px; padding: 6px 0; }
.ver { font-size: 12px; font-weight: 700; opacity: .75; margin-left: 6px; align-self: flex-end; margin-bottom: 4px; letter-spacing: 0; }
