/* HitList — D2 palette. ~15 custom properties, no CSS framework (D9 req 11). */

:root {
  --bg:        #0B0D12;
  --surface:   #171B26;
  --hair:      #1A1E2B;
  --border:    #2A3042;
  --t1:        #F2F3F7;
  --t1-dim:    #C9CDDD;
  --t2:        #9AA0B4;
  --t3:        #5C6275;
  --t-faint:   #3A4056;

  --cyan:      #00E5FF;
  --cyan-t:    #6EEFFF;
  --violet:    #B47CFF;
  --green:     #34FF9A;
  --red:       #FF4D6D;
  --amber:     #FFC24B;
  --orchid:    #E77FE0;   /* temporarily closed — a state, not an alert */
  --star:      #6B7280;

  --pad: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* The UA's [hidden] rule is display:none, which any author `display` beats.
 * .toast sets display:flex, so the toast was visible on every screen as a
 * stray rounded rectangle. This has to win over every component below. */
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--t1);
  font: 400 15px/1.35 -apple-system, "SF Pro Text", system-ui, sans-serif;
  overscroll-behavior-y: none;
}
body { padding-bottom: env(safe-area-inset-bottom); }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ic { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7;
      stroke-linecap: round; stroke-linejoin: round; display: block; }
/* Icons sitting inside a run of text must stay in the line box. `display:block`
 * was forcing the decor note onto its own line on the detail page. */
.ic-inline { display: inline-block; vertical-align: -2px; width: 12px; height: 12px; }

/* ---------------------------------------------------------------- header */

#hdr {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  padding-top: env(safe-area-inset-top);
  border-bottom: 0.5px solid var(--hair);
}
.hdr-top { display: flex; align-items: center; justify-content: space-between;
           padding: 14px var(--pad) 0; }
.wordmark { font-size: 19px; font-weight: 500; letter-spacing: .5px; }
.wordmark span { color: var(--cyan); }
.hdr-acts { display: flex; gap: 14px; color: var(--t2); }

.status {
  display: block; width: 100%; text-align: left;
  padding: 4px var(--pad) 0; font-size: 11.5px; color: var(--t3);
}
.status b { color: var(--t2); font-weight: 400; }

.chipbar {
  display: flex; gap: 8px; padding: 10px var(--pad) 11px;
  overflow-x: auto; scrollbar-width: none;
}
.chipbar::-webkit-scrollbar { display: none; }

.chip {
  flex: none; font-size: 12px; padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--border); color: var(--t2); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.chip .ic { width: 13px; height: 13px; }
.chip.on { background: rgba(0,229,255,.12); border-color: rgba(0,229,255,.45); color: var(--cyan-t); }
.chip.on.green { background: rgba(52,255,154,.10); border-color: rgba(52,255,154,.40); color: #63FFAD; }

/* Glyph chips: identical to the others, just narrower for a single mark. */
.glyph-chip { padding: 5px 12px; font-size: 13.5px; line-height: 1.15; }

/* ------------------------------------------------------------------ rows */

.list { padding-bottom: 92px; }

.row {
  display: flex; gap: 12px; padding: 12px var(--pad);
  border-top: 0.5px solid var(--hair); align-items: flex-start;
}
.row:first-child { border-top: 0; }
.row.been { opacity: .82; }

.thumb {
  width: 54px; height: 54px; border-radius: 12px; background: var(--surface);
  flex: none; object-fit: cover; display: block;
}
.thumb-ph { display: flex; align-items: center; justify-content: center; color: var(--t-faint); }
.thumb-ph .ic { width: 20px; height: 20px; }

.rbody { flex: 1; min-width: 0; }

.rtop { display: flex; align-items: baseline; gap: 6px; }
.glyph { font-size: 13px; flex: none; }
.g-flag  { color: var(--cyan); }
.g-radar { color: var(--violet); }
.g-star  { color: var(--star); }
.rname { font-size: 15px; font-weight: 500; flex: 1; min-width: 0;
         white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rdist { font-size: 13px; color: var(--t2); flex: none; }

.rident { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rident em { font-style: normal; font-size: 13.5px; color: var(--t1-dim); }
.rident i  { font-style: normal; font-size: 11.5px; color: var(--t3); }

.rmeta { font-size: 12px; color: var(--t2); margin-top: 4px;
         display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rmeta .dot { color: var(--t-faint); }
.rate { color: #D5D9E6; display: inline-flex; align-items: center; gap: 3px; }
.rate .ic { width: 10px; height: 10px; fill: var(--amber); stroke: var(--amber); stroke-width: 1; }
.open   { color: var(--green); }
.closed { color: var(--red); font-weight: 500; }

.tag {
  padding: 1px 8px; border-radius: 99px; font-size: 11px; border: 1px solid;
}
.tag.amber  { background: rgba(255,194,75,.12);  border-color: rgba(255,194,75,.35); color: var(--amber); }
.tag.red    { background: rgba(255,77,109,.12);  border-color: rgba(255,77,109,.40); color: var(--red); }
.tag.orchid { background: rgba(231,127,224,.12); border-color: rgba(231,127,224,.40); color: var(--orchid); }
.tag.cyan   { background: rgba(0,229,255,.10);   border-color: rgba(0,229,255,.35);  color: var(--cyan-t); }

.empty { padding: 48px var(--pad); text-align: center; color: var(--t3); font-size: 14px; }

/* pull-to-reshuffle affordance */
.pull {
  height: 0; overflow: hidden; display: flex; align-items: center;
  justify-content: center; transition: height .18s ease;
}
.pull span { font-size: 12px; color: var(--t3); letter-spacing: .2px; }
.pull.ready span { color: var(--cyan-t); }

/* ---------------------------------------------------------------- footer */

#foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; gap: 10px; padding: 12px var(--pad);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: #0D1017; border-top: 0.5px solid var(--hair);
}
#foot .primary {
  flex: 1; background: rgba(0,229,255,.14); border: 1px solid rgba(0,229,255,.5);
  color: var(--cyan-t); font-size: 14px; font-weight: 500; padding: 12px;
  border-radius: 14px; display: inline-flex; align-items: center;
  justify-content: center; gap: 7px;
}
#foot .sq {
  width: 52px; background: var(--surface); border: 1px solid var(--border);
  color: var(--t2); border-radius: 14px; display: flex;
  align-items: center; justify-content: center;
}

/* ---------------------------------------------------------------- detail */

.detail {
  position: fixed; inset: 0; z-index: 40; background: var(--bg);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: push .22s cubic-bezier(.2,.8,.3,1);
  will-change: transform;
}
@keyframes push { from { transform: translateX(100%); } to { transform: none; } }

/* Following the finger: no transition, no animation fighting the transform. */
.detail.dragging { animation: none; transition: none; }

/* Settling — either the rest of the way out, or snapping back. */
.detail.settling {
  animation: none;
  transition: transform .2s cubic-bezier(.25,.85,.35,1);
}

/* Slide-out for the button and the OS back gesture, which have no drag. */
.detail.closing {
  animation: none;
  transform: translateX(100%);
  transition: transform .2s cubic-bezier(.4,0,.7,.3);
}

/* A dragged page casts a soft edge so it reads as a sheet over the list. */
.detail.dragging, .detail.settling, .detail.closing {
  box-shadow: -14px 0 30px rgba(0,0,0,.5);
}

@media (prefers-reduced-motion: reduce) {
  .detail.settling, .detail.closing { transition: none; }
}

.d-hero { height: 190px; background: var(--surface); position: relative; }
.d-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-hero .ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color: var(--t-faint); }
.d-hero .ph .ic { width: 32px; height: 32px; }
/* Fixed, not absolute: reachable without scrolling back to the top. */
.d-back {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 14px;
  z-index: 5; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(11,13,18,.72); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); border: 0.5px solid rgba(255,255,255,.10);
  display: flex; align-items: center; justify-content: center; color: var(--t1);
}

/* Back bar at the true bottom of the content, NOT pinned. Swipe-right handles
 * "go back from anywhere", so a permanently floating bar would only cost
 * screen space (J, 2026-07-27). This one is there when you reach the end. */
.d-bottom-back {
  padding: 4px var(--pad) 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  display: flex; justify-content: center;
}
.d-bottom-back button {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--t1-dim); font-size: 14px; padding: 13px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.d-standing {
  position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 14px;
  font-size: 12px; padding: 4px 11px; border-radius: 99px;
}

.d-head { padding: 16px 18px 6px; }
.d-name { font-size: 21px; font-weight: 500; }
.d-ident { font-size: 13.5px; color: var(--t1-dim); margin-top: 2px; }
.d-ident .int { color: var(--violet); font-size: 12px; white-space: nowrap; }
.d-facts { font-size: 13px; color: var(--t2); margin-top: 6px; }
.d-unver { font-size: 11.5px; color: var(--t3); margin-top: 5px; }
.d-state { font-size: 13px; margin-top: 4px; }

.card {
  margin: 12px 18px; border-radius: 14px; padding: 12px 14px;
  background: rgba(255,194,75,.08); border: 1px solid rgba(255,194,75,.3);
}
.card h4 { margin: 0; font-size: 12px; font-weight: 500; color: var(--amber);
           letter-spacing: .4px; display: flex; align-items: center; gap: 6px; }
.card h4 .ic { width: 13px; height: 13px; }
.card p { margin: 5px 0 0; font-size: 13px; color: #E8DCC0; line-height: 1.5; }

.sec { padding: 12px 18px 6px; }
.sec h4 { margin: 0 0 8px; font-size: 12px; font-weight: 500; color: var(--t2); letter-spacing: .4px; }

.kf { display: flex; flex-direction: column; gap: 10px; }
.kf-item { font-size: 14.5px; }
.kf-item.c-confirmed, .kf-item.c-high { color: var(--t1); }
.kf-item.c-medium { color: var(--t1-dim); font-size: 14px; }
.kf-item.c-low    { color: var(--t2); font-size: 14px; }
.kf-note { font-size: 11.5px; color: var(--t3); margin-top: 1px; }
.pill { font-size: 11px; color: var(--cyan-t); border: 1px solid rgba(0,229,255,.4);
        border-radius: 99px; padding: 1px 7px; margin-left: 4px; }

.hours { font-size: 13px; line-height: 1.9; display: grid; grid-template-columns: 1fr auto; }
.hours .d { color: var(--t2); }
.hours .today { color: var(--t1); font-weight: 500; }
.hours .t-open { color: var(--green); font-weight: 500; }
.hours .t-closed { color: var(--red); font-weight: 500; }

.say { font-size: 13px; color: var(--t1-dim); line-height: 1.55;
       border-left: 2px solid var(--border); padding-left: 12px; white-space: pre-wrap; }

.acts { display: flex; gap: 10px; padding: 16px 18px 8px; }
.acts .primary { flex: 1; background: rgba(0,229,255,.14); border: 1px solid rgba(0,229,255,.5);
  color: var(--cyan-t); font-size: 13.5px; font-weight: 500; padding: 12px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.acts .sq { width: 50px; background: var(--surface); border: 1px solid var(--border);
  color: var(--t2); border-radius: 13px; display: flex; align-items: center; justify-content: center; }

.been-btn {
  width: calc(100% - 36px); margin: 6px 18px 28px; background: transparent;
  border: 1px dashed var(--t-faint); color: var(--t2); font-size: 13px;
  padding: 11px; border-radius: 13px; display: inline-flex;
  align-items: center; justify-content: center; gap: 7px;
}
.been-btn.done { border-style: solid; border-color: rgba(107,114,128,.5); color: var(--star); }

.attrib { font-size: 10.5px; color: var(--t-faint); padding: 0 18px 8px; }

/* Notable-decor marker on the row: violet ✦ far right on line 1, next to the
 * distance. An indicator, not a filter — you can spot the IG-worthy rooms by
 * scanning without the list growing a search UI for it. */
.decor { color: var(--violet); font-size: 11px; flex: none; opacity: .95; }

/* ----------------------------------------------------------- sheet/toast */

.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  background: #12151E; border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0; padding: 10px 16px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  animation: up .24s cubic-bezier(.2,.8,.3,1);
  /* 41 cuisines and 85 areas do not fit on a phone — the sheet scrolls. */
  max-height: 82vh; display: flex; flex-direction: column;
}

/*
 * Search sheets get a FIXED height. Bottom-anchored sheets grow and shrink
 * from the top, so as results narrowed while typing the field slid downwards
 * into the keyboard. Holding the height still keeps the field where the
 * thumb left it and lets the results trim underneath it instead.
 */
.sheet.search { height: min(58vh, 440px); max-height: none; }
.sheet.search .opts { flex: 1 1 auto; min-height: 0; }
/* JS sets an explicit height when the keyboard is up; that must win. */
.sheet.search[style*="height"] { max-height: none; }
.sheet .grab, .sheet h3, .sheet .sub, .sheet .find { flex: none; }
.sheet .opts { overflow-y: auto; -webkit-overflow-scrolling: touch;
               margin: 0 -16px; padding: 0 16px 4px; }

.find {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 13px; font-size: 15px; color: var(--t1);
  margin-bottom: 10px; -webkit-appearance: none;
}
.find::placeholder { color: var(--t3); }
.find:focus { outline: none; border-color: rgba(0,229,255,.45); }
.opt .n { float: right; color: var(--t3); font-size: 12px; font-weight: 400; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.grab { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.sheet .sub { font-size: 12.5px; color: var(--t3); margin: 0 0 14px; line-height: 1.45; }
.opt { display: block; width: 100%; text-align: left; padding: 13px 14px;
       border-radius: 12px; border: 1px solid var(--border); margin-bottom: 8px;
       font-size: 14px; color: var(--t1-dim); }
.opt.on { background: rgba(0,229,255,.12); border-color: rgba(0,229,255,.45); color: var(--cyan-t); }
.opt small { display: block; font-size: 11.5px; color: var(--t3); margin-top: 3px; }
.opt.on small { color: rgba(110,239,255,.7); }

/* -------------------------------------------------------------- the map */

.mapview { position: fixed; inset: 0; z-index: 45; background: var(--bg); }
.map-canvas { position: absolute; inset: 0; }

/* Chips ride ON TOP of the map and stay editable — shared state made
 * visible, "a view, not a mode" (D8). */
.map-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 500;
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(to bottom, rgba(11,13,18,.94) 55%, rgba(11,13,18,0));
  pointer-events: none;
}
.map-chips {
  display: flex; gap: 8px; padding: 12px var(--pad) 6px;
  overflow-x: auto; scrollbar-width: none; pointer-events: auto;
}
.map-chips::-webkit-scrollbar { display: none; }
.map-count {
  font-size: 11.5px; color: var(--t3); padding: 0 var(--pad) 14px;
}

.map-back {
  position: absolute; z-index: 500; left: var(--pad);
  bottom: calc(20px + env(safe-area-inset-bottom));
  background: var(--surface); border: 1px solid var(--border);
  color: var(--t1); font-size: 14px; font-weight: 500;
  padding: 11px 20px; border-radius: 99px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

.map-locate {
  position: absolute; z-index: 500; right: var(--pad);
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--t1); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.map-locate:active { background: #1E2331; }

/* pins: plain dots coloured by standing, dark outline for contrast */
.pin { position: relative; }
.pin i {
  display: block; width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid #0B0D12; box-sizing: content-box;
}
.pin-flag  i { background: var(--cyan); }
.pin-radar i { background: var(--violet); }
.pin-star  i { background: var(--star); }
.pin.dim { opacity: .4; }

.pin-label {
  position: absolute; left: 17px; top: -2px; white-space: nowrap;
  font-size: 9.5px; color: #E8EAF2; pointer-events: none;
  text-shadow: 0 0 3px #0B0D12, 0 0 3px #0B0D12, 0 0 5px #0B0D12;
}

.pin.sel { z-index: 600; }
.pin.sel i {
  width: 15px; height: 15px; margin: -2px 0 0 -2px;
  box-shadow: 0 0 0 5px rgba(255,255,255,.18);
}
.pin.sel .pin-label { font-size: 11px; font-weight: 500; left: 22px; }

/* "You are here" is WHITE — green already means open in this palette. */
.pin-me {
  width: 13px; height: 13px; border-radius: 50%; background: #fff;
  border: 2px solid rgba(11,13,18,.9);
  box-shadow: 0 0 0 6px rgba(255,255,255,.22);
}

.map-peek {
  position: absolute; z-index: 500; left: 0; right: 0;
  bottom: calc(76px + env(safe-area-inset-bottom));
  padding: 0 var(--pad);
}
.peek {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  text-align: left; background: #12151E; border: 1px solid var(--border);
  border-radius: 16px; padding: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.6);
}
.peek img, .peek-ph {
  width: 54px; height: 54px; border-radius: 12px; flex: none;
  object-fit: cover; background: var(--surface);
}
.peek-body { flex: 1; min-width: 0; }
.peek-top { display: flex; align-items: baseline; gap: 6px; }
.peek-top .glyph { font-size: 13px; }
.peek-name {
  font-size: 15px; font-weight: 500; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.peek-ident {
  font-size: 13.5px; color: var(--t1-dim); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.peek-ident i { font-style: normal; font-size: 11.5px; color: var(--t3); }
.peek-meta {
  font-size: 12px; color: var(--t2); margin-top: 4px;
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}

/* Leaflet's own chrome, restyled to the palette. */
.leaflet-container { background: #0B0D12; font: inherit; }
.leaflet-control-attribution {
  background: rgba(11,13,18,.8) !important; color: var(--t3) !important;
  font-size: 9.5px !important;
}
.leaflet-control-attribution a { color: var(--t2) !important; }

/* ----------------------------------------------------------- the wizard */

.wiz-seeds { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.wiz-seed {
  flex: 1 1 auto; min-width: 30%; text-align: left;
  background: rgba(0,229,255,.10); border: 1px solid rgba(0,229,255,.35);
  color: var(--cyan-t); border-radius: 12px; padding: 13px 14px; font-size: 15px;
}
.wiz-seed .n { float: right; font-size: 11.5px; color: rgba(110,239,255,.6); }

.wiz-escape {
  display: block; width: 100%; text-align: center; margin-top: 12px;
  color: var(--t3); font-size: 13px; padding: 8px;
}

.wiz-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px;
  background: rgba(0,229,255,.12); border: 1px solid rgba(0,229,255,.4);
  color: var(--cyan-t); border-radius: 99px; padding: 5px 13px; font-size: 13px;
}
.wiz-chip span { color: rgba(110,239,255,.6); font-size: 11.5px; }

.wiz-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.wiz-card {
  display: flex; gap: 11px; align-items: flex-start; text-align: left;
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 13px; padding: 10px 12px; width: 100%;
}
.wiz-card img, .wiz-ph {
  width: 46px; height: 46px; border-radius: 10px; flex: none;
  object-fit: cover; background: #10131c;
}
.wiz-card-body { flex: 1; min-width: 0; }
.wiz-card-top { display: flex; align-items: baseline; gap: 6px; }
.wiz-card-top .glyph { font-size: 12px; }
.g-flag { color: var(--cyan); } .g-radar { color: var(--violet); } .g-star { color: var(--star); }
.wiz-card-name {
  font-size: 14.5px; font-weight: 500; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wiz-card-ident {
  font-size: 12.5px; color: var(--t1-dim); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wiz-card-ident i { font-style: normal; font-size: 11px; color: var(--t3); }
.wiz-card-meta { font-size: 11.5px; color: var(--t2); margin-top: 3px; }

.wiz-where { display: flex; flex-direction: column; gap: 8px; }
.wiz-where .opt { margin-bottom: 0; }

.chip.holding { opacity: .55; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 60;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; padding: 9px 16px; font-size: 13px; color: var(--t1-dim);
  display: flex; align-items: center; gap: 12px;
}
.toast button { color: var(--cyan-t); font-size: 13px; font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .detail, .sheet { animation: none; }
}
