.oxai-page [hidden] { display: none !important; }

.oxai-custom-head { display: grid; gap: var(--oxai-space-4); padding-bottom: var(--oxai-space-6); }
.oxai-custom-head .oxai-meta-row { padding-top: var(--oxai-space-8); }
.oxai-custom-head .oxai-title { font-size: clamp(28px, 3vw, 36px); text-align: left; }
.oxai-custom-head .oxai-dek { max-width: none; font-size: 16px; color: var(--oxai-fg-soft); text-wrap: pretty; }

.oxai-custom-home { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--oxai-space-3); }
.oxai-custom-region {
  display: grid; gap: var(--oxai-space-1); color: inherit; text-decoration: none; transition: background-color 150ms;
}
.oxai-custom-region:hover { background: var(--oxai-surface-hover); }
.oxai-custom-region b { font-size: 20px; font-weight: 500; }
.oxai-custom-region span { font-size: 14px; color: var(--oxai-secondary); }
.oxai-custom-region em { font-style: normal; font-size: 13px; color: var(--oxai-secondary); margin-top: var(--oxai-space-3); }

.oxai-custom-bar {
  position: sticky; top: 0; z-index: 1100;
  background: color-mix(in srgb, var(--oxai-bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--oxai-border);
  padding: var(--oxai-space-1) 0;
  margin-bottom: var(--oxai-space-6);
}
.oxai-custom-bar .oxai-toolbar { gap: var(--oxai-space-2); padding: var(--oxai-space-2) 0; }

.oxai-custom-mapcard { margin-bottom: var(--oxai-space-4); }
#map { position: relative; z-index: 0; height: 520px; border-radius: var(--oxai-radius-md, 12px); }

.oxai-custom-zone { padding-top: var(--oxai-space-12); display: grid; gap: var(--oxai-space-4); }
.oxai-custom-zone-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--oxai-space-2) var(--oxai-space-3); }
.oxai-custom-zone-count { font-size: 14px; color: var(--oxai-secondary); }
.oxai-custom-zone-head .oxai-btn { margin-left: auto; }
.oxai-custom-zone-meta { font-size: 14px; color: var(--oxai-secondary); }
.oxai-custom-zone-plan { font-size: 15px; line-height: 1.6; color: var(--oxai-fg-soft); max-width: 820px; }
.oxai-custom-zone-plan strong { color: var(--oxai-fg); font-weight: 500; }

.oxai-custom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--oxai-space-3); }
.oxai-custom-place {
  display: flex; flex-direction: column; gap: var(--oxai-space-2); scroll-margin-top: 140px;
  padding: var(--oxai-space-5); outline: 1px solid transparent; outline-offset: -1px; transition: outline-color 200ms;
}
.oxai-custom-place[data-picked] { outline-color: var(--oxai-fg); }
.oxai-custom-place[data-flash] { outline: 2px solid var(--oxai-fg); }
.oxai-custom-place-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--oxai-space-2); }
.oxai-custom-place h3 { font-size: 17px; font-weight: 500; line-height: 1.4; }
.oxai-custom-en { font-size: 13px; color: var(--oxai-secondary); }
.oxai-custom-actions { display: flex; gap: 2px; flex: none; margin: -6px -8px 0 0; }
.oxai-custom-icon {
  border: 0; background: none; cursor: pointer; line-height: 1; color: var(--oxai-pewter);
  font-size: 20px; min-width: 40px; min-height: 40px; padding: 0; border-radius: var(--oxai-radius-pill);
  transition: background-color 200ms;
}
.oxai-custom-icon:hover { background: var(--oxai-surface-hover); }
.oxai-custom-icon[aria-pressed="true"] { color: var(--oxai-fg); }
.oxai-custom-desc { font-size: 15px; line-height: 1.6; }
.oxai-custom-facts { font-size: 13px; color: var(--oxai-secondary); }
.oxai-custom-facts strong { color: var(--oxai-fg); font-weight: 500; }
.oxai-custom-note { font-size: 13px; color: var(--oxai-secondary); }
.oxai-custom-pickers { font-size: 13px; font-weight: 500; }

.oxai-custom-memo {
  font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  padding-top: var(--oxai-space-2); border-top: 1px solid var(--oxai-hairline);
}
.oxai-custom-memo strong { font-weight: 600; margin-right: 6px; }
.oxai-custom-memo[data-mine] { cursor: pointer; }
.oxai-custom-memo-edit { display: grid; gap: var(--oxai-space-2); }
.oxai-custom-memo-edit textarea {
  width: 100%; min-height: 88px; resize: vertical; font: inherit; font-size: 16px; line-height: 1.5;
  padding: 10px 14px; border-radius: 12px; border: 1px solid transparent; background: var(--oxai-bg); color: var(--oxai-fg);
}
.oxai-custom-memo-edit textarea:focus { outline: none; border-color: var(--oxai-fg); }
.oxai-custom-memo-btns { display: flex; gap: var(--oxai-space-2); justify-content: flex-end; }

.oxai-custom-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--oxai-space-1) var(--oxai-space-4);
  margin-top: auto; padding-top: var(--oxai-space-2); font-size: 13px;
}
.oxai-custom-links a {
  color: var(--oxai-fg); text-decoration: underline; text-decoration-color: var(--oxai-border);
  text-underline-offset: 4px; transition: text-decoration-color 150ms;
}
.oxai-custom-links a:hover { text-decoration-color: currentColor; }
.oxai-custom-linkbtn {
  border: 0; background: none; padding: 0; cursor: pointer; font-size: inherit; color: var(--oxai-secondary);
  text-decoration: underline; text-decoration-color: var(--oxai-border); text-underline-offset: 4px;
}
.oxai-custom-linkbtn:hover { color: var(--oxai-fg); text-decoration-color: currentColor; }
.oxai-custom-who { margin-left: auto; }

.oxai-custom-empty { text-align: center; color: var(--oxai-secondary); padding: var(--oxai-space-12) 0; }

.oxai-custom-dialog {
  border: 0; border-radius: var(--oxai-radius-lg); padding: var(--oxai-space-8) var(--oxai-space-6) var(--oxai-space-6);
  width: min(340px, calc(100vw - 40px)); text-align: center; font-family: var(--oxai-font-sans); color: var(--oxai-fg);
}
.oxai-custom-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.oxai-custom-dialog-title { margin: 0 0 4px; font-size: 22px; font-weight: 500; }
.oxai-custom-dialog-sub { margin: 0 0 var(--oxai-space-6); font-size: 14px; color: var(--oxai-secondary); }
.oxai-custom-dialog-btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--oxai-space-2); }
.oxai-custom-dialog-btns .oxai-btn { justify-content: center; height: 52px; font-size: 17px; }
.oxai-custom-dialog-btns .oxai-btn:focus { outline: none; }

.oxai-custom-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--oxai-fg); color: var(--oxai-bg); font-size: 14px; padding: 10px 18px; border-radius: var(--oxai-radius-pill);
  opacity: 0; pointer-events: none; transition: opacity 200ms; z-index: 2000; white-space: nowrap;
}
.oxai-custom-toast[data-show] { opacity: 1; }

.leaflet-container { font-family: var(--oxai-font-sans); }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 0 0 1px var(--oxai-hairline); }
.leaflet-popup-tip { box-shadow: none; }
.leaflet-popup-content { font-size: 13px; line-height: 1.5; margin: 14px 16px; }
.leaflet-popup-content h4 { margin: 0 0 2px; font-size: 15px; font-weight: 500; }
.leaflet-popup-content .oxai-custom-facts,
.leaflet-popup-content .oxai-custom-pickers { margin: 0 0 6px; }
.leaflet-popup-content .oxai-custom-memo { margin: 0 0 6px; font-size: 13px; }
.leaflet-popup-content .oxai-custom-links { padding-top: 4px; gap: 4px 12px; }

@media (max-width: 720px) {
  .oxai-article { padding-inline: var(--oxai-space-4); }
  .oxai-custom-head { gap: var(--oxai-space-3); padding-bottom: var(--oxai-space-4); }
  .oxai-custom-head .oxai-meta-row { padding-top: var(--oxai-space-5); flex-wrap: nowrap; }
  .oxai-custom-head .oxai-dek { font-size: 14px; }
  .oxai-custom-bar { margin-inline: calc(var(--oxai-space-4) * -1); width: calc(100% + var(--oxai-space-8)); max-width: none; }
  .oxai-custom-bar .oxai-toolbar {
    flex-wrap: nowrap; overflow-x: auto; padding-inline: var(--oxai-space-4);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .oxai-custom-bar .oxai-toolbar::-webkit-scrollbar { display: none; }
  .oxai-custom-bar .oxai-chip { flex: none; height: 32px; }
  .oxai-custom-bar .oxai-toolbar-count { margin-left: var(--oxai-space-1); flex: none; }
  .oxai-custom-mapcard.oxai-card { padding: var(--oxai-space-4); }
  #map { height: 56vh; min-height: 320px; }
  .oxai-custom-zone { padding-top: var(--oxai-space-10, 40px); }
  .oxai-custom-zone-head .oxai-btn { margin-left: 0; }
  .oxai-custom-grid { grid-template-columns: minmax(0, 1fr); }
  .oxai-custom-links { gap: var(--oxai-space-2) var(--oxai-space-4); font-size: 14px; }
}

.oxai-custom-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none;
  margin-right: 8px; vertical-align: 0.05em;
}
.oxai-h2 .oxai-custom-dot { width: 12px; height: 12px; vertical-align: 0.1em; }
