/* Phone and tablet finishing for published reading / gallery routes only.
   Loaded after the existing editorial/common finish; desktop stays unchanged. */
@media (max-width: 940px) {
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .cr3-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Breadcrumb destinations remain easy to tap without enlarging their type. */
  html body.kk-sys.kk-polished-page:is(.kk-editorial-page,.kp-gallery,.kp-legal) #main-content#main-content#main-content nav[aria-label="Breadcrumb"],
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-breadcrumb {
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    min-width: 0;
  }
  html body.kk-sys.kk-polished-page:is(.kk-editorial-page,.kp-gallery,.kp-legal) #main-content#main-content#main-content nav[aria-label="Breadcrumb"] a,
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
    padding-block: 8px;
  }

  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-toc a {
    min-height: 48px;
    padding-block: 12px !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-prose figure summary {
    min-height: 48px;
    box-sizing: border-box;
    padding-block: 10px;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-table-scroll {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-table-scroll:focus-visible {
    outline: 3px solid #006740;
    outline-offset: 3px;
  }

  /* Gallery service destinations are distinct controls, unlike prose links. */
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kk-flat-project-links a {
    min-height: 48px !important;
    box-sizing: border-box;
    padding-block: 10px !important;
    overflow-wrap: anywhere;
  }
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kk-closing-panel a[href="/usluge"] {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding-block: 10px;
    box-sizing: border-box;
  }
  html body.kk-sys.kk-polished-page.kp-legal #main-content#main-content#main-content .kk-flat-legal-copy a:is([href^="mailto:"],[href^="tel:"]) {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    max-width: 100%;
    box-sizing: border-box;
    padding-block: 10px;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 760px) {
  body.kk-polished-page:is(.kk-editorial-page,.kp-gallery,.kp-legal,.kp-not-found) {
    --km-reading-gutter: clamp(18px, 5vw, 24px);
  }

  /* Keep the index, cover and reading column on one dependable phone inset. */
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-index-opening {
    padding: 20px var(--km-reading-gutter) 44px !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-index-opening > nav {
    margin-bottom: 12px !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-index-hero h1 {
    font-size: clamp(32px, 8.3vw, 42px) !important;
    line-height: 1.12 !important;
    overflow-wrap: break-word;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-featured {
    gap: 24px !important;
    margin-top: 32px !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-featured-copy h2 {
    font-size: clamp(24px, 6.4vw, 29px) !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-categories {
    overflow: visible !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-categories > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px !important;
    padding: 16px var(--km-reading-gutter) !important;
    white-space: normal !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-categories a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px !important;
    padding: 10px 16px !important;
    text-align: center;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content > section > .cr3-container {
    width: calc(100% - 2 * var(--km-reading-gutter)) !important;
    padding-block: 44px !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .cr3-article-hero .kk-editorial-opening {
    width: calc(100% - 2 * var(--km-reading-gutter)) !important;
    padding-block: 18px 36px !important;
    gap: 18px;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-heading h1 {
    font-size: clamp(30px, 7.7vw, 40px) !important;
    line-height: 1.15 !important;
    overflow-wrap: break-word;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-heading .cr3-article-meta {
    font-size: 13px !important;
    margin-top: 18px !important;
    padding-top: 14px;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-prose {
    padding: 36px var(--km-reading-gutter) 44px !important;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-prose h2 {
    font-size: clamp(24px, 6.2vw, 28px) !important;
    margin-top: 1.65em !important;
    scroll-margin-top: 104px;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-prose h3 {
    font-size: 22px !important;
    scroll-margin-top: 104px;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-prose > figure {
    margin-block: 28px !important;
    padding: 8px !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-toc {
    margin-block: 28px 32px !important;
    padding: 20px !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-inquiry {
    padding: 24px 20px !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-inquiry > div {
    display: flex;
    flex-wrap: wrap;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-flat-section-head {
    margin-bottom: 24px;
    align-items: flex-start;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-flat-section-head h2 {
    font-size: clamp(27px, 7vw, 32px) !important;
    min-width: 0;
    overflow-wrap: break-word;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-card .cr3-card-copy {
    padding: 20px 12px 14px !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-card .kk-editorial-read-more {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding-top: 12px !important;
  }

  /* Four real gallery choices fit as a stable two-by-two toolbar on phones. */
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kp-gallery-intro {
    padding: 20px var(--km-reading-gutter) 32px !important;
  }
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kp-gallery-intro > nav {
    margin-bottom: 12px !important;
  }
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kk-taste-filters {
    position: relative !important;
    top: auto !important;
  }
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kk-fltrow {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 14px var(--km-reading-gutter) !important;
  }
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kk-fltrow button:not(.flt-hide) {
    min-height: 48px !important;
    min-width: 0 !important;
    width: 100%;
    padding: 12px !important;
    white-space: normal;
  }
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kk-flat-work-section > .kk-taste-section-inner {
    padding: 24px var(--km-reading-gutter) 48px !important;
  }
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kk-flat-caption {
    padding: 20px !important;
  }
  html body.kk-sys.kk-polished-page.kp-gallery #main-content#main-content#main-content .kk-flat-project-links {
    gap: 10px !important;
    padding-top: 12px;
  }

  html body.kk-sys.kk-polished-page.kp-legal #main-content#main-content#main-content .kk-inner-hero > div {
    padding: 20px var(--km-reading-gutter) 32px !important;
  }
  html body.kk-sys.kk-polished-page.kp-legal #main-content#main-content#main-content .kk-inner-hero h1 {
    font-size: clamp(32px, 8.5vw, 42px) !important;
    line-height: 1.13 !important;
    margin-block: 12px 18px !important;
    overflow-wrap: break-word;
  }
  html body.kk-sys.kk-polished-page.kp-legal #main-content#main-content#main-content .kk-inner-hero nav {
    margin-bottom: 12px !important;
  }
  html body.kk-sys.kk-polished-page.kp-legal #main-content#main-content#main-content .kk-flat-legal-copy {
    padding: 36px var(--km-reading-gutter) 48px !important;
    gap: 28px !important;
    overflow-wrap: anywhere;
  }
  html body.kk-sys.kk-polished-page.kp-legal #main-content#main-content#main-content .kk-flat-legal-copy h2 {
    font-size: clamp(23px, 6vw, 26px) !important;
    line-height: 1.3 !important;
  }
  html body.kk-sys.kk-polished-page.kp-legal #main-content#main-content#main-content .kk-flat-legal-copy > div:last-child > div {
    gap: 4px 18px !important;
  }

  html body.kk-sys.kk-polished-page.kp-not-found #main-content#main-content#main-content .kk-flight-404 {
    padding: 32px var(--km-reading-gutter) 48px !important;
    gap: 28px !important;
    min-height: 0;
  }
  html body.kk-sys.kk-polished-page.kp-not-found #main-content#main-content#main-content .kk-flight-404-copy {
    min-width: 0;
  }
  html body.kk-sys.kk-polished-page.kp-not-found #main-content#main-content#main-content .kk-flight-404-copy h1 {
    font-size: clamp(34px, 9vw, 44px) !important;
    line-height: 1.12 !important;
    overflow-wrap: break-word;
  }
}

@media (max-width: 600px) {
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .cr3-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-categories > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-categories a {
    min-width: 0;
    padding: 10px 12px !important;
    white-space: normal;
    line-height: 1.4 !important;
  }
  html body.kk-sys.kk-polished-page.kk-editorial-page #main-content#main-content#main-content .kk-editorial-categories a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  html body.kk-sys.kk-flat-interior.kk-polished-page.kk-editorial-page #main-content#main-content#main-content :is(.kk-editorial-inquiry,.cr3-cta) .kp-action,
  html body.kk-sys.kk-flat-interior.kk-polished-page.kp-gallery #main-content#main-content#main-content .kk-flat-project-links .kp-project-action {
    width: 100%;
    min-width: 0;
    padding-inline: 16px !important;
    text-align: center;
  }
  html body.kk-sys.kk-flat-interior.kk-polished-page.kp-not-found #main-content#main-content#main-content .kk-flight-404-copy > a {
    display: flex !important;
    width: 100%;
    margin: 12px 0 0 !important;
    text-align: center;
  }
}
