/* ============================================================
   Deuces — restrooms, rated
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --paper: #f3f7fb;
  --paper-2: #e9f0f8;
  --surface: #ffffff;
  --surface-2: #eef3f9;
  --ink: #0b1a33;
  --ink-2: #33415c;
  --muted: #5d6b82;
  --line: #dbe4ee;
  --line-strong: #c3cfdd;

  /* Logo palette: sky blue, pin red, sunny yellow, grass green, navy outline */
  --brand: #0a6fd1;
  --brand-deep: #0656a8;
  --brand-soft: #e1effd;
  --brand-tint: #f1f8ff;
  --sky: #24baf5;
  --navy: #07132b;
  --urgent: #d9201b;
  --urgent-soft: #fde8e6;
  --sun: #fbdb3d;
  --sun-deep: #f2c200;
  --amber: #b07d00;

  --good: #2b8a3e;
  --good-soft: #e5f4e3;
  --mid: #9a6400;
  --mid-soft: #fff3cc;
  --bad: #c8231d;
  --bad-soft: #fde7e5;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;

  --shadow-sm: 0 1px 2px rgba(7, 19, 43, .05), 0 1px 1px rgba(7, 19, 43, .03);
  --shadow: 0 8px 24px -12px rgba(7, 19, 43, .22), 0 2px 6px rgba(7, 19, 43, .04);
  --shadow-lg: 0 30px 60px -30px rgba(7, 19, 43, .45), 0 6px 18px rgba(7, 19, 43, .08);

  --font: "Nunito", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Pacifico", "Brush Script MT", cursive;

  --topbar-h: 70px;
  --tabbar-h: 66px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.18;
  letter-spacing: -.021em;
  font-weight: 700;
}

p { margin: 0; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--fill { fill: currentColor; }
.icon--sm { width: 15px; height: 15px; }
.icon--lg { width: 22px; height: 22px; }

/* ---------- 3. Buttons, chips, pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(6, 86, 168, .25); }
.btn--primary:hover { background: var(--brand-deep); }
.btn--urgent { background: var(--urgent); color: #fff; }
.btn--urgent:hover { background: #b8170f; }
.btn--soft { background: var(--brand-soft); color: var(--brand-deep); }
.btn--soft:hover { background: #cfe5fb; }
.btn--outline { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn--outline:hover { background: var(--surface); border-color: var(--muted); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { padding: 8px 12px; font-size: 13.5px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn--icon { padding: 9px; border-radius: 10px; }

.count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(10, 111, 209, .12);
  color: var(--brand-deep);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0;
}

.link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand);
  font-weight: 650;
  font-size: inherit;
  text-decoration: none;
  border-radius: 3px;
}
.link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 4. Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(243, 247, 251, .88);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1220px;
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 auto;
}
.brand__mark { width: auto; height: 44px; }
.brand__word { width: auto; height: 38px; margin-left: -4px; }

.topnav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.topnav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14.5px;
}
.topnav__link:hover { background: var(--surface-2); }
.topnav__link.is-active { background: var(--surface); color: var(--brand-deep); box-shadow: var(--shadow-sm); }
.topnav__link .count { margin-left: 1px; }

.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- 5. Page layout ---------- */
.view { animation: fade .22s ease; }
@keyframes fade { from { opacity: .6; } to { opacity: 1; } }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 22px 90px;
  display: grid;
  grid-template-columns: minmax(0, 660px) 320px;
  gap: 30px;
  align-items: start;
  justify-content: center;
}
.page--narrow { grid-template-columns: minmax(0, 880px); }

.feed-col { min-width: 0; }

/* ---------- 6. Composer ---------- */
.composer {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.composer__avatar { flex: 0 0 auto; }
.composer__prompt {
  flex: 1;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 14.5px;
  transition: background .15s ease, border-color .15s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer__prompt:hover { background: var(--surface-2); border-color: var(--line-strong); }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  color: #fff;
  background: var(--av, #5d6b82);
  flex: 0 0 auto;
  user-select: none;
}
.avatar--sm { width: 32px; height: 32px; font-size: 11.5px; }
.avatar--lg { width: 48px; height: 48px; font-size: 16px; }

/* ---------- 7. Feed header & filters ---------- */
.feed-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 16px;
}
.feed-head h1 { font-size: clamp(24px, 3vw, 30px); }
.feed-head p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

.feed-tools { display: flex; align-items: center; gap: 8px; width: 100%; }
.feed-tools .search { flex: 1; }

.search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.search .icon {
  position: absolute;
  left: 11px;
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  min-width: 0;
  padding: 9px 13px 9px 35px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10, 111, 209, .12); }

.select {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2379857f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  padding: 9px 30px 9px 12px;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
}

.chiprow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 4px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.chip:hover { border-color: var(--line-strong); background: var(--surface); }
.chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .count { background: rgba(255, 255, 255, .22); color: inherit; }
.chip.is-on .count { background: rgba(0, 0, 0, .26); color: #fff; }

.filterpanel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 12px 0 18px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
  animation: dropdown .16s ease;
}
@keyframes dropdown { from { opacity: 0; transform: translateY(-4px); } }
.filterpanel__head { display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; }
.filterpanel__foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 14px; }

.tagpick { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.tag:hover { border-color: var(--line-strong); }
.tag.is-on { background: var(--brand-soft); border-color: #b5d6f6; color: var(--brand-deep); }
.tag__check { width: 13px; height: 13px; opacity: 0; transition: opacity .12s; }
.tag.is-on .tag__check { opacity: 1; }

.switchrow { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.switchrow input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.switchrow--slim { font-size: 13px; }

.rangerow { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.rangerow input[type="range"] { width: 110px; }
.rangerow output { font-weight: 700; font-size: 13px; color: var(--brand-deep); min-width: 32px; }

/* ---------- 8. Post cards ---------- */
.feed { display: flex; flex-direction: column; gap: 18px; }

.post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.post:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.post__head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 16px 12px;
}
.post__who { flex: 1; min-width: 0; }
.post__name {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}
.post__place { color: var(--muted); font-weight: 500; }
.post__place .link { font-size: 14.5px; font-weight: 650; }
.post__meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.post__meta .sep { opacity: .5; }
.visited {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--brand);
  font-weight: 600;
}

.score {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  padding: 5px 9px;
  border-radius: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--good-soft);
  color: var(--good);
  border: 1px solid transparent;
  flex: 0 0 auto;
  line-height: 1;
}
.score strong { font-size: 16px; letter-spacing: -.03em; }
.score span { font-size: 10.5px; font-weight: 600; color: inherit; }
.score--mid { background: var(--mid-soft); color: var(--mid); }
.score--bad { background: var(--bad-soft); color: var(--bad); }
.score--sm { padding: 4px 7px; border-radius: 8px; }
.score--sm strong { font-size: 13.5px; }
.score--lg { padding: 8px 12px; border-radius: 12px; }
.score--lg strong { font-size: 21px; }

.post__photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
}
.post__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.post__photo:hover img { transform: scale(1.03); }
.post__photo-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(7, 19, 43, .68);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
}
.post__photo:hover .post__photo-tag,
.post__photo:focus-visible .post__photo-tag { opacity: 1; transform: none; }
.post__photo-score { position: absolute; top: 12px; right: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }

.post__body { padding: 14px 16px 12px; }
.post__text { font-size: 15px; line-height: 1.55; color: var(--ink-2); white-space: pre-line; }
.post__text strong { color: var(--ink); }

.scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.scorechip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.2;
}
.scorechip .icon { width: 13px; height: 13px; color: var(--brand); }
.scorechip b { font-weight: 700; color: var(--ink); font-size: 12.5px; }
.scorechip.is-low { background: var(--bad-soft); border-color: #f6d3d0; }
.scorechip.is-low .icon, .scorechip.is-low b { color: var(--bad); }

.post__foot {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-top: 1px solid var(--line);
}
.react {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}
.react:hover { background: var(--surface-2); }
.react.is-on { color: var(--urgent); }
.react.is-on .icon { fill: var(--urgent); stroke: var(--urgent); }
.react--end { margin-left: auto; }

.comments { border-top: 1px solid var(--line); background: var(--brand-tint); padding: 12px 16px 14px; }
.comment { display: flex; gap: 9px; margin-bottom: 10px; }
.comment:last-of-type { margin-bottom: 12px; }
.comment__bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 8px 11px; }
.comment__name { font-size: 12.5px; font-weight: 700; }
.comment__text { font-size: 13.5px; color: var(--ink-2); margin-top: 1px; }
.comment__time { font-size: 11px; color: var(--muted); margin-top: 2px; }

.commentform { display: flex; gap: 8px; align-items: center; }
.commentform input {
  flex: 1;
  min-width: 0;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
}
.commentform input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10, 111, 209, .12); }
.commentform button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.commentform button:hover { background: var(--brand-deep); }

.demo-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 18px 4px 0;
}
.demo-note .icon { margin-top: 1px; }

/* ---------- 9. Right rail ---------- */
.rail { position: sticky; top: calc(var(--topbar-h) + 22px); display: flex; flex-direction: column; gap: 16px; }

.rail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.rail-card h2 { font-size: 15.5px; }
.rail-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rail-card__lede { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 6px 0 12px; }
.rail-card--warm { background: var(--surface); }
.rail-card--quiet {
  background: linear-gradient(160deg, #0a6fd1 0%, #0b3f86 55%, #07132b 100%);
  border-color: transparent;
  color: #e8f2fd;
}
.rail-card--quiet h2 { color: #fff; }
.rail-card--quiet .rail-card__lede { color: rgba(232, 242, 253, .78); }
.rail-card--quiet .btn--soft { background: rgba(255, 255, 255, .14); color: #fff; }
.rail-card--quiet .btn--soft:hover { background: rgba(255, 255, 255, .22); }

.rail-list { display: flex; flex-direction: column; gap: 2px; }
.rail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 6px;
  border-radius: 9px;
  text-align: left;
}
.rail-row:hover { background: var(--paper); }
.rail-row__main { flex: 1; min-width: 0; }
.rail-row__name { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-row__meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dimgrid { display: flex; flex-direction: column; gap: 11px; }
.dimrow { display: flex; gap: 10px; align-items: flex-start; }
.dimrow__ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.dimrow strong { display: block; font-size: 13.5px; font-weight: 650; }
.dimrow small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ---------- 10. Map ---------- */
.view--map { position: relative; }
.mapwrap { position: relative; height: calc(100dvh - var(--topbar-h)); min-height: 480px; }
.map { position: absolute; inset: 0; background: var(--paper-2); }
.leaflet-container { font-family: var(--font); background: #e6edf4; }
.leaflet-control-attribution { font-size: 10px !important; background: rgba(255, 255, 255, .8) !important; }

.map-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 500;
  width: 348px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 96px);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 12px;
  overflow: hidden;
}
.map-panel__head { display: flex; gap: 8px; align-items: center; }
.map-panel__sub { font-size: 12px; color: var(--muted); padding: 8px 4px 2px; font-weight: 550; }
.map-list { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; margin: 0 -4px; }

.mapitem {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 10px;
  display: block;
}
.mapitem:hover { background: var(--paper); }
.mapitem.is-active { background: var(--brand-tint); border-color: #c9e1f8; }
.mapitem__top { display: flex; align-items: center; gap: 8px; }
.mapitem__name { font-size: 14px; font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mapitem__meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.mapitem__meta .ok { color: var(--good); font-weight: 650; }
.mapitem__meta .closed { color: var(--bad); font-weight: 650; }
.mapitem__tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.mapitem__tag { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-weight: 600; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex: 0 0 auto; }
.dot--good { background: var(--good); }
.dot--mid { background: var(--mid); }
.dot--bad { background: var(--bad); }

.map-legend {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 500;
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }

.map-zoomhint {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 500;
  background: rgba(7, 19, 43, .72);
  color: #fff;
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  transition: opacity .3s ease;
}

/* Leaflet zoom — restyled to match the app */
.leaflet-control-zoom {
  margin: 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm) !important;
}
.leaflet-control-zoom a {
  width: 34px !important;
  height: 34px !important;
  line-height: 32px !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--brand-deep) !important;
  font-size: 18px !important;
  font-weight: 600;
  border-bottom-color: var(--line) !important;
}
.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:focus-visible { background: var(--brand-soft) !important; }
.leaflet-control-zoom a:last-child { border-bottom: 0 !important; }
.leaflet-touch .leaflet-control-zoom a { width: 34px !important; height: 34px !important; line-height: 32px !important; }

/* map pins */
.deuces-pin { background: none !important; border: 0 !important; }
.pin {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 5px 9px 6px;
  border-radius: 999px;
  background: var(--good);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: -.02em;
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(7, 19, 43, .35);
  transition: transform .16s ease, box-shadow .16s ease;
  font-variant-numeric: tabular-nums;
}
.pin::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  background: inherit;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0 0 2px 0;
}
.pin--mid { background: var(--mid); }
.pin--bad { background: var(--bad); }
.pin--none { background: var(--muted); font-size: 10px; min-width: 34px; }
.pin.is-selected { transform: scale(1.16) translateY(-2px); box-shadow: 0 8px 18px rgba(7, 19, 43, .4); z-index: 900; }
.pin__tail { display: none; }

/* ---------- 11. Detail sheet ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 1001;
  pointer-events: none;
}
.sheet__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100%);
  background: var(--surface);
  box-shadow: -20px 0 60px -30px rgba(7, 19, 43, .5);
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.22, .8, .3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet.is-open { pointer-events: auto; }
.sheet.is-open .sheet__panel { transform: none; }

.sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.sheet__close:hover { background: #fff; }

.detail__photo { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.detail__photo img { width: 100%; height: 100%; object-fit: cover; }
.detail__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 19, 43, .32), transparent 45%);
  pointer-events: none;
}
.detail__photo .score { position: absolute; left: 16px; bottom: 14px; z-index: 2; box-shadow: 0 2px 12px rgba(0, 0, 0, .22); }

.detail__pad { padding: 18px 20px 40px; }
.detail__eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail h2 { font-size: 23px; margin-bottom: 5px; }
.detail__addr { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.detail__addr .ok { color: var(--good); font-weight: 650; }
.detail__addr .closed { color: var(--bad); font-weight: 650; }

.detail__actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }

.detail__scores { display: grid; gap: 10px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.detail__scores-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.detail__scores-head strong { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.detail__scores-head span { font-size: 12px; color: var(--muted); }

.bar { display: grid; grid-template-columns: 92px 1fr 26px; align-items: center; gap: 9px; }
.bar__label { font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; font-weight: 550; }
.bar__label .icon { width: 14px; height: 14px; color: var(--brand); }
.bar__track { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar__fill { display: block; height: 100%; border-radius: 99px; background: var(--brand); width: var(--v, 0%); transition: width .5s cubic-bezier(.2, .8, .3, 1); }
.bar__fill.is-good { background: var(--good); }
.bar__fill.is-mid { background: var(--mid); }
.bar__fill.is-bad { background: var(--bad); }
.bar__val { font-size: 12px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.detail__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pilltag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 650;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-tint);
  border: 1px solid #cfe3f7;
  color: var(--brand-deep);
}
.pilltag .icon { width: 12px; height: 12px; }
.pilltag--warn { background: var(--mid-soft); border-color: #f3e2a6; color: #7a5300; }

.detail__note {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--brand-tint);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.45;
}
.detail__note .icon { color: var(--brand); margin-top: 2px; }

.detail__section { margin-top: 22px; }
.detail__section > h3 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.detail__section > h3 .count { background: var(--surface-2); color: var(--ink-2); }

.review { padding: 14px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; padding-top: 0; }
.review__head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.review__who { flex: 1; min-width: 0; }
.review__name { font-size: 13.5px; font-weight: 650; }
.review__meta { font-size: 11.5px; color: var(--muted); }
.review__text { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.review__photo { margin-top: 9px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); max-height: 220px; }
.review__photo img { width: 100%; height: 100%; object-fit: cover; }
.review__foot { display: flex; gap: 12px; margin-top: 8px; }
.review__action { border: 0; background: none; padding: 0; font-size: 12px; font-weight: 650; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.review__action:hover { color: var(--brand); }
.review__action.is-on { color: var(--urgent); }
.review__action.is-on .icon { fill: currentColor; }

/* ---------- 12. Dialogs ---------- */
.dlg {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 40px);
  overflow: visible;
  color: var(--ink);
}
.dlg--wide { width: min(880px, calc(100vw - 24px)); }
.dlg--urgent { width: min(520px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(7, 19, 43, .55); backdrop-filter: blur(5px); }
.dlg[open] .dlg__form { animation: pop .2s cubic-bezier(.2, .8, .3, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.985); } }

.dlg__form {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .6);
}
.dlg__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.dlg__head h2 { font-size: 20px; }
.dlg__sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.dlg__body { padding: 18px 20px; overflow-y: auto; display: grid; gap: 16px; }
.dlg__body--split { grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.dlg__col { display: grid; gap: 14px; align-content: start; }
.dlg__foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field__label { font-size: 12.5px; font-weight: 650; color: var(--ink-2); letter-spacing: .01em; }
.field__hint { font-size: 11.5px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.field input[type="text"],
.field input[type="search"],
.field input[type="email"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14.5px;
  resize: vertical;
  min-width: 0;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 111, 209, .13);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2379857f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
  cursor: pointer;
}
.field textarea { line-height: 1.5; }

/* sliders */
.sliders { display: grid; gap: 15px; }
.slider { display: grid; gap: 7px; }
.slider__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.slider__name { font-size: 13.5px; font-weight: 650; display: inline-flex; align-items: center; gap: 7px; }
.slider__name .icon { width: 16px; height: 16px; color: var(--brand); }
.slider__val { font-size: 12px; font-weight: 650; color: var(--brand-deep); background: var(--brand-tint); padding: 2px 8px; border-radius: 999px; }
.slider__val.is-low { background: var(--bad-soft); color: var(--bad); }
.slider__mid { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) calc(var(--p, 50) * 1%), var(--line) 0);
  outline-offset: 6px;
  cursor: pointer;
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--brand);
  box-shadow: 0 1px 5px rgba(7, 19, 43, .22);
  cursor: grab;
}
.slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--brand);
  box-shadow: 0 1px 5px rgba(7, 19, 43, .22);
  cursor: grab;
}
.slider input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }
.slider__scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }

.upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  background: var(--paper);
}
.upload__btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.upload__preview { position: relative; }
.upload__preview img { max-height: 130px; border-radius: 10px; border: 1px solid var(--line); }
.upload__remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
}
.upload__remove .icon { width: 13px; height: 13px; }

.pickmap-wrap { display: grid; gap: 7px; }
.pickmap {
  height: 300px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: var(--paper-2);
  position: relative;
}
.pickmap__hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12.5px; text-align: center; padding: 20px; pointer-events: none; }

/* ---------- 13. Urgent ---------- */
.urgent-list { display: flex; flex-direction: column; gap: 8px; }
.urgentrow {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.urgentrow:hover { border-color: var(--brand); background: var(--brand-tint); }
.urgentrow__main { flex: 1; min-width: 0; }
.urgentrow__name { font-size: 14.5px; font-weight: 650; }
.urgentrow__meta { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.urgentrow__meta .ok { color: var(--good); font-weight: 650; }
.urgentrow__meta .closed { color: var(--bad); font-weight: 650; }
.urgentrow__dist { font-size: 12.5px; font-weight: 700; color: var(--brand-deep); white-space: nowrap; }
.urgentrow .icon--chev { color: var(--muted); }

/* ---------- 14. Saved ---------- */
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.saved-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.saved-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); transform: translateY(-2px); }
.saved-card__photo { aspect-ratio: 16 / 9; background: var(--surface-2); position: relative; }
.saved-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.saved-card__photo .score { position: absolute; top: 10px; right: 10px; }
.saved-card__body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.saved-card__body h3 { font-size: 16px; }
.saved-card__meta { font-size: 12.5px; color: var(--muted); }
.saved-card__tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.saved-card__foot { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; }

/* ---------- 15. Empty state ---------- */
.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 44px 26px;
  text-align: center;
  background: var(--surface);
  display: grid;
  justify-items: center;
  gap: 8px;
}
.empty__ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--brand-tint);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.empty__ico .icon { width: 26px; height: 26px; }
.empty h3 { font-size: 17px; }
.empty p { color: var(--muted); font-size: 13.5px; max-width: 34ch; }
.empty .btn { margin-top: 8px; }

/* ---------- 16. Tab bar (mobile) ---------- */
.tabbar { display: none; }

/* ---------- 17. Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1100;
  transform: translate(-50%, 160%);
  background: #07132b;
  color: #f3f7fb;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: 0 14px 32px -12px rgba(0, 0, 0, .5);
  transition: transform .28s cubic-bezier(.2, .9, .3, 1), opacity .2s;
  opacity: 0;
  pointer-events: none;
  max-width: min(90vw, 440px);
  text-align: center;
}
.toast.is-open { transform: translate(-50%, 0); opacity: 1; }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1080px) {
  .page { grid-template-columns: minmax(0, 660px); }
  .rail { display: none; }
}

@media (max-width: 900px) {
  .topnav { display: none; }
  .dlg__body--split { grid-template-columns: 1fr; }
  .pickmap { height: 240px; }
}

@media (min-width: 1081px) {
  .chiprow { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
}

@media (max-width: 860px) {
  :root { --topbar-h: 60px; }
  .topbar__inner { height: var(--topbar-h); padding: 0 14px; gap: 10px; }
  .brand__mark { height: 38px; }
  .brand__word { height: 32px; }
  .btn__label { display: none; }
  .btn--urgent, .btn--primary { padding: 9px; }
  #addPlaceBtn { display: none; }

  .page { padding: 16px 14px calc(var(--tabbar-h) + 28px); gap: 20px; }
  .feed-head { margin-bottom: 12px; }
  .feed-tools { width: 100%; }
  .composer { padding: 10px; gap: 9px; }

  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 650;
    height: 100%;
  }
  .tabbar__link .icon { width: 21px; height: 21px; }
  .tabbar__link.is-active { color: var(--brand-deep); }
  .tabbar__link.is-active .icon { stroke-width: 2.1; }
  .tabbar__add {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    border: 0;
    background: var(--sun);
    color: var(--navy);
    display: grid;
    place-items: center;
    justify-self: center;
    box-shadow: 0 0 0 2px var(--navy), 0 6px 16px -4px rgba(7, 19, 43, .45);
    transform: translateY(-10px);
  }
  .tabbar__add .icon { width: 23px; height: 23px; stroke-width: 2.4; }

  .mapwrap { height: calc(100dvh - var(--topbar-h) - var(--tabbar-h)); }
  .map-panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    max-height: 46%;
    border-radius: 16px;
  }
  .map-legend { top: 12px; left: 12px; bottom: auto; }
  .map-zoomhint { display: none; }
  .map-list { max-height: none; }

  .sheet__panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 90dvh;
    border-radius: 20px 20px 0 0;
    transform: translateY(102%);
    box-shadow: 0 -20px 60px -30px rgba(7, 19, 43, .5);
  }
  .sheet__panel::before {
    content: "";
    position: sticky;
    top: 8px;
    z-index: 6;
    display: block;
    width: 40px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, .7);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
  }

  .toast { bottom: calc(var(--tabbar-h) + 18px); }

  .saved-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .post { border-radius: 14px; }
  .post__head { padding: 12px 13px 10px; }
  .post__body { padding: 12px 13px 10px; }
  .post__text { font-size: 14.5px; }
  .post__foot { padding: 4px 6px; }
  .react { padding: 8px; font-size: 12px; }
  .react--end { display: none; }
  .comments { padding: 10px 13px 12px; }
  .composer__prompt { font-size: 13.5px; padding: 9px 13px; }
  .feed-head h1 { font-size: 22px; }
  .scorechip span { display: none; }
  .scorechip { padding: 4px 7px; }
  .saved-grid { grid-template-columns: 1fr; }
  .dlg { width: 100vw; max-width: none; max-height: 100dvh; margin: 0; height: 100dvh; }
  .dlg__form { max-height: 100dvh; height: 100%; border-radius: 0; }
  .dlg__head { padding: 16px 16px 12px; }
  .dlg__body { padding: 16px; }
  .dlg__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .dlg--urgent .dlg__form { height: auto; border-radius: 20px; margin: auto; max-height: calc(100dvh - 24px); }
  .dlg--urgent { height: auto; margin: auto; padding: 12px; }
  .bar { grid-template-columns: 84px 1fr 24px; gap: 7px; }
  .detail__pad { padding: 16px 16px 34px; }
  .map-panel { max-height: 52%; }
}

@media (max-width: 420px) {
  .page { padding-left: 10px; padding-right: 10px; }
  .post__photo { aspect-ratio: 4 / 3; }
  .urgentrow { padding: 10px; gap: 9px; }
}

/* ---------- 19. Detail bits & leftovers ---------- */
.btn.is-saved { background: var(--brand-soft); border-color: #b5d6f6; color: var(--brand-deep); }
.react.is-saved { color: var(--brand-deep); }
.react.is-saved .icon { fill: currentColor; }

.comments__more { display: inline-block; margin: 0 0 10px 41px; font-size: 12.5px; }
.commentform + .comments__more { margin-bottom: 0; }

.detail__empty { color: var(--muted); font-size: 13.5px; line-height: 1.55; padding: 4px 0 6px; }
.review__comments { margin-top: 10px; padding: 2px 0 2px 9px; border-left: 2px solid var(--line); }
.review__comments .comment { margin-bottom: 8px; }
.review__comments .comment:last-child { margin-bottom: 0; }
.review__comments + .commentform { margin-top: 10px; }

.detail__photo--empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  background: linear-gradient(145deg, #e3f1fd, #fff8dc);
}
.saved-card__empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  background: linear-gradient(145deg, #e3f1fd, #fff8dc);
}
.saved-card__empty .icon { width: 24px; height: 24px; }

.map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 30px;
  text-align: center;
  color: var(--ink-2);
  background: var(--paper);
}
.map-fallback strong { font-size: 15px; }
.map-fallback p { color: var(--muted); font-size: 13px; max-width: 34ch; margin-top: 2px; }
.map-empty { padding: 14px 8px; display: grid; gap: 6px; justify-items: start; font-size: 13px; color: var(--muted); }
.map-empty .link { font-size: 13px; }

.urgentrow__main { display: flex; flex-direction: column; gap: 1px; }
.urgentrow__name { display: block; }

@media (hover: none) {
  .post__photo-tag { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  .comments__more { margin-left: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ============================================================
   Login gate, loading screen, account menu
   ============================================================ */
body[data-phase="booting"] > :not(#bootScreen):not(.sprite),
body[data-phase="auth"] > :not(#authScreen):not(.sprite):not(.toast) { display: none !important; }


/* loading */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--sky) 70%, #9be3fb 100%);
  color: #fff;
  z-index: 400;
}
.boot__logo { width: 180px; height: auto; animation: bob 1.1s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(7, 19, 43, .3)); }
.boot__msg { font-weight: 700; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 0 24px; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* auth layout */
.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--paper);
}
.auth__hero {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 48px 40px;
  color: #fff;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 64'%3E%3Cpath fill='%23fff' d='M24 62h112a22 22 0 0 0 0-44 26 26 0 0 0-14 4A34 34 0 0 0 58 16a22 22 0 0 0-34 14A16 16 0 0 0 24 62z'/%3E%3C/svg%3E") 8% 9% / 150px auto no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 64'%3E%3Cpath fill='%23fff' d='M24 62h112a22 22 0 0 0 0-44 26 26 0 0 0-14 4A34 34 0 0 0 58 16a22 22 0 0 0-34 14A16 16 0 0 0 24 62z'/%3E%3C/svg%3E") 88% 20% / 110px auto no-repeat,
    linear-gradient(180deg, var(--brand) 0%, var(--sky) 62%, #9be3fb 100%);
}
.auth__hero::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -60px;
  height: 160px;
  border-radius: 50% 50% 0 0;
  background: #71bb26;
  box-shadow: inset 0 14px 0 #8fd14a;
}
.auth__hero-inner { position: relative; z-index: 1; max-width: 460px; display: grid; gap: 18px; padding-bottom: 60px; }
.auth__logo { margin: 0; line-height: 0; }
.auth__logo img { width: 300px; max-width: 100%; height: auto; filter: drop-shadow(0 10px 16px rgba(7, 19, 43, .3)); }
.auth__tagline { font-size: 22px; font-weight: 800; line-height: 1.25; text-shadow: 0 1px 2px rgba(7, 19, 43, .35); }
.auth__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.auth__points li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 2px 0 var(--navy);
  border: 2px solid var(--navy);
}
.auth__points span { font-size: 18px; }
.auth__for { font-size: 14px; font-weight: 600; opacity: .95; text-shadow: 0 1px 2px rgba(7, 19, 43, .35); }

.auth__panel { display: grid; place-items: center; padding: 40px 24px; }
.auth__card {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.auth__card.is-busy { opacity: .7; pointer-events: none; }
.auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
}
.auth__tab {
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted);
}
.auth__tab.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth__title { font-size: 26px; font-weight: 900; }
.auth__lede { color: var(--muted); margin-top: -10px; }
.auth__lede:empty { display: none; }
.auth__oauth { display: grid; gap: 10px; }
.oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.oauth svg { width: 19px; height: 19px; }
.oauth:hover { background: var(--surface-2); }
.oauth--apple { background: #000; border-color: #000; color: #fff; }
.oauth--apple:hover { background: #222; }
.auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 4px;
}
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__form { display: grid; gap: 14px; }
.field__label--row { display: flex; justify-content: space-between; align-items: center; }
.link--sm { font-size: 12.5px; }
.pwfield { position: relative; display: block; }
.pwfield input { padding-right: 64px !important; }
.pwfield__toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 8px;
}
.auth__agree { align-items: flex-start; line-height: 1.4; }
.auth__agree input { margin-top: 1px; flex: 0 0 auto; }
.auth__msg { font-size: 13.5px; font-weight: 600; padding: 10px 12px; border-radius: 10px; }
.auth__msg--error { background: var(--bad-soft); color: var(--bad); }
.auth__msg--ok { background: var(--good-soft); color: var(--good); }
.btn--lg { padding: 13px 18px; font-size: 16px; border-radius: 12px; }
.auth__switch { text-align: center; }
.auth__demo {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--mid-soft);
  border: 1px solid #f3e2a6;
  border-radius: 12px;
  padding: 10px 12px;
}

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth__hero { padding: 28px 20px 8px; place-items: start center; }
  .auth__hero::after { height: 70px; bottom: -40px; }
  .auth__hero-inner { gap: 10px; padding-bottom: 26px; justify-items: center; text-align: center; }
  .auth__logo img { width: 190px; }
  .auth__tagline { font-size: 17px; }
  .auth__points, .auth__for { display: none; }
  .auth__panel { padding: 0 16px 32px; place-items: start center; }
  .auth__card { margin-top: -6px; padding: 22px 18px; position: relative; z-index: 2; }
}

/* account menu */
.account { position: relative; }
.account__btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--line-strong);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
}
.account__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 250px;
  padding: 8px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: grid;
  gap: 2px;
}
.account__who { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.account__who span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.account__mode { color: var(--mid) !important; font-weight: 700; }
.account__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-weight: 650;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
}
.account__item:hover { background: var(--surface-2); }
.account__item--danger { color: var(--bad); }

.empty__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.empty--hero { border-style: solid; background: linear-gradient(180deg, var(--brand-tint), var(--surface)); }
.empty--slim { padding: 22px 16px; }

/* signed-out "I need one now" */
.auth__panel { align-content: center; gap: 16px; }
.guestcta {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--navy);
  border-radius: 18px;
  background: var(--urgent);
  color: #fff;
  text-align: left;
  box-shadow: 0 3px 0 var(--navy);
  transition: transform .1s ease, box-shadow .1s ease, background .15s ease;
}
.guestcta:hover { background: #c41a15; }
.guestcta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--navy); }
.guestcta__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.guestcta__icon .icon { width: 21px; height: 21px; stroke-width: 2.2; }
.guestcta__text { flex: 1; display: grid; gap: 1px; }
.guestcta__text strong { font-size: 17px; font-weight: 900; }
.guestcta__text small { font-size: 13px; opacity: .92; font-weight: 600; }
.guestcta__arrow { width: 20px; height: 20px; stroke-width: 2.2; }

a.urgentrow { color: inherit; text-decoration: none; }
.urgentrow__tags { font-size: 11.5px; color: var(--ink-2); font-weight: 600; margin-top: 3px; }
.urgentrow__go { color: var(--brand); display: grid; justify-items: center; gap: 1px; font-size: 10.5px; font-weight: 700; }
.urgentrow__go .icon { width: 18px; height: 18px; }
.guest__join {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--brand-tint);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-2);
}
.guest__loading { padding: 26px 8px; text-align: center; color: var(--muted); font-weight: 600; }

@media (max-width: 860px) {
  .auth__panel { align-content: start; gap: 12px; }
  .guestcta { margin-top: -6px; position: relative; z-index: 3; }
  .auth__card { margin-top: 0; }
  .guest__join { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ============================================================
   Moderation: ⋯ menus, report + confirm dialogs, blocked list
   ============================================================ */
.more {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: -2px -6px 0 -2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.more:hover { background: var(--surface-2); color: var(--ink); }
.more .icon { width: 20px; height: 20px; }
.comment__name { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.comment__name .more { width: 24px; height: 24px; margin: -4px -6px -4px 0; }
.comment__name .more .icon { width: 16px; height: 16px; }
.review__head .more { margin: 0 -6px 0 0; }

.moremenu {
  position: fixed;
  z-index: 1200;
  min-width: 200px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 2px;
}
.moremenu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
  font-weight: 650;
  font-size: 14px;
  color: var(--ink-2);
}
.moremenu__item:hover, .moremenu__item:focus-visible { background: var(--surface-2); }
.moremenu__item.is-danger { color: var(--bad); }

.btn--danger { background: var(--bad); color: #fff; }
.btn--danger:hover { background: #a91d18; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.radiolist { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.radiorow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.radiorow:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); color: var(--ink); }
.radiorow input { accent-color: var(--bad); width: 17px; height: 17px; flex: 0 0 auto; }

.dlg--confirm { width: min(440px, calc(100vw - 24px)); }
.dlg--confirm h2 { font-size: 20px; }
.dlg--confirm .dlg__sub { line-height: 1.5; }
#confirmInput { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

.detail__report { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.detail__report:hover { color: var(--bad); }

.blockedrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 650;
}
.account__links { display: flex; gap: 6px; padding: 6px 10px; font-size: 13px; color: var(--muted); }
.account__links a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.account__links a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .dlg--confirm { height: auto; margin: auto; padding: 12px; }
  .dlg--confirm .dlg__form { height: auto; border-radius: 20px; margin: auto; }
}
