/* SB, Unfiltered (/sb-unfiltered/; src/pages/honest-map.mjs) */
.hm-head { padding-bottom: var(--sp-16); }
.hm-head h1 em { color: var(--tile); }
.hm-stage { background: linear-gradient(var(--paper), var(--paper-2)); padding-bottom: var(--sp-24); }
.hm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-12); padding-bottom: var(--sp-12); }
.hm-bar .share-btn { min-height: 44px; }
.hm-bar .hm-add { font-size: .9rem; padding: .6em 1.1em; margin-left: auto; }
.hm-map .hm-tilt { font: 700 .75rem/1 var(--sans); color: var(--ink); }

.hm-mapwrap { position: relative; margin: 0 auto; max-width: 1600px; padding: 0 var(--sp-16); }
.hm-map { height: min(74vh, 760px); min-height: 460px; border-radius: var(--radius); overflow: hidden; background: #e9dcc2;
  box-shadow: 0 0 0 1px rgba(24, 34, 46, .14), 0 30px 70px -40px rgba(24, 34, 46, .55); }
.hm-map.is-picking { box-shadow: 0 0 0 3px var(--sun), 0 30px 70px -40px rgba(24, 34, 46, .55); }
.hm-loading { position: absolute; inset: 0 var(--sp-16); display: grid; place-items: center; font: italic 1.3rem var(--serif); color: var(--ink-3); pointer-events: none; }
.hm-loading:not([aria-hidden]) { pointer-events: auto; text-align: center; }
.hm-nojs { position: absolute; inset: 0; display: grid; place-items: center; }
.hm-hint { position: absolute; left: 50%; top: var(--sp-16); transform: translateX(-50%); z-index: 3; margin: 0; max-width: calc(100% - 64px);
  background: var(--ink); color: var(--paper); font: 600 .9rem/1.35 var(--sans); padding: .7em 1.1em; border-radius: 99px; text-align: center;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); }

.hm-under { padding-top: var(--sp-16); }
.hm-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.hm-area { display: inline-flex; align-items: center; gap: var(--sp-8); font: 600 .9rem/1 var(--sans); padding: .72em 1.1em; border-radius: var(--r-ctl);
  border: 1.5px solid var(--line); cursor: pointer; background: #fffaf2; color: var(--ink-2); transition: background .2s, border-color .2s, color .2s; }
.hm-area:has(i) { padding-left: .8em; }
.hm-area:hover { border-color: var(--ink-3); color: var(--ink); }
.hm-area i { width: 12px; height: 12px; border-radius: 50%; background: var(--fill); box-shadow: inset 0 0 0 1.5px var(--ink); flex: none; }
.hm-area[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hm-area[aria-pressed="true"] i { box-shadow: 0 0 0 1.5px var(--paper); }
.hm-area:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; }

/* map popups: one note, its votes, its chips */
.hm-popup .maplibregl-popup-content { padding: var(--sp-16) var(--sp-16) var(--sp-12); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-2); }
.hm-popup .maplibregl-popup-close-button { font-size: 1.3rem; padding: 0 var(--sp-8); color: var(--ink-3); }
.hm-pop p { margin: 0; }
.hm-pop-t { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8); font: 600 .68rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); padding-right: var(--sp-16); }
.hm-pop-t span { color: var(--ink); }
.hm-tag { font: 600 .68rem/1 var(--sans); letter-spacing: .04em; text-transform: none; background: var(--paper-3); color: var(--ink-2); padding: .3em .55em; border-radius: var(--r-tag); }
.hm-tag.is-big { background: var(--sun-2); color: var(--ink); }
.hm-pop-b { font: 1.3rem/1.2 var(--serif); margin-top: var(--sp-8) !important; }
.hm-pop-v { display: flex; align-items: center; gap: var(--sp-8); margin-top: var(--sp-12); }
.hm-pop-v [data-v] { display: inline-flex; align-items: center; gap: var(--sp-8); min-width: 2.75rem; height: 2.75rem; padding: 0 var(--sp-16); font: 1rem/1 var(--sans); border-radius: 999px; border: 0; cursor: pointer; background: var(--paper-2); color: var(--ink-3); }
.hm-pop-v [data-v] b { font: 600 1.12rem/1 var(--sans); color: var(--ink); }
.hm-pop-v [data-v="-1"][aria-pressed="true"] b { color: var(--paper); }
.hm-pop-v [data-v="1"][aria-pressed="true"] { background: var(--sun-2); color: var(--ink); }
.hm-pop-v [data-v="-1"][aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.hm-popup-here .maplibregl-popup-content { padding: var(--sp-8); }
.hm-here { white-space: nowrap; }
.hm-chips { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: var(--sp-12); }
.hm-chip { font: 600 .82rem/1.3 var(--sans); color: var(--sea-deep); text-decoration: none; background: #e3eff1; border-radius: var(--r-tag); padding: .45em .65em; }
.hm-chip.is-sun { color: var(--tile-deep); background: #fbe7cc; }
.hm-pop-v .hm-pop-f { margin-left: auto; font: .75rem var(--sans); color: var(--ink-3); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.hm-pop-msg { font-size: .82rem; color: var(--tile-deep); }
.hm-pop-msg:empty { display: none; }

/* fallback labels when the map's own text can't draw */
.hm-mk { font: .9rem/1.15 var(--serif); max-width: 11em; text-align: center; background: none; border: 0; padding: 0; cursor: pointer;
  text-shadow: 0 0 3px #fbf5ea, 0 0 3px #fbf5ea, 0 0 6px #fbf5ea; }
.hm-mk.is-big { font-size: 1.3rem; }
.hm-mk-v { display: block; margin-top: 2px; font: 600 .68rem/1 var(--sans); letter-spacing: .08em; color: #6f6455; }
.hm-pin { width: 22px; height: 30px; background: var(--tile); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 0 0 3px #fffaf2, 0 6px 14px rgba(0, 0, 0, .35); }

/* add a note: a side card on desktop, a sheet on phones */
.hm-sheet { position: fixed; z-index: 60; right: var(--sp-24); bottom: var(--sp-24); width: min(400px, calc(100vw - 48px)); max-height: calc(100vh - 120px); overflow: auto;
  background: #fffaf2; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line), 0 30px 80px -20px rgba(24, 34, 46, .55); padding: var(--sp-20); }
.hm-sheet[hidden] { display: none; }
.hm-sheet-top { display: flex; justify-content: space-between; align-items: center; }
.hm-sheet-h { font: 1.5rem/1.1 var(--serif); margin: 0; }
.hm-x { font-size: 1.75rem; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--ink-3); padding: 0 var(--sp-4); }
.hm-where { font-size: .82rem; color: var(--ink-3); margin: var(--sp-4) 0 var(--sp-12); }
.hm-form textarea { width: 100%; font: 1.3rem/1.25 var(--serif); padding: var(--sp-12); border-radius: var(--r-ctl); border: 1.5px solid var(--paper-3); background: #fff; color: var(--ink); resize: none; }
.hm-form textarea:focus { outline: 2px solid var(--sun); border-color: transparent; }
.hm-count { text-align: right; font-size: .75rem; color: var(--ink-3); margin: var(--sp-4) 0 var(--sp-8); }
.hm-form select { width: 100%; margin-bottom: var(--sp-12); }
.hm-nl { display: flex; gap: var(--sp-8); align-items: flex-start; line-height: 1.35; font-size: .9rem; margin-bottom: var(--sp-8); }
.hm-email { width: 100%; margin-bottom: var(--sp-8); }
.hm-form-acts { display: flex; flex-wrap: wrap; gap: var(--sp-8); margin-top: var(--sp-8); }

/* below the map */
.hm-cols > * { max-width: 46rem; } /* the column sits on the page's left edge, under the title (was centred at 46rem) */
.hm-h2 { font: var(--h2-sec)/1.15 var(--serif); margin: 0 0 var(--sp-12); }
.hm-rules summary { cursor: pointer; font: 600 1rem var(--sans); color: var(--ink-2); }
.hm-rules ul { padding-left: 1.1em; margin: var(--sp-12) 0; display: grid; gap: var(--sp-8); }
.hm-fine { font-size: .82rem; color: var(--ink-3); }


/* quiz */
.hq-form { display: grid; gap: var(--sp-24); max-width: 760px; }
.hq-q { border: 0; padding: 0; margin: 0; }
.hq-q legend { font: 1.5rem/1.2 var(--serif); padding: 0; margin-bottom: var(--sp-12); }
.hq-q legend span { display: block; font: 600 .68rem/1 var(--sans); letter-spacing: .1em; color: var(--ink-3); margin-bottom: var(--sp-4); }
.hq-as { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
.hq-a { position: relative; cursor: pointer; }
.hq-a input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hq-a span { display: block; height: 100%; padding: var(--sp-12) var(--sp-16); border-radius: var(--radius-sm); background: #fffaf2; box-shadow: inset 0 0 0 1px var(--line); font-size: 1rem; }
.hq-a input:checked + span { background: var(--ink); color: var(--paper); }
.hq-a input:focus-visible + span { outline: 2px solid var(--sun); outline-offset: 2px; }
.hq-result { max-width: 760px; padding: var(--sp-32); border-radius: var(--radius); background: radial-gradient(circle at 80% 30%, var(--fill), #fffaf2 70%); box-shadow: inset 0 0 0 1px var(--line); }
.hq-result:focus { outline: none; }
.hq-result, .hq-q, .hq-form { scroll-margin-top: 104px; } /* clear the sticky site header */
.hq-you { font: italic 1.3rem var(--serif); margin: 0; }
.hq-tribe { font: var(--h1-page)/1.05 var(--serif); color: var(--ink); margin: var(--sp-4) 0 var(--sp-12); }
.hq-blurb { font: 1.3rem/1.35 var(--serif); margin: 0 0 var(--sp-8); }
.hq-turf { color: var(--ink-2); margin: 0 0 var(--sp-16); }
.hq-img { display: block; width: min(100%, 360px); margin-top: var(--sp-16); border-radius: var(--radius-sm); box-shadow: var(--shadow-2); }

@media (max-width: 760px) {
  .hm-mapwrap { padding: 0; }
  .hm-map { height: 68vh; min-height: 420px; border-radius: 0; }
  .hm-loading { inset: 0; }
  .hm-sheet { left: 0; right: 0; bottom: 0; width: auto; max-height: 78vh; border-radius: var(--radius) var(--radius) 0 0; padding: var(--sp-16); }
  .hq-as { grid-template-columns: 1fr; }
  .hq-result { padding: var(--sp-20); }
}

/* Newest and most upvoted reader notes under the map: cards in each town's map colors (11-24) */
.hm-social { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--sp-16) var(--sp-24); margin-top: var(--sp-24); }
.hm-latest-h { font: 600 .68rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 var(--sp-12); }
.hm-latest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-8); }
.hm-latest-note { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--sp-4) var(--sp-12); font: inherit; text-align: left; cursor: pointer;
  padding: var(--sp-12) var(--sp-16); border: 0; border-radius: var(--radius); background: #fffaf2;
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(60, 40, 20, .05); transition: transform .15s ease, box-shadow .15s ease; }
.hm-latest-note:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--line), 0 6px 16px rgba(60, 40, 20, .09); }
.hm-latest-note:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hm-ln-t { grid-column: 1; font: 400 1.12rem/1.2 var(--serif); color: var(--ink); letter-spacing: -.005em; }
.hm-ln-where { grid-column: 1; display: inline-flex; align-items: center; gap: var(--sp-8); font: 600 .75rem/1 var(--sans); color: var(--ink-3); }
.hm-ln-where i { width: 9px; height: 9px; border-radius: 50%; background: var(--fill); box-shadow: inset 0 0 0 1.5px var(--ink); flex: none; }
.hm-ln-score { grid-column: 2; grid-row: 1 / span 2; font: 600 .82rem/1 var(--sans); color: var(--ink); background: var(--fill); padding: .45em .7em; border-radius: 999px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .hm-latest-note, .hm-latest-note:hover { transition: none; transform: none; } }
.hm-after { margin: var(--sp-16) 0 0; }
.hm-fun { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-8) var(--sp-16); margin: calc(-1 * var(--sp-16)) 0 var(--sp-32); font-size: 1rem; }
.hm-fun span { font-weight: 600; }
