/* PayKR 2.0 additions. Page geometry, type and the existing theme live in the original stylesheets. */
.skip {
  position: fixed;
  top: -6rem;
  left: 1rem;
  z-index: 100;
  background: var(--surface, white);
  padding: 0.7rem;
}
.skip:focus {
  top: 1rem;
}
.extension-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-block: 0.9rem;
}
.extension-actions button,
.extension-actions a,
.secondary,
#area,
.detail-card button,
dialog button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  font:
    600 0.875rem/1.3 system-ui,
    sans-serif;
  border: 1px solid var(--line, #dbe2e8);
  border-radius: 12px;
  background: var(--surface, white);
  color: var(--accent, #164d89);
  text-decoration: none;
  cursor: pointer;
}
body[data-page-type='map'] [data-header],
footer[data-footer] {
  margin: 0;
  padding: 0;
  border: 0;
}
#area {
  position: fixed;
  z-index: 8;
  top: 88px;
  left: calc(50% + 130px);
  box-shadow: 0 3px 12px #17213c24;
  border-radius: 24px;
}
#apple-pay-notice {
  display: flex;
  align-items: center;
  font-size: 14px;
}
#apple-pay-notice img {
  margin-right: 10px;
}
.map-load-error {
  pointer-events: none;
}
.map-load-error p {
  margin: 0 0 0.35rem;
}
.map-load-error button {
  pointer-events: auto;
  border: 0;
  background: transparent;
  color: var(--accent, #164d89);
  font-size: 0.875rem;
  text-decoration: underline;
  min-height: 44px;
}
#sidebar-ad {
  margin-inline: 20px;
}
#results-host .search-result-item img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
#results-host .secondary {
  margin: 8px;
}
.detail-card {
  display: grid;
  gap: 0.65rem;
}
#detail .detail-card h2,
.detail-card .back-link {
  display: none;
}
.detail-card p,
.detail-card h3 {
  margin: 0;
}
.detail-card h3 {
  font-size: 1rem;
}
.detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.detail-actions a,
.detail-card > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent, #164d89);
}
.evidence {
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: var(--tint, #edf3fc);
  line-height: 1.55;
}
.badge {
  color: var(--subtext, #536879);
  font-size: 0.8rem;
  font-weight: 600;
}
.badge.brand_listed {
  color: #82550c;
}
:root[data-scheme='dark'] .badge.brand_listed {
  color: #efc878;
}
.map-label {
  background: var(--surface, white);
  border-radius: 12px;
  padding: 0.65rem;
  box-shadow: 0 3px 15px #17213c24;
}
.feedback-trigger {
  position: fixed;
  z-index: 24;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 26px;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  background: #535bd6;
  color: white;
  font: 650 0.85rem system-ui;
  box-shadow: 0 3px 12px #17213c24;
  cursor: pointer;
}
body[data-page-type='map'] .feedback-trigger {
  bottom: var(--sheet-clearance);
}
.filter-open .feedback-trigger {
  display: none;
}
.dialog-actions,
dialog form {
  margin-top: 0.75rem;
}
dialog {
  box-sizing: border-box;
  max-height: 84dvh;
  width: min(26rem, calc(100% - 2rem));
  padding: 1.25rem;
  color: var(--text, #17213c);
  border: 1px solid var(--line, #dbe2e8);
  background: var(--surface, white);
  border-radius: 18px;
  font-family: system-ui;
}
dialog::backdrop {
  background: #17213c66;
}
dialog h2 {
  margin: 0 0 0.7rem;
}
dialog > button,
dialog > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.35rem;
}
#feedback-dialog { width: min(26rem, calc(100% - 24px)); padding: 20px; border-radius: 22px; box-shadow: 0 14px 45px #17213c33; }
.feedback-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.feedback-heading h2, .feedback-heading form { margin: 0; }
.feedback-heading h2 { font-size: 1.25rem; }
.feedback-heading .feedback-close { width: 44px; padding: 0; border-radius: 50%; font-size: 1.5rem; color: var(--text, #17213c); }
#feedback-dialog h3 { margin: 0; font-size: 1rem; }
#feedback-dialog .feedback-note { margin: 4px 0 12px; color: var(--subtext, #536879); font-size: .875rem; line-height: 1.5; }
#issue-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#issue-links a, #feedback-dialog .chat-action {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 8px 12px; border-radius: 14px; text-align: center; text-decoration: none;
  font: 600 .91rem/1.4 system-ui, sans-serif;
}
#issue-links a { background: var(--tint, #f1f5fa); border: 1px solid var(--line, #dbe2e8); color: var(--text, #17213c); }
#issue-links a:hover { border-color: var(--accent, #164d89); }
#feedback-dialog .chat-action { width: 100%; color: white; background: #535bd6; border: none; margin-top: 16px; }
#feedback-dialog #chat-error { margin-top: 16px; }
[data-slot]:not([hidden]) {
  display: block !important;
  padding: 0.75rem;
  min-height: 90px;
}
[data-slot]:has(ins[data-ad-status='unfilled']) {
  visibility: hidden;
}
.directory > #first-cards,
.directory > #other-cards {
  display: contents;
}
.brand details {
  padding: 0 14px 0.4rem;
}
.brand summary {
  display: list-item;
  align-content: center;
  min-height: 32px;
  cursor: pointer;
}
.brand details p {
  padding: 0.4rem 0;
  font-size: 0.85rem;
}
.brand details button {
  margin: 0.5rem 0;
}
body[data-page-type='online'] > footer.wrap {
  padding-bottom: 5rem;
}
[data-scheme='dark'] #map {
  background: var(--canvas);
}
@media (min-width: 769px) {
  #place-ad:not([hidden]) {
    display: none !important;
  }
}
@media (max-width: 768px) {
  #area {
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
  }
  #sidebar-ad {
    display: none !important;
  }
}
.ad-preview
  body[data-page-type='online']:has(#directory:not([data-ready]))
  [data-slot='directory-top'][hidden] {
  display: block !important;
  visibility: hidden;
  min-height: 90px;
  margin: 20px 0;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Extend the original masthead, search pills, sidebar and draggable place card. */
.masthead .wrap, .top-nav, .header-actions, .bottom-nav {
  display: flex;
  align-items: center;
}
.masthead .wrap { justify-content: space-between; gap: 1rem; }
.top-nav, .header-actions { gap: clamp(.5rem, 1.6vw, 1.4rem); }
.wordmark { color: var(--text, #102f50); font-size: 1.45rem; font-weight: 800; letter-spacing: -.07em; text-decoration: none; }
.wordmark span { color: var(--accent, #1268ac); }
.top-nav a, .top-nav button, .bottom-nav a, .bottom-nav button {
  display: grid; align-content: center; min-height: 44px; padding: 0 .45rem;
  color: var(--subtext, #41546a); text-decoration: none; border: 0; background: transparent;
  font: 650 .9rem/1.15 system-ui, sans-serif; cursor: pointer;
}
.top-nav [aria-current], .bottom-nav [aria-current] { color: var(--accent, #14558a); text-decoration: underline; text-underline-offset: 5px; }
.header-install {
  border: 0; border-radius: 22px; padding: .55rem 1rem; min-height: 44px;
  background: var(--active, #123f63); color: white; font: 650 .88rem system-ui, sans-serif; cursor: pointer;
}
.header-actions select { min-height: 44px; }
.app-dock { position: fixed; z-index: 27; bottom: 16px; right: 120px; max-width: min(420px, 46vw); }
.app-dock .pwa-card { margin: 0; box-shadow: 0 4px 18px #17213c22; }
.bottom-nav { display: none; }
.explorer { --head-height: calc(60px + env(safe-area-inset-top)); }
.explorer .masthead {
  position: fixed; inset: 0 0 auto; z-index: 22; background: var(--surface, white);
  border-bottom: 1px solid var(--line, #dbe2e6); padding-top: env(safe-area-inset-top);
}
.explorer .masthead .wrap {
  width: auto; min-height: 0; height: 59px;
  margin-left: max(20px, env(safe-area-inset-left)); margin-right: max(20px, env(safe-area-inset-right));
}
@media (min-width: 769px) {
  .explorer .masthead .wrap { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(24rem, 1fr); }
  .explorer .wordmark { justify-self: start; }
  .explorer .header-actions { justify-self: end; }
}
@media (min-width: 769px) and (max-width: 1000px) {
  .explorer .masthead .wrap { grid-template-columns: minmax(max-content, 1fr) auto minmax(16rem, 1fr); }
  .explorer .header-theme { display: none; }
  .explorer .header-actions, .explorer .top-nav { gap: .5rem; }
}
#sidebar { top: calc(var(--head-height) + 16px); }
.desktop-category-wrapper { top: calc(var(--head-height) + 20px); }
#filter-panel { top: calc(var(--head-height) + 86px); max-height: calc(100dvh - var(--head-height) - 104px); }
#area { top: calc(var(--head-height) + 88px); }
#map-status { top: calc(var(--head-height) + 144px); pointer-events: none; }
#map { top: 0; }
#map-zoom { position: fixed; z-index: 9; right: 20px; top: calc(var(--head-height) + 90px); display: grid; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 12px #17213c24; }
#map-zoom button { width: 44px; height: 44px; border: 1px solid var(--line, #dbe2e6); background: var(--surface, white); font-size: 20px; }
.list-controls { display: flex; align-items: center; flex-wrap: wrap; padding: .35rem .75rem; gap: .2rem .6rem; }
#results-host #source-switch { margin: 0; }
.empty-filter { padding: 1rem; }
.fallback-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 12px; }
.fallback-links a { pointer-events: auto; display: inline-flex; align-items: center; min-height: 44px; color: var(--accent, #164d89); font-size: .875rem; }
#sheet-mode { font-size: .78rem; color: var(--accent, #14558a); }
@media (min-width: 769px) {
  #sidebar { --list-width: clamp(238px, 30vw, 350px); width: var(--list-width); }
  #sidebar-content { flex: 1 1 auto; }
  .desktop-category-wrapper { left: calc(32px + clamp(238px, 30vw, 350px)); }
  #sidebar #place-sheet { display: none; }
  #sidebar #place-sheet.has-selection {
    display: flex; flex-direction: column; position: fixed;
    top: var(--detail-top, calc(var(--head-height) + 132px)); bottom: 16px;
    left: calc(24px + var(--list-width)); right: auto;
    width: clamp(306px, 34vw, 420px); max-height: none;
    border: 1px solid var(--line, #dbe2e6); border-radius: 14px;
    box-shadow: 0 4px 22px #17213c20; padding-top: 0; pointer-events: auto;
  }
  #sidebar #sheet-toggle { display: none; }
  #sidebar .sheet-summary { flex: none; padding: 18px 20px 16px; border-bottom: 1px solid var(--line,#dbe2e6); }
  #sidebar #sheet-content { flex: 1; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px; }
  #sidebar #place-sheet #mobile-results { display: none; }
  #sidebar #results-host .search-result-item.active { box-shadow: inset 3px 0 var(--accent,#164d89); }
}
@media (max-width: 768px) {
  .top-nav { display: none; }
  .header-theme { display: none; }
  .masthead .wrap { gap: .4rem; }
  .header-actions { gap: .45rem; min-width: 0; }
  .explorer .masthead .wrap { margin-left: max(14px, env(safe-area-inset-left)); margin-right: max(14px, env(safe-area-inset-right)); height: 49px; }
  .explorer { --head-height: calc(50px + env(safe-area-inset-top)); }
  .header-install { padding: .4rem .65rem; }
  .app-dock { left: 0; right: 0; bottom: 0; max-width: none; background: var(--surface, white); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; text-align: center; border-top: 1px solid var(--line, #dbe2e6); }
  .bottom-nav a, .bottom-nav button { min-height: 48px; padding: .25rem; font-size: .82rem; }
  .bottom-nav [aria-current] { background: var(--tint, #edf3fc); }
  .app-dock [data-pwa-panel] { max-height: 22dvh; overflow: auto; }
  .app-dock .pwa-card { border-radius: 0; font-size: .88rem; }
  .feedback-trigger { bottom: calc(var(--dock-height, 49px) + 12px); }
  #search-box-mobile { top: calc(var(--head-height) + 10px); }
  #mobile-categories { top: calc(var(--head-height) + 76px); }
  #map { height: auto; bottom: var(--dock-height, 49px); }
  #place-sheet { bottom: calc(var(--dock-height, 49px) + 22px); }
  #sheet-toggle { height: 44px; flex-direction: column; gap: 4px; }
  .sheet-summary { padding-bottom: 10px; }
  #mobile-results { margin-top: 0; }
  #sheet-content { max-height: min(22dvh, 220px); }
  #place-sheet.has-selection #sheet-content { max-height: 33dvh; }
  #area { top: calc(var(--head-height) + 134px); white-space: nowrap; }
  #map-zoom { display: none; }
  #location-button { bottom: calc(var(--sheet-clearance) + 12px); left: 14px; right: auto; width: 44px; height: 44px; }
  body[data-page-type='map'] .feedback-trigger { bottom: calc(var(--sheet-clearance) + 12px); }
  #map-failure { top: calc(var(--head-height) + 142px); left: 12px; right: 12px; }
  #map-failure p { margin-bottom: 0; }
  #filter-panel { top: calc(var(--head-height) + 76px); max-height: calc(100dvh - var(--head-height) - var(--dock-height, 49px) - 86px); }
}
@media (max-height: 500px) and (max-width: 768px) and (orientation: landscape) {
  #place-sheet { left: 54%; right: 8px; bottom: auto; top: calc(var(--head-height) + 6px); max-height: calc(100dvh - var(--head-height) - var(--dock-height, 49px) - 60px); overflow-y: auto; }
  #sheet-content, #place-sheet.has-selection #sheet-content { max-height: none; }
  #map { inset-inline: 0; width: 100%; }
  #search-box-mobile { left: 8px; right: 47%; top: calc(var(--head-height) + 6px); min-height: 46px; padding-block: 0; }
  #mobile-categories { right: 47%; top: calc(var(--head-height) + 55px); padding-left: 8px; }
  #map-failure { top: calc(var(--head-height) + 120px); bottom: auto; left: 6px; right: 47%; }
  #area { top: calc(var(--head-height) + 118px); left: 26%; }
  #location-button, body[data-page-type='map'] .feedback-trigger { bottom: calc(var(--dock-height, 49px) + 4px); }
  #location-button { left: 54%; right: auto; }
}
#settings details > summary { display: list-item; align-content: center; min-height: 44px; cursor: pointer; }
/* Map tiles extend behind the floating search tools. Keep the provider attribution visible between the mobile sheet and navigation. */
[data-page-type="map"] .masthead {
  background: transparent; border-bottom-color: transparent; box-shadow: none; pointer-events: none;
}
[data-page-type="map"] .masthead :is(.wordmark, .top-nav, .header-actions > *) {
  pointer-events: auto; background-color: var(--surface, white);
  border-radius: 18px; box-shadow: 0 2px 10px #17213c24;
}
[data-page-type="map"] .masthead .header-install { background-color: var(--active, #123f63); }
[data-page-type="map"] .wordmark { padding: 6px 14px; }
[data-page-type="map"] .top-nav { padding-inline: 8px; }
#sidebar-content { min-height: 0; overscroll-behavior-y: contain; }
.map-notes-links, .mobile-notes-links { display: flex; gap: 6px; }
.map-notes-links { margin-top: 8px; pointer-events: none; }
.mobile-notes-links { display: none; }
:is(.map-notes-links,.mobile-notes-links) button {
  pointer-events: auto; min-height: 36px; padding-inline: 14px; border: 1px solid var(--line,#dbe2e6);
  border-radius: 18px; background: var(--surface,white); color: var(--text,#102f50); font: inherit; cursor: pointer;
}
@media (max-width: 768px) {
  .mobile-notes-links { display: flex; padding-inline: 16px; margin-bottom: 4px; }
  #place-sheet.has-selection .mobile-notes-links { display: none; }
}
:is(#settings,#notice-dialog,#releases-dialog) {
  box-sizing: border-box; width: min(28rem, calc(100% - 24px)); max-height: 82dvh; overflow: auto;
  padding: 20px; border-radius: 22px; box-shadow: 0 14px 45px #17213c33;
}
.settings-group { display: grid; padding-block: 6px; border-top: 1px solid var(--line,#dbe2e6); }
.settings-group :is(a, button, label) { display: flex; align-items: center; min-height: 46px; gap: 8px;
  padding-inline: 8px; border: none; background: transparent; text-decoration: none;
  text-align: start; color: inherit; font: inherit; }
.settings-group label { justify-content: space-between; }
.settings-group :is(a,button):hover, .archive-years summary:hover { background: var(--tint,#f2f6fa); }
.settings-group a::after, .settings-group [data-notes]::after { content: '›'; margin-inline-start: auto; }
#cache-status:empty { display: none; }
.archive-years details { border-block-start: 1px solid var(--line,#dbe2e6); }
.archive-years summary { cursor: pointer; padding: 12px 4px; font-weight: 700; }
.archive-years ol { list-style: none; margin: 0; padding: 0 12px; }
.archive-years li { padding-block: 8px; }
.archive-years time { font-weight: 650; color: var(--accent,#14558a); }
.archive-years p { margin: .3rem 0; line-height: 1.55; }
.notice-list { padding-inline-start: 1.4rem; line-height: 1.6; }
.notice-list li + li { margin-top: .65rem; }

/* Keep the original café artwork visible against dark road tiles. */
:root[data-scheme="dark"] #map img[src$="/cafe.png"] {
  filter: drop-shadow(0 0 1px white) drop-shadow(0 0 2px white);
}
#marker-dialog {
  width: min(32rem, 100%); max-width: 100%; max-height: 100dvh;
  padding: 0 20px max(20px, env(safe-area-inset-bottom)); overflow-y: auto;
}
#marker-dialog > form {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end;
  padding-block: max(8px, env(safe-area-inset-top)) 8px; margin: 0; background: var(--surface, white);
}
@media (max-width: 768px) {
  #marker-dialog { inset: 0; margin: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; }
}

/* Visible, accessible links to text-based resources; no hidden SEO content. */
.seo-resources { padding: .75rem 1rem; font-size: .85rem; line-height: 1.65; overflow-wrap: anywhere; }
.seo-resources a { color: var(--accent, #164d89); text-decoration: underline; text-underline-offset: .15em; }

/* Community: independent of the map layout, uses inherited light/dark colors. */
.paykr-community{margin-block:1rem;padding-block:1rem;border-top:1px solid currentColor;overflow-wrap:anywhere}
.paykr-community h3{margin:.75rem 0 .4rem;font-size:1rem}
.paykr-community p{margin:.45rem 0}
.paykr-community-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.paykr-community-actions button{flex:1;min-width:8rem}
.paykr-community form{display:grid;gap:.5rem;margin:.5rem 0}
.paykr-community input,.paykr-community textarea,.paykr-community select{font:inherit;color:inherit;background:transparent;border:1px solid currentColor;border-radius:.4rem;padding:.5rem;min-width:0;width:100%;box-sizing:border-box}
.paykr-community textarea{min-height:5rem;resize:vertical}
.paykr-community button{min-height:2.5rem;white-space:normal}
.paykr-community-list article{padding:.7rem 0;border-bottom:1px solid currentColor}
.paykr-community-list small{display:block;opacity:.8}
.paykr-community-list p{white-space:pre-wrap}

/* Independent merchant detail and clear section hierarchy. */
.detail-actions a { flex: 1 1 auto; justify-content: center; padding: 8px; border: 1px solid var(--line,#dbe2e6); border-radius: 8px; text-decoration: none; font-size: .85rem; }
.paykr-community { border-color: var(--line,#dbe2e6); }
.paykr-community input,.paykr-community textarea,.paykr-community select { border-color: var(--line,#dbe2e6); }
.paykr-community :disabled { opacity: .58; cursor: not-allowed; }
.paykr-community .community-notice { background: var(--tint,#edf3fc); border-radius: 8px; padding: 12px; font-size: .85rem; line-height: 1.55; }
.paykr-community .community-unavailable { display: grid; gap: .6rem; }
