/* Place show: container 1080px, same width as main */
.place-detail { padding-bottom: 48px; }
@media (max-width: 980px) {
  .place-detail--has-directions,
  .place-detail {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

/* Mobile: sticky directions + Add to plan (replaces bottom tab bar on this page) */
.place-detail__plan-floating-wrap {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  z-index: 3000;
  pointer-events: none;
  gap: 8px;
  align-items: stretch;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.96) 55%, rgba(255, 255, 255, 0));
}
.place-detail__plan-floating-wrap .route-detail__start-floating {
  justify-content: center;
  pointer-events: auto;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.16);
  min-width: 0;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  height: auto;
  min-height: 48px;
  padding: 10px 12px;
}
.place-detail__floating-directions {
  flex: 1.25 1 0;
}
.place-detail__floating-plan {
  flex: 1 1 0;
}
.place-detail__plan-floating-wrap > :only-child {
  flex: 1 1 auto;
  width: 100%;
}
.place-detail__plan-floating-wrap .route-detail__cta-label {
  overflow-wrap: anywhere;
}
@media (max-width: 980px) {
  .place-detail__plan-floating-wrap {
    display: flex;
  }
}
@media (max-width: 380px) {
  .place-detail__plan-floating-wrap {
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .place-detail__plan-floating-wrap .route-detail__start-floating {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 13px;
  }
  .place-detail__plan-floating-wrap .route-detail__title-cta-icon {
    display: none;
  }
}
@media (min-width: 981px) {
  .place-detail__plan-floating-wrap {
    display: none !important;
  }
}

/* Tags row under title */
.place-detail__tags { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.place-detail__tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 13px;
  text-decoration: none;
  color: var(--text);
}
.place-detail__tag-pill:hover { background: var(--border); color: #111; }

/* Gallery slider: max-height 480px, image vertical align center */
.place-detail__gallery { margin-bottom: 46px; }
.place-detail__slider { position: relative; border-radius: var(--radius-sx); overflow: hidden; background: transparent; height: 480px; max-height: 480px; display: flex; flex-direction: column; }
.place-detail__slider-track { position: relative; flex: 1; min-height: 0; }
.place-detail__slider-slide { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.place-detail__slider-slide.is-active { display: flex; }
.place-detail__gallery-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.place-detail__slider-dots {
  display: flex;
  justify-content: center;
  position: absolute;
  bottom: 0;
  gap: 8px;
  width: 100%;
  padding: 12px 12px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
}
.place-detail__slider-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,0.4); cursor: pointer; padding: 0; }
.place-detail__slider-dot:hover { background: rgba(255,255,255,0.7); }
.place-detail__slider-dot.is-active { background: #fff; }
.place-detail__gallery-fallback { margin: 0; }
.place-detail__gallery-fallback img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sx); }

.place-detail__slider-arrows { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); pointer-events: none; z-index: 5; display: flex; justify-content: space-between; padding: 0 12px; }
.place-detail__slider-arrow { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.8); background: rgba(0,0,0,0.35); color: #fff; font-size: 24px; line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0; }
.place-detail__slider-arrow:hover { background: rgba(0,0,0,0.5); }
.place-detail__slider-arrow.is-hidden { visibility: hidden; }

/* Back button: visible only on mobile, top-left of gallery. --light: white bg, black icon, no border */
.place-detail__gallery-back { display: none; }
.place-detail__gallery-back--light {
  background: #fff !important;
  border: none !important;
  color: #111 !important;
}
.place-detail__gallery-back--light:hover { background: #f0f0f0 !important; color: #111 !important; }
.place-detail__gallery-back--light .material-symbols-outlined { color: #111; }

.place-detail__slider-map-tile { position: absolute; right: 20px; bottom: 20px; z-index: 4; width: 96px; height: 96px; border-radius: 12px; background: var(--bg-soft, #e8eef4); display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: var(--text); box-shadow: 0 4px 16px rgba(0,0,0,0.12); overflow: hidden; border: none; }
.place-detail__slider-map-tile-inner { position: absolute; inset: 0; display: block; padding: 0; pointer-events: none; border-radius: 12px; overflow: hidden; }
.place-detail__slider-map-preview-img { position: relative; z-index: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; border-radius: 12px; pointer-events: none; }
/* Pineska wyżej od dolnej krawędzi kwadratu 96×96, mniejsza, żeby nie „kleiła się” do rogów. */
.place-detail__slider-map-pin {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 2;
  width: 34px;
  height: 40px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.28));
}
.place-detail__slider-map-pineska-svg {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.place-detail__map-tile-svg { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.place-detail__slider-map-label { display: none; }
.place-detail__slider-map-tile:hover { color: var(--text); }

/* Mobile: gallery 420px, map tile, back button */
@media (max-width: 768px) {
  .place-detail__slider { height: 420px; max-height: 420px; }
  .place-detail__gallery-back {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 6;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.8);
    color: #fff;
    text-decoration: none;
  }
  .place-detail__gallery-back:hover { background: rgba(0,0,0,0.5); color: #fff; }
  .place-detail__gallery-back--light { background: #fff; border: none; color: #111; }
  .place-detail__gallery-back .material-symbols-outlined { font-size: 24px; }
}

.place-detail__carousels { margin-top: 48px; }
.place-detail__carousel-title { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.place-detail__carousels .carousel-wrap { margin-bottom: 42px; }
.place-detail__carousels .carousel-wrap:last-child { margin-bottom: 0; }

.place-detail__map-fullscreen { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.5); display: none; flex-direction: column; }
.place-detail__map-fullscreen.is-open { display: flex; }
.place-detail__map-frame-wrap { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 100vw; }
.place-detail__map-leaflet { position: absolute; inset: 0; z-index: 1; }
.place-detail__map-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.place-detail__map-close { position: absolute; top: 16px; right: 16px; z-index: 2000; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: none; font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; color: #111; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.place-detail__map-close:hover { background: #f0f0f0; }
.place-detail__map-fullscreen .leaflet-top.leaflet-left { top: 16px; left: 16px; }

/* Meta row: author + actions */
.place-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
  z-index: 600;
}
.place-detail__author { flex: 1; min-width: 0; }
.place-detail__author-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.place-detail__avatar { border-radius: 50%; object-fit: cover; }
.place-detail__avatar--placeholder,
.place-detail__comment-form-avatar--placeholder,
.place-detail__comment-avatar--placeholder {
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  object-fit: cover;
}
.place-detail__avatar--placeholder { width: 40px; height: 40px; }
.place-detail__comment-form-avatar--placeholder { width: 40px; height: 40px; }
.place-detail__comment-avatar--placeholder { width: 36px; height: 36px; }
.place-detail__author-text { display: flex; flex-direction: column; gap: 2px; }
.place-detail__author-name { font-weight: 600; font-size: 15px; }
.place-detail__author-date { font-size: 13px; color: var(--muted); }
.place-detail__actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.place-detail__action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: none; background: var(--bg-soft); border-radius: 999px; font-size: 14px; cursor: pointer; color: var(--text); }
.place-detail__action-btn:hover { background: var(--border); }
.place-detail__action-btn--saved .material-symbols-filled {
  font-size: 22px;
  color: #111;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
/* Like: outline when not voted, green filled when voted; count follows --text */
.place-detail__action-btn[data-like-place] .material-symbols-outlined { font-variation-settings: 'FILL' 0; color: var(--text); }
.place-detail__action-btn[data-like-place][aria-pressed="true"] .material-symbols-outlined { font-family: 'Material Symbols'; font-variation-settings: 'FILL' 1; color: var(--green); }
.place-detail__action-btn[data-like-place] [data-place-likes-count] { color: var(--text); font-weight: 600; }
.place-detail__action-btn--muted { cursor: default; opacity: 0.8; }
.place-detail__dropdown-wrap { position: relative; z-index: 610; }
.place-detail__dropdown[hidden], .place-detail__share-dropdown[hidden] { display: none !important; }
.place-detail__dropdown { position: absolute; top: 100%; right: 0; margin-top: 4px; min-width: 160px; padding: 8px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sx); box-shadow: var(--shadow); z-index: 50; color: var(--text); }
.place-detail__share-dropdown { display: grid; grid-template-columns: repeat(3, auto); gap: 8px; padding: 8px; }
.place-detail__share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.place-detail__share-link svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  overflow: visible;
}
.place-detail__report-btn { display: block; width: 100%; padding: 10px 14px; border: none; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.place-detail__report-btn:hover { background: var(--bg-soft); }

/* 3-icon module: icon left, title bold, description below */
.place-detail__info-icons {
  margin: 0;
  padding: 56px 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface, #fff);
  box-sizing: border-box;
  width: 100%;
}
/* Full-width practical info when no published AI guide (no 2-col grid). */
.place-detail__info-icons--full {
  margin: 0 0 28px;
  max-width: 100%;
}
.place-detail__content-split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: 28px;
  align-items: start;
  margin: 0 0 28px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.place-detail__content-main,
.place-detail__content-aside {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  align-self: start;
}
.place-detail__guide {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
}
.place-detail__guide-block { margin: 0; }
.place-detail__guide-q {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text, #111);
}
.place-detail__guide-a {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text, #111);
}
.place-detail__guide-list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 15px;
  line-height: 1.5;
}
.place-detail__guide-list li + li { margin-top: 6px; }
.place-detail__guide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.place-detail__guide-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft, #f2f5f9);
  border: 1px solid var(--border, #e2e8f0);
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 1400px) {
  .place-detail__content-split {
    grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  }
}
@media (max-width: 1080px) {
  .place-detail__content-split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 5fr);
  }
}
@media (max-width: 980px) {
  .place-detail__content-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .place-detail__info-icons--full {
    margin-bottom: 20px;
  }
}
.place-detail__info-row { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 42px; }
.place-detail__info-row:last-child { margin-bottom: 0; }
.place-detail__info-icon { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.place-detail__info-icon--svg .place-detail__info-svg {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
}
.place-detail__info-icon .material-symbols-outlined { font-size: 28px; }
.place-detail__info-text { flex: 1; min-width: 0; }
.place-detail__info-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text); }
.place-detail__info-desc { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--text); }

/* Ready trips carousel — home-style cards; 4-up desktop (same as home popular) */
.place-detail__discover-routes {
  margin: 36px 0 72px;
}
.place-detail__discover-routes .place-detail__carousel-title {
  margin-top: 0;
}

/* Plan trip CTA: desktop — rigid 1:1 frame left, copy right; mobile — image row first */
.place-detail__plan-cta {
  display: grid;
  grid-template-columns: minmax(0, 240px) 1fr;
  gap: 20px 28px;
  align-items: center;
  margin: 24px 0 32px;
  padding: 0;
  border: none;
  background: none;
}
@media (max-width: 980px) {
  .place-detail__plan-cta {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .place-detail__plan-cta-visual {
    justify-self: center;
    width: min(100%, 280px);
    max-width: 280px;
  }
}
@media (min-width: 981px) {
  .place-detail__plan-cta {
    gap: 28px 36px;
    margin: 72px 0 96px;
  }
  .place-detail__plan-cta-visual {
    justify-self: start;
  }
}
/* Square crop box: image never stretches; object-fit preserves aspect ratio inside 1:1 */
.place-detail__plan-cta-visual {
  position: relative;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 4px solid #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  transform: rotate(-4deg);
}
.place-detail__plan-cta-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.place-detail__plan-cta-copy {
  min-width: 0;
}
.place-detail__plan-cta-heading {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0a0a0a;
  letter-spacing: -0.02em;
  filter: grayscale(1);
}
@media (min-width: 981px) {
  .place-detail__plan-cta-heading {
    font-size: 1.35rem;
  }
}
.place-detail__plan-cta-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #222;
  filter: grayscale(1);
}
.place-detail__plan-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
  background: var(--green);
  border-color: var(--green);
  color: #0b0b0b;
}
.place-detail__plan-cta-btn:hover {
  filter: brightness(0.95);
}
.place-detail__plan-cta-btn-icon {
  font-size: 22px !important;
  width: 22px;
  height: 22px;
}
.place-detail__plan-cta-btn--gated {
  cursor: pointer;
}

/* Title */
/* Title row: h1 (+ translation badge) + directions / Add to plan on the right (desktop) */
.place-detail__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.place-detail__title-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  align-self: flex-start;
}
.place-detail__title-actions .route-detail__title-cta {
  flex-shrink: 0;
}
.place-detail__title-actions .btn--light {
  color: #111;
  background: #fff;
  border-color: var(--border, #d8d8d8);
}
.place-detail__title-actions .btn--light:hover,
.place-detail__title-actions .btn--light:active,
.place-detail__floating-plan:hover,
.place-detail__floating-plan:active {
  background: #f5f5f5;
  border-color: #cfcfcf;
  color: #111;
}
.place-detail__title-actions .btn--green:hover,
.place-detail__title-actions .btn--green:active,
.place-detail__floating-directions:hover,
.place-detail__floating-directions:active {
  filter: brightness(0.96);
}
.place-detail__title-actions .btn:focus-visible,
.place-detail__plan-floating-wrap .btn:focus-visible,
.place-detail__directions-modal .btn:focus-visible,
.place-detail__directions-modal .modal__close:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}
.place-detail__directions-unavailable {
  margin: 0;
  max-width: 220px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted, #666);
}
@media (max-width: 980px) {
  .place-detail__title-actions--desktop {
    display: none;
  }
}
.place-detail__title-wrap {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.place-detail__title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.3; flex: 0 1 auto; max-width: 100%; }
@media (min-width: 981px) {
  .place-detail__title {
    font-size: 34px;
  }
}
.place-detail__translation-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted, #5c6470);
  background: var(--surface-muted, #eef0f4);
  border: 1px solid var(--border-subtle, #e0e4ea);
  cursor: default;
}
.place-detail__translation-badge-icon {
  font-size: 13px !important;
  width: 13px;
  height: 13px;
  opacity: 0.85;
}
.place-detail__translation-badge-code {
  line-height: 1;
}

.place-detail__comment-body--masked {
  font-style: italic;
  color: var(--text-muted, #5c6470);
}
/* Kategoria + tagi (identycznie jak route-detail__meta-line) */
.place-detail .route-detail__meta-line { margin: 0 0 16px; font-size: 14px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.place-detail .route-detail__meta-sep { display: inline-block; width: 1px; height: 24px; background: var(--border, #ddd); flex-shrink: 0; margin: 0 4px; vertical-align: middle; }
.place-detail .route-detail__pill { display: inline-flex; align-items: center; padding: 2px 10px; background: var(--bg-soft); border-radius: 999px; font-size: 12px; color: var(--text); text-decoration: none; }
.place-detail a.route-detail__pill:hover { background: var(--border); }
.place-detail .route-detail__pill-icon { font-size: 14px !important; width: 14px; height: 14px; margin-right: 4px; flex-shrink: 0; }

/* Location: pin + city, country (gap only after pin; comma lives in city link/text) */
.place-detail__location { margin: 0 0 16px; font-size: 14px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.place-detail__location-icon { font-size: 18px !important; width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); margin-right: 6px; }
.place-detail__location-inner { display: inline; color: var(--muted); }
.place-detail__location-city { color: var(--muted); }
.place-detail__location-link { color: var(--muted); text-decoration: none; }
.place-detail__location-link:hover { color: var(--text); text-decoration: none; }
.place-detail__location-country { color: var(--muted); }

/* Description: rounded container, padding 14px, no date/meta line */
.place-detail__description-wrap { margin-bottom: 24px; }
.place-detail__description-inner { padding: 0; background: none; border: none; border-radius: 0; }
.place-detail__description-text { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.place-detail__description-text:last-of-type { margin-bottom: 0; }
.place-detail__description-toggle { margin-top: 4px; padding: 0; border: none; background: none; font-size: 14px; color: var(--green); cursor: pointer; }
.place-detail__description-toggle:hover { text-decoration: underline; }

/* Comment form: full width, one row - [avatar] [input+photo] [button] */
.comment-photos-gallery-host { margin: 24px 0 var(--space-6, 24px); }
.comment-photos-gallery { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.comment-photos-gallery__tile { flex: 0 0 auto; }

/* Shared: comment image thumb + author strip (gallery + comment body) */
.comment-photo-thumb {
  position: relative;
  display: block;
  width: 96px;
  padding: 0;
  margin: 0;
  border: none;
  background: #111;
  cursor: pointer;
  border-radius: var(--radius-sx);
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 0 0 1px var(--border);
  text-align: left;
}
.comment-photo-thumb:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.comment-photo-thumb__img { width: 96px; height: 96px; object-fit: cover; display: block; vertical-align: middle; }
.comment-photo-thumb__author {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 4px 3px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  pointer-events: none;
}
.comment-photo-thumb__author-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  line-height: 0;
}
.comment-photo-thumb__author-flag {
  position: absolute;
  right: -3px;
  bottom: -2px;
  z-index: 2;
  line-height: 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.comment-photo-thumb__author-flag-img {
  display: block;
  vertical-align: top;
}
.comment-photo-thumb__author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.comment-photo-thumb__author-avatar--placeholder {
  background: rgba(255, 255, 255, 0.12);
  object-fit: cover;
}
.comment-photo-thumb__author-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.place-detail__comments-title { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.route-detail__comments-title { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.place-detail__comments { margin-top: 8px; width: 100%; max-width: 100%; box-sizing: border-box; }
.place-detail__comment-form { display: flex; gap: 12px; margin-bottom: 24px; align-items: flex-start; width: 100%; max-width: 100%; flex-direction: row !important; box-sizing: border-box; }
.place-detail__comment-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  align-self: flex-start;
  line-height: 0;
}
.place-detail__comment-flag {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 2;
  line-height: 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1.5px var(--surface, #fff);
  pointer-events: none;
}
.place-detail__comment-flag--lg {
  right: -2px;
  bottom: -2px;
}
.place-detail__comment-flag-img {
  display: block;
  vertical-align: top;
}
.place-detail__comment-form-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 2px; }
.place-detail__comment-form-inner { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.place-detail__comment-form-body { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: row !important; align-items: center; gap: 10px; width: 100%; }
.place-detail__comment-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sx);
  background: var(--surface, #fff);
  overflow: hidden;
}
.place-detail__comment-file-input {
  position: absolute;
  width: 0.01px;
  height: 0.01px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
  left: 0;
  bottom: 0;
}
.place-detail__comment-photo-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
}
.place-detail__comment-photo-btn:hover { color: #111; background: var(--bg-soft, #f6f6f6); }
.place-detail__comment-photo-btn .material-symbols-outlined { font-size: 22px; color: #111; }
.place-detail__comment-pending-images { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 0; }
.place-detail__comment-pending-chip { position: relative; display: inline-flex; border-radius: var(--radius-sx); overflow: hidden; border: 1px solid var(--border); line-height: 0; }
.place-detail__comment-pending-chip img { display: block; object-fit: cover; }
.place-detail__comment-pending-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.place-detail__comment-pending-remove:hover { background: rgba(0, 0, 0, 0.75); }
.place-detail__comment-input-wrap .place-detail__comment-input {
  flex: 1 1 auto !important;
  min-width: 0;
  width: auto !important;
  max-width: none !important;
  padding: 10px 12px !important;
  font: inherit;
  resize: none;
  height: 44px !important;
  border: none !important;
  border-radius: 0 !important;
  box-sizing: border-box;
  box-shadow: none !important;
}
.place-detail__comment-input {
  flex: 1 1 auto !important;
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  padding: 10px 14px !important;
  font: inherit;
  resize: none;
  height: 44px !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sx) !important;
  box-sizing: border-box;
}
.place-detail__comment-submit { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; background: #111; color: #fff; border: none; border-radius: var(--radius-sx); cursor: pointer; }
.place-detail__comment-submit:hover { background: #333; }
.place-detail__comment-submit .material-symbols-outlined { font-size: 20px; }
.place-detail__comments-guest { margin: 0 0 24px; }

/* Comment list */
.place-detail__comment-list { list-style: none; padding: 0; margin: 0; }
.place-detail__comment-item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); position: relative; }
.place-detail__comment-item:last-child { border-bottom: none; }
.place-detail__comment-item--reply { margin-left: 24px; padding-left: 0; border-left: 0; border-bottom: none; }
.place-detail__comment-connector { display: none; }
.place-detail__comment-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.place-detail__comment-main { flex: 1; min-width: 0; }
.place-detail__comment-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.place-detail__comment-author { font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text); }
.place-detail__comment-author:hover { text-decoration: underline; }
.place-detail__comment-date { font-size: 12px; color: var(--muted); }
.place-detail__comment-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  align-items: flex-start;
}
.place-detail__comment-images .comment-photo-thumb { flex: 0 0 auto; }
.place-detail__comment-body { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.place-detail__comment-body .comment-mention { color: var(--green); text-decoration: none; }
.place-detail__comment-body .comment-mention:hover { text-decoration: underline; }
.place-detail__comment-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.place-detail__comment-action { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: none; background: none; font-size: 13px; color: var(--muted); cursor: pointer; }
.place-detail__comment-action:hover { color: var(--text); }
.place-detail__comment-menu-wrap { position: relative; }
.place-detail__comment-menu-btn { padding: 4px; border: none; background: none; cursor: pointer; color: var(--muted); }
.place-detail__comment-menu-btn:hover { color: var(--text); }
.place-detail__comment-menu-wrap .place-detail__dropdown { right: 0; left: auto; min-width: 120px; }
.place-detail__comments-count { display: none; }

/* Comment image lightbox (place + route detail) */
.comment-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  box-sizing: border-box;
}
.comment-photo-lightbox__img-wrap {
  max-width: min(96vw, 1200px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comment-photo-lightbox__img { max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: 4px; }
.comment-photo-lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.comment-photo-lightbox__close:hover { background: rgba(255, 255, 255, 0.22); }
.comment-photo-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.comment-photo-lightbox__nav:hover { background: rgba(255, 255, 255, 0.22); }
.comment-photo-lightbox__prev { left: 16px; }
.comment-photo-lightbox__next { right: 16px; }

/* Add to route modal – uses .modal .modal__box .save-modal__box from layout.css; only extra label above list */
.place-detail__add-to-route-recent-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.place-detail__add-to-route-modal .save-modal__list-option:disabled { opacity: 0.7; cursor: wait; }

.place-detail__add-to-route-modal.is-success .modal__close {
  display: none;
}
.place-detail__add-to-route-modal.is-success .modal__header {
  border-bottom-color: transparent;
}
.place-detail__add-to-route-success[hidden] {
  display: none !important;
}
.place-detail__add-to-route-form-wrap[hidden] {
  display: none !important;
}
.place-detail__add-to-route-success {
  text-align: center;
  padding: 4px 0 8px;
}
.place-detail__add-to-route-success-visual {
  position: relative;
  width: min(100%, 200px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 10px;
  border: 3px solid #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}
.place-detail__add-to-route-success-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.place-detail__add-to-route-success-title {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.place-detail__add-to-route-success-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
}
.place-detail__add-to-route-success-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Tag proposal (place + route detail; shared modal pattern with layout .modal) */
.place-detail__tag-propose-wrap,
.route-detail__tag-propose-wrap {
  margin-top: 10px;
}
.tag-proposal-host--inline {
  display: inline;
  vertical-align: baseline;
}
.place-detail__tag-suggest-link {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  vertical-align: baseline;
}
.place-detail__tag-suggest-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tag-proposal-host__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--green, #067a46);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.tag-proposal-host__link:hover {
  color: #055a35;
}
.tag-proposal-host__link .material-symbols-outlined {
  font-size: 18px !important;
  text-decoration: none;
}

/*
 * Fullscreen place map: same photo pin as route builder (routes.css is not on this layout).
 * Mirrors .route-builder-marker--pineska block; scoped to overlay so it cannot leak.
 */
.place-detail__map-fullscreen .route-builder-marker {
  background: none;
  border: none;
}
.place-detail__map-fullscreen .route-builder-marker--pineska {
  display: block;
  width: 44px;
  height: 52px;
  position: relative;
}
.place-detail__map-fullscreen .route-builder-marker__pineska {
  display: block;
  width: 44px;
  height: 52px;
  position: relative;
  box-sizing: border-box;
}
.place-detail__map-fullscreen .route-builder-marker__pineska-svg {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: #fff;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  z-index: 0;
}
.place-detail__map-fullscreen .route-builder-marker__pineska-svg path {
  fill: #fff;
}
.place-detail__map-fullscreen .route-builder-marker__pineska-photo {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--bg-soft, #e8e8e8);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  z-index: 1;
}
.place-detail__map-fullscreen .route-builder-marker__pineska-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.place-detail__map-fullscreen .leaflet-marker-icon.route-builder-marker {
  background: transparent !important;
  border: none !important;
}
/* Tag proposal: shared .modal__* from layout.css; title explicitly black */
.tag-proposal-modal .modal__title {
  color: #111;
}
.tag-proposal-modal__input {
  width: 100%;
  box-sizing: border-box;
}
.tag-proposal-modal__results {
  list-style: none;
  margin: 10px 0 0;
  padding: 4px 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft, #f8f8f8);
}
.tag-proposal-modal__results:empty {
  display: none;
}
.tag-proposal-modal__results li {
  margin: 0;
  padding: 0;
}
.tag-proposal-modal__result-btn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}
.tag-proposal-modal__result-btn:hover {
  background: #fff;
}
.tag-proposal-modal__selected {
  margin: 12px 0 0;
  font-size: 14px;
}
.tag-proposal-modal__selected-label {
  color: var(--muted);
  margin-right: 6px;
}

/* Content report modal (place / route / comment) */
.report-modal .modal__title {
  color: var(--text);
}
.report-modal__lead {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.report-modal__reasons {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-modal__reason {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
.report-modal__reason input {
  margin-top: 3px;
  flex-shrink: 0;
}
.report-modal__other-wrap {
  display: block;
  margin-top: 14px;
}
.report-modal__other-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}
.report-modal__other-input {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}
.report-modal__error {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--danger, #c62828);
}
.report-modal__error[hidden] {
  display: none !important;
}

/* Directions travel-mode modal
   Selectors match classes in app/Views/places/show.php:
   .place-detail__directions-primary.btn.btn--green
   .place-detail__directions-separator
   .place-detail__directions-modes > .place-detail__directions-mode.btn.btn--light
*/
/* Directions modal: flex column + body scroll (do not scroll the whole box). */
.place-detail__directions-modal .place-detail__directions-modal-box {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  max-width: 400px;
  max-height: min(90vh, 720px);
  max-height: min(90dvh, 720px);
  overflow: hidden;
}
.place-detail__directions-modal .place-detail__directions-modal-box > .modal__header {
  flex: 0 0 auto;
}
.place-detail__directions-modal .place-detail__directions-modal-body {
  flex: 1 1 auto;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
/* While directions modal is open, hide page floating CTAs so they cannot cover sheet content. */
body.place-directions-modal-open .place-detail__plan-floating-wrap {
  visibility: hidden;
  pointer-events: none;
}
.place-detail__directions-modal a.btn.place-detail__directions-primary {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  height: auto;
  padding: 12px 16px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  white-space: normal;
  text-align: center;
  text-decoration: none;
}
.place-detail__directions-modal a.btn.place-detail__directions-primary:hover,
.place-detail__directions-modal a.btn.place-detail__directions-primary:active {
  filter: brightness(0.96);
}
.place-detail__directions-modal .place-detail__directions-primary-icon {
  flex-shrink: 0;
}
.place-detail__directions-modal .place-detail__directions-primary-label {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}
.place-detail__directions-modal .place-detail__directions-separator {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted, #64748b);
  font-size: 12px;
  line-height: 1.2;
}
.place-detail__directions-modal .place-detail__directions-separator::before,
.place-detail__directions-modal .place-detail__directions-separator::after {
  content: '';
  flex: 1 1 0;
  min-width: 12px;
  height: 0;
  border-top: 1px dashed var(--border, #e2e8f0);
  background: none;
}
.place-detail__directions-modal .place-detail__directions-separator-text {
  flex: 0 0 auto;
  color: var(--muted, #64748b);
}
.place-detail__directions-modal .place-detail__directions-modes-label {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted, #64748b);
}
.place-detail__directions-modal .place-detail__directions-modes {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 10px;
}
.place-detail__directions-modal a.btn.btn--light.place-detail__directions-mode {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  height: auto;
  padding: 12px 16px;
  gap: 10px;
  color: #111;
  background: #fff;
  border-color: var(--border, #d8d8d8);
  white-space: normal;
  text-align: left;
  text-decoration: none;
}
.place-detail__directions-modal a.btn.btn--light.place-detail__directions-mode:hover,
.place-detail__directions-modal a.btn.btn--light.place-detail__directions-mode:active {
  background: #f5f5f5;
  border-color: #cfcfcf;
  color: #111;
  filter: none;
}
.place-detail__directions-modal a.btn.place-detail__directions-mode:focus-visible,
.place-detail__directions-modal a.btn.place-detail__directions-primary:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}
.place-detail__directions-modal .place-detail__directions-mode-icon {
  flex-shrink: 0;
  font-size: 22px !important;
  width: 22px;
  height: 22px;
  color: #111;
}
.place-detail__directions-modal .place-detail__directions-mode-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 480px) {
  .place-detail__directions-modal {
    align-items: flex-end;
    padding: 0;
    /* Pin to the visual viewport when browser chrome changes (see visualViewportInsets.js). */
    top: var(--vv-top, 0px);
    bottom: var(--vv-bottom, 0px);
    height: auto;
  }
  .place-detail__directions-modal .place-detail__directions-modal-box,
  .place-detail__directions-modal .modal__box {
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-width: 100%;
    width: 100%;
    /* Fallback first, then dynamic viewport units. */
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - 12px);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 12px);
  }
}

