/**
 * Kupetz Design v1.3 — internal pages (TEST pilot).
 * Scope: kcv13-internal is emitted by page.php for history, excursion, interior,
 * contacts and recognised restaurant-family pages only.
 * No global background, footer, header or WooCommerce overrides.
 */
.kcv13-internal {
  --kcv13-wine: #570d1b;
  --kcv13-wine-soft: #7b3440;
  --kcv13-gold: #b58a4d;
  --kcv13-border: #dfceb8;
  --kcv13-cream: #fbf7f0;
  --kcv13-ink: #49352f;
  --kcv13-radius: 4px;
  color: var(--kcv13-ink);
}
/* Default internal-page spacing; individual redesigns override their background. */
.kcv13-internal.kupetz-content-shell--standard {
  padding-top: clamp(48px, 5vw, 78px);
}
.kcv13-internal > :first-child {
  position: relative;
  z-index: 2;
}
.kcv13-internal .kupetz-content-main { min-width: 0; }
.kcv13-internal article {
  max-width: 100%;
  overflow-wrap: break-word;
}
.kcv13-internal article > h1 {
  color: var(--kcv13-wine);
  display: table;
  font-family: var(--kupetz-font-display, Georgia, serif);
  font-size: clamp(30px, 3.3vw, 48px);
  font-weight: 400;
  letter-spacing: .005em;
  line-height: 1.15;
  margin: 0 auto clamp(28px, 4vw, 52px);
  max-width: 100%;
  padding: 0 12px 20px;
  text-align: center;
  text-transform: none;
}
.kcv13-internal article > h1::before { content: none; }
.kcv13-internal article > h1::after {
  background: linear-gradient(90deg, transparent, var(--kcv13-gold) 18%, var(--kcv13-gold) 82%, transparent);
  bottom: 0;
  content: "";
  height: 1px;
  left: 50%;
  margin: 0;
  position: absolute;
  right: auto;
  top: auto;
  transform: translateX(-50%);
  width: min(230px, 75%);
}
.kcv13-internal article :is(p, li) {
  font-family: var(--kupetz-font-body, Arial, sans-serif);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.72;
}
.kcv13-internal article :is(h2, h3, h4):not(.kupetz-history-name) {
  color: var(--kcv13-wine);
  letter-spacing: .005em;
  line-height: 1.3;
  max-width: 100%;
}
.kcv13-internal article h2:not(.kupetz-history-name) {
  font-size: clamp(24px, 2.4vw, 34px);
}
.kcv13-internal article :is(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--kcv13-gold);
  outline-offset: 3px;
}
.kcv13-internal article :is(.wp-block-image, .wp-block-gallery) img {
  height: auto;
  max-width: 100%;
}
.kcv13-internal article figcaption {
  color: #756358;
  font-family: var(--kupetz-font-body, Arial, sans-serif);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 10px;
}
.kcv13-internal article .wp-block-separator,
.kcv13-internal article hr {
  border: 0;
  border-top: 1px solid var(--kcv13-border);
  height: 0;
  margin-block: clamp(24px, 4vw, 48px);
}
.kcv13-internal article .wp-block-quote,
.kcv13-internal article blockquote:not(.wp-block-pullquote) {
  background: rgba(251, 247, 240, .65);
  border-left: 3px solid var(--kcv13-gold);
  margin-inline: 0;
  padding: 20px clamp(18px, 3vw, 30px);
}
.kcv13-internal article .wp-block-button__link,
.kcv13-internal article a.button {
  align-items: center;
  background: var(--kcv13-wine);
  border: 1px solid var(--kcv13-wine);
  border-radius: var(--kcv13-radius);
  box-sizing: border-box;
  color: #fff;
  display: inline-flex;
  font-family: var(--kupetz-font-body, Arial, sans-serif);
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  line-height: 1.3;
  min-height: 44px;
  padding: 11px 24px;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.kcv13-internal article .wp-block-button__link:is(:hover, :focus-visible),
.kcv13-internal article a.button:is(:hover, :focus-visible) {
  background: #752438;
  border-color: #752438;
  color: #fff;
}
.kcv13-internal article .wp-block-columns { gap: clamp(18px, 3vw, 34px); }
.kcv13-internal article .wp-block-column { min-width: 0; }

/* History: refresh the timeline chrome, not the state machine or slides. */
.kcv13-internal--history .kupetz-history {
  margin-inline: auto;
  max-width: 1180px;
}
.kcv13-internal--history .kupetz-history-slider-list {
  background: var(--kcv13-cream);
  border: 1px solid var(--kcv13-border);
  box-shadow: 0 12px 30px rgba(58, 23, 24, .055);
  max-width: 840px;
}
.kcv13-internal--history .kupetz-history-slider-list::after {
  border-color: rgba(181, 138, 77, .55);
}
.kcv13-internal--history .kupetz-history-slider-item .kupetz-history-date {
  background: var(--kcv13-wine);
  border-radius: 4px;
  font-size: clamp(20px, 2vw, 26px);
  max-width: 210px;
}
.kcv13-internal--history .kupetz-history-slider-item .kupetz-history-name {
  color: var(--kcv13-wine);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.35;
}
.kcv13-internal--history .kupetz-history-slider-nav :is(.kupetz-history-date, .kupetz-history-name) {
  color: var(--kcv13-wine);
}
.kcv13-internal--history .kupetz-history-text {
  color: var(--kcv13-ink);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.68;
}
.kcv13-internal--history .kupetz-history-slides-wrap {
  max-width: min(100%, 1040px);
}

/* Excursion: breathing room for real text, galleries and ticket actions. */
.kcv13-internal--excursion article > :is(p, ul, ol, h2, h3, h4, blockquote, .wp-block-group) {
  max-width: min(100%, 920px);
  margin-left: auto;
  margin-right: auto;
}
.kcv13-internal--excursion article :is(.wp-block-gallery, .wp-block-columns) {
  margin-bottom: clamp(24px, 4vw, 48px);
}
.kcv13-internal--excursion article .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-block: 22px 42px;
}
.kcv13-internal--excursion article .wp-block-image img { border-radius: 3px; }
.kcv13-internal--excursion article h4 {
  font-size: clamp(19px, 1.9vw, 25px);
}

/* Restaurants: adapt existing WP content / image groups, keep menus and booking links live. */
.kcv13-internal--restaurant article .wp-block-group {
  box-sizing: border-box;
  max-width: 100%;
}
.kcv13-internal--restaurant article > .wp-block-columns,
.kcv13-internal--restaurant article > .wp-block-group {
  margin-bottom: clamp(24px, 4vw, 56px);
}
.kcv13-internal--restaurant article .wp-block-image img {
  border-radius: 3px;
  box-shadow: 0 12px 30px rgba(48, 21, 20, .09);
  display: block;
}
.kcv13-internal--restaurant article :is(.wp-block-buttons, .dm_buttons) {
  gap: 12px;
}
.kcv13-internal--restaurant article .wp-block-button__link { letter-spacing: .01em; }
.kcv13-internal--restaurant article .wp-block-column > :first-child { margin-top: 0; }

/* Contacts: preserve the existing map/structured content and give it consistent spacing. */
.kcv13-internal--contacts .kupetz-content-layout {
  margin-inline: auto;
  max-width: 1200px;
}
.kcv13-internal--contacts .kupetz-contacts-info__block {
  align-items: stretch;
  gap: clamp(14px, 2vw, 28px);
}
.kcv13-internal--contacts .kupetz-contacts-info__block > * {
  box-sizing: border-box;
  min-width: 0;
}
.kcv13-internal--contacts .kupetz-contacts-info__block :is(p, a) {
  overflow-wrap: anywhere;
}
.kcv13-internal--contacts .kupetz-contacts-map,
.kcv13-internal--contacts #ya-map,
.kcv13-internal--contacts .kupetz-contacts-map iframe {
  max-width: 100%;
}
.kcv13-internal--contacts article a[href^="tel:"],
.kcv13-internal--contacts article a[href^="mailto:"] {
  color: var(--kcv13-wine);
  text-decoration-color: var(--kcv13-gold);
  text-underline-offset: 4px;
}

@media (max-width: 767px) {
  .kcv13-internal.kupetz-content-shell--standard { padding-top: 38px; }
  .kcv13-internal article > h1 { font-size: clamp(28px, 7.5vw, 36px); margin-bottom: 26px; }
  .kcv13-internal article :is(p, li) { font-size: 15px; line-height: 1.65; }
  .kcv13-internal article .wp-block-columns:not(.is-not-stacked-on-mobile) { gap: 16px; }
  .kcv13-internal--history .kupetz-history-slider-list { width: 100%; }
  .kcv13-internal--history .kupetz-history-slider-item { padding-inline: 10px; }
  .kcv13-internal--history .kupetz-history-slider-nav-next,
  .kcv13-internal--history .kupetz-history-slider-nav-prev { padding-inline: 8px; }
  .kcv13-internal--contacts .kupetz-contacts-info__block { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .kcv13-internal article .wp-block-button__link,
  .kcv13-internal article a.button { transition: none; }
}

/* =====================================================================
   Kupetz Design v1.4.1 — History corrections (TEST only, scoped).
   One visible title; exhibit image; narrative BELOW media; compact timeline.
   Existing history slider JS, photographs, copy and decorative page grid
   remain untouched. No restaurant-page redesign: external project now.
   ===================================================================== */
.kcv13-internal--history {
  --kcv141-wine: #570d1b;
  --kcv141-gold: #b48a52;
  --kcv141-ink: #493a36;
  --kcv141-border: rgba(178, 143, 91, .44);
}

/* The page template adds its own H1 before the content's existing
   "История / 1812—2012" heading. Retain H1 semantically but visually
   hide it: exactly one visible page heading, no empty top gap. */
.kcv13-internal--history article > h1 {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.kcv13-internal--history article > h1::before,
.kcv13-internal--history article > h1::after { content: none; }

.kcv13-internal--history.kupetz-content-shell--standard {
  padding-top: clamp(43px, 4vw, 64px);
}
.kcv13-internal--history .kupetz-history {
  box-sizing: border-box;
  margin: 0 auto clamp(48px, 6vw, 80px);
  max-width: 1120px;
}

/* The original heading has the historical period as a second line.
   Keep that native content instead of generating another label. */
.kcv13-internal--history .kupetz-history-title {
  color: var(--kcv141-wine);
  font-family: var(--kupetz-font-display, Georgia, serif);
  font-size: clamp(31px, 3.35vw, 47px);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: .014em;
  margin: 0 auto clamp(24px, 3vw, 36px);
  max-width: 960px;
  padding: 0 12px;
  text-align: center;
}

/* Gallery: restrained art-gallery framing, not a heavy stack of ovals,
   multiple nested borders and giant shadows. */
.kcv13-internal--history .kupetz-history-slides-wrap {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: min(100%, 1080px);
  padding: 0;
  position: relative;
}
.kcv13-internal--history .kupetz-history-slides-wrap::before {
  border: 1px solid var(--kcv141-border);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 65;
}
.kcv13-internal--history .kupetz-history-slides {
  background: #fff;
  border-radius: 0;
  box-shadow: 0 14px 38px rgba(42, 25, 23, .075);
  max-width: 100%;
  overflow: hidden;
}
.kcv13-internal--history .kupetz-history-slides::after {
  content: none;
}
.kcv13-internal--history .kupetz-history-slide img {
  display: block;
  height: auto;
  max-width: 100%;
}

/* Full separation between the photograph and the story: the old v1.4
   year pill's negative margin was visually sitting ON the photograph. */
.kcv13-internal--history .kupetz-history-slider {
  box-sizing: border-box;
  margin: clamp(23px, 3vw, 40px) auto 0;
  max-width: min(100%, 1080px);
  padding: 0 0 12px;
  top: 0;
}
.kcv13-internal--history .kupetz-history-slider-nav {
  position: relative;
}
.kcv13-internal--history .kupetz-history-slider-list {
  background: #fffdfa;
  border: 1px solid var(--kcv141-border);
  border-radius: 2px;
  box-shadow: 0 10px 28px rgba(42, 25, 23, .045);
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 780px;
  padding: clamp(25px, 3.5vw, 40px) 0 clamp(26px, 3vw, 38px);
  width: 70%;
}
.kcv13-internal--history .kupetz-history-slider-list::after {
  border: 0;
  border-radius: 0;
  content: none;
}
.kcv13-internal--history .kupetz-history-slider-item {
  padding-inline: clamp(20px, 3.5vw, 54px);
}
.kcv13-internal--history .kupetz-history-slider-item .kupetz-history-date {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--kcv141-gold);
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
  color: var(--kcv141-wine);
  display: table;
  font-family: var(--kupetz-font-display, Georgia, serif);
  font-size: clamp(25px, 2.7vw, 36px);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.2;
  margin: 0 auto 18px;
  max-width: 100%;
  min-width: 0;
  padding: 0 18px 10px;
  text-shadow: none;
}
.kcv13-internal--history .kupetz-history-slider-item .kupetz-history-date::after {
  content: none;
}
.kcv13-internal--history .kupetz-history-slider-item .kupetz-history-name {
  color: var(--kcv141-wine);
  font-family: var(--kupetz-font-serif, Georgia, serif);
  font-size: clamp(21px, 2.25vw, 29px);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 clamp(12px, 1.7vw, 19px);
}
.kcv13-internal--history .kupetz-history-text {
  color: var(--kcv141-ink);
  font-family: var(--kupetz-font-body, Arial, sans-serif);
  font-size: clamp(15px, 1.18vw, 17px);
  line-height: 1.75;
  margin-inline: auto;
  max-width: 68ch;
  text-shadow: none;
}
.kcv13-internal--history .kupetz-history-text :is(p, li) {
  line-height: inherit;
}

/* The original navigation is live; restyle it without changing bindings.
   Years remain readable, long neighbouring titles can wrap below them. */
.kcv13-internal--history .kupetz-history-slider-nav-prev,
.kcv13-internal--history .kupetz-history-slider-nav-next {
  background: rgba(250, 247, 241, .88);
  border: 1px solid transparent;
  border-radius: 2px;
  box-sizing: border-box;
  color: var(--kcv141-wine);
  cursor: pointer;
  min-height: 96px;
  outline-offset: 3px;
  padding: 12px 8px;
  position: absolute;
  top: 30px;
  transform: none;
  transition: border-color .16s ease, background-color .16s ease;
  width: 14%;
  z-index: 51;
}
.kcv13-internal--history .kupetz-history-slider-nav-prev { left: 0; }
.kcv13-internal--history .kupetz-history-slider-nav-next { right: 0; }
.kcv13-internal--history .kupetz-history-slider-nav-prev::before,
.kcv13-internal--history .kupetz-history-slider-nav-next::before {
  color: var(--kcv141-gold);
  display: block;
  font-family: Arial, sans-serif;
  font-size: 23px;
  line-height: 1.25;
}
.kcv13-internal--history .kupetz-history-slider-nav-prev::before { content: "\2190"; }
.kcv13-internal--history .kupetz-history-slider-nav-next::before { content: "\2192"; }
.kcv13-internal--history .kupetz-history-slider-nav-prev:hover,
.kcv13-internal--history .kupetz-history-slider-nav-next:hover,
.kcv13-internal--history .kupetz-history-slider-nav-prev:focus-visible,
.kcv13-internal--history .kupetz-history-slider-nav-next:focus-visible {
  background: #fff;
  border-color: var(--kcv141-border);
}
.kcv13-internal--history .kupetz-history-slider-nav-prev :is(.kupetz-history-date, .kupetz-history-name),
.kcv13-internal--history .kupetz-history-slider-nav-next :is(.kupetz-history-date, .kupetz-history-name) {
  color: inherit;
  text-shadow: none;
}
.kcv13-internal--history .kupetz-history-slider-nav-prev .kupetz-history-date,
.kcv13-internal--history .kupetz-history-slider-nav-next .kupetz-history-date {
  display: block;
  font-family: var(--kupetz-font-display, Georgia, serif);
  font-size: clamp(17px, 1.55vw, 22px);
  letter-spacing: .02em;
  line-height: 1.25;
}
.kcv13-internal--history .kupetz-history-slider-nav-prev .kupetz-history-name,
.kcv13-internal--history .kupetz-history-slider-nav-next .kupetz-history-name {
  font-family: var(--kupetz-font-body, Arial, sans-serif);
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.38;
  margin: 7px auto 0;
  overflow-wrap: anywhere;
}

/* On tablets the description is still large enough to be readable.
   Move previous/next below the story on narrow screens, never over it. */
@media (max-width: 899px) {
  .kcv13-internal--history .kupetz-history-slider-list {
    width: 100%;
    max-width: 100%;
    padding-block: 26px 28px;
  }
  .kcv13-internal--history .kupetz-history-slider-nav {
    box-sizing: border-box;
    padding-bottom: 70px;
  }
  .kcv13-internal--history .kupetz-history-slider-nav-prev,
  .kcv13-internal--history .kupetz-history-slider-nav-next {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    min-height: 48px;
    padding: 7px 12px;
    top: auto;
    bottom: 0;
    transform: none;
    width: calc(50% - 7px);
    background: #faf7f2;
    border-color: var(--kcv141-border);
  }
  .kcv13-internal--history .kupetz-history-slider-nav-prev { left: 0; }
  .kcv13-internal--history .kupetz-history-slider-nav-next { right: 0; }
  .kcv13-internal--history .kupetz-history-slider-nav-prev .kupetz-history-name,
.kcv13-internal--history .kupetz-history-slider-nav-next .kupetz-history-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .kcv13-internal--history .kupetz-history-slider-nav-prev .kupetz-history-date,
.kcv13-internal--history .kupetz-history-slider-nav-next .kupetz-history-date {
    font-size: 18px;
    margin: 0;
  }
  .kcv13-internal--history .kupetz-history-slider-nav-prev::before,
  .kcv13-internal--history .kupetz-history-slider-nav-next::before {
    font-size: 19px;
    flex: 0 0 auto;
  }
}
@media (max-width: 575px) {
  .kcv13-internal--history.kupetz-content-shell--standard { padding-top: 28px; }
  .kcv13-internal--history .kupetz-history-title {
    font-size: clamp(28px, 8vw, 37px);
    margin-bottom: 24px;
  }
  .kcv13-internal--history .kupetz-history-slider { margin-top: 23px; }
  .kcv13-internal--history .kupetz-history-slider-list { padding-block: 23px 25px; }
  .kcv13-internal--history .kupetz-history-slider-item { padding-inline: 18px; }
  .kcv13-internal--history .kupetz-history-slider-item .kupetz-history-date {
    font-size: 27px;
    margin-top: 0;
    margin-bottom: 14px;
    padding: 0 13px 8px;
  }
  .kcv13-internal--history .kupetz-history-slider-item .kupetz-history-name {
    font-size: clamp(21px, 5.4vw, 26px);
  }
  .kcv13-internal--history .kupetz-history-slider-nav-prev,
  .kcv13-internal--history .kupetz-history-slider-nav-next {
    background: #fffdfa;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kcv13-internal--history .kupetz-history-slider-nav-prev,
  .kcv13-internal--history .kupetz-history-slider-nav-next { transition: none; }
}

/* Contacts: same paper, fields and actions as the shopping journey.
 * TEST page-role + shared redesign guard; native Ninja Forms and map retained.
 */
body.kcv9-active .kcv13-internal--contacts {
  background: #fbf8f1;
  padding-bottom: 56px;
}
body.kcv9-active .kcv13-internal--contacts > .kupetz-page-background,
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-info::after { display: none; }
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-info {
  width: 100%;
  max-width: 1200px;
  padding: 0;
  margin: 0 auto 32px;
}
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-info__block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(300px, .8fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  align-items: start;
}
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-info__block > .col-12 {
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 24px;
  border: 1px solid #e5d9ca;
  border-radius: 4px;
  background: #fffdf9;
}
body.kcv9-active .kcv13-internal--contacts .contacts-info-data > :first-child { margin-top: 0; }
body.kcv9-active .kcv13-internal--contacts .contacts-info-data p {
  margin-bottom: 20px;
  color: #352126;
  font-size: 15px;
  line-height: 1.7;
}
body.kcv9-active .kcv13-internal--contacts .socials { margin-block: 0 20px; }
body.kcv9-active .kcv13-internal--contacts .nf-form-cont { margin: 0; }
body.kcv9-active .kcv13-internal--contacts .nf-form-content { padding: 0; }
body.kcv9-active .kcv13-internal--contacts .nf-form-fields-required {
  margin-bottom: 18px;
  color: #75665f;
  font: 400 12px/1.6 var(--kupetz-font-body, Arial, sans-serif);
}
body.kcv9-active .kcv13-internal--contacts .nf-field-container { margin-bottom: 18px; }
body.kcv9-active .kcv13-internal--contacts .nf-field-element :is(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea) {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cdbb9f;
  border-radius: 3px;
  background: #fff;
  color: #352126;
  font: 400 16px/1.45 var(--kupetz-font-body, Arial, sans-serif);
}
body.kcv9-active .kcv13-internal--contacts .nf-field-element textarea {
  min-height: 180px;
  resize: vertical;
}
body.kcv9-active .kcv13-internal--contacts .nf-field-element :is(input, textarea)::placeholder { color: #93877f; opacity: 1; }
body.kcv9-active .kcv13-internal--contacts .nf-field-element input[type="submit"] {
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid #540b16;
  border-radius: 3px;
  background: #540b16;
  color: #fffdf9;
  font: 600 14px/1.4 var(--kupetz-font-body, Arial, sans-serif);
  cursor: pointer;
}
body.kcv9-active .kcv13-internal--contacts .nf-field-element input[type="submit"]:hover { background: #75192b; }
body.kcv9-active .kcv13-internal--contacts .nf-field-element input[type="submit"]:disabled { opacity: .6; cursor: wait; }
body.kcv9-active .kcv13-internal--contacts .submit-container { margin-bottom: 0; }
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-creators { float: none; margin-bottom: 18px; }
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-info__block :is(iframe, table, [class^="TA_"]) { max-width: 100%; }
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-map { overflow: hidden; border: 1px solid #e5d9ca; border-radius: 4px; }
@media (max-width: 1100px) {
  body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-info__block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-info__block > .col-12:last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-info__block { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-info__block > .col-12 { padding: 20px; }
}

/* Contacts map: approved full-viewport bleed, touching the footer.
 * The map is the last child of .contacts, alongside the limited-width
 * .kupetz-contacts-info; only the map breaks out of the 1200px content grid.
 * Scope: TEST's existing kcv13 contacts design, RU and EN.
 */
body.kcv9-active .kcv13-internal--contacts {
  padding-bottom: 0;
  overflow-x: clip;
}
/* History v94 restored the shared kcv81-paper wrapper. Its 6vw bottom
 * padding had higher specificity than the contact map's zero-gap rule,
 * leaving an 86px strip above the footer on desktop. Narrowly override
 * the shared paper padding only on the Contacts page (RU/EN).
 */
body.kcv20-chrome.kcv9-active .kupetz-content-shell.kcv81-paper.kcv13-internal--contacts {
  padding-bottom: 0;
}
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-map {
  box-sizing: border-box;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-map .contacts-map-wrapper,
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-map #ya-map {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-map iframe {
  display: block;
  max-width: 100%;
}
/* WordPress inserts a trailing empty paragraph in the map wrapper.
 * Its collapsing margin left a 15–17px paper strip above the footer. */
body.kcv9-active .kcv13-internal--contacts .kupetz-contacts-map .contacts-map-wrapper > p {
  margin: 0;
  padding: 0;
}

/* Excursion and interior: continuous paper surface and a banner in normal
 * document flow. TEST-only stylesheet + shared rollback guard; no gallery,
 * panorama, booking URL or stored block-content changes.
 */
body.kcv9-active:is(.kupetz-page--excursion, .kupetz-page--interior) .kupetz-hero.kupetz-hero--fixed {
  position: relative;
  top: auto;
  margin-top: 0;
  height: clamp(240px, 38vw, 480px);
}
body.kcv9-active:is(.kupetz-page--excursion, .kupetz-page--interior) .kupetz-hero-spacer { display: none; }
body.kcv9-active:is(.kupetz-page--excursion, .kupetz-page--interior) .kupetz-hero--fixed + .kupetz-hero-spacer + .kupetz-content-shell {
  margin-top: 0;
  padding-block: clamp(36px, 4vw, 56px) 64px;
  background: #fbf8f1;
}
body.kcv9-active:is(.kupetz-page--excursion, .kupetz-page--interior) .kupetz-content-shell > .kupetz-page-background { display: none; }
body.kcv9-active.kupetz-page--interior .kupetz-hero__slides--panorama { margin-top: 0; }
body.kcv9-active.kupetz-page--interior .kupetz-interior-panorama { height: 100%; margin-top: 0; }
body.kcv9-active .kcv13-internal--interior > .container-flow {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}
body.kcv9-active .kcv13-internal--interior .kupetz-classic-gallery-block {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  margin-bottom: 48px;
}
body.kcv9-active .kcv13-internal--interior .gallery-title { font-size: clamp(26px, 3vw, 36px); }
body.kcv9-active .kcv13-internal--excursion .about-content { margin-bottom: 0; }
body.kcv9-active .kcv13-internal--excursion .about-text-intro > :is(p, h2, h4) {
  max-width: 920px;
  margin-inline: auto;
}
body.kcv9-active .kcv13-internal--excursion .about-text-intro > p { font-size: 16px; line-height: 1.75; margin-bottom: 20px; }
body.kcv9-active .kcv13-internal--excursion .about-text-intro > .wp-block-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: center;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid #e5d9ca;
  border-radius: 4px;
  background: #fffdf9;
}
body.kcv9-active .kcv13-internal--excursion .about-text-intro > .wp-block-columns > .wp-block-column { min-width: 0; padding: 0; }
body.kcv9-active .kcv13-internal--excursion .about-text-intro .wp-block-column > :last-child { margin-bottom: 0; }
body.kcv9-active .kcv13-internal--excursion .about-text-intro .wp-block-image img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
body.kcv9-active .kcv13-internal--excursion .about-text-intro > .nobg { padding: 0; border: 0; align-items: stretch; }
body.kcv9-active .kcv13-internal--excursion .nobg > .wp-block-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e5d9ca;
  border-radius: 4px;
  background: #fffdf9;
}
body.kcv9-active .kcv13-internal--excursion .about-text-intro .nobg a.button {
  box-sizing: border-box;
  display: block;
  width: calc(100% - 40px);
  min-height: 46px;
  margin: 20px;
  padding: 12px 18px;
  border: 1px solid #540b16;
  border-radius: 3px;
  background: #540b16;
  color: #fffdf9;
  font: 600 14px/1.5 var(--kupetz-font-body, Arial, sans-serif);
  text-align: center;
  text-decoration: none;
}
body.kcv9-active .kcv13-internal--excursion .nobg a.button:hover { background: #75192b; }
@media (max-width: 767px) {
  body.kcv9-active .kcv13-internal--excursion .about-text-intro > .wp-block-columns { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px; }
  body.kcv9-active .kcv13-internal--excursion .about-text-intro > .nobg { padding: 0; }
  body.kcv9-active .kcv13-internal--excursion .about-text-intro .wp-block-column p { font-size: 15px; line-height: 1.7; }
}

/* News and information pages. No changes to VK loading, legal content,
 * delivery prices or zone colours: the map legend keeps its meaning.
 */
/* Keep the shared kcv81-paper diamond lattice on every standard CMS page.
 * Do not reset the background image with a solid 'background' shorthand.
 * Special v94 History, gallery and hero layouts are intentionally separate.
 */
body.kcv9-active .kupetz-content-shell.kcv13-internal:is(.kcv13-internal--news, .kcv13-internal--payment-delivery, .kcv13-internal--information) {
  padding-block: clamp(36px, 4vw, 56px) 64px;
}
body.kcv9-active .kcv13-internal:is(.kcv13-internal--news, .kcv13-internal--payment-delivery, .kcv13-internal--information) > .kupetz-page-background { display: none; }
body.kcv9-active .kcv13-internal--news #vk_wall { padding: 0; }
body.kcv9-active .kcv13-internal--news #sbi_vk { padding: 0; gap: 24px; }
body.kcv9-active .kcv13-internal--news .sbi_vk_item {
  width: 100%;
  margin: 0;
  border: 1px solid #e5d9ca;
  border-radius: 4px;
  background: #fffdf9;
}
body.kcv9-active .kcv13-internal--news .sbi_vk_photo_wrap {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: stretch;
}
body.kcv9-active .kcv13-internal--news .sbi_vk_item .sbi_vk_photo_block {
  width: auto;
  height: auto;
  min-height: 300px;
  border: 0;
  background-color: #f1e9dc;
  background-position: center;
  box-shadow: none;
}
body.kcv9-active .kcv13-internal--news .sbi_vk_post-text {
  box-sizing: border-box;
  display: block;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 24px;
  color: #352126;
  font: 400 16px/1.7 var(--kupetz-font-body, Arial, sans-serif);
  overflow-wrap: anywhere;
}
body.kcv9-active .kcv13-internal--news .sbi_vk_post-text a {
  display: table;
  min-height: 46px;
  box-sizing: border-box;
  margin-top: 18px;
  padding: 10px 20px;
  border: 1px solid #540b16;
  border-radius: 3px;
  background: #540b16;
  color: #fffdf9;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
/* Legacy load-more uses !important; scope the override to this page only. */
body.kcv9-active .kcv13-internal--news .sbi_load_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: auto;
  min-height: 46px;
  margin-top: 24px !important;
  padding: 12px 24px !important;
  border: 1px solid #540b16;
  border-radius: 3px;
  background: #540b16 !important;
  color: #fffdf9 !important;
  font: 600 14px/1.5 var(--kupetz-font-body, Arial, sans-serif);
  text-transform: none;
  text-decoration: none;
}
body.kcv9-active .kcv13-internal--news .sbi_load_btn::after { content: none; }
body.kcv9-active .kcv13-internal--news .sbi_load_btn[aria-busy="true"] { opacity: .65; cursor: progress; }
body.kcv9-active .kcv13-internal--news #sbi_load[hidden] { display: none; }
/* Payment, return and privacy copy follows the same editorial page grid
 * as other standard CMS pages: no inner white card, border or inset padding.
 * Zone legend backgrounds stay owned by their individual delivery components.
 */
body.kcv9-active .kcv13-internal:is(.kcv13-internal--payment-delivery, .kcv13-internal--information) .kupetz-content-main > article {
  box-sizing: border-box;
  max-width: 980px;
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* A fit-content CMS H1 with max-width:100% plus inline padding overflowed
 * the 390px viewport by 6px after removing its obsolete white wrapper. */
body.kcv9-active .kcv13-internal:is(.kcv13-internal--payment-delivery, .kcv13-internal--information) article > h1:not(.screen-reader-text) {
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
body.kcv9-active .kcv13-internal:is(.kcv13-internal--payment-delivery, .kcv13-internal--information) article :is(h2, h3) {
  display: block;
  padding: 0;
  margin: 32px 0 16px;
  font: 400 clamp(23px, 2.3vw, 30px)/1.35 var(--kupetz-font-display, Georgia, serif);
  text-align: left;
  text-transform: none;
}
body.kcv9-active .kcv13-internal:is(.kcv13-internal--payment-delivery, .kcv13-internal--information) article :is(h2, h3)::before,
body.kcv9-active .kcv13-internal:is(.kcv13-internal--payment-delivery, .kcv13-internal--information) article :is(h2, h3)::after { content: none; }
body.kcv9-active .kcv13-internal:is(.kcv13-internal--payment-delivery, .kcv13-internal--information) article :is(p, li) { font-size: 16px; line-height: 1.75; }
body.kcv9-active .kcv13-internal--payment-delivery .landing-delivery-price-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
body.kcv9-active .kcv13-internal--payment-delivery .landing-delivery-price-wrap > div {
  width: auto;
  max-width: none;
  min-width: 0;
  border: 1px solid #e5d9ca;
  border-radius: 3px;
  overflow: hidden;
}
body.kcv9-active .kcv13-internal--payment-delivery .landing-delivery-price-title { padding: 12px; font-size: 14px; }
body.kcv9-active .kcv13-internal--payment-delivery .landing-delivery-price-content { height: auto; margin: 0; padding: 12px; border: 0; }
body.kcv9-active .kcv13-internal--payment-delivery .landing-delivery-price-content p { margin: 0; }
body.kcv9-active .kcv13-internal--payment-delivery #delivery_map { border: 1px solid #e5d9ca; border-radius: 3px; overflow: hidden; }
@media (max-width: 700px) {
  body.kcv9-active .kcv13-internal--news .sbi_vk_photo_wrap { grid-template-columns: minmax(0, 1fr); }
  body.kcv9-active .kcv13-internal--news .sbi_vk_item .sbi_vk_photo_block { height: 260px; min-height: 0; }
  body.kcv9-active .kcv13-internal--news .sbi_vk_post-text { padding: 20px; font-size: 15px; }
  body.kcv9-active .kcv13-internal--payment-delivery .landing-delivery-price-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
