/* Mobile layout repair for the currently deployed Korotkova practice site. */
/* Explicit text fill also repairs the original gold button's inherited colour. */
#top .hero-copy .button.kp-dikidi-message,
#contact.kp-lux-contact .button.kp-dikidi-message {
  color: #f3e4c5 !important;
  -webkit-text-fill-color: #f3e4c5 !important;
  border-color: #c5a66d !important;
  background: #ffffff08 !important;
  text-shadow: none;
  box-shadow: none;
}
.wrap > .hero .button.kp-dikidi-message {
  color: #534730 !important;
  -webkit-text-fill-color: #534730 !important;
  border-color: #8f7449 !important;
  text-shadow: none;
  box-shadow: none;
}
.kp-article-cta .button.kp-dikidi-message {
  color: #f3e4c5 !important;
  -webkit-text-fill-color: #f3e4c5 !important;
  border-color: #c5a66d !important;
}

@media screen and (max-width: 760px) {
  html { scroll-padding-top: 84px; }
  main, .wrap, .hero-copy, .contact-copy, .contact-card {
    min-width: 0;
    box-sizing: border-box;
  }
  .kp-unified-header {
    height: auto;
    min-height: 68px;
    padding: 12px 16px;
    gap: 10px;
    box-sizing: border-box;
    overflow: visible;
  }
  .kp-unified-header .brand { min-width: 0; flex-shrink: 1; gap: 8px; }
  .kp-unified-header .brand > span:not(.brand-mark) { min-width: 0; }
  .kp-unified-header .brand-mark { flex: 0 0 32px; width: 32px; height: 38px; }
  .kp-unified-header .brand strong { font-size: clamp(17px, 4.7vw, 20px); line-height: 1.2; }
  .kp-unified-header .brand small { font-size: 8px; letter-spacing: .02em; line-height: 1.4; }
  .kp-unified-header > nav, .kp-unified-header .header-cta { display: none; }
  .kp-unified-header .kp-mobile-menu {
    display: block;
    position: static;
    flex: 0 0 auto;
    margin-left: auto;
  }
  .kp-unified-header .kp-mobile-menu > summary {
    min-width: 62px;
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 14px;
  }
  .kp-unified-header .kp-mobile-menu > .kp-mobile-links {
    position: absolute;
    top: calc(100% + 6px);
    left: 12px;
    right: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 45;
  }
  .kp-unified-header .kp-mobile-menu:not([open]) > .kp-mobile-links { display: none; }
  .kp-unified-header .kp-mobile-links > a {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 48px;
    padding: 10px;
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  #top.hero { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  #top .hero-copy { min-width: 0; padding: 28px 22px 32px; }
  #top .hero-copy h1 { font-size: clamp(30px, 8.1vw, 42px); line-height: 1.09; overflow-wrap: normal; }
  #top .hero-copy .eyebrow { font-size: 9px; line-height: 1.65; letter-spacing: .12em; gap: 10px; }
  #top .hero-copy .eyebrow > span { width: 28px; flex: 0 0 28px; }
  #top .hero-copy .kp-hero-motto { font-size: clamp(21px, 5.5vw, 27px); line-height: 1.35; margin: 22px 0; padding-left: 14px; }
  #top .hero-copy .hero-lead { font-size: 16px; line-height: 1.6; margin-top: 22px; }
  #top .hero-copy .kp-consultation-summary { gap: 4px 8px; font-size: 13px; line-height: 1.55; margin-top: 22px; padding-top: 16px; }
  #top .hero-copy .kp-consultation-summary strong { font-size: 20px; white-space: nowrap; }
  #top .hero-copy .hero-actions {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 14px;
    margin-top: 20px;
    width: 100%;
    min-width: 0;
  }
  #top .hero-copy .hero-actions > a.button,
  #contact.kp-lux-contact .contact-copy > a.button {
    display: flex;
    flex: 0 0 auto !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 52px;
    padding: 14px 16px;
    margin: 0;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.4;
    white-space: normal;
    text-align: center;
  }
  #top .hero-copy .hero-actions > a.button + a.button { margin-top: 0; }
  #top .hero-card { min-width: 0; }
  #contact.kp-lux-contact {
    min-width: 0;
    max-width: calc(100% - 24px);
    margin: 24px 12px;
    padding: 28px 20px;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  #contact.kp-lux-contact h2 { font-size: clamp(29px, 7.8vw, 38px); line-height: 1.15; }
  #contact.kp-lux-contact .contact-copy > p:not(.section-kicker) { font-size: 16px; line-height: 1.6; }
  #contact.kp-lux-contact .contact-copy > a.button { margin-top: 22px; }
  #contact.kp-lux-contact .contact-copy > a.button + a.button { margin-top: 14px; }
  #contact.kp-lux-contact .contact-card { padding: 22px 18px; }
  #contact.kp-lux-contact .contact-phone { font-size: clamp(23px, 6.2vw, 30px); }
  #contact.kp-lux-contact .contact-card > a[href^="mailto:"] { overflow-wrap: anywhere; }
  #contact.kp-lux-contact .section-kicker { flex-wrap: wrap; gap: 8px; letter-spacing: .12em; }
  #contact.kp-lux-contact .kp-contact-offers strong { white-space: normal; }
  #contact.kp-lux-contact .social-links a { min-height: 46px; max-width: 100%; box-sizing: border-box; }

  #kp-privacy-banner {
    width: calc(100% - 24px);
    max-width: 480px;
    max-height: 55vh;
    max-height: 55dvh;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 12px;
    gap: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.5;
  }
  #kp-privacy-banner .kp-privacy-actions { width: 100%; gap: 8px; flex-wrap: nowrap; }
  #kp-privacy-banner .kp-privacy-actions button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 10px 8px; font-size: 12px; }
  .contact-choice__dialog { padding: 24px 18px; }
  .contact-choice__title { padding-right: 20px; font-size: 28px; }
  .contact-choice__channel { min-width: 0; gap: 10px; grid-template-columns: 36px minmax(0, 1fr) auto; }
  .contact-choice .messenger-icon, .contact-choice .kp-dikidi-icon, .contact-choice .kp-form-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .contact-choice__copy strong { font-size: 19px; }
  .contact-choice__copy small { font-size: 12px; overflow-wrap: anywhere; }
  .kp-practice .kp-btn, .kp-dikidi-panel .button { flex: 0 0 auto; min-width: 0; max-width: 100%; white-space: normal; }
  .wrap > .hero > div > .button.kp-dikidi-button,
  .wrap > .hero > div > .button.kp-dikidi-message,
  .kp-article-cta > .button.kp-dikidi-button,
  .kp-article-cta > .button.kp-dikidi-message {
    display: flex;
    flex: 0 0 auto !important;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    margin: 12px 0 0;
    padding: 14px 16px;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }
}

@media screen and (max-width: 359px) {
  .kp-unified-header { padding-inline: 12px; gap: 8px; }
  .kp-unified-header .brand strong { font-size: 17px; }
  .kp-unified-header .brand small { font-size: 7.5px; }
  #top .hero-copy { padding-inline: 18px; }
  #contact.kp-lux-contact { padding-inline: 16px; }
  #contact.kp-lux-contact .contact-card { padding-inline: 14px; }
}
