/* Site-specific presentation; the CMS engine and saved content stay separate. */
.city-link-editable::after { content: "\2197"; margin-left: .35em; color: #c64e45; font-size: .8em; }
.ec-editing .destinations .city-link-editable { min-height: 40px; padding: 6px 4px; }
#reviewDialog > .close { position: sticky; top: 8px; right: auto; display: block; width: 44px; height: 44px; margin: 8px 8px -44px auto; z-index: 3; border-radius: 50%; background: var(--paper, #fff); font-size: 24px; box-shadow: 0 2px 8px rgba(20, 33, 42, .12); }
#reviewDialog > .review-form { padding-top: 64px; }
:root {
  --sg-soft: #f3f8fb;
  --sg-border: #dce7ec;
  --sg-shadow: 0 8px 28px rgb(23 51 65 / 6%);
}
.detail-title { padding-top: clamp(28px, 4vw, 56px) !important; padding-bottom: 28px !important; }
.detail-title h1 { font-size: clamp(30px, 4.2vw, 60px) !important; line-height: 1.08 !important; letter-spacing: -.028em !important; max-width: 24ch; text-wrap: balance; }
.detail-title > p { line-height: 1.65; }
.detail-title + .tour-catalog { padding-top: 24px !important; }
.tour-catalog-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--sg-border); box-shadow: var(--sg-shadow); }
.tour-catalog-card .image-frame { height: auto; aspect-ratio: 16 / 10; overflow: hidden; }
.tour-catalog-card .image-frame img { width: 100%; height: 100%; object-fit: cover; }
.tour-catalog-card h2 { font-size: clamp(22px, 1.7vw, 26px) !important; line-height: 1.2 !important; letter-spacing: -.022em !important; margin: 0 !important; padding: 18px 18px 0; }
.tour-catalog-card > p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: auto 18px 20px; padding: 16px 100px 0 0; }
html:not(.ec-editing) .tour-catalog-card > .card-destination::after { content: "Подробнее \2197"; position: absolute; right: 18px; bottom: 20px; color: var(--accent); font-size: 13px; line-height: 1.5; }
.tour-catalog-card:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.article-layout { padding-top: clamp(28px, 4vw, 56px) !important; }
.article-layout > article { font-size: 16px; line-height: 1.75; overflow-wrap: break-word; }
.tour-summary { padding: 22px; border: 1px solid var(--sg-border) !important; border-radius: 18px !important; background: var(--sg-soft); }
.tour-summary > h3 { margin: 0 0 18px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.tour-summary > .button { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 50px; margin-top: 18px; font-size: 14px; text-align: center; white-space: normal; }
.tour-conditions > summary { display: none; }
.tour-conditions .tour-facts p:last-child { margin-bottom: 0; }
.sg-gallery-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin: 42px 0 18px; }
.sg-gallery-heading h2 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.025em; }
.sg-gallery-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.tour-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tour-gallery > figure { min-width: 0; margin: 0; }
.tour-gallery .tour-photo img { width: 100%; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
html:not(.ec-editing) .sg-gallery-collapsed > [data-item]:nth-child(n+7) { display: none; }
.sg-gallery-more { width: 100%; min-height: 48px; margin: 16px 0 0; padding: 12px 20px; border: 1px solid var(--sg-border); border-radius: 12px; background: white; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; }
.sg-gallery-more:hover { background: var(--sg-soft); }
.sg-tour-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0; padding: 24px; border: 1px solid var(--sg-border); border-radius: 16px; background: var(--sg-soft); }
.sg-tour-footer p { margin: 0; font-size: 18px; line-height: 1.4; }
.sg-tour-footer .button { flex-shrink: 0; font-size: 14px; }
.tour-lightbox { padding: 12px; border-radius: 16px; }
.tour-lightbox-image { width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 140px); margin: 0 auto; border-radius: 8px; }
.tour-lightbox-controls { padding-top: 12px; }
.tour-lightbox button:focus-visible, .sg-gallery-more:focus-visible, .tour-conditions > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
form[data-form] input:not([type="checkbox"]):not([type="hidden"]), form[data-form] select, form[data-form] textarea { font-size: 16px !important; min-width: 0; min-height: 50px; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--sg-border); background: #fff; line-height: 1.5; }
form[data-form] textarea { min-height: 130px; resize: vertical; }
form[data-form] input:focus-visible, form[data-form] select:focus-visible, form[data-form] textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
form[data-form] .form-consent { display: block; min-height: 44px; font-size: 13px; line-height: 1.65; }
form[data-form] .form-consent input { float: left; width: 20px; height: 20px; margin: 2px 10px 4px 0; accent-color: var(--accent); }
form[data-form] .form-consent a { display: inline; text-decoration: underline; text-underline-offset: 3px; }
form[data-form] button[type="submit"] { min-height: 50px; font-size: 15px; }
.review-entry blockquote { line-height: 1.75; }
.review-author > div:last-child { min-width: 0; }
.review-author h2 { overflow-wrap: anywhere; }

/* Editing controls stay visible and never cover the content they operate on. */
.ec-editing body { padding-bottom: 120px; }
.ec-editing [data-item] > .ec-tools { position: relative !important; inset: auto !important; display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 6px; width: 100%; min-width: 0; margin: 12px 0 0; padding: 8px; border: 1px solid var(--sg-border); border-radius: 10px; background: var(--sg-soft); opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; transform: none !important; box-sizing: border-box; }
.ec-editing .ec-tools > button[data-act] { display: inline-flex !important; align-items: center; justify-content: center; flex: 1 1 40px; width: 40px; min-width: 40px; max-width: 60px; min-height: 40px; padding: 8px; border: 1px solid var(--sg-border); border-radius: 8px; background: white; color: #24485b; font-size: 18px; line-height: 1; }
.ec-editing .ec-tools > button[data-act="del"] { color: #a64038; }
.ec-editing .ec-tools-select { display: none !important; }
.ec-editing .tour-catalog-card > .card-destination, .ec-editing .partner-item > [data-edit-link] { position: relative !important; inset: auto !important; display: flex !important; align-items: center; justify-content: center; width: auto !important; min-height: 44px !important; height: auto !important; margin: 12px 16px; padding: 10px 14px !important; border: 1px solid #bad8e9; border-radius: 9px; background: #eaf5fb; color: #17658f; font-size: 0 !important; }
.ec-editing .tour-catalog-card > .card-destination::after, .ec-editing .partner-item > [data-edit-link]::after { content: "Изменить ссылку"; position: static; font-size: 14px; line-height: 1.4; }
.ec-editing [data-collection="partners"] { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); width: 100% !important; gap: 20px; transform: none !important; }
.ec-editing .partner-item { width: auto !important; max-width: none !important; min-width: 0 !important; height: auto !important; padding: 20px !important; }
.ec-editing .partner-item > [data-edit-link] { margin: 16px 0 0; }
.ec-editing .review-avatar::after { content: "Фото"; position: absolute; top: 100%; left: 0; width: 100%; margin-top: 4px; color: #17658f; font: 11px/1.3 sans-serif; text-align: center; pointer-events: none; }
.ec-editing .review-author { padding-bottom: 16px; }
.ec-editing .tour-conditions > summary { display: none !important; }
.sg-editor-hint { margin: 20px 0 14px; padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--sg-soft); color: #365666; font: 14px/1.6 sans-serif; }
.ec-bar .ec-save { background: #2388bf; color: white; }
.ec-bar { border-radius: 16px; }
.ec-dialog { max-width: calc(100vw - 24px); max-height: calc(100dvh - 32px); overflow-y: auto; }
.ec-dialog input, .ec-dialog select, .ec-dialog textarea { font-size: 16px; }
@media (max-width: 700px) {
  .detail-title { padding-bottom: 24px !important; }
  .detail-title + .tour-catalog { padding-top: 12px !important; }
  .tour-catalog { gap: 20px; }
  .tour-summary { padding: 20px; }
  .tour-summary > h3 { margin-bottom: 10px; }
  .tour-conditions > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 10px 0; border-top: 1px solid var(--sg-border); color: #24485b; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
  .tour-conditions > summary::-webkit-details-marker { display: none; }
  .tour-conditions > summary::after { content: "+"; font-size: 23px; font-weight: 400; }
  .tour-conditions[open] > summary::after { content: "\2212"; }
  .tour-conditions .tour-facts { padding-top: 14px; }
  .tour-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sg-gallery-heading h2 { font-size: 26px; }
  .sg-tour-footer { flex-direction: column; align-items: stretch; padding: 20px; }
  .sg-tour-footer .button { text-align: center; }
  .tour-lightbox { width: calc(100vw - 20px); padding: 10px; }
  .tour-lightbox-image { max-height: calc(100dvh - 124px); }
  .ec-editing .tour-gallery { grid-template-columns: 1fr; }
  .ec-editing [data-collection="partners"] { grid-template-columns: minmax(0, 1fr); }
  .ec-bar { bottom: max(8px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .tour-catalog-card, .tour-photo, .article-layout { transition: none !important; animation: none !important; }
}
