/* CODEX RENDER CONTRACT: route styles for pages/howker_poi.html. */
:root {
  --poi-bg: #080b10;
  --poi-panel: #141922;
  --poi-panel-soft: #10151d;
  --poi-ink: #f7fafc;
  --poi-muted: #aeb9c8;
  --poi-stroke: #2c3748;
  --poi-accent: var(--nh48-accent, #36d87d);
  --poi-blue: #4fc3f7;
  --poi-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}
body.light {
  --poi-bg: #f4f7f9;
  --poi-panel: #ffffff;
  --poi-panel-soft: #f0f4f7;
  --poi-ink: #152033;
  --poi-muted: #526071;
  --poi-stroke: #d5dee7;
  --poi-accent: #0a7d42;
  --poi-blue: #087ca8;
  --poi-shadow: 0 18px 45px rgba(30, 50, 70, 0.1);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--poi-bg);
  color: var(--poi-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }

.poi-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 64px;
}

.poi-breadcrumbs { margin: 7px 0 15px; color: var(--poi-muted); font-size: 0.8rem; }
.poi-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.poi-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 7px; opacity: 0.55; }
.poi-breadcrumbs a { text-decoration: none; }
.poi-breadcrumbs a:hover { color: var(--poi-accent); }

.poi-hero {
  position: relative;
  display: flex;
  min-height: 330px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: clamp(25px, 5vw, 52px);
  border: 1px solid var(--poi-stroke);
  border-radius: 24px;
  background:
    linear-gradient(105deg, rgba(4, 10, 15, 0.95) 5%, rgba(4, 10, 15, 0.68) 58%, rgba(4, 10, 15, 0.3)),
    url("https://photos.nh48.info/cdn-cgi/image/format=jpg,quality=85,width=1600/mount-madison/mount-madison__003.jpg") center/cover;
  box-shadow: var(--poi-shadow);
}

.poi-hero-copy { position: relative; z-index: 1; max-width: 750px; }
.poi-eyebrow {
  margin: 0 0 7px;
  color: var(--poi-accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.poi-hero h1 { margin: 0; color: #fff; font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.04; letter-spacing: -0.035em; }
.poi-hero-copy > p:not(.poi-eyebrow) { max-width: 680px; margin: 14px 0 0; color: #dbe5ef; font-size: clamp(0.97rem, 2vw, 1.13rem); line-height: 1.62; }
.poi-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.poi-button, .poi-detail-nav a, .poi-map-fit {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--poi-stroke);
  border-radius: 999px;
  background: color-mix(in srgb, var(--poi-panel) 88%, transparent);
  color: var(--poi-ink);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}
.poi-hero .poi-button { border-color: rgba(255,255,255,0.34); background: rgba(9, 16, 24, 0.75); color: #fff; }
.poi-button-primary { border-color: transparent !important; background: var(--poi-accent) !important; color: #07140d !important; }
.poi-button:hover, .poi-button:focus-visible, .poi-detail-nav a:hover, .poi-map-fit:hover { border-color: var(--poi-accent); outline: none; }

.poi-hero-stat {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  min-width: 132px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 18px;
  background: rgba(5, 12, 18, 0.72);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(10px);
}
.poi-hero-stat strong { font-size: 2.15rem; line-height: 1; }
.poi-hero-stat span { margin-top: 6px; color: #d6e0e9; font-size: 0.7rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }

.poi-load-status { min-height: 24px; margin: 13px 3px 4px; color: var(--poi-muted); font-size: 0.82rem; }
.poi-load-status.is-error { color: #fb7185; }

.poi-section-heading, .poi-map-heading, .poi-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.poi-section-heading { margin: 38px 0 17px; }
.poi-section-heading h2, .poi-map-heading h2, .poi-panel h2, .poi-not-found h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.85rem); }
.poi-section-heading p:not(.poi-eyebrow), .poi-map-note { margin: 7px 0 0; color: var(--poi-muted); line-height: 1.55; }
.poi-result-count { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--poi-stroke); border-radius: 999px; background: var(--poi-panel); font-size: 0.78rem; font-weight: 800; }

.poi-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(155px, 0.34fr) minmax(170px, 0.42fr);
  gap: 11px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--poi-stroke);
  border-radius: 16px;
  background: var(--poi-panel);
}
.poi-controls label { display: grid; gap: 6px; color: var(--poi-muted); font-size: 0.72rem; font-weight: 750; }
.poi-controls input, .poi-controls select {
  width: 100%;
  min-height: 43px;
  padding: 9px 12px;
  border: 1px solid var(--poi-stroke);
  border-radius: 11px;
  background: var(--poi-panel-soft);
  color: var(--poi-ink);
}
.poi-controls input:focus, .poi-controls select:focus { border-color: var(--poi-accent); outline: 2px solid color-mix(in srgb, var(--poi-accent) 24%, transparent); }

.poi-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.poi-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--poi-stroke);
  border-radius: 16px;
  background: var(--poi-panel);
  box-shadow: 0 7px 22px rgba(0,0,0,0.1);
}
.poi-card:hover { border-color: color-mix(in srgb, var(--poi-accent) 60%, var(--poi-stroke)); transform: translateY(-1px); }
.poi-card-media { height: 135px; overflow: hidden; background: linear-gradient(135deg, rgba(54,216,125,0.17), rgba(79,195,247,0.12)); }
.poi-card-media img { width: 100%; height: 100%; object-fit: cover; }
.poi-card-placeholder, .poi-photo-placeholder { display: grid; height: 100%; place-items: center; padding: 18px; color: var(--poi-muted); text-align: center; }
.poi-card-placeholder span, .poi-photo-placeholder span { display: grid; gap: 5px; }
.poi-card-placeholder strong, .poi-photo-placeholder strong { color: var(--poi-ink); }
.poi-card-copy { display: grid; min-width: 0; padding: 15px; }
.poi-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.25; }
.poi-card h3 a { text-decoration: none; }
.poi-card h3 a::after { content: ""; position: absolute; inset: 0; }
.poi-card p { display: -webkit-box; margin: 8px 0 13px; overflow: hidden; color: var(--poi-muted); font-size: 0.84rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.poi-card-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; color: var(--poi-muted); font-size: 0.72rem; }
.poi-empty-results { grid-column: 1 / -1; padding: 35px 20px; border: 1px dashed var(--poi-stroke); border-radius: 16px; color: var(--poi-muted); text-align: center; }

.poi-overview-panel, .poi-panel, .poi-not-found {
  padding: 18px;
  border: 1px solid var(--poi-stroke);
  border-radius: 18px;
  background: var(--poi-panel);
  box-shadow: var(--poi-shadow);
}
.poi-overview-panel { margin-bottom: 18px; }
.poi-map-fit { min-height: 36px; padding: 7px 11px; color: var(--poi-ink); }
.poi-map-frame { position: relative; min-height: clamp(560px, 62vw, 700px); margin-top: 13px; overflow: hidden; border: 1px solid var(--poi-stroke); border-radius: 14px; background: #0c1420; }
.poi-map-frame-detail { min-height: 500px; }
.poi-map { position: absolute; inset: 0; min-height: inherit; }
.poi-map-poster { position: absolute; z-index: 2; inset: 0; display: grid; align-content: center; gap: 8px; padding: 24px; background: radial-gradient(circle at 80% 20%, rgba(79,195,247,.2), transparent 38%), linear-gradient(145deg, #10251c, #112230); color: #dce8ee; text-align: center; }
.poi-map-poster strong { color: #fff; font-size: 1.12rem; }
.poi-map-poster.is-ready { pointer-events: none; opacity: 0; transition: opacity 180ms ease; }
.poi-map-note { font-size: 0.76rem; }

.poi-detail-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr); gap: 18px; margin-top: 24px; }
.poi-panel { margin-top: 18px; }
.poi-detail-grid .poi-panel { margin-top: 0; }
.poi-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-height: 330px; margin-top: 13px; }
.poi-gallery figure { min-width: 0; margin: 0; overflow: hidden; border-radius: 12px; background: var(--poi-panel-soft); }
.poi-gallery figure:first-child:nth-last-child(n+3) { grid-row: span 2; }
.poi-gallery img { width: 100%; height: 100%; min-height: 160px; object-fit: cover; }
.poi-photo-placeholder { grid-column: 1 / -1; min-height: 310px; border: 1px dashed var(--poi-stroke); border-radius: 13px; background: linear-gradient(135deg, rgba(54,216,125,0.1), rgba(79,195,247,0.09)); }
.poi-facts { margin: 12px 0 0; }
.poi-facts > div { display: grid; grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr); gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--poi-stroke); }
.poi-facts dt { color: var(--poi-muted); font-size: 0.76rem; font-weight: 750; }
.poi-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 0.9rem; }
.poi-description-panel p:last-child { margin: 9px 0 0; color: var(--poi-muted); line-height: 1.72; }
.poi-detail-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.poi-detail-nav a:first-child { justify-content: flex-start; }
.poi-detail-nav a:last-child { justify-content: flex-end; }
.poi-not-found { margin-top: 24px; padding: clamp(25px, 5vw, 50px); text-align: center; }
.poi-not-found p:not(.poi-eyebrow) { color: var(--poi-muted); }

.poi-marker { overflow: visible; }
.poi-marker-pin { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50% 50% 50% 6px; background: var(--marker-color, #36d87d); box-shadow: 0 4px 12px rgba(0,0,0,.42); color: #07140d; font-size: 11px; font-weight: 900; transform: rotate(-45deg); }
.poi-marker-pin > span { transform: rotate(45deg); }
.poi-marker-label { position: absolute; top: calc(50% + var(--label-y, 0px)); z-index: 0; max-width: 210px; overflow: hidden; padding: 5px 8px; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; background: rgba(7, 14, 22, .9); box-shadow: 0 3px 10px rgba(0,0,0,.34); color: #fff; font-size: .69rem; font-weight: 800; line-height: 1.15; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; white-space: nowrap; transform: translateY(-50%); }
.poi-marker-label-right { left: 22px; padding-left: 12px; }
.poi-marker-label-left { right: 22px; padding-right: 12px; }
.poi-marker-selected .poi-marker-label { border-color: #ffcf5a; }
.leaflet-container { background: #0c1420; font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--poi-panel); color: var(--poi-ink); }
.leaflet-popup-content a { color: var(--poi-accent); font-weight: 750; }

@media (max-width: 930px) {
  .poi-detail-grid { grid-template-columns: 1fr; }
  .poi-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poi-map-frame { min-height: 560px; }
}

@media (max-width: 690px) {
  .poi-shell { width: min(100% - 20px, 1180px); }
  .poi-hero { min-height: 390px; align-items: flex-end; padding: 23px; }
  .poi-hero-stat { position: absolute; top: 18px; right: 18px; min-width: 102px; padding: 12px; }
  .poi-hero-stat strong { font-size: 1.55rem; }
  .poi-controls, .poi-card-grid { grid-template-columns: 1fr; }
  .poi-map-frame { min-height: 500px; }
  .poi-marker-label { max-width: 150px; font-size: .63rem; }
  .poi-marker:not(:hover):not(:focus):not(.poi-marker-selected) .poi-marker-label { display: none; }
  .poi-section-heading { display: block; }
  .poi-result-count { display: inline-block; margin-top: 12px !important; }
  .poi-gallery { grid-template-columns: 1fr; }
  .poi-gallery figure:first-child:nth-last-child(n+3) { grid-row: auto; }
  .poi-gallery img { height: auto; max-height: 480px; }
  .poi-facts > div { grid-template-columns: 1fr; gap: 5px; }
  .poi-detail-nav { grid-template-columns: 1fr; }
  .poi-detail-nav a { justify-content: center !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .poi-card:hover { transform: none; }
  .poi-map-poster.is-ready { transition: none; }
}
