/* ------------------------------------------------------------ 12. cities: the map, the panel beside it, the card
   Every colour is a token. The map is the shared module's (js/map.js, .rmap in system.css). */
.cty { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 21.5rem; gap: var(--s-4); }
.cty-map { min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--map-water); transition: opacity var(--fast) linear; }      /* the map's own rules: .rmap in system.css */
.cty-map[data-fade] { opacity: 0; }
.cty-zoom { position: absolute; right: var(--s-3); top: var(--s-3); z-index: 2; }

.cty-side { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: var(--s-2); align-content: start; }
.cty-dot { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--k, var(--ink-3)); }
.cty-dot.ring { background: none; box-shadow: inset 0 0 0 2.5px var(--k, var(--ink-3)); width: .68rem; height: .68rem; }
.cty-kinds { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 0; }
.cty-kind { display: inline-flex; align-items: center; gap: .45rem; padding: 0 .7rem; white-space: nowrap; }
.cty-find { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--s-2); }
.cty-search { display: flex; align-items: center; gap: .5rem; min-height: var(--tap); padding: 0 .9rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--glass); color: var(--ink-3); }
.cty-search:focus-within { border-color: var(--accent); color: var(--ink-2); }
.cty-q { flex: 1; min-width: 0; min-height: var(--tap); border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--t-body); outline: none; }
.cty-q::-webkit-search-cancel-button { -webkit-appearance: none; }
.cty-q::placeholder { color: var(--ink-3); }
.cty-hood-btn { min-width: 0; min-height: var(--tap); display: inline-flex; align-items: center; justify-content: space-between; gap: .4rem; padding: 0 .8rem 0 1rem; }
.cty-hood-word { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cty-hood-btn .ico { flex: none; color: var(--ink-3); }
/* the neighbourhood sheet: boroughs as groups, a chip per neighbourhood with what it holds (counts only here: what you would get) */
.cty-hood-sheet[open] { grid-template-rows: auto minmax(0, 1fr) auto; }
.cty-hood-body { max-height: min(26rem, 52vh); max-height: min(26rem, 52dvh); }
.cty-hood-body .chip-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.cty-hood-body .chip-btn { display: inline-flex; align-items: center; gap: .45rem; }
.cty-hood-n { font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cty-hood-body .chip-label { display: block; margin: .3rem 0 .25rem; font-size: var(--t-small); color: var(--ink-2); }
.cty-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: var(--tap); }
.cty-count { font-size: var(--t-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cty-count b { font-weight: 500; color: var(--ink); }
.cty-count[data-state="view"] b::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .4rem; border-radius: 50%; background: var(--accent); vertical-align: .08em; }
.cty-walk { min-height: var(--tap); padding: 0 1rem; }
.cty-walk[aria-pressed="true"] { border-color: var(--accent); }
.cty-list { min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; border-top: 1px solid var(--line); }
.cty-row { width: 100%; min-height: 3.25rem; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: .7rem; padding: .4rem .3rem; text-align: left; border-bottom: 1px solid var(--line); color: var(--ink); }
.cty-row:hover, .cty-row:focus-visible { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.cty-row .cty-dot, .cty-row .cty-sign { grid-row: 1 / span 2; }
.cty-sign { flex: none; width: 1.5rem; height: 1.5rem; display: block; user-select: none; }
.cty-row-n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cty-row-m { grid-column: 2; font-size: var(--t-small); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cty-none { padding: var(--s-3) .3rem; color: var(--ink-3); font-size: var(--t-small); }

/* the card: the place's own sign, what and where above its name, the two things to do, Rohin's note, the facts */
.cty-card { grid-row: 3 / -1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: var(--s-3); align-content: start; padding: var(--s-3) var(--s-4) var(--s-4);
  border: 1px solid var(--line); border-radius: var(--r-3); background: linear-gradient(180deg, color-mix(in srgb, var(--bg-raise) 96%, var(--accent)) 0%, var(--bg-raise) 5.5rem); box-shadow: var(--shadow);
  animation: cty-in var(--fast, .2s) ease-out both; }
@keyframes cty-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .cty-card { animation: none; } }
.cty-card[hidden] { display: none; }
.cty-side[data-open] .cty-head, .cty-side[data-open] .cty-list { display: none; }
.cty-card-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; }
.cty-card-top .cty-sign { width: 2.5rem; height: 2.5rem; }
.cty-card-t { min-width: 0; display: grid; gap: .1rem; }
.cty-eyebrow { margin: 0; font-size: var(--t-small); line-height: 1.3; color: var(--ink-3); overflow-wrap: anywhere; }      /* wraps rather than cuts (QA 15 Nov: "Murray Hill, Manhatt…") */
.cty-card-top h3 { margin: 0; font-family: var(--font-title); font-size: 1.3rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.cty-close { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.cty-close:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.cty-note { margin: 0; padding: .1rem 0 .1rem .8rem; border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.cty-facts { display: grid; margin: 0; border-top: 1px solid var(--line); }
.cty-fact { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: var(--s-3); align-items: baseline; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.cty-fact:last-child { border-bottom: 0; }
.cty-fact dt { font-size: var(--t-small); color: var(--ink-3); }
.cty-fact dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.cty-acts { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* the map: a soft haze where a tilted city meets the sky, and the corners a touch deeper (drawn over the map, under its controls) */
.cty-map::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 22%, transparent) 0%, transparent 16%), radial-gradient(130% 100% at 50% 45%, transparent 62%, color-mix(in srgb, var(--bg-sunk) 30%, transparent) 100%); }

.cty-layers-btn { min-height: var(--tap); padding: 0 1rem; }
.cty-sheet-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.cty-sheet-light { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-2) var(--s-3); }
.cty-hour-out { font-size: var(--t-small); color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.cty-hour { grid-column: 1 / -1; width: 100%; min-height: var(--tap); accent-color: var(--accent); }

/* an upright tablet and phones: the map over the panel */
@media (max-width: 1000px) {
  .cty { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: var(--s-2); }
  .cty-side { grid-template-rows: auto auto auto auto; }
  .cty-kinds { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .cty-kinds::-webkit-scrollbar { display: none; }
  .cty-list { height: 13rem; }
  .cty-card { grid-row: auto; max-height: 17rem; }
  .cty-side[data-open] .cty-kinds, .cty-side[data-open] .cty-find { display: none; }
  .cty-card-top { order: -2; } .cty-acts { order: -1; }      /* the buttons stay in reach; the facts scroll under them */
  .cty-card-top .cty-sign { width: 2.1rem; height: 2.1rem; }
  .cty-head { min-height: 0; }
  .cty-head .cty-walk { margin: -.1rem 0; }
}
@media (max-width: 720px) {
  .cty-list { height: 6.5rem; }
  .cty-card { max-height: 14.5rem; padding: var(--s-2) var(--s-3) var(--s-3); gap: var(--s-2); }
  .cty-switch button { padding: 0 .7rem; }
  .cty-fact { grid-template-columns: 6.4rem minmax(0, 1fr); }
  .cty-head:has(.cty-walk[hidden]) { min-height: 0; }
}
@media (max-height: 700px) and (max-width: 1000px) { .cty-list { height: 3.25rem; } }
.cty-hood-body .chip-group { grid-template-columns: minmax(0, 1fr); gap: 0; }
